Main Page | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | File Members

bcwidgetgrid.h

Go to the documentation of this file.
00001 #ifndef BCWIDGETGRID_H
00002 #define BCWIDGETGRID_H
00003 
00004 #include "bcrelocatablewidget.h"
00005 #include "bctoggle.h"
00006 #include "bctextbox.h"
00007 #include "bcsubwindow.h"
00008 
00009 #define BC_WG_Rows 25
00010 #define BC_WG_Cols 10
00011 
00012 class BC_WidgetGrid : public BC_RelocatableWidget {
00013 public:  
00014 //      BC_WidgetGrid();
00015         BC_WidgetGrid(int x, int y, int x_r, int y_b, int colgaps, int rowgaps);
00016 
00017         BC_RelocatableWidget * add(BC_RelocatableWidget *h, int row, int column);
00018 
00019 
00020         void clear_widget(int row, int column);
00021         void set_align(int r,int c,int va, int ha);
00022 
00023         void calculate_maxs();
00024         void move_widgets();
00025 
00026         int reposition_widget(int x, int y, int w = -1, int h = -1);
00027 
00028         int  getw_w(int row, int column);
00029         int  getw_h(int row, int column);
00030 
00031         void setw_position(int row,int column,int x, int y);
00032         int  get_w();
00033         int  get_h();
00034 
00035         int  get_w_wm();
00036         int  get_h_wm();
00037 
00038         int  guess_x(int col);
00039         int  guess_y(int row);
00040 
00041         void print();
00042 
00043         enum {
00044                 VALIGN_TOP,
00045                 VALIGN_CENTER,
00046                 VALIGN_BOTTOM
00047         };
00048 
00049         enum {
00050                 HALIGN_LEFT,
00051                 HALIGN_CENTER,
00052                 HALIGN_RIGHT
00053         };
00054 
00055         enum {
00056                 BC_WT_NONE ,
00057                 BC_WT_RelocatableWidget
00058         };
00059 
00060 private:
00061 // Types of widgets:
00062         int            widget_types[BC_WG_Rows][BC_WG_Cols];
00063         int            widget_valign[BC_WG_Rows][BC_WG_Cols];
00064         int            widget_halign[BC_WG_Rows][BC_WG_Cols];
00065         // array of pointers:
00066         BC_RelocatableWidget *widget_widgs[BC_WG_Rows][BC_WG_Cols];
00067 
00068         int rowgaps;
00069         int colgaps;
00070 
00071         int maxw[BC_WG_Cols];
00072         int maxh[BC_WG_Rows];
00073         
00074         int x_l,x_r,y_t,y_b; // left, right, top,bottom margins.
00075 };
00076 #endif

Generated on Sun Jan 8 13:26:33 2006 for Guicast-svn by  doxygen 1.4.4