epoc32/include/mw/grdstd.inl
author William Roberts <williamr@symbian.org>
Wed, 31 Mar 2010 12:33:34 +0100
branchSymbian3
changeset 4 837f303aceeb
parent 3 e1b950c65cb4
permissions -rw-r--r--
Current Symbian^3 public API header files (from PDK 3.0.h)
This is the epoc32/include tree with the "platform" subtrees removed, and
all but a selected few mbg and rsg files removed.
williamr@2
     1
// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies).
williamr@2
     2
// All rights reserved.
williamr@2
     3
// This component and the accompanying materials are made available
williamr@4
     4
// under the terms of "Eclipse Public License v1.0"
williamr@2
     5
// which accompanies this distribution, and is available
williamr@4
     6
// at the URL "http://www.eclipse.org/legal/epl-v10.html".
williamr@2
     7
//
williamr@2
     8
// Initial Contributors:
williamr@2
     9
// Nokia Corporation - initial contribution.
williamr@2
    10
//
williamr@2
    11
// Contributors:
williamr@2
    12
//
williamr@2
    13
// Description:
williamr@2
    14
// CGridLay
williamr@2
    15
// 
williamr@2
    16
//
williamr@2
    17
williamr@2
    18
inline void CGridLay::SetGridTable(const MGridTable* aGridTable)
williamr@2
    19
/** Sets the specified grid table object.
williamr@2
    20
williamr@2
    21
@param aGridTable The grid table object. */
williamr@2
    22
	{ iGridTable = aGridTable; }
williamr@2
    23
williamr@2
    24
inline TRangeRef CGridLay::VisibleRange() const
williamr@2
    25
/** Gets the range of cells that are currently visible.
williamr@2
    26
williamr@2
    27
@return The visible cell range. Note that the TRangeRef::iFrom member is the 
williamr@2
    28
cell that is visible at the top of the window, and the TRangeRef::iTo member 
williamr@2
    29
is the cell that is partially visible at the bottom right of the window. */
williamr@2
    30
	{ return iVisibleRange; }
williamr@2
    31
williamr@2
    32
inline TRangeRef CGridLay::TitleRange() const
williamr@2
    33
/** Gets the range of cells that form the grid titles.
williamr@2
    34
williamr@2
    35
@return The range of cells that form the grid titles. */
williamr@2
    36
	{ return iTitleRange; }
williamr@2
    37
williamr@2
    38
inline TRangeRef CGridLay::GridRange() const
williamr@2
    39
/** Gets the range of cells that defines the grid boundary.
williamr@2
    40
williamr@2
    41
@return The range of cells that defines the grid boundary. */
williamr@2
    42
	{ return iGridRange; }
williamr@2
    43
williamr@2
    44
inline TBool CGridLay::IsSideLabels() const
williamr@2
    45
/** Tests whether side grid labels are printed.
williamr@2
    46
williamr@2
    47
@return True, if the side labels are printed; false, otherwise. */
williamr@2
    48
	{ return (iFlags&EIsSideLabels); }
williamr@2
    49
williamr@2
    50
inline TBool CGridLay::IsTopLabels() const
williamr@2
    51
/** Tests whether top labels are printed.
williamr@2
    52
williamr@2
    53
@return True, if the top labels are printed; false, otherwise. */
williamr@2
    54
	{ return (iFlags&EIsTopLabels); }
williamr@2
    55
williamr@2
    56
inline TBool CGridLay::IsVerticalGridLines() const
williamr@2
    57
/** Tests whether vertical grid lines are to be drawn.
williamr@2
    58
williamr@2
    59
@return True, if vertical grid lines are to be drawn; false, otherwise. */
williamr@2
    60
	{ return (iFlags&EIsVerticalGridLines); }
williamr@2
    61
williamr@2
    62
inline TBool CGridLay::IsHorizontalGridLines() const
williamr@2
    63
/** Tests whether horizontal grid lines are to be drawn.
williamr@2
    64
williamr@2
    65
@return True, if horizontal grid lines are to be drawn; false, otherwise. */
williamr@2
    66
	{ return (iFlags&EIsHorizontalGridLines); }
williamr@2
    67
williamr@2
    68
inline TBool CGridLay::IsGridLabelSeparators() const
williamr@2
    69
/** Tests whether label separators are to be drawn.
williamr@2
    70
williamr@2
    71
@return True, if label separators are to be drawn; false, otherwise. */
williamr@2
    72
	{ return (iFlags&EIsGridLabelSeparators); }
williamr@2
    73
williamr@2
    74
inline TBool CGridLay::IsColumnBursting() const
williamr@2
    75
/** Tests whether column bursting is permitted.
williamr@2
    76
williamr@2
    77
Column bursting occurs when the contents of a cell are too wide; adjacent 
williamr@2
    78
cells are then overwritten, provided they are empty.
williamr@2
    79
williamr@2
    80
@return True, if column bursting is permitted; false, otherwise. */
williamr@2
    81
	{ return (iFlags&EIsColumnBursting); }
williamr@2
    82
williamr@2
    83
inline TBool CGridLay::IsCursorVisible() const
williamr@2
    84
/** Tests whether the cursor is visible.
williamr@2
    85
williamr@2
    86
@return True, if the cursor is visible; false, otherwise. */
williamr@2
    87
	{ return (iFlags&EIsCursorVisible); }
williamr@2
    88
williamr@2
    89
inline TBool CGridLay::IsHighlightVisible() const
williamr@2
    90
/** Tests whether selected cells are highlighted.
williamr@2
    91
williamr@2
    92
@return True, if selected cells are highlighted; false, otherwise. */
williamr@2
    93
	{ return (iFlags&EIsHighlightVisible); }
williamr@2
    94
williamr@2
    95
inline TBool CGridLay::IsRowPermanentlySelected() const
williamr@2
    96
/** Tests whether rows are permanently selected.
williamr@2
    97
williamr@2
    98
@return True, if rows are permanently selected; false, otherwise. */
williamr@2
    99
	{ return (iFlags&EIsRowPermanentlySelected); }
williamr@2
   100
williamr@2
   101
inline TBool CGridLay::IsTitleLines() const
williamr@2
   102
/** Tests whether the grid has both horizontal and vertical title lines.
williamr@2
   103
williamr@2
   104
@return True, if the grid has both a horizontal and vertical title line; false, 
williamr@2
   105
otherwise. */
williamr@2
   106
	{ return (iFlags&(EIsHorizontalTitleLine|EIsVerticalTitleLine)); }
williamr@2
   107
williamr@2
   108
inline TBool CGridLay::IsHorizontalTitleLine() const
williamr@2
   109
/** Tests whether the grid has a horizontal title line.
williamr@2
   110
williamr@2
   111
@return True, if the grid is to have a horizontal title line; false otherwise. */
williamr@2
   112
	{ return (iFlags&EIsHorizontalTitleLine); }
williamr@2
   113
williamr@2
   114
inline TBool CGridLay::IsVerticalTitleLine() const
williamr@2
   115
/** Tests whether the grid has a vertical title line.
williamr@2
   116
williamr@2
   117
@return True, if the grid is to have a vertical title line; false otherwise. */
williamr@2
   118
	{ return (iFlags&EIsVerticalTitleLine); }
williamr@2
   119
williamr@2
   120
inline TBool CGridLay::IsIndefiniteRowBoundaries() const
williamr@2
   121
/** Tests whether the grid has indefinite row boundaries.
williamr@2
   122
williamr@2
   123
@return True, if the grid has indefinite row boundaries; false, otherwise. */
williamr@2
   124
	{ return (iFlags&EIsIndefiniteRowBoundaries); }
williamr@2
   125
williamr@2
   126
inline TBool CGridLay::IsUniformRowHeight() const
williamr@2
   127
/** Tests whether all the rows have the same height.
williamr@2
   128
williamr@2
   129
@return True, if all rows have the same height; false, otherwise. */
williamr@2
   130
	{ return (iFlags&EIsUniformRowHeight); }
williamr@2
   131
williamr@2
   132
inline TBool CGridLay::IsUniformColumnWidth() const
williamr@2
   133
/** Tests whether all columns have the same width.
williamr@2
   134
williamr@2
   135
@return True, if all columns have the same width; false, otherwise. */
williamr@2
   136
	{ return (iFlags&EIsUniformColumnWidth); }
williamr@2
   137
williamr@2
   138
inline TBool CGridLay::IsTopLabelDragDisabled() const
williamr@2
   139
/** Tests whether a drag operation on the boundary between two columns is permitted.
williamr@2
   140
williamr@2
   141
@return True, if a drag operation on a column boundary is permitted; false otherwise. */
williamr@2
   142
	{ return (iFlags&EIsTopLabelDragDisabled); }
williamr@2
   143
williamr@2
   144
inline TBool CGridLay::IsSideLabelDragDisabled() const
williamr@2
   145
/** Tests whether a drag operation on the boundary between two rows is permitted.
williamr@2
   146
williamr@2
   147
@return True, if a drag operation on a row boundary is permitted; false otherwise. */
williamr@2
   148
	{ return (iFlags&EIsSideLabelDragDisabled); }
williamr@2
   149
williamr@2
   150
inline TBool CGridLay::IsPrintedLabels() const
williamr@2
   151
/** Tests whether labels are printed.
williamr@2
   152
williamr@2
   153
@return True, if labels are printed; false, otherwise. */
williamr@2
   154
	{ return (iFlags&EIsPrintedLabels); }
williamr@2
   155
williamr@2
   156
inline TBool CGridLay::IsPrintedGridLines() const
williamr@2
   157
/** Tests whether grid lines are printed.
williamr@2
   158
williamr@2
   159
@return True, if grid lines are printed; false, otherwise. */
williamr@2
   160
	{ return (iFlags&EIsPrintedGridLines); }
williamr@2
   161
williamr@2
   162
inline TBool CGridLay::IsVisibleToRowFullyVisible() const
williamr@2
   163
	{ return (iFlags&EIsVisibleToRowFullyVisible); }
williamr@2
   164
williamr@2
   165
inline TBool CGridLay::IsVisibleToColumnFullyVisible() const
williamr@2
   166
	{ return (iFlags&EIsVisibleToColumnFullyVisible); }
williamr@2
   167
williamr@2
   168
inline TBool CGridLay::IsEncroachingCellBorders() const
williamr@2
   169
/** Tests whether encroaching cell borders are permitted.
williamr@2
   170
williamr@2
   171
Encroaching cell borders are where cell borders wider than one pixel are drawn 
williamr@2
   172
inside the cell, as opposed to outside.
williamr@2
   173
williamr@2
   174
@return True, if encroaching cells borders are permitted; false, otherwise. */
williamr@2
   175
	{ return (iFlags&EIsEncroachingCellBorders); }
williamr@2
   176
williamr@2
   177
inline TBool CGridLay::IsRowSelectionDisabled() const
williamr@2
   178
/** Tests whether row selection is disabled.
williamr@2
   179
williamr@2
   180
@return True, if row selection is disabled; false, otherwise. */
williamr@2
   181
	{ return (iFlags&EIsRowSelectionDisabled); }
williamr@2
   182
williamr@2
   183
inline TBool CGridLay::IsColumnSelectionDisabled() const
williamr@2
   184
/** Tests whether column selection is disabled.
williamr@2
   185
williamr@2
   186
@return True, if column selection is disabled; false, otherwise. */
williamr@2
   187
	{ return (iFlags&EIsColumnSelectionDisabled); }
williamr@2
   188
williamr@2
   189
inline TBool CGridLay::IsAutoClearGridCells() const
williamr@2
   190
/** Tests whether automatic clearing of grid cells is done.
williamr@2
   191
williamr@2
   192
Automatic clearing of grid cells is where all cells are cleared on redraw, 
williamr@2
   193
in case drawing the contents doesn't guarantee to write to every pixel (the 
williamr@2
   194
usual way of doing flicker-free redraws).
williamr@2
   195
williamr@2
   196
@return True, if automatic clearing of grid cells is done; false, otherwise. */
williamr@2
   197
	{ return (iFlags&EIsAutoClearGridCells); }
williamr@2
   198
williamr@2
   199
inline TBool CGridLay::IsPageBreakLinesHidden() const
williamr@2
   200
/** Tests whether lines marking page breaks are hidden.
williamr@2
   201
williamr@2
   202
@return True, if lines marking page breaks are hidden; false, otherwise. */
williamr@2
   203
	{ return (iFlags&EIsPageBreakLinesHidden); }
williamr@2
   204
williamr@2
   205
inline TBool CGridLay::HasChanged() const
williamr@2
   206
/** Tests whether any change has occurred to the grid layout.
williamr@2
   207
williamr@2
   208
Such changes include alterations to the height of a row or the 
williamr@2
   209
width of a column, additions or deletions of rows or columns, 
williamr@2
   210
and changes to the visibility of grid lines.
williamr@2
   211
Note that this list is not exhaustive.
williamr@2
   212
williamr@2
   213
@return True, if the grid layout has changed; false, otherwise. */
williamr@2
   214
	{ return iHasChanged; }
williamr@2
   215
williamr@2
   216
inline void CGridLay::SetHasChanged(TBool aHasChanged)
williamr@2
   217
/** Sets whether any change has occurred to the grid layout.
williamr@2
   218
williamr@2
   219
@param aHasChanged ETrue, if any change has occurred to the grid layout; EFalse, 
williamr@2
   220
otherwise. */
williamr@2
   221
	{ iHasChanged=aHasChanged; }
williamr@2
   222
williamr@2
   223
inline void CGridLay::SetGridEdgeColor(TRgb aColor)
williamr@2
   224
/** Defines the colour that the edges of the grid beyond the grid range are to 
williamr@2
   225
have.
williamr@2
   226
williamr@2
   227
If not changed by this function, the default colour is white.
williamr@2
   228
williamr@2
   229
@param aColor The colour value. */
williamr@2
   230
	{ iGridEdgeColor=aColor; }
williamr@2
   231
williamr@2
   232
inline TBool CGridLay::IsPaginated() const
williamr@2
   233
/** Tests whether the grid has been paginated.
williamr@2
   234
williamr@2
   235
@return True, if the grid has been paginated; false, otherwise. */
williamr@2
   236
	{ return (iFlags&EIsPaginated); }
williamr@2
   237
williamr@2
   238
inline void CGridLay::SetPrintRange(const TRangeRef& aPrintRange) 
williamr@2
   239
/** Sets the range of cells that are visible for printing.
williamr@2
   240
williamr@2
   241
@param aPrintRange The cell range. */
williamr@2
   242
	{ iVisibleRange=aPrintRange; }
williamr@2
   243
williamr@2
   244
inline TSize CGridLay::PageSizeInTwips() const
williamr@2
   245
/** Gets the size of a page.
williamr@2
   246
williamr@2
   247
@return The size of a page, in twips. */
williamr@2
   248
	{ return iPageSizeInTwips; }
williamr@2
   249
williamr@2
   250
inline TBool CGridLay::IsAutoPagination() const
williamr@2
   251
/** Tests whether automatic pagination is in effect.
williamr@2
   252
williamr@2
   253
@return True, if automatic pagination is in effect, false, otherwise. */
williamr@2
   254
	{ return (iFlags&EIsAutoPagination); }
williamr@2
   255
williamr@2
   256
// CGridLabelImg
williamr@2
   257
williamr@2
   258
inline void CGridLabelImg::SetGraphicsDeviceMap(MGraphicsDeviceMap* aGraphicsDeviceMap)
williamr@2
   259
/** Supplies a new interface object for mapping between twips and device-specific 
williamr@2
   260
units.
williamr@2
   261
williamr@2
   262
Note that the caller must call ReleaseFont() before calling this function, 
williamr@2
   263
and must call NotifyGraphicsDeviceMapChangeL() afterwards.
williamr@2
   264
williamr@2
   265
@param aGraphicsDeviceMap A new interface object for mapping between twips 
williamr@2
   266
and device-specific units. */
williamr@2
   267
	{
williamr@2
   268
	iGraphicsDeviceMap=aGraphicsDeviceMap;
williamr@2
   269
	}
williamr@2
   270
williamr@2
   271
inline TFontSpec CGridLabelImg::FontSpec() const
williamr@2
   272
/** Gets the font specification.
williamr@2
   273
williamr@2
   274
@return The font specification. */
williamr@2
   275
	{
williamr@2
   276
	return iFontSpec;
williamr@2
   277
	}
williamr@2
   278
williamr@2
   279
inline void CGridLabelImg::SetGridColors(const TGridColors& aGridColors)
williamr@2
   280
/** Sets the colours to be used when drawing the label.
williamr@2
   281
williamr@2
   282
@param aGridColors The object containing the grid colours specification. */
williamr@2
   283
	{
williamr@2
   284
	iGridColors = aGridColors;
williamr@2
   285
	}
williamr@2
   286
williamr@2
   287
// CGridCellImg
williamr@2
   288
williamr@2
   289
inline TInt CGridCellImg::BurstColOffset() const
williamr@2
   290
/** Gets the bursting column offset.
williamr@2
   291
williamr@2
   292
@return The burst column offset */
williamr@2
   293
	{ return iBurstColOffset; }
williamr@2
   294
williamr@2
   295
inline TInt CGridCellImg::BurstLeft() const
williamr@2
   296
/** Gets the left hand bursting value.
williamr@2
   297
williamr@2
   298
@return The burst value. */
williamr@2
   299
	{ return iBurstLeft; }
williamr@2
   300
williamr@2
   301
inline TInt CGridCellImg::BurstRight() const
williamr@2
   302
/** Gets the right hand bursting value.
williamr@2
   303
williamr@2
   304
@return The burst value */
williamr@2
   305
	{ return iBurstRight; }
williamr@2
   306
williamr@2
   307
inline TBool CGridCellImg::IsHorizontalGridLines() const
williamr@2
   308
/** Tests whether horizontal grid lines are drawn.
williamr@2
   309
williamr@2
   310
This function is set by the CGridImg object and allows classes derived from 
williamr@2
   311
CGridCellImg to modify or restrict the area into which they draw.
williamr@2
   312
williamr@2
   313
@return True, if horizontal grid lines are drawn; false, otherwise. */
williamr@2
   314
	{ return iGridLineFlags&EIsHorizontalGridLines; }
williamr@2
   315
williamr@2
   316
inline TBool CGridCellImg::IsVerticalGridLines() const
williamr@2
   317
/** Tests whether vertical grid lines are drawn.
williamr@2
   318
williamr@2
   319
This function is set by the CGridImg object and allows classes derived from 
williamr@2
   320
CGridCellImg to modify or restrict the area into which they draw.
williamr@2
   321
williamr@2
   322
@return True, if vertical grid lines are drawn; false, otherwise. */
williamr@2
   323
	{ return iGridLineFlags&EIsVerticalGridLines; }
williamr@2
   324
williamr@2
   325
inline void CGridCellImg::SetGridColors(const TGridColors& aGridColors)
williamr@2
   326
/** Sets the colours to be used when drawing.
williamr@2
   327
williamr@2
   328
@param aGridColors The object containing the grid colours specification. */
williamr@2
   329
	{
williamr@2
   330
	iGridColors = aGridColors;
williamr@2
   331
	}
williamr@2
   332
williamr@2
   333
// CGridImg
williamr@2
   334
williamr@2
   335
inline void CGridImg::SetGridLay(CGridLay* aGridLay)
williamr@2
   336
/** Sets the specified grid layout object.
williamr@2
   337
williamr@2
   338
@param aGridLay A pointer to the object that controls the layout of rows and 
williamr@2
   339
columns. */
williamr@2
   340
	{ iGridLay = aGridLay; }
williamr@2
   341
williamr@2
   342
inline void CGridImg::SetWindow(RWindow *aWin)
williamr@2
   343
/** Sets the specified window.
williamr@2
   344
williamr@2
   345
@param aWin A pointer to the currently active window. */
williamr@2
   346
	{ iWin = aWin; }
williamr@2
   347
williamr@4
   348
//->
williamr@2
   349
//inline void CGridImg::SetGridLabelImg(CGridLabelImg *aGridLabelImg)
williamr@2
   350
//	{ iGridLabelImg =  aGridLabelImg; }
williamr@4
   351
//->
williamr@2
   352
williamr@2
   353
inline void CGridImg::SetCursorMoveCallBack(MGridCursorMoveCallBack *aCursorMoveCallBack)
williamr@2
   354
/** Sets the cursor moved call-back object.
williamr@2
   355
williamr@2
   356
The call-back object encapsulates the implementation of a call-back function 
williamr@2
   357
that is called whenever there is a change to the cursor position.
williamr@2
   358
williamr@2
   359
@param aCursorMoveCallBack A pointer to the callback object. */
williamr@2
   360
	{ iCursorMoveCallBack = aCursorMoveCallBack; }
williamr@2
   361
williamr@2
   362
inline const CGridCellRegion* CGridImg::Selected() const
williamr@2
   363
/** Gets the currently selected region.
williamr@2
   364
williamr@2
   365
@return A pointer to the selected region object. */
williamr@2
   366
	{ return iSelected; }
williamr@2
   367
williamr@2
   368
inline const CGridLabelImg* CGridImg::GridLabelImg() const
williamr@2
   369
/** Gets the the object that is used to draw a cell label.
williamr@2
   370
williamr@2
   371
@return A pointer to the object that is used to draw a cell label. */
williamr@2
   372
	{ return iGridLabelImg; }
williamr@2
   373
williamr@2
   374
inline TCellRef CGridImg::CursorPos() const
williamr@2
   375
/** Gets the current position of the cursor.
williamr@2
   376
williamr@2
   377
@return The cell reference of the current cursor position. */
williamr@2
   378
	{ return iCursorPos; }
williamr@2
   379
williamr@2
   380
inline TCellRef CGridImg::AnchorPos() const
williamr@2
   381
/** Gets the cursor's anchor position. 
williamr@2
   382
williamr@2
   383
This is the cell reference of the position that the cursor must return to 
williamr@2
   384
after a series of selected movements have been made.
williamr@2
   385
williamr@2
   386
@return The cell reference of the cursor's anchor position. */
williamr@2
   387
	{ return iAnchorPos; }
williamr@2
   388
williamr@2
   389
inline TCellRef CGridImg::NewCursorPos() const
williamr@2
   390
/** Gets the new position of the cursor.
williamr@2
   391
williamr@2
   392
@return The cell reference of the new cursor position.
williamr@2
   393
@see SetCursorPosL() */
williamr@2
   394
	{ return iNewCursorPos; }
williamr@2
   395
williamr@2
   396
inline TRect CGridImg::GridRect() const
williamr@2
   397
/** Gets the rectangle containing the grid.
williamr@2
   398
williamr@2
   399
@return The rectangle containing the grid. */
williamr@2
   400
	{ return iGridRect; }
williamr@2
   401
williamr@2
   402
inline TPoint CGridImg::TitlePoint() const
williamr@2
   403
/** Gets the position of the title.
williamr@2
   404
williamr@2
   405
This is the point at the top left of the grid excluding the labels.
williamr@2
   406
williamr@2
   407
@return The position of the title. */
williamr@2
   408
	{ return iTitlePoint; }
williamr@2
   409
williamr@2
   410
inline TPoint CGridImg::MainPoint() const
williamr@2
   411
// Returns the most commonly used point in the grid (usually same as TitlePoint()).
williamr@2
   412
/** Gets the position at which the visible range starts.
williamr@2
   413
williamr@2
   414
@return The position at which the visible range starts. */
williamr@2
   415
	{ return iMainPoint; }
williamr@2
   416
williamr@2
   417
inline TRect CGridImg::MainRect() const
williamr@2
   418
/** Gets the rectangle that corresponds to the visible range.
williamr@2
   419
williamr@2
   420
@return The rectangle that corresponds to the visible range. */
williamr@2
   421
	{ return TRect(iMainPoint,iGridRect.iBr); }
williamr@4
   422
williamr@4
   423