Install ardour as a binary, a script and a set of shared
[ardour.git] / libs / gtkmm2 / gtk / gtkmm / fontselection.cc
1 // Generated by gtkmmproc -- DO NOT MODIFY!
2
3 #include <gtkmm/fontselection.h>
4 #include <gtkmm/private/fontselection_p.h>
5
6 // -*- c++ -*-
7 /* $Id$ */
8
9 /* Copyright 1998-2002 The gtkmm Development Team
10  *
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.
15  *
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.
20  *
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.
24  */
25
26 #include <gtkmm/button.h>
27 #include <gtkmm/entry.h>
28 #include <gtkmm/radiobutton.h>
29 #include <gtk/gtkfontsel.h>
30
31
32 namespace
33 {
34 } // anonymous namespace
35
36
37 namespace Glib
38 {
39
40 Gtk::FontSelection* wrap(GtkFontSelection* object, bool take_copy)
41 {
42   return dynamic_cast<Gtk::FontSelection *> (Glib::wrap_auto ((GObject*)(object), take_copy));
43 }
44
45 } /* namespace Glib */
46
47 namespace Gtk
48 {
49
50
51 /* The *_Class implementation: */
52
53 const Glib::Class& FontSelection_Class::init()
54 {
55   if(!gtype_) // create the GType if necessary
56   {
57     // Glib::Class has to know the class init function to clone custom types.
58     class_init_func_ = &FontSelection_Class::class_init_function;
59
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();
63
64     // Create the wrapper type, with the same class/instance size as the base type.
65     register_derived_type(gtk_font_selection_get_type());
66
67     // Add derived versions of interfaces, if the C type implements any interfaces:
68   }
69
70   return *this;
71 }
72
73 void FontSelection_Class::class_init_function(void* g_class, void* class_data)
74 {
75   BaseClassType *const klass = static_cast<BaseClassType*>(g_class);
76   CppClassParent::class_init_function(klass, class_data);
77
78 }
79
80
81 Glib::ObjectBase* FontSelection_Class::wrap_new(GObject* o)
82 {
83   return manage(new FontSelection((GtkFontSelection*)(o)));
84
85 }
86
87
88 /* The implementation: */
89
90 FontSelection::FontSelection(const Glib::ConstructParams& construct_params)
91 :
92   Gtk::VBox(construct_params)
93 {
94   }
95
96 FontSelection::FontSelection(GtkFontSelection* castitem)
97 :
98   Gtk::VBox((GtkVBox*)(castitem))
99 {
100   }
101
102 FontSelection::~FontSelection()
103 {
104   destroy_();
105 }
106
107 FontSelection::CppClassType FontSelection::fontselection_class_; // initialize static member
108
109 GType FontSelection::get_type()
110 {
111   return fontselection_class_.init().get_type();
112 }
113
114 GType FontSelection::get_base_type()
115 {
116   return gtk_font_selection_get_type();
117 }
118
119
120 FontSelection::FontSelection()
121 :
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()))
124 {
125   }
126
127 Glib::ustring FontSelection::get_font_name() const
128 {
129   return Glib::convert_return_gchar_ptr_to_ustring(gtk_font_selection_get_font_name(const_cast<GtkFontSelection*>(gobj())));
130 }
131
132 bool FontSelection::set_font_name(const Glib::ustring& fontname)
133 {
134   return gtk_font_selection_set_font_name(gobj(), fontname.c_str());
135 }
136
137 Glib::ustring FontSelection::get_preview_text() const
138 {
139   return Glib::convert_const_gchar_ptr_to_ustring(gtk_font_selection_get_preview_text(const_cast<GtkFontSelection*>(gobj())));
140 }
141
142 void FontSelection::set_preview_text(const Glib::ustring& fontname)
143 {
144   gtk_font_selection_set_preview_text(gobj(), fontname.c_str());
145 }
146
147 Entry* FontSelection::get_font_entry()
148 {
149   return Glib::wrap((GtkEntry*)(gobj()->font_entry));
150 }
151
152 const Entry* FontSelection::get_font_entry() const
153 {
154   return Glib::wrap((GtkEntry*)(gobj()->font_entry));
155 }
156
157 Entry* FontSelection::get_font_style_entry()
158 {
159   return Glib::wrap((GtkEntry*)(gobj()->font_style_entry));
160 }
161
162 const Entry* FontSelection::get_font_style_entry() const
163 {
164   return Glib::wrap((GtkEntry*)(gobj()->font_style_entry));
165 }
166
167 Entry* FontSelection::get_size_entry()
168 {
169   return Glib::wrap((GtkEntry*)(gobj()->size_entry));
170 }
171
172 const Entry* FontSelection::get_size_entry() const
173 {
174   return Glib::wrap((GtkEntry*)(gobj()->size_entry));
175 }
176
177 RadioButton* FontSelection::get_pixels_button()
178 {
179   return Glib::wrap((GtkRadioButton*)(gobj()->pixels_button));
180 }
181
182 const RadioButton* FontSelection::get_pixels_button() const
183 {
184   return Glib::wrap((GtkRadioButton*)(gobj()->pixels_button));
185 }
186
187 RadioButton* FontSelection::get_points_button()
188 {
189   return Glib::wrap((GtkRadioButton*)(gobj()->points_button));
190 }
191
192 const RadioButton* FontSelection::get_points_button() const
193 {
194   return Glib::wrap((GtkRadioButton*)(gobj()->points_button));
195 }
196
197 Button* FontSelection::get_filter_button()
198 {
199   return Glib::wrap((GtkButton*)(gobj()->filter_button));
200 }
201
202 const Button* FontSelection::get_filter_button() const
203 {
204   return Glib::wrap((GtkButton*)(gobj()->filter_button));
205 }
206
207 Entry* FontSelection::get_preview_entry()
208 {
209   return Glib::wrap((GtkEntry*)(gobj()->preview_entry));
210 }
211
212 const Entry* FontSelection::get_preview_entry() const
213 {
214   return Glib::wrap((GtkEntry*)(gobj()->preview_entry));
215 }
216
217
218 Glib::PropertyProxy<Glib::ustring> FontSelection::property_font_name() 
219 {
220   return Glib::PropertyProxy<Glib::ustring>(this, "font-name");
221 }
222
223 Glib::PropertyProxy_ReadOnly<Glib::ustring> FontSelection::property_font_name() const
224 {
225   return Glib::PropertyProxy_ReadOnly<Glib::ustring>(this, "font-name");
226 }
227
228 Glib::PropertyProxy<Glib::ustring> FontSelection::property_preview_text() 
229 {
230   return Glib::PropertyProxy<Glib::ustring>(this, "preview-text");
231 }
232
233 Glib::PropertyProxy_ReadOnly<Glib::ustring> FontSelection::property_preview_text() const
234 {
235   return Glib::PropertyProxy_ReadOnly<Glib::ustring>(this, "preview-text");
236 }
237
238
239 } // namespace Gtk
240
241
242 namespace Glib
243 {
244
245 Gtk::FontSelectionDialog* wrap(GtkFontSelectionDialog* object, bool take_copy)
246 {
247   return dynamic_cast<Gtk::FontSelectionDialog *> (Glib::wrap_auto ((GObject*)(object), take_copy));
248 }
249
250 } /* namespace Glib */
251
252 namespace Gtk
253 {
254
255
256 /* The *_Class implementation: */
257
258 const Glib::Class& FontSelectionDialog_Class::init()
259 {
260   if(!gtype_) // create the GType if necessary
261   {
262     // Glib::Class has to know the class init function to clone custom types.
263     class_init_func_ = &FontSelectionDialog_Class::class_init_function;
264
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();
268
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());
271
272     // Add derived versions of interfaces, if the C type implements any interfaces:
273   }
274
275   return *this;
276 }
277
278 void FontSelectionDialog_Class::class_init_function(void* g_class, void* class_data)
279 {
280   BaseClassType *const klass = static_cast<BaseClassType*>(g_class);
281   CppClassParent::class_init_function(klass, class_data);
282
283 }
284
285
286 Glib::ObjectBase* FontSelectionDialog_Class::wrap_new(GObject* o)
287 {
288   return new FontSelectionDialog((GtkFontSelectionDialog*)(o)); //top-level windows can not be manage()ed.
289
290 }
291
292
293 /* The implementation: */
294
295 FontSelectionDialog::FontSelectionDialog(const Glib::ConstructParams& construct_params)
296 :
297   Gtk::Dialog(construct_params)
298 {
299   }
300
301 FontSelectionDialog::FontSelectionDialog(GtkFontSelectionDialog* castitem)
302 :
303   Gtk::Dialog((GtkDialog*)(castitem))
304 {
305   }
306
307 FontSelectionDialog::~FontSelectionDialog()
308 {
309   destroy_();
310 }
311
312 FontSelectionDialog::CppClassType FontSelectionDialog::fontselectiondialog_class_; // initialize static member
313
314 GType FontSelectionDialog::get_type()
315 {
316   return fontselectiondialog_class_.init().get_type();
317 }
318
319 GType FontSelectionDialog::get_base_type()
320 {
321   return gtk_font_selection_dialog_get_type();
322 }
323
324 FontSelectionDialog::FontSelectionDialog()
325 :
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()))
328 {
329   }
330
331 FontSelectionDialog::FontSelectionDialog(const Glib::ustring& title)
332 :
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))
335 {
336   }
337
338 bool FontSelectionDialog::set_font_name(const Glib::ustring& fontname)
339 {
340   return gtk_font_selection_dialog_set_font_name(gobj(), fontname.c_str());
341 }
342
343 Glib::ustring FontSelectionDialog::get_font_name() const
344 {
345   return Glib::convert_return_gchar_ptr_to_ustring(gtk_font_selection_dialog_get_font_name(const_cast<GtkFontSelectionDialog*>(gobj())));
346 }
347
348 Glib::ustring FontSelectionDialog::get_preview_text() const
349 {
350   return Glib::convert_const_gchar_ptr_to_ustring(gtk_font_selection_dialog_get_preview_text(const_cast<GtkFontSelectionDialog*>(gobj())));
351 }
352
353 void FontSelectionDialog::set_preview_text(const Glib::ustring& fontname)
354 {
355   gtk_font_selection_dialog_set_preview_text(gobj(), fontname.c_str());
356 }
357
358 FontSelection* FontSelectionDialog::get_font_selection()
359 {
360   return Glib::wrap((GtkFontSelection*)(gobj()->fontsel));
361 }
362
363 const FontSelection* FontSelectionDialog::get_font_selection() const
364 {
365   return Glib::wrap((GtkFontSelection*)(gobj()->fontsel));
366 }
367
368 Button* FontSelectionDialog::get_ok_button()
369 {
370   return Glib::wrap((GtkButton*)(gobj()->ok_button));
371 }
372
373 const Button* FontSelectionDialog::get_ok_button() const
374 {
375   return Glib::wrap((GtkButton*)(gobj()->ok_button));
376 }
377
378 Button* FontSelectionDialog::get_apply_button()
379 {
380   return Glib::wrap((GtkButton*)(gobj()->apply_button));
381 }
382
383 const Button* FontSelectionDialog::get_apply_button() const
384 {
385   return Glib::wrap((GtkButton*)(gobj()->apply_button));
386 }
387
388 Button* FontSelectionDialog::get_cancel_button()
389 {
390   return Glib::wrap((GtkButton*)(gobj()->cancel_button));
391 }
392
393 const Button* FontSelectionDialog::get_cancel_button() const
394 {
395   return Glib::wrap((GtkButton*)(gobj()->cancel_button));
396 }
397
398
399 } // namespace Gtk
400
401