1 // Generated by gmmproc 2.60.0 -- DO NOT MODIFY!
2 
3 
4 #include <glibmm.h>
5 
6 #include <gtkmm/paned.h>
7 #include <gtkmm/private/paned_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 
30 namespace Gtk
31 {
32 
pack1(Widget & child,AttachOptions options)33 void Paned::pack1(Widget& child, AttachOptions options)
34 {
35   const gboolean resize = ((options & EXPAND) != 0);
36   const gboolean shrink = ((options & SHRINK) != 0);
37 
38   gtk_paned_pack1(gobj(), child.gobj(), resize, shrink);
39 }
40 
pack2(Widget & child,AttachOptions options)41 void Paned::pack2(Widget& child, AttachOptions options)
42 {
43   const gboolean resize = ((options & EXPAND) != 0);
44   const gboolean shrink = ((options & SHRINK) != 0);
45 
46   gtk_paned_pack2(gobj(), child.gobj(), resize, shrink);
47 }
48 
49 } // namespace Gtk
50 
51 
52 namespace
53 {
54 } // anonymous namespace
55 
56 
57 namespace Glib
58 {
59 
wrap(GtkPaned * object,bool take_copy)60 Gtk::Paned* wrap(GtkPaned* object, bool take_copy)
61 {
62   return dynamic_cast<Gtk::Paned *> (Glib::wrap_auto ((GObject*)(object), take_copy));
63 }
64 
65 } /* namespace Glib */
66 
67 namespace Gtk
68 {
69 
70 
71 /* The *_Class implementation: */
72 
init()73 const Glib::Class& Paned_Class::init()
74 {
75   if(!gtype_) // create the GType if necessary
76   {
77     // Glib::Class has to know the class init function to clone custom types.
78     class_init_func_ = &Paned_Class::class_init_function;
79 
80     // This is actually just optimized away, apparently with no harm.
81     // Make sure that the parent type has been created.
82     //CppClassParent::CppObjectType::get_type();
83 
84     // Create the wrapper type, with the same class/instance size as the base type.
85     register_derived_type(gtk_paned_get_type());
86 
87     // Add derived versions of interfaces, if the C type implements any interfaces:
88   Orientable::add_interface(get_type());
89 
90   }
91 
92   return *this;
93 }
94 
95 
class_init_function(void * g_class,void * class_data)96 void Paned_Class::class_init_function(void* g_class, void* class_data)
97 {
98   const auto klass = static_cast<BaseClassType*>(g_class);
99   CppClassParent::class_init_function(klass, class_data);
100 
101 
102 }
103 
104 
wrap_new(GObject * o)105 Glib::ObjectBase* Paned_Class::wrap_new(GObject* o)
106 {
107   return manage(new Paned((GtkPaned*)(o)));
108 
109 }
110 
111 
112 /* The implementation: */
113 
Paned(const Glib::ConstructParams & construct_params)114 Paned::Paned(const Glib::ConstructParams& construct_params)
115 :
116   Gtk::Container(construct_params)
117 {
118   }
119 
Paned(GtkPaned * castitem)120 Paned::Paned(GtkPaned* castitem)
121 :
122   Gtk::Container((GtkContainer*)(castitem))
123 {
124   }
125 
126 
Paned(Paned && src)127 Paned::Paned(Paned&& src) noexcept
128 : Gtk::Container(std::move(src))
129   , Orientable(std::move(src))
130 {}
131 
operator =(Paned && src)132 Paned& Paned::operator=(Paned&& src) noexcept
133 {
134   Gtk::Container::operator=(std::move(src));
135   Orientable::operator=(std::move(src));
136   return *this;
137 }
138 
~Paned()139 Paned::~Paned() noexcept
140 {
141   destroy_();
142 }
143 
144 Paned::CppClassType Paned::paned_class_; // initialize static member
145 
get_type()146 GType Paned::get_type()
147 {
148   return paned_class_.init().get_type();
149 }
150 
151 
get_base_type()152 GType Paned::get_base_type()
153 {
154   return gtk_paned_get_type();
155 }
156 
157 
Paned(Orientation orientation)158 Paned::Paned(Orientation orientation)
159 :
160   // Mark this class as non-derived to allow C++ vfuncs to be skipped.
161   Glib::ObjectBase(nullptr),
162   Gtk::Container(Glib::ConstructParams(paned_class_.init(), "orientation", ((GtkOrientation)(orientation)), nullptr))
163 {
164 
165 
166 }
167 
add1(Widget & child)168 void Paned::add1(Widget& child)
169 {
170   gtk_paned_add1(gobj(), (child).gobj());
171 }
172 
add2(Widget & child)173 void Paned::add2(Widget& child)
174 {
175   gtk_paned_add2(gobj(), (child).gobj());
176 }
177 
pack1(Widget & child,bool resize,bool shrink)178 void Paned::pack1(Widget& child, bool resize, bool shrink)
179 {
180   gtk_paned_pack1(gobj(), (child).gobj(), static_cast<int>(resize), static_cast<int>(shrink));
181 }
182 
pack2(Widget & child,bool resize,bool shrink)183 void Paned::pack2(Widget& child, bool resize, bool shrink)
184 {
185   gtk_paned_pack2(gobj(), (child).gobj(), static_cast<int>(resize), static_cast<int>(shrink));
186 }
187 
get_position() const188 int Paned::get_position() const
189 {
190   return gtk_paned_get_position(const_cast<GtkPaned*>(gobj()));
191 }
192 
set_position(int position)193 void Paned::set_position(int position)
194 {
195   gtk_paned_set_position(gobj(), position);
196 }
197 
get_child1()198 Widget* Paned::get_child1()
199 {
200   return Glib::wrap(gtk_paned_get_child1(gobj()));
201 }
202 
get_child1() const203 const Widget* Paned::get_child1() const
204 {
205   return const_cast<Paned*>(this)->get_child1();
206 }
207 
get_child2()208 Widget* Paned::get_child2()
209 {
210   return Glib::wrap(gtk_paned_get_child2(gobj()));
211 }
212 
get_child2() const213 const Widget* Paned::get_child2() const
214 {
215   return const_cast<Paned*>(this)->get_child2();
216 }
217 
get_handle_window()218 Glib::RefPtr<Gdk::Window> Paned::get_handle_window()
219 {
220   Glib::RefPtr<Gdk::Window> retvalue = Glib::wrap(gtk_paned_get_handle_window(gobj()));
221   if(retvalue)
222     retvalue->reference(); //The function does not do a ref for us.
223   return retvalue;
224 }
225 
get_handle_window() const226 Glib::RefPtr<const Gdk::Window> Paned::get_handle_window() const
227 {
228   return const_cast<Paned*>(this)->get_handle_window();
229 }
230 
set_wide_handle(bool wide)231 void Paned::set_wide_handle(bool wide)
232 {
233   gtk_paned_set_wide_handle(gobj(), static_cast<int>(wide));
234 }
235 
get_wide_handle() const236 bool Paned::get_wide_handle() const
237 {
238   return gtk_paned_get_wide_handle(const_cast<GtkPaned*>(gobj()));
239 }
240 
241 
property_position()242 Glib::PropertyProxy< int > Paned::property_position()
243 {
244   return Glib::PropertyProxy< int >(this, "position");
245 }
246 
property_position() const247 Glib::PropertyProxy_ReadOnly< int > Paned::property_position() const
248 {
249   return Glib::PropertyProxy_ReadOnly< int >(this, "position");
250 }
251 
property_position_set()252 Glib::PropertyProxy< bool > Paned::property_position_set()
253 {
254   return Glib::PropertyProxy< bool >(this, "position-set");
255 }
256 
property_position_set() const257 Glib::PropertyProxy_ReadOnly< bool > Paned::property_position_set() const
258 {
259   return Glib::PropertyProxy_ReadOnly< bool >(this, "position-set");
260 }
261 
property_min_position() const262 Glib::PropertyProxy_ReadOnly< int > Paned::property_min_position() const
263 {
264   return Glib::PropertyProxy_ReadOnly< int >(this, "min-position");
265 }
266 
property_max_position() const267 Glib::PropertyProxy_ReadOnly< int > Paned::property_max_position() const
268 {
269   return Glib::PropertyProxy_ReadOnly< int >(this, "max-position");
270 }
271 
property_wide_handle()272 Glib::PropertyProxy< bool > Paned::property_wide_handle()
273 {
274   return Glib::PropertyProxy< bool >(this, "wide-handle");
275 }
276 
property_wide_handle() const277 Glib::PropertyProxy_ReadOnly< bool > Paned::property_wide_handle() const
278 {
279   return Glib::PropertyProxy_ReadOnly< bool >(this, "wide-handle");
280 }
281 
child_property_resize(Gtk::Widget & child)282 Gtk::ChildPropertyProxy< bool > Paned::child_property_resize(Gtk::Widget& child)
283 {
284   return Gtk::ChildPropertyProxy< bool >(this, child, "resize");
285 }
286 
child_property_resize(const Gtk::Widget & child) const287 Gtk::ChildPropertyProxy_ReadOnly< bool > Paned::child_property_resize(const Gtk::Widget& child) const
288 {
289   return Gtk::ChildPropertyProxy_ReadOnly< bool >(this, child, "resize");
290 }
291 
child_property_shrink(Gtk::Widget & child)292 Gtk::ChildPropertyProxy< bool > Paned::child_property_shrink(Gtk::Widget& child)
293 {
294   return Gtk::ChildPropertyProxy< bool >(this, child, "shrink");
295 }
296 
child_property_shrink(const Gtk::Widget & child) const297 Gtk::ChildPropertyProxy_ReadOnly< bool > Paned::child_property_shrink(const Gtk::Widget& child) const
298 {
299   return Gtk::ChildPropertyProxy_ReadOnly< bool >(this, child, "shrink");
300 }
301 
302 
303 } // namespace Gtk
304 
305 
306