1 // Generated by gmmproc 2.40.0 -- DO NOT MODIFY!
2 
3 
4 #include <glibmm.h>
5 
6 #include <cluttermm/text.h>
7 #include <cluttermm/private/text_p.h>
8 
9 
10 /*
11  * Copyright (c) 2009  The cluttermm Development Team
12  *
13  * This library is free software; you can redistribute it and/or
14  * modify it under the terms of the GNU Lesser 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  * Lesser General Public License for more details.
22  *
23  * You should have received a copy of the GNU Lesser General Public
24  * License along with this library. If not, see <http://www.gnu.org/licenses/>.
25  */
26 
27 #include <clutter/clutter.h>
28 #include <cluttermm/color.h>
29 #include <cluttermm/text-buffer.h>
30 
31 namespace Clutter
32 {
33 
get_color() const34 Color Text::get_color() const
35 {
36   Color color;
37   clutter_text_get_color(const_cast<ClutterText*>(gobj()), color.gobj());
38   return color;
39 }
40 
get_selection_color() const41 Color Text::get_selection_color() const
42 {
43   Color color;
44   clutter_text_get_selection_color(const_cast<ClutterText*>(gobj()), color.gobj());
45   return color;
46 }
47 
get_cursor_color() const48 Color Text::get_cursor_color() const
49 {
50   Color color;
51   clutter_text_get_cursor_color(const_cast<ClutterText*>(gobj()), color.gobj());
52   return color;
53 }
54 
get_selected_text_color() const55 Color Text::get_selected_text_color() const
56 {
57   Color color;
58   clutter_text_get_selected_text_color(const_cast<ClutterText*>(gobj()), color.gobj());
59   return color;
60 }
61 
get_cursor_rect() const62 Rect Text::get_cursor_rect() const
63 {
64   Rect rect;
65   clutter_text_get_cursor_rect(const_cast<ClutterText*>(gobj()), rect.gobj());
66   return rect;
67 }
68 
69 
70 } // namespace Clutter
71 
72 namespace
73 {
74 
75 
76 static const Glib::SignalProxyInfo Text_signal_activate_info =
77 {
78   "activate",
79   (GCallback) &Glib::SignalProxyNormal::slot0_void_callback,
80   (GCallback) &Glib::SignalProxyNormal::slot0_void_callback
81 };
82 
83 
84 static const Glib::SignalProxyInfo Text_signal_text_changed_info =
85 {
86   "text_changed",
87   (GCallback) &Glib::SignalProxyNormal::slot0_void_callback,
88   (GCallback) &Glib::SignalProxyNormal::slot0_void_callback
89 };
90 
91 
92 static const Glib::SignalProxyInfo Text_signal_cursor_changed_info =
93 {
94   "cursor_changed",
95   (GCallback) &Glib::SignalProxyNormal::slot0_void_callback,
96   (GCallback) &Glib::SignalProxyNormal::slot0_void_callback
97 };
98 
99 
100 } // anonymous namespace
101 
102 
103 namespace Glib
104 {
105 
wrap(ClutterText * object,bool take_copy)106 Glib::RefPtr<Clutter::Text> wrap(ClutterText* object, bool take_copy)
107 {
108   return Glib::RefPtr<Clutter::Text>( dynamic_cast<Clutter::Text*> (Glib::wrap_auto ((GObject*)(object), take_copy)) );
109   //We use dynamic_cast<> in case of multiple inheritance.
110 }
111 
112 } /* namespace Glib */
113 
114 
115 namespace Clutter
116 {
117 
118 
119 /* The *_Class implementation: */
120 
init()121 const Glib::Class& Text_Class::init()
122 {
123   if(!gtype_) // create the GType if necessary
124   {
125     // Glib::Class has to know the class init function to clone custom types.
126     class_init_func_ = &Text_Class::class_init_function;
127 
128     // This is actually just optimized away, apparently with no harm.
129     // Make sure that the parent type has been created.
130     //CppClassParent::CppObjectType::get_type();
131 
132     // Create the wrapper type, with the same class/instance size as the base type.
133     register_derived_type(clutter_text_get_type());
134 
135     // Add derived versions of interfaces, if the C type implements any interfaces:
136 
137   }
138 
139   return *this;
140 }
141 
142 
class_init_function(void * g_class,void * class_data)143 void Text_Class::class_init_function(void* g_class, void* class_data)
144 {
145   BaseClassType *const klass = static_cast<BaseClassType*>(g_class);
146   CppClassParent::class_init_function(klass, class_data);
147 
148 
149   klass->activate = &activate_callback;
150   klass->text_changed = &text_changed_callback;
151   klass->cursor_changed = &cursor_changed_callback;
152 }
153 
154 
activate_callback(ClutterText * self)155 void Text_Class::activate_callback(ClutterText* self)
156 {
157   Glib::ObjectBase *const obj_base = static_cast<Glib::ObjectBase*>(
158       Glib::ObjectBase::_get_current_wrapper((GObject*)self));
159 
160   // Non-gtkmmproc-generated custom classes implicitly call the default
161   // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
162   // generated classes can use this optimisation, which avoids the unnecessary
163   // parameter conversions if there is no possibility of the virtual function
164   // being overridden:
165   if(obj_base && obj_base->is_derived_())
166   {
167     CppObjectType *const obj = dynamic_cast<CppObjectType* const>(obj_base);
168     if(obj) // This can be NULL during destruction.
169     {
170       #ifdef GLIBMM_EXCEPTIONS_ENABLED
171       try // Trap C++ exceptions which would normally be lost because this is a C callback.
172       {
173       #endif //GLIBMM_EXCEPTIONS_ENABLED
174         // Call the virtual member method, which derived classes might override.
175         obj->on_activate();
176         return;
177       #ifdef GLIBMM_EXCEPTIONS_ENABLED
178       }
179       catch(...)
180       {
181         Glib::exception_handlers_invoke();
182       }
183       #endif //GLIBMM_EXCEPTIONS_ENABLED
184     }
185   }
186 
187   BaseClassType *const base = static_cast<BaseClassType*>(
188         g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
189     );
190 
191   // Call the original underlying C function:
192   if(base && base->activate)
193     (*base->activate)(self);
194 }
text_changed_callback(ClutterText * self)195 void Text_Class::text_changed_callback(ClutterText* self)
196 {
197   Glib::ObjectBase *const obj_base = static_cast<Glib::ObjectBase*>(
198       Glib::ObjectBase::_get_current_wrapper((GObject*)self));
199 
200   // Non-gtkmmproc-generated custom classes implicitly call the default
201   // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
202   // generated classes can use this optimisation, which avoids the unnecessary
203   // parameter conversions if there is no possibility of the virtual function
204   // being overridden:
205   if(obj_base && obj_base->is_derived_())
206   {
207     CppObjectType *const obj = dynamic_cast<CppObjectType* const>(obj_base);
208     if(obj) // This can be NULL during destruction.
209     {
210       #ifdef GLIBMM_EXCEPTIONS_ENABLED
211       try // Trap C++ exceptions which would normally be lost because this is a C callback.
212       {
213       #endif //GLIBMM_EXCEPTIONS_ENABLED
214         // Call the virtual member method, which derived classes might override.
215         obj->on_text_changed();
216         return;
217       #ifdef GLIBMM_EXCEPTIONS_ENABLED
218       }
219       catch(...)
220       {
221         Glib::exception_handlers_invoke();
222       }
223       #endif //GLIBMM_EXCEPTIONS_ENABLED
224     }
225   }
226 
227   BaseClassType *const base = static_cast<BaseClassType*>(
228         g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
229     );
230 
231   // Call the original underlying C function:
232   if(base && base->text_changed)
233     (*base->text_changed)(self);
234 }
cursor_changed_callback(ClutterText * self)235 void Text_Class::cursor_changed_callback(ClutterText* self)
236 {
237   Glib::ObjectBase *const obj_base = static_cast<Glib::ObjectBase*>(
238       Glib::ObjectBase::_get_current_wrapper((GObject*)self));
239 
240   // Non-gtkmmproc-generated custom classes implicitly call the default
241   // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
242   // generated classes can use this optimisation, which avoids the unnecessary
243   // parameter conversions if there is no possibility of the virtual function
244   // being overridden:
245   if(obj_base && obj_base->is_derived_())
246   {
247     CppObjectType *const obj = dynamic_cast<CppObjectType* const>(obj_base);
248     if(obj) // This can be NULL during destruction.
249     {
250       #ifdef GLIBMM_EXCEPTIONS_ENABLED
251       try // Trap C++ exceptions which would normally be lost because this is a C callback.
252       {
253       #endif //GLIBMM_EXCEPTIONS_ENABLED
254         // Call the virtual member method, which derived classes might override.
255         obj->on_cursor_changed();
256         return;
257       #ifdef GLIBMM_EXCEPTIONS_ENABLED
258       }
259       catch(...)
260       {
261         Glib::exception_handlers_invoke();
262       }
263       #endif //GLIBMM_EXCEPTIONS_ENABLED
264     }
265   }
266 
267   BaseClassType *const base = static_cast<BaseClassType*>(
268         g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
269     );
270 
271   // Call the original underlying C function:
272   if(base && base->cursor_changed)
273     (*base->cursor_changed)(self);
274 }
275 
276 
wrap_new(GObject * object)277 Glib::ObjectBase* Text_Class::wrap_new(GObject* object)
278 {
279   return new Text((ClutterText*)object);
280 }
281 
282 
283 /* The implementation: */
284 
gobj_copy()285 ClutterText* Text::gobj_copy()
286 {
287   reference();
288   return gobj();
289 }
290 
Text(const Glib::ConstructParams & construct_params)291 Text::Text(const Glib::ConstructParams& construct_params)
292 :
293   Actor(construct_params)
294 {
295 
296 }
297 
Text(ClutterText * castitem)298 Text::Text(ClutterText* castitem)
299 :
300   Actor((ClutterActor*)(castitem))
301 {}
302 
303 
~Text()304 Text::~Text()
305 {}
306 
307 
308 Text::CppClassType Text::text_class_; // initialize static member
309 
get_type()310 GType Text::get_type()
311 {
312   return text_class_.init().get_type();
313 }
314 
315 
get_base_type()316 GType Text::get_base_type()
317 {
318   return clutter_text_get_type();
319 }
320 
321 
Text()322 Text::Text()
323 :
324   // Mark this class as non-derived to allow C++ vfuncs to be skipped.
325   Glib::ObjectBase(0),
326   Actor(Glib::ConstructParams(text_class_.init()))
327 {
328 
329 
330 }
331 
Text(const Glib::ustring & font_name,const Glib::ustring & text)332 Text::Text(const Glib::ustring& font_name, const Glib::ustring& text)
333 :
334   // Mark this class as non-derived to allow C++ vfuncs to be skipped.
335   Glib::ObjectBase(0),
336   Actor(Glib::ConstructParams(text_class_.init(), "font_name", font_name.c_str(), "text", text.c_str(), static_cast<char*>(0)))
337 {
338 
339 
340 }
341 
Text(const Glib::ustring & font_name,const Glib::ustring & text,const Color & color)342 Text::Text(const Glib::ustring& font_name, const Glib::ustring& text, const Color& color)
343 :
344   // Mark this class as non-derived to allow C++ vfuncs to be skipped.
345   Glib::ObjectBase(0),
346   Actor(Glib::ConstructParams(text_class_.init(), "font_name", font_name.c_str(), "text", text.c_str(), "color", (color).gobj(), static_cast<char*>(0)))
347 {
348 
349 
350 }
351 
Text(const Glib::RefPtr<TextBuffer> & buffer)352 Text::Text(const Glib::RefPtr<TextBuffer>& buffer)
353 :
354   // Mark this class as non-derived to allow C++ vfuncs to be skipped.
355   Glib::ObjectBase(0),
356   Actor(Glib::ConstructParams(text_class_.init(), "buffer", Glib::unwrap(buffer), static_cast<char*>(0)))
357 {
358 
359 
360 }
361 
create()362 Glib::RefPtr<Text> Text::create()
363 {
364   return Glib::RefPtr<Text>( new Text() );
365 }
366 
create(const Glib::ustring & font_name,const Glib::ustring & text)367 Glib::RefPtr<Text> Text::create(const Glib::ustring& font_name, const Glib::ustring& text)
368 {
369   return Glib::RefPtr<Text>( new Text(font_name, text) );
370 }
371 
create(const Glib::ustring & font_name,const Glib::ustring & text,const Color & color)372 Glib::RefPtr<Text> Text::create(const Glib::ustring& font_name, const Glib::ustring& text, const Color& color)
373 {
374   return Glib::RefPtr<Text>( new Text(font_name, text, color) );
375 }
376 
create(const Glib::RefPtr<TextBuffer> & buffer)377 Glib::RefPtr<Text> Text::create(const Glib::RefPtr<TextBuffer>& buffer)
378 {
379   return Glib::RefPtr<Text>( new Text(buffer) );
380 }
381 
set_buffer(const Glib::RefPtr<TextBuffer> & buffer)382 void Text::set_buffer(const Glib::RefPtr<TextBuffer>& buffer)
383 {
384   clutter_text_set_buffer(gobj(), Glib::unwrap(buffer));
385 }
386 
get_buffer()387 Glib::RefPtr<TextBuffer> Text::get_buffer()
388 {
389   Glib::RefPtr<TextBuffer> retvalue = Glib::wrap(clutter_text_get_buffer(gobj()));
390   if(retvalue)
391     retvalue->reference(); //The function does not do a ref for us.
392   return retvalue;
393 }
394 
get_buffer() const395 Glib::RefPtr<const TextBuffer> Text::get_buffer() const
396 {
397   return const_cast<Text*>(this)->get_buffer();
398 }
399 
set_text(const Glib::ustring & text)400 void Text::set_text(const Glib::ustring& text)
401 {
402   clutter_text_set_text(gobj(), text.c_str());
403 }
404 
set_markup(const Glib::ustring & markup)405 void Text::set_markup(const Glib::ustring& markup)
406 {
407   clutter_text_set_markup(gobj(), markup.c_str());
408 }
409 
get_text() const410 Glib::ustring Text::get_text() const
411 {
412   return Glib::convert_const_gchar_ptr_to_ustring(clutter_text_get_text(const_cast<ClutterText*>(gobj())));
413 }
414 
set_activatable(bool activatable)415 void Text::set_activatable(bool activatable)
416 {
417   clutter_text_set_activatable(gobj(), static_cast<int>(activatable));
418 }
419 
get_activatable() const420 bool Text::get_activatable() const
421 {
422   return clutter_text_get_activatable(const_cast<ClutterText*>(gobj()));
423 }
424 
set_attributes(Pango::AttrList & attrs)425 void Text::set_attributes(Pango::AttrList& attrs)
426 {
427   clutter_text_set_attributes(gobj(), (attrs).gobj());
428 }
429 
get_attributes() const430 Pango::AttrList Text::get_attributes() const
431 {
432   return Pango::AttrList((clutter_text_get_attributes(const_cast<ClutterText*>(gobj()))));
433 }
434 
set_color(const Color & color)435 void Text::set_color(const Color& color)
436 {
437   clutter_text_set_color(gobj(), (color).gobj());
438 }
439 
set_ellipsize(Pango::EllipsizeMode mode)440 void Text::set_ellipsize(Pango::EllipsizeMode mode)
441 {
442   clutter_text_set_ellipsize(gobj(), ((PangoEllipsizeMode)(mode)));
443 }
444 
get_ellipsize() const445 Pango::EllipsizeMode Text::get_ellipsize() const
446 {
447   return ((Pango::EllipsizeMode)(clutter_text_get_ellipsize(const_cast<ClutterText*>(gobj()))));
448 }
449 
set_font_name(const Glib::ustring & font_name)450 void Text::set_font_name(const Glib::ustring& font_name)
451 {
452   clutter_text_set_font_name(gobj(), font_name.c_str());
453 }
454 
get_font_name() const455 Glib::ustring Text::get_font_name() const
456 {
457   return Glib::convert_const_gchar_ptr_to_ustring(clutter_text_get_font_name(const_cast<ClutterText*>(gobj())));
458 }
459 
set_font_description(const Pango::FontDescription & font_desc)460 void Text::set_font_description(const Pango::FontDescription& font_desc)
461 {
462   clutter_text_set_font_description(gobj(), const_cast<PangoFontDescription*>((font_desc).gobj()));
463 }
464 
get_font_description() const465 Pango::FontDescription Text::get_font_description() const
466 {
467   return Pango::FontDescription((clutter_text_get_font_description(const_cast<ClutterText*>(gobj()))));
468 }
469 
set_password_char(gunichar wc)470 void Text::set_password_char(gunichar wc)
471 {
472   clutter_text_set_password_char(gobj(), wc);
473 }
474 
get_password_char() const475 gunichar Text::get_password_char() const
476 {
477   return clutter_text_get_password_char(const_cast<ClutterText*>(gobj()));
478 }
479 
set_justify(bool justify)480 void Text::set_justify(bool justify)
481 {
482   clutter_text_set_justify(gobj(), static_cast<int>(justify));
483 }
484 
get_justify() const485 bool Text::get_justify() const
486 {
487   return clutter_text_get_justify(const_cast<ClutterText*>(gobj()));
488 }
489 
get_layout()490 Glib::RefPtr<Pango::Layout> Text::get_layout()
491 {
492   return Glib::wrap(clutter_text_get_layout(gobj()));
493 }
494 
get_layout() const495 Glib::RefPtr<const Pango::Layout> Text::get_layout() const
496 {
497   return const_cast<Text*>(this)->get_layout();
498 }
499 
set_line_alignment(Pango::Alignment alignment)500 void Text::set_line_alignment(Pango::Alignment alignment)
501 {
502   clutter_text_set_line_alignment(gobj(), ((PangoAlignment)(alignment)));
503 }
504 
get_line_alignment() const505 Pango::Alignment Text::get_line_alignment() const
506 {
507   return ((Pango::Alignment)(clutter_text_get_line_alignment(const_cast<ClutterText*>(gobj()))));
508 }
509 
set_line_wrap(bool line_wrap)510 void Text::set_line_wrap(bool line_wrap)
511 {
512   clutter_text_set_line_wrap(gobj(), static_cast<int>(line_wrap));
513 }
514 
get_line_wrap() const515 bool Text::get_line_wrap() const
516 {
517   return clutter_text_get_line_wrap(const_cast<ClutterText*>(gobj()));
518 }
519 
get_line_wrap_mode() const520 Pango::WrapMode Text::get_line_wrap_mode() const
521 {
522   return ((Pango::WrapMode)(clutter_text_get_line_wrap_mode(const_cast<ClutterText*>(gobj()))));
523 }
524 
set_line_wrap_mode(Pango::WrapMode wrap_mode)525 void Text::set_line_wrap_mode(Pango::WrapMode wrap_mode)
526 {
527   clutter_text_set_line_wrap_mode(gobj(), ((PangoWrapMode)(wrap_mode)));
528 }
529 
get_max_length() const530 int Text::get_max_length() const
531 {
532   return clutter_text_get_max_length(const_cast<ClutterText*>(gobj()));
533 }
534 
set_max_length(int max_length)535 void Text::set_max_length(int max_length)
536 {
537   clutter_text_set_max_length(gobj(), max_length);
538 }
539 
set_selectable(bool selectable)540 void Text::set_selectable(bool selectable)
541 {
542   clutter_text_set_selectable(gobj(), static_cast<int>(selectable));
543 }
544 
get_selectable() const545 bool Text::get_selectable() const
546 {
547   return clutter_text_get_selectable(const_cast<ClutterText*>(gobj()));
548 }
549 
set_selection(gssize start_pos,gssize end_pos)550 void Text::set_selection(gssize start_pos, gssize end_pos)
551 {
552   clutter_text_set_selection(gobj(), start_pos, end_pos);
553 }
554 
get_selection() const555 Glib::ustring Text::get_selection() const
556 {
557   return Glib::convert_return_gchar_ptr_to_ustring(clutter_text_get_selection(const_cast<ClutterText*>(gobj())));
558 }
559 
set_selection_bound(int selection_bound)560 void Text::set_selection_bound(int selection_bound)
561 {
562   clutter_text_set_selection_bound(gobj(), selection_bound);
563 }
564 
get_selection_bound() const565 int Text::get_selection_bound() const
566 {
567   return clutter_text_get_selection_bound(const_cast<ClutterText*>(gobj()));
568 }
569 
set_selection_color(const Color & color)570 void Text::set_selection_color(const Color& color)
571 {
572   clutter_text_set_selection_color(gobj(), (color).gobj());
573 }
574 
set_single_line_mode(bool single_line)575 void Text::set_single_line_mode(bool single_line)
576 {
577   clutter_text_set_single_line_mode(gobj(), static_cast<int>(single_line));
578 }
579 
get_single_line_mode() const580 bool Text::get_single_line_mode() const
581 {
582   return clutter_text_get_single_line_mode(const_cast<ClutterText*>(gobj()));
583 }
584 
set_use_markup(bool setting)585 void Text::set_use_markup(bool setting)
586 {
587   clutter_text_set_use_markup(gobj(), static_cast<int>(setting));
588 }
589 
get_use_markup() const590 bool Text::get_use_markup() const
591 {
592   return clutter_text_get_use_markup(const_cast<ClutterText*>(gobj()));
593 }
594 
set_editable(bool editable)595 void Text::set_editable(bool editable)
596 {
597   clutter_text_set_editable(gobj(), static_cast<int>(editable));
598 }
599 
get_editable() const600 bool Text::get_editable() const
601 {
602   return clutter_text_get_editable(const_cast<ClutterText*>(gobj()));
603 }
604 
insert(gunichar wc)605 void Text::insert(gunichar wc)
606 {
607   clutter_text_insert_unichar(gobj(), wc);
608 }
609 
insert(const Glib::ustring & text,gssize position)610 void Text::insert(const Glib::ustring& text, gssize position)
611 {
612   clutter_text_insert_text(gobj(), text.c_str(), position);
613 }
614 
delete_chars(guint len)615 void Text::delete_chars(guint len)
616 {
617   clutter_text_delete_chars(gobj(), len);
618 }
619 
delete_text(gssize start_pos,gssize end_pos)620 void Text::delete_text(gssize start_pos, gssize end_pos)
621 {
622   clutter_text_delete_text(gobj(), start_pos, end_pos);
623 }
624 
delete_selection()625 bool Text::delete_selection()
626 {
627   return clutter_text_delete_selection(gobj());
628 }
629 
get_chars(gssize start_pos,gssize end_pos) const630 Glib::ustring Text::get_chars(gssize start_pos, gssize end_pos) const
631 {
632   return Glib::convert_return_gchar_ptr_to_ustring(clutter_text_get_chars(const_cast<ClutterText*>(gobj()), start_pos, end_pos));
633 }
634 
set_cursor_color(const Color & color)635 void Text::set_cursor_color(const Color& color)
636 {
637   clutter_text_set_cursor_color(gobj(), (color).gobj());
638 }
639 
set_cursor_position(int position)640 void Text::set_cursor_position(int position)
641 {
642   clutter_text_set_cursor_position(gobj(), position);
643 }
644 
get_cursor_position() const645 int Text::get_cursor_position() const
646 {
647   return clutter_text_get_cursor_position(const_cast<ClutterText*>(gobj()));
648 }
649 
set_cursor_visible(bool visible)650 void Text::set_cursor_visible(bool visible)
651 {
652   clutter_text_set_cursor_visible(gobj(), static_cast<int>(visible));
653 }
654 
get_cursor_visible() const655 bool Text::get_cursor_visible() const
656 {
657   return clutter_text_get_cursor_visible(const_cast<ClutterText*>(gobj()));
658 }
659 
set_cursor_size(int size)660 void Text::set_cursor_size(int size)
661 {
662   clutter_text_set_cursor_size(gobj(), size);
663 }
664 
get_cursor_size() const665 guint Text::get_cursor_size() const
666 {
667   return clutter_text_get_cursor_size(const_cast<ClutterText*>(gobj()));
668 }
669 
activate()670 bool Text::activate()
671 {
672   return clutter_text_activate(gobj());
673 }
674 
coords_to_position(float x,float y)675 int Text::coords_to_position(float x, float y)
676 {
677   return clutter_text_coords_to_position(gobj(), x, y);
678 }
679 
position_to_coords(int position,float & x,float & y,float & line_height)680 bool Text::position_to_coords(int position, float & x, float & y, float & line_height)
681 {
682   return clutter_text_position_to_coords(gobj(), position, &(x), &(y), &(line_height));
683 }
684 
set_preedit_string(const Glib::ustring & preedit_str,const Pango::AttrList & preedit_attrs,guint ursor_pos)685 void Text::set_preedit_string(const Glib::ustring& preedit_str, const Pango::AttrList& preedit_attrs, guint ursor_pos)
686 {
687   clutter_text_set_preedit_string(gobj(), preedit_str.c_str(), const_cast<PangoAttrList*>((preedit_attrs).gobj()), ursor_pos);
688 }
689 
get_layout_offsets(int & x,int & y)690 void Text::get_layout_offsets(int& x, int& y)
691 {
692   clutter_text_get_layout_offsets(gobj(), &(x), &(y));
693 }
694 
695 
signal_activate()696 Glib::SignalProxy0< void > Text::signal_activate()
697 {
698   return Glib::SignalProxy0< void >(this, &Text_signal_activate_info);
699 }
700 
701 
signal_text_changed()702 Glib::SignalProxy0< void > Text::signal_text_changed()
703 {
704   return Glib::SignalProxy0< void >(this, &Text_signal_text_changed_info);
705 }
706 
707 
signal_cursor_changed()708 Glib::SignalProxy0< void > Text::signal_cursor_changed()
709 {
710   return Glib::SignalProxy0< void >(this, &Text_signal_cursor_changed_info);
711 }
712 
713 
714 #ifdef GLIBMM_PROPERTIES_ENABLED
property_activatable()715 Glib::PropertyProxy< bool > Text::property_activatable()
716 {
717   return Glib::PropertyProxy< bool >(this, "activatable");
718 }
719 #endif //GLIBMM_PROPERTIES_ENABLED
720 
721 #ifdef GLIBMM_PROPERTIES_ENABLED
property_activatable() const722 Glib::PropertyProxy_ReadOnly< bool > Text::property_activatable() const
723 {
724   return Glib::PropertyProxy_ReadOnly< bool >(this, "activatable");
725 }
726 #endif //GLIBMM_PROPERTIES_ENABLED
727 
728 #ifdef GLIBMM_PROPERTIES_ENABLED
property_attributes()729 Glib::PropertyProxy< Pango::AttrList > Text::property_attributes()
730 {
731   return Glib::PropertyProxy< Pango::AttrList >(this, "attributes");
732 }
733 #endif //GLIBMM_PROPERTIES_ENABLED
734 
735 #ifdef GLIBMM_PROPERTIES_ENABLED
property_attributes() const736 Glib::PropertyProxy_ReadOnly< Pango::AttrList > Text::property_attributes() const
737 {
738   return Glib::PropertyProxy_ReadOnly< Pango::AttrList >(this, "attributes");
739 }
740 #endif //GLIBMM_PROPERTIES_ENABLED
741 
742 #ifdef GLIBMM_PROPERTIES_ENABLED
property_buffer()743 Glib::PropertyProxy< Glib::RefPtr<TextBuffer> > Text::property_buffer()
744 {
745   return Glib::PropertyProxy< Glib::RefPtr<TextBuffer> >(this, "buffer");
746 }
747 #endif //GLIBMM_PROPERTIES_ENABLED
748 
749 #ifdef GLIBMM_PROPERTIES_ENABLED
property_buffer() const750 Glib::PropertyProxy_ReadOnly< Glib::RefPtr<TextBuffer> > Text::property_buffer() const
751 {
752   return Glib::PropertyProxy_ReadOnly< Glib::RefPtr<TextBuffer> >(this, "buffer");
753 }
754 #endif //GLIBMM_PROPERTIES_ENABLED
755 
756 #ifdef GLIBMM_PROPERTIES_ENABLED
property_color()757 Glib::PropertyProxy< Color > Text::property_color()
758 {
759   return Glib::PropertyProxy< Color >(this, "color");
760 }
761 #endif //GLIBMM_PROPERTIES_ENABLED
762 
763 #ifdef GLIBMM_PROPERTIES_ENABLED
property_color() const764 Glib::PropertyProxy_ReadOnly< Color > Text::property_color() const
765 {
766   return Glib::PropertyProxy_ReadOnly< Color >(this, "color");
767 }
768 #endif //GLIBMM_PROPERTIES_ENABLED
769 
770 #ifdef GLIBMM_PROPERTIES_ENABLED
property_cursor_color()771 Glib::PropertyProxy< Color > Text::property_cursor_color()
772 {
773   return Glib::PropertyProxy< Color >(this, "cursor-color");
774 }
775 #endif //GLIBMM_PROPERTIES_ENABLED
776 
777 #ifdef GLIBMM_PROPERTIES_ENABLED
property_cursor_color() const778 Glib::PropertyProxy_ReadOnly< Color > Text::property_cursor_color() const
779 {
780   return Glib::PropertyProxy_ReadOnly< Color >(this, "cursor-color");
781 }
782 #endif //GLIBMM_PROPERTIES_ENABLED
783 
784 #ifdef GLIBMM_PROPERTIES_ENABLED
property_cursor_color_set() const785 Glib::PropertyProxy_ReadOnly< bool > Text::property_cursor_color_set() const
786 {
787   return Glib::PropertyProxy_ReadOnly< bool >(this, "cursor-color-set");
788 }
789 #endif //GLIBMM_PROPERTIES_ENABLED
790 
791 #ifdef GLIBMM_PROPERTIES_ENABLED
property_cursor_position()792 Glib::PropertyProxy< guint > Text::property_cursor_position()
793 {
794   return Glib::PropertyProxy< guint >(this, "cursor-position");
795 }
796 #endif //GLIBMM_PROPERTIES_ENABLED
797 
798 #ifdef GLIBMM_PROPERTIES_ENABLED
property_cursor_position() const799 Glib::PropertyProxy_ReadOnly< guint > Text::property_cursor_position() const
800 {
801   return Glib::PropertyProxy_ReadOnly< guint >(this, "cursor-position");
802 }
803 #endif //GLIBMM_PROPERTIES_ENABLED
804 
805 #ifdef GLIBMM_PROPERTIES_ENABLED
property_cursor_size()806 Glib::PropertyProxy< int > Text::property_cursor_size()
807 {
808   return Glib::PropertyProxy< int >(this, "cursor-size");
809 }
810 #endif //GLIBMM_PROPERTIES_ENABLED
811 
812 #ifdef GLIBMM_PROPERTIES_ENABLED
property_cursor_size() const813 Glib::PropertyProxy_ReadOnly< int > Text::property_cursor_size() const
814 {
815   return Glib::PropertyProxy_ReadOnly< int >(this, "cursor-size");
816 }
817 #endif //GLIBMM_PROPERTIES_ENABLED
818 
819 #ifdef GLIBMM_PROPERTIES_ENABLED
property_cursor_visible()820 Glib::PropertyProxy< bool > Text::property_cursor_visible()
821 {
822   return Glib::PropertyProxy< bool >(this, "cursor-visible");
823 }
824 #endif //GLIBMM_PROPERTIES_ENABLED
825 
826 #ifdef GLIBMM_PROPERTIES_ENABLED
property_cursor_visible() const827 Glib::PropertyProxy_ReadOnly< bool > Text::property_cursor_visible() const
828 {
829   return Glib::PropertyProxy_ReadOnly< bool >(this, "cursor-visible");
830 }
831 #endif //GLIBMM_PROPERTIES_ENABLED
832 
833 #ifdef GLIBMM_PROPERTIES_ENABLED
property_editable()834 Glib::PropertyProxy< bool > Text::property_editable()
835 {
836   return Glib::PropertyProxy< bool >(this, "editable");
837 }
838 #endif //GLIBMM_PROPERTIES_ENABLED
839 
840 #ifdef GLIBMM_PROPERTIES_ENABLED
property_editable() const841 Glib::PropertyProxy_ReadOnly< bool > Text::property_editable() const
842 {
843   return Glib::PropertyProxy_ReadOnly< bool >(this, "editable");
844 }
845 #endif //GLIBMM_PROPERTIES_ENABLED
846 
847 #ifdef GLIBMM_PROPERTIES_ENABLED
property_ellipsize()848 Glib::PropertyProxy< Pango::EllipsizeMode > Text::property_ellipsize()
849 {
850   return Glib::PropertyProxy< Pango::EllipsizeMode >(this, "ellipsize");
851 }
852 #endif //GLIBMM_PROPERTIES_ENABLED
853 
854 #ifdef GLIBMM_PROPERTIES_ENABLED
property_ellipsize() const855 Glib::PropertyProxy_ReadOnly< Pango::EllipsizeMode > Text::property_ellipsize() const
856 {
857   return Glib::PropertyProxy_ReadOnly< Pango::EllipsizeMode >(this, "ellipsize");
858 }
859 #endif //GLIBMM_PROPERTIES_ENABLED
860 
861 #ifdef GLIBMM_PROPERTIES_ENABLED
property_font_description()862 Glib::PropertyProxy< Pango::FontDescription > Text::property_font_description()
863 {
864   return Glib::PropertyProxy< Pango::FontDescription >(this, "font-description");
865 }
866 #endif //GLIBMM_PROPERTIES_ENABLED
867 
868 #ifdef GLIBMM_PROPERTIES_ENABLED
property_font_description() const869 Glib::PropertyProxy_ReadOnly< Pango::FontDescription > Text::property_font_description() const
870 {
871   return Glib::PropertyProxy_ReadOnly< Pango::FontDescription >(this, "font-description");
872 }
873 #endif //GLIBMM_PROPERTIES_ENABLED
874 
875 #ifdef GLIBMM_PROPERTIES_ENABLED
property_font_name()876 Glib::PropertyProxy< Glib::ustring > Text::property_font_name()
877 {
878   return Glib::PropertyProxy< Glib::ustring >(this, "font-name");
879 }
880 #endif //GLIBMM_PROPERTIES_ENABLED
881 
882 #ifdef GLIBMM_PROPERTIES_ENABLED
property_font_name() const883 Glib::PropertyProxy_ReadOnly< Glib::ustring > Text::property_font_name() const
884 {
885   return Glib::PropertyProxy_ReadOnly< Glib::ustring >(this, "font-name");
886 }
887 #endif //GLIBMM_PROPERTIES_ENABLED
888 
889 #ifdef GLIBMM_PROPERTIES_ENABLED
property_justify()890 Glib::PropertyProxy< bool > Text::property_justify()
891 {
892   return Glib::PropertyProxy< bool >(this, "justify");
893 }
894 #endif //GLIBMM_PROPERTIES_ENABLED
895 
896 #ifdef GLIBMM_PROPERTIES_ENABLED
property_justify() const897 Glib::PropertyProxy_ReadOnly< bool > Text::property_justify() const
898 {
899   return Glib::PropertyProxy_ReadOnly< bool >(this, "justify");
900 }
901 #endif //GLIBMM_PROPERTIES_ENABLED
902 
903 #ifdef GLIBMM_PROPERTIES_ENABLED
property_line_alignment()904 Glib::PropertyProxy< Pango::Alignment > Text::property_line_alignment()
905 {
906   return Glib::PropertyProxy< Pango::Alignment >(this, "line-alignment");
907 }
908 #endif //GLIBMM_PROPERTIES_ENABLED
909 
910 #ifdef GLIBMM_PROPERTIES_ENABLED
property_line_alignment() const911 Glib::PropertyProxy_ReadOnly< Pango::Alignment > Text::property_line_alignment() const
912 {
913   return Glib::PropertyProxy_ReadOnly< Pango::Alignment >(this, "line-alignment");
914 }
915 #endif //GLIBMM_PROPERTIES_ENABLED
916 
917 #ifdef GLIBMM_PROPERTIES_ENABLED
property_line_wrap_mode()918 Glib::PropertyProxy< Pango::WrapMode > Text::property_line_wrap_mode()
919 {
920   return Glib::PropertyProxy< Pango::WrapMode >(this, "line-wrap-mode");
921 }
922 #endif //GLIBMM_PROPERTIES_ENABLED
923 
924 #ifdef GLIBMM_PROPERTIES_ENABLED
property_line_wrap_mode() const925 Glib::PropertyProxy_ReadOnly< Pango::WrapMode > Text::property_line_wrap_mode() const
926 {
927   return Glib::PropertyProxy_ReadOnly< Pango::WrapMode >(this, "line-wrap-mode");
928 }
929 #endif //GLIBMM_PROPERTIES_ENABLED
930 
931 #ifdef GLIBMM_PROPERTIES_ENABLED
property_line_wrap()932 Glib::PropertyProxy< bool > Text::property_line_wrap()
933 {
934   return Glib::PropertyProxy< bool >(this, "line-wrap");
935 }
936 #endif //GLIBMM_PROPERTIES_ENABLED
937 
938 #ifdef GLIBMM_PROPERTIES_ENABLED
property_line_wrap() const939 Glib::PropertyProxy_ReadOnly< bool > Text::property_line_wrap() const
940 {
941   return Glib::PropertyProxy_ReadOnly< bool >(this, "line-wrap");
942 }
943 #endif //GLIBMM_PROPERTIES_ENABLED
944 
945 #ifdef GLIBMM_PROPERTIES_ENABLED
property_max_length()946 Glib::PropertyProxy< int > Text::property_max_length()
947 {
948   return Glib::PropertyProxy< int >(this, "max-length");
949 }
950 #endif //GLIBMM_PROPERTIES_ENABLED
951 
952 #ifdef GLIBMM_PROPERTIES_ENABLED
property_max_length() const953 Glib::PropertyProxy_ReadOnly< int > Text::property_max_length() const
954 {
955   return Glib::PropertyProxy_ReadOnly< int >(this, "max-length");
956 }
957 #endif //GLIBMM_PROPERTIES_ENABLED
958 
959 #ifdef GLIBMM_PROPERTIES_ENABLED
property_password_char()960 Glib::PropertyProxy< gunichar > Text::property_password_char()
961 {
962   return Glib::PropertyProxy< gunichar >(this, "password-char");
963 }
964 #endif //GLIBMM_PROPERTIES_ENABLED
965 
966 #ifdef GLIBMM_PROPERTIES_ENABLED
property_password_char() const967 Glib::PropertyProxy_ReadOnly< gunichar > Text::property_password_char() const
968 {
969   return Glib::PropertyProxy_ReadOnly< gunichar >(this, "password-char");
970 }
971 #endif //GLIBMM_PROPERTIES_ENABLED
972 
973 #ifdef GLIBMM_PROPERTIES_ENABLED
property_position()974 Glib::PropertyProxy< int > Text::property_position()
975 {
976   return Glib::PropertyProxy< int >(this, "position");
977 }
978 #endif //GLIBMM_PROPERTIES_ENABLED
979 
980 #ifdef GLIBMM_PROPERTIES_ENABLED
property_position() const981 Glib::PropertyProxy_ReadOnly< int > Text::property_position() const
982 {
983   return Glib::PropertyProxy_ReadOnly< int >(this, "position");
984 }
985 #endif //GLIBMM_PROPERTIES_ENABLED
986 
987 #ifdef GLIBMM_PROPERTIES_ENABLED
property_selectable()988 Glib::PropertyProxy< bool > Text::property_selectable()
989 {
990   return Glib::PropertyProxy< bool >(this, "selectable");
991 }
992 #endif //GLIBMM_PROPERTIES_ENABLED
993 
994 #ifdef GLIBMM_PROPERTIES_ENABLED
property_selectable() const995 Glib::PropertyProxy_ReadOnly< bool > Text::property_selectable() const
996 {
997   return Glib::PropertyProxy_ReadOnly< bool >(this, "selectable");
998 }
999 #endif //GLIBMM_PROPERTIES_ENABLED
1000 
1001 #ifdef GLIBMM_PROPERTIES_ENABLED
property_selected_text_color()1002 Glib::PropertyProxy< Color > Text::property_selected_text_color()
1003 {
1004   return Glib::PropertyProxy< Color >(this, "selected-text-color");
1005 }
1006 #endif //GLIBMM_PROPERTIES_ENABLED
1007 
1008 #ifdef GLIBMM_PROPERTIES_ENABLED
property_selected_text_color() const1009 Glib::PropertyProxy_ReadOnly< Color > Text::property_selected_text_color() const
1010 {
1011   return Glib::PropertyProxy_ReadOnly< Color >(this, "selected-text-color");
1012 }
1013 #endif //GLIBMM_PROPERTIES_ENABLED
1014 
1015 #ifdef GLIBMM_PROPERTIES_ENABLED
property_selected_text_color_set() const1016 Glib::PropertyProxy_ReadOnly< bool > Text::property_selected_text_color_set() const
1017 {
1018   return Glib::PropertyProxy_ReadOnly< bool >(this, "selected-text-color-set");
1019 }
1020 #endif //GLIBMM_PROPERTIES_ENABLED
1021 
1022 #ifdef GLIBMM_PROPERTIES_ENABLED
property_selection_bound()1023 Glib::PropertyProxy< int > Text::property_selection_bound()
1024 {
1025   return Glib::PropertyProxy< int >(this, "selection-bound");
1026 }
1027 #endif //GLIBMM_PROPERTIES_ENABLED
1028 
1029 #ifdef GLIBMM_PROPERTIES_ENABLED
property_selection_bound() const1030 Glib::PropertyProxy_ReadOnly< int > Text::property_selection_bound() const
1031 {
1032   return Glib::PropertyProxy_ReadOnly< int >(this, "selection-bound");
1033 }
1034 #endif //GLIBMM_PROPERTIES_ENABLED
1035 
1036 #ifdef GLIBMM_PROPERTIES_ENABLED
property_selection_color()1037 Glib::PropertyProxy< Color > Text::property_selection_color()
1038 {
1039   return Glib::PropertyProxy< Color >(this, "selection-color");
1040 }
1041 #endif //GLIBMM_PROPERTIES_ENABLED
1042 
1043 #ifdef GLIBMM_PROPERTIES_ENABLED
property_selection_color() const1044 Glib::PropertyProxy_ReadOnly< Color > Text::property_selection_color() const
1045 {
1046   return Glib::PropertyProxy_ReadOnly< Color >(this, "selection-color");
1047 }
1048 #endif //GLIBMM_PROPERTIES_ENABLED
1049 
1050 #ifdef GLIBMM_PROPERTIES_ENABLED
property_selection_color_set() const1051 Glib::PropertyProxy_ReadOnly< bool > Text::property_selection_color_set() const
1052 {
1053   return Glib::PropertyProxy_ReadOnly< bool >(this, "selection-color-set");
1054 }
1055 #endif //GLIBMM_PROPERTIES_ENABLED
1056 
1057 #ifdef GLIBMM_PROPERTIES_ENABLED
property_single_line_mode()1058 Glib::PropertyProxy< bool > Text::property_single_line_mode()
1059 {
1060   return Glib::PropertyProxy< bool >(this, "single-line-mode");
1061 }
1062 #endif //GLIBMM_PROPERTIES_ENABLED
1063 
1064 #ifdef GLIBMM_PROPERTIES_ENABLED
property_single_line_mode() const1065 Glib::PropertyProxy_ReadOnly< bool > Text::property_single_line_mode() const
1066 {
1067   return Glib::PropertyProxy_ReadOnly< bool >(this, "single-line-mode");
1068 }
1069 #endif //GLIBMM_PROPERTIES_ENABLED
1070 
1071 #ifdef GLIBMM_PROPERTIES_ENABLED
property_text()1072 Glib::PropertyProxy< Glib::ustring > Text::property_text()
1073 {
1074   return Glib::PropertyProxy< Glib::ustring >(this, "text");
1075 }
1076 #endif //GLIBMM_PROPERTIES_ENABLED
1077 
1078 #ifdef GLIBMM_PROPERTIES_ENABLED
property_text() const1079 Glib::PropertyProxy_ReadOnly< Glib::ustring > Text::property_text() const
1080 {
1081   return Glib::PropertyProxy_ReadOnly< Glib::ustring >(this, "text");
1082 }
1083 #endif //GLIBMM_PROPERTIES_ENABLED
1084 
1085 #ifdef GLIBMM_PROPERTIES_ENABLED
property_use_markup()1086 Glib::PropertyProxy< bool > Text::property_use_markup()
1087 {
1088   return Glib::PropertyProxy< bool >(this, "use-markup");
1089 }
1090 #endif //GLIBMM_PROPERTIES_ENABLED
1091 
1092 #ifdef GLIBMM_PROPERTIES_ENABLED
property_use_markup() const1093 Glib::PropertyProxy_ReadOnly< bool > Text::property_use_markup() const
1094 {
1095   return Glib::PropertyProxy_ReadOnly< bool >(this, "use-markup");
1096 }
1097 #endif //GLIBMM_PROPERTIES_ENABLED
1098 
1099 
on_activate()1100 void Clutter::Text::on_activate()
1101 {
1102   BaseClassType *const base = static_cast<BaseClassType*>(
1103       g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
1104   );
1105 
1106   if(base && base->activate)
1107     (*base->activate)(gobj());
1108 }
on_text_changed()1109 void Clutter::Text::on_text_changed()
1110 {
1111   BaseClassType *const base = static_cast<BaseClassType*>(
1112       g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
1113   );
1114 
1115   if(base && base->text_changed)
1116     (*base->text_changed)(gobj());
1117 }
on_cursor_changed()1118 void Clutter::Text::on_cursor_changed()
1119 {
1120   BaseClassType *const base = static_cast<BaseClassType*>(
1121       g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
1122   );
1123 
1124   if(base && base->cursor_changed)
1125     (*base->cursor_changed)(gobj());
1126 }
1127 
1128 
1129 } // namespace Clutter
1130 
1131 
1132