FlightGear next
FGCocoaMenuBar Class Reference

XML-configured Cocoa menu bar. More...

#include <FGCocoaMenuBar.hxx>

Inherits FGMenuBar.

Public Member Functions

 FGCocoaMenuBar ()
 Constructor.
 
virtual ~FGCocoaMenuBar ()
 Destructor.
 
virtual void init ()
 Initialize the menu bar from $FG_ROOT/gui/menubar.xml.
 
virtual void show ()
 Make the menu bar visible.
 
virtual void hide ()
 Make the menu bar invisible.
 
virtual bool isVisible () const
 Test whether the menu bar is visible.
 
void setHideIfOverlapsWindow (bool hide) override
 This is a no-op on Cocoa - the menubar doesn't overlap the window when its drawn.
 
bool getHideIfOverlapsWindow () const override
 
- 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 Cocoa 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).

WARNING: because PUI provides no easy way to attach user data to a menu item, all menu item strings must be unique; otherwise, this class will always use the first binding with any given name.

Definition at line 21 of file FGCocoaMenuBar.hxx.

Constructor & Destructor Documentation

◆ FGCocoaMenuBar()

FGCocoaMenuBar::FGCocoaMenuBar ( )

Constructor.

◆ ~FGCocoaMenuBar()

virtual FGCocoaMenuBar::~FGCocoaMenuBar ( )
virtual

Destructor.

Member Function Documentation

◆ getHideIfOverlapsWindow()

bool FGCocoaMenuBar::getHideIfOverlapsWindow ( ) const
overridevirtual

Implements FGMenuBar.

◆ hide()

virtual void FGCocoaMenuBar::hide ( )
virtual

Make the menu bar invisible.

Implements FGMenuBar.

◆ init()

virtual void FGCocoaMenuBar::init ( )
virtual

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

Implements FGMenuBar.

◆ isVisible()

virtual bool FGCocoaMenuBar::isVisible ( ) const
virtual

Test whether the menu bar is visible.

Implements FGMenuBar.

◆ setHideIfOverlapsWindow()

void FGCocoaMenuBar::setHideIfOverlapsWindow ( bool hide)
overridevirtual

This is a no-op on Cocoa - the menubar doesn't overlap the window when its drawn.

Implements FGMenuBar.

◆ show()

virtual void FGCocoaMenuBar::show ( )
virtual

Make the menu bar visible.

Implements FGMenuBar.


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