1 // Generated by gtkmmproc -- DO NOT MODIFY!
3 #include <gtkmm/scrollbar.h>
4 #include <gtkmm/private/scrollbar_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.
28 #include <gtkmm/adjustment.h>
30 #include <gtk/gtkscrollbar.h>
31 #include <gtk/gtkhscrollbar.h>
32 #include <gtk/gtkvscrollbar.h>
37 VScrollbar::VScrollbar(Adjustment& adjustment)
39 Glib::ObjectBase(0), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow vfunc optimisations.
40 Scrollbar(Glib::ConstructParams(vscrollbar_class_.init(), (char*) 0))
42 set_adjustment(adjustment);
45 VScrollbar::VScrollbar()
47 Glib::ObjectBase(0), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow vfunc optimisations.
48 Scrollbar(Glib::ConstructParams(vscrollbar_class_.init(), (char*) 0))
50 Adjustment* adjustment = manage(new Adjustment(0.0, 0.0, 0.0, 0.0, 0.0, 0.0));
52 // The adjustment will be destroyed along with the object
53 set_adjustment(*adjustment);
57 HScrollbar::HScrollbar()
59 Glib::ObjectBase(0), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow vfunc optimisations.
60 Scrollbar(Glib::ConstructParams(hscrollbar_class_.init(), (char*) 0))
62 Adjustment* adjustment = manage(new Adjustment(0.0, 0.0, 0.0, 0.0, 0.0, 0.0));
64 // The adjustment will be destroyed along with the object
65 set_adjustment(*adjustment);
68 HScrollbar::HScrollbar(Adjustment& adjustment)
70 Glib::ObjectBase(0), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow vfunc optimisations.
71 Scrollbar(Glib::ConstructParams(hscrollbar_class_.init(), (char*) 0))
73 set_adjustment(adjustment);
81 } // anonymous namespace
87 Gtk::Scrollbar* wrap(GtkScrollbar* object, bool take_copy)
89 return dynamic_cast<Gtk::Scrollbar *> (Glib::wrap_auto ((GObject*)(object), take_copy));
92 } /* namespace Glib */
98 /* The *_Class implementation: */
100 const Glib::Class& Scrollbar_Class::init()
102 if(!gtype_) // create the GType if necessary
104 // Glib::Class has to know the class init function to clone custom types.
105 class_init_func_ = &Scrollbar_Class::class_init_function;
107 // This is actually just optimized away, apparently with no harm.
108 // Make sure that the parent type has been created.
109 //CppClassParent::CppObjectType::get_type();
111 // Create the wrapper type, with the same class/instance size as the base type.
112 register_derived_type(gtk_scrollbar_get_type());
114 // Add derived versions of interfaces, if the C type implements any interfaces:
120 void Scrollbar_Class::class_init_function(void* g_class, void* class_data)
122 BaseClassType *const klass = static_cast<BaseClassType*>(g_class);
123 CppClassParent::class_init_function(klass, class_data);
128 Glib::ObjectBase* Scrollbar_Class::wrap_new(GObject* o)
130 return manage(new Scrollbar((GtkScrollbar*)(o)));
135 /* The implementation: */
137 Scrollbar::Scrollbar(const Glib::ConstructParams& construct_params)
139 Gtk::Range(construct_params)
143 Scrollbar::Scrollbar(GtkScrollbar* castitem)
145 Gtk::Range((GtkRange*)(castitem))
149 Scrollbar::~Scrollbar()
154 Scrollbar::CppClassType Scrollbar::scrollbar_class_; // initialize static member
156 GType Scrollbar::get_type()
158 return scrollbar_class_.init().get_type();
161 GType Scrollbar::get_base_type()
163 return gtk_scrollbar_get_type();
173 Gtk::VScrollbar* wrap(GtkVScrollbar* object, bool take_copy)
175 return dynamic_cast<Gtk::VScrollbar *> (Glib::wrap_auto ((GObject*)(object), take_copy));
178 } /* namespace Glib */
184 /* The *_Class implementation: */
186 const Glib::Class& VScrollbar_Class::init()
188 if(!gtype_) // create the GType if necessary
190 // Glib::Class has to know the class init function to clone custom types.
191 class_init_func_ = &VScrollbar_Class::class_init_function;
193 // This is actually just optimized away, apparently with no harm.
194 // Make sure that the parent type has been created.
195 //CppClassParent::CppObjectType::get_type();
197 // Create the wrapper type, with the same class/instance size as the base type.
198 register_derived_type(gtk_vscrollbar_get_type());
200 // Add derived versions of interfaces, if the C type implements any interfaces:
206 void VScrollbar_Class::class_init_function(void* g_class, void* class_data)
208 BaseClassType *const klass = static_cast<BaseClassType*>(g_class);
209 CppClassParent::class_init_function(klass, class_data);
214 Glib::ObjectBase* VScrollbar_Class::wrap_new(GObject* o)
216 return manage(new VScrollbar((GtkVScrollbar*)(o)));
221 /* The implementation: */
223 VScrollbar::VScrollbar(const Glib::ConstructParams& construct_params)
225 Gtk::Scrollbar(construct_params)
229 VScrollbar::VScrollbar(GtkVScrollbar* castitem)
231 Gtk::Scrollbar((GtkScrollbar*)(castitem))
235 VScrollbar::~VScrollbar()
240 VScrollbar::CppClassType VScrollbar::vscrollbar_class_; // initialize static member
242 GType VScrollbar::get_type()
244 return vscrollbar_class_.init().get_type();
247 GType VScrollbar::get_base_type()
249 return gtk_vscrollbar_get_type();
259 Gtk::HScrollbar* wrap(GtkHScrollbar* object, bool take_copy)
261 return dynamic_cast<Gtk::HScrollbar *> (Glib::wrap_auto ((GObject*)(object), take_copy));
264 } /* namespace Glib */
270 /* The *_Class implementation: */
272 const Glib::Class& HScrollbar_Class::init()
274 if(!gtype_) // create the GType if necessary
276 // Glib::Class has to know the class init function to clone custom types.
277 class_init_func_ = &HScrollbar_Class::class_init_function;
279 // This is actually just optimized away, apparently with no harm.
280 // Make sure that the parent type has been created.
281 //CppClassParent::CppObjectType::get_type();
283 // Create the wrapper type, with the same class/instance size as the base type.
284 register_derived_type(gtk_hscrollbar_get_type());
286 // Add derived versions of interfaces, if the C type implements any interfaces:
292 void HScrollbar_Class::class_init_function(void* g_class, void* class_data)
294 BaseClassType *const klass = static_cast<BaseClassType*>(g_class);
295 CppClassParent::class_init_function(klass, class_data);
300 Glib::ObjectBase* HScrollbar_Class::wrap_new(GObject* o)
302 return manage(new HScrollbar((GtkHScrollbar*)(o)));
307 /* The implementation: */
309 HScrollbar::HScrollbar(const Glib::ConstructParams& construct_params)
311 Gtk::Scrollbar(construct_params)
315 HScrollbar::HScrollbar(GtkHScrollbar* castitem)
317 Gtk::Scrollbar((GtkScrollbar*)(castitem))
321 HScrollbar::~HScrollbar()
326 HScrollbar::CppClassType HScrollbar::hscrollbar_class_; // initialize static member
328 GType HScrollbar::get_type()
330 return hscrollbar_class_.init().get_type();
333 GType HScrollbar::get_base_type()
335 return gtk_hscrollbar_get_type();