2 // Generated by gtkmmproc -- DO NOT MODIFY!
3 #ifndef _GTKMM_ACCELLABEL_H
4 #define _GTKMM_ACCELLABEL_H
12 * Copyright (C) 1998-2002 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/label.h>
32 #ifndef DOXYGEN_SHOULD_SKIP_THIS
33 typedef struct _GtkAccelLabel GtkAccelLabel;
34 typedef struct _GtkAccelLabelClass GtkAccelLabelClass;
35 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
39 { class AccelLabel_Class; } // namespace Gtk
43 /** A label which displays an accelerator key on the right of the text.
44 * Used for menu item labels, for instance.
49 class AccelLabel : public Label
52 #ifndef DOXYGEN_SHOULD_SKIP_THIS
53 typedef AccelLabel CppObjectType;
54 typedef AccelLabel_Class CppClassType;
55 typedef GtkAccelLabel BaseObjectType;
56 typedef GtkAccelLabelClass BaseClassType;
57 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
59 virtual ~AccelLabel();
61 #ifndef DOXYGEN_SHOULD_SKIP_THIS
64 friend class AccelLabel_Class;
65 static CppClassType accellabel_class_;
68 AccelLabel(const AccelLabel&);
69 AccelLabel& operator=(const AccelLabel&);
72 explicit AccelLabel(const Glib::ConstructParams& construct_params);
73 explicit AccelLabel(GtkAccelLabel* castitem);
75 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
78 #ifndef DOXYGEN_SHOULD_SKIP_THIS
79 static GType get_type() G_GNUC_CONST;
80 static GType get_base_type() G_GNUC_CONST;
83 ///Provides access to the underlying C GtkObject.
84 GtkAccelLabel* gobj() { return reinterpret_cast<GtkAccelLabel*>(gobject_); }
86 ///Provides access to the underlying C GtkObject.
87 const GtkAccelLabel* gobj() const { return reinterpret_cast<GtkAccelLabel*>(gobject_); }
91 //C++ methods used to invoke GTK+ virtual functions:
94 //GTK+ Virtual Functions (override these to change behaviour):
96 //Default Signal Handlers::
104 //The default ctor doesn't correspond to any _new function, but gtkmenuitem.cc does a simple g_object_new() with no properties.
105 /** Default constructor to create an AccelLabel object
109 /** Constructor to create an AccelLabel object with a default label
110 * @param label The label string.
111 * @param mnemonic If true, characters preceded by an underscore (_) will be underlined and used as a keyboard accelerator.
113 explicit AccelLabel(const Glib::ustring& label, bool mnemonic = false);
116 /** Sets the widget to be monitored by this accelerator label.
117 * @param accel_widget The widget to be monitored.
119 void set_accel_widget(const Widget& accel_widget);
120 /// Forget the accel widget previously set by set_accel_widget().
121 void unset_accel_widget();
124 /** Fetches the widget monitored by this accelerator label. See
125 * set_accel_widget().
126 * @return The object monitored by the accelerator label,
129 Widget* get_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 const Widget* get_accel_widget() const;
139 /** 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.
140 * @return Width of this accelerator label.
142 guint get_accel_width() const;
144 /** Recreates the string representing the accelerator keys.
145 * @return Always returns <tt>false</tt>.
149 //_WRAP_PROPERTY("accel-closure", Glib::Object) //GClosure
150 /** The widget to be monitored for accelerator changes.
152 * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
153 * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
154 * the value of the property changes.
156 Glib::PropertyProxy<Gtk::Widget*> property_accel_widget() ;
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_ReadOnly<Gtk::Widget*> property_accel_widget() const;
169 } /* namespace Gtk */
174 /** @relates Gtk::AccelLabel
175 * @param object The C instance
176 * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
177 * @result A C++ instance that wraps this C instance.
179 Gtk::AccelLabel* wrap(GtkAccelLabel* object, bool take_copy = false);
181 #endif /* _GTKMM_ACCELLABEL_H */