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