[Classes] [Prev] [Next] [Methods]

CVariableGrid

Methods Index

Heritage
Description
Usage
Enum
Environment
Protected Data Members
Public Methods
Constructor, Destructor, and Initializer Methods
Cell Operations Inherited from CGrid
Inherited Sizing Method
Sizing Methods

CVariableGrid


Heritage

Superclass: CGrid

Subclasses: None


Description

A CVariableGrid is a grid with variable-sized rows and columns; each row or column can have its own different size. A spreadsheet is an example of the use of a variable grid; each of the columns has a different width. For more information, see CGrid and CFixedGrid.


Usage

Create a grid, initialize it, and insert objects into its cells. Several methods are provided to manipulate the cell sizes.


Enum

CELL_SIZING_POLICY

ADJUSTGridSize Handle cell sizing by resizing grid
ADJUSTDefaultCellSize Handle cell sizing by resizing default cells

Size cells or add cells as grid is sized.


Environment

The lines of a variable grid are drawn with the pen, and the area within each cell is painted with the brush. You can set the color
and pattern of both the pen and the brush. Also, you can set the
pen width.


Protected Data Members

RWHashDictionary *itsRowSizes; Sparse list of widths
RWHashDictionary *itsColumnSizes; Sparse list of heights
CVariableGrid::CELL_SIZING_POLICY itsCellSizingPolicy Current sizing policy (add cells or size cells as grid grows/shrinks)
UNITS itsMinimumDefaultCellHeight Default minimum cell height
UNITS itsMinimumDefaultCellWidth Default minimum cell width


Public Methods

Constructor, Destructor, and Initializer Methods

CVariableGrid(CSubview* theEnclosure, 
const CRect& theRegion,
int theNumberOfRows,
int theNumberOfColumns);
CVariableGrid(CSubview* theEnclosure, 
CPoint& theTopLeftCorner,
UNITS theDefaultRowHeight,
UNITS theDefaultColumnWidth,
int theNumberOfRows,
int theNumberOfColumns);
CVariableGrid(const CVariableGrid& theGrid);
CVariableGrid& operator= (
const CVariableGrid& theGrid);
virtual ~CVariableGrid(void);
BOOLEAN IVariableGrid(BOOLEAN isClipping	= TRUE,
PLACEMENT thePlacement = TOPLEFT,
BOOLEAN isGridVisible = FALSE,
POLICY theSizingPolicy = ADJUSTCellSize,
BOOLEAN isVisible = TRUE,
GLUETYPE theGlue = NULLSTICKY);

Cell Operations Inherited from CGrid

virtual CRect GetCellSize(
int theRow,
int theColumn) const;
virtual int GetRow(UNITS theVerticalLocation) const=0;
virtual int GetCol(UNITS theHorizontalLocation) const=0;
virtual UNITS GetWidth(int theColumn) const;
virtual UNITS GetHeight(int theRow) const;

Inherited Sizing Method

virtual void Size(const CRect& theNewSize);
virtual void DoSize(const CRect& theNewSize);
virtual void AdjustCells(ADJUST theAdjustment);

Sizing Methods

virtual void SizeCol(int theColumn, UNITS theNewWidth);
virtual void SizeRow(int theRow, UNITS theNewHeight);
virtual void SetDefaultWidth(
UNITS theNewDefaultWidth);
virtual void SetDefaultHeight(
UNITS theNewDefaultHeight);
virtual UNITS GetDefaultWidth() const;
virtual UNITS GetDefaultHeight() const;
virtual void SizeCell(
UNITS newDefaultWidth,
UNITS newDefaultHeight);
virtual void SetNumCells(
int theNumberOfColumns,
int theNumberOfRows,
BOOLEAN theGridWillResize = TRUE)= 0;
virtual void AdjustRow(int theRow, ADJUST theAdjustment);
virtual void AdjustCol(int theCol, ADJUST theAdjustment);
virtual void ShiftColumns(int theColumn, int theShift);
void ResetWidth(void);
void ResetHeight(void);
void ResetFrame(void);
virtual void ResetColumns(void);
virtual void ResetRows(void);
virtual void SetCellSizingPolicy(
CELL_SIZING_POLICY theCellSizingPolicy);
virtual int GetCellSizingPolicy(void);
virtual void SetMinimumDefaultCellSize(
UNITS theMinWidth,
UNITS theMinHeight);
virtual void GetMinimumDefaultCellSize(UNITS *theMinWidth, UNITS *theMinHeight);
int GetRowNumber(UNITS theNewHeight);
int GetColNumber(UNITS theNewWidth);
void CopyContents(const CVariableGrid& theGrid);


[Classes] [Prev] [Next] [Methods]

support@xvt.com


Visit our online help desk for tech support

Copyright © 2009, Providence Software Solutions Inc. All rights reserved.