1 // Generated by gtkmmproc -- DO NOT MODIFY!
3 #include <gtkmm/fontselection.h>
4 #include <gtkmm/private/fontselection_p.h>
9 /* Copyright 1998-2002 The gtkmm Development Team
11 * This library is free software; you can redistribute it and/or
12 * modify it under the terms of the GNU Library General Public
13 * License as published by the Free Software Foundation; either
14 * version 2 of the License, or (at your option) any later version.
16 * This library is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19 * Library General Public License for more details.
21 * You should have received a copy of the GNU Library General Public
22 * License along with this library; if not, write to the Free
23 * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
26 #include <gtkmm/button.h>
27 #include <gtkmm/entry.h>
28 #include <gtkmm/radiobutton.h>
29 #include <gtk/gtkfontsel.h>
34 } // anonymous namespace
40 Gtk::FontSelection* wrap(GtkFontSelection* object, bool take_copy)
42 return dynamic_cast<Gtk::FontSelection *> (Glib::wrap_auto ((GObject*)(object), take_copy));
45 } /* namespace Glib */
51 /* The *_Class implementation: */
53 const Glib::Class& FontSelection_Class::init()
55 if(!gtype_) // create the GType if necessary
57 // Glib::Class has to know the class init function to clone custom types.
58 class_init_func_ = &FontSelection_Class::class_init_function;
60 // This is actually just optimized away, apparently with no harm.
61 // Make sure that the parent type has been created.
62 //CppClassParent::CppObjectType::get_type();
64 // Create the wrapper type, with the same class/instance size as the base type.
65 register_derived_type(gtk_font_selection_get_type());
67 // Add derived versions of interfaces, if the C type implements any interfaces:
73 void FontSelection_Class::class_init_function(void* g_class, void* class_data)
75 BaseClassType *const klass = static_cast<BaseClassType*>(g_class);
76 CppClassParent::class_init_function(klass, class_data);
81 Glib::ObjectBase* FontSelection_Class::wrap_new(GObject* o)
83 return manage(new FontSelection((GtkFontSelection*)(o)));
88 /* The implementation: */
90 FontSelection::FontSelection(const Glib::ConstructParams& construct_params)
92 Gtk::VBox(construct_params)
96 FontSelection::FontSelection(GtkFontSelection* castitem)
98 Gtk::VBox((GtkVBox*)(castitem))
102 FontSelection::~FontSelection()
107 FontSelection::CppClassType FontSelection::fontselection_class_; // initialize static member
109 GType FontSelection::get_type()
111 return fontselection_class_.init().get_type();
114 GType FontSelection::get_base_type()
116 return gtk_font_selection_get_type();
120 FontSelection::FontSelection()
122 Glib::ObjectBase(0), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow vfunc optimisations.
123 Gtk::VBox(Glib::ConstructParams(fontselection_class_.init()))
127 Glib::ustring FontSelection::get_font_name() const
129 return Glib::convert_return_gchar_ptr_to_ustring(gtk_font_selection_get_font_name(const_cast<GtkFontSelection*>(gobj())));
132 bool FontSelection::set_font_name(const Glib::ustring& fontname)
134 return gtk_font_selection_set_font_name(gobj(), fontname.c_str());
137 Glib::ustring FontSelection::get_preview_text() const
139 return Glib::convert_const_gchar_ptr_to_ustring(gtk_font_selection_get_preview_text(const_cast<GtkFontSelection*>(gobj())));
142 void FontSelection::set_preview_text(const Glib::ustring& fontname)
144 gtk_font_selection_set_preview_text(gobj(), fontname.c_str());
147 Entry* FontSelection::get_font_entry()
149 return Glib::wrap((GtkEntry*)(gobj()->font_entry));
152 const Entry* FontSelection::get_font_entry() const
154 return Glib::wrap((GtkEntry*)(gobj()->font_entry));
157 Entry* FontSelection::get_font_style_entry()
159 return Glib::wrap((GtkEntry*)(gobj()->font_style_entry));
162 const Entry* FontSelection::get_font_style_entry() const
164 return Glib::wrap((GtkEntry*)(gobj()->font_style_entry));
167 Entry* FontSelection::get_size_entry()
169 return Glib::wrap((GtkEntry*)(gobj()->size_entry));
172 const Entry* FontSelection::get_size_entry() const
174 return Glib::wrap((GtkEntry*)(gobj()->size_entry));
177 RadioButton* FontSelection::get_pixels_button()
179 return Glib::wrap((GtkRadioButton*)(gobj()->pixels_button));
182 const RadioButton* FontSelection::get_pixels_button() const
184 return Glib::wrap((GtkRadioButton*)(gobj()->pixels_button));
187 RadioButton* FontSelection::get_points_button()
189 return Glib::wrap((GtkRadioButton*)(gobj()->points_button));
192 const RadioButton* FontSelection::get_points_button() const
194 return Glib::wrap((GtkRadioButton*)(gobj()->points_button));
197 Button* FontSelection::get_filter_button()
199 return Glib::wrap((GtkButton*)(gobj()->filter_button));
202 const Button* FontSelection::get_filter_button() const
204 return Glib::wrap((GtkButton*)(gobj()->filter_button));
207 Entry* FontSelection::get_preview_entry()
209 return Glib::wrap((GtkEntry*)(gobj()->preview_entry));
212 const Entry* FontSelection::get_preview_entry() const
214 return Glib::wrap((GtkEntry*)(gobj()->preview_entry));
218 Glib::PropertyProxy<Glib::ustring> FontSelection::property_font_name()
220 return Glib::PropertyProxy<Glib::ustring>(this, "font-name");
223 Glib::PropertyProxy_ReadOnly<Glib::ustring> FontSelection::property_font_name() const
225 return Glib::PropertyProxy_ReadOnly<Glib::ustring>(this, "font-name");
228 Glib::PropertyProxy<Glib::ustring> FontSelection::property_preview_text()
230 return Glib::PropertyProxy<Glib::ustring>(this, "preview-text");
233 Glib::PropertyProxy_ReadOnly<Glib::ustring> FontSelection::property_preview_text() const
235 return Glib::PropertyProxy_ReadOnly<Glib::ustring>(this, "preview-text");
245 Gtk::FontSelectionDialog* wrap(GtkFontSelectionDialog* object, bool take_copy)
247 return dynamic_cast<Gtk::FontSelectionDialog *> (Glib::wrap_auto ((GObject*)(object), take_copy));
250 } /* namespace Glib */
256 /* The *_Class implementation: */
258 const Glib::Class& FontSelectionDialog_Class::init()
260 if(!gtype_) // create the GType if necessary
262 // Glib::Class has to know the class init function to clone custom types.
263 class_init_func_ = &FontSelectionDialog_Class::class_init_function;
265 // This is actually just optimized away, apparently with no harm.
266 // Make sure that the parent type has been created.
267 //CppClassParent::CppObjectType::get_type();
269 // Create the wrapper type, with the same class/instance size as the base type.
270 register_derived_type(gtk_font_selection_dialog_get_type());
272 // Add derived versions of interfaces, if the C type implements any interfaces:
278 void FontSelectionDialog_Class::class_init_function(void* g_class, void* class_data)
280 BaseClassType *const klass = static_cast<BaseClassType*>(g_class);
281 CppClassParent::class_init_function(klass, class_data);
286 Glib::ObjectBase* FontSelectionDialog_Class::wrap_new(GObject* o)
288 return new FontSelectionDialog((GtkFontSelectionDialog*)(o)); //top-level windows can not be manage()ed.
293 /* The implementation: */
295 FontSelectionDialog::FontSelectionDialog(const Glib::ConstructParams& construct_params)
297 Gtk::Dialog(construct_params)
301 FontSelectionDialog::FontSelectionDialog(GtkFontSelectionDialog* castitem)
303 Gtk::Dialog((GtkDialog*)(castitem))
307 FontSelectionDialog::~FontSelectionDialog()
312 FontSelectionDialog::CppClassType FontSelectionDialog::fontselectiondialog_class_; // initialize static member
314 GType FontSelectionDialog::get_type()
316 return fontselectiondialog_class_.init().get_type();
319 GType FontSelectionDialog::get_base_type()
321 return gtk_font_selection_dialog_get_type();
324 FontSelectionDialog::FontSelectionDialog()
326 Glib::ObjectBase(0), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow vfunc optimisations.
327 Gtk::Dialog(Glib::ConstructParams(fontselectiondialog_class_.init()))
331 FontSelectionDialog::FontSelectionDialog(const Glib::ustring& title)
333 Glib::ObjectBase(0), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow vfunc optimisations.
334 Gtk::Dialog(Glib::ConstructParams(fontselectiondialog_class_.init(), "title", title.c_str(), (char*) 0))
338 bool FontSelectionDialog::set_font_name(const Glib::ustring& fontname)
340 return gtk_font_selection_dialog_set_font_name(gobj(), fontname.c_str());
343 Glib::ustring FontSelectionDialog::get_font_name() const
345 return Glib::convert_return_gchar_ptr_to_ustring(gtk_font_selection_dialog_get_font_name(const_cast<GtkFontSelectionDialog*>(gobj())));
348 Glib::ustring FontSelectionDialog::get_preview_text() const
350 return Glib::convert_const_gchar_ptr_to_ustring(gtk_font_selection_dialog_get_preview_text(const_cast<GtkFontSelectionDialog*>(gobj())));
353 void FontSelectionDialog::set_preview_text(const Glib::ustring& fontname)
355 gtk_font_selection_dialog_set_preview_text(gobj(), fontname.c_str());
358 FontSelection* FontSelectionDialog::get_font_selection()
360 return Glib::wrap((GtkFontSelection*)(gobj()->fontsel));
363 const FontSelection* FontSelectionDialog::get_font_selection() const
365 return Glib::wrap((GtkFontSelection*)(gobj()->fontsel));
368 Button* FontSelectionDialog::get_ok_button()
370 return Glib::wrap((GtkButton*)(gobj()->ok_button));
373 const Button* FontSelectionDialog::get_ok_button() const
375 return Glib::wrap((GtkButton*)(gobj()->ok_button));
378 Button* FontSelectionDialog::get_apply_button()
380 return Glib::wrap((GtkButton*)(gobj()->apply_button));
383 const Button* FontSelectionDialog::get_apply_button() const
385 return Glib::wrap((GtkButton*)(gobj()->apply_button));
388 Button* FontSelectionDialog::get_cancel_button()
390 return Glib::wrap((GtkButton*)(gobj()->cancel_button));
393 const Button* FontSelectionDialog::get_cancel_button() const
395 return Glib::wrap((GtkButton*)(gobj()->cancel_button));