]> git.mxchange.org Git - flightgear.git/blob - src/GUI/FGWindowsMenuBar.hxx
GUI support for VIA/Discontinuity
[flightgear.git] / src / GUI / FGWindowsMenuBar.hxx
1 // menubar.hxx - XML-configured menu bar.
2
3 #ifndef FG_WINDOWS_MENUBAR_HXX
4 #define FG_WINDOWS_MENUBAR_HXX 1
5
6 #include <GUI/menubar.hxx>
7
8 #include <memory>
9
10 /**
11  * XML-configured Windows menu bar.
12  *
13  * This class creates a menu bar from a tree of XML properties.  These
14  * properties are not part of the main FlightGear property tree, but
15  * are read from a separate file ($FG_ROOT/gui/menubar.xml).
16  *
17  * WARNING: because PUI provides no easy way to attach user data to a
18  * menu item, all menu item strings must be unique; otherwise, this
19  * class will always use the first binding with any given name.
20  */
21 class FGWindowsMenuBar : public FGMenuBar
22 {
23 public:
24   
25   /**
26    * Constructor.
27    */
28   FGWindowsMenuBar ();
29   
30   
31   /**
32    * Destructor.
33    */
34   virtual ~FGWindowsMenuBar ();
35   
36   
37   /**
38    * Initialize the menu bar from $FG_ROOT/gui/menubar.xml
39    */
40   virtual void init ();
41   
42   /**
43    * Make the menu bar visible.
44    */
45   virtual void show ();
46   
47   
48   /**
49    * Make the menu bar invisible.
50    */
51   virtual void hide ();
52   
53   
54   /**
55    * Test whether the menu bar is visible.
56    */
57   virtual bool isVisible () const;
58   
59   class WindowsMenuBarPrivate;
60 private:
61   std::auto_ptr<WindowsMenuBarPrivate> p;
62 };
63
64 #endif // __MENUBAR_HXX