1 // Generated by gmmproc 2.46.1 -- DO NOT MODIFY!
2
3
4 #include <glibmm.h>
5
6 #include <gtksourceviewmm/gutterrenderertext.h>
7 #include <gtksourceviewmm/private/gutterrenderertext_p.h>
8
9
10 /* gutterrenderertext.cc
11 *
12 * Copyright (C) 2009, 2010, 2011 Krzesimir Nowak
13 *
14 * This library is free software; you can redistribute it and/or
15 * modify it under the terms of the GNU Library General Public
16 * License as published by the Free Software Foundation; either
17 * version 2 of the License, or (at your option) any later version.
18 *
19 * This library is distributed in the hope that it will be useful,
20 * but WITHOUT ANY WARRANTY; without even the implied warranty of
21 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
22 * Library General Public License for more details.
23 *
24 * You should have received a copy of the GNU Library General Public
25 * License along with this library; if not, write to the Free
26 * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
27 */
28
29 #include <gtksourceview/gtksourcegutterrenderertext.h>
30
31 namespace Gsv
32 {
33
set_text(const Markup & markup)34 void GutterRendererText::set_text(const Markup& markup)
35 {
36 const Glib::ustring str(markup.get_string());
37
38 gtk_source_gutter_renderer_text_set_markup(gobj(), str.c_str(), str.bytes());
39 }
40
set_text(const Glib::ustring & text)41 void GutterRendererText::set_text(const Glib::ustring& text)
42 {
43 gtk_source_gutter_renderer_text_set_text(gobj(), text.c_str(), text.bytes());
44 }
45
46 } // namespace Gsv
47
48 namespace
49 {
50 } // anonymous namespace
51
52
53 namespace Glib
54 {
55
wrap(GtkSourceGutterRendererText * object,bool take_copy)56 Gsv::GutterRendererText* wrap(GtkSourceGutterRendererText* object, bool take_copy)
57 {
58 return dynamic_cast<Gsv::GutterRendererText *> (Glib::wrap_auto ((GObject*)(object), take_copy));
59 }
60
61 } /* namespace Glib */
62
63 namespace Gsv
64 {
65
66
67 /* The *_Class implementation: */
68
init()69 const Glib::Class& GutterRendererText_Class::init()
70 {
71 if(!gtype_) // create the GType if necessary
72 {
73 // Glib::Class has to know the class init function to clone custom types.
74 class_init_func_ = &GutterRendererText_Class::class_init_function;
75
76 // This is actually just optimized away, apparently with no harm.
77 // Make sure that the parent type has been created.
78 //CppClassParent::CppObjectType::get_type();
79
80 // Create the wrapper type, with the same class/instance size as the base type.
81 register_derived_type(gtk_source_gutter_renderer_text_get_type());
82
83 // Add derived versions of interfaces, if the C type implements any interfaces:
84
85 }
86
87 return *this;
88 }
89
90
class_init_function(void * g_class,void * class_data)91 void GutterRendererText_Class::class_init_function(void* g_class, void* class_data)
92 {
93 const auto klass = static_cast<BaseClassType*>(g_class);
94 CppClassParent::class_init_function(klass, class_data);
95
96
97 }
98
99
wrap_new(GObject * o)100 Glib::ObjectBase* GutterRendererText_Class::wrap_new(GObject* o)
101 {
102 return manage(new GutterRendererText((GtkSourceGutterRendererText*)(o)));
103
104 }
105
106
107 /* The implementation: */
108
GutterRendererText(const Glib::ConstructParams & construct_params)109 GutterRendererText::GutterRendererText(const Glib::ConstructParams& construct_params)
110 :
111 GutterRenderer(construct_params)
112 {
113 }
114
GutterRendererText(GtkSourceGutterRendererText * castitem)115 GutterRendererText::GutterRendererText(GtkSourceGutterRendererText* castitem)
116 :
117 GutterRenderer((GtkSourceGutterRenderer*)(castitem))
118 {
119 }
120
121
GutterRendererText(GutterRendererText && src)122 GutterRendererText::GutterRendererText(GutterRendererText&& src) noexcept
123 : GutterRenderer(std::move(src))
124 {}
125
operator =(GutterRendererText && src)126 GutterRendererText& GutterRendererText::operator=(GutterRendererText&& src) noexcept
127 {
128 GutterRenderer::operator=(std::move(src));
129 return *this;
130 }
131
~GutterRendererText()132 GutterRendererText::~GutterRendererText() noexcept
133 {
134 destroy_();
135 }
136
137 GutterRendererText::CppClassType GutterRendererText::gutterrenderertext_class_; // initialize static member
138
get_type()139 GType GutterRendererText::get_type()
140 {
141 return gutterrenderertext_class_.init().get_type();
142 }
143
144
get_base_type()145 GType GutterRendererText::get_base_type()
146 {
147 return gtk_source_gutter_renderer_text_get_type();
148 }
149
150
GutterRendererText()151 GutterRendererText::GutterRendererText()
152 :
153 // Mark this class as non-derived to allow C++ vfuncs to be skipped.
154 Glib::ObjectBase(0),
155 GutterRenderer(Glib::ConstructParams(gutterrenderertext_class_.init()))
156 {
157
158
159 }
160
measure(const Markup & markup,int & width,int & height)161 void GutterRendererText::measure(const Markup& markup, int& width, int& height)
162 {
163 gtk_source_gutter_renderer_text_measure_markup(gobj(), (markup).get_c_str(), &(width), &(height));
164 }
165
measure(const Glib::ustring & text,int & width,int & height)166 void GutterRendererText::measure(const Glib::ustring& text, int& width, int& height)
167 {
168 gtk_source_gutter_renderer_text_measure(gobj(), text.c_str(), &(width), &(height));
169 }
170
171
property_text()172 Glib::PropertyProxy< Glib::ustring > GutterRendererText::property_text()
173 {
174 return Glib::PropertyProxy< Glib::ustring >(this, "text");
175 }
176
property_text() const177 Glib::PropertyProxy_ReadOnly< Glib::ustring > GutterRendererText::property_text() const
178 {
179 return Glib::PropertyProxy_ReadOnly< Glib::ustring >(this, "text");
180 }
181
property_markup()182 Glib::PropertyProxy< Glib::ustring > GutterRendererText::property_markup()
183 {
184 return Glib::PropertyProxy< Glib::ustring >(this, "markup");
185 }
186
property_markup() const187 Glib::PropertyProxy_ReadOnly< Glib::ustring > GutterRendererText::property_markup() const
188 {
189 return Glib::PropertyProxy_ReadOnly< Glib::ustring >(this, "markup");
190 }
191
192
193 } // namespace Gsv
194
195
196