2 // Generated by gtkmmproc -- DO NOT MODIFY!
3 #ifndef _GTKMM_ACCELLABEL_H
4 #define _GTKMM_ACCELLABEL_H
13 * Copyright (C) 1998-2002 The gtkmm Development Team
15 * This library is free software; you can redistribute it and/or
16 * modify it under the terms of the GNU Library General Public
17 * License as published by the Free Software Foundation; either
18 * version 2 of the License, or (at your option) any later version.
20 * This library is distributed in the hope that it will be useful,
21 * but WITHOUT ANY WARRANTY; without even the implied warranty of
22 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
23 * Library General Public License for more details.
25 * You should have received a copy of the GNU Library General Public
26 * License along with this library; if not, write to the Free
27 * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
30 #include <gtkmm/label.h>
33 #ifndef DOXYGEN_SHOULD_SKIP_THIS
34 typedef struct _GtkAccelLabel GtkAccelLabel;
35 typedef struct _GtkAccelLabelClass GtkAccelLabelClass;
36 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
40 { class AccelLabel_Class; } // namespace Gtk
44 /** A label which displays an accelerator key on the right of the text.
45 * Used for menu item labels, for instance.
50 class AccelLabel : public Label
53 #ifndef DOXYGEN_SHOULD_SKIP_THIS
54 typedef AccelLabel CppObjectType;
55 typedef AccelLabel_Class CppClassType;
56 typedef GtkAccelLabel BaseObjectType;
57 typedef GtkAccelLabelClass BaseClassType;
58 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
60 virtual ~AccelLabel();
62 #ifndef DOXYGEN_SHOULD_SKIP_THIS
65 friend class AccelLabel_Class;
66 static CppClassType accellabel_class_;
69 AccelLabel(const AccelLabel&);
70 AccelLabel& operator=(const AccelLabel&);
73 explicit AccelLabel(const Glib::ConstructParams& construct_params);
74 explicit AccelLabel(GtkAccelLabel* castitem);
76 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
79 #ifndef DOXYGEN_SHOULD_SKIP_THIS
80 static GType get_type() G_GNUC_CONST;
81 static GType get_base_type() G_GNUC_CONST;
84 ///Provides access to the underlying C GtkObject.
85 GtkAccelLabel* gobj() { return reinterpret_cast<GtkAccelLabel*>(gobject_); }
87 ///Provides access to the underlying C GtkObject.
88 const GtkAccelLabel* gobj() const { return reinterpret_cast<GtkAccelLabel*>(gobject_); }
92 //C++ methods used to invoke GTK+ virtual functions:
93 #ifdef GLIBMM_VFUNCS_ENABLED
94 #endif //GLIBMM_VFUNCS_ENABLED
97 //GTK+ Virtual Functions (override these to change behaviour):
98 #ifdef GLIBMM_VFUNCS_ENABLED
99 #endif //GLIBMM_VFUNCS_ENABLED
101 //Default Signal Handlers::
102 #ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
103 #endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
111 //The default ctor doesn't correspond to any _new function, but gtkmenuitem.cc does a simple g_object_new() with no properties.
112 /** Default constructor to create an AccelLabel object
116 /** Constructor to create an AccelLabel object with a default label
117 * @param label The label string.
118 * @param mnemonic If true, characters preceded by an underscore (_) will be underlined and used as a keyboard accelerator.
120 explicit AccelLabel(const Glib::ustring& label, bool mnemonic = false);
123 /** Sets the widget to be monitored by this accelerator label.
124 * @param accel_widget The widget to be monitored.
126 void set_accel_widget(const Widget& accel_widget);
127 /// Forget the accel widget previously set by set_accel_widget().
128 void unset_accel_widget();
131 /** Fetches the widget monitored by this accelerator label. See
132 * set_accel_widget().
133 * @return The object monitored by the accelerator label,
136 Widget* get_accel_widget();
138 /** Fetches the widget monitored by this accelerator label. See
139 * set_accel_widget().
140 * @return The object monitored by the accelerator label,
143 const Widget* get_accel_widget() const;
146 /** Gets the width needed to display this accelerator label. This is used by menus to align all of the Gtk::MenuItem widgets, and shouldn't be needed by applications.
147 * @return Width of this accelerator label.
149 guint get_accel_width() const;
151 /** Recreates the string representing the accelerator keys.
152 * @return Always returns <tt>false</tt>.
156 //_WRAP_PROPERTY("accel-closure", Glib::Object) //GClosure
157 #ifdef GLIBMM_PROPERTIES_ENABLED
158 /** The widget to be monitored for accelerator changes.
160 * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
161 * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
162 * the value of the property changes.
164 Glib::PropertyProxy<Gtk::Widget*> property_accel_widget() ;
165 #endif //#GLIBMM_PROPERTIES_ENABLED
167 #ifdef GLIBMM_PROPERTIES_ENABLED
168 /** The widget to be monitored for accelerator changes.
170 * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
171 * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
172 * the value of the property changes.
174 Glib::PropertyProxy_ReadOnly<Gtk::Widget*> property_accel_widget() const;
175 #endif //#GLIBMM_PROPERTIES_ENABLED
180 } /* namespace Gtk */
185 /** A Glib::wrap() method for this object.
187 * @param object The C instance.
188 * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
189 * @result A C++ instance that wraps this C instance.
191 * @relates Gtk::AccelLabel
193 Gtk::AccelLabel* wrap(GtkAccelLabel* object, bool take_copy = false);
197 #endif /* _GTKMM_ACCELLABEL_H */