2 // Generated by gtkmmproc -- DO NOT MODIFY!
3 #ifndef _GTKMM_OPTIONMENU_H
4 #define _GTKMM_OPTIONMENU_H
6 #include <gtkmmconfig.h>
8 #ifndef GTKMM_DISABLE_DEPRECATED
17 * Copyright (C) 1998-2002 The gtkmm Development Team
19 * This library is free software; you can redistribute it and/or
20 * modify it under the terms of the GNU Library General Public
21 * License as published by the Free Software Foundation; either
22 * version 2 of the License, or (at your option) any later version.
24 * This library is distributed in the hope that it will be useful,
25 * but WITHOUT ANY WARRANTY; without even the implied warranty of
26 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
27 * Library General Public License for more details.
29 * You should have received a copy of the GNU Library General Public
30 * License along with this library; if not, write to the Free
31 * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
34 // This is for including the config header before any code (such as
35 // the #ifndef GTKMM_DISABLE_DEPRECATED in deprecated classes) is generated:
38 #include <gtkmm/button.h>
41 #ifndef DOXYGEN_SHOULD_SKIP_THIS
42 typedef struct _GtkOptionMenu GtkOptionMenu;
43 typedef struct _GtkOptionMenuClass GtkOptionMenuClass;
44 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
48 { class OptionMenu_Class; } // namespace Gtk
54 /** A widget used to choose from a list of valid choices.
56 * A Gtk::OptionMenu is a widget that allows the user to choose from a list
57 * of valid choices. The Gtk::OptionMenu displays the selected choice. When
58 * activated the GtkOptionMenu displays a popup Gtk::Menu which allows the
59 * user to make a new choice.
61 * @deprecated Use the ComboBox widget instead.
64 class OptionMenu : public Button
67 #ifndef DOXYGEN_SHOULD_SKIP_THIS
68 typedef OptionMenu CppObjectType;
69 typedef OptionMenu_Class CppClassType;
70 typedef GtkOptionMenu BaseObjectType;
71 typedef GtkOptionMenuClass BaseClassType;
72 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
74 virtual ~OptionMenu();
76 #ifndef DOXYGEN_SHOULD_SKIP_THIS
79 friend class OptionMenu_Class;
80 static CppClassType optionmenu_class_;
83 OptionMenu(const OptionMenu&);
84 OptionMenu& operator=(const OptionMenu&);
87 explicit OptionMenu(const Glib::ConstructParams& construct_params);
88 explicit OptionMenu(GtkOptionMenu* castitem);
90 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
93 #ifndef DOXYGEN_SHOULD_SKIP_THIS
94 static GType get_type() G_GNUC_CONST;
95 static GType get_base_type() G_GNUC_CONST;
98 ///Provides access to the underlying C GtkObject.
99 GtkOptionMenu* gobj() { return reinterpret_cast<GtkOptionMenu*>(gobject_); }
101 ///Provides access to the underlying C GtkObject.
102 const GtkOptionMenu* gobj() const { return reinterpret_cast<GtkOptionMenu*>(gobject_); }
106 //C++ methods used to invoke GTK+ virtual functions:
107 #ifdef GLIBMM_VFUNCS_ENABLED
108 #endif //GLIBMM_VFUNCS_ENABLED
111 //GTK+ Virtual Functions (override these to change behaviour):
112 #ifdef GLIBMM_VFUNCS_ENABLED
113 #endif //GLIBMM_VFUNCS_ENABLED
115 //Default Signal Handlers::
116 #ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
117 virtual void on_changed();
118 #endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
129 void set_menu(Menu& menu);
133 const Menu* get_menu() const;
137 /** Retrieves the index of the currently selected menu item. The menu
138 * items are numbered from top to bottom, starting with 0.
139 * @return Index of the selected menu item, or -1 if there are no menu items
140 * Deprecated: 2.4: Use Gtk::ComboBox instead.
142 int get_history() const;
144 void set_history(guint index);
149 * <tt>void on_my_%changed()</tt>
152 Glib::SignalProxy0< void > signal_changed();
156 void init_accels_handler_();
161 } /* namespace Gtk */
166 /** A Glib::wrap() method for this object.
168 * @param object The C instance.
169 * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
170 * @result A C++ instance that wraps this C instance.
172 * @relates Gtk::OptionMenu
174 Gtk::OptionMenu* wrap(GtkOptionMenu* object, bool take_copy = false);
178 #endif // GTKMM_DISABLE_DEPRECATED
181 #endif /* _GTKMM_OPTIONMENU_H */