- void destroy_menubar ();
-
-
- /**
- * Disable/enable menu titles and entries
- */
- bool enable_item (const SGPropertyNode * item, bool state);
-
-
-private:
-
- // Make a single menu.
- void make_menu (SGPropertyNode * node);
-
- // Make the top-level menubar.
- void make_menubar ();
-
- // Create a property-path -> puObject map for menu node
- void make_object_map(SGPropertyNode * node);
-
- // Add <enabled> listener that enables/disables menu entries.
- void add_enabled_listener(SGPropertyNode * node);
-
- // Is the menu visible?
- bool _visible;
-
- // The top-level menubar itself.
- puMenuBar * _menuBar;
-
- // A map of bindings for the menubar.
- std::map<std::string,std::vector<SGBinding *> > _bindings;
-
- // These are hoops that we have to jump through because PUI doesn't
- // do memory management for lists. We have to allocate the arrays,
- // hang onto pointers, and then delete them when the menubar is
- // freed.
- char ** make_char_array (int size);
- puCallback * make_callback_array (int size);
- std::vector<char **> _char_arrays;
- std::vector<puCallback *> _callback_arrays;