r717: Made the highlighted text color of the menus WHITE
[cinelerra_cv/mob.git] / guicast / bcwidgetgrid.h
blobd8aacdc3e08c6653bb06f03e6c1ffff84fcc0205
1 #ifndef BCWIDGETGRID_H
2 #define BCWIDGETGRID_H
4 #include "bcrelocatablewidget.h"
5 #include "bctoggle.h"
6 #include "bctextbox.h"
7 #include "bcsubwindow.h"
9 #define BC_WG_Rows 25
10 #define BC_WG_Cols 10
12 class BC_WidgetGrid : public BC_RelocatableWidget {
13 public:
14 // BC_WidgetGrid();
15 BC_WidgetGrid(int x, int y, int x_r, int y_b, int colgaps, int rowgaps);
17 BC_RelocatableWidget * add(BC_RelocatableWidget *h, int row, int column);
20 void clear_widget(int row, int column);
21 void set_align(int r,int c,int va, int ha);
23 void calculate_maxs();
24 void move_widgets();
26 int reposition_widget(int x, int y, int w = -1, int h = -1);
28 int getw_w(int row, int column);
29 int getw_h(int row, int column);
31 void setw_position(int row,int column,int x, int y);
32 int get_w();
33 int get_h();
35 int get_w_wm();
36 int get_h_wm();
38 int guess_x(int col);
39 int guess_y(int row);
41 void print();
43 enum {
44 VALIGN_TOP,
45 VALIGN_CENTER,
46 VALIGN_BOTTOM
49 enum {
50 HALIGN_LEFT,
51 HALIGN_CENTER,
52 HALIGN_RIGHT
55 enum {
56 BC_WT_NONE ,
57 BC_WT_RelocatableWidget
60 private:
61 // Types of widgets:
62 int widget_types[BC_WG_Rows][BC_WG_Cols];
63 int widget_valign[BC_WG_Rows][BC_WG_Cols];
64 int widget_halign[BC_WG_Rows][BC_WG_Cols];
65 // array of pointers:
66 BC_RelocatableWidget *widget_widgs[BC_WG_Rows][BC_WG_Cols];
68 int rowgaps;
69 int colgaps;
71 int maxw[BC_WG_Cols];
72 int maxh[BC_WG_Rows];
74 int x_l,x_r,y_t,y_b; // left, right, top,bottom margins.
76 #endif