|
|
|
|
Location:
GRDSTD.H
Link against: grid.lib
class CGridLay : public CBase;
Handles the layout of a grid, and controls how columns, rows and selections appear.
CBase - Base class for all classes to be instantiated on the heapCGridLay - Handles the layout of a grid, and controls how columns, rows and selections appearDefined 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()
IMPORT_C CGridLay(MGraphicsDeviceMap *aGraphicsDeviceMap);
Constructor taking an object that implements mapping between twips and device-specific units.
|
IMPORT_C void ConstructL(CGridLay *aGridLay, CGridImg *aGridImg);
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.
|
IMPORT_C void ConstructL(const MGridTable *aGridTable, CGridImg *aGridImg, TInt aNoOfRows, TInt aNoOfCols);
A second-phase constructor for constructing the object with definite row boundaries.
|
IMPORT_C void ConstructL(const MGridTable *aGridTable, CGridImg *aGridImg, TInt aNoOfCols);
A second-phase constructor for constructing the object with indefinite row boundaries.
|
virtual IMPORT_C ~CGridLay();
Destructor.
Frees resources prior to destruction of the object.
IMPORT_C TPoint PageScroll(TMoveDirectionAndAmount aPageScroll);
Scrolls the grid by one page.
|
|
IMPORT_C TPoint ExposeCell(const TCellRef &aCell);
Scrolls the grid by the minimum necessary to allow the specified cell to become visible.
|
|
IMPORT_C TPoint ExposeCellToTopLeft(const TCellRef &aCell);
Scrolls the grid by the minimum necessary so that the specified cell is in the top left corner of the visible grid.
|
|
IMPORT_C void SetGridImgL(CGridImg *aGridImg);
Sets the specified grid image object.
|
inline void SetGridTable(const MGridTable *aGridTable);
Sets the specified grid table object.
|
inline TRangeRef VisibleRange() const;
Gets the range of cells that are currently visible.
|
IMPORT_C void SetVisibleRange(const TCellRef &aTopLeftCell);
Scrolls the grid so that the specified cell is visible in the top left corner of the grid.
|
inline TRangeRef TitleRange() const;
Gets the range of cells that form the grid titles.
|
inline TRangeRef GridRange() const;
Gets the range of cells that defines the grid boundary.
|
IMPORT_C void SetGraphicsDeviceMap(MGraphicsDeviceMap *aGraphicsDeviceMap);
Sets the graphics device map to be used.
|
IMPORT_C TInt ColumnWidthInTwips(TInt aCol) const;
Gets the width of the specified column.
|
|
IMPORT_C void SetColumnWidthInTwipsL(TInt aCol, TInt aWidthInTwips);
Sets the width of the specified column.
Note that the width cannot be set smaller than the minimum defined column width.
|
|
IMPORT_C TInt SetColumnWidthInTwipsL(TInt aStartCol, TInt aEndCol, TInt aWidthInTwips);
Sets the widths of all specified columns to the specified value.
|
|
IMPORT_C TInt DefaultColumnWidthInTwips() const;
Gets the default width of columns.
|
IMPORT_C void SetDefaultColumnWidthInTwips(TInt aWidthInTwips);
Sets the column width default value.
Note that the width cannot be set smaller than the minimum defined column width.
|
IMPORT_C void SetColumnWidthsToDefault();
Sets the widths of all columns to the default value.
IMPORT_C TInt MinColumnWidthInPixels() const;
Gets the minimum width of columns.
|
IMPORT_C void SetMinColumnWidthInPixels(TInt aWidthInPixels);
Sets the minimum width of columns.
|
IMPORT_C TInt ColumnWidthOfSelectedInTwips() const;
Gets the width of columns in the selected region.
|
|
IMPORT_C void SetColumnWidthOfSelectedInTwipsL(TInt aWidthInTwips);
Sets the widths of all columns in the selected region to the specified value.
|
|
IMPORT_C TInt RowHeightInTwips(TInt aRow) const;
Gets the height of the specified row.
|
|
IMPORT_C void SetRowHeightInTwipsL(TInt aRow, TInt aHeightInTwips);
Sets the height of the specified row.
Note that the height cannot be set smaller than the minimum defined row height.
|
IMPORT_C TInt SetRowHeightInTwipsL(TInt aStartRow, TInt aEndRow, TInt aHeightInTwips);
Sets the heights of all specified rows to the specified value.
|
|
IMPORT_C TInt DefaultRowHeightInTwips() const;
Gets the default height of rows.
|
IMPORT_C void SetDefaultRowHeightInTwips(TInt aHeightInTwips);
Sets the default height of rows.
Note that the height cannot be set smaller than the minimum defined row height.
|
IMPORT_C void SetRowHeightsToDefault();
Sets the heights of all rows to the default value.
IMPORT_C TInt MinRowHeightInPixels() const;
Gets the minimum height of rows.
|
IMPORT_C void SetMinRowHeightInPixels(TInt aHeightInPixels);
Sets the minimum height of rows.
|
IMPORT_C TInt RowHeightOfSelectedInTwips() const;
Gets the height of rows in the selected region.
|
|
IMPORT_C void SetRowHeightOfSelectedInTwipsL(TInt aHeightInTwips);
Sets the heights of all rows in the selected region to the specified value.
|
|
IMPORT_C void RecalcPixelSparseMaps();
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);
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.
|
IMPORT_C void InsertDeleteRows(TInt aStartRow, TInt aNoOfRows, TFixGridRange aFixGridRange=EFixGridRange);
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.
|
inline TBool IsSideLabels() const;
Tests whether side grid labels are printed.
|
IMPORT_C void SetSideLabels(TBool aState);
Sets whether side labels are printed.
|
inline TBool IsTopLabels() const;
Tests whether top labels are printed.
|
IMPORT_C void SetTopLabels(TBool aState);
Sets whether top labels are printed.
|
inline TBool IsVerticalGridLines() const;
Tests whether vertical grid lines are to be drawn.
|
IMPORT_C void SetVerticalGridLines(TBool aState);
Sets whether vertical grid lines are to be drawn.
|
inline TBool IsHorizontalGridLines() const;
Tests whether horizontal grid lines are to be drawn.
|
IMPORT_C void SetHorizontalGridLines(TBool aState);
Sets whether horizontal grid lines are to be drawn.
|
inline TBool IsGridLabelSeparators() const;
Tests whether label separators are to be drawn.
|
IMPORT_C void SetGridLabelSeparators(TBool aState);
Sets whether label separators are to be drawn.
|
inline TBool IsColumnBursting() const;
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.
|
IMPORT_C void SetColumnBursting(TBool aState);
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.
|
inline TBool IsCursorVisible() const;
Tests whether the cursor is visible.
|
IMPORT_C void SetCursorVisible(TBool aVisible);
Sets whether the cursor is to be visible.
|
inline TBool IsHighlightVisible() const;
Tests whether selected cells are highlighted.
|
IMPORT_C void SetHighlightVisible(TBool aVisible);
Sets whether selected cells are to be highlighted.
|
inline TBool IsRowPermanentlySelected() const;
Tests whether rows are permanently selected.
|
IMPORT_C void SetRowPermanentlySelectedL(TBool aState);
Sets whether rows are to be permanently selected.
! Bit naughty
|
inline TBool IsTitleLines() const;
Tests whether the grid has both horizontal and vertical title lines.
|
inline TBool IsHorizontalTitleLine() const;
Tests whether the grid has a horizontal title line.
|
inline TBool IsVerticalTitleLine() const;
Tests whether the grid has a vertical title line.
|
IMPORT_C void SetTitleLinesL(TBool aState);
Sets whether the grid is to have both horizontal and vertical title lines.
|
IMPORT_C void SetTitleLinesL(const TCellRef &aCellRef);
Sets horizontal and vertical title lines at the specified cell.
|
|
IMPORT_C void ToggleTitleLinesL();
Sets title lines on, if they are off; sets title lines off, if they are on.
inline TBool IsIndefiniteRowBoundaries() const;
Tests whether the grid has indefinite row boundaries.
|
inline TBool IsUniformRowHeight() const;
Tests whether all the rows have the same height.
|
IMPORT_C void SetUniformRowHeight(TBool aState);
Sets whether all rows are to have the same height.
|
inline TBool IsUniformColumnWidth() const;
Tests whether all columns have the same width.
|
IMPORT_C void SetUniformColumnWidth(TBool aState);
Sets whether all columns are to have the same width.
|
inline TBool IsTopLabelDragDisabled() const;
Tests whether a drag operation on the boundary between two columns is permitted.
|
IMPORT_C void SetTopLabelDragDisabled(TBool aState);
Sets whether a drag operation on the boundary between two columns is to be permitted.
|
inline TBool IsSideLabelDragDisabled() const;
Tests whether a drag operation on the boundary between two rows is permitted.
|
IMPORT_C void SetSideLabelDragDisabled(TBool aState);
Sets whether a drag operation on the boundary between two rows is to be permitted.
|
inline TBool IsPrintedLabels() const;
Tests whether labels are printed.
|
IMPORT_C void SetPrintedLabels(TBool aState);
Sets whether labels are printed.
|
inline TBool IsPrintedGridLines() const;
Tests whether grid lines are printed.
|
IMPORT_C void SetPrintedGridLines(TBool aState);
Sets whether grid lines are printed.
|
inline TBool IsEncroachingCellBorders() const;
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.
|
IMPORT_C void SetEncroachingCellBorders(TBool aState);
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.
|
inline TBool IsRowSelectionDisabled() const;
Tests whether row selection is disabled.
|
IMPORT_C void SetRowSelectionDisabled(TBool aState);
Sets whether row selection is disabled.
|
inline TBool IsColumnSelectionDisabled() const;
Tests whether column selection is disabled.
|
IMPORT_C void SetColumnSelectionDisabled(TBool aState);
Sets whether column selection is disabled.
|
inline TBool IsAutoClearGridCells() const;
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).
|
IMPORT_C void SetAutoClearGridCells(TBool aState);
Sets whether automatic clearing of grid cells is to be done.
|
inline TBool IsPageBreakLinesHidden() const;
Tests whether lines marking page breaks are hidden.
|
IMPORT_C void SetPageBreakLinesHidden(TBool aState);
Sets whether lines marking page breaks are hidden.
|
inline TBool HasChanged() const;
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.
|
inline void SetHasChanged(TBool aHasChanged);
Sets whether any change has occurred to the grid layout.
|
inline void SetGridEdgeColor(TRgb aColor);
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.
|
IMPORT_C TInt MinVisibleFromRow() const;
Gets the number of the topmost row visible in the grid.
|
IMPORT_C TInt MinVisibleFromColumn() const;
Gets the number of the leftmost column visible in the grid.
|
IMPORT_C void ResetVisibleToRow();
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();
Resets the column number of the column visible at the right of the visible area of the grid.
IMPORT_C void ResetVisibleToCell();
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;
Gets the number of rows in the range.
|
IMPORT_C TInt ColumnExtent() const;
Gets the number of columns in the range.