Only show user-presets in favorite sidebar
[ardour.git] / libgnomecanvasmm / text.cc
1 // Generated by gtkmmproc -- DO NOT MODIFY!
2
3 #include <libgnomecanvasmm/text.h>
4 #include <libgnomecanvasmm/private/text_p.h>
5
6 /* $Id$ */
7
8 /* text.cc
9  *
10  * Copyright (C) 1998 EMC Capital Management Inc.
11  * Developed by Havoc Pennington <hp@pobox.com>
12  *
13  * This library is free software; you can redistribute it and/or
14  * modify it under the terms of the GNU Library General Public
15  * License as published by the Free Software Foundation; either
16  * version 2 of the License, or (at your option) any later version.
17  *
18  * This library is distributed in the hope that it will be useful,
19  * but WITHOUT ANY WARRANTY; without even the implied warranty of
20  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
21  * Library General Public License for more details.
22  *
23  * You should have received a copy of the GNU Library General Public
24  * License along with this library; if not, write to the Free
25  * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
26  */
27
28 #include <gtk/gtksettings.h>
29 #include <glib-object.h>
30
31 static void 
32 _catch_xft_dpi (GObject* thing, gpointer val, gpointer arg)
33 {
34         GnomeCanvasText* text = (GnomeCanvasText*) arg;
35         gchar *txt;
36
37         g_object_get (G_OBJECT(text), "text", &txt, NULL);
38
39         if (txt && txt[0] != '\0') {
40                 g_object_set (G_OBJECT(text), "text", txt, NULL);
41         }
42 }
43
44 namespace Gnome
45 {
46
47 namespace Canvas
48 {
49
50 Text::Text(Group& parentx, double x, double y, const Glib::ustring& text)
51   : Item(GNOME_CANVAS_ITEM(g_object_new(get_type(), 0)))
52 {
53   item_construct(parentx);
54   set("x", x, "y", y, "text", text.c_str(), 0);
55   g_signal_connect (gtk_settings_get_default(), "notify::gtk-xft-dpi", (GCallback) _catch_xft_dpi, gobj());
56 }
57
58 Text::Text(Group& parentx)
59   : Item(GNOME_CANVAS_ITEM(g_object_new(get_type(), 0)))
60 {
61   item_construct(parentx);
62   g_signal_connect (gtk_settings_get_default(), "notify::gtk-xft-dpi", (GCallback) _catch_xft_dpi, gobj());
63 }
64
65 } /* namespace Canvas */
66 } /* namespace Gnome */
67
68
69 namespace
70 {
71 } // anonymous namespace
72
73
74 namespace Glib
75 {
76
77 Gnome::Canvas::Text* wrap(GnomeCanvasText* object, bool take_copy)
78 {
79   return dynamic_cast<Gnome::Canvas::Text *> (Glib::wrap_auto ((GObject*)(object), take_copy));
80 }
81
82 } /* namespace Glib */
83
84 namespace Gnome
85 {
86
87 namespace Canvas
88 {
89
90
91 /* The *_Class implementation: */
92
93 const Glib::Class& Text_Class::init()
94 {
95   if(!gtype_) // create the GType if necessary
96   {
97     // Glib::Class has to know the class init function to clone custom types.
98     class_init_func_ = &Text_Class::class_init_function;
99
100     // This is actually just optimized away, apparently with no harm.
101     // Make sure that the parent type has been created.
102     //CppClassParent::CppObjectType::get_type();
103
104     // Create the wrapper type, with the same class/instance size as the base type.
105     register_derived_type(gnome_canvas_text_get_type());
106
107     // Add derived versions of interfaces, if the C type implements any interfaces:
108   }
109
110   return *this;
111 }
112
113 void Text_Class::class_init_function(void* g_class, void* class_data)
114 {
115   BaseClassType *const klass = static_cast<BaseClassType*>(g_class);
116   CppClassParent::class_init_function(klass, class_data);
117
118 }
119
120
121 Glib::ObjectBase* Text_Class::wrap_new(GObject* o)
122 {
123   return manage(new Text((GnomeCanvasText*)(o)));
124
125 }
126
127
128 /* The implementation: */
129
130 Text::Text(const Glib::ConstructParams& construct_params)
131 :
132   Item(construct_params)
133 {
134 }
135
136 Text::Text(GnomeCanvasText* castitem)
137 :
138   Item((GnomeCanvasItem*)(castitem))
139 {
140 }
141
142 Text::~Text()
143 {
144   destroy_();
145 }
146
147 Text::CppClassType Text::text_class_; // initialize static member
148
149 GType Text::get_type()
150 {
151   return text_class_.init().get_type();
152 }
153
154 GType Text::get_base_type()
155 {
156   return gnome_canvas_text_get_type();
157 }
158
159
160 Glib::PropertyProxy<Glib::ustring> Text::property_text() 
161 {
162   return Glib::PropertyProxy<Glib::ustring>(this, "text");
163 }
164
165 Glib::PropertyProxy_ReadOnly<Glib::ustring> Text::property_text() const
166 {
167   return Glib::PropertyProxy_ReadOnly<Glib::ustring>(this, "text");
168 }
169
170 Glib::PropertyProxy_WriteOnly<Glib::ustring> Text::property_markup() 
171 {
172   return Glib::PropertyProxy_WriteOnly<Glib::ustring>(this, "markup");
173 }
174
175 Glib::PropertyProxy_ReadOnly<Glib::ustring> Text::property_markup() const
176 {
177   return Glib::PropertyProxy_ReadOnly<Glib::ustring>(this, "markup");
178 }
179
180 Glib::PropertyProxy<double> Text::property_x() 
181 {
182   return Glib::PropertyProxy<double>(this, "x");
183 }
184
185 Glib::PropertyProxy_ReadOnly<double> Text::property_x() const
186 {
187   return Glib::PropertyProxy_ReadOnly<double>(this, "x");
188 }
189
190 Glib::PropertyProxy<double> Text::property_y() 
191 {
192   return Glib::PropertyProxy<double>(this, "y");
193 }
194
195 Glib::PropertyProxy_ReadOnly<double> Text::property_y() const
196 {
197   return Glib::PropertyProxy_ReadOnly<double>(this, "y");
198 }
199
200 Glib::PropertyProxy<Glib::ustring> Text::property_font() 
201 {
202   return Glib::PropertyProxy<Glib::ustring>(this, "font");
203 }
204
205 Glib::PropertyProxy_ReadOnly<Glib::ustring> Text::property_font() const
206 {
207   return Glib::PropertyProxy_ReadOnly<Glib::ustring>(this, "font");
208 }
209
210 Glib::PropertyProxy<Pango::FontDescription> Text::property_font_desc() 
211 {
212   return Glib::PropertyProxy<Pango::FontDescription>(this, "font-desc");
213 }
214
215 Glib::PropertyProxy_ReadOnly<Pango::FontDescription> Text::property_font_desc() const
216 {
217   return Glib::PropertyProxy_ReadOnly<Pango::FontDescription>(this, "font-desc");
218 }
219
220 Glib::PropertyProxy<Glib::ustring> Text::property_family() 
221 {
222   return Glib::PropertyProxy<Glib::ustring>(this, "family");
223 }
224
225 Glib::PropertyProxy_ReadOnly<Glib::ustring> Text::property_family() const
226 {
227   return Glib::PropertyProxy_ReadOnly<Glib::ustring>(this, "family");
228 }
229
230 Glib::PropertyProxy<bool> Text::property_family_set() 
231 {
232   return Glib::PropertyProxy<bool>(this, "family-set");
233 }
234
235 Glib::PropertyProxy_ReadOnly<bool> Text::property_family_set() const
236 {
237   return Glib::PropertyProxy_ReadOnly<bool>(this, "family-set");
238 }
239
240 Glib::PropertyProxy<Pango::AttrList> Text::property_attributes() 
241 {
242   return Glib::PropertyProxy<Pango::AttrList>(this, "attributes");
243 }
244
245 Glib::PropertyProxy_ReadOnly<Pango::AttrList> Text::property_attributes() const
246 {
247   return Glib::PropertyProxy_ReadOnly<Pango::AttrList>(this, "attributes");
248 }
249
250 Glib::PropertyProxy<Pango::Style> Text::property_style() 
251 {
252   return Glib::PropertyProxy<Pango::Style>(this, "style");
253 }
254
255 Glib::PropertyProxy_ReadOnly<Pango::Style> Text::property_style() const
256 {
257   return Glib::PropertyProxy_ReadOnly<Pango::Style>(this, "style");
258 }
259
260 Glib::PropertyProxy<bool> Text::property_style_set() 
261 {
262   return Glib::PropertyProxy<bool>(this, "style-set");
263 }
264
265 Glib::PropertyProxy_ReadOnly<bool> Text::property_style_set() const
266 {
267   return Glib::PropertyProxy_ReadOnly<bool>(this, "style-set");
268 }
269
270 Glib::PropertyProxy<Pango::Variant> Text::property_variant() 
271 {
272   return Glib::PropertyProxy<Pango::Variant>(this, "variant");
273 }
274
275 Glib::PropertyProxy_ReadOnly<Pango::Variant> Text::property_variant() const
276 {
277   return Glib::PropertyProxy_ReadOnly<Pango::Variant>(this, "variant");
278 }
279
280 Glib::PropertyProxy<bool> Text::property_variant_set() 
281 {
282   return Glib::PropertyProxy<bool>(this, "variant-set");
283 }
284
285 Glib::PropertyProxy_ReadOnly<bool> Text::property_variant_set() const
286 {
287   return Glib::PropertyProxy_ReadOnly<bool>(this, "variant-set");
288 }
289
290 Glib::PropertyProxy<int> Text::property_weight() 
291 {
292   return Glib::PropertyProxy<int>(this, "weight");
293 }
294
295 Glib::PropertyProxy_ReadOnly<int> Text::property_weight() const
296 {
297   return Glib::PropertyProxy_ReadOnly<int>(this, "weight");
298 }
299
300 Glib::PropertyProxy<bool> Text::property_weight_set() 
301 {
302   return Glib::PropertyProxy<bool>(this, "weight-set");
303 }
304
305 Glib::PropertyProxy_ReadOnly<bool> Text::property_weight_set() const
306 {
307   return Glib::PropertyProxy_ReadOnly<bool>(this, "weight-set");
308 }
309
310 Glib::PropertyProxy<Pango::Weight> Text::property_stretch() 
311 {
312   return Glib::PropertyProxy<Pango::Weight>(this, "stretch");
313 }
314
315 Glib::PropertyProxy_ReadOnly<Pango::Weight> Text::property_stretch() const
316 {
317   return Glib::PropertyProxy_ReadOnly<Pango::Weight>(this, "stretch");
318 }
319
320 Glib::PropertyProxy<bool> Text::property_stretch_set() 
321 {
322   return Glib::PropertyProxy<bool>(this, "stretch-set");
323 }
324
325 Glib::PropertyProxy_ReadOnly<bool> Text::property_stretch_set() const
326 {
327   return Glib::PropertyProxy_ReadOnly<bool>(this, "stretch-set");
328 }
329
330 Glib::PropertyProxy<int> Text::property_size() 
331 {
332   return Glib::PropertyProxy<int>(this, "size");
333 }
334
335 Glib::PropertyProxy_ReadOnly<int> Text::property_size() const
336 {
337   return Glib::PropertyProxy_ReadOnly<int>(this, "size");
338 }
339
340 Glib::PropertyProxy<bool> Text::property_size_set() 
341 {
342   return Glib::PropertyProxy<bool>(this, "size-set");
343 }
344
345 Glib::PropertyProxy_ReadOnly<bool> Text::property_size_set() const
346 {
347   return Glib::PropertyProxy_ReadOnly<bool>(this, "size-set");
348 }
349
350 Glib::PropertyProxy<double> Text::property_size_points() 
351 {
352   return Glib::PropertyProxy<double>(this, "size-points");
353 }
354
355 Glib::PropertyProxy_ReadOnly<double> Text::property_size_points() const
356 {
357   return Glib::PropertyProxy_ReadOnly<double>(this, "size-points");
358 }
359
360 Glib::PropertyProxy<bool> Text::property_strikethrough() 
361 {
362   return Glib::PropertyProxy<bool>(this, "strikethrough");
363 }
364
365 Glib::PropertyProxy_ReadOnly<bool> Text::property_strikethrough() const
366 {
367   return Glib::PropertyProxy_ReadOnly<bool>(this, "strikethrough");
368 }
369
370 Glib::PropertyProxy<bool> Text::property_strikethrough_set() 
371 {
372   return Glib::PropertyProxy<bool>(this, "strikethrough-set");
373 }
374
375 Glib::PropertyProxy_ReadOnly<bool> Text::property_strikethrough_set() const
376 {
377   return Glib::PropertyProxy_ReadOnly<bool>(this, "strikethrough-set");
378 }
379
380 Glib::PropertyProxy<Pango::Underline> Text::property_underline() 
381 {
382   return Glib::PropertyProxy<Pango::Underline>(this, "underline");
383 }
384
385 Glib::PropertyProxy_ReadOnly<Pango::Underline> Text::property_underline() const
386 {
387   return Glib::PropertyProxy_ReadOnly<Pango::Underline>(this, "underline");
388 }
389
390 Glib::PropertyProxy<bool> Text::property_underline_set() 
391 {
392   return Glib::PropertyProxy<bool>(this, "underline-set");
393 }
394
395 Glib::PropertyProxy_ReadOnly<bool> Text::property_underline_set() const
396 {
397   return Glib::PropertyProxy_ReadOnly<bool>(this, "underline-set");
398 }
399
400 Glib::PropertyProxy<int> Text::property_rise() 
401 {
402   return Glib::PropertyProxy<int>(this, "rise");
403 }
404
405 Glib::PropertyProxy_ReadOnly<int> Text::property_rise() const
406 {
407   return Glib::PropertyProxy_ReadOnly<int>(this, "rise");
408 }
409
410 Glib::PropertyProxy<bool> Text::property_rise_set() 
411 {
412   return Glib::PropertyProxy<bool>(this, "rise-set");
413 }
414
415 Glib::PropertyProxy_ReadOnly<bool> Text::property_rise_set() const
416 {
417   return Glib::PropertyProxy_ReadOnly<bool>(this, "rise-set");
418 }
419
420 Glib::PropertyProxy<double> Text::property_scale() 
421 {
422   return Glib::PropertyProxy<double>(this, "scale");
423 }
424
425 Glib::PropertyProxy_ReadOnly<double> Text::property_scale() const
426 {
427   return Glib::PropertyProxy_ReadOnly<double>(this, "scale");
428 }
429
430 Glib::PropertyProxy<bool> Text::property_scale_set() 
431 {
432   return Glib::PropertyProxy<bool>(this, "scale-set");
433 }
434
435 Glib::PropertyProxy_ReadOnly<bool> Text::property_scale_set() const
436 {
437   return Glib::PropertyProxy_ReadOnly<bool>(this, "scale-set");
438 }
439
440 Glib::PropertyProxy<Gtk::AnchorType> Text::property_anchor() 
441 {
442   return Glib::PropertyProxy<Gtk::AnchorType>(this, "anchor");
443 }
444
445 Glib::PropertyProxy_ReadOnly<Gtk::AnchorType> Text::property_anchor() const
446 {
447   return Glib::PropertyProxy_ReadOnly<Gtk::AnchorType>(this, "anchor");
448 }
449
450 Glib::PropertyProxy<Gtk::Justification> Text::property_justification() 
451 {
452   return Glib::PropertyProxy<Gtk::Justification>(this, "justification");
453 }
454
455 Glib::PropertyProxy_ReadOnly<Gtk::Justification> Text::property_justification() const
456 {
457   return Glib::PropertyProxy_ReadOnly<Gtk::Justification>(this, "justification");
458 }
459
460 Glib::PropertyProxy<double> Text::property_clip_width() 
461 {
462   return Glib::PropertyProxy<double>(this, "clip-width");
463 }
464
465 Glib::PropertyProxy_ReadOnly<double> Text::property_clip_width() const
466 {
467   return Glib::PropertyProxy_ReadOnly<double>(this, "clip-width");
468 }
469
470 Glib::PropertyProxy<double> Text::property_clip_height() 
471 {
472   return Glib::PropertyProxy<double>(this, "clip-height");
473 }
474
475 Glib::PropertyProxy_ReadOnly<double> Text::property_clip_height() const
476 {
477   return Glib::PropertyProxy_ReadOnly<double>(this, "clip-height");
478 }
479
480 Glib::PropertyProxy<bool> Text::property_clip() 
481 {
482   return Glib::PropertyProxy<bool>(this, "clip");
483 }
484
485 Glib::PropertyProxy_ReadOnly<bool> Text::property_clip() const
486 {
487   return Glib::PropertyProxy_ReadOnly<bool>(this, "clip");
488 }
489
490 Glib::PropertyProxy<double> Text::property_x_offset() 
491 {
492   return Glib::PropertyProxy<double>(this, "x-offset");
493 }
494
495 Glib::PropertyProxy_ReadOnly<double> Text::property_x_offset() const
496 {
497   return Glib::PropertyProxy_ReadOnly<double>(this, "x-offset");
498 }
499
500 Glib::PropertyProxy<double> Text::property_y_offset() 
501 {
502   return Glib::PropertyProxy<double>(this, "y-offset");
503 }
504
505 Glib::PropertyProxy_ReadOnly<double> Text::property_y_offset() const
506 {
507   return Glib::PropertyProxy_ReadOnly<double>(this, "y-offset");
508 }
509
510 Glib::PropertyProxy<Glib::ustring> Text::property_fill_color() 
511 {
512   return Glib::PropertyProxy<Glib::ustring>(this, "fill-color");
513 }
514
515 Glib::PropertyProxy_ReadOnly<Glib::ustring> Text::property_fill_color() const
516 {
517   return Glib::PropertyProxy_ReadOnly<Glib::ustring>(this, "fill-color");
518 }
519
520 Glib::PropertyProxy<Gdk::Color> Text::property_fill_color_gdk() 
521 {
522   return Glib::PropertyProxy<Gdk::Color>(this, "fill-color-gdk");
523 }
524
525 Glib::PropertyProxy_ReadOnly<Gdk::Color> Text::property_fill_color_gdk() const
526 {
527   return Glib::PropertyProxy_ReadOnly<Gdk::Color>(this, "fill-color-gdk");
528 }
529
530 Glib::PropertyProxy<guint> Text::property_fill_color_rgba() 
531 {
532   return Glib::PropertyProxy<guint>(this, "fill-color-rgba");
533 }
534
535 Glib::PropertyProxy_ReadOnly<guint> Text::property_fill_color_rgba() const
536 {
537   return Glib::PropertyProxy_ReadOnly<guint>(this, "fill-color-rgba");
538 }
539
540 Glib::PropertyProxy< Glib::RefPtr<Gdk::Bitmap> > Text::property_fill_stipple() 
541 {
542   return Glib::PropertyProxy< Glib::RefPtr<Gdk::Bitmap> >(this, "fill-stipple");
543 }
544
545 Glib::PropertyProxy_ReadOnly< Glib::RefPtr<Gdk::Bitmap> > Text::property_fill_stipple() const
546 {
547   return Glib::PropertyProxy_ReadOnly< Glib::RefPtr<Gdk::Bitmap> >(this, "fill-stipple");
548 }
549
550 Glib::PropertyProxy<double> Text::property_text_width() 
551 {
552   return Glib::PropertyProxy<double>(this, "text-width");
553 }
554
555 Glib::PropertyProxy_ReadOnly<double> Text::property_text_width() const
556 {
557   return Glib::PropertyProxy_ReadOnly<double>(this, "text-width");
558 }
559
560 Glib::PropertyProxy<double> Text::property_text_height() 
561 {
562   return Glib::PropertyProxy<double>(this, "text-height");
563 }
564
565 Glib::PropertyProxy_ReadOnly<double> Text::property_text_height() const
566 {
567   return Glib::PropertyProxy_ReadOnly<double>(this, "text-height");
568 }
569
570
571 } // namespace Canvas
572
573 } // namespace Gnome
574
575