| Methods Index |
CGridSubclasses: None
CFixedGrid objects provide the means to arrange other CSubview objects into defined grid cells. All CFixedGrid cells are homogeneous in size. For more information, see CGrid and CVariableGrid.
CView objects into its cells. Objects inside a grid can either clip to their enclosing cell or force the cell to enlarge to incorporate the largest object.All row and column operations assume that 0,0 is the coordinate for the top-left cell.
CFixedGrid(CSubview* theEnclosure,
const CRect& theRegion,
int theNumberOfRows,
int theNumberOfColumns);
theEnclosure is a pointer to the subview that will contain the grid. theRegion is a coordinate location, local to the enclosure, that is used to place the grid. This method also requires you to specify the number of rows and columns in the grid, and it divides the given region into rows and columns.
CFixedGrid(CSubview* theEnclosure,
CPoint& theTopLeftCorner,
UNITS theRowHeight,
UNITS theColumnWidth,
int theNumberOfRows,
int theNumberOfColumns);
CPoint coordinate for placing the top-left corner of the grid. You specify the size of the grid by giving it a row height and a column width, as well as the number of rows and columns.
CFixedGrid(const CFixedGrid& theGrid);
CFixedGrid& operator=(const CFixedGrid& theGrid);
virtual ~CFixedGrid(void);
BOOLEAN IFixedGrid(BOOLEAN isClipping = TRUE,
PLACEMENT thePlacement = TOPLEFT,
BOOLEAN isGridVisible = FALSE,
POLICY theSizingPolicy = ADJUSTCellSize,
BOOLEAN isVisible = TRUE,
GLUETYPE theGlue = NULLSTICKY);
isClipping parameter takes a BOOLEAN value indicating whether the items placed in the grid are clipped to their cells. By default, clipping is turned on. thePlacement specifies the orientation for placing items in their cells-in the top left corner by default. isGridVisible sets whether the lines of the grid are visible or not. theSizingPolicy takes a value indicating one of the two different sizing policies for grids: ADJUSTCellSize (the default) or ADJUSTCellNumber. The isVisible parameter sets the visibility state for the entire grid object (as opposed to isGridVisible, which pertains to the horizontal and vertical lines within the grid). Finally, this initializer takes a glue type. You can override one or more of these defaults by calling IFixedGrid.
CFixedGrid overrides the following basic inherited methods.
virtual CRect GetCellSize(int theRow,
int theColumn) const;
CRect, which consists of that cell's coordinates, which are local to the grid. A NULL CRect (0,0,0,0) is returned it theRow or theCol are invalid.
virtual int GetRow(UNITS theVerticalPoint) const;
theVerticalPoint.
virtual int GetCol(UNITS theHorizontalPoint) const;
theHorizontalLocation.
CFixedGrid overrides the following basic inherited methods:
virtual void SizeCell(UNITS theNewCellWidth,
UNITS theNewCellHeight);
virtual void SetNumCells(int theNumberOfColumns,
int theNumberOfRows,
BOOLEAN theGridWillResize = TRUE);
theGridWillResize is TRUE, SetNumCells enlarges or reduces the size of the entire grid by giving it the specified number of columns and rows. If
theGridWillResize is FALSE, the overall size of the grid does not change. In this case, the sizes of the cells are adjusted to fit theNumberOfRows and theNumberOfColumns.
virtual UNITS GetWidth(int col = 0) const;
virtual UNITS GetHeight(int row = 0) const;