JUCE offers a means of creating menu bar user interface controls, as you will have seen, using the Introjucer application, and in the JUCE Demo application in Chapter 1, Installing JUCE and the Introjucer Application. These menu bars may be within a window on all platforms using JUCE's own
MenuBarComponent class, or as a native menu bar at the top of the screen on Mac OS X. To demonstrate this we will add some special commands to the
Chapter05_04 project to reset the label and slider in various ways.
The first requirement for constructing menu bars in JUCE is to create a menu bar model
by creating a subclass of the
MenuBarModel class. First add the
MenuBarModel class as a base class for the
MainContentComponent class in ...