Main Page   Class Hierarchy   Compound List   File List   Compound Members  

csGrid Class Reference

This is the grid object itself. More...

#include <csgrid.h>

Inheritance diagram for csGrid:

csComponent List of all members.

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.

csGridViewGetRootView ()
 Get the first grid view object.

csGridViewGetActiveView ()
 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.

csStringGetStringAt (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
 The grid data.

csVector vViews
 The array of grid views.

 The actiove grid view.

csVector vRegionStyles
 A vector containing the pattern csGridCell for every region;.

 The horizontal and vertical dividers.

 The horizontal and vertical dividers.

int cursorStyle
 cursor style.

int xcur
 cursor position.

int ycur
 cursor position.


class  csGridView

Detailed Description

This is the grid object itself.

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.

The documentation for this class was generated from the following file:
Generated for Crystal Space by doxygen 1.2.5 written by Dimitri van Heesch, ©1997-2000