1 // Generated by gtkmmproc -- DO NOT MODIFY!
3 #include <libgnomecanvasmm/text.h>
4 #include <libgnomecanvasmm/private/text_p.h>
10 * Copyright (C) 1998 EMC Capital Management Inc.
11 * Developed by Havoc Pennington <hp@pobox.com>
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.
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.
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.
28 #include <gtk/gtksettings.h>
29 #include <glib-object.h>
32 _catch_xft_dpi (GObject* thing, gpointer val, gpointer arg)
34 GnomeCanvasText* text = (GnomeCanvasText*) arg;
37 g_object_get (G_OBJECT(text), "text", &txt, NULL);
39 if (txt && txt[0] != '\0') {
40 g_object_set (G_OBJECT(text), "text", txt, NULL);
50 Text::Text(Group& parentx, double x, double y, const Glib::ustring& text)
51 : Item(GNOME_CANVAS_ITEM(g_object_new(get_type(), 0)))
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());
58 Text::Text(Group& parentx)
59 : Item(GNOME_CANVAS_ITEM(g_object_new(get_type(), 0)))
61 item_construct(parentx);
62 g_signal_connect (gtk_settings_get_default(), "notify::gtk-xft-dpi", (GCallback) _catch_xft_dpi, gobj());
65 } /* namespace Canvas */
66 } /* namespace Gnome */
71 } // anonymous namespace
77 Gnome::Canvas::Text* wrap(GnomeCanvasText* object, bool take_copy)
79 return dynamic_cast<Gnome::Canvas::Text *> (Glib::wrap_auto ((GObject*)(object), take_copy));
82 } /* namespace Glib */
91 /* The *_Class implementation: */
93 const Glib::Class& Text_Class::init()
95 if(!gtype_) // create the GType if necessary
97 // Glib::Class has to know the class init function to clone custom types.
98 class_init_func_ = &Text_Class::class_init_function;
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();
104 // Create the wrapper type, with the same class/instance size as the base type.
105 register_derived_type(gnome_canvas_text_get_type());
107 // Add derived versions of interfaces, if the C type implements any interfaces:
113 void Text_Class::class_init_function(void* g_class, void* class_data)
115 BaseClassType *const klass = static_cast<BaseClassType*>(g_class);
116 CppClassParent::class_init_function(klass, class_data);
121 Glib::ObjectBase* Text_Class::wrap_new(GObject* o)
123 return manage(new Text((GnomeCanvasText*)(o)));
128 /* The implementation: */
130 Text::Text(const Glib::ConstructParams& construct_params)
132 Item(construct_params)
136 Text::Text(GnomeCanvasText* castitem)
138 Item((GnomeCanvasItem*)(castitem))
147 Text::CppClassType Text::text_class_; // initialize static member
149 GType Text::get_type()
151 return text_class_.init().get_type();
154 GType Text::get_base_type()
156 return gnome_canvas_text_get_type();
160 Glib::PropertyProxy<Glib::ustring> Text::property_text()
162 return Glib::PropertyProxy<Glib::ustring>(this, "text");
165 Glib::PropertyProxy_ReadOnly<Glib::ustring> Text::property_text() const
167 return Glib::PropertyProxy_ReadOnly<Glib::ustring>(this, "text");
170 Glib::PropertyProxy_WriteOnly<Glib::ustring> Text::property_markup()
172 return Glib::PropertyProxy_WriteOnly<Glib::ustring>(this, "markup");
175 Glib::PropertyProxy_ReadOnly<Glib::ustring> Text::property_markup() const
177 return Glib::PropertyProxy_ReadOnly<Glib::ustring>(this, "markup");
180 Glib::PropertyProxy<double> Text::property_x()
182 return Glib::PropertyProxy<double>(this, "x");
185 Glib::PropertyProxy_ReadOnly<double> Text::property_x() const
187 return Glib::PropertyProxy_ReadOnly<double>(this, "x");
190 Glib::PropertyProxy<double> Text::property_y()
192 return Glib::PropertyProxy<double>(this, "y");
195 Glib::PropertyProxy_ReadOnly<double> Text::property_y() const
197 return Glib::PropertyProxy_ReadOnly<double>(this, "y");
200 Glib::PropertyProxy<Glib::ustring> Text::property_font()
202 return Glib::PropertyProxy<Glib::ustring>(this, "font");
205 Glib::PropertyProxy_ReadOnly<Glib::ustring> Text::property_font() const
207 return Glib::PropertyProxy_ReadOnly<Glib::ustring>(this, "font");
210 Glib::PropertyProxy<Pango::FontDescription> Text::property_font_desc()
212 return Glib::PropertyProxy<Pango::FontDescription>(this, "font-desc");
215 Glib::PropertyProxy_ReadOnly<Pango::FontDescription> Text::property_font_desc() const
217 return Glib::PropertyProxy_ReadOnly<Pango::FontDescription>(this, "font-desc");
220 Glib::PropertyProxy<Glib::ustring> Text::property_family()
222 return Glib::PropertyProxy<Glib::ustring>(this, "family");
225 Glib::PropertyProxy_ReadOnly<Glib::ustring> Text::property_family() const
227 return Glib::PropertyProxy_ReadOnly<Glib::ustring>(this, "family");
230 Glib::PropertyProxy<bool> Text::property_family_set()
232 return Glib::PropertyProxy<bool>(this, "family-set");
235 Glib::PropertyProxy_ReadOnly<bool> Text::property_family_set() const
237 return Glib::PropertyProxy_ReadOnly<bool>(this, "family-set");
240 Glib::PropertyProxy<Pango::AttrList> Text::property_attributes()
242 return Glib::PropertyProxy<Pango::AttrList>(this, "attributes");
245 Glib::PropertyProxy_ReadOnly<Pango::AttrList> Text::property_attributes() const
247 return Glib::PropertyProxy_ReadOnly<Pango::AttrList>(this, "attributes");
250 Glib::PropertyProxy<Pango::Style> Text::property_style()
252 return Glib::PropertyProxy<Pango::Style>(this, "style");
255 Glib::PropertyProxy_ReadOnly<Pango::Style> Text::property_style() const
257 return Glib::PropertyProxy_ReadOnly<Pango::Style>(this, "style");
260 Glib::PropertyProxy<bool> Text::property_style_set()
262 return Glib::PropertyProxy<bool>(this, "style-set");
265 Glib::PropertyProxy_ReadOnly<bool> Text::property_style_set() const
267 return Glib::PropertyProxy_ReadOnly<bool>(this, "style-set");
270 Glib::PropertyProxy<Pango::Variant> Text::property_variant()
272 return Glib::PropertyProxy<Pango::Variant>(this, "variant");
275 Glib::PropertyProxy_ReadOnly<Pango::Variant> Text::property_variant() const
277 return Glib::PropertyProxy_ReadOnly<Pango::Variant>(this, "variant");
280 Glib::PropertyProxy<bool> Text::property_variant_set()
282 return Glib::PropertyProxy<bool>(this, "variant-set");
285 Glib::PropertyProxy_ReadOnly<bool> Text::property_variant_set() const
287 return Glib::PropertyProxy_ReadOnly<bool>(this, "variant-set");
290 Glib::PropertyProxy<int> Text::property_weight()
292 return Glib::PropertyProxy<int>(this, "weight");
295 Glib::PropertyProxy_ReadOnly<int> Text::property_weight() const
297 return Glib::PropertyProxy_ReadOnly<int>(this, "weight");
300 Glib::PropertyProxy<bool> Text::property_weight_set()
302 return Glib::PropertyProxy<bool>(this, "weight-set");
305 Glib::PropertyProxy_ReadOnly<bool> Text::property_weight_set() const
307 return Glib::PropertyProxy_ReadOnly<bool>(this, "weight-set");
310 Glib::PropertyProxy<Pango::Weight> Text::property_stretch()
312 return Glib::PropertyProxy<Pango::Weight>(this, "stretch");
315 Glib::PropertyProxy_ReadOnly<Pango::Weight> Text::property_stretch() const
317 return Glib::PropertyProxy_ReadOnly<Pango::Weight>(this, "stretch");
320 Glib::PropertyProxy<bool> Text::property_stretch_set()
322 return Glib::PropertyProxy<bool>(this, "stretch-set");
325 Glib::PropertyProxy_ReadOnly<bool> Text::property_stretch_set() const
327 return Glib::PropertyProxy_ReadOnly<bool>(this, "stretch-set");
330 Glib::PropertyProxy<int> Text::property_size()
332 return Glib::PropertyProxy<int>(this, "size");
335 Glib::PropertyProxy_ReadOnly<int> Text::property_size() const
337 return Glib::PropertyProxy_ReadOnly<int>(this, "size");
340 Glib::PropertyProxy<bool> Text::property_size_set()
342 return Glib::PropertyProxy<bool>(this, "size-set");
345 Glib::PropertyProxy_ReadOnly<bool> Text::property_size_set() const
347 return Glib::PropertyProxy_ReadOnly<bool>(this, "size-set");
350 Glib::PropertyProxy<double> Text::property_size_points()
352 return Glib::PropertyProxy<double>(this, "size-points");
355 Glib::PropertyProxy_ReadOnly<double> Text::property_size_points() const
357 return Glib::PropertyProxy_ReadOnly<double>(this, "size-points");
360 Glib::PropertyProxy<bool> Text::property_strikethrough()
362 return Glib::PropertyProxy<bool>(this, "strikethrough");
365 Glib::PropertyProxy_ReadOnly<bool> Text::property_strikethrough() const
367 return Glib::PropertyProxy_ReadOnly<bool>(this, "strikethrough");
370 Glib::PropertyProxy<bool> Text::property_strikethrough_set()
372 return Glib::PropertyProxy<bool>(this, "strikethrough-set");
375 Glib::PropertyProxy_ReadOnly<bool> Text::property_strikethrough_set() const
377 return Glib::PropertyProxy_ReadOnly<bool>(this, "strikethrough-set");
380 Glib::PropertyProxy<Pango::Underline> Text::property_underline()
382 return Glib::PropertyProxy<Pango::Underline>(this, "underline");
385 Glib::PropertyProxy_ReadOnly<Pango::Underline> Text::property_underline() const
387 return Glib::PropertyProxy_ReadOnly<Pango::Underline>(this, "underline");
390 Glib::PropertyProxy<bool> Text::property_underline_set()
392 return Glib::PropertyProxy<bool>(this, "underline-set");
395 Glib::PropertyProxy_ReadOnly<bool> Text::property_underline_set() const
397 return Glib::PropertyProxy_ReadOnly<bool>(this, "underline-set");
400 Glib::PropertyProxy<int> Text::property_rise()
402 return Glib::PropertyProxy<int>(this, "rise");
405 Glib::PropertyProxy_ReadOnly<int> Text::property_rise() const
407 return Glib::PropertyProxy_ReadOnly<int>(this, "rise");
410 Glib::PropertyProxy<bool> Text::property_rise_set()
412 return Glib::PropertyProxy<bool>(this, "rise-set");
415 Glib::PropertyProxy_ReadOnly<bool> Text::property_rise_set() const
417 return Glib::PropertyProxy_ReadOnly<bool>(this, "rise-set");
420 Glib::PropertyProxy<double> Text::property_scale()
422 return Glib::PropertyProxy<double>(this, "scale");
425 Glib::PropertyProxy_ReadOnly<double> Text::property_scale() const
427 return Glib::PropertyProxy_ReadOnly<double>(this, "scale");
430 Glib::PropertyProxy<bool> Text::property_scale_set()
432 return Glib::PropertyProxy<bool>(this, "scale-set");
435 Glib::PropertyProxy_ReadOnly<bool> Text::property_scale_set() const
437 return Glib::PropertyProxy_ReadOnly<bool>(this, "scale-set");
440 Glib::PropertyProxy<Gtk::AnchorType> Text::property_anchor()
442 return Glib::PropertyProxy<Gtk::AnchorType>(this, "anchor");
445 Glib::PropertyProxy_ReadOnly<Gtk::AnchorType> Text::property_anchor() const
447 return Glib::PropertyProxy_ReadOnly<Gtk::AnchorType>(this, "anchor");
450 Glib::PropertyProxy<Gtk::Justification> Text::property_justification()
452 return Glib::PropertyProxy<Gtk::Justification>(this, "justification");
455 Glib::PropertyProxy_ReadOnly<Gtk::Justification> Text::property_justification() const
457 return Glib::PropertyProxy_ReadOnly<Gtk::Justification>(this, "justification");
460 Glib::PropertyProxy<double> Text::property_clip_width()
462 return Glib::PropertyProxy<double>(this, "clip-width");
465 Glib::PropertyProxy_ReadOnly<double> Text::property_clip_width() const
467 return Glib::PropertyProxy_ReadOnly<double>(this, "clip-width");
470 Glib::PropertyProxy<double> Text::property_clip_height()
472 return Glib::PropertyProxy<double>(this, "clip-height");
475 Glib::PropertyProxy_ReadOnly<double> Text::property_clip_height() const
477 return Glib::PropertyProxy_ReadOnly<double>(this, "clip-height");
480 Glib::PropertyProxy<bool> Text::property_clip()
482 return Glib::PropertyProxy<bool>(this, "clip");
485 Glib::PropertyProxy_ReadOnly<bool> Text::property_clip() const
487 return Glib::PropertyProxy_ReadOnly<bool>(this, "clip");
490 Glib::PropertyProxy<double> Text::property_x_offset()
492 return Glib::PropertyProxy<double>(this, "x-offset");
495 Glib::PropertyProxy_ReadOnly<double> Text::property_x_offset() const
497 return Glib::PropertyProxy_ReadOnly<double>(this, "x-offset");
500 Glib::PropertyProxy<double> Text::property_y_offset()
502 return Glib::PropertyProxy<double>(this, "y-offset");
505 Glib::PropertyProxy_ReadOnly<double> Text::property_y_offset() const
507 return Glib::PropertyProxy_ReadOnly<double>(this, "y-offset");
510 Glib::PropertyProxy<Glib::ustring> Text::property_fill_color()
512 return Glib::PropertyProxy<Glib::ustring>(this, "fill-color");
515 Glib::PropertyProxy_ReadOnly<Glib::ustring> Text::property_fill_color() const
517 return Glib::PropertyProxy_ReadOnly<Glib::ustring>(this, "fill-color");
520 Glib::PropertyProxy<Gdk::Color> Text::property_fill_color_gdk()
522 return Glib::PropertyProxy<Gdk::Color>(this, "fill-color-gdk");
525 Glib::PropertyProxy_ReadOnly<Gdk::Color> Text::property_fill_color_gdk() const
527 return Glib::PropertyProxy_ReadOnly<Gdk::Color>(this, "fill-color-gdk");
530 Glib::PropertyProxy<guint> Text::property_fill_color_rgba()
532 return Glib::PropertyProxy<guint>(this, "fill-color-rgba");
535 Glib::PropertyProxy_ReadOnly<guint> Text::property_fill_color_rgba() const
537 return Glib::PropertyProxy_ReadOnly<guint>(this, "fill-color-rgba");
540 Glib::PropertyProxy< Glib::RefPtr<Gdk::Bitmap> > Text::property_fill_stipple()
542 return Glib::PropertyProxy< Glib::RefPtr<Gdk::Bitmap> >(this, "fill-stipple");
545 Glib::PropertyProxy_ReadOnly< Glib::RefPtr<Gdk::Bitmap> > Text::property_fill_stipple() const
547 return Glib::PropertyProxy_ReadOnly< Glib::RefPtr<Gdk::Bitmap> >(this, "fill-stipple");
550 Glib::PropertyProxy<double> Text::property_text_width()
552 return Glib::PropertyProxy<double>(this, "text-width");
555 Glib::PropertyProxy_ReadOnly<double> Text::property_text_width() const
557 return Glib::PropertyProxy_ReadOnly<double>(this, "text-width");
560 Glib::PropertyProxy<double> Text::property_text_height()
562 return Glib::PropertyProxy<double>(this, "text-height");
565 Glib::PropertyProxy_ReadOnly<double> Text::property_text_height() const
567 return Glib::PropertyProxy_ReadOnly<double>(this, "text-height");
571 } // namespace Canvas