]> git.mxchange.org Git - flightgear.git/blob - src/GUI/menubar.hxx
Launcher: Maintain aircraft selection better
[flightgear.git] / src / GUI / menubar.hxx
1 // menubar.hxx - XML-configured menu bar.
2
3 #ifndef __MENUBAR_HXX
4 #define __MENUBAR_HXX 1
5
6 class SGPropertyNode;
7
8 /**
9  * XML-configured menu bar interface
10  *
11  * This class creates a menu bar from a tree of XML properties.  These
12  * properties are not part of the main FlightGear property tree, but
13  * are read from a separate file ($FG_ROOT/gui/menubar.xml).
14
15  */
16 class FGMenuBar
17 {
18 public:
19     FGMenuBar();
20
21     /**
22      * Destructor.
23      */
24     virtual ~FGMenuBar ();
25
26
27     /**
28      * Initialize the menu bar from $FG_ROOT/gui/menubar.xml
29      */
30     virtual void init () = 0;
31     
32     /**
33      * Make the menu bar visible.
34      */
35     virtual void show () = 0;
36
37
38     /**
39      * Make the menu bar invisible.
40      */
41     virtual void hide () = 0;
42
43
44     /**
45      * Test whether the menu bar is visible.
46      */
47     virtual bool isVisible () const = 0;
48
49     /**
50      * Read a menu label from the menu's property tree.
51      * Take care of mapping it to the appropriate translation, if available.
52      * Returns an UTF-8 encoded string.
53      */
54     static const char* getLocalizedLabel(SGPropertyNode* node);
55
56 };
57
58 #endif // __MENUBAR_HXX