Debian Codegraph @

src/GUI/FGCocoaMenuBar.hxx

raw symbols SCIP
1 // menubar.hxx - XML-configured menu bar.
2
3 #ifndef FG_COCOA_MENUBAR_HXX
4 #define FG_COCOA_MENUBAR_HXX 1
5
6 #include <GUI/menubar.hxx>
7
8 #include <memory>
9
10 /**
11 * XML-configured Cocoa 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 FGCocoaMenuBar : public FGMenuBar
22 {
23 public:
24
25 /**
26 * Constructor.
27 */
28 FGCocoaMenuBar ();
29
30
31 /**
32 * Destructor.
33 */
34 virtual ~FGCocoaMenuBar ();
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 /**
60 * This is a no-op on Cocoa - the menubar doesn't overlap the window
61 * when its drawn.
62 */
63 void setHideIfOverlapsWindow(bool hide) override;
64
65 bool getHideIfOverlapsWindow() const override;
66
67 class CocoaMenuBarPrivate;
68 private:
69 std::unique_ptr<CocoaMenuBarPrivate> p;
70
71 };
72
73 #endif // __MENUBAR_HXX