4 * Copyright (C) 2005 Pierre Dumuid
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
22 #ifndef BCWIDGETGRID_H
23 #define BCWIDGETGRID_H
25 #include "arraylist.h"
26 #include "bcrelocatablewidget.h"
28 #include "bctextbox.h"
29 #include "bcsubwindow.h"
37 class BC_WidgetGrid : public BC_RelocatableWidget {
39 BC_WidgetGrid(int x, int y, int x_r, int y_b, int colgaps, int rowgaps);
40 virtual ~BC_WidgetGrid() {}
42 BC_RelocatableWidget * add(BC_RelocatableWidget *h, int row, int column);
43 void calculate_maxs();
44 void clear_widget(int row, int column);
51 int getw_w(int row, int column);
52 int getw_h(int row, int column);
59 int reposition_widget(int x, int y, int w = -1, int h = -1);
61 void set_align(int r,int c,int va, int ha);
62 void set_crspan(int r,int c,int cs, int rs);
63 void set_minh(int c, int h);
64 void set_minw(int c, int w);
65 void setw_position(int row,int column,int x, int y);
81 BC_WT_RelocatableWidget
85 int widget_types[BC_WG_Rows][BC_WG_Cols];
86 int widget_valign[BC_WG_Rows][BC_WG_Cols];
87 int widget_halign[BC_WG_Rows][BC_WG_Cols];
88 int widget_colspan[BC_WG_Rows][BC_WG_Cols];
89 int widget_rowspan[BC_WG_Rows][BC_WG_Cols];
92 BC_RelocatableWidget *widget_widgs[BC_WG_Rows][BC_WG_Cols];
100 int minw[BC_WG_Cols];
101 int minh[BC_WG_Rows];
103 int x_l,x_r,y_t,y_b; // left, right, top,bottom margins.
107 class BC_WidgetGridList : public ArrayList<BC_WidgetGrid*>
111 ~BC_WidgetGridList();