FlightGear next
FGWindowsMenuBar Class Reference

XML-configured Windows menu bar. More...

#include <FGWindowsMenuBar.hxx>

Inherits FGMenuBar.

Classes

class  WindowsMenuBarPrivate
 

Public Member Functions

 FGWindowsMenuBar ()
 Constructor.
 
 ~FGWindowsMenuBar () override=default
 
void init () override
 Initialize the menu bar from $FG_ROOT/gui/menubar.xml.
 
void show () override
 Make the menu bar visible.
 
void hide () override
 Make the menu bar invisible.
 
bool isVisible () const override
 Test whether the menu bar is visible.
 
void setHideIfOverlapsWindow (bool hide) override
 Request the menubar to be hidden if its display overlays the main window content.
 
bool getHideIfOverlapsWindow () const override
 
std::vector< SGBindingList > getItemBindings () const
 
- Public Member Functions inherited from FGMenuBar
 FGMenuBar ()
 
virtual ~FGMenuBar ()
 Destructor.
 
virtual void postinit ()
 

Additional Inherited Members

- Static Public Member Functions inherited from FGMenuBar
static std::string getLocalizedLabel (SGPropertyNode *node)
 Read a menu label from the menu's property tree.
 

Detailed Description

XML-configured Windows menu bar.

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 22 of file FGWindowsMenuBar.hxx.

Constructor & Destructor Documentation

◆ FGWindowsMenuBar()

FGWindowsMenuBar::FGWindowsMenuBar ( )

Constructor.

Definition at line 105 of file FGWindowsMenuBar.cxx.

◆ ~FGWindowsMenuBar()

FGWindowsMenuBar::~FGWindowsMenuBar ( )
overridedefault

Member Function Documentation

◆ getHideIfOverlapsWindow()

bool FGWindowsMenuBar::getHideIfOverlapsWindow ( ) const
overridevirtual

Implements FGMenuBar.

Definition at line 196 of file FGWindowsMenuBar.cxx.

◆ getItemBindings()

std::vector< SGBindingList > FGWindowsMenuBar::getItemBindings ( ) const

Definition at line 201 of file FGWindowsMenuBar.cxx.

◆ hide()

void FGWindowsMenuBar::hide ( )
overridevirtual

Make the menu bar invisible.

Implements FGMenuBar.

Definition at line 172 of file FGWindowsMenuBar.cxx.

◆ init()

void FGWindowsMenuBar::init ( )
overridevirtual

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

Implements FGMenuBar.

Definition at line 109 of file FGWindowsMenuBar.cxx.

◆ isVisible()

bool FGWindowsMenuBar::isVisible ( ) const
overridevirtual

Test whether the menu bar is visible.

Implements FGMenuBar.

Definition at line 178 of file FGWindowsMenuBar.cxx.

◆ setHideIfOverlapsWindow()

void FGWindowsMenuBar::setHideIfOverlapsWindow ( bool hide)
overridevirtual

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.

Implements FGMenuBar.

Definition at line 183 of file FGWindowsMenuBar.cxx.

◆ show()

void FGWindowsMenuBar::show ( )
overridevirtual

Make the menu bar visible.

Implements FGMenuBar.

Definition at line 166 of file FGWindowsMenuBar.cxx.


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