Fixed initialisation of tf in file_open(). Without setting the memory to 0,
[cinelerra_cv/mob.git] / guicast / bcwidgetgrid.h
blob3264506a5883ec76a38e5d25ee69193d400d2ec1
1 #ifndef BCWIDGETGRID_H
2 #define BCWIDGETGRID_H
4 #include "arraylist.h"
5 #include "bcrelocatablewidget.h"
6 #include "bctoggle.h"
7 #include "bctextbox.h"
8 #include "bcsubwindow.h"
10 #define BC_WG_Rows 25
11 #define BC_WG_Cols 10
16 class BC_WidgetGrid : public BC_RelocatableWidget {
17 public:
18 // BC_WidgetGrid();
19 BC_WidgetGrid(int x, int y, int x_r, int y_b, int colgaps, int rowgaps);
21 BC_RelocatableWidget * add(BC_RelocatableWidget *h, int row, int column);
22 void calculate_maxs();
23 void clear_widget(int row, int column);
25 int get_h();
26 int get_h_wm();
27 int get_w();
28 int get_w_wm();
30 int getw_w(int row, int column);
31 int getw_h(int row, int column);
33 int guess_x(int col);
34 int guess_y(int row);
36 void move_widgets();
37 void print();
38 int reposition_widget(int x, int y, int w = -1, int h = -1);
40 void set_align(int r,int c,int va, int ha);
41 void set_crspan(int r,int c,int cs, int rs);
42 void set_minh(int c, int h);
43 void set_minw(int c, int w);
44 void setw_position(int row,int column,int x, int y);
46 enum {
47 VALIGN_TOP,
48 VALIGN_CENTER,
49 VALIGN_BOTTOM
52 enum {
53 HALIGN_LEFT,
54 HALIGN_CENTER,
55 HALIGN_RIGHT
58 enum {
59 BC_WT_NONE,
60 BC_WT_RelocatableWidget
63 private:
64 int widget_types[BC_WG_Rows][BC_WG_Cols];
65 int widget_valign[BC_WG_Rows][BC_WG_Cols];
66 int widget_halign[BC_WG_Rows][BC_WG_Cols];
67 int widget_colspan[BC_WG_Rows][BC_WG_Cols];
68 int widget_rowspan[BC_WG_Rows][BC_WG_Cols];
70 // array of pointers:
71 BC_RelocatableWidget *widget_widgs[BC_WG_Rows][BC_WG_Cols];
73 int rowgaps;
74 int colgaps;
76 int maxw[BC_WG_Cols];
77 int maxh[BC_WG_Rows];
79 int minw[BC_WG_Cols];
80 int minh[BC_WG_Rows];
82 int x_l,x_r,y_t,y_b; // left, right, top,bottom margins.
86 class BC_WidgetGridList : public ArrayList<BC_WidgetGrid*>
88 public:
89 BC_WidgetGridList();
90 ~BC_WidgetGridList();
93 private:
97 #endif