FlightGear next
|
XML-configured menu bar interface. More...
#include <menubar.hxx>
Inherited by FGCocoaMenuBar, FGNasalMenuBar, and FGWindowsMenuBar.
Public Member Functions | |
FGMenuBar () | |
virtual | ~FGMenuBar () |
Destructor. | |
virtual void | init ()=0 |
Initialize the menu bar from $FG_ROOT/gui/menubar.xml. | |
virtual void | postinit () |
virtual void | show ()=0 |
Make the menu bar visible. | |
virtual void | hide ()=0 |
Make the menu bar invisible. | |
virtual bool | isVisible () const =0 |
Test whether the menu bar is visible. | |
virtual void | setHideIfOverlapsWindow (bool hide)=0 |
Request the menubar to be hidden if its display overlays the main window content. | |
virtual bool | getHideIfOverlapsWindow () const =0 |
Static Public Member Functions | |
static std::string | getLocalizedLabel (SGPropertyNode *node) |
Read a menu label from the menu's property tree. | |
XML-configured menu bar interface.
This class creates a menu bar from a tree of XML properties. These properties are not part of the main FlightGear property tree, but are read from a separate file ($FG_ROOT/gui/menubar.xml).
Definition at line 18 of file menubar.hxx.
FGMenuBar::FGMenuBar | ( | ) |
Definition at line 10 of file menubar.cxx.
|
virtual |
Destructor.
Definition at line 14 of file menubar.cxx.
|
pure virtual |
Implemented in FGCocoaMenuBar, FGNasalMenuBar, and FGWindowsMenuBar.
|
static |
Read a menu label from the menu's property tree.
Take care of mapping it to the appropriate translation, if available. Returns an UTF-8 encoded string.
Definition at line 19 of file menubar.cxx.
|
pure virtual |
Make the menu bar invisible.
Implemented in FGCocoaMenuBar, FGNasalMenuBar, and FGWindowsMenuBar.
|
pure virtual |
Initialize the menu bar from $FG_ROOT/gui/menubar.xml.
Implemented in FGCocoaMenuBar, FGNasalMenuBar, and FGWindowsMenuBar.
|
pure virtual |
Test whether the menu bar is visible.
Implemented in FGCocoaMenuBar, FGNasalMenuBar, and FGWindowsMenuBar.
|
inlinevirtual |
Reimplemented in FGNasalMenuBar.
Definition at line 34 of file menubar.hxx.
|
pure virtual |
Request the menubar to be hidden if its display overlays the main window content.
(Which essentially means the PUI menubar at the moment). This is used to prevent the menubar overlapping the splash-screen during startup.
The state of this flag is independant of the normal menubar visibility, i.e this flag and the normal visibility and AND-ed together inside the code.
Implemented in FGCocoaMenuBar, FGNasalMenuBar, and FGWindowsMenuBar.
|
pure virtual |
Make the menu bar visible.
Implemented in FGCocoaMenuBar, FGNasalMenuBar, and FGWindowsMenuBar.