Google

Main Page   Class Hierarchy   Compound List   File List   Compound Members  

csGridView Class Reference

The GridView displays a continuous rectangular region of the grid. More...

#include <csgrid.h>

Inheritance diagram for csGridView:

csComponent List of all members.

Public Methods

 csGridView (csGrid *pParent, const csRect &region, int iStyle=CSGVS_DEFAULTVALUE)
 Create a grid view covering given subregion of the grid.

 csGridView (const csGridView &view, int iStyle=-1)
 Create a copy of given grid view, and copy its style (or use a new style).

virtual void Draw ()
 Draw the grid view.

virtual bool HandleEvent (iEvent &Event)
 Handle a event.

virtual bool SetRect (int xmin, int ymin, int xmax, int ymax)
 Set grid view position and size.

const csRectGetArea ()
 return this views area.

virtual void FixSize (int &newW, int &newH)
 Snap size to nearest grid cell.

virtual void SuggestSize (int &w, int &h)
 Suggest the optimal size for this grid view.

csGridView* SplitX (int x, int iStyle=-1)
 Create a new grid view by splitting this view along X axis. More...

csGridView* SplitY (int y, int iStyle=-1)
 Create a new grid view by splitting this view along Y axis. More...

void SetViewArea (const csRect &rc)
 Restrict the area that this view can display.


Public Attributes

float areafactor
 if view was split and this is the newly created view, then this value tells us what part of the old area this one covers - needed for resizing view hierachy.


Protected Methods

void CooAt (int theX, int theY, int &theRow, int &theCol)
 get the row and column at the pixel (theX, theY).

virtual csGridView* CreateCopy (int iStyle)
 Create a new copy of this view.

void PlaceItems ()
 Place all the items in their places.


Protected Attributes

csRect area
 The subcells this view is restricted to.

csGridpGrid
 The parent grid object.

int row
 Row and column of the first visible cell (upper left).

int col
 Row and column of the first visible cell (upper left).

bool fPlaceItems
 True if items should be re-positioned (due to a new item inserted etc).

int Style
 The style of this view.

csScrollBarhscroll
 The horizontal and vertical scrollbar objects.

csScrollBarvscroll
 The horizontal and vertical scrollbar objects.


Detailed Description

The GridView displays a continuous rectangular region of the grid.

It can be subdivided horizontally or vertically into two smaller views, and can contain a horizontal and a vertical scrollbar for scrolling the contents of the grid.


Member Function Documentation

csGridView * csGridView::SplitX ( int x,
int iStyle = -1 )
 

Create a new grid view by splitting this view along X axis.

If values are not positive the split in that direction does not happen.

csGridView * csGridView::SplitY ( int y,
int iStyle = -1 )
 

Create a new grid view by splitting this view along Y axis.

If values are not positive the split in that direction does not happen.


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