2 // Generated by gtkmmproc -- DO NOT MODIFY!
3 #ifndef _GTKMM_FONTBUTTON_H
4 #define _GTKMM_FONTBUTTON_H
13 * Copyright (C) 2003 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/button.h>
33 #ifndef DOXYGEN_SHOULD_SKIP_THIS
34 typedef struct _GtkFontButton GtkFontButton;
35 typedef struct _GtkFontButtonClass GtkFontButtonClass;
36 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
40 { class FontButton_Class; } // namespace Gtk
44 /** A button to launch a font selection dialog.
46 * The Gtk::FontButton is a button which displays the currently selected font and
47 * allows to open a font selection dialog to change the font. It is suitable widget
48 * for selecting a font in a preference dialog.
52 class FontButton : public Button
55 #ifndef DOXYGEN_SHOULD_SKIP_THIS
56 typedef FontButton CppObjectType;
57 typedef FontButton_Class CppClassType;
58 typedef GtkFontButton BaseObjectType;
59 typedef GtkFontButtonClass BaseClassType;
60 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
62 virtual ~FontButton();
64 #ifndef DOXYGEN_SHOULD_SKIP_THIS
67 friend class FontButton_Class;
68 static CppClassType fontbutton_class_;
71 FontButton(const FontButton&);
72 FontButton& operator=(const FontButton&);
75 explicit FontButton(const Glib::ConstructParams& construct_params);
76 explicit FontButton(GtkFontButton* castitem);
78 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
81 #ifndef DOXYGEN_SHOULD_SKIP_THIS
82 static GType get_type() G_GNUC_CONST;
83 static GType get_base_type() G_GNUC_CONST;
86 ///Provides access to the underlying C GtkObject.
87 GtkFontButton* gobj() { return reinterpret_cast<GtkFontButton*>(gobject_); }
89 ///Provides access to the underlying C GtkObject.
90 const GtkFontButton* gobj() const { return reinterpret_cast<GtkFontButton*>(gobject_); }
94 //C++ methods used to invoke GTK+ virtual functions:
95 #ifdef GLIBMM_VFUNCS_ENABLED
96 #endif //GLIBMM_VFUNCS_ENABLED
99 //GTK+ Virtual Functions (override these to change behaviour):
100 #ifdef GLIBMM_VFUNCS_ENABLED
101 #endif //GLIBMM_VFUNCS_ENABLED
103 //Default Signal Handlers::
104 #ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
105 virtual void on_font_set();
106 #endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
113 explicit FontButton(const Glib::ustring& font_name);
116 /** Retrieves the title of the font selection dialog.
117 * @return An internal copy of the title string which must not be freed.
121 Glib::ustring get_title() const;
123 /** Sets the title for the font selection dialog.
126 * @param title A string containing the font selection dialog title.
128 void set_title(const Glib::ustring& title);
130 /** Returns: whether the selected font is used in the label.
131 * @return Whether the selected font is used in the label.
135 bool get_use_font() const;
137 /** If @a use_font is <tt>true</tt>, the font name will be written using the selected font.
140 * @param use_font If <tt>true</tt>, font name will be written using font chosen.
142 void set_use_font(bool use_font = true);
144 /** Returns: whether the selected size is used in the label.
145 * @return Whether the selected size is used in the label.
149 bool get_use_size() const;
151 /** If @a use_size is <tt>true</tt>, the font name will be written using the selected size.
154 * @param use_size If <tt>true</tt>, font name will be written using the selected size.
156 void set_use_size(bool use_size = true);
158 /** Retrieves the name of the currently selected font.
159 * @return An internal copy of the font name which must not be freed.
163 Glib::ustring get_font_name() const;
165 /** Sets or updates the currently-displayed font in font picker dialog.
166 * @param fontname Name of font to display in font selection dialog.
167 * @return Return value of Gtk::FontSelectionDialog::set_font_name() if the
168 * font selection dialog exists, otherwise <tt>false</tt>.
172 bool set_font_name(const Glib::ustring& fontname);
174 /** Return value: whether the font style will be shown in the label.
175 * @return Whether the font style will be shown in the label.
179 bool get_show_style() const;
181 /** If @a show_style is <tt>true</tt>, the font style will be displayed along with name of the selected font.
184 * @param show_style <tt>true</tt> if font style should be displayed in label.
186 void set_show_style(bool show_style = true);
188 /** Return value: whether the font size will be shown in the label.
189 * @return Whether the font size will be shown in the label.
193 bool get_show_size() const;
195 /** If @a show_size is <tt>true</tt>, the font size will be displayed along with the name of the selected font.
198 * @param show_size <tt>true</tt> if font size should be displayed in dialog.
200 void set_show_size(bool show_size = true);
202 #ifdef GLIBMM_PROPERTIES_ENABLED
203 /** The title of the font selection dialog.
205 * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
206 * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
207 * the value of the property changes.
209 Glib::PropertyProxy<Glib::ustring> property_title() ;
210 #endif //#GLIBMM_PROPERTIES_ENABLED
212 #ifdef GLIBMM_PROPERTIES_ENABLED
213 /** The title of the font selection dialog.
215 * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
216 * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
217 * the value of the property changes.
219 Glib::PropertyProxy_ReadOnly<Glib::ustring> property_title() const;
220 #endif //#GLIBMM_PROPERTIES_ENABLED
222 #ifdef GLIBMM_PROPERTIES_ENABLED
223 /** The name of the selected font.
225 * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
226 * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
227 * the value of the property changes.
229 Glib::PropertyProxy<Glib::ustring> property_font_name() ;
230 #endif //#GLIBMM_PROPERTIES_ENABLED
232 #ifdef GLIBMM_PROPERTIES_ENABLED
233 /** The name of the selected font.
235 * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
236 * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
237 * the value of the property changes.
239 Glib::PropertyProxy_ReadOnly<Glib::ustring> property_font_name() const;
240 #endif //#GLIBMM_PROPERTIES_ENABLED
242 #ifdef GLIBMM_PROPERTIES_ENABLED
243 /** Whether the label is drawn in the selected font.
245 * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
246 * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
247 * the value of the property changes.
249 Glib::PropertyProxy<bool> property_use_font() ;
250 #endif //#GLIBMM_PROPERTIES_ENABLED
252 #ifdef GLIBMM_PROPERTIES_ENABLED
253 /** Whether the label is drawn in the selected font.
255 * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
256 * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
257 * the value of the property changes.
259 Glib::PropertyProxy_ReadOnly<bool> property_use_font() const;
260 #endif //#GLIBMM_PROPERTIES_ENABLED
262 #ifdef GLIBMM_PROPERTIES_ENABLED
263 /** Whether the label is drawn with the selected font size.
265 * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
266 * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
267 * the value of the property changes.
269 Glib::PropertyProxy<bool> property_use_size() ;
270 #endif //#GLIBMM_PROPERTIES_ENABLED
272 #ifdef GLIBMM_PROPERTIES_ENABLED
273 /** Whether the label is drawn with the selected font size.
275 * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
276 * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
277 * the value of the property changes.
279 Glib::PropertyProxy_ReadOnly<bool> property_use_size() const;
280 #endif //#GLIBMM_PROPERTIES_ENABLED
282 #ifdef GLIBMM_PROPERTIES_ENABLED
283 /** Whether the selected font style is shown in the label.
285 * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
286 * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
287 * the value of the property changes.
289 Glib::PropertyProxy<bool> property_show_style() ;
290 #endif //#GLIBMM_PROPERTIES_ENABLED
292 #ifdef GLIBMM_PROPERTIES_ENABLED
293 /** Whether the selected font style is shown in the label.
295 * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
296 * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
297 * the value of the property changes.
299 Glib::PropertyProxy_ReadOnly<bool> property_show_style() const;
300 #endif //#GLIBMM_PROPERTIES_ENABLED
302 #ifdef GLIBMM_PROPERTIES_ENABLED
303 /** Whether selected font size is shown in the label.
305 * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
306 * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
307 * the value of the property changes.
309 Glib::PropertyProxy<bool> property_show_size() ;
310 #endif //#GLIBMM_PROPERTIES_ENABLED
312 #ifdef GLIBMM_PROPERTIES_ENABLED
313 /** Whether selected font size is shown in the label.
315 * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
316 * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
317 * the value of the property changes.
319 Glib::PropertyProxy_ReadOnly<bool> property_show_size() const;
320 #endif //#GLIBMM_PROPERTIES_ENABLED
323 /** The font_set signal is emitted when the user selects a font. When handling this signal,
324 * use get_font_name() to find out which font was just selected.
327 * <tt>void on_my_%font_set()</tt>
330 Glib::SignalProxy0< void > signal_font_set();
341 /** A Glib::wrap() method for this object.
343 * @param object The C instance.
344 * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
345 * @result A C++ instance that wraps this C instance.
347 * @relates Gtk::FontButton
349 Gtk::FontButton* wrap(GtkFontButton* object, bool take_copy = false);
353 #endif /* _GTKMM_FONTBUTTON_H */