1 // Generated by gtkmmproc -- DO NOT MODIFY!
3 #include <gtkmm/textmark.h>
4 #include <gtkmm/private/textmark_p.h>
11 * Copyright 1998-2002 The gtkmm Development Team
13 * This library is free software; you can redistribute it and/or
14 * modify it under the terms of the GNU Library General Public
15 * License as published by the Free Software Foundation; either
16 * version 2 of the License, or (at your option) any later version.
18 * This library is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
21 * Library General Public License for more details.
23 * You should have received a copy of the GNU Library General Public
24 * License along with this library; if not, write to the Free
25 * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
29 #include <gtkmm/textmark.h>
30 #include <gtkmm/textbuffer.h>
31 #include <gtk/gtktextmark.h>
37 TextIter TextMark::get_iter()
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);
49 } // anonymous namespace
55 Glib::RefPtr<Gtk::TextMark> wrap(GtkTextMark* object, bool take_copy)
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.
61 } /* namespace Glib */
68 /* The *_Class implementation: */
70 const Glib::Class& TextMark_Class::init()
72 if(!gtype_) // create the GType if necessary
74 // Glib::Class has to know the class init function to clone custom types.
75 class_init_func_ = &TextMark_Class::class_init_function;
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();
81 // Create the wrapper type, with the same class/instance size as the base type.
82 register_derived_type(gtk_text_mark_get_type());
84 // Add derived versions of interfaces, if the C type implements any interfaces:
90 void TextMark_Class::class_init_function(void* g_class, void* class_data)
92 BaseClassType *const klass = static_cast<BaseClassType*>(g_class);
93 CppClassParent::class_init_function(klass, class_data);
98 Glib::ObjectBase* TextMark_Class::wrap_new(GObject* object)
100 return new TextMark((GtkTextMark*)object);
104 /* The implementation: */
106 GtkTextMark* TextMark::gobj_copy()
112 TextMark::TextMark(const Glib::ConstructParams& construct_params)
114 Glib::Object(construct_params)
117 TextMark::TextMark(GtkTextMark* castitem)
119 Glib::Object((GObject*)(castitem))
122 TextMark::~TextMark()
126 TextMark::CppClassType TextMark::textmark_class_; // initialize static member
128 GType TextMark::get_type()
130 return textmark_class_.init().get_type();
133 GType TextMark::get_base_type()
135 return gtk_text_mark_get_type();
139 void TextMark::set_visible(bool setting)
141 gtk_text_mark_set_visible(gobj(), static_cast<int>(setting));
144 bool TextMark::get_visible() const
146 return gtk_text_mark_get_visible(const_cast<GtkTextMark*>(gobj()));
149 Glib::ustring TextMark::get_name() const
151 return Glib::convert_const_gchar_ptr_to_ustring(gtk_text_mark_get_name(const_cast<GtkTextMark*>(gobj())));
154 bool TextMark::get_deleted() const
156 return gtk_text_mark_get_deleted(const_cast<GtkTextMark*>(gobj()));
159 Glib::RefPtr<TextBuffer> TextMark::get_buffer()
162 Glib::RefPtr<TextBuffer> retvalue = Glib::wrap(gtk_text_mark_get_buffer(gobj()));
165 retvalue->reference(); //The function does not do a ref for us.
169 Glib::RefPtr<const TextBuffer> TextMark::get_buffer() const
172 Glib::RefPtr<const TextBuffer> retvalue = Glib::wrap(gtk_text_mark_get_buffer(const_cast<GtkTextMark*>(gobj())));
175 retvalue->reference(); //The function does not do a ref for us.
179 bool TextMark::get_left_gravity() const
181 return gtk_text_mark_get_left_gravity(const_cast<GtkTextMark*>(gobj()));