»
Symbian OS v9.3 »
Symbian OS reference »
C++ component reference »
Application Framework GRID »
CGridLay
Location:
GRDSTD.H
Link against: grid.lib
class CGridLay : public CBase;
Description
Handles the layout of a grid, and controls how columns, rows and selections appear.
Derivation
CBase
- Base class for all classes to be instantiated on the heap
CGridLay
- Handles the layout of a grid, and controls how columns, rows and selections appear
Members
Defined in CGridLay
:
CGridLay()
, CellToPoint()
, CellToPoint()
, CellToRect()
, ClearAllHardPageBreaksL()
, ClearHardColumnPageBreakL()
, ClearHardRowPageBreakL()
, ClearPagination()
, ColumnExtent()
, ColumnToXVal()
, ColumnToXVal()
, ColumnWidthInTwips()
, ColumnWidthOfSelectedInTwips()
, ConstructL()
, ConstructL()
, ConstructL()
, DefaultColumnWidthInTwips()
, DefaultRowHeightInTwips()
, EAdjustGridRange
, EDownThenRight
, EFixGridRange
, ERightThenDown
, ExposeCell()
, ExposeCellToTopLeft()
, ExternalizeL()
, GridColors()
, GridRange()
, HasChanged()
, InsertDeleteColumns()
, InsertDeleteRows()
, InternalizeL()
, IsAutoClearGridCells()
, IsAutoPagination()
, IsColumnBursting()
, IsColumnSelectionDisabled()
, IsCursorVisible()
, IsEncroachingCellBorders()
, IsGridLabelSeparators()
, IsHardColumnPageBreak()
, IsHardRowPageBreak()
, IsHighlightVisible()
, IsHorizontalGridLines()
, IsHorizontalTitleLine()
, IsIndefiniteRowBoundaries()
, IsPageBreakLinesHidden()
, IsPaginated()
, IsPrintedGridLines()
, IsPrintedLabels()
, IsRowPermanentlySelected()
, IsRowSelectionDisabled()
, IsSideLabelDragDisabled()
, IsSideLabels()
, IsTitleLines()
, IsTopLabelDragDisabled()
, IsTopLabels()
, IsUniformColumnWidth()
, IsUniformRowHeight()
, IsVerticalGridLines()
, IsVerticalTitleLine()
, MinColumnWidthInPixels()
, MinRowHeightInPixels()
, MinVisibleFromColumn()
, MinVisibleFromRow()
, NoOfPages()
, NotifyPaginationOutOfDateL()
, PageScroll()
, PageSizeInTwips()
, PageToRange()
, PaginateL()
, PointToCell()
, PointToCell()
, RecalcPixelSparseMaps()
, ResetVisibleToCell()
, ResetVisibleToColumn()
, ResetVisibleToRow()
, RestoreL()
, RowExtent()
, RowHeightInTwips()
, RowHeightOfSelectedInTwips()
, RowToYVal()
, RowToYVal()
, SetAutoClearGridCells()
, SetAutoPagination()
, SetColumnBursting()
, SetColumnSelectionDisabled()
, SetColumnWidthInTwipsL()
, SetColumnWidthInTwipsL()
, SetColumnWidthOfSelectedInTwipsL()
, SetColumnWidthsToDefault()
, SetCursorVisible()
, SetDefaultColumnWidthInTwips()
, SetDefaultRowHeightInTwips()
, SetEncroachingCellBorders()
, SetGraphicsDeviceMap()
, SetGridColors()
, SetGridEdgeColor()
, SetGridImgL()
, SetGridLabelSeparators()
, SetGridTable()
, SetGridToDefault()
, SetHardColumnPageBreakL()
, SetHardRowPageBreakL()
, SetHasChanged()
, SetHighlightVisible()
, SetHorizontalGridLines()
, SetMinColumnWidthInPixels()
, SetMinRowHeightInPixels()
, SetPageBreakLinesHidden()
, SetPageSizeInTwipsL()
, SetPrintRange()
, SetPrintedGridLines()
, SetPrintedLabels()
, SetRowHeightInTwipsL()
, SetRowHeightInTwipsL()
, SetRowHeightOfSelectedInTwipsL()
, SetRowHeightsToDefault()
, SetRowPermanentlySelectedL()
, SetRowSelectionDisabled()
, SetSideLabelDragDisabled()
, SetSideLabels()
, SetTitleLinesL()
, SetTitleLinesL()
, SetTopLabelDragDisabled()
, SetTopLabels()
, SetUniformColumnWidth()
, SetUniformRowHeight()
, SetVerticalGridLines()
, SetVisibleRange()
, StoreL()
, TFixGridRange
, TPageOrder
, TitleCellToPoint()
, TitleColumnToXVal()
, TitleRange()
, TitleRowToYVal()
, ToggleTitleLinesL()
, TopLeftTitleRangeSize()
, VisibleColumnToXVal()
, VisibleRange()
, VisibleRowToYVal()
, XValToColumn()
, XValToColumn()
, XValToNearestColumn()
, XValToTitleColumn()
, YValToNearestRow()
, YValToRow()
, YValToRow()
, YValToTitleRow()
, ~CGridLay()
Inherited from CBase
:
Delete()
,
Extension_()
,
operator new()
Construction and destruction
IMPORT_C CGridLay(MGraphicsDeviceMap *aGraphicsDeviceMap);
Description
Constructor taking an object that implements mapping between twips and device-specific units.
Parameters
MGraphicsDeviceMap *aGraphicsDeviceMap |
An object that implements the interface for mapping between twips and device-specific units. Typically, this is a TZoomFactor object.
|
|
IMPORT_C void ConstructL(CGridLay *aGridLay, CGridImg *aGridImg);
Description
A second-phase constructor, taking an existing grid layout object, that constructs a partial layout object for printing.
The function assumes that the zoom factor has already been set.
Parameters
CGridLay *aGridLay |
Pointer to an existing grid layout object.
|
CGridImg *aGridImg |
Pointer to an existing grid image object.
|
|
IMPORT_C void ConstructL(const MGridTable *aGridTable, CGridImg *aGridImg, TInt aNoOfRows, TInt aNoOfCols);
Description
A second-phase constructor for constructing the object with definite row boundaries.
Parameters
const MGridTable *aGridTable |
A pointer to the grid table.
|
CGridImg *aGridImg |
Pointer to a grid image object.
|
TInt aNoOfRows |
The number of rows in the grid.
|
TInt aNoOfCols |
The number of columns in the grid.
|
|
IMPORT_C void ConstructL(const MGridTable *aGridTable, CGridImg *aGridImg, TInt aNoOfCols);
Description
A second-phase constructor for constructing the object with indefinite row boundaries.
Parameters
const MGridTable *aGridTable |
A pointer to the grid table.
|
CGridImg *aGridImg |
Pointer to a grid image object.
|
TInt aNoOfCols |
The number of columns in the grid.
|
|
virtual IMPORT_C ~CGridLay();
Description
Destructor.
Frees resources prior to destruction of the object.
IMPORT_C TPoint PageScroll(TMoveDirectionAndAmount aPageScroll);
Description
Scrolls the grid by one page.
Parameters
Return value
TPoint
|
The number of pixels scrolled, in the x and y directions. This represents the amount of scrolling required to move from the
start of the old visible range to the start of the new visible range.
|
|
IMPORT_C TPoint ExposeCell(const TCellRef &aCell);
Description
Scrolls the grid by the minimum necessary to allow the specified cell to become visible.
Parameters
const TCellRef &aCell |
The cell to be made visible.
|
|
Return value
TPoint
|
The number of pixels scrolled, in the x and y directions.
|
|
IMPORT_C TPoint ExposeCellToTopLeft(const TCellRef &aCell);
Description
Scrolls the grid by the minimum necessary so that the specified cell is in the top left corner of the visible grid.
Parameters
const TCellRef &aCell |
The cell to be made visible in the top left corner of the visible grid.
|
|
Return value
TPoint
|
The number of pixels scrolled, in the x and y directions.
|
|
IMPORT_C void SetGridImgL(CGridImg *aGridImg);
Description
Sets the specified grid image object.
Parameters
CGridImg *aGridImg |
The grid image object that draws the contents of the grid.
|
|
inline void SetGridTable(const MGridTable *aGridTable);
Description
Sets the specified grid table object.
Parameters
const MGridTable *aGridTable |
The grid table object.
|
|
inline TRangeRef VisibleRange() const;
Description
Gets the range of cells that are currently visible.
Return value
TRangeRef
|
The visible cell range. Note that the TRangeRef::iFrom member is the cell that is visible at the top of the window, and the TRangeRef::iTo member is the cell that is partially visible at the bottom right of the window.
|
|
IMPORT_C void SetVisibleRange(const TCellRef &aTopLeftCell);
Description
Scrolls the grid so that the specified cell is visible in the top left corner of the grid.
Parameters
const TCellRef &aTopLeftCell |
The cell to be made visible in the top left corner of the visible grid.
|
|
inline TRangeRef TitleRange() const;
Description
Gets the range of cells that form the grid titles.
Return value
TRangeRef
|
The range of cells that form the grid titles.
|
|
inline TRangeRef GridRange() const;
Description
Gets the range of cells that defines the grid boundary.
Return value
TRangeRef
|
The range of cells that defines the grid boundary.
|
|
IMPORT_C void SetGraphicsDeviceMap(MGraphicsDeviceMap *aGraphicsDeviceMap);
Description
Sets the graphics device map to be used.
Parameters
MGraphicsDeviceMap *aGraphicsDeviceMap |
The graphics device map: an interface for mapping between twips and device-specific units.
|
|
IMPORT_C void SetGridToDefault();
Description
Resets the grid to its default layout.
IMPORT_C TInt ColumnWidthInTwips(TInt aCol) const;
Description
Gets the width of the specified column.
Parameters
TInt aCol |
The column number.
|
|
Return value
TInt
|
The width of the column, in twips.
|
|
IMPORT_C void SetColumnWidthInTwipsL(TInt aCol, TInt aWidthInTwips);
Description
Sets the width of the specified column.
Note that the width cannot be set smaller than the minimum defined column width.
Parameters
TInt aCol |
The number of the column whose width is to be set.
|
TInt aWidthInTwips |
The width of the column, in twips.
|
|
Panic codes
GRIDIMG |
9 In debug mode, if no MGraphicsDeviceMap object has been set.
|
|
See also:
IMPORT_C TInt SetColumnWidthInTwipsL(TInt aStartCol, TInt aEndCol, TInt aWidthInTwips);
Description
Sets the widths of all specified columns to the specified value.
Parameters
TInt aStartCol |
The first column whose width is to be set.
|
TInt aEndCol |
The last column whose width is to be set.
|
TInt aWidthInTwips |
The width of the columns, in twips. Note that if the specified columns span the whole grid, then the function sets this value
as the default width of all columns through a call to SetDefaultColumnWidthInTwips() .
|
|
Return value
TInt
|
KErrNone if successful; KErrTooBig if the difference between the two column numbers is greater than EMaxArrayChanges.
|
|
DefaultColumnWidthInTwips()
IMPORT_C TInt DefaultColumnWidthInTwips() const;
Description
Gets the default width of columns.
Return value
TInt
|
The default width of columns, in twips.
|
|
SetDefaultColumnWidthInTwips()
IMPORT_C void SetDefaultColumnWidthInTwips(TInt aWidthInTwips);
Description
Sets the column width default value.
Note that the width cannot be set smaller than the minimum defined column width.
Parameters
TInt aWidthInTwips |
The width of columns, in twips.
|
|
See also:
SetColumnWidthsToDefault()
IMPORT_C void SetColumnWidthsToDefault();
Description
Sets the widths of all columns to the default value.
See also:
IMPORT_C TInt MinColumnWidthInPixels() const;
Description
Gets the minimum width of columns.
Return value
TInt
|
The minimum width of columns, in pixels.
|
|
SetMinColumnWidthInPixels()
IMPORT_C void SetMinColumnWidthInPixels(TInt aWidthInPixels);
Description
Sets the minimum width of columns.
Parameters
TInt aWidthInPixels |
The minimum width of columns, in pixels.
|
|
ColumnWidthOfSelectedInTwips()
IMPORT_C TInt ColumnWidthOfSelectedInTwips() const;
Description
Gets the width of columns in the selected region.
Return value
TInt
|
The column width, in twips, if all columns in the selected region have the same width; -1, otherwise.
|
|
Panic codes
GRIDIMG |
3 If this grid layout object has no grid image object.
|
|
SetColumnWidthOfSelectedInTwipsL()
IMPORT_C void SetColumnWidthOfSelectedInTwipsL(TInt aWidthInTwips);
Description
Sets the widths of all columns in the selected region to the specified value.
Parameters
TInt aWidthInTwips |
The column width, in twips.
|
|
Panic codes
GRIDIMG |
3 If this grid layout object has no grid image object.
|
|
IMPORT_C TInt RowHeightInTwips(TInt aRow) const;
Description
Gets the height of the specified row.
Parameters
TInt aRow |
The row number.
|
|
Return value
TInt
|
The height of the row, in twips.
|
|
IMPORT_C void SetRowHeightInTwipsL(TInt aRow, TInt aHeightInTwips);
Description
Sets the height of the specified row.
Note that the height cannot be set smaller than the minimum defined row height.
Parameters
TInt aRow |
The number of row whose height is to be set.
|
TInt aHeightInTwips |
The height of the row, in twips.
|
|
See also:
IMPORT_C TInt SetRowHeightInTwipsL(TInt aStartRow, TInt aEndRow, TInt aHeightInTwips);
Description
Sets the heights of all specified rows to the specified value.
Parameters
TInt aStartRow |
The first row whose height is to be set.
|
TInt aEndRow |
The last row whose height is to be set.
|
TInt aHeightInTwips |
The height of the rows, in twips. Note that if the specified rows span the whole grid, then the function sets this value as
the default height of all rows through a call to SetDefaultRowHeightInTwips() .
|
|
Return value
TInt
|
KErrNone if successful; KErrTooBig if the difference between the two row numbers is greater than EMaxArrayChanges.
|
|
DefaultRowHeightInTwips()
IMPORT_C TInt DefaultRowHeightInTwips() const;
Description
Gets the default height of rows.
Return value
TInt
|
The default height of rows, in twips,
|
|
SetDefaultRowHeightInTwips()
IMPORT_C void SetDefaultRowHeightInTwips(TInt aHeightInTwips);
Description
Sets the default height of rows.
Note that the height cannot be set smaller than the minimum defined row height.
Parameters
TInt aHeightInTwips |
The height of rows, in twips.
|
|
See also:
IMPORT_C void SetRowHeightsToDefault();
Description
Sets the heights of all rows to the default value.
See also:
IMPORT_C TInt MinRowHeightInPixels() const;
Description
Gets the minimum height of rows.
Return value
TInt
|
The minimum height of rows, in pixels.
|
|
SetMinRowHeightInPixels()
IMPORT_C void SetMinRowHeightInPixels(TInt aHeightInPixels);
Description
Sets the minimum height of rows.
Parameters
TInt aHeightInPixels |
The minimum height of rows, in pixels.
|
|
RowHeightOfSelectedInTwips()
IMPORT_C TInt RowHeightOfSelectedInTwips() const;
Description
Gets the height of rows in the selected region.
Return value
TInt
|
The row height, in twips, if all rows in the selected region have the same width; -1, otherwise.
|
|
Panic codes
GRIDIMG |
3 If this grid layout object has no grid image object.
|
|
SetRowHeightOfSelectedInTwipsL()
IMPORT_C void SetRowHeightOfSelectedInTwipsL(TInt aHeightInTwips);
Description
Sets the heights of all rows in the selected region to the specified value.
Parameters
TInt aHeightInTwips |
The row height, in twips.
|
|
Panic codes
GRIDIMG |
3 If this grid layout object has no grid image object.
|
|
IMPORT_C void RecalcPixelSparseMaps();
Description
Recalculates the internal maps that map row and column numbers to heights and widths respectively.
Heights and widths are held as both pixel and twip values.
IMPORT_C void InsertDeleteColumns(TInt aStartCol, TInt aNoOfCols, TFixGridRange aFixGridRange=EFixGridRange);
Description
Inserts or deletes columns.
Insertion causes columns to be inserted in front of the specified start column. Deletion causes columns in front of the specified
columns to be deleted.
Parameters
TInt aStartCol |
The start column.
|
TInt aNoOfCols |
The number of columns to be inserted or deleted. A positive number means that columns are to be inserted; a negative number
means that columns are to be deleted.
|
TFixGridRange aFixGridRange |
Indicates whether the grid boundary is to be adjusted by the number of columns (increased or decreased).
|
|
IMPORT_C void InsertDeleteRows(TInt aStartRow, TInt aNoOfRows, TFixGridRange aFixGridRange=EFixGridRange);
Description
Inserts or deletes rows.
Insertion causes rows to be inserted below the specified start row. Deletion causes rows below the specified row to be deleted.
Parameters
TInt aStartRow |
The start row.
|
TInt aNoOfRows |
The number of rows to be inserted or deleted. A positive number means that rows are to be inserted; a negative number means
that rows are to be deleted.
|
TFixGridRange aFixGridRange |
Indicates whether the grid boundary is to be adjusted by the number of rows (increased or decreased).
|
|
inline TBool IsSideLabels() const;
Description
Tests whether side grid labels are printed.
Return value
TBool
|
True, if the side labels are printed; false, otherwise.
|
|
IMPORT_C void SetSideLabels(TBool aState);
Description
Sets whether side labels are printed.
Parameters
TBool aState |
ETrue, if side labels are printed; EFalse, otherwise.
|
|
inline TBool IsTopLabels() const;
Description
Tests whether top labels are printed.
Return value
TBool
|
True, if the top labels are printed; false, otherwise.
|
|
IMPORT_C void SetTopLabels(TBool aState);
Description
Sets whether top labels are printed.
Parameters
TBool aState |
ETrue, if top labels are printed; EFalse, otherwise.
|
|
inline TBool IsVerticalGridLines() const;
Description
Tests whether vertical grid lines are to be drawn.
Return value
TBool
|
True, if vertical grid lines are to be drawn; false, otherwise.
|
|
IMPORT_C void SetVerticalGridLines(TBool aState);
Description
Sets whether vertical grid lines are to be drawn.
Parameters
TBool aState |
ETrue, if vertical grid lines are to be drawn; EFalse, otherwise.
|
|
inline TBool IsHorizontalGridLines() const;
Description
Tests whether horizontal grid lines are to be drawn.
Return value
TBool
|
True, if horizontal grid lines are to be drawn; false, otherwise.
|
|
IMPORT_C void SetHorizontalGridLines(TBool aState);
Description
Sets whether horizontal grid lines are to be drawn.
Parameters
TBool aState |
ETrue, if horizontal grid lines are to be drawn; EFalse, otherwise.
|
|
inline TBool IsGridLabelSeparators() const;
Description
Tests whether label separators are to be drawn.
Return value
TBool
|
True, if label separators are to be drawn; false, otherwise.
|
|
IMPORT_C void SetGridLabelSeparators(TBool aState);
Description
Sets whether label separators are to be drawn.
Parameters
TBool aState |
ETrue, if label separators are to be drawn; EFalse, otherwise.
|
|
inline TBool IsColumnBursting() const;
Description
Tests whether column bursting is permitted.
Column bursting occurs when the contents of a cell are too wide; adjacent cells are then overwritten, provided they are empty.
Return value
TBool
|
True, if column bursting is permitted; false, otherwise.
|
|
IMPORT_C void SetColumnBursting(TBool aState);
Description
Sets whether column bursting is to be permitted.
Column bursting occurs when the contents of a cell are too wide; adjacent cells are then overwritten, provided they are empty.
Parameters
TBool aState |
ETrue, if column bursting is to be permitted; EFalse, otherwise.
|
|
inline TBool IsCursorVisible() const;
Description
Tests whether the cursor is visible.
Return value
TBool
|
True, if the cursor is visible; false, otherwise.
|
|
IMPORT_C void SetCursorVisible(TBool aVisible);
Description
Sets whether the cursor is to be visible.
Parameters
TBool aVisible |
ETrue, if the cursor is to be visible; EFalse, otherwise.
|
|
inline TBool IsHighlightVisible() const;
Description
Tests whether selected cells are highlighted.
Return value
TBool
|
True, if selected cells are highlighted; false, otherwise.
|
|
IMPORT_C void SetHighlightVisible(TBool aVisible);
Description
Sets whether selected cells are to be highlighted.
Parameters
TBool aVisible |
ETrue, if selected cells are to be highlighted; EFalse, otherwise.
|
|
IsRowPermanentlySelected()
inline TBool IsRowPermanentlySelected() const;
Description
Tests whether rows are permanently selected.
Return value
TBool
|
True, if rows are permanently selected; false, otherwise.
|
|
SetRowPermanentlySelectedL()
IMPORT_C void SetRowPermanentlySelectedL(TBool aState);
Description
Sets whether rows are to be permanently selected.
! Bit naughty
Parameters
TBool aState |
ETrue, if rows are to be permanently selected; EFalse, otherwise.
|
|
inline TBool IsTitleLines() const;
Description
Tests whether the grid has both horizontal and vertical title lines.
Return value
TBool
|
True, if the grid has both a horizontal and vertical title line; false, otherwise.
|
|
inline TBool IsHorizontalTitleLine() const;
Description
Tests whether the grid has a horizontal title line.
Return value
TBool
|
True, if the grid is to have a horizontal title line; false otherwise.
|
|
inline TBool IsVerticalTitleLine() const;
Description
Tests whether the grid has a vertical title line.
Return value
TBool
|
True, if the grid is to have a vertical title line; false otherwise.
|
|
IMPORT_C void SetTitleLinesL(TBool aState);
Description
Sets whether the grid is to have both horizontal and vertical title lines.
Parameters
TBool aState |
ETrue, if the grid is to have both a horizontal and vertical title line; EFalse, otherwise.
|
|
IMPORT_C void SetTitleLinesL(const TCellRef &aCellRef);
Description
Sets horizontal and vertical title lines at the specified cell.
Parameters
const TCellRef &aCellRef |
The cell reference at which title lines are set.
|
|
Panic codes
GRIDIMG |
3 If this grid layout object has no grid image object.
|
|
IMPORT_C void ToggleTitleLinesL();
Description
Sets title lines on, if they are off; sets title lines off, if they are on.
IsIndefiniteRowBoundaries()
inline TBool IsIndefiniteRowBoundaries() const;
Description
Tests whether the grid has indefinite row boundaries.
Return value
TBool
|
True, if the grid has indefinite row boundaries; false, otherwise.
|
|
inline TBool IsUniformRowHeight() const;
Description
Tests whether all the rows have the same height.
Return value
TBool
|
True, if all rows have the same height; false, otherwise.
|
|
IMPORT_C void SetUniformRowHeight(TBool aState);
Description
Sets whether all rows are to have the same height.
Parameters
TBool aState |
ETrue, if all rows are to have the same height; EFalse, otherwise.
|
|
inline TBool IsUniformColumnWidth() const;
Description
Tests whether all columns have the same width.
Return value
TBool
|
True, if all columns have the same width; false, otherwise.
|
|
IMPORT_C void SetUniformColumnWidth(TBool aState);
Description
Sets whether all columns are to have the same width.
Parameters
TBool aState |
ETrue, if all columns are to have the same width; EFalse, otherwise.
|
|
inline TBool IsTopLabelDragDisabled() const;
Description
Tests whether a drag operation on the boundary between two columns is permitted.
Return value
TBool
|
True, if a drag operation on a column boundary is permitted; false otherwise.
|
|
SetTopLabelDragDisabled()
IMPORT_C void SetTopLabelDragDisabled(TBool aState);
Description
Sets whether a drag operation on the boundary between two columns is to be permitted.
Parameters
TBool aState |
ETrue, if the drag operation is to be permitted; EFalse, otherwise.
|
|
IsSideLabelDragDisabled()
inline TBool IsSideLabelDragDisabled() const;
Description
Tests whether a drag operation on the boundary between two rows is permitted.
Return value
TBool
|
True, if a drag operation on a row boundary is permitted; false otherwise.
|
|
SetSideLabelDragDisabled()
IMPORT_C void SetSideLabelDragDisabled(TBool aState);
Description
Sets whether a drag operation on the boundary between two rows is to be permitted.
Parameters
TBool aState |
ETrue, if the drag operation is to be permitted; EFalse, otherwise.
|
|
inline TBool IsPrintedLabels() const;
Description
Tests whether labels are printed.
Return value
TBool
|
True, if labels are printed; false, otherwise.
|
|
IMPORT_C void SetPrintedLabels(TBool aState);
Description
Sets whether labels are printed.
Parameters
TBool aState |
ETrue if labels are printed; EFalse, otherwise.
|
|
inline TBool IsPrintedGridLines() const;
Description
Tests whether grid lines are printed.
Return value
TBool
|
True, if grid lines are printed; false, otherwise.
|
|
IMPORT_C void SetPrintedGridLines(TBool aState);
Description
Sets whether grid lines are printed.
Parameters
TBool aState |
ETrue if grid lines are printed; EFalse, otherwise.
|
|
IsEncroachingCellBorders()
inline TBool IsEncroachingCellBorders() const;
Description
Tests whether encroaching cell borders are permitted.
Encroaching cell borders are where cell borders wider than one pixel are drawn inside the cell, as opposed to outside.
Return value
TBool
|
True, if encroaching cells borders are permitted; false, otherwise.
|
|
SetEncroachingCellBorders()
IMPORT_C void SetEncroachingCellBorders(TBool aState);
Description
Sets whether encroaching cell borders are permitted.
Encroaching cell borders are where cell borders wider than one pixel are drawn inside the cell, as opposed to outside.
Parameters
TBool aState |
ETrue, if encroaching cells borders are to be permitted; EFalse, otherwise.
|
|
inline TBool IsRowSelectionDisabled() const;
Description
Tests whether row selection is disabled.
Return value
TBool
|
True, if row selection is disabled; false, otherwise.
|
|
SetRowSelectionDisabled()
IMPORT_C void SetRowSelectionDisabled(TBool aState);
Description
Sets whether row selection is disabled.
Parameters
TBool aState |
ETrue, if row selection is disabled; EFalse, otherwise.
|
|
IsColumnSelectionDisabled()
inline TBool IsColumnSelectionDisabled() const;
Description
Tests whether column selection is disabled.
Return value
TBool
|
True, if column selection is disabled; false, otherwise.
|
|
SetColumnSelectionDisabled()
IMPORT_C void SetColumnSelectionDisabled(TBool aState);
Description
Sets whether column selection is disabled.
Parameters
TBool aState |
ETrue, if column selection is disabled; EFalse, otherwise.
|
|
inline TBool IsAutoClearGridCells() const;
Description
Tests whether automatic clearing of grid cells is done.
Automatic clearing of grid cells is where all cells are cleared on redraw, in case drawing the contents doesn't guarantee
to write to every pixel (the usual way of doing flicker-free redraws).
Return value
TBool
|
True, if automatic clearing of grid cells is done; false, otherwise.
|
|
IMPORT_C void SetAutoClearGridCells(TBool aState);
Description
Sets whether automatic clearing of grid cells is to be done.
Parameters
TBool aState |
ETrue, if automatic clearing of grid cells is to be done; EFalse, otherwise.
|
|
inline TBool IsPageBreakLinesHidden() const;
Description
Tests whether lines marking page breaks are hidden.
Return value
TBool
|
True, if lines marking page breaks are hidden; false, otherwise.
|
|
SetPageBreakLinesHidden()
IMPORT_C void SetPageBreakLinesHidden(TBool aState);
Description
Sets whether lines marking page breaks are hidden.
Parameters
TBool aState |
ETrue, if lines marking page breaks are hidden; EFalse, otherwise.
|
|
inline TBool HasChanged() const;
Description
Tests whether any change has occurred to the grid layout.
Such changes include alterations to the height of a row or the width of a column, additions or deletions of rows or columns,
and changes to the visibility of grid lines. Note that this list is not exhaustive.
Return value
TBool
|
True, if the grid layout has changed; false, otherwise.
|
|
inline void SetHasChanged(TBool aHasChanged);
Description
Sets whether any change has occurred to the grid layout.
Parameters
TBool aHasChanged |
ETrue, if any change has occurred to the grid layout; EFalse, otherwise.
|
|
inline void SetGridEdgeColor(TRgb aColor);
Description
Defines the colour that the edges of the grid beyond the grid range are to have.
If not changed by this function, the default colour is white.
Parameters
TRgb aColor |
The colour value.
|
|
IMPORT_C TInt MinVisibleFromRow() const;
Description
Gets the number of the topmost row visible in the grid.
Return value
IMPORT_C TInt MinVisibleFromColumn() const;
Description
Gets the number of the leftmost column visible in the grid.
Return value
IMPORT_C void ResetVisibleToRow();
Description
Resets the row number of the row that should be visible at the bottom of the visible area of the grid.
IMPORT_C void ResetVisibleToColumn();
Description
Resets the column number of the column visible at the right of the visible area of the grid.
IMPORT_C void ResetVisibleToCell();
Description
Resets the row and column numbers visible at the bottom, and to the right, of the visible area of the grid.
IMPORT_C TInt RowExtent() const;
Description
Gets the number of rows in the range.
Return value
IMPORT_C TInt ColumnExtent() const;
Description
Gets the number of columns in the range.
Return value
TInt
|
The number of columns.
|
|
IMPORT_C TInt RowToYVal(TInt aRow) const;
Description
Converts the specified row number to a screen y-coordinate value.
Note that the resulting value may be outside the current grid window.
Parameters
TInt aRow |
The row number.
|
|
Return value
TInt
|
The y-coordinate value.
|
|
IMPORT_C TInt RowToYVal(TInt aStartRow, TInt aEndRow) const;
Description
Calculates the relative pixel distance between the two specified rows.
Parameters
TInt aStartRow |
The row number of the first row.
|
TInt aEndRow |
The row number of the second row.
|
|
Return value
TInt
|
The relative pixel distance.
|
|
IMPORT_C TInt VisibleRowToYVal(TInt aRow) const;
Description
Converts the specified visible row number to a screen y-coordinate value.
Note that the resulting value may be outside the current grid window.
Parameters
TInt aRow |
The row number of the visible row.
|
|
Return value
TInt
|
The y-coordinate value. Note that this is -1, if the row is not visible.
|
|
IMPORT_C TInt TitleRowToYVal(TInt aTitleRow) const;
Description
Calculates the relative pixel distance between the specified row and the first title row.
Parameters
TInt aTitleRow |
The row number.
|
|
Return value
TInt
|
The relative pixel distance.
|
|
IMPORT_C TInt ColumnToXVal(TInt aCol) const;
Description
Converts the specified column number to a screen x-coordinate value.
Note that the resulting value may be outside the current grid window.
Parameters
TInt aCol |
The column number.
|
|
Return value
TInt
|
The column's x-coordinate value.
|
|
Panic codes
GRIDIMG |
3 In debug mode, if this grid layout object has no grid image.
|
|
IMPORT_C TInt ColumnToXVal(TInt aStartCol, TInt aEndCol) const;
Description
Gets the distance, in pixels, between the two specified columns.
Parameters
TInt aStartCol |
The first (start) column number.
|
TInt aEndCol |
The second (end) column number.
|
|
Return value
TInt
|
The distance, in pixels.
|
|
IMPORT_C TInt VisibleColumnToXVal(TInt aCol) const;
Description
Converts the specified visible column number to a screen x-coordinate value.
Note that the resulting value may be outside the current grid window.
Parameters
TInt aCol |
The column number of the visible column.
|
|
Return value
TInt
|
The x-coordinate value. Note that this is -1, if the column is not visible.
|
|
IMPORT_C TInt TitleColumnToXVal(TInt aTitleCol) const;
Description
Calculates the relative pixel distance between the specified column and the first title column.
Parameters
TInt aTitleCol |
The column number.
|
|
Return value
TInt
|
The relative pixel distance.
|
|
IMPORT_C TInt YValToRow(TInt aYVal) const;
Description
Gets the number of the row, limited to the grid boundary, that is on or above the specified y-coordinate value.
Parameters
TInt aYVal |
The y-coordinate value. Note that this may represent a point off the visible screen.
|
|
Return value
TInt
|
The row number, limited to the grid boundary.
|
|
IMPORT_C TInt YValToRow(TInt aStartRow, TInt aDisp) const;
Description
Gets the number of the row that is on or above the specified displacement from the specified row.
Parameters
TInt aStartRow |
The row from which displacement is calculated.
|
TInt aDisp |
The displacement, in pixels.
|
|
Return value
TInt
|
The row number at the specified displacement.
|
|
IMPORT_C TInt YValToTitleRow(TInt aYVal) const;
Description
Gets the number of the row that is on or above the specified y-coordinate value
Parameters
TInt aYVal |
The y-coordinate value. Note that this may represent a point off the visible screen.
|
|
Return value
TInt
|
The row number. Note that this may include the title row.
|
|
IMPORT_C TInt XValToColumn(TInt aXVal) const;
Description
Gets the number of the column, limited to the grid boundary, that is on or to the left of the specified x-coordinate value.
Parameters
TInt aXVal |
The x-coordinate value. Note that this may represent a point off the visible screen.
|
|
Return value
TInt
|
The column number, limited to the grid boundary.
|
|
IMPORT_C TInt XValToColumn(TInt aStartCol, TInt aDisp) const;
Description
Gets the number of the column that is on or to the left of the specified displacement from the specified column.
Parameters
TInt aStartCol |
The column from which displacement is calculated.
|
TInt aDisp |
The displacement, in pixels.
|
|
Return value
TInt
|
The column number at the specified displacement.
|
|
IMPORT_C TInt XValToTitleColumn(TInt aXVal) const;
Description
Gets the number of the column that is on or to the left of the specified x-coordinate value
Parameters
TInt aXVal |
The x-coordinate value. Note that this may represent a point off the visible screen.
|
|
Return value
TInt
|
The column number. Note that this may include the title column.
|
|
IMPORT_C TCellRef PointToCell(const TPoint &aPoint) const;
Description
Gets the cell reference of the cell that contains the specified screen co-ordinates.
Parameters
const TPoint &aPoint |
The screen co-ordinates.
|
|
Return value
IMPORT_C TCellRef PointToCell(const TCellRef &aStartCell, const TPoint &aPointDisp) const;
Description
Gets the cell reference of the cell that is displaced from the specified cell by the specified pixel co-ordinates.
Parameters
const TCellRef &aStartCell |
The cell reference from which the displacement is based.
|
const TPoint &aPointDisp |
The displacement.
|
|
Return value
TCellRef
|
The cell at the specified displacement.
|
|
IMPORT_C TPoint CellToPoint(const TCellRef &aCell) const;
Description
Gets the relative screen coordinates of the top left corner of the specified cell.
Parameters
Return value
TPoint
|
The relative screen co-ordinates.
|
|
IMPORT_C TPoint CellToPoint(const TCellRef &aStartCell, const TCellRef &aEndCell) const;
Description
Gets the co-ordinate distance, in pixels, between the specified cells.
Parameters
const TCellRef &aStartCell |
The start cell of the range.
|
const TCellRef &aEndCell |
The end cell of the range.
|
|
Return value
TPoint
|
The x and y values representing the distance, in pixels, between the two columns and the two rows, respectively, that are
defined by the two cells.
|
|
IMPORT_C TPoint TitleCellToPoint(const TCellRef &aTitleCell) const;
Description
Gets the relative screen coordinates of the top left corner of the specified cell, when title lines are displayed.
Parameters
Return value
TPoint
|
The relative screen co-ordinates.
|
|
Panic codes
GRIDIMG |
3 In debug mode, if this grid layout object has no grid image.
|
GRIDIMG |
4 In debug mode, if there is no horizontal title line and/or there is no vertical title line.
|
|
IMPORT_C TRect CellToRect(const TCellRef &aCell) const;
Description
Gets the rectangle that is occupied by the specified cell.
Parameters
Return value
TRect
|
The occupied rectangle. Note that this excludes the cell's bottom and right grid lines.
|
|
IMPORT_C TInt YValToNearestRow(TInt aStartRow, TInt aDisp) const;
Description
Gets the row that is nearest to the specified displacement from the specified row.
Parameters
TInt aStartRow |
The row on which the displacement is based.
|
TInt aDisp |
The displacement value, in pixels.
|
|
Return value
IMPORT_C TInt XValToNearestColumn(TInt aStartCol, TInt aDisp) const;
Description
Gets the column that is nearest to the specified displacement from the specified column.
Parameters
TInt aStartCol |
The column on which the displacement is based.
|
TInt aDisp |
The displacement value, in pixels.
|
|
Return value
IMPORT_C TSize TopLeftTitleRangeSize() const;
Description
Gets the size of the top left range, if title lines are on.
The top left range is the range of cells formed by the intersection of the rows and columns that form the titles.
Return value
TSize
|
The size of the top left range.
|
|
IMPORT_C void PaginateL();
Description
Paginates the grid.
Note that when preparing the grid for printing using a CGridPrinter
object, then use that object's CGridPrinter::PaginateL()
function instead.
IMPORT_C void ClearPagination();
Description
Marks the grid as unpaginated.
NotifyPaginationOutOfDateL()
IMPORT_C void NotifyPaginationOutOfDateL();
Description
Notifies this object that repagination must take place.
This function is called as a response to changes in the grid, such as a change in the page size, a change to the width of
selected columns, the setting or removal of hard page breaks etc.
inline TBool IsPaginated() const;
Description
Tests whether the grid has been paginated.
Return value
TBool
|
True, if the grid has been paginated; false, otherwise.
|
|
IMPORT_C TRangeRef PageToRange(TInt aPageNo, TPageOrder aPageOrder) const;
Description
Gets the range of cells that are on the specified page
Parameters
TInt aPageNo |
The page number. The first page is assumed to be page zero.
|
TPageOrder aPageOrder |
The page order.
|
|
Return value
Panic codes
GRIDIMG |
5 In debug mode, if the grid has not been paginated.
|
|
inline void SetPrintRange(const TRangeRef &aPrintRange);
Description
Sets the range of cells that are visible for printing.
Parameters
IMPORT_C TInt NoOfPages() const;
Description
Gets the number of pages that the grid would print to.
Return value
TInt
|
The number of pages.
|
|
Panic codes
GRIDIMG |
5 In debug mode, if the grid has not been paginated.
|
|
IMPORT_C void SetPageSizeInTwipsL(const TSize &aPageSize);
Description
Sets the size of a page.
Parameters
const TSize &aPageSize |
The size of a page, in twips.
|
|
inline TSize PageSizeInTwips() const;
Description
Gets the size of a page.
Return value
TSize
|
The size of a page, in twips.
|
|
inline TBool IsAutoPagination() const;
Description
Tests whether automatic pagination is in effect.
Return value
TBool
|
True, if automatic pagination is in effect, false, otherwise.
|
|
IMPORT_C void SetAutoPagination(TBool aState);
Description
Sets whether automatic pagination is to be in effect.
Parameters
TBool aState |
ETrue, if automatic pagination is to be in effect; EFalse, otherwise.
|
|
IMPORT_C TBool IsHardRowPageBreak(TInt aRow) const;
Description
Tests whether there is a hard page break at the specified row.
Parameters
Return value
TBool
|
True, if there is a hard page break at (i.e. immediately above) the specified row; false, otherwise.
|
|
IMPORT_C TBool IsHardColumnPageBreak(TInt aCol) const;
Description
Tests whether there is a hard page break at the specified column.
Parameters
Return value
TBool
|
True, if there is a hard page break at (i.e. immediately to the left of) the specified column; false, otherwise.
|
|
IMPORT_C void SetHardRowPageBreakL(TInt aRow);
Description
Sets a hard page break at the specified row.
Note that pagination will be flagged as being out of date.
Parameters
TInt aRow |
The row, immediately above which the hard page break is to occur.
|
|
IMPORT_C void ClearHardRowPageBreakL(TInt aRow);
Description
Removes the hard page break at the specified row.
Note that pagination will be flagged as being out of date.
Note also that there is no harm in calling this function if there is no hard page break at the specified row.
Parameters
TInt aRow |
The row, immediately above which there is a hard page break.
|
|
SetHardColumnPageBreakL()
IMPORT_C void SetHardColumnPageBreakL(TInt aCol);
Description
Sets a hard page break at the specified column.
Note that pagination will be flagged as being out of date.
Parameters
TInt aCol |
The column, immediately to the left of which the hard page break is to occur.
|
|
ClearHardColumnPageBreakL()
IMPORT_C void ClearHardColumnPageBreakL(TInt aCol);
Description
Removes the hard page break at the specified column.
Note that pagination will be flagged as being out of date.
Note also that there is no harm in calling this function if there is no hard page break at the specified column.
Parameters
TInt aCol |
The column, immediately to the left of which there is a hard page break.
|
|
ClearAllHardPageBreaksL()
IMPORT_C void ClearAllHardPageBreaksL();
Description
Removes all hard page breaks; this includes all row and column page breaks.
Note that pagination will be flagged as being out of date.
IMPORT_C void ExternalizeL(RWriteStream &aStream) const;
Description
Externalises an object of this class to a write stream.
The presence of this function means that the standard templated operator<<()
can be used to externalise objects of this class.
Parameters
RWriteStream &aStream |
Stream to which the object should be externalised.
|
|
IMPORT_C void InternalizeL(RReadStream &aStream);
Description
Internalises an object of this class from a read stream.
The presence of this function means that the standard templated operator>>()
can be used to internalise objects of this class.
Note that the function has assignment semantics. It replaces the old value of the object with a new value read from the read
stream.
Parameters
RReadStream &aStream |
Stream from which the object is to be internalised.
|
|
IMPORT_C TStreamId StoreL(CStreamStore &aStore) const;
Description
Externalises this object to a stream in the specified store.
Parameters
CStreamStore &aStore |
The store in which the stream is to be created and stored.
|
|
Return value
IMPORT_C void RestoreL(const CStreamStore &aStore, TStreamId aStreamId);
Description
Internalises this object from the specified stream in the specified store.
Note that the function has assignment semantics. It replaces the old value of this object with a new value read from the specified
stream.
Parameters
const CStreamStore &aStore |
The store containing the stream.
|
TStreamId aStreamId |
The Id of the stream from which this object is to be internalised.
|
|
IMPORT_C void SetGridColors(TGridColors aColors);
Description
Sets the collection of colours to be used to draw the grid.
Parameters
IMPORT_C const TGridColors &GridColors() const;
Description
Gets the collection of colours used to draw the grid.
Return value
TPageOrder
Description
Defines the order in which pages are printed.
ERightThenDown |
All pages in a horizontal line are drawn before starting on the next horizontal line.
|
EDownThenRight |
All pages in a vertical line are drawn before starting on the next vertical line to the right.
|
|
TFixGridRange
Description
Indicates whether the size of the grid should be adjusted when columns and rows are inserted or deleted.
EFixGridRange |
The grid range should not be adjusted on insertion or deletion of rows and/or columns.
|
EAdjustGridRange |
The grid range can be adjusted on insertion or deletion of rows and/or columns.
|
|