CAknGridView Class Reference

class CAknGridView : public CListBoxView

CAknGridView handles the drawing, the mapping of the grid data index to the underlying listbox index (and vice versa) as well as the movement around the grid. Differentiation is needed between a data index and the list box index since the inherited list box code handles the top, bottom and current indexes as though everything is order topdown and left to right. This is no good for grid that maybe order in 8 different ways so need conversion between list box index and actual data index. List box index is the index for the data item according to the snaking list box format of numbering data items. Data index is the actual index in the grid according to the ordering applied to the data by the user. Note: the logical position is the intermediate form used to map from a list box index to a data index or vi sa versa. It is essentialy the position of the item in relation to the top left corner of the grid. I.e. the top left position has logical position 0,0.

0.9 avkon.lib

Inherits from

Nested Classes and Structures

Public Member Functions
CAknGridView()
~CAknGridView()
IMPORT_C TIntActualDataIndex(TInt)
IMPORT_C voidCalcBottomItemIndex()
IMPORT_C voidCalcDataWidth()
IMPORT_C voidCalcItemIndexFromRowAndColIndexes(TInt &, TInt, TInt)
IMPORT_C TIntCalcNewTopItemIndexSoItemIsVisible(TInt)
IMPORT_C voidCalcRowAndColIndexesFromItemIndex(TInt, TInt &, TInt &)
IMPORT_C TIntCalculateHScrollOffsetSoItemIsVisible(TInt)
TInt ColumnWidth()
IMPORT_C TIntCurrentDataIndex()
IMPORT_C TIntCurrentItemIndex()
IMPORT_C voidDataIndexFromLogicalPos(TInt &, TInt, TInt)
IMPORT_C voidDraw(const TRect *)
IMPORT_C voidDrawEmptyList()
IMPORT_C voidDrawItem(TInt)
IMPORT_C voidDrawItemRange(TInt, TInt)
IMPORT_C voidDrawMatcherCursor()
IMPORT_C TSizeGridCellDimensions()
IMPORT_C TBoolIsPrimaryVertical()
IMPORT_C TPointItemPos(TInt)
IMPORT_C TSizeItemSize(TInt)
IMPORT_C TIntListBoxIndex(TInt)
IMPORT_C voidListBoxIndexFromLogicalPos(TInt &, TInt, TInt)
IMPORT_C voidLogicalPosFromDataIndex(TInt, TInt &, TInt &)
IMPORT_C voidLogicalPosFromListBoxIndex(TInt, TInt &, TInt &)
IMPORT_C voidMoveCursorL(TCursorMovement, TSelectionMode)
voidMoveCursorWithRepeatsL(TBool, TSelectionMode, TInt)
IMPORT_C voidMoveToItemIndexL(TInt, TSelectionMode)
IMPORT_C TIntNumberOfColsInView()
IMPORT_C TIntNumberOfRowsInView()
IMPORT_C TBoolScrollToMakeItemVisible(TInt)
IMPORT_C voidSetColumnWidth(TInt)
IMPORT_C voidSetCurrentDataIndex(TInt)
IMPORT_C voidSetGridCellDimensions(TSize)
IMPORT_C voidSetGridDetails(SGrid)
IMPORT_C voidSetItemHeight(TInt)
IMPORT_C voidSetPrimaryScrollingType(TScrollingType)
IMPORT_C voidSetSecondaryScrollingType(TScrollingType)
IMPORT_C voidSetSpacesBetweenItems(TSize)
IMPORT_C voidSetTopItemIndex(TInt)
IMPORT_C TIntVisibleWidth(const TRect &)
IMPORT_C TBoolXYPosToItemIndex(TPoint, TInt &)
Protected Member Functions
IMPORT_C voidClearUnusedItemSpace(TInt, TInt)
IMPORT_C voidDoMoveL(TCursorMovement, TSelectionMode)
IMPORT_C voidDrawColumnRange(TInt, TInt)
CAknGridM *GridModel()
IMPORT_C TBoolItemExists(TInt)
IMPORT_C voidUpdateHScrollOffsetBasedOnTopItemIndex()
Private Member Functions
voidDrawUnusedViewPortion()
IMPORT_C TIntFindNextItem(TInt, TBool, TBool, TBool, TBool)
TBool IsEdgePassed(TInt, TBool, TBool, TBool, TBool, TInt &)
TBool IsMoveDown(TCursorMovement)
TBool IsMoveRight(TCursorMovement)
IMPORT_C TAny *Reserved_1()
IMPORT_C TIntSearchByLines(TInt, TInt, TCursorMovement, TBool)
Inherited Functions
CBase::CBase()
CBase::Delete(CBase *)
CBase::Extension_(TUint,TAny *&,TAny *)
CBase::operator new(TUint)
CBase::operator new(TUint,TAny *)
CBase::operator new(TUint,TLeave)
CBase::operator new(TUint,TLeave,TUint)
CBase::operator new(TUint,TUint)
CBase::~CBase()
CListBoxView::BackColor()const
CListBoxView::BottomItemIndex()const
CListBoxView::CListBoxView()
CListBoxView::ClearFlags(TInt)
CListBoxView::ClearSelection()
CListBoxView::ClearSelectionAnchorAndActiveIndex()
CListBoxView::ConstructL(MListBoxModel *,CListItemDrawer *,CWsScreenDevice *,RWindowGroup *,RWindow *,const TRect &,TInt)
CListBoxView::DataWidth()const
CListBoxView::DeselectItem(TInt)
CListBoxView::DeselectRangeL(TInt,TInt)
CListBoxView::DisableVerticalLineDrawing(TBool)
CListBoxView::DrawEmptyList(const TRect &)const
CListBoxView::EmptyListText()const
CListBoxView::Flags()const
CListBoxView::GetSelectionIndexesL(CSelectionIndexArray *)const
CListBoxView::HScroll(TInt)
CListBoxView::HScrollOffset()const
CListBoxView::HideMatcherCursor()
CListBoxView::IsVisible()const
CListBoxView::ItemDrawer()const
CListBoxView::ItemHeight()const
CListBoxView::ItemIsPartiallyVisible(TInt)const
CListBoxView::ItemIsSelected(TInt)const
CListBoxView::ItemIsVisible(TInt)const
CListBoxView::ItemOffsetInPixels()const
CListBoxView::MatcherCursorPos()const
CListBoxView::NumberOfItemsThatFitInRect(const TRect &)const
CListBoxView::RedrawDisabled()const
CListBoxView::SelectItemL(TInt)
CListBoxView::SelectRangeL(TInt,TInt)
CListBoxView::SelectionIndexes()const
CListBoxView::SetAnchor(TInt)
CListBoxView::SetBackColor(TRgb)
CListBoxView::SetCurrentItemIndex(TInt)
CListBoxView::SetDimmed(TBool)
CListBoxView::SetDisableRedraw(TBool)
CListBoxView::SetEmphasized(TBool)
CListBoxView::SetFlags(TInt)
CListBoxView::SetHScrollOffset(TInt)
CListBoxView::SetItemOffsetInPixels(TInt)
CListBoxView::SetListEmptyTextL(const TDesC &)
CListBoxView::SetMatcherCursor(TBool)
CListBoxView::SetMatcherCursorColor(TRgb)
CListBoxView::SetMatcherCursorPos(TInt)
CListBoxView::SetPaintedSelection(TBool)
CListBoxView::SetScrolling(TBool)
CListBoxView::SetSelectionIndexesL(const CSelectionIndexArray *)
CListBoxView::SetTextColor(TRgb)
CListBoxView::SetViewRect(const TRect &)
CListBoxView::SetVisibilityObserver(MListVisibilityObserver *)
CListBoxView::TextColor()const
CListBoxView::ToggleItemL(TInt)
CListBoxView::TopItemIndex()const
CListBoxView::UpdateSelectionL(TSelectionMode)
CListBoxView::VScrollTo(TInt)
CListBoxView::VScrollTo(TInt,TRect &)
CListBoxView::VerticalMoveToItemL(TInt,TSelectionMode)
CListBoxView::ViewRect()const
CListBoxView::~CListBoxView()
Public Member Enumerations
enumTGridFlags { EPrimaryIsVertical = 0x0001, ETopToBottom = 0x0002, ELeftToRight = 0x0004 }
enumTScrollingType {
EScrollFollowsItemsAndStops, EScrollFollowsItemsAndLoops, EScrollFollowsGrid, EScrollStops, EScrollIncrementLineAndStops, EScrollIncrementLineAndLoops
}
Protected Member Enumerations
enumTPageIndex { EPreviousPage, ENextPage, EHome, EEnd }
enumTPositionCurrentIndex { EPage, EColumn, EOppositeCorner }
Inherited Enumerations
CListBoxView:TCursorMovement
CListBoxView:TFlags
CListBoxView:TSelectionMode
Private Attributes
SGrid iGridDetails
TScrollingType iScrollInSecondaryDimension
TScrollingType iScrollingType
TInt iSpare
Inherited Attributes
CListBoxView::iBottomItemIndex
CListBoxView::iCurrentItemIndex
CListBoxView::iDataWidth
CListBoxView::iDisableVerticalLineDrawing
CListBoxView::iExtension
CListBoxView::iFlags
CListBoxView::iGc
CListBoxView::iGroupWin
CListBoxView::iHScrollOffset
CListBoxView::iItemDrawer
CListBoxView::iItemHeight
CListBoxView::iListEmptyText
CListBoxView::iModel
CListBoxView::iTopItemIndex
CListBoxView::iVerticalOffset
CListBoxView::iViewRect
CListBoxView::iWin

Constructor & Destructor Documentation

CAknGridView()

IMPORT_CCAknGridView()

Default C++ constructor.

~CAknGridView()

IMPORT_C~CAknGridView()[virtual]

Destructor.

Member Functions Documentation

ActualDataIndex(TInt)

IMPORT_C TIntActualDataIndex(TIntaListBoxIndex)const

Returns the actual index of given listbox index. The actual data index.

Parameters

TInt aListBoxIndexThe index of the listbox.

CalcBottomItemIndex()

IMPORT_C voidCalcBottomItemIndex()[virtual]

This function has been overloaded to draw items correctly. Recalculates the bottom item s index. This is called by the list box control when either the size or the number of items in its model changes.

CalcDataWidth()

IMPORT_C voidCalcDataWidth()[virtual]

Calculates the data width in columns. iDataWidth is calculated based on model and drawer information.

CalcItemIndexFromRowAndColIndexes(TInt &, TInt, TInt)

IMPORT_C voidCalcItemIndexFromRowAndColIndexes(TInt &aItemIndex,
TIntaRowIndex,
TIntaColIndex
)const

This function converts a row/column pair into the item index for that item.

Parameters

TInt & aItemIndexReference to the item index.
TInt aRowIndexRow index of the item.
TInt aColIndexColumn index of the item.

CalcNewTopItemIndexSoItemIsVisible(TInt)

IMPORT_C TIntCalcNewTopItemIndexSoItemIsVisible(TIntaItemIndex)const [virtual]

This function gets the item the view would need to be moved to in order to make the specified item visible. The item to scroll to to make aItemIndex visible.

Parameters

TInt aItemIndexThe item to make visible.

CalcRowAndColIndexesFromItemIndex(TInt, TInt &, TInt &)

IMPORT_C voidCalcRowAndColIndexesFromItemIndex(TIntaItemIndex,
TInt &aRowIndex,
TInt &aColIndex
)const

Converts an item index into the (row, column) pair describing that item.

Parameters

TInt aItemIndexThe item index.
TInt & aRowIndexReference to the row index.
TInt & aColIndexReference the column index.

CalculateHScrollOffsetSoItemIsVisible(TInt)

IMPORT_C TIntCalculateHScrollOffsetSoItemIsVisible(TIntaItemIndex)[virtual]

Gets the number of columns that this view would need to be scrolled by to make the specified item visible. The function returns 0 if no scrolling is needed. ScrollToMakeItemVisible() uses this function. The number of columns to scroll, or zero if no scrolling is needed.

Parameters

TInt aItemIndexItem to make visible.

ClearUnusedItemSpace(TInt, TInt)

IMPORT_C voidClearUnusedItemSpace(TIntaStartItemIndex,
TIntaEndItemIndex
)const [protected]

This function clears each item s rectangle between the specified start and finish item s indexes.

Parameters

TInt aStartItemIndexThe first item to clear.
TInt aEndItemIndexThe last item to clear.

ColumnWidth()

TInt ColumnWidth()const [inline]

This function gets the width of all columns in the view. The width of all columns in the view, in pixels.

CurrentDataIndex()

IMPORT_C TIntCurrentDataIndex()const

Returns the current data index with respect to the ordering of the cells in the grid. Current data index.

CurrentItemIndex()

IMPORT_C TIntCurrentItemIndex()const [virtual]

From CListBoxView. This function returns the current item in the grid and -1 if there is no current item, The current item.

DataIndexFromLogicalPos(TInt &, TInt, TInt)

IMPORT_C voidDataIndexFromLogicalPos(TInt &aItemIndex,
TIntaRowIndex,
TIntaColIndex
)const

Converts a logical position on the grid, where the co-ordinates are with respect to the top left hand corner of the grid, to an index for the cell with respect to the ordering of the cells in the grid.

Parameters

TInt & aItemIndexReference to the index for the cell in the grid.
TInt aRowIndexThe row in the grid.
TInt aColIndexThe column in the grid.

DoMoveL(TCursorMovement, TSelectionMode)

IMPORT_C voidDoMoveL(TCursorMovementaCursorMovement,
TSelectionModeaSelectionMode
)[protected]

This function handles movement routines.

Parameters

TCursorMovement aCursorMovementHandles cursor movements etc. ECursorNextItem and ECursorPreviousItem.
TSelectionMode aSelectionModeModes for modifying the selection.

Draw(const TRect *)

IMPORT_C voidDraw(const TRect *aClipRect = NULL)const [virtual]

This function draws every visible item into the specified rectangle. As implemented in CListBoxView, this function's argument is ignored and the internal viewing rectangle is used. See SetViewRect().

Parameters

const TRect * aClipRect = NULL

DrawColumnRange(TInt, TInt)

IMPORT_C voidDrawColumnRange(TIntaStartColIndex,
TIntaEndColIndex
)const [protected]

This function draws every item in every column between the start and end columns inclusively.

Parameters

TInt aStartColIndexThe first column to draw.
TInt aEndColIndexThe last column to draw.

DrawEmptyList()

IMPORT_C voidDrawEmptyList()const [virtual]

Draws empty grid list.

DrawItem(TInt)

IMPORT_C voidDrawItem(TIntaItemIndex)const [virtual]

This has been overloaded to ensure that only valid cells are drawn and not the empty cells.

Parameters

TInt aItemIndexIndex number of the item to draw.

DrawItemRange(TInt, TInt)

IMPORT_C voidDrawItemRange(TIntaStartItemIndex,
TIntaEndItemIndex
)const [virtual]

This function draws every item between the start and end indices inclusively.

Parameters

TInt aStartItemIndexThe first item to draw.
TInt aEndItemIndexThe final item to draw.

DrawMatcherCursor()

IMPORT_C voidDrawMatcherCursor()[virtual]

From CListBoxView. Basically empty implementation of CListBoxView::DrawMatcherCursor.

DrawUnusedViewPortion()

voidDrawUnusedViewPortion()const [private]

Draws the portion of the grid view rectangle that contains no items.

FindNextItem(TInt, TBool, TBool, TBool, TBool)

IMPORT_C TIntFindNextItem(TIntaItemIndex,
TBoolaLookDown,
TBoolaLookRight,
TBoolaFirstLookHorizontal,
TBoolaBeginSearchOnIndex = EFalse
)[private]

Parameters

TInt aItemIndex
TBool aLookDown
TBool aLookRight
TBool aFirstLookHorizontal
TBool aBeginSearchOnIndex = EFalse

GridCellDimensions()

IMPORT_C TSizeGridCellDimensions()const

Returns the current grid dimensions. The size of the current grid.

GridModel()

CAknGridM *GridModel()const [protected, inline]

This inline function is grid model helper. A pointer to CAknGridM object.

IsEdgePassed(TInt, TBool, TBool, TBool, TBool, TInt &)

TBool IsEdgePassed(TIntaItemIndex,
TBoolaLookDown,
TBoolaLookRight,
TBoolaFirstLookHorizontal,
TBoolaBeginSearchOnIndex,
TInt &aNewIndex
)[private]

Parameters

TInt aItemIndex
TBool aLookDown
TBool aLookRight
TBool aFirstLookHorizontal
TBool aBeginSearchOnIndex
TInt & aNewIndex

IsMoveDown(TCursorMovement)

TBool IsMoveDown(TCursorMovementaCursorMovement)[private]

Parameters

TCursorMovement aCursorMovement

IsMoveRight(TCursorMovement)

TBool IsMoveRight(TCursorMovementaCursorMovement)[private]

Parameters

TCursorMovement aCursorMovement

IsPrimaryVertical()

IMPORT_C TBoolIsPrimaryVertical()const

Returns ETrue if the primary dimension of the grid is vertical. if vertical is set as primary, otherwise EFalse.

ItemExists(TInt)

IMPORT_C TBoolItemExists(TIntaListBoxIndex)const [protected]

This function tests whether an item exists. ETrue if the specified item exists, EFalse otherwise.

Parameters

TInt aListBoxIndexIndex to test.

ItemPos(TInt)

IMPORT_C TPointItemPos(TIntaItemIndex)const [virtual]

This function gets the position of the top left corner of the specified item, in pixels. TPoint position of the top left corner of the item, in pixels.

Parameters

TInt aItemIndexAn item in the model.

ItemSize(TInt)

IMPORT_C TSizeItemSize(TIntaItemIndex = 0)const [virtual]

Gets the size of the specified item. TSize The size of the item in pixels.

Parameters

TInt aItemIndex = 0

ListBoxIndex(TInt)

IMPORT_C TIntListBoxIndex(TIntaDataIndex)const

Returns the listbox index of given data index. The index in listbox.

Parameters

TInt aDataIndexThe index of the actual data.

ListBoxIndexFromLogicalPos(TInt &, TInt, TInt)

IMPORT_C voidListBoxIndexFromLogicalPos(TInt &aItemIndex,
TIntaRowIndex,
TIntaColIndex
)const

Converts a CEikListBox index for a cell in the grid, given with respect to the snaking listbox top down, left to right structure underlying the grid structure, to a logical position on the grid, where the co-ordinates are with respect to the top left hand corner of the grid.

Parameters

TInt & aItemIndexReference to the index for the cell in the grid.
TInt aRowIndexThe row in the grid.
TInt aColIndexThe column in the grid.

LogicalPosFromDataIndex(TInt, TInt &, TInt &)

IMPORT_C voidLogicalPosFromDataIndex(TIntaItemIndex,
TInt &aRowIndex,
TInt &aColIndex
)const

Converts an index for a cell in the grid, given with respect to the ordering of the cells in the grid, to a logical position on the grid, where the co-ordinates are with respect to the top left hand corner of the grid.

Parameters

TInt aItemIndexThe index for the cell in the grid.
TInt & aRowIndexReference to the row in the grid.
TInt & aColIndexReference to the column in the grid.

LogicalPosFromListBoxIndex(TInt, TInt &, TInt &)

IMPORT_C voidLogicalPosFromListBoxIndex(TIntaItemIndex,
TInt &aRowIndex,
TInt &aColIndex
)const

Converts a logical position on the grid, where the co-ordinates are with respect to the top left hand corner of the grid, to a CEikListBox index for the cell with respect to the snaking listbox top down, left to right structure underlying the grid structure.

Parameters

TInt aItemIndexThe index for the cell in the grid.
TInt & aRowIndexReference to the row in the grid.
TInt & aColIndexReference to the column in the grid.

MoveCursorL(TCursorMovement, TSelectionMode)

IMPORT_C voidMoveCursorL(TCursorMovementaCursorMovement,
TSelectionModeaSelectionMode
)[virtual]

Overloaded MoveCursorL method to process cursor movement according to orientation of the grid.

Parameters

TCursorMovement aCursorMovementThe cursor movement to apply etc. ECursorNextItem and ECursorPreviousItem.
TSelectionMode aSelectionModeThe selection mode of the calling list box.

MoveCursorWithRepeatsL(TBool, TSelectionMode, TInt)

voidMoveCursorWithRepeatsL(TBoolaNextOrPrev,
TSelectionModeaSelectionMode,
TIntaAmount
)

Moves cursor with repeats. S60 3.2

Parameters

TBool aNextOrPrev
TSelectionMode aSelectionModeselection mode.
TInt aAmountAmount of steps to move.

MoveToItemIndexL(TInt, TSelectionMode)

IMPORT_C voidMoveToItemIndexL(TIntaItemIndex,
TSelectionModeaSelectionMode
)

This moves to the item and draws the grid in the right place.

Parameters

TInt aItemIndexThe wanted item index.
TSelectionMode aSelectionModeMode for modifying the selection.

NumberOfColsInView()

IMPORT_C TIntNumberOfColsInView()const

This function returns the number of visible columns. The number of visible columns in view.

NumberOfRowsInView()

IMPORT_C TIntNumberOfRowsInView()const

This function returns the number of visible rows. The number of visible rows in view.

Reserved_1()

IMPORT_C TAny *Reserved_1()[private, virtual]

ScrollToMakeItemVisible(TInt)

IMPORT_C TBoolScrollToMakeItemVisible(TIntaItemIndex)[virtual]

Makes the specified item visible by moving the view location and redrawing the control. Index of the item to make visible. ETrue if the control was redrawn, EFalse if no redraw happened (i.e. the item was already visible, or redraw was disabled).

Parameters

TInt aItemIndexIndex of the item to make visible.

SearchByLines(TInt, TInt, TCursorMovement, TBool)

IMPORT_C TIntSearchByLines(TIntaX,
TIntaY,
TCursorMovementaCursorMovement,
TBoolaBeginSearchOnIndex = EFalse
)[private]

Parameters

TInt aX
TInt aY
TCursorMovement aCursorMovement
TBool aBeginSearchOnIndex = EFalse

SetColumnWidth(TInt)

IMPORT_C voidSetColumnWidth(TIntaColumnWidth)

This function sets the width of the grid column. This should only be called via the selection box class's SetColumnWidth method.

Parameters

TInt aColumnWidthThe required width of all columns in the view, in pixels.

SetCurrentDataIndex(TInt)

IMPORT_C voidSetCurrentDataIndex(TIntaDataIndex)

Sets the current data index with a value given with respect to the ordering of the cells in the grid.

Parameters

TInt aDataIndexThe index to be set.

SetGridCellDimensions(TSize)

IMPORT_C voidSetGridCellDimensions(TSizeaGridDimensions)

Checks that number of cells in the grid is always enough to fill the current grid dimensions. This method should be called after any method that may alter the amount of data within the grid.

Parameters

TSize aGridDimensionsGrid diemnsions.

SetGridDetails(SGrid)

IMPORT_C voidSetGridDetails(SGridaGridDetails)

Grid initialisation function.

Parameters

SGrid aGridDetailsStruct of grid details.

SetItemHeight(TInt)

IMPORT_C voidSetItemHeight(TIntaItemHeight)[virtual]

This function sets item height in pixels.

Parameters

TInt aItemHeightNew height in pixels for this view s items.

SetPrimaryScrollingType(TScrollingType)

IMPORT_C voidSetPrimaryScrollingType(TScrollingTypeaScrollingType)

Sets the form of scroll to activate upon reaching the limit when moving in the primary direction of grid, primary meaning whether the items are organised vertically or horizontally.

Parameters

TScrollingType aScrollingTypeThe primary scrolling type.

SetSecondaryScrollingType(TScrollingType)

IMPORT_C voidSetSecondaryScrollingType(TScrollingTypeaSecondaryScrolling)

Sets the form of scroll to activate upon reaching the limit when moving in the secondary direction of grid.

Parameters

TScrollingType aSecondaryScrollingThe secondary scrolling type.

SetSpacesBetweenItems(TSize)

IMPORT_C voidSetSpacesBetweenItems(TSizeaSizeOfSpaceBetweenItems)

Sets the size of the spaces between items.

Parameters

TSize aSizeOfSpaceBetweenItemsThe size of the spaces between items.

SetTopItemIndex(TInt)

IMPORT_C voidSetTopItemIndex(TIntaItemIndex)[virtual]

Sets which item appears at the top left corner of the view. The function changes items displayed in the view appropriately.

Parameters

TInt aItemIndexIndex of the item to set at the top left.

UpdateHScrollOffsetBasedOnTopItemIndex()

IMPORT_C voidUpdateHScrollOffsetBasedOnTopItemIndex()[protected]

This function updates the horizontal scroll offset (iHScrollOffset) based on the top item s index. This function is called internally by CEikSnakingListBoxes when needed.

VisibleWidth(const TRect &)

IMPORT_C TIntVisibleWidth(const TRect &aRect)const [virtual]

Gets the visible width of the specified rectangle in pixels. Visible width of aRect in pixels.

Parameters

const TRect & aRectReference to the rectangle for which to get the visible width.

XYPosToItemIndex(TPoint, TInt &)

IMPORT_C TBoolXYPosToItemIndex(TPointaPosition,
TInt &aItemIndex
)const [virtual]

Converts a pixel position into an item index.

The function returns ETrue and sets aItemIndex to the index of the item whose bounding box contains aPosition. Returns EFalse if no such item exists.

ETrue if there was an item at aPosition.

Parameters

TPoint aPositionA position relative to the origin of the list box control.
TInt & aItemIndexIs set to the item at that position.

Member Enumerations Documentation

Enum TGridFlags

Enumeration flags for grid.

Enumerators

EPrimaryIsVertical = 0x0001

Vertical is primary direction.

ETopToBottom = 0x0002

From top to bottom.

ELeftToRight = 0x0004

From left to right.

Enum TPageIndex

Enumeration flags for pages.

Enumerators

EPreviousPage

Previous page.

ENextPage

Next page.

EHome

First page.

EEnd

Last page.

Enum TPositionCurrentIndex

Enumerators

EPage

Page.

EColumn

Column.

EOppositeCorner

Opposite corner.

Enum TScrollingType

Enumeration for different scrolling types.

Enumerators

EScrollFollowsItemsAndStops

Scrolling follows items and stops.

EScrollFollowsItemsAndLoops

Scrolling follows items and loops.

EScrollFollowsGrid

Scrolling follows grid.

EScrollStops

Scrolling stops.

EScrollIncrementLineAndStops

Scrolls one line and stops.

EScrollIncrementLineAndLoops

Scrolls one line and loops.

Member Data Documentation

SGrid iGridDetails

SGrid iGridDetails[private]

TScrollingType iScrollInSecondaryDimension

TScrollingType iScrollInSecondaryDimension[private]

TScrollingType iScrollingType

TScrollingType iScrollingType[private]

TInt iSpare

TInt iSpare[private]