Ardour  8.7-14-g57a6773833
tk/ytkmm/ytkmm/gtkmm/table.h
Go to the documentation of this file.
1 // -*- c++ -*-
2 // Generated by gmmproc 2.45.3 -- DO NOT MODIFY!
3 #ifndef _GTKMM_TABLE_H
4 #define _GTKMM_TABLE_H
5 
6 
7 #include <glibmm/ustring.h>
8 #include <sigc++/sigc++.h>
9 
10 /* $Id: table.hg,v 1.3 2006/05/16 14:16:08 jjongsma Exp $ */
11 
12 /* Copyright (C) 1998-2002 The gtkmm Development Team
13  *
14  * This library is free software; you can redistribute it and/or
15  * modify it under the terms of the GNU Lesser General Public
16  * License as published by the Free Software Foundation; either
17  * version 2.1 of the License, or (at your option) any later version.
18  *
19  * This library is distributed in the hope that it will be useful,
20  * but WITHOUT ANY WARRANTY; without even the implied warranty of
21  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
22  * Lesser General Public License for more details.
23  *
24  * You should have received a copy of the GNU Lesser General Public
25  * License along with this library; if not, write to the Free
26  * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
27  */
28 
29 #include <glibmm/helperlist.h>
30 #include <gtkmm/container.h>
31 #include <gtkmm/enums.h>
32 
33 //TODO: Careful of including this before box.h,
34 //because we need to undef some things first.
35 //TODO: Maybe do all includes of gtk.h in a single file.
36 #include <gtk/gtk.h> /* for GtkTableChild */
37 
38 
39 #ifndef DOXYGEN_SHOULD_SKIP_THIS
40 typedef struct _GtkTable GtkTable;
41 typedef struct _GtkTableClass GtkTableClass;
42 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
43 
44 
45 namespace Gtk
46 { class Table_Class; } // namespace Gtk
47 namespace Gtk
48 {
49 
50 class Table;
51 
54 namespace Table_Helpers
55 {
56 
59 class Child : protected _GtkTableChild
60 {
61 private:
62  Child& operator=(const Child&); //Not implemented.
63  Child(const Child&); //Not implemented.
64 
65 public:
66  inline _GtkTableChild* gobj() {return (this);}
67  inline const _GtkTableChild* gobj() const {return (this);}
68 
69 #ifndef GTKMM_DISABLE_DEPRECATED
70 
71  Widget* get_widget() const;
72 
73  //TODO: Which of the GtkTableChild's fields are public API?
74  //Maybe we should remove some of these get()s or add some set()s.
75  //If get_widget() is the only accessor, then we should probably make
76  //the STL-style Table list contain Widgets instead of Childs.
77 
78  guint16 get_left_attach() const;
79  guint16 get_right_attach() const;
80  guint16 get_top_attach() const;
81  guint16 get_bottom_attach() const;
82  guint16 get_xpadding() const;
83  guint16 get_ypadding() const;
84  bool get_xexpand() const;
85  bool get_yexpand() const;
86  bool get_xshrink() const;
87  bool get_yshrink() const;
88  bool get_xfill() const;
89  bool get_yfill() const;
90 #endif // GTKMM_DISABLE_DEPRECATED
91 
92 
93 protected:
94  inline GtkTable* parent()
96 
97 #ifndef DOXYGEN_SHOULD_SKIP_THIS
98  friend class Dummy_; // silence the compiler (Child has only private ctors)
99 #endif
100 };
101 
102 
103 class TableList : public Glib::HelperList< Child, Widget, Glib::List_Iterator< Child > >
104 {
105 public:
108  TableList(const TableList& src);
109  virtual ~TableList() {}
110 
112 
113  typedef Glib::HelperList< Child, Widget, Glib::List_Iterator< Child > > type_base;
114 
116  const GtkTable* gparent() const;
117 
118  virtual GList*& glist() const; // front of list
119 
120  virtual void erase(iterator start, iterator stop);
121  virtual iterator erase(iterator); //Implented as custom or by LIST_CONTAINER_REMOVE
122  virtual void remove(const_reference); //Implented as custom or by LIST_CONTAINER_REMOVE
123 
125  reference operator[](size_type l) const;
126 
127 protected:
128  //Hide these because its read-only:
129  iterator insert(iterator position, element_type& e);
130 
131  inline void pop_front();
132  inline void pop_back();
133 
134 
135  //The standard iterator, instead of List_Cpp_Iterator,
136  //only works because Child is derived from _GtkTableChild.
137 
138 
139 virtual void remove(Widget& w); //Implented as custom or by LIST_CONTAINER_REMOVE
140 
141  };
142 
143 
144 } // namespace Table_Helpers
145 
146 
183 class Table : public Container
184 {
185  public:
186 #ifndef DOXYGEN_SHOULD_SKIP_THIS
187  typedef Table CppObjectType;
188  typedef Table_Class CppClassType;
189  typedef GtkTable BaseObjectType;
190  typedef GtkTableClass BaseClassType;
191 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
192 
193  virtual ~Table();
194 
195 #ifndef DOXYGEN_SHOULD_SKIP_THIS
196 
197 private:
198  friend class Table_Class;
199  static CppClassType table_class_;
200 
201  // noncopyable
202  Table(const Table&);
203  Table& operator=(const Table&);
204 
205 protected:
206  explicit Table(const Glib::ConstructParams& construct_params);
207  explicit Table(GtkTable* castitem);
208 
209 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
210 
211 public:
212 #ifndef DOXYGEN_SHOULD_SKIP_THIS
213  static GType get_type() G_GNUC_CONST;
214 
215 
216  static GType get_base_type() G_GNUC_CONST;
217 #endif
218 
220  GtkTable* gobj() { return reinterpret_cast<GtkTable*>(gobject_); }
221 
223  const GtkTable* gobj() const { return reinterpret_cast<GtkTable*>(gobject_); }
224 
225 
226 public:
227  //C++ methods used to invoke GTK+ virtual functions:
228 
229 protected:
230  //GTK+ Virtual Functions (override these to change behaviour):
231 
232  //Default Signal Handlers::
233 
234 
235 private:
236 
237 
238 public:
239  explicit Table(guint n_rows = 1, guint n_columns = 1, bool homogeneous = false);
240 
241 
242  void attach(Widget& child, guint left_attach, guint right_attach, guint top_attach, guint bottom_attach, AttachOptions xoptions = FILL | EXPAND, AttachOptions yoptions = FILL | EXPAND, guint xpadding = 0, guint ypadding = 0);
243 
244 
245  void resize(guint rows, guint columns);
246 
247 
248  void set_row_spacing(guint row, guint spacing);
249 
256  guint get_row_spacing(guint row) const;
257 
258 
259  void set_col_spacing(guint column, guint spacing);
260 
267  guint get_col_spacing(guint column) const;
268 
269 
270  void set_row_spacings(guint spacing);
271 
272 
273  void set_col_spacings(guint spacing);
274 
275  void set_spacings(guint spacing);
276 
277 
285 
293 
294 
295  void set_homogeneous(bool homogeneous = true);
296 
302  bool get_homogeneous() const;
303 
304 
312  void get_size(guint& rows, guint& columns) const;
313 
317 
318 #ifndef GTKMM_DISABLE_DEPRECATED
319 
323 
326  const TableList& children() const;
327 #endif // GTKMM_DISABLE_DEPRECATED
328 
329 
335  Glib::PropertyProxy< guint > property_n_rows() ;
336 
342  Glib::PropertyProxy_ReadOnly< guint > property_n_rows() const;
343 
349  Glib::PropertyProxy< guint > property_n_columns() ;
350 
356  Glib::PropertyProxy_ReadOnly< guint > property_n_columns() const;
357 
363  Glib::PropertyProxy< guint > property_column_spacing() ;
364 
370  Glib::PropertyProxy_ReadOnly< guint > property_column_spacing() const;
371 
377  Glib::PropertyProxy< guint > property_row_spacing() ;
378 
384  Glib::PropertyProxy_ReadOnly< guint > property_row_spacing() const;
385 
391  Glib::PropertyProxy< bool > property_homogeneous() ;
392 
398  Glib::PropertyProxy_ReadOnly< bool > property_homogeneous() const;
399 
400 
401 protected:
402 #ifndef DOXYGEN_SHOULD_SKIP_THIS
403  mutable TableList children_proxy_;
404 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
405 
406 
407 };
408 
409 } // namespace Gtk
410 
411 
412 namespace Glib
413 {
422  Gtk::Table* wrap(GtkTable* object, bool take_copy = false);
423 } //namespace Glib
424 
425 
426 #endif /* _GTKMM_TABLE_H */
427 
guint16 get_bottom_attach() const
guint16 get_xpadding() const
guint16 get_right_attach() const
Widget * get_widget() const
guint16 get_ypadding() const
Child & operator=(const Child &)
const _GtkTableChild * gobj() const
guint16 get_top_attach() const
guint16 get_left_attach() const
virtual void remove(const_reference)
virtual GList *& glist() const
TableList & operator=(const TableList &src)
const GtkTable * gparent() const
virtual iterator erase(iterator)
iterator insert(iterator position, element_type &e)
TableList(const TableList &src)
TableList(GtkTable *gparent)
reference operator[](size_type l) const
This is order n. (use at own risk)
virtual void erase(iterator start, iterator stop)
virtual void remove(Widget &w)
Glib::HelperList< Child, Widget, Glib::List_Iterator< Child > > type_base
Glib::PropertyProxy_ReadOnly< guint > property_column_spacing() const
Table_Helpers::TableList TableList
void attach(Widget &child, guint left_attach, guint right_attach, guint top_attach, guint bottom_attach, AttachOptions xoptions=FILL|EXPAND, AttachOptions yoptions=FILL|EXPAND, guint xpadding=0, guint ypadding=0)
const GtkTable * gobj() const
Provides access to the underlying C GtkObject.
Glib::PropertyProxy_ReadOnly< guint > property_n_columns() const
Glib::PropertyProxy< guint > property_row_spacing()
void resize(guint rows, guint columns)
TableList & children()
Gtk::Table * wrap(GtkTable *object, bool take_copy=false)
bool get_homogeneous() const
guint get_default_row_spacing()
void set_homogeneous(bool homogeneous=true)
Glib::PropertyProxy< guint > property_n_columns()
Table(guint n_rows=1, guint n_columns=1, bool homogeneous=false)
void get_size(guint &rows, guint &columns) const
const TableList & children() const
Glib::PropertyProxy_ReadOnly< guint > property_n_rows() const
Glib::PropertyProxy< guint > property_n_rows()
void set_row_spacings(guint spacing)
Glib::PropertyProxy< bool > property_homogeneous()
Glib::PropertyProxy_ReadOnly< bool > property_homogeneous() const
Glib::PropertyProxy_ReadOnly< guint > property_row_spacing() const
guint get_row_spacing(guint row) const
void set_spacings(guint spacing)
Glib::PropertyProxy< guint > property_column_spacing()
guint get_col_spacing(guint column) const
GtkTable * gobj()
Provides access to the underlying C GtkObject.
virtual ~Table()
void set_col_spacings(guint spacing)
void set_row_spacing(guint row, guint spacing)
guint get_default_col_spacing()
void set_col_spacing(guint column, guint spacing)
#define GTK_TABLE(obj)
Definition: gtktable.h:41
GtkWidget * gtk_widget_get_parent(GtkWidget *widget)
PBD::PropertyDescriptor< timepos_t > start
Definition: ardour_ui.h:188
Definition: lobject.h:497
GtkWidget * widget
Definition: gtktable.h:74