add new sigc++2 directory
[ardour.git] / libs / gtkmm2 / gtk / gtkmm / textview.cc
1 // Generated by gtkmmproc -- DO NOT MODIFY!
2
3
4 #include <gtkmm/textview.h>
5 #include <gtkmm/private/textview_p.h>
6
7 #include <gtk/gtktypebuiltins.h>
8 // -*- c++ -*-
9 /* $Id$ */
10
11 /* Copyright 2002 The gtkmm Development Team
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/gtktextview.h>
29
30 namespace Gtk
31 {
32
33 TextView::TextView(const Glib::RefPtr<TextBuffer>& buffer)
34 :
35   // Mark this class as non-derived to allow C++ vfuncs to be skipped.
36   Glib::ObjectBase(0),
37   Gtk::Container(Glib::ConstructParams(textview_class_.init()))
38 {
39   set_buffer(buffer);
40 }
41
42 bool TextView::scroll_to(TextBuffer::iterator& iter, double within_margin)
43 {
44   //The last 2 arguments are ignored if use_align is FALSE.
45   return gtk_text_view_scroll_to_iter(gobj(), (iter).gobj(), within_margin, FALSE, 0.0, 0.0);
46 }
47
48 bool TextView::scroll_to(TextBuffer::iterator& iter, double within_margin, double xalign, double yalign)
49 {
50   return gtk_text_view_scroll_to_iter(gobj(), (iter).gobj(), within_margin, TRUE /* use_align */, xalign, yalign);
51 }
52
53 void TextView::scroll_to(const Glib::RefPtr<TextBuffer::Mark>& mark, double within_margin)
54 {
55   //The last 2 arguments are ignored if use_align is FALSE.
56   gtk_text_view_scroll_to_mark(gobj(), Glib::unwrap(mark), within_margin, FALSE, 0.0, 0.0);
57 }
58
59 void TextView::scroll_to(const Glib::RefPtr<TextBuffer::Mark>& mark, double within_margin, double xalign, double yalign)
60 {
61   gtk_text_view_scroll_to_mark(gobj(), Glib::unwrap(mark), within_margin, TRUE /* use_align */, xalign, yalign);
62 }
63
64 #ifndef GTKMM_DISABLE_DEPRECATED
65
66 bool TextView::scroll_to_iter(TextBuffer::iterator& iter, double within_margin)
67 {
68   return scroll_to(iter, within_margin);
69 }
70
71 void TextView::scroll_to_mark(const Glib::RefPtr<TextBuffer::Mark>& mark, double within_margin)
72 {
73   scroll_to(mark, within_margin);
74 }
75   
76 void TextView::scroll_mark_onscreen(const Glib::RefPtr<TextBuffer::Mark>& mark)
77 {
78   scroll_to(mark);
79 }
80 #endif // GTKMM_DISABLE_DEPRECATED
81
82
83 } // namespace Gtk
84
85
86 namespace
87 {
88
89
90 static void TextView_signal_set_scroll_adjustments_callback(GtkTextView* self, GtkAdjustment* p0,GtkAdjustment* p1,void* data)
91 {
92   using namespace Gtk;
93   typedef sigc::slot< void,Adjustment*,Adjustment* > SlotType;
94
95   // Do not try to call a signal on a disassociated wrapper.
96   if(Glib::ObjectBase::_get_current_wrapper((GObject*) self))
97   {
98     #ifdef GLIBMM_EXCEPTIONS_ENABLED
99     try
100     {
101     #endif //GLIBMM_EXCEPTIONS_ENABLED
102       if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data))
103         (*static_cast<SlotType*>(slot))(Glib::wrap(p0)
104 , Glib::wrap(p1)
105 );
106     #ifdef GLIBMM_EXCEPTIONS_ENABLED
107     }
108     catch(...)
109     {
110       Glib::exception_handlers_invoke();
111     }
112     #endif //GLIBMM_EXCEPTIONS_ENABLED
113   }
114 }
115
116 static const Glib::SignalProxyInfo TextView_signal_set_scroll_adjustments_info =
117 {
118   "set_scroll_adjustments",
119   (GCallback) &TextView_signal_set_scroll_adjustments_callback,
120   (GCallback) &TextView_signal_set_scroll_adjustments_callback
121 };
122
123
124 static void TextView_signal_populate_popup_callback(GtkTextView* self, GtkMenu* p0,void* data)
125 {
126   using namespace Gtk;
127   typedef sigc::slot< void,Menu* > SlotType;
128
129   // Do not try to call a signal on a disassociated wrapper.
130   if(Glib::ObjectBase::_get_current_wrapper((GObject*) self))
131   {
132     #ifdef GLIBMM_EXCEPTIONS_ENABLED
133     try
134     {
135     #endif //GLIBMM_EXCEPTIONS_ENABLED
136       if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data))
137         (*static_cast<SlotType*>(slot))(Glib::wrap(p0)
138 );
139     #ifdef GLIBMM_EXCEPTIONS_ENABLED
140     }
141     catch(...)
142     {
143       Glib::exception_handlers_invoke();
144     }
145     #endif //GLIBMM_EXCEPTIONS_ENABLED
146   }
147 }
148
149 static const Glib::SignalProxyInfo TextView_signal_populate_popup_info =
150 {
151   "populate_popup",
152   (GCallback) &TextView_signal_populate_popup_callback,
153   (GCallback) &TextView_signal_populate_popup_callback
154 };
155
156
157 static const Glib::SignalProxyInfo TextView_signal_set_anchor_info =
158 {
159   "set_anchor",
160   (GCallback) &Glib::SignalProxyNormal::slot0_void_callback,
161   (GCallback) &Glib::SignalProxyNormal::slot0_void_callback
162 };
163
164
165 static void TextView_signal_insert_at_cursor_callback(GtkTextView* self, const gchar* p0,void* data)
166 {
167   using namespace Gtk;
168   typedef sigc::slot< void,const Glib::ustring& > SlotType;
169
170   // Do not try to call a signal on a disassociated wrapper.
171   if(Glib::ObjectBase::_get_current_wrapper((GObject*) self))
172   {
173     #ifdef GLIBMM_EXCEPTIONS_ENABLED
174     try
175     {
176     #endif //GLIBMM_EXCEPTIONS_ENABLED
177       if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data))
178         (*static_cast<SlotType*>(slot))(Glib::convert_const_gchar_ptr_to_ustring(p0)
179 );
180     #ifdef GLIBMM_EXCEPTIONS_ENABLED
181     }
182     catch(...)
183     {
184       Glib::exception_handlers_invoke();
185     }
186     #endif //GLIBMM_EXCEPTIONS_ENABLED
187   }
188 }
189
190 static const Glib::SignalProxyInfo TextView_signal_insert_at_cursor_info =
191 {
192   "insert_at_cursor",
193   (GCallback) &TextView_signal_insert_at_cursor_callback,
194   (GCallback) &TextView_signal_insert_at_cursor_callback
195 };
196
197
198 } // anonymous namespace
199
200 // static
201 GType Glib::Value<Gtk::TextWindowType>::value_type()
202 {
203   return gtk_text_window_type_get_type();
204 }
205
206
207 namespace Glib
208 {
209
210 Gtk::TextView* wrap(GtkTextView* object, bool take_copy)
211 {
212   return dynamic_cast<Gtk::TextView *> (Glib::wrap_auto ((GObject*)(object), take_copy));
213 }
214
215 } /* namespace Glib */
216
217 namespace Gtk
218 {
219
220
221 /* The *_Class implementation: */
222
223 const Glib::Class& TextView_Class::init()
224 {
225   if(!gtype_) // create the GType if necessary
226   {
227     // Glib::Class has to know the class init function to clone custom types.
228     class_init_func_ = &TextView_Class::class_init_function;
229
230     // This is actually just optimized away, apparently with no harm.
231     // Make sure that the parent type has been created.
232     //CppClassParent::CppObjectType::get_type();
233
234     // Create the wrapper type, with the same class/instance size as the base type.
235     register_derived_type(gtk_text_view_get_type());
236
237     // Add derived versions of interfaces, if the C type implements any interfaces:
238   }
239
240   return *this;
241 }
242
243 void TextView_Class::class_init_function(void* g_class, void* class_data)
244 {
245   BaseClassType *const klass = static_cast<BaseClassType*>(g_class);
246   CppClassParent::class_init_function(klass, class_data);
247
248 #ifdef GLIBMM_VFUNCS_ENABLED
249 #endif //GLIBMM_VFUNCS_ENABLED
250
251 #ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
252   klass->set_scroll_adjustments = &set_scroll_adjustments_callback;
253   klass->populate_popup = &populate_popup_callback;
254   klass->set_anchor = &set_anchor_callback;
255   klass->insert_at_cursor = &insert_at_cursor_callback;
256 #endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
257 }
258
259 #ifdef GLIBMM_VFUNCS_ENABLED
260 #endif //GLIBMM_VFUNCS_ENABLED
261
262 #ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
263 void TextView_Class::set_scroll_adjustments_callback(GtkTextView* self, GtkAdjustment* p0, GtkAdjustment* p1)
264 {
265   Glib::ObjectBase *const obj_base = static_cast<Glib::ObjectBase*>(
266       Glib::ObjectBase::_get_current_wrapper((GObject*)self));
267
268   // Non-gtkmmproc-generated custom classes implicitly call the default
269   // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
270   // generated classes can use this optimisation, which avoids the unnecessary
271   // parameter conversions if there is no possibility of the virtual function
272   // being overridden:
273   if(obj_base && obj_base->is_derived_())
274   {
275     CppObjectType *const obj = dynamic_cast<CppObjectType* const>(obj_base);
276     if(obj) // This can be NULL during destruction.
277     {
278       #ifdef GLIBMM_EXCEPTIONS_ENABLED
279       try // Trap C++ exceptions which would normally be lost because this is a C callback.
280       {
281       #endif //GLIBMM_EXCEPTIONS_ENABLED
282         // Call the virtual member method, which derived classes might override.
283         obj->on_set_scroll_adjustments(Glib::wrap(p0)
284 , Glib::wrap(p1)
285 );
286         return;
287       #ifdef GLIBMM_EXCEPTIONS_ENABLED
288       }
289       catch(...)
290       {
291         Glib::exception_handlers_invoke();
292       }
293       #endif //GLIBMM_EXCEPTIONS_ENABLED
294     }
295   }
296   
297   BaseClassType *const base = static_cast<BaseClassType*>(
298         g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
299     );
300
301   // Call the original underlying C function:
302   if(base && base->set_scroll_adjustments)
303     (*base->set_scroll_adjustments)(self, p0, p1);
304 }
305 void TextView_Class::populate_popup_callback(GtkTextView* self, GtkMenu* p0)
306 {
307   Glib::ObjectBase *const obj_base = static_cast<Glib::ObjectBase*>(
308       Glib::ObjectBase::_get_current_wrapper((GObject*)self));
309
310   // Non-gtkmmproc-generated custom classes implicitly call the default
311   // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
312   // generated classes can use this optimisation, which avoids the unnecessary
313   // parameter conversions if there is no possibility of the virtual function
314   // being overridden:
315   if(obj_base && obj_base->is_derived_())
316   {
317     CppObjectType *const obj = dynamic_cast<CppObjectType* const>(obj_base);
318     if(obj) // This can be NULL during destruction.
319     {
320       #ifdef GLIBMM_EXCEPTIONS_ENABLED
321       try // Trap C++ exceptions which would normally be lost because this is a C callback.
322       {
323       #endif //GLIBMM_EXCEPTIONS_ENABLED
324         // Call the virtual member method, which derived classes might override.
325         obj->on_populate_popup(Glib::wrap(p0)
326 );
327         return;
328       #ifdef GLIBMM_EXCEPTIONS_ENABLED
329       }
330       catch(...)
331       {
332         Glib::exception_handlers_invoke();
333       }
334       #endif //GLIBMM_EXCEPTIONS_ENABLED
335     }
336   }
337   
338   BaseClassType *const base = static_cast<BaseClassType*>(
339         g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
340     );
341
342   // Call the original underlying C function:
343   if(base && base->populate_popup)
344     (*base->populate_popup)(self, p0);
345 }
346 void TextView_Class::set_anchor_callback(GtkTextView* self)
347 {
348   Glib::ObjectBase *const obj_base = static_cast<Glib::ObjectBase*>(
349       Glib::ObjectBase::_get_current_wrapper((GObject*)self));
350
351   // Non-gtkmmproc-generated custom classes implicitly call the default
352   // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
353   // generated classes can use this optimisation, which avoids the unnecessary
354   // parameter conversions if there is no possibility of the virtual function
355   // being overridden:
356   if(obj_base && obj_base->is_derived_())
357   {
358     CppObjectType *const obj = dynamic_cast<CppObjectType* const>(obj_base);
359     if(obj) // This can be NULL during destruction.
360     {
361       #ifdef GLIBMM_EXCEPTIONS_ENABLED
362       try // Trap C++ exceptions which would normally be lost because this is a C callback.
363       {
364       #endif //GLIBMM_EXCEPTIONS_ENABLED
365         // Call the virtual member method, which derived classes might override.
366         obj->on_set_anchor();
367         return;
368       #ifdef GLIBMM_EXCEPTIONS_ENABLED
369       }
370       catch(...)
371       {
372         Glib::exception_handlers_invoke();
373       }
374       #endif //GLIBMM_EXCEPTIONS_ENABLED
375     }
376   }
377   
378   BaseClassType *const base = static_cast<BaseClassType*>(
379         g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
380     );
381
382   // Call the original underlying C function:
383   if(base && base->set_anchor)
384     (*base->set_anchor)(self);
385 }
386 void TextView_Class::insert_at_cursor_callback(GtkTextView* self, const gchar* p0)
387 {
388   Glib::ObjectBase *const obj_base = static_cast<Glib::ObjectBase*>(
389       Glib::ObjectBase::_get_current_wrapper((GObject*)self));
390
391   // Non-gtkmmproc-generated custom classes implicitly call the default
392   // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
393   // generated classes can use this optimisation, which avoids the unnecessary
394   // parameter conversions if there is no possibility of the virtual function
395   // being overridden:
396   if(obj_base && obj_base->is_derived_())
397   {
398     CppObjectType *const obj = dynamic_cast<CppObjectType* const>(obj_base);
399     if(obj) // This can be NULL during destruction.
400     {
401       #ifdef GLIBMM_EXCEPTIONS_ENABLED
402       try // Trap C++ exceptions which would normally be lost because this is a C callback.
403       {
404       #endif //GLIBMM_EXCEPTIONS_ENABLED
405         // Call the virtual member method, which derived classes might override.
406         obj->on_insert_at_cursor(Glib::convert_const_gchar_ptr_to_ustring(p0)
407 );
408         return;
409       #ifdef GLIBMM_EXCEPTIONS_ENABLED
410       }
411       catch(...)
412       {
413         Glib::exception_handlers_invoke();
414       }
415       #endif //GLIBMM_EXCEPTIONS_ENABLED
416     }
417   }
418   
419   BaseClassType *const base = static_cast<BaseClassType*>(
420         g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
421     );
422
423   // Call the original underlying C function:
424   if(base && base->insert_at_cursor)
425     (*base->insert_at_cursor)(self, p0);
426 }
427 #endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
428
429
430 Glib::ObjectBase* TextView_Class::wrap_new(GObject* o)
431 {
432   return manage(new TextView((GtkTextView*)(o)));
433
434 }
435
436
437 /* The implementation: */
438
439 TextView::TextView(const Glib::ConstructParams& construct_params)
440 :
441   Gtk::Container(construct_params)
442 {
443   }
444
445 TextView::TextView(GtkTextView* castitem)
446 :
447   Gtk::Container((GtkContainer*)(castitem))
448 {
449   }
450
451 TextView::~TextView()
452 {
453   destroy_();
454 }
455
456 TextView::CppClassType TextView::textview_class_; // initialize static member
457
458 GType TextView::get_type()
459 {
460   return textview_class_.init().get_type();
461 }
462
463 GType TextView::get_base_type()
464 {
465   return gtk_text_view_get_type();
466 }
467
468
469 TextView::TextView()
470 :
471   // Mark this class as non-derived to allow C++ vfuncs to be skipped.
472   Glib::ObjectBase(0),
473   Gtk::Container(Glib::ConstructParams(textview_class_.init()))
474 {
475   }
476
477 void TextView::set_buffer(const Glib::RefPtr<TextBuffer>& buffer)
478 {
479 gtk_text_view_set_buffer(gobj(), Glib::unwrap(buffer)); 
480 }
481
482 Glib::RefPtr<TextBuffer> TextView::get_buffer()
483 {
484
485   Glib::RefPtr<TextBuffer> retvalue = Glib::wrap(gtk_text_view_get_buffer(gobj()));
486   if(retvalue)
487     retvalue->reference(); //The function does not do a ref for us.
488   return retvalue;
489
490 }
491
492 Glib::RefPtr<const TextBuffer> TextView::get_buffer() const
493 {
494   return const_cast<TextView*>(this)->get_buffer();
495 }
496
497 bool TextView::move_mark_onscreen(const Glib::RefPtr<TextBuffer::Mark>& mark)
498 {
499   return gtk_text_view_move_mark_onscreen(gobj(), Glib::unwrap(mark));
500 }
501
502 bool TextView::place_cursor_onscreen()
503 {
504   return gtk_text_view_place_cursor_onscreen(gobj());
505 }
506
507 void TextView::get_visible_rect(Gdk::Rectangle& visible_rect) const
508 {
509 gtk_text_view_get_visible_rect(const_cast<GtkTextView*>(gobj()), (visible_rect).gobj()); 
510 }
511
512 void TextView::set_cursor_visible(bool setting)
513 {
514 gtk_text_view_set_cursor_visible(gobj(), static_cast<int>(setting)); 
515 }
516
517 bool TextView::get_cursor_visible() const
518 {
519   return gtk_text_view_get_cursor_visible(const_cast<GtkTextView*>(gobj()));
520 }
521
522 void TextView::get_iter_location(const TextBuffer::iterator& iter, Gdk::Rectangle& location) const
523 {
524 gtk_text_view_get_iter_location(const_cast<GtkTextView*>(gobj()), (iter).gobj(), (location).gobj()); 
525 }
526
527 void TextView::get_iter_at_location(TextBuffer::iterator& iter, int x, int y) const
528 {
529 gtk_text_view_get_iter_at_location(const_cast<GtkTextView*>(gobj()), (iter).gobj(), x, y); 
530 }
531
532 void TextView::get_iter_at_position(TextBuffer::iterator& iter, int& trailing, int x, int y) const
533 {
534 gtk_text_view_get_iter_at_position(const_cast<GtkTextView*>(gobj()), (iter).gobj(), &trailing, x, y); 
535 }
536
537 void TextView::get_line_yrange(const TextBuffer::iterator& iter, int& y, int& height) const
538 {
539 gtk_text_view_get_line_yrange(const_cast<GtkTextView*>(gobj()), (iter).gobj(), &y, &height); 
540 }
541
542 void TextView::get_line_at_y(TextBuffer::iterator& target_iter, int y, int& line_top) const
543 {
544 gtk_text_view_get_line_at_y(const_cast<GtkTextView*>(gobj()), (target_iter).gobj(), y, &line_top); 
545 }
546
547 void TextView::buffer_to_window_coords(TextWindowType win, int buffer_x, int buffer_y, int& window_x, int& window_y) const
548 {
549 gtk_text_view_buffer_to_window_coords(const_cast<GtkTextView*>(gobj()), ((GtkTextWindowType)(win)), buffer_x, buffer_y, &window_x, &window_y); 
550 }
551
552 void TextView::window_to_buffer_coords(TextWindowType win, int window_x, int window_y, int& buffer_x, int& buffer_y) const
553 {
554 gtk_text_view_window_to_buffer_coords(const_cast<GtkTextView*>(gobj()), ((GtkTextWindowType)(win)), window_x, window_y, &buffer_x, &buffer_y); 
555 }
556
557 Glib::RefPtr<Gdk::Window> TextView::get_window(TextWindowType win)
558 {
559
560   Glib::RefPtr<Gdk::Window> retvalue = Glib::wrap((GdkWindowObject*)(gtk_text_view_get_window(gobj(), ((GtkTextWindowType)(win)))));
561   if(retvalue)
562     retvalue->reference(); //The function does not do a ref for us.
563   return retvalue;
564
565 }
566
567 Glib::RefPtr<const Gdk::Window> TextView::get_window(TextWindowType win) const
568 {
569   return const_cast<TextView*>(this)->get_window(win);
570 }
571
572 TextWindowType TextView::get_window_type(const Glib::RefPtr<Gdk::Window>& window)
573 {
574   return ((TextWindowType)(gtk_text_view_get_window_type(gobj(), Glib::unwrap(window))));
575 }
576
577 void TextView::set_border_window_size(TextWindowType type, int size)
578 {
579 gtk_text_view_set_border_window_size(gobj(), ((GtkTextWindowType)(type)), size); 
580 }
581
582 int TextView::get_border_window_size(TextWindowType type) const
583 {
584   return gtk_text_view_get_border_window_size(const_cast<GtkTextView*>(gobj()), ((GtkTextWindowType)(type)));
585 }
586
587 bool TextView::forward_display_line(TextBuffer::iterator& iter)
588 {
589   return gtk_text_view_forward_display_line(gobj(), (iter).gobj());
590 }
591
592 bool TextView::backward_display_line(TextBuffer::iterator& iter)
593 {
594   return gtk_text_view_backward_display_line(gobj(), (iter).gobj());
595 }
596
597 bool TextView::forward_display_line_end(TextBuffer::iterator& iter)
598 {
599   return gtk_text_view_forward_display_line_end(gobj(), (iter).gobj());
600 }
601
602 bool TextView::backward_display_line_start(TextBuffer::iterator& iter)
603 {
604   return gtk_text_view_backward_display_line_start(gobj(), (iter).gobj());
605 }
606
607 bool TextView::starts_display_line(const TextBuffer::iterator& iter)
608 {
609   return gtk_text_view_starts_display_line(gobj(), (iter).gobj());
610 }
611
612 bool TextView::move_visually(TextBuffer::iterator& iter, int count)
613 {
614   return gtk_text_view_move_visually(gobj(), (iter).gobj(), count);
615 }
616
617 void TextView::add_child_at_anchor(Widget& child, const Glib::RefPtr<TextBuffer::ChildAnchor>& anchor)
618 {
619 gtk_text_view_add_child_at_anchor(gobj(), (child).gobj(), Glib::unwrap(anchor)); 
620 }
621
622 void TextView::add_child_in_window(Widget& child, TextWindowType which_window, int xpos, int ypos)
623 {
624 gtk_text_view_add_child_in_window(gobj(), (child).gobj(), ((GtkTextWindowType)(which_window)), xpos, ypos); 
625 }
626
627 void TextView::move_child(Widget& child, int xpos, int ypos)
628 {
629 gtk_text_view_move_child(gobj(), (child).gobj(), xpos, ypos); 
630 }
631
632 void TextView::set_wrap_mode(WrapMode wrap_mode)
633 {
634 gtk_text_view_set_wrap_mode(gobj(), ((GtkWrapMode)(wrap_mode))); 
635 }
636
637 WrapMode TextView::get_wrap_mode() const
638 {
639   return ((WrapMode)(gtk_text_view_get_wrap_mode(const_cast<GtkTextView*>(gobj()))));
640 }
641
642 void TextView::set_editable(bool setting)
643 {
644 gtk_text_view_set_editable(gobj(), static_cast<int>(setting)); 
645 }
646
647 bool TextView::get_editable() const
648 {
649   return gtk_text_view_get_editable(const_cast<GtkTextView*>(gobj()));
650 }
651
652 void TextView::set_pixels_above_lines(int pixels_above_lines)
653 {
654 gtk_text_view_set_pixels_above_lines(gobj(), pixels_above_lines); 
655 }
656
657 int TextView::get_pixels_above_lines() const
658 {
659   return gtk_text_view_get_pixels_above_lines(const_cast<GtkTextView*>(gobj()));
660 }
661
662 void TextView::set_pixels_below_lines(int pixels_below_lines)
663 {
664 gtk_text_view_set_pixels_below_lines(gobj(), pixels_below_lines); 
665 }
666
667 int TextView::get_pixels_below_lines() const
668 {
669   return gtk_text_view_get_pixels_below_lines(const_cast<GtkTextView*>(gobj()));
670 }
671
672 void TextView::set_pixels_inside_wrap(int pixels_inside_wrap)
673 {
674 gtk_text_view_set_pixels_inside_wrap(gobj(), pixels_inside_wrap); 
675 }
676
677 int TextView::get_pixels_inside_wrap() const
678 {
679   return gtk_text_view_get_pixels_inside_wrap(const_cast<GtkTextView*>(gobj()));
680 }
681
682 void TextView::set_justification(Justification justification)
683 {
684 gtk_text_view_set_justification(gobj(), ((GtkJustification)(justification))); 
685 }
686
687 Justification TextView::get_justification() const
688 {
689   return ((Justification)(gtk_text_view_get_justification(const_cast<GtkTextView*>(gobj()))));
690 }
691
692 void TextView::set_left_margin(int left_margin)
693 {
694 gtk_text_view_set_left_margin(gobj(), left_margin); 
695 }
696
697 int TextView::get_left_margin() const
698 {
699   return gtk_text_view_get_left_margin(const_cast<GtkTextView*>(gobj()));
700 }
701
702 void TextView::set_right_margin(int right_margin)
703 {
704 gtk_text_view_set_right_margin(gobj(), right_margin); 
705 }
706
707 int TextView::get_right_margin() const
708 {
709   return gtk_text_view_get_right_margin(const_cast<GtkTextView*>(gobj()));
710 }
711
712 void TextView::set_indent(int indent)
713 {
714 gtk_text_view_set_indent(gobj(), indent); 
715 }
716
717 int TextView::get_indent() const
718 {
719   return gtk_text_view_get_indent(const_cast<GtkTextView*>(gobj()));
720 }
721
722 void TextView::set_tabs(Pango::TabArray& tabs)
723 {
724 gtk_text_view_set_tabs(gobj(), (tabs).gobj()); 
725 }
726
727 Pango::TabArray TextView::get_tabs() const
728 {
729   return Pango::TabArray((gtk_text_view_get_tabs(const_cast<GtkTextView*>(gobj()))));
730 }
731
732 TextAttributes TextView::get_default_attributes() const
733 {
734   return TextAttributes(gtk_text_view_get_default_attributes(const_cast<GtkTextView*>(gobj())));
735 }
736
737 void TextView::set_overwrite(bool overwrite)
738 {
739 gtk_text_view_set_overwrite(gobj(), static_cast<int>(overwrite)); 
740 }
741
742 bool TextView::get_overwrite() const
743 {
744   return gtk_text_view_get_overwrite(const_cast<GtkTextView*>(gobj()));
745 }
746
747 void TextView::set_accepts_tab(bool accepts_tab)
748 {
749 gtk_text_view_set_accepts_tab(gobj(), static_cast<int>(accepts_tab)); 
750 }
751
752 bool TextView::get_accepts_tab() const
753 {
754   return gtk_text_view_get_accepts_tab(const_cast<GtkTextView*>(gobj()));
755 }
756
757
758 Glib::SignalProxy2< void,Adjustment*,Adjustment* > TextView::signal_set_scroll_adjustments()
759 {
760   return Glib::SignalProxy2< void,Adjustment*,Adjustment* >(this, &TextView_signal_set_scroll_adjustments_info);
761 }
762
763
764 Glib::SignalProxy1< void,Menu* > TextView::signal_populate_popup()
765 {
766   return Glib::SignalProxy1< void,Menu* >(this, &TextView_signal_populate_popup_info);
767 }
768
769
770 Glib::SignalProxy0< void > TextView::signal_set_anchor()
771 {
772   return Glib::SignalProxy0< void >(this, &TextView_signal_set_anchor_info);
773 }
774
775
776 Glib::SignalProxy1< void,const Glib::ustring& > TextView::signal_insert_at_cursor()
777 {
778   return Glib::SignalProxy1< void,const Glib::ustring& >(this, &TextView_signal_insert_at_cursor_info);
779 }
780
781
782 #ifdef GLIBMM_PROPERTIES_ENABLED
783 Glib::PropertyProxy<int> TextView::property_pixels_above_lines() 
784 {
785   return Glib::PropertyProxy<int>(this, "pixels-above-lines");
786 }
787 #endif //GLIBMM_PROPERTIES_ENABLED
788
789 #ifdef GLIBMM_PROPERTIES_ENABLED
790 Glib::PropertyProxy_ReadOnly<int> TextView::property_pixels_above_lines() const
791 {
792   return Glib::PropertyProxy_ReadOnly<int>(this, "pixels-above-lines");
793 }
794 #endif //GLIBMM_PROPERTIES_ENABLED
795
796 #ifdef GLIBMM_PROPERTIES_ENABLED
797 Glib::PropertyProxy<int> TextView::property_pixels_below_lines() 
798 {
799   return Glib::PropertyProxy<int>(this, "pixels-below-lines");
800 }
801 #endif //GLIBMM_PROPERTIES_ENABLED
802
803 #ifdef GLIBMM_PROPERTIES_ENABLED
804 Glib::PropertyProxy_ReadOnly<int> TextView::property_pixels_below_lines() const
805 {
806   return Glib::PropertyProxy_ReadOnly<int>(this, "pixels-below-lines");
807 }
808 #endif //GLIBMM_PROPERTIES_ENABLED
809
810 #ifdef GLIBMM_PROPERTIES_ENABLED
811 Glib::PropertyProxy<int> TextView::property_pixels_inside_wrap() 
812 {
813   return Glib::PropertyProxy<int>(this, "pixels-inside-wrap");
814 }
815 #endif //GLIBMM_PROPERTIES_ENABLED
816
817 #ifdef GLIBMM_PROPERTIES_ENABLED
818 Glib::PropertyProxy_ReadOnly<int> TextView::property_pixels_inside_wrap() const
819 {
820   return Glib::PropertyProxy_ReadOnly<int>(this, "pixels-inside-wrap");
821 }
822 #endif //GLIBMM_PROPERTIES_ENABLED
823
824 #ifdef GLIBMM_PROPERTIES_ENABLED
825 Glib::PropertyProxy<bool> TextView::property_editable() 
826 {
827   return Glib::PropertyProxy<bool>(this, "editable");
828 }
829 #endif //GLIBMM_PROPERTIES_ENABLED
830
831 #ifdef GLIBMM_PROPERTIES_ENABLED
832 Glib::PropertyProxy_ReadOnly<bool> TextView::property_editable() const
833 {
834   return Glib::PropertyProxy_ReadOnly<bool>(this, "editable");
835 }
836 #endif //GLIBMM_PROPERTIES_ENABLED
837
838 #ifdef GLIBMM_PROPERTIES_ENABLED
839 Glib::PropertyProxy<WrapMode> TextView::property_wrap_mode() 
840 {
841   return Glib::PropertyProxy<WrapMode>(this, "wrap-mode");
842 }
843 #endif //GLIBMM_PROPERTIES_ENABLED
844
845 #ifdef GLIBMM_PROPERTIES_ENABLED
846 Glib::PropertyProxy_ReadOnly<WrapMode> TextView::property_wrap_mode() const
847 {
848   return Glib::PropertyProxy_ReadOnly<WrapMode>(this, "wrap-mode");
849 }
850 #endif //GLIBMM_PROPERTIES_ENABLED
851
852 #ifdef GLIBMM_PROPERTIES_ENABLED
853 Glib::PropertyProxy<Justification> TextView::property_justification() 
854 {
855   return Glib::PropertyProxy<Justification>(this, "justification");
856 }
857 #endif //GLIBMM_PROPERTIES_ENABLED
858
859 #ifdef GLIBMM_PROPERTIES_ENABLED
860 Glib::PropertyProxy_ReadOnly<Justification> TextView::property_justification() const
861 {
862   return Glib::PropertyProxy_ReadOnly<Justification>(this, "justification");
863 }
864 #endif //GLIBMM_PROPERTIES_ENABLED
865
866 #ifdef GLIBMM_PROPERTIES_ENABLED
867 Glib::PropertyProxy<int> TextView::property_left_margin() 
868 {
869   return Glib::PropertyProxy<int>(this, "left-margin");
870 }
871 #endif //GLIBMM_PROPERTIES_ENABLED
872
873 #ifdef GLIBMM_PROPERTIES_ENABLED
874 Glib::PropertyProxy_ReadOnly<int> TextView::property_left_margin() const
875 {
876   return Glib::PropertyProxy_ReadOnly<int>(this, "left-margin");
877 }
878 #endif //GLIBMM_PROPERTIES_ENABLED
879
880 #ifdef GLIBMM_PROPERTIES_ENABLED
881 Glib::PropertyProxy<int> TextView::property_right_margin() 
882 {
883   return Glib::PropertyProxy<int>(this, "right-margin");
884 }
885 #endif //GLIBMM_PROPERTIES_ENABLED
886
887 #ifdef GLIBMM_PROPERTIES_ENABLED
888 Glib::PropertyProxy_ReadOnly<int> TextView::property_right_margin() const
889 {
890   return Glib::PropertyProxy_ReadOnly<int>(this, "right-margin");
891 }
892 #endif //GLIBMM_PROPERTIES_ENABLED
893
894 #ifdef GLIBMM_PROPERTIES_ENABLED
895 Glib::PropertyProxy<int> TextView::property_indent() 
896 {
897   return Glib::PropertyProxy<int>(this, "indent");
898 }
899 #endif //GLIBMM_PROPERTIES_ENABLED
900
901 #ifdef GLIBMM_PROPERTIES_ENABLED
902 Glib::PropertyProxy_ReadOnly<int> TextView::property_indent() const
903 {
904   return Glib::PropertyProxy_ReadOnly<int>(this, "indent");
905 }
906 #endif //GLIBMM_PROPERTIES_ENABLED
907
908 #ifdef GLIBMM_PROPERTIES_ENABLED
909 Glib::PropertyProxy<Pango::TabArray> TextView::property_tabs() 
910 {
911   return Glib::PropertyProxy<Pango::TabArray>(this, "tabs");
912 }
913 #endif //GLIBMM_PROPERTIES_ENABLED
914
915 #ifdef GLIBMM_PROPERTIES_ENABLED
916 Glib::PropertyProxy_ReadOnly<Pango::TabArray> TextView::property_tabs() const
917 {
918   return Glib::PropertyProxy_ReadOnly<Pango::TabArray>(this, "tabs");
919 }
920 #endif //GLIBMM_PROPERTIES_ENABLED
921
922 #ifdef GLIBMM_PROPERTIES_ENABLED
923 Glib::PropertyProxy<bool> TextView::property_cursor_visible() 
924 {
925   return Glib::PropertyProxy<bool>(this, "cursor-visible");
926 }
927 #endif //GLIBMM_PROPERTIES_ENABLED
928
929 #ifdef GLIBMM_PROPERTIES_ENABLED
930 Glib::PropertyProxy_ReadOnly<bool> TextView::property_cursor_visible() const
931 {
932   return Glib::PropertyProxy_ReadOnly<bool>(this, "cursor-visible");
933 }
934 #endif //GLIBMM_PROPERTIES_ENABLED
935
936 #ifdef GLIBMM_PROPERTIES_ENABLED
937 Glib::PropertyProxy< Glib::RefPtr<TextBuffer> > TextView::property_buffer() 
938 {
939   return Glib::PropertyProxy< Glib::RefPtr<TextBuffer> >(this, "buffer");
940 }
941 #endif //GLIBMM_PROPERTIES_ENABLED
942
943 #ifdef GLIBMM_PROPERTIES_ENABLED
944 Glib::PropertyProxy_ReadOnly< Glib::RefPtr<TextBuffer> > TextView::property_buffer() const
945 {
946   return Glib::PropertyProxy_ReadOnly< Glib::RefPtr<TextBuffer> >(this, "buffer");
947 }
948 #endif //GLIBMM_PROPERTIES_ENABLED
949
950 #ifdef GLIBMM_PROPERTIES_ENABLED
951 Glib::PropertyProxy<bool> TextView::property_overwrite() 
952 {
953   return Glib::PropertyProxy<bool>(this, "overwrite");
954 }
955 #endif //GLIBMM_PROPERTIES_ENABLED
956
957 #ifdef GLIBMM_PROPERTIES_ENABLED
958 Glib::PropertyProxy_ReadOnly<bool> TextView::property_overwrite() const
959 {
960   return Glib::PropertyProxy_ReadOnly<bool>(this, "overwrite");
961 }
962 #endif //GLIBMM_PROPERTIES_ENABLED
963
964 #ifdef GLIBMM_PROPERTIES_ENABLED
965 Glib::PropertyProxy<bool> TextView::property_accepts_tab() 
966 {
967   return Glib::PropertyProxy<bool>(this, "accepts-tab");
968 }
969 #endif //GLIBMM_PROPERTIES_ENABLED
970
971 #ifdef GLIBMM_PROPERTIES_ENABLED
972 Glib::PropertyProxy_ReadOnly<bool> TextView::property_accepts_tab() const
973 {
974   return Glib::PropertyProxy_ReadOnly<bool>(this, "accepts-tab");
975 }
976 #endif //GLIBMM_PROPERTIES_ENABLED
977
978
979 #ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
980 void Gtk::TextView::on_set_scroll_adjustments(Adjustment* hadjustment, Adjustment* vadjustment)
981 {
982   BaseClassType *const base = static_cast<BaseClassType*>(
983       g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
984   );
985
986   if(base && base->set_scroll_adjustments)
987     (*base->set_scroll_adjustments)(gobj(),(GtkAdjustment*)Glib::unwrap(hadjustment),(GtkAdjustment*)Glib::unwrap(vadjustment));
988 }
989 void Gtk::TextView::on_populate_popup(Menu* menu)
990 {
991   BaseClassType *const base = static_cast<BaseClassType*>(
992       g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
993   );
994
995   if(base && base->populate_popup)
996     (*base->populate_popup)(gobj(),(GtkMenu*)Glib::unwrap(menu));
997 }
998 void Gtk::TextView::on_set_anchor()
999 {
1000   BaseClassType *const base = static_cast<BaseClassType*>(
1001       g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
1002   );
1003
1004   if(base && base->set_anchor)
1005     (*base->set_anchor)(gobj());
1006 }
1007 void Gtk::TextView::on_insert_at_cursor(const Glib::ustring& str)
1008 {
1009   BaseClassType *const base = static_cast<BaseClassType*>(
1010       g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
1011   );
1012
1013   if(base && base->insert_at_cursor)
1014     (*base->insert_at_cursor)(gobj(),str.c_str());
1015 }
1016 #endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
1017
1018 #ifdef GLIBMM_VFUNCS_ENABLED
1019 #endif //GLIBMM_VFUNCS_ENABLED
1020
1021
1022 } // namespace Gtk
1023
1024