Install ardour as a binary, a script and a set of shared
[ardour.git] / libs / gtkmm2 / gtk / gtkmm / textmark.cc
1 // Generated by gtkmmproc -- DO NOT MODIFY!
2
3 #include <gtkmm/textmark.h>
4 #include <gtkmm/private/textmark_p.h>
5
6 // -*- c++ -*-
7 /* $Id$ */
8
9 /* 
10  *
11  * Copyright 1998-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
29 #include <gtkmm/textmark.h>
30 #include <gtkmm/textbuffer.h>
31 #include <gtk/gtktextmark.h>
32
33
34 namespace Gtk
35 {
36
37 TextIter TextMark::get_iter()
38 {
39   Glib::RefPtr<TextMark> mark = Glib::RefPtr<TextMark>(this);
40   mark->reference(); // RefPtr (T_CppObject* pCppObject) does not do a reference
41   return get_buffer()->get_iter_at_mark(mark);
42 }
43
44 } //namespace Gtk
45
46
47 namespace
48 {
49 } // anonymous namespace
50
51
52 namespace Glib
53 {
54
55 Glib::RefPtr<Gtk::TextMark> wrap(GtkTextMark* object, bool take_copy)
56 {
57   return Glib::RefPtr<Gtk::TextMark>( dynamic_cast<Gtk::TextMark*> (Glib::wrap_auto ((GObject*)(object), take_copy)) );
58   //We use dynamic_cast<> in case of multiple inheritance.
59 }
60
61 } /* namespace Glib */
62
63
64 namespace Gtk
65 {
66
67
68 /* The *_Class implementation: */
69
70 const Glib::Class& TextMark_Class::init()
71 {
72   if(!gtype_) // create the GType if necessary
73   {
74     // Glib::Class has to know the class init function to clone custom types.
75     class_init_func_ = &TextMark_Class::class_init_function;
76
77     // This is actually just optimized away, apparently with no harm.
78     // Make sure that the parent type has been created.
79     //CppClassParent::CppObjectType::get_type();
80
81     // Create the wrapper type, with the same class/instance size as the base type.
82     register_derived_type(gtk_text_mark_get_type());
83
84     // Add derived versions of interfaces, if the C type implements any interfaces:
85   }
86
87   return *this;
88 }
89
90 void TextMark_Class::class_init_function(void* g_class, void* class_data)
91 {
92   BaseClassType *const klass = static_cast<BaseClassType*>(g_class);
93   CppClassParent::class_init_function(klass, class_data);
94
95 }
96
97
98 Glib::ObjectBase* TextMark_Class::wrap_new(GObject* object)
99 {
100   return new TextMark((GtkTextMark*)object);
101 }
102
103
104 /* The implementation: */
105
106 GtkTextMark* TextMark::gobj_copy()
107 {
108   reference();
109   return gobj();
110 }
111
112 TextMark::TextMark(const Glib::ConstructParams& construct_params)
113 :
114   Glib::Object(construct_params)
115 {}
116
117 TextMark::TextMark(GtkTextMark* castitem)
118 :
119   Glib::Object((GObject*)(castitem))
120 {}
121
122 TextMark::~TextMark()
123 {}
124
125
126 TextMark::CppClassType TextMark::textmark_class_; // initialize static member
127
128 GType TextMark::get_type()
129 {
130   return textmark_class_.init().get_type();
131 }
132
133 GType TextMark::get_base_type()
134 {
135   return gtk_text_mark_get_type();
136 }
137
138
139 void TextMark::set_visible(bool setting)
140 {
141   gtk_text_mark_set_visible(gobj(), static_cast<int>(setting));
142 }
143
144 bool TextMark::get_visible() const
145 {
146   return gtk_text_mark_get_visible(const_cast<GtkTextMark*>(gobj()));
147 }
148
149 Glib::ustring TextMark::get_name() const
150 {
151   return Glib::convert_const_gchar_ptr_to_ustring(gtk_text_mark_get_name(const_cast<GtkTextMark*>(gobj())));
152 }
153
154 bool TextMark::get_deleted() const
155 {
156   return gtk_text_mark_get_deleted(const_cast<GtkTextMark*>(gobj()));
157 }
158
159 Glib::RefPtr<TextBuffer> TextMark::get_buffer()
160 {
161
162   Glib::RefPtr<TextBuffer> retvalue = Glib::wrap(gtk_text_mark_get_buffer(gobj()));
163
164   if(retvalue)
165     retvalue->reference(); //The function does not do a ref for us.
166   return retvalue;
167 }
168
169 Glib::RefPtr<const TextBuffer> TextMark::get_buffer() const
170 {
171
172   Glib::RefPtr<const TextBuffer> retvalue = Glib::wrap(gtk_text_mark_get_buffer(const_cast<GtkTextMark*>(gobj())));
173
174   if(retvalue)
175     retvalue->reference(); //The function does not do a ref for us.
176   return retvalue;
177 }
178
179 bool TextMark::get_left_gravity() const
180 {
181   return gtk_text_mark_get_left_gravity(const_cast<GtkTextMark*>(gobj()));
182 }
183
184
185 } // namespace Gtk
186
187