1 // Generated by gmmproc 2.45.3 -- 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 // -*- c++ -*-
12 /* $Id: progressbar.ccg,v 1.1 2003/01/21 13:40:34 murrayc Exp $ */
13
14 /*
15 *
16 * Copyright 1998-2002 The gtkmm Development Team
17 *
18 * This library is free software; you can redistribute it and/or
19 * modify it under the terms of the GNU Lesser General Public
20 * License as published by the Free Software Foundation; either
21 * version 2.1 of the License, or (at your option) any later version.
22 *
23 * This library is distributed in the hope that it will be useful,
24 * but WITHOUT ANY WARRANTY; without even the implied warranty of
25 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
26 * Lesser General Public License for more details.
27 *
28 * You should have received a copy of the GNU Lesser General Public
29 * License along with this library; if not, write to the Free
30 * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
31 */
32
33 #include <gtkmm/adjustment.h>
34 #include <gtk/gtk.h>
35
36 namespace
37 {
38 } // anonymous namespace
39
40 // static
value_type()41 GType Glib::Value<Gtk::ProgressBarStyle>::value_type()
42 {
43 return gtk_progress_bar_style_get_type();
44 }
45
46
47 namespace Glib
48 {
49
wrap(GtkProgressBar * object,bool take_copy)50 Gtk::ProgressBar* wrap(GtkProgressBar* object, bool take_copy)
51 {
52 return dynamic_cast<Gtk::ProgressBar *> (Glib::wrap_auto ((GObject*)(object), take_copy));
53 }
54
55 } /* namespace Glib */
56
57 namespace Gtk
58 {
59
60
61 /* The *_Class implementation: */
62
init()63 const Glib::Class& ProgressBar_Class::init()
64 {
65 if(!gtype_) // create the GType if necessary
66 {
67 // Glib::Class has to know the class init function to clone custom types.
68 class_init_func_ = &ProgressBar_Class::class_init_function;
69
70 // This is actually just optimized away, apparently with no harm.
71 // Make sure that the parent type has been created.
72 //CppClassParent::CppObjectType::get_type();
73
74 // Create the wrapper type, with the same class/instance size as the base type.
75 register_derived_type(gtk_progress_bar_get_type());
76
77 // Add derived versions of interfaces, if the C type implements any interfaces:
78
79 }
80
81 return *this;
82 }
83
84
class_init_function(void * g_class,void * class_data)85 void ProgressBar_Class::class_init_function(void* g_class, void* class_data)
86 {
87 BaseClassType *const klass = static_cast<BaseClassType*>(g_class);
88 CppClassParent::class_init_function(klass, class_data);
89
90
91 }
92
93
wrap_new(GObject * o)94 Glib::ObjectBase* ProgressBar_Class::wrap_new(GObject* o)
95 {
96 return manage(new ProgressBar((GtkProgressBar*)(o)));
97
98 }
99
100
101 /* The implementation: */
102
ProgressBar(const Glib::ConstructParams & construct_params)103 ProgressBar::ProgressBar(const Glib::ConstructParams& construct_params)
104 :
105 Gtk::Widget(construct_params)
106 {
107 }
108
ProgressBar(GtkProgressBar * castitem)109 ProgressBar::ProgressBar(GtkProgressBar* castitem)
110 :
111 Gtk::Widget((GtkWidget*)(castitem))
112 {
113 }
114
~ProgressBar()115 ProgressBar::~ProgressBar()
116 {
117 destroy_();
118 }
119
120 ProgressBar::CppClassType ProgressBar::progressbar_class_; // initialize static member
121
get_type()122 GType ProgressBar::get_type()
123 {
124 return progressbar_class_.init().get_type();
125 }
126
127
get_base_type()128 GType ProgressBar::get_base_type()
129 {
130 return gtk_progress_bar_get_type();
131 }
132
133
ProgressBar()134 ProgressBar::ProgressBar()
135 :
136 // Mark this class as non-derived to allow C++ vfuncs to be skipped.
137 Glib::ObjectBase(0),
138 Gtk::Widget(Glib::ConstructParams(progressbar_class_.init()))
139 {
140
141
142 }
143
pulse()144 void ProgressBar::pulse()
145 {
146 gtk_progress_bar_pulse(gobj());
147 }
148
get_text() const149 Glib::ustring ProgressBar::get_text() const
150 {
151 return Glib::convert_const_gchar_ptr_to_ustring(gtk_progress_bar_get_text(const_cast<GtkProgressBar*>(gobj())));
152 }
153
set_text(const Glib::ustring & text)154 void ProgressBar::set_text(const Glib::ustring& text)
155 {
156 gtk_progress_bar_set_text(gobj(), text.c_str());
157 }
158
get_fraction() const159 double ProgressBar::get_fraction() const
160 {
161 return gtk_progress_bar_get_fraction(const_cast<GtkProgressBar*>(gobj()));
162 }
163
set_fraction(double fraction)164 void ProgressBar::set_fraction(double fraction)
165 {
166 gtk_progress_bar_set_fraction(gobj(), fraction);
167 }
168
get_pulse_step() const169 double ProgressBar::get_pulse_step() const
170 {
171 return gtk_progress_bar_get_pulse_step(const_cast<GtkProgressBar*>(gobj()));
172 }
173
set_pulse_step(double fraction)174 void ProgressBar::set_pulse_step(double fraction)
175 {
176 gtk_progress_bar_set_pulse_step(gobj(), fraction);
177 }
178
set_orientation(ProgressBarOrientation orientation)179 void ProgressBar::set_orientation(ProgressBarOrientation orientation)
180 {
181 gtk_progress_bar_set_orientation(gobj(), ((GtkProgressBarOrientation)(orientation)));
182 }
183
get_orientation() const184 ProgressBarOrientation ProgressBar::get_orientation() const
185 {
186 return ((ProgressBarOrientation)(gtk_progress_bar_get_orientation(const_cast<GtkProgressBar*>(gobj()))));
187 }
188
set_ellipsize(Pango::EllipsizeMode mode)189 void ProgressBar::set_ellipsize(Pango::EllipsizeMode mode)
190 {
191 gtk_progress_bar_set_ellipsize(gobj(), ((PangoEllipsizeMode)(mode)));
192 }
193
get_ellipsize() const194 Pango::EllipsizeMode ProgressBar::get_ellipsize() const
195 {
196 return ((Pango::EllipsizeMode)(gtk_progress_bar_get_ellipsize(const_cast<GtkProgressBar*>(gobj()))));
197 }
198
199
property_adjustment()200 Glib::PropertyProxy< Adjustment* > ProgressBar::property_adjustment()
201 {
202 return Glib::PropertyProxy< Adjustment* >(this, "adjustment");
203 }
204
property_adjustment() const205 Glib::PropertyProxy_ReadOnly< Adjustment* > ProgressBar::property_adjustment() const
206 {
207 return Glib::PropertyProxy_ReadOnly< Adjustment* >(this, "adjustment");
208 }
209
property_fraction()210 Glib::PropertyProxy< double > ProgressBar::property_fraction()
211 {
212 return Glib::PropertyProxy< double >(this, "fraction");
213 }
214
property_fraction() const215 Glib::PropertyProxy_ReadOnly< double > ProgressBar::property_fraction() const
216 {
217 return Glib::PropertyProxy_ReadOnly< double >(this, "fraction");
218 }
219
property_pulse_step()220 Glib::PropertyProxy< double > ProgressBar::property_pulse_step()
221 {
222 return Glib::PropertyProxy< double >(this, "pulse-step");
223 }
224
property_pulse_step() const225 Glib::PropertyProxy_ReadOnly< double > ProgressBar::property_pulse_step() const
226 {
227 return Glib::PropertyProxy_ReadOnly< double >(this, "pulse-step");
228 }
229
property_orientation()230 Glib::PropertyProxy< ProgressBarOrientation > ProgressBar::property_orientation()
231 {
232 return Glib::PropertyProxy< ProgressBarOrientation >(this, "orientation");
233 }
234
property_orientation() const235 Glib::PropertyProxy_ReadOnly< ProgressBarOrientation > ProgressBar::property_orientation() const
236 {
237 return Glib::PropertyProxy_ReadOnly< ProgressBarOrientation >(this, "orientation");
238 }
239
property_bar_style()240 Glib::PropertyProxy< ProgressBarStyle > ProgressBar::property_bar_style()
241 {
242 return Glib::PropertyProxy< ProgressBarStyle >(this, "bar-style");
243 }
244
property_bar_style() const245 Glib::PropertyProxy_ReadOnly< ProgressBarStyle > ProgressBar::property_bar_style() const
246 {
247 return Glib::PropertyProxy_ReadOnly< ProgressBarStyle >(this, "bar-style");
248 }
249
property_activity_step()250 Glib::PropertyProxy< guint > ProgressBar::property_activity_step()
251 {
252 return Glib::PropertyProxy< guint >(this, "activity-step");
253 }
254
property_activity_step() const255 Glib::PropertyProxy_ReadOnly< guint > ProgressBar::property_activity_step() const
256 {
257 return Glib::PropertyProxy_ReadOnly< guint >(this, "activity-step");
258 }
259
property_activity_blocks()260 Glib::PropertyProxy< guint > ProgressBar::property_activity_blocks()
261 {
262 return Glib::PropertyProxy< guint >(this, "activity-blocks");
263 }
264
property_activity_blocks() const265 Glib::PropertyProxy_ReadOnly< guint > ProgressBar::property_activity_blocks() const
266 {
267 return Glib::PropertyProxy_ReadOnly< guint >(this, "activity-blocks");
268 }
269
property_discrete_blocks()270 Glib::PropertyProxy< guint > ProgressBar::property_discrete_blocks()
271 {
272 return Glib::PropertyProxy< guint >(this, "discrete-blocks");
273 }
274
property_discrete_blocks() const275 Glib::PropertyProxy_ReadOnly< guint > ProgressBar::property_discrete_blocks() const
276 {
277 return Glib::PropertyProxy_ReadOnly< guint >(this, "discrete-blocks");
278 }
279
property_text()280 Glib::PropertyProxy< Glib::ustring > ProgressBar::property_text()
281 {
282 return Glib::PropertyProxy< Glib::ustring >(this, "text");
283 }
284
property_text() const285 Glib::PropertyProxy_ReadOnly< Glib::ustring > ProgressBar::property_text() const
286 {
287 return Glib::PropertyProxy_ReadOnly< Glib::ustring >(this, "text");
288 }
289
property_ellipsize()290 Glib::PropertyProxy< bool > ProgressBar::property_ellipsize()
291 {
292 return Glib::PropertyProxy< bool >(this, "ellipsize");
293 }
294
property_ellipsize() const295 Glib::PropertyProxy_ReadOnly< bool > ProgressBar::property_ellipsize() const
296 {
297 return Glib::PropertyProxy_ReadOnly< bool >(this, "ellipsize");
298 }
299
300
301 } // namespace Gtk
302
303
304