vdk 2.4.0
tables.h
1 /*
2  * ===========================
3  * VDK Visual Development Kit
4  * Version 0.4
5  * October 1998
6  * Update to VDK 0.5.0
7  * by mm 12.13.1998
8  * ===========================
9  *
10  * Copyright (C) 1998, Mario Motta
11  * Developed by Mario Motta <mmotta@guest.net>
12  *
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.
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  * Library General Public License for more details.
22  *
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 Software
25  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
26  * 02111-1307, USA.
27  */
28 
29 #ifndef TABLES_H
30 #define TABLES_H
31 #include <vdk/vdkobj.h>
32 #include <vdk/widcontain.h>
40 {
41 
42 public:
46  __rwproperty(VDKTable,int) ColSpacing;
50  __rwproperty(VDKTable,int) RowSpacing;
58  VDKTable(VDKForm* owner,int rows, int cols, int homogeneous = false);
62  virtual ~VDKTable();
71  virtual void Add(VDKObject* obj,
72  int left_attach,
73  int right_attach,
74  int top_attach,
75  int bot_attach);
90  void AddToCell(VDKObject* obj,
91  int row,
92  int col,
93  int opt = int(GTK_FILL | GTK_EXPAND),
94  int padding = 1);
95  /*
96  Extended attaching mode using all arguments provided by gtk+
97  \param obj object to be attached
98  \param l_a left attach
99  \param r_a right attach
100  \param t_a top attach
101  \param b_a bottom attach
102  \param x_o x options
103  \param y_o y options
104  \param x_p x padding
105  \param y_p y padding
106  */
107  void AddExt(VDKObject* obj,
108  int l_a, int r_a,
109  int t_a, int b_a,
110  int x_o = int(GTK_FILL | GTK_EXPAND),
111  int y_o = int(GTK_FILL | GTK_EXPAND),
112  int x_p = 0, int y_p = 0);
113 
114  void SetRowSpacing(int row, int spacing)
115  { gtk_table_set_row_spacing(GTK_TABLE(widget),row,spacing); }
116  void SetColSpacing(int col, int spacing)
117  { gtk_table_set_col_spacing(GTK_TABLE(widget),col,spacing); }
118  void SetRowSpacings(int spacing)
119  { gtk_table_set_row_spacings(GTK_TABLE(widget),spacing); }
120  void SetColSpacings(int spacing)
121  { gtk_table_set_col_spacings(GTK_TABLE(widget),spacing); }
122 };
123 #endif
VDKForm widgets, generally the outermost widget container.
Definition: forms.h:69
Containers base class.
Definition: widcontain.h:40
Definition: vdkobj.h:141
GtkWidget * widget
Definition: vdkobj.h:241
Provides a table widget.
Definition: tables.h:40
__rwproperty(VDKTable, int) RowSpacing
__rwproperty(VDKTable, int) ColSpacing
virtual ~VDKTable()
Definition: tables.cc:47
VDKTable(VDKForm *owner, int rows, int cols, int homogeneous=false)
Definition: tables.cc:34
void AddToCell(VDKObject *obj, int row, int col, int opt=int(GTK_FILL|GTK_EXPAND), int padding=1)
Definition: tables.cc:78
virtual void Add(VDKObject *obj, int left_attach, int right_attach, int top_attach, int bot_attach)
Definition: tables.cc:54