Ardour  8.7-15-gadf511264b
uimanager.h
Go to the documentation of this file.
1 // -*- c++ -*-
2 // Generated by gmmproc 2.45.3 -- DO NOT MODIFY!
3 #ifndef _GTKMM_UIMANAGER_H
4 #define _GTKMM_UIMANAGER_H
5 
6 
7 #include <glibmm/ustring.h>
8 #include <sigc++/sigc++.h>
9 
10 /* $Id: uimanager.hg,v 1.17 2006/05/11 11:40:24 murrayc Exp $ */
11 
12 /* Copyright (C) 2003 The gtkmm Development Team
13  *
14  * This library is free software; you can redistribute it and/or
15  * modify it under the terms of the GNU Lesser General Public
16  * License as published by the Free Software Foundation; either
17  * version 2.1 of the License, or (at your option) any later version.
18  *
19  * This library is distributed in the hope that it will be useful,
20  * but WITHOUT ANY WARRANTY; without even the implied warranty of
21  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
22  * Lesser General Public License for more details.
23  *
24  * You should have received a copy of the GNU Lesser General Public
25  * License along with this library; if not, write to the Free
26  * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
27  */
28 
29 #include <gtkmm/widget.h>
30 #include <gtkmm/action.h>
31 #include <gtkmm/actiongroup.h>
32 #include <gtkmm/uimanager.h>
33 
34 
35 #ifndef DOXYGEN_SHOULD_SKIP_THIS
36 typedef struct _GtkUIManager GtkUIManager;
38 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
39 
40 
41 #ifndef DOXYGEN_SHOULD_SKIP_THIS
42 namespace Gtk
43 { class UIManager_Class; } // namespace Gtk
44 #endif //DOXYGEN_SHOULD_SKIP_THIS
45 
46 namespace Gtk
47 {
48 
64 {
67  UI_MANAGER_MENU = 1 << 1,
70  UI_MANAGER_POPUP = 1 << 4,
76 };
77 
80  { return static_cast<UIManagerItemType>(static_cast<unsigned>(lhs) | static_cast<unsigned>(rhs)); }
81 
84  { return static_cast<UIManagerItemType>(static_cast<unsigned>(lhs) & static_cast<unsigned>(rhs)); }
85 
88  { return static_cast<UIManagerItemType>(static_cast<unsigned>(lhs) ^ static_cast<unsigned>(rhs)); }
89 
92  { return static_cast<UIManagerItemType>(~static_cast<unsigned>(flags)); }
93 
96  { return (lhs = static_cast<UIManagerItemType>(static_cast<unsigned>(lhs) | static_cast<unsigned>(rhs))); }
97 
100  { return (lhs = static_cast<UIManagerItemType>(static_cast<unsigned>(lhs) & static_cast<unsigned>(rhs))); }
101 
104  { return (lhs = static_cast<UIManagerItemType>(static_cast<unsigned>(lhs) ^ static_cast<unsigned>(rhs))); }
105 
106 } // namespace Gtk
107 
108 
109 #ifndef DOXYGEN_SHOULD_SKIP_THIS
110 namespace Glib
111 {
112 
113 template <>
114 class Value<Gtk::UIManagerItemType> : public Glib::Value_Flags<Gtk::UIManagerItemType>
115 {
116 public:
117  static GType value_type() G_GNUC_CONST;
118 };
119 
120 } // namespace Glib
121 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
122 
123 
124 namespace Gtk
125 {
126 
127 
269 class UIManager : public Glib::Object
270 {
271 
272 #ifndef DOXYGEN_SHOULD_SKIP_THIS
273 
274 public:
275  typedef UIManager CppObjectType;
276  typedef UIManager_Class CppClassType;
277  typedef GtkUIManager BaseObjectType;
278  typedef GtkUIManagerClass BaseClassType;
279 
280 private: friend class UIManager_Class;
281  static CppClassType uimanager_class_;
282 
283 private:
284  // noncopyable
285  UIManager(const UIManager&);
286  UIManager& operator=(const UIManager&);
287 
288 protected:
289  explicit UIManager(const Glib::ConstructParams& construct_params);
290  explicit UIManager(GtkUIManager* castitem);
291 
292 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
293 
294 public:
295  virtual ~UIManager();
296 
299  static GType get_type() G_GNUC_CONST;
300 
301 #ifndef DOXYGEN_SHOULD_SKIP_THIS
302 
303 
304  static GType get_base_type() G_GNUC_CONST;
305 #endif
306 
308  GtkUIManager* gobj() { return reinterpret_cast<GtkUIManager*>(gobject_); }
309 
311  const GtkUIManager* gobj() const { return reinterpret_cast<GtkUIManager*>(gobject_); }
312 
315 
316 private:
317 
318 protected:
320 
321 public:
322 
323  static Glib::RefPtr<UIManager> create();
324 
325 
334  void set_add_tearoffs(bool add_tearoffs = true);
335 
341  bool get_add_tearoffs() const;
342 
350  void insert_action_group(const Glib::RefPtr<ActionGroup>& action_group, int pos = 0);
351 
357  void remove_action_group(const Glib::RefPtr<ActionGroup>& action_group);
358 
359 
366  Glib::ListHandle< Glib::RefPtr<ActionGroup> > get_action_groups();
367 
374  Glib::ListHandle< Glib::RefPtr<const ActionGroup> > get_action_groups() const;
375 
376 
381  Glib::RefPtr<AccelGroup> get_accel_group();
382 
387  Glib::RefPtr<const AccelGroup> get_accel_group() const;
388 
407  Widget* get_widget(const Glib::ustring& path);
408 
427  const Widget* get_widget(const Glib::ustring& path) const;
428 
429 
438  Glib::SListHandle<Widget*> get_toplevels(UIManagerItemType types);
439 
448  Glib::SListHandle<const Widget*> get_toplevels(UIManagerItemType types) const;
449 
450 
458  Glib::RefPtr<Action> get_action(const Glib::ustring& path);
459 
467  Glib::RefPtr<const Action> get_action(const Glib::ustring& path) const;
468 
469  typedef guint ui_merge_id;
470 
479  ui_merge_id add_ui_from_string(const Glib::ustring& buffer);
480 
481 
490  ui_merge_id add_ui_from_file(const Glib::ustring& filename);
491 
492 //TODO: Is top=true a good default?
493 
494 
512  void add_ui(ui_merge_id merge_id, const Glib::ustring& path, const Glib::ustring& name, const Glib::ustring& action, UIManagerItemType type = Gtk::UI_MANAGER_AUTO, bool top = true);
513 
529  void add_ui_separator(ui_merge_id merge_id, const Glib::ustring& path, const Glib::ustring& name = "", UIManagerItemType type = Gtk::UI_MANAGER_AUTO, bool top = true);
530 
531 
536  void remove_ui(ui_merge_id merge_id);
537 
543  Glib::ustring get_ui() const;
544 
555 
562 
563 
575  Glib::SignalProxy1< void,Widget* > signal_add_widget();
576 
577 
586  Glib::SignalProxy0< void > signal_actions_changed();
587 
588 
604  Glib::SignalProxy2< void,const Glib::RefPtr<Action>&,Widget* > signal_connect_proxy();
605 
606 
618  Glib::SignalProxy2< void,const Glib::RefPtr<Action>&,Widget* > signal_disconnect_proxy();
619 
620 
634  Glib::SignalProxy1< void,const Glib::RefPtr<Action>& > signal_pre_activate();
635 
636 
650  Glib::SignalProxy1< void,const Glib::RefPtr<Action>& > signal_post_activate();
651 
652 
658  Glib::PropertyProxy< bool > property_add_tearoffs() ;
659 
665  Glib::PropertyProxy_ReadOnly< bool > property_add_tearoffs() const;
666 
672  Glib::PropertyProxy_ReadOnly< Glib::ustring > property_ui() const;
673 
674 
675 public:
676 
677 public:
678  //C++ methods used to invoke GTK+ virtual functions:
679 
680 protected:
681  //GTK+ Virtual Functions (override these to change behaviour):
682 
683  //Default Signal Handlers::
685  virtual void on_add_widget(Widget* widget);
687  virtual void on_actions_changed();
688 
689 
690 };
691 
692 } // namespace Gtk
693 
694 
695 namespace Glib
696 {
705  Glib::RefPtr<Gtk::UIManager> wrap(GtkUIManager* object, bool take_copy = false);
706 }
707 
708 
709 #endif /* _GTKMM_UIMANAGER_H */
710 
Glib::SignalProxy1< void, const Glib::RefPtr< Action > & > signal_post_activate()
void remove_ui(ui_merge_id merge_id)
guint ui_merge_id
Definition: uimanager.h:469
void add_ui(ui_merge_id merge_id, const Glib::ustring &path, const Glib::ustring &name, const Glib::ustring &action, UIManagerItemType type=Gtk::UI_MANAGER_AUTO, bool top=true)
Glib::SignalProxy2< void, const Glib::RefPtr< Action > &, Widget * > signal_connect_proxy()
void remove_action_group(const Glib::RefPtr< ActionGroup > &action_group)
Glib::SignalProxy1< void, const Glib::RefPtr< Action > & > signal_pre_activate()
Glib::RefPtr< const AccelGroup > get_accel_group() const
void add_ui_separator(ui_merge_id merge_id, const Glib::ustring &path, const Glib::ustring &name="", UIManagerItemType type=Gtk::UI_MANAGER_AUTO, bool top=true)
Glib::SListHandle< const Widget * > get_toplevels(UIManagerItemType types) const
bool get_add_tearoffs() const
virtual ~UIManager()
ui_merge_id add_ui_from_string(const Glib::ustring &buffer)
GtkUIManager * gobj_copy()
Provides access to the underlying C instance. The caller is responsible for unrefing it....
Glib::RefPtr< const Action > get_action(const Glib::ustring &path) const
void insert_action_group(const Glib::RefPtr< ActionGroup > &action_group, int pos=0)
Glib::PropertyProxy_ReadOnly< Glib::ustring > property_ui() const
virtual void on_add_widget(Widget *widget)
This is a default handler for the signal signal_add_widget().
Glib::RefPtr< Action > get_action(const Glib::ustring &path)
Glib::RefPtr< AccelGroup > get_accel_group()
Glib::ListHandle< Glib::RefPtr< const ActionGroup > > get_action_groups() const
virtual void on_actions_changed()
This is a default handler for the signal signal_actions_changed().
Glib::ustring get_ui() const
static GType get_type() G_GNUC_CONST
const Widget * get_widget(const Glib::ustring &path) const
Glib::SignalProxy1< void, Widget * > signal_add_widget()
Widget * get_widget(const Glib::ustring &path)
Glib::SignalProxy2< void, const Glib::RefPtr< Action > &, Widget * > signal_disconnect_proxy()
void ensure_update()
void set_add_tearoffs(bool add_tearoffs=true)
Glib::SListHandle< Widget * > get_toplevels(UIManagerItemType types)
Glib::ListHandle< Glib::RefPtr< ActionGroup > > get_action_groups()
Glib::SignalProxy0< void > signal_actions_changed()
ui_merge_id new_merge_id()
ui_merge_id add_ui_from_file(const Glib::ustring &filename)
Glib::RefPtr< Gtk::UIManager > wrap(GtkUIManager *object, bool take_copy=false)
Glib::PropertyProxy< bool > property_add_tearoffs()
GtkUIManager * gobj()
Provides access to the underlying C GObject.
Definition: uimanager.h:308
const GtkUIManager * gobj() const
Provides access to the underlying C GObject.
Definition: uimanager.h:311
static Glib::RefPtr< UIManager > create()
Glib::PropertyProxy_ReadOnly< bool > property_add_tearoffs() const
CellRendererState & operator|=(CellRendererState &lhs, CellRendererState rhs)
Definition: cellrenderer.h:86
CellRendererState operator&(CellRendererState lhs, CellRendererState rhs)
Definition: cellrenderer.h:74
CellRendererState operator^(CellRendererState lhs, CellRendererState rhs)
Definition: cellrenderer.h:78
CellRendererState operator~(CellRendererState flags)
Definition: cellrenderer.h:82
CellRendererState & operator&=(CellRendererState &lhs, CellRendererState rhs)
Definition: cellrenderer.h:90
UIManagerItemType
Definition: uimanager.h:64
CellRendererState operator|(CellRendererState lhs, CellRendererState rhs)
Definition: cellrenderer.h:70
CellRendererState & operator^=(CellRendererState &lhs, CellRendererState rhs)
Definition: cellrenderer.h:94
@ UI_MANAGER_PLACEHOLDER
Definition: uimanager.h:69
@ UI_MANAGER_ACCELERATOR
Definition: uimanager.h:74
@ UI_MANAGER_AUTO
Definition: uimanager.h:65
@ UI_MANAGER_TOOLBAR
Definition: uimanager.h:68
@ UI_MANAGER_MENU
Definition: uimanager.h:67
@ UI_MANAGER_SEPARATOR
Definition: uimanager.h:73
@ UI_MANAGER_MENUBAR
Definition: uimanager.h:66
@ UI_MANAGER_POPUP_WITH_ACCELS
Definition: uimanager.h:75
@ UI_MANAGER_MENUITEM
Definition: uimanager.h:71
@ UI_MANAGER_POPUP
Definition: uimanager.h:70
@ UI_MANAGER_TOOLITEM
Definition: uimanager.h:72
GtkImageIconNameData name
Definition: gtkimage.h:6
Definition: ardour_ui.h:188
Definition: lobject.h:100