Install ardour as a binary, a script and a set of shared
[ardour.git] / libs / gtkmm2 / gtk / gtkmm / menutoolbutton.h
1 // -*- c++ -*-
2 // Generated by gtkmmproc -- DO NOT MODIFY!
3 #ifndef _GTKMM_MENUTOOLBUTTON_H
4 #define _GTKMM_MENUTOOLBUTTON_H
5
6 #include <glibmm.h>
7
8 /* $Id$ */
9
10 /* box.h
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 Library General Public
16  * License as published by the Free Software Foundation; either
17  * version 2 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  * Library General Public License for more details.
23  *
24  * You should have received a copy of the GNU Library 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/toolbutton.h>
30 #include <gtkmm/menu.h>
31 #include <gtkmm/tooltips.h>
32
33
34 #ifndef DOXYGEN_SHOULD_SKIP_THIS
35 typedef struct _GtkMenuToolButton GtkMenuToolButton;
36 typedef struct _GtkMenuToolButtonClass GtkMenuToolButtonClass;
37 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
38
39
40 namespace Gtk
41 { class MenuToolButton_Class; } // namespace Gtk
42 namespace Gtk
43 {
44
45 /** A Gtk::ToolItem containing a toggle button.
46  *
47  * A MenuToolButton is a Gtk::ToolItem that contains a menu.
48  * @ingroup Widgets
49  */
50
51 class MenuToolButton : public ToolButton
52 {
53   public:
54 #ifndef DOXYGEN_SHOULD_SKIP_THIS
55   typedef MenuToolButton CppObjectType;
56   typedef MenuToolButton_Class CppClassType;
57   typedef GtkMenuToolButton BaseObjectType;
58   typedef GtkMenuToolButtonClass BaseClassType;
59 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
60
61   virtual ~MenuToolButton();
62
63 #ifndef DOXYGEN_SHOULD_SKIP_THIS
64
65 private:
66   friend class MenuToolButton_Class;
67   static CppClassType menutoolbutton_class_;
68
69   // noncopyable
70   MenuToolButton(const MenuToolButton&);
71   MenuToolButton& operator=(const MenuToolButton&);
72
73 protected:
74   explicit MenuToolButton(const Glib::ConstructParams& construct_params);
75   explicit MenuToolButton(GtkMenuToolButton* castitem);
76
77 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
78
79 public:
80 #ifndef DOXYGEN_SHOULD_SKIP_THIS
81   static GType get_type()      G_GNUC_CONST;
82   static GType get_base_type() G_GNUC_CONST;
83 #endif
84
85   ///Provides access to the underlying C GtkObject.
86   GtkMenuToolButton*       gobj()       { return reinterpret_cast<GtkMenuToolButton*>(gobject_); }
87
88   ///Provides access to the underlying C GtkObject.
89   const GtkMenuToolButton* gobj() const { return reinterpret_cast<GtkMenuToolButton*>(gobject_); }
90
91
92 public:
93   //C++ methods used to invoke GTK+ virtual functions:
94
95 protected:
96   //GTK+ Virtual Functions (override these to change behaviour):
97
98   //Default Signal Handlers::
99   virtual void on_show_menu();
100
101
102 private:
103
104 public:
105
106   /** Creates a new MenuToolButton.
107    */
108   MenuToolButton();
109   
110   /** Creates a new MenuToolButton from a StockID.
111    *
112    * The MenuToolButton will be created according to the @a stock_id properties.
113    * 
114    * @param stock_id The StockID which determines the look of the MenuToolButton.
115    */
116   explicit MenuToolButton(const Gtk::StockID& stock_id);
117   
118   /** Creates a new MenuToolButton with a label.
119    *
120    * The MenuToolButton will have the label @a label.
121    *
122    * @param label The string used to display the label for this MenuToolButton.
123    */
124   explicit MenuToolButton(const Glib::ustring& label);
125   
126   /** Creates a new MenuToolButton with an image.
127    *
128    * The MenuToolButton will have the label @a label and an image widget @a icon_widget.
129    *
130    * @param icon_widget The widget placed as the MenuToolButton's icon.
131    * @param label The string used to display the label for this MenuToolButton.
132    */
133   explicit MenuToolButton(Widget& icon_widget, const Glib::ustring& label = Glib::ustring());
134
135   
136   /** Sets the Gtk::Menu that is popped up when the user clicks on the arrow.
137    * If @a menu  is <tt>0</tt>, the arrow button becomes insensitive.
138    * 
139    * Since: 2.6
140    * @param menu The Gtk::Menu associated with Gtk::MenuToolButton.
141    */
142   void set_menu(Menu& menu);
143   
144   /** Gets the Gtk::Menu associated with Gtk::MenuToolButton.
145    * @return The Gtk::Menu associated with Gtk::MenuToolButton
146    * 
147    * Since: 2.6.
148    */
149   Menu* get_menu();
150   
151   /** Gets the Gtk::Menu associated with Gtk::MenuToolButton.
152    * @return The Gtk::Menu associated with Gtk::MenuToolButton
153    * 
154    * Since: 2.6.
155    */
156   const Menu* get_menu() const;
157
158   
159   void set_arrow_tooltip(Tooltips& tooltips, const Glib::ustring& tip_text, const Glib::ustring& tip_private);
160
161   
162   Glib::SignalProxy0< void > signal_show_menu();
163
164   /** The dropdown menu.
165    *
166    * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
167    * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
168    * the value of the property changes.
169    */
170   Glib::PropertyProxy<Menu*> property_menu() ;
171
172 /** The dropdown menu.
173    *
174    * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
175    * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
176    * the value of the property changes.
177    */
178   Glib::PropertyProxy_ReadOnly<Menu*> property_menu() const;
179
180
181 };
182
183 } // namespace Gtk
184
185
186 namespace Glib
187 {
188   /** @relates Gtk::MenuToolButton
189    * @param object The C instance
190    * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
191    * @result A C++ instance that wraps this C instance.
192    */
193   Gtk::MenuToolButton* wrap(GtkMenuToolButton* object, bool take_copy = false);
194 }
195 #endif /* _GTKMM_MENUTOOLBUTTON_H */
196