1 // Generated by gmmproc 2.60.0 -- DO NOT MODIFY!
2
3
4 #include <glibmm.h>
5
6 #include <gtkmm/progressbar.h>
7 #include <gtkmm/private/progressbar_p.h>
8
9 #include <gtk/gtk.h>
10
11 /*
12 * Copyright 1998-2002 The gtkmm Development Team
13 *
14 * This library is free software; you can redistribute it and/or
15 * modify it under the terms of the GNU Lesser General Public
16 * License as published by the Free Software Foundation; either
17 * version 2.1 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 * Lesser General Public License for more details.
23 *
24 * You should have received a copy of the GNU Lesser General Public
25 * License along with this library; if not, write to the Free Software
26 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
27 */
28
29 #include <gtkmm/adjustment.h>
30 #include <gtk/gtk.h>
31
32 namespace
33 {
34 } // anonymous namespace
35
36
37 namespace Glib
38 {
39
wrap(GtkProgressBar * object,bool take_copy)40 Gtk::ProgressBar* wrap(GtkProgressBar* object, bool take_copy)
41 {
42 return dynamic_cast<Gtk::ProgressBar *> (Glib::wrap_auto ((GObject*)(object), take_copy));
43 }
44
45 } /* namespace Glib */
46
47 namespace Gtk
48 {
49
50
51 /* The *_Class implementation: */
52
init()53 const Glib::Class& ProgressBar_Class::init()
54 {
55 if(!gtype_) // create the GType if necessary
56 {
57 // Glib::Class has to know the class init function to clone custom types.
58 class_init_func_ = &ProgressBar_Class::class_init_function;
59
60 // This is actually just optimized away, apparently with no harm.
61 // Make sure that the parent type has been created.
62 //CppClassParent::CppObjectType::get_type();
63
64 // Create the wrapper type, with the same class/instance size as the base type.
65 register_derived_type(gtk_progress_bar_get_type());
66
67 // Add derived versions of interfaces, if the C type implements any interfaces:
68 Orientable::add_interface(get_type());
69
70 }
71
72 return *this;
73 }
74
75
class_init_function(void * g_class,void * class_data)76 void ProgressBar_Class::class_init_function(void* g_class, void* class_data)
77 {
78 const auto klass = static_cast<BaseClassType*>(g_class);
79 CppClassParent::class_init_function(klass, class_data);
80
81
82 }
83
84
wrap_new(GObject * o)85 Glib::ObjectBase* ProgressBar_Class::wrap_new(GObject* o)
86 {
87 return manage(new ProgressBar((GtkProgressBar*)(o)));
88
89 }
90
91
92 /* The implementation: */
93
ProgressBar(const Glib::ConstructParams & construct_params)94 ProgressBar::ProgressBar(const Glib::ConstructParams& construct_params)
95 :
96 Gtk::Widget(construct_params)
97 {
98 }
99
ProgressBar(GtkProgressBar * castitem)100 ProgressBar::ProgressBar(GtkProgressBar* castitem)
101 :
102 Gtk::Widget((GtkWidget*)(castitem))
103 {
104 }
105
106
ProgressBar(ProgressBar && src)107 ProgressBar::ProgressBar(ProgressBar&& src) noexcept
108 : Gtk::Widget(std::move(src))
109 , Orientable(std::move(src))
110 {}
111
operator =(ProgressBar && src)112 ProgressBar& ProgressBar::operator=(ProgressBar&& src) noexcept
113 {
114 Gtk::Widget::operator=(std::move(src));
115 Orientable::operator=(std::move(src));
116 return *this;
117 }
118
~ProgressBar()119 ProgressBar::~ProgressBar() noexcept
120 {
121 destroy_();
122 }
123
124 ProgressBar::CppClassType ProgressBar::progressbar_class_; // initialize static member
125
get_type()126 GType ProgressBar::get_type()
127 {
128 return progressbar_class_.init().get_type();
129 }
130
131
get_base_type()132 GType ProgressBar::get_base_type()
133 {
134 return gtk_progress_bar_get_type();
135 }
136
137
ProgressBar()138 ProgressBar::ProgressBar()
139 :
140 // Mark this class as non-derived to allow C++ vfuncs to be skipped.
141 Glib::ObjectBase(nullptr),
142 Gtk::Widget(Glib::ConstructParams(progressbar_class_.init()))
143 {
144
145
146 }
147
pulse()148 void ProgressBar::pulse()
149 {
150 gtk_progress_bar_pulse(gobj());
151 }
152
get_text() const153 Glib::ustring ProgressBar::get_text() const
154 {
155 return Glib::convert_const_gchar_ptr_to_ustring(gtk_progress_bar_get_text(const_cast<GtkProgressBar*>(gobj())));
156 }
157
set_text(const Glib::ustring & text)158 void ProgressBar::set_text(const Glib::ustring& text)
159 {
160 gtk_progress_bar_set_text(gobj(), text.c_str());
161 }
162
get_fraction() const163 double ProgressBar::get_fraction() const
164 {
165 return gtk_progress_bar_get_fraction(const_cast<GtkProgressBar*>(gobj()));
166 }
167
set_fraction(double fraction)168 void ProgressBar::set_fraction(double fraction)
169 {
170 gtk_progress_bar_set_fraction(gobj(), fraction);
171 }
172
get_pulse_step() const173 double ProgressBar::get_pulse_step() const
174 {
175 return gtk_progress_bar_get_pulse_step(const_cast<GtkProgressBar*>(gobj()));
176 }
177
set_pulse_step(double fraction)178 void ProgressBar::set_pulse_step(double fraction)
179 {
180 gtk_progress_bar_set_pulse_step(gobj(), fraction);
181 }
182
set_inverted(bool inverted)183 void ProgressBar::set_inverted(bool inverted)
184 {
185 gtk_progress_bar_set_inverted(gobj(), static_cast<int>(inverted));
186 }
187
get_inverted() const188 bool ProgressBar::get_inverted() const
189 {
190 return gtk_progress_bar_get_inverted(const_cast<GtkProgressBar*>(gobj()));
191 }
192
set_ellipsize(Pango::EllipsizeMode mode)193 void ProgressBar::set_ellipsize(Pango::EllipsizeMode mode)
194 {
195 gtk_progress_bar_set_ellipsize(gobj(), ((PangoEllipsizeMode)(mode)));
196 }
197
get_ellipsize() const198 Pango::EllipsizeMode ProgressBar::get_ellipsize() const
199 {
200 return ((Pango::EllipsizeMode)(gtk_progress_bar_get_ellipsize(const_cast<GtkProgressBar*>(gobj()))));
201 }
202
set_show_text(bool show_text)203 void ProgressBar::set_show_text(bool show_text)
204 {
205 gtk_progress_bar_set_show_text(gobj(), static_cast<int>(show_text));
206 }
207
get_show_text() const208 bool ProgressBar::get_show_text() const
209 {
210 return gtk_progress_bar_get_show_text(const_cast<GtkProgressBar*>(gobj()));
211 }
212
213
property_fraction()214 Glib::PropertyProxy< double > ProgressBar::property_fraction()
215 {
216 return Glib::PropertyProxy< double >(this, "fraction");
217 }
218
property_fraction() const219 Glib::PropertyProxy_ReadOnly< double > ProgressBar::property_fraction() const
220 {
221 return Glib::PropertyProxy_ReadOnly< double >(this, "fraction");
222 }
223
property_pulse_step()224 Glib::PropertyProxy< double > ProgressBar::property_pulse_step()
225 {
226 return Glib::PropertyProxy< double >(this, "pulse-step");
227 }
228
property_pulse_step() const229 Glib::PropertyProxy_ReadOnly< double > ProgressBar::property_pulse_step() const
230 {
231 return Glib::PropertyProxy_ReadOnly< double >(this, "pulse-step");
232 }
233
property_text()234 Glib::PropertyProxy< Glib::ustring > ProgressBar::property_text()
235 {
236 return Glib::PropertyProxy< Glib::ustring >(this, "text");
237 }
238
property_text() const239 Glib::PropertyProxy_ReadOnly< Glib::ustring > ProgressBar::property_text() const
240 {
241 return Glib::PropertyProxy_ReadOnly< Glib::ustring >(this, "text");
242 }
243
property_ellipsize()244 Glib::PropertyProxy< bool > ProgressBar::property_ellipsize()
245 {
246 return Glib::PropertyProxy< bool >(this, "ellipsize");
247 }
248
property_ellipsize() const249 Glib::PropertyProxy_ReadOnly< bool > ProgressBar::property_ellipsize() const
250 {
251 return Glib::PropertyProxy_ReadOnly< bool >(this, "ellipsize");
252 }
253
property_show_text()254 Glib::PropertyProxy< bool > ProgressBar::property_show_text()
255 {
256 return Glib::PropertyProxy< bool >(this, "show-text");
257 }
258
property_show_text() const259 Glib::PropertyProxy_ReadOnly< bool > ProgressBar::property_show_text() const
260 {
261 return Glib::PropertyProxy_ReadOnly< bool >(this, "show-text");
262 }
263
property_inverted()264 Glib::PropertyProxy< bool > ProgressBar::property_inverted()
265 {
266 return Glib::PropertyProxy< bool >(this, "inverted");
267 }
268
property_inverted() const269 Glib::PropertyProxy_ReadOnly< bool > ProgressBar::property_inverted() const
270 {
271 return Glib::PropertyProxy_ReadOnly< bool >(this, "inverted");
272 }
273
274
275 } // namespace Gtk
276
277
278