1 // Generated by gmmproc 2.60.0 -- DO NOT MODIFY!
2
3 #undef GTK_DISABLE_DEPRECATED
4 #define GDK_DISABLE_DEPRECATION_WARNINGS 1
5
6
7 #ifndef GTKMM_DISABLE_DEPRECATED
8
9
10 #include <glibmm.h>
11
12 #include <gtkmm/table.h>
13 #include <gtkmm/private/table_p.h>
14
15
16 /*
17 * Copyright 1998-2002 The gtkmm Development Team
18 *
19 * This library is free software; you can redistribute it and/or
20 * modify it under the terms of the GNU Lesser General Public
21 * License as published by the Free Software Foundation; either
22 * version 2.1 of the License, or (at your option) any later version.
23 *
24 * This library is distributed in the hope that it will be useful,
25 * but WITHOUT ANY WARRANTY; without even the implied warranty of
26 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
27 * Lesser General Public License for more details.
28 *
29 * You should have received a copy of the GNU Lesser General Public
30 * License along with this library; if not, write to the Free Software
31 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
32 */
33
34 #include <gtk/gtk.h>
35
36 namespace Gtk
37 {
38
set_spacings(guint spacing)39 void Table::set_spacings(guint spacing)
40 {
41 set_row_spacings(spacing);
42 set_col_spacings(spacing);
43 }
44
45 } //namespace Gtk
46
47 namespace
48 {
49 } // anonymous namespace
50
51
52 namespace Glib
53 {
54
wrap(GtkTable * object,bool take_copy)55 Gtk::Table* wrap(GtkTable* object, bool take_copy)
56 {
57 return dynamic_cast<Gtk::Table *> (Glib::wrap_auto ((GObject*)(object), take_copy));
58 }
59
60 } /* namespace Glib */
61
62 namespace Gtk
63 {
64
65
66 /* The *_Class implementation: */
67
init()68 const Glib::Class& Table_Class::init()
69 {
70 if(!gtype_) // create the GType if necessary
71 {
72 // Glib::Class has to know the class init function to clone custom types.
73 class_init_func_ = &Table_Class::class_init_function;
74
75 // This is actually just optimized away, apparently with no harm.
76 // Make sure that the parent type has been created.
77 //CppClassParent::CppObjectType::get_type();
78
79 // Create the wrapper type, with the same class/instance size as the base type.
80 register_derived_type(gtk_table_get_type());
81
82 // Add derived versions of interfaces, if the C type implements any interfaces:
83
84 }
85
86 return *this;
87 }
88
89
class_init_function(void * g_class,void * class_data)90 void Table_Class::class_init_function(void* g_class, void* class_data)
91 {
92 const auto klass = static_cast<BaseClassType*>(g_class);
93 CppClassParent::class_init_function(klass, class_data);
94
95
96 }
97
98
wrap_new(GObject * o)99 Glib::ObjectBase* Table_Class::wrap_new(GObject* o)
100 {
101 return manage(new Table((GtkTable*)(o)));
102
103 }
104
105
106 /* The implementation: */
107
Table(const Glib::ConstructParams & construct_params)108 Table::Table(const Glib::ConstructParams& construct_params)
109 :
110 Gtk::Container(construct_params)
111 {
112 }
113
Table(GtkTable * castitem)114 Table::Table(GtkTable* castitem)
115 :
116 Gtk::Container((GtkContainer*)(castitem))
117 {
118 }
119
120
Table(Table && src)121 Table::Table(Table&& src) noexcept
122 : Gtk::Container(std::move(src))
123 {}
124
operator =(Table && src)125 Table& Table::operator=(Table&& src) noexcept
126 {
127 Gtk::Container::operator=(std::move(src));
128 return *this;
129 }
130
~Table()131 Table::~Table() noexcept
132 {
133 destroy_();
134 }
135
136 Table::CppClassType Table::table_class_; // initialize static member
137
get_type()138 GType Table::get_type()
139 {
140 return table_class_.init().get_type();
141 }
142
143
get_base_type()144 GType Table::get_base_type()
145 {
146 return gtk_table_get_type();
147 }
148
149
Table(guint n_rows,guint n_columns,bool homogeneous)150 Table::Table(guint n_rows, guint n_columns, bool homogeneous)
151 :
152 // Mark this class as non-derived to allow C++ vfuncs to be skipped.
153 Glib::ObjectBase(nullptr),
154 Gtk::Container(Glib::ConstructParams(table_class_.init(), "n_rows", n_rows, "n_columns", n_columns, "homogeneous", static_cast<int>(homogeneous), nullptr))
155 {
156
157
158 }
159
attach(Widget & child,guint left_attach,guint right_attach,guint top_attach,guint bottom_attach,AttachOptions xoptions,AttachOptions yoptions,guint xpadding,guint ypadding)160 void Table::attach(Widget& child, guint left_attach, guint right_attach, guint top_attach, guint bottom_attach, AttachOptions xoptions, AttachOptions yoptions, guint xpadding, guint ypadding)
161 {
162 gtk_table_attach(gobj(), (child).gobj(), left_attach, right_attach, top_attach, bottom_attach, ((GtkAttachOptions)(xoptions)), ((GtkAttachOptions)(yoptions)), xpadding, ypadding);
163 }
164
resize(guint rows,guint columns)165 void Table::resize(guint rows, guint columns)
166 {
167 gtk_table_resize(gobj(), rows, columns);
168 }
169
set_row_spacing(guint row,guint spacing)170 void Table::set_row_spacing(guint row, guint spacing)
171 {
172 gtk_table_set_row_spacing(gobj(), row, spacing);
173 }
174
get_row_spacing(guint row) const175 guint Table::get_row_spacing(guint row) const
176 {
177 return gtk_table_get_row_spacing(const_cast<GtkTable*>(gobj()), row);
178 }
179
set_col_spacing(guint column,guint spacing)180 void Table::set_col_spacing(guint column, guint spacing)
181 {
182 gtk_table_set_col_spacing(gobj(), column, spacing);
183 }
184
get_col_spacing(guint column) const185 guint Table::get_col_spacing(guint column) const
186 {
187 return gtk_table_get_col_spacing(const_cast<GtkTable*>(gobj()), column);
188 }
189
set_row_spacings(guint spacing)190 void Table::set_row_spacings(guint spacing)
191 {
192 gtk_table_set_row_spacings(gobj(), spacing);
193 }
194
set_col_spacings(guint spacing)195 void Table::set_col_spacings(guint spacing)
196 {
197 gtk_table_set_col_spacings(gobj(), spacing);
198 }
199
get_default_row_spacing()200 guint Table::get_default_row_spacing()
201 {
202 return gtk_table_get_default_row_spacing(gobj());
203 }
204
get_default_col_spacing()205 guint Table::get_default_col_spacing()
206 {
207 return gtk_table_get_default_col_spacing(gobj());
208 }
209
set_homogeneous(bool homogeneous)210 void Table::set_homogeneous(bool homogeneous)
211 {
212 gtk_table_set_homogeneous(gobj(), static_cast<int>(homogeneous));
213 }
214
get_homogeneous() const215 bool Table::get_homogeneous() const
216 {
217 return gtk_table_get_homogeneous(const_cast<GtkTable*>(gobj()));
218 }
219
get_size(guint & rows,guint & columns) const220 void Table::get_size(guint& rows, guint& columns) const
221 {
222 gtk_table_get_size(const_cast<GtkTable*>(gobj()), &(rows), &(columns));
223 }
224
225
property_n_rows()226 Glib::PropertyProxy< guint > Table::property_n_rows()
227 {
228 return Glib::PropertyProxy< guint >(this, "n-rows");
229 }
230
property_n_rows() const231 Glib::PropertyProxy_ReadOnly< guint > Table::property_n_rows() const
232 {
233 return Glib::PropertyProxy_ReadOnly< guint >(this, "n-rows");
234 }
235
property_n_columns()236 Glib::PropertyProxy< guint > Table::property_n_columns()
237 {
238 return Glib::PropertyProxy< guint >(this, "n-columns");
239 }
240
property_n_columns() const241 Glib::PropertyProxy_ReadOnly< guint > Table::property_n_columns() const
242 {
243 return Glib::PropertyProxy_ReadOnly< guint >(this, "n-columns");
244 }
245
property_column_spacing()246 Glib::PropertyProxy< guint > Table::property_column_spacing()
247 {
248 return Glib::PropertyProxy< guint >(this, "column-spacing");
249 }
250
property_column_spacing() const251 Glib::PropertyProxy_ReadOnly< guint > Table::property_column_spacing() const
252 {
253 return Glib::PropertyProxy_ReadOnly< guint >(this, "column-spacing");
254 }
255
property_row_spacing()256 Glib::PropertyProxy< guint > Table::property_row_spacing()
257 {
258 return Glib::PropertyProxy< guint >(this, "row-spacing");
259 }
260
property_row_spacing() const261 Glib::PropertyProxy_ReadOnly< guint > Table::property_row_spacing() const
262 {
263 return Glib::PropertyProxy_ReadOnly< guint >(this, "row-spacing");
264 }
265
property_homogeneous()266 Glib::PropertyProxy< bool > Table::property_homogeneous()
267 {
268 return Glib::PropertyProxy< bool >(this, "homogeneous");
269 }
270
property_homogeneous() const271 Glib::PropertyProxy_ReadOnly< bool > Table::property_homogeneous() const
272 {
273 return Glib::PropertyProxy_ReadOnly< bool >(this, "homogeneous");
274 }
275
276
277 } // namespace Gtk
278
279 #endif // GTKMM_DISABLE_DEPRECATED
280
281
282