Ardour  8.7-14-g57a6773833
tk/ytkmm/ytkmm/gtkmm/menu.h
Go to the documentation of this file.
1 // -*- c++ -*-
2 // Generated by gmmproc 2.45.3 -- DO NOT MODIFY!
3 #ifndef _GTKMM_MENU_H
4 #define _GTKMM_MENU_H
5 
6 
7 #include <glibmm/ustring.h>
8 #include <sigc++/sigc++.h>
9 
10 /* $Id: menu.hg,v 1.11 2006/04/12 11:11:25 murrayc Exp $ */
11 
12 /* Copyright (C) 1998-2002 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 
30 //#include <gtk/gtkmenu.h>
31 #include <gtkmm/menushell.h>
32 #include <gtkmm/menuitem.h>
33 
34 #ifndef DOXYGEN_SHOULD_SKIP_THIS
35 typedef struct _GtkMenu GtkMenu;
36 typedef struct _GtkMenuClass GtkMenuClass;
37 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
38 
39 
40 namespace Gtk
41 { class Menu_Class; } // namespace Gtk
42 namespace Gtk
43 {
44 
45 class AccelGroup;
46 
58 class Menu : public MenuShell
59 {
60  public:
61 #ifndef DOXYGEN_SHOULD_SKIP_THIS
62  typedef Menu CppObjectType;
63  typedef Menu_Class CppClassType;
64  typedef GtkMenu BaseObjectType;
65  typedef GtkMenuClass BaseClassType;
66 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
67 
68  virtual ~Menu();
69 
70 #ifndef DOXYGEN_SHOULD_SKIP_THIS
71 
72 private:
73  friend class Menu_Class;
74  static CppClassType menu_class_;
75 
76  // noncopyable
77  Menu(const Menu&);
78  Menu& operator=(const Menu&);
79 
80 protected:
81  explicit Menu(const Glib::ConstructParams& construct_params);
82  explicit Menu(GtkMenu* castitem);
83 
84 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
85 
86 public:
87 #ifndef DOXYGEN_SHOULD_SKIP_THIS
88  static GType get_type() G_GNUC_CONST;
89 
90 
91  static GType get_base_type() G_GNUC_CONST;
92 #endif
93 
95  GtkMenu* gobj() { return reinterpret_cast<GtkMenu*>(gobject_); }
96 
98  const GtkMenu* gobj() const { return reinterpret_cast<GtkMenu*>(gobject_); }
99 
100 
101 public:
102  //C++ methods used to invoke GTK+ virtual functions:
103 
104 protected:
105  //GTK+ Virtual Functions (override these to change behaviour):
106 
107  //Default Signal Handlers::
108 
109 
110 private:
111 
112 
113  //gtkmmproc error: gtk_menu_append : ignored method defs lookup failed//gtkmmproc error: gtk_menu_prepend : ignored method defs lookup failed//gtkmmproc error: gtk_menu_insert : ignored method defs lookup failed //deprecated.
114 public:
115  Menu();
116 
117 /* append, prepend, and insert are defined in MenuShell */
118 
122  typedef sigc::slot<void, int&, int&, bool&> SlotPositionCalc;
123 
124  void popup(MenuShell& parent_menu_shell, MenuItem& parent_menu_item, const SlotPositionCalc& slot, guint button, guint32 activate_time);
125 
126 
142  void popup(const SlotPositionCalc& position_calc_slot, guint button, guint32 activate_time);
143 
149  void popup(guint button, guint32 activate_time);
150 
151 
152  void reposition();
153 
154 
155  void popdown();
156 
157 
166 
174  const MenuItem* get_active() const;
175 
176  void set_active(guint index);
177 
178 
181  void set_accel_group(const Glib::RefPtr<AccelGroup>& accel_group);
183 
191  Glib::RefPtr<AccelGroup> get_accel_group();
192 
200  Glib::RefPtr<const AccelGroup> get_accel_group() const;
201 
202 
225  void set_accel_path(const Glib::ustring& accel_path);
226 
231  Glib::ustring get_accel_path() const;
232 
233 
234  void detach();
235 
241 
246  const Widget* get_attach_widget() const;
247 
248 
249  void set_tearoff_state(bool torn_off = true);
250 
256  bool get_tearoff_state() const;
257 
258 
266  void set_title(const Glib::ustring& title);
267  void unset_title();
268 
275  Glib::ustring get_title() const;
276 
282  void set_screen(const Glib::RefPtr<Gdk::Screen>& screen);
283 
284 
299  void attach(Gtk::Widget& child, guint left_attach, guint right_attach, guint top_attach, guint bottom_attach);
300 
301 
314  void set_monitor(int monitor_num);
315 
321  int get_monitor() const;
322 
323  void reorder_child(const MenuItem& child, int position);
324 
325 
331  void set_reserve_toggle_size(bool reserve_toggle_size = true);
332 
339 
340 
346  Glib::PropertyProxy< int > property_active() ;
347 
353  Glib::PropertyProxy_ReadOnly< int > property_active() const;
354 
360  Glib::PropertyProxy< Glib::RefPtr<AccelGroup> > property_accel_group() ;
361 
367  Glib::PropertyProxy_ReadOnly< Glib::RefPtr<AccelGroup> > property_accel_group() const;
368 
374  Glib::PropertyProxy< Glib::ustring > property_accel_path() ;
375 
381  Glib::PropertyProxy_ReadOnly< Glib::ustring > property_accel_path() const;
382 
388  Glib::PropertyProxy< Widget* > property_attach_widget() ;
389 
395  Glib::PropertyProxy_ReadOnly< Widget* > property_attach_widget() const;
396 
402  Glib::PropertyProxy< Glib::ustring > property_tearoff_title() ;
403 
409  Glib::PropertyProxy_ReadOnly< Glib::ustring > property_tearoff_title() const;
410 
416  Glib::PropertyProxy< bool > property_tearoff_state() ;
417 
423  Glib::PropertyProxy_ReadOnly< bool > property_tearoff_state() const;
424 
430  Glib::PropertyProxy< int > property_monitor() ;
431 
437  Glib::PropertyProxy_ReadOnly< int > property_monitor() const;
438 
444  Glib::PropertyProxy< bool > property_reserve_toggle_size() ;
445 
451  Glib::PropertyProxy_ReadOnly< bool > property_reserve_toggle_size() const;
452 
453 
454 protected:
455 
456  //We can not wrap this as a slot because there is no data parameter, and no destroy callback to destroy that data.
457  typedef void (*GtkMenuDetachFunc) (GtkWidget *attach_widget, GtkMenu *menu);
458 
459  void attach_to_widget(Widget& attach_widget, GtkMenuDetachFunc detacher);
460 
461  //TODO: What does "attach" actually mean here? murrayc
466  void attach_to_widget(Widget& attach_widget);
467 
468 
469 };
470 
471 } // namespace Gtk
472 
473 
474 namespace Glib
475 {
484  Gtk::Menu* wrap(GtkMenu* object, bool take_copy = false);
485 } //namespace Glib
486 
487 
488 #endif /* _GTKMM_MENU_H */
489 
GtkMenu * gobj()
Provides access to the underlying C GtkObject.
Widget * get_attach_widget()
void attach_to_widget(Widget &attach_widget)
Glib::PropertyProxy< Glib::ustring > property_accel_path()
Glib::PropertyProxy< Glib::RefPtr< AccelGroup > > property_accel_group()
void(* GtkMenuDetachFunc)(GtkWidget *attach_widget, GtkMenu *menu)
void set_active(guint index)
void set_monitor(int monitor_num)
const Widget * get_attach_widget() const
Glib::PropertyProxy_ReadOnly< Glib::ustring > property_tearoff_title() const
Glib::PropertyProxy< bool > property_tearoff_state()
void popup(const SlotPositionCalc &position_calc_slot, guint button, guint32 activate_time)
Glib::PropertyProxy< int > property_active()
void set_title(const Glib::ustring &title)
void attach(Gtk::Widget &child, guint left_attach, guint right_attach, guint top_attach, guint bottom_attach)
Gtk::Menu * wrap(GtkMenu *object, bool take_copy=false)
void detach()
Glib::PropertyProxy_ReadOnly< Glib::RefPtr< AccelGroup > > property_accel_group() const
Glib::PropertyProxy< bool > property_reserve_toggle_size()
const GtkMenu * gobj() const
Provides access to the underlying C GtkObject.
void popup(MenuShell &parent_menu_shell, MenuItem &parent_menu_item, const SlotPositionCalc &slot, guint button, guint32 activate_time)
Glib::PropertyProxy< int > property_monitor()
void unset_accel_group()
Glib::RefPtr< AccelGroup > get_accel_group()
void set_screen(const Glib::RefPtr< Gdk::Screen > &screen)
virtual ~Menu()
void set_accel_group(const Glib::RefPtr< AccelGroup > &accel_group)
void reposition()
void unset_title()
void popdown()
Glib::PropertyProxy_ReadOnly< Glib::ustring > property_accel_path() const
Glib::PropertyProxy_ReadOnly< Widget * > property_attach_widget() const
void set_accel_path(const Glib::ustring &accel_path)
Glib::PropertyProxy< Widget * > property_attach_widget()
const MenuItem * get_active() const
void reorder_child(const MenuItem &child, int position)
void set_tearoff_state(bool torn_off=true)
MenuItem * get_active()
void attach_to_widget(Widget &attach_widget, GtkMenuDetachFunc detacher)
Glib::ustring get_title() const
bool get_tearoff_state() const
Glib::PropertyProxy_ReadOnly< bool > property_reserve_toggle_size() const
sigc::slot< void, int &, int &, bool & > SlotPositionCalc
bool get_reserve_toggle_size() const
void set_reserve_toggle_size(bool reserve_toggle_size=true)
Glib::ustring get_accel_path() const
Glib::PropertyProxy_ReadOnly< bool > property_tearoff_state() const
void popup(guint button, guint32 activate_time)
Glib::RefPtr< const AccelGroup > get_accel_group() const
Glib::PropertyProxy< Glib::ustring > property_tearoff_title()
int get_monitor() const
Glib::PropertyProxy_ReadOnly< int > property_active() const
Glib::PropertyProxy_ReadOnly< int > property_monitor() const
Definition: ardour_ui.h:188