FlightGear next
FGMenuBar Class Referenceabstract

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.
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ FGMenuBar()

FGMenuBar::FGMenuBar ( )

Definition at line 10 of file menubar.cxx.

◆ ~FGMenuBar()

FGMenuBar::~FGMenuBar ( )
virtual

Destructor.

Definition at line 14 of file menubar.cxx.

Member Function Documentation

◆ getHideIfOverlapsWindow()

virtual bool FGMenuBar::getHideIfOverlapsWindow ( ) const
pure virtual

◆ getLocalizedLabel()

std::string FGMenuBar::getLocalizedLabel ( SGPropertyNode * node)
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.

◆ hide()

virtual void FGMenuBar::hide ( )
pure virtual

Make the menu bar invisible.

Implemented in FGCocoaMenuBar, FGNasalMenuBar, and FGWindowsMenuBar.

◆ init()

virtual void FGMenuBar::init ( )
pure virtual

Initialize the menu bar from $FG_ROOT/gui/menubar.xml.

Implemented in FGCocoaMenuBar, FGNasalMenuBar, and FGWindowsMenuBar.

◆ isVisible()

virtual bool FGMenuBar::isVisible ( ) const
pure virtual

Test whether the menu bar is visible.

Implemented in FGCocoaMenuBar, FGNasalMenuBar, and FGWindowsMenuBar.

◆ postinit()

virtual void FGMenuBar::postinit ( )
inlinevirtual

Reimplemented in FGNasalMenuBar.

Definition at line 34 of file menubar.hxx.

◆ setHideIfOverlapsWindow()

virtual void FGMenuBar::setHideIfOverlapsWindow ( bool hide)
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.

◆ show()

virtual void FGMenuBar::show ( )
pure virtual

Make the menu bar visible.

Implemented in FGCocoaMenuBar, FGNasalMenuBar, and FGWindowsMenuBar.


The documentation for this class was generated from the following files: