1 // Generated by gmmproc 2.60.0 -- DO NOT MODIFY!
2 
3 
4 #include <glibmm.h>
5 
6 #include <gtkmm/box.h>
7 #include <gtkmm/private/box_p.h>
8 
9 
10 /*
11  * Copyright 1998-2002 The gtkmm Development Team
12  *
13  * This library is free software; you can redistribute it and/or
14  * modify it under the terms of the GNU Lesser General Public
15  * License as published by the Free Software Foundation; either
16  * version 2.1 of the License, or (at your option) any later version.
17  *
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  * Lesser General Public License for more details.
22  *
23  * You should have received a copy of the GNU Lesser General Public
24  * License along with this library; if not, write to the Free Software
25  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
26  */
27 
28 #include <gtk/gtk.h>
29 #include <glibmm/wrap.h>
30 
31 
32 namespace Gtk
33 {
34 
pack_start(Widget & child,PackOptions options,guint padding)35 void Box::pack_start(Widget& child, PackOptions options, guint padding)
36 {
37   bool expand = (options == PACK_EXPAND_PADDING) || (options == PACK_EXPAND_WIDGET);
38   bool fill = (options == PACK_EXPAND_WIDGET);
39 
40   gtk_box_pack_start(gobj(), child.gobj(), (gboolean)expand, (gboolean)fill, padding);
41 }
42 
pack_end(Widget & child,PackOptions options,guint padding)43 void Box::pack_end(Widget& child, PackOptions options, guint padding)
44 {
45   bool expand = (options == PACK_EXPAND_PADDING) || (options == PACK_EXPAND_WIDGET);
46   bool fill = (options == PACK_EXPAND_WIDGET);
47 
48   gtk_box_pack_end(gobj(), child.gobj(), (gboolean)expand, (gboolean)fill, padding);
49 }
50 
unset_center_widget()51 void Box::unset_center_widget()
52 {
53   gtk_box_set_center_widget(gobj(), nullptr);
54 }
55 
56 } //namespace Gtk
57 
58 namespace
59 {
60 } // anonymous namespace
61 
62 
63 namespace Glib
64 {
65 
wrap(GtkBox * object,bool take_copy)66 Gtk::Box* wrap(GtkBox* object, bool take_copy)
67 {
68   return dynamic_cast<Gtk::Box *> (Glib::wrap_auto ((GObject*)(object), take_copy));
69 }
70 
71 } /* namespace Glib */
72 
73 namespace Gtk
74 {
75 
76 
77 /* The *_Class implementation: */
78 
init()79 const Glib::Class& Box_Class::init()
80 {
81   if(!gtype_) // create the GType if necessary
82   {
83     // Glib::Class has to know the class init function to clone custom types.
84     class_init_func_ = &Box_Class::class_init_function;
85 
86     // This is actually just optimized away, apparently with no harm.
87     // Make sure that the parent type has been created.
88     //CppClassParent::CppObjectType::get_type();
89 
90     // Create the wrapper type, with the same class/instance size as the base type.
91     register_derived_type(gtk_box_get_type());
92 
93     // Add derived versions of interfaces, if the C type implements any interfaces:
94   Orientable::add_interface(get_type());
95 
96   }
97 
98   return *this;
99 }
100 
101 
class_init_function(void * g_class,void * class_data)102 void Box_Class::class_init_function(void* g_class, void* class_data)
103 {
104   const auto klass = static_cast<BaseClassType*>(g_class);
105   CppClassParent::class_init_function(klass, class_data);
106 
107 
108 }
109 
110 
wrap_new(GObject * o)111 Glib::ObjectBase* Box_Class::wrap_new(GObject* o)
112 {
113   return manage(new Box((GtkBox*)(o)));
114 
115 }
116 
117 
118 /* The implementation: */
119 
Box(const Glib::ConstructParams & construct_params)120 Box::Box(const Glib::ConstructParams& construct_params)
121 :
122   Gtk::Container(construct_params)
123 {
124   }
125 
Box(GtkBox * castitem)126 Box::Box(GtkBox* castitem)
127 :
128   Gtk::Container((GtkContainer*)(castitem))
129 {
130   }
131 
132 
Box(Box && src)133 Box::Box(Box&& src) noexcept
134 : Gtk::Container(std::move(src))
135   , Orientable(std::move(src))
136 {}
137 
operator =(Box && src)138 Box& Box::operator=(Box&& src) noexcept
139 {
140   Gtk::Container::operator=(std::move(src));
141   Orientable::operator=(std::move(src));
142   return *this;
143 }
144 
~Box()145 Box::~Box() noexcept
146 {
147   destroy_();
148 }
149 
150 Box::CppClassType Box::box_class_; // initialize static member
151 
get_type()152 GType Box::get_type()
153 {
154   return box_class_.init().get_type();
155 }
156 
157 
get_base_type()158 GType Box::get_base_type()
159 {
160   return gtk_box_get_type();
161 }
162 
163 
Box(Orientation orientation,int spacing)164 Box::Box(Orientation orientation, int spacing)
165 :
166   // Mark this class as non-derived to allow C++ vfuncs to be skipped.
167   Glib::ObjectBase(nullptr),
168   Gtk::Container(Glib::ConstructParams(box_class_.init(), "orientation", ((GtkOrientation)(orientation)), "spacing", spacing, nullptr))
169 {
170 
171 
172 }
173 
pack_start(Widget & child,bool expand,bool fill,guint padding)174 void Box::pack_start(Widget& child, bool expand, bool fill, guint padding)
175 {
176   gtk_box_pack_start(gobj(), (child).gobj(), static_cast<int>(expand), static_cast<int>(fill), padding);
177 }
178 
pack_end(Widget & child,bool expand,bool fill,guint padding)179 void Box::pack_end(Widget& child, bool expand, bool fill, guint padding)
180 {
181   gtk_box_pack_end(gobj(), (child).gobj(), static_cast<int>(expand), static_cast<int>(fill), padding);
182 }
183 
set_homogeneous(bool homogeneous)184 void Box::set_homogeneous(bool homogeneous)
185 {
186   gtk_box_set_homogeneous(gobj(), static_cast<int>(homogeneous));
187 }
188 
get_homogeneous() const189 bool Box::get_homogeneous() const
190 {
191   return gtk_box_get_homogeneous(const_cast<GtkBox*>(gobj()));
192 }
193 
set_spacing(int spacing)194 void Box::set_spacing(int spacing)
195 {
196   gtk_box_set_spacing(gobj(), spacing);
197 }
198 
get_spacing() const199 int Box::get_spacing() const
200 {
201   return gtk_box_get_spacing(const_cast<GtkBox*>(gobj()));
202 }
203 
set_baseline_position(BaselinePosition position)204 void Box::set_baseline_position(BaselinePosition position)
205 {
206   gtk_box_set_baseline_position(gobj(), ((GtkBaselinePosition)(position)));
207 }
208 
get_baseline_position() const209 BaselinePosition Box::get_baseline_position() const
210 {
211   return ((BaselinePosition)(gtk_box_get_baseline_position(const_cast<GtkBox*>(gobj()))));
212 }
213 
reorder_child(Widget & child,int position)214 void Box::reorder_child(Widget& child, int position)
215 {
216   gtk_box_reorder_child(gobj(), (child).gobj(), position);
217 }
218 
set_center_widget(Widget & widget)219 void Box::set_center_widget(Widget& widget)
220 {
221   gtk_box_set_center_widget(gobj(), (widget).gobj());
222 }
223 
get_center_widget()224 Widget* Box::get_center_widget()
225 {
226   return Glib::wrap(gtk_box_get_center_widget(gobj()));
227 }
228 
get_center_widget() const229 const Widget* Box::get_center_widget() const
230 {
231   return const_cast<Box*>(this)->get_center_widget();
232 }
233 
234 
property_spacing()235 Glib::PropertyProxy< int > Box::property_spacing()
236 {
237   return Glib::PropertyProxy< int >(this, "spacing");
238 }
239 
property_spacing() const240 Glib::PropertyProxy_ReadOnly< int > Box::property_spacing() const
241 {
242   return Glib::PropertyProxy_ReadOnly< int >(this, "spacing");
243 }
244 
property_homogeneous()245 Glib::PropertyProxy< bool > Box::property_homogeneous()
246 {
247   return Glib::PropertyProxy< bool >(this, "homogeneous");
248 }
249 
property_homogeneous() const250 Glib::PropertyProxy_ReadOnly< bool > Box::property_homogeneous() const
251 {
252   return Glib::PropertyProxy_ReadOnly< bool >(this, "homogeneous");
253 }
254 
property_baseline_position()255 Glib::PropertyProxy< BaselinePosition > Box::property_baseline_position()
256 {
257   return Glib::PropertyProxy< BaselinePosition >(this, "baseline-position");
258 }
259 
property_baseline_position() const260 Glib::PropertyProxy_ReadOnly< BaselinePosition > Box::property_baseline_position() const
261 {
262   return Glib::PropertyProxy_ReadOnly< BaselinePosition >(this, "baseline-position");
263 }
264 
child_property_expand(Gtk::Widget & child)265 Gtk::ChildPropertyProxy< bool > Box::child_property_expand(Gtk::Widget& child)
266 {
267   return Gtk::ChildPropertyProxy< bool >(this, child, "expand");
268 }
269 
child_property_expand(const Gtk::Widget & child) const270 Gtk::ChildPropertyProxy_ReadOnly< bool > Box::child_property_expand(const Gtk::Widget& child) const
271 {
272   return Gtk::ChildPropertyProxy_ReadOnly< bool >(this, child, "expand");
273 }
274 
child_property_fill(Gtk::Widget & child)275 Gtk::ChildPropertyProxy< bool > Box::child_property_fill(Gtk::Widget& child)
276 {
277   return Gtk::ChildPropertyProxy< bool >(this, child, "fill");
278 }
279 
child_property_fill(const Gtk::Widget & child) const280 Gtk::ChildPropertyProxy_ReadOnly< bool > Box::child_property_fill(const Gtk::Widget& child) const
281 {
282   return Gtk::ChildPropertyProxy_ReadOnly< bool >(this, child, "fill");
283 }
284 
child_property_padding(Gtk::Widget & child)285 Gtk::ChildPropertyProxy< guint > Box::child_property_padding(Gtk::Widget& child)
286 {
287   return Gtk::ChildPropertyProxy< guint >(this, child, "padding");
288 }
289 
child_property_padding(const Gtk::Widget & child) const290 Gtk::ChildPropertyProxy_ReadOnly< guint > Box::child_property_padding(const Gtk::Widget& child) const
291 {
292   return Gtk::ChildPropertyProxy_ReadOnly< guint >(this, child, "padding");
293 }
294 
child_property_pack_type(Gtk::Widget & child)295 Gtk::ChildPropertyProxy< PackType > Box::child_property_pack_type(Gtk::Widget& child)
296 {
297   return Gtk::ChildPropertyProxy< PackType >(this, child, "pack-type");
298 }
299 
child_property_pack_type(const Gtk::Widget & child) const300 Gtk::ChildPropertyProxy_ReadOnly< PackType > Box::child_property_pack_type(const Gtk::Widget& child) const
301 {
302   return Gtk::ChildPropertyProxy_ReadOnly< PackType >(this, child, "pack-type");
303 }
304 
child_property_position(Gtk::Widget & child)305 Gtk::ChildPropertyProxy< int > Box::child_property_position(Gtk::Widget& child)
306 {
307   return Gtk::ChildPropertyProxy< int >(this, child, "position");
308 }
309 
child_property_position(const Gtk::Widget & child) const310 Gtk::ChildPropertyProxy_ReadOnly< int > Box::child_property_position(const Gtk::Widget& child) const
311 {
312   return Gtk::ChildPropertyProxy_ReadOnly< int >(this, child, "position");
313 }
314 
315 
316 } // namespace Gtk
317 
318 
319