Merge branch 'ct' of git.pipapo.org:cinelerra-ct into ct
[cinelerra_cv/ct.git] / guicast / bcwidgetgrid.h
blobb79b06c795c3fd254958adf29fcf518e4127ccef
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 class grid_widgetinfo {
11 public:
12 int wtype;
13 int valign;
14 int halign;
15 int colspan;
16 int rowspan;
17 BC_RelocatableWidget *wh;
20 class grid_rowinfo {
21 public:
22 int minh;
23 int maxh;
26 class grid_columninfo {
27 public:
28 int minw;
29 int maxw;
32 class BC_WidgetGrid : public BC_RelocatableWidget {
33 public:
34 BC_WidgetGrid(int x, int y, int x_r, int y_b, int colgaps, int rowgaps);
35 ~BC_WidgetGrid();
37 BC_RelocatableWidget * add(BC_RelocatableWidget *h, int row, int col);
38 void calculate_maxs();
39 void clear_widget(int row, int col);
41 int get_x();
42 int get_y();
44 int get_h();
45 int get_h_wm();
46 int get_w();
47 int get_w_wm();
49 int getc_w(int col, int recalculate = 0);
50 int getr_h(int row, int recalculate = 0);
52 int getw_w(int row, int col);
53 int getw_h(int row, int col);
55 int guess_x(int col);
56 int guess_y(int row);
58 void move_widgets();
59 void print();
60 int reposition_widget(int x, int y, int w = -1, int h = -1);
62 void set_align(int r,int c,int va, int ha);
63 void set_crspan(int r,int c,int cs, int rs);
64 void set_minh(int c, int h);
65 void set_minw(int c, int w);
66 void setw_position(int row, int col, int x, int y);
68 enum {
69 VALIGN_TOP,
70 VALIGN_CENTER,
71 VALIGN_BOTTOM
74 enum {
75 HALIGN_LEFT,
76 HALIGN_CENTER,
77 HALIGN_RIGHT
80 enum {
81 BC_WT_NONE,
82 BC_WT_RelocatableWidget
85 private:
86 void growgrid(int row, int col);
88 int rowcount, colcount;
90 grid_widgetinfo *wginf;
91 grid_widgetinfo *wgdefault;
93 grid_columninfo *colinf;
94 grid_rowinfo *rowinf;
96 int rowgaps;
97 int colgaps;
99 int x_l, x_r, y_t, y_b; // left, right, top,bottom margins.
103 class BC_WidgetGridList : public ArrayList<BC_WidgetGrid*>
105 public:
106 BC_WidgetGridList();
107 ~BC_WidgetGridList();
110 #endif
112 // Local Variables:
113 // mode: C++
114 // c-file-style: "linux"
115 // End: