#include <csgrid.h>
Inheritance diagram for csGrid:
Public Methods | |
csGrid (csComponent *pParent, int nRows, int nCols, int iStyle=CSGS_DEFAULTVALUE|CSGVS_DEFAULTVALUE) | |
Create a grid with given number of rows & columns. | |
csGrid (csComponent *pParent, int nRows, int nCols, csGridCell *gridpattern, int iStyle=CSGS_DEFAULTVALUE|CSGVS_DEFAULTVALUE) | |
virtual | ~csGrid () |
Destroy the grid object. | |
virtual void | SetCursorStyle (int iCursorStyle=CSGCS_NONE) |
Set a cursor style. | |
virtual int | GetCursorStyle () |
Get cursor style. | |
virtual void | GetCursorPos (int &row, int &col) |
Get cursor position. | |
virtual void | SetCursorPos (int row, int col) |
Set cursor position. | |
virtual void | Draw () |
Draw the grid. | |
virtual bool | SetRect (int xmin, int ymin, int xmax, int ymax) |
Set grid size and position. | |
virtual void | FixSize (int &newW, int &newH) |
Do not allow to resize us less than needed by scrollbars. | |
virtual void | SuggestSize (int &w, int &h) |
Suggest the optimal size for the grid. | |
virtual bool | HandleEvent (iEvent &Event) |
Handle events. | |
void | CreateRegion (csRect &rc, csGridCell *cell) |
Create a grid region. | |
csGridView* | GetRootView () |
Get the first grid view object. | |
csGridView* | GetActiveView () |
Get the active grid view. | |
void | SetActiveView (csGridView *view) |
Set the active grid view. | |
virtual void | SetStringAt (int row, int col, const char *data) |
Set string to display in specified cell. | |
csString* | GetStringAt (int row, int col) |
Protected Methods | |
void | CalcMinimalSize (csRegionTree2D *node, int &w, int &h) |
Calculate minimal size needed for given region. | |
void | PlaceGadgets () |
Place the dividers when the grid size changes. | |
Protected Attributes | |
csRegionTree2D* | regions |
csRegionTree2D * | viewlayout |
csSparseGrid* | grid |
The grid data. | |
csVector | vViews |
The array of grid views. | |
csGridView* | activeView |
The actiove grid view. | |
csVector | vRegionStyles |
A vector containing the pattern csGridCell for every region;. | |
csSplitter* | splitterX |
The horizontal and vertical dividers. | |
csSplitter * | splitterY |
The horizontal and vertical dividers. | |
int | cursorStyle |
cursor style. | |
int | xcur |
cursor position. | |
int | ycur |
cursor position. | |
Friends | |
class | csGridView |
The grid object can contain a number of vertically and horizontally split subviews (called "grid views"), each subview may be limited to certain area within the grid itself.