2 // Generated by gtkmmproc -- DO NOT MODIFY!
3 #ifndef _GTKMM_MENUTOOLBUTTON_H
4 #define _GTKMM_MENUTOOLBUTTON_H
12 * Copyright (C) 2003 The gtkmm Development Team
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.
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.
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.
29 #include <gtkmm/toolbutton.h>
30 #include <gtkmm/menu.h>
31 #include <gtkmm/tooltips.h>
34 #ifndef DOXYGEN_SHOULD_SKIP_THIS
35 typedef struct _GtkMenuToolButton GtkMenuToolButton;
36 typedef struct _GtkMenuToolButtonClass GtkMenuToolButtonClass;
37 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
41 { class MenuToolButton_Class; } // namespace Gtk
45 /** A Gtk::ToolItem containing a toggle button.
47 * A MenuToolButton is a Gtk::ToolItem that contains a menu.
51 class MenuToolButton : public ToolButton
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 */
61 virtual ~MenuToolButton();
63 #ifndef DOXYGEN_SHOULD_SKIP_THIS
66 friend class MenuToolButton_Class;
67 static CppClassType menutoolbutton_class_;
70 MenuToolButton(const MenuToolButton&);
71 MenuToolButton& operator=(const MenuToolButton&);
74 explicit MenuToolButton(const Glib::ConstructParams& construct_params);
75 explicit MenuToolButton(GtkMenuToolButton* castitem);
77 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
80 #ifndef DOXYGEN_SHOULD_SKIP_THIS
81 static GType get_type() G_GNUC_CONST;
82 static GType get_base_type() G_GNUC_CONST;
85 ///Provides access to the underlying C GtkObject.
86 GtkMenuToolButton* gobj() { return reinterpret_cast<GtkMenuToolButton*>(gobject_); }
88 ///Provides access to the underlying C GtkObject.
89 const GtkMenuToolButton* gobj() const { return reinterpret_cast<GtkMenuToolButton*>(gobject_); }
93 //C++ methods used to invoke GTK+ virtual functions:
96 //GTK+ Virtual Functions (override these to change behaviour):
98 //Default Signal Handlers::
99 virtual void on_show_menu();
106 /** Creates a new MenuToolButton.
110 /** Creates a new MenuToolButton from a StockID.
112 * The MenuToolButton will be created according to the @a stock_id properties.
114 * @param stock_id The StockID which determines the look of the MenuToolButton.
116 explicit MenuToolButton(const Gtk::StockID& stock_id);
118 /** Creates a new MenuToolButton with a label.
120 * The MenuToolButton will have the label @a label.
122 * @param label The string used to display the label for this MenuToolButton.
124 explicit MenuToolButton(const Glib::ustring& label);
126 /** Creates a new MenuToolButton with an image.
128 * The MenuToolButton will have the label @a label and an image widget @a icon_widget.
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.
133 explicit MenuToolButton(Widget& icon_widget, const Glib::ustring& label = Glib::ustring());
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.
140 * @param menu The Gtk::Menu associated with Gtk::MenuToolButton.
142 void set_menu(Menu& menu);
144 /** Gets the Gtk::Menu associated with Gtk::MenuToolButton.
145 * @return The Gtk::Menu associated with Gtk::MenuToolButton
151 /** Gets the Gtk::Menu associated with Gtk::MenuToolButton.
152 * @return The Gtk::Menu associated with Gtk::MenuToolButton
156 const Menu* get_menu() const;
159 void set_arrow_tooltip(Tooltips& tooltips, const Glib::ustring& tip_text, const Glib::ustring& tip_private);
162 Glib::SignalProxy0< void > signal_show_menu();
164 /** The dropdown menu.
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.
170 Glib::PropertyProxy<Menu*> property_menu() ;
172 /** The dropdown menu.
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.
178 Glib::PropertyProxy_ReadOnly<Menu*> property_menu() const;
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.
193 Gtk::MenuToolButton* wrap(GtkMenuToolButton* object, bool take_copy = false);
195 #endif /* _GTKMM_MENUTOOLBUTTON_H */