CSnakingListBoxView Class Reference

class CSnakingListBoxView : public CListBoxView

Inherits from

Public Member Functions
CSnakingListBoxView()
~CSnakingListBoxView()
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 voidDraw(const TRect *)
IMPORT_C voidHScroll(TInt)
IMPORT_C TPointItemPos(TInt)
IMPORT_C TSizeItemSize(TInt)
IMPORT_C voidMoveCursorL(TCursorMovement, TSelectionMode)
IMPORT_C TIntNumberOfItemsPerColumn()
IMPORT_C TIntNumberOfItemsThatFitInRect(const TRect &)
IMPORT_C TBoolScrollToMakeItemVisible(TInt)
IMPORT_C voidSetColumnWidth(TInt)
IMPORT_C voidSetItemHeight(TInt)
IMPORT_C voidSetTopItemIndex(TInt)
IMPORT_C TIntVisibleWidth(const TRect &)
IMPORT_C TBoolXYPosToItemIndex(TPoint, TInt &)
Protected Member Functions
IMPORT_C voidClearUnusedItemSpace(TInt, TInt)
IMPORT_C voidDrawColumnRange(TInt, TInt)
IMPORT_C voidDrawItemRange(TInt, TInt)
IMPORT_C voidMoveToNextColumnL(TSelectionMode)
IMPORT_C voidMoveToPreviousColumnL(TSelectionMode)
IMPORT_C voidUpdateHScrollOffsetBasedOnTopItemIndex()
Private Member Functions
IMPORT_C TAny *Reserved_1()
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::ClearSelection(TBool)
CListBoxView::ClearSelectionAnchorAndActiveIndex()
CListBoxView::ConstructL(MListBoxModel *,CListItemDrawer *,CWsScreenDevice *,RWindowGroup *,RWindow *,const TRect &,TInt)
CListBoxView::CurrentItemIndex()const
CListBoxView::DataWidth()const
CListBoxView::DeselectItem(TInt)
CListBoxView::DeselectRangeL(TInt,TInt)
CListBoxView::DisableVerticalLineDrawing(TBool)
CListBoxView::DrawEmptyList(const TRect &)const
CListBoxView::DrawItem(TInt)const
CListBoxView::DrawMatcherCursor()
CListBoxView::EmptyListText()const
CListBoxView::Flags()const
CListBoxView::GetSelectionIndexesL(CSelectionIndexArray *)const
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::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()
Inherited Enumerations
CListBoxView:TCursorMovement
CListBoxView:TFlags
CListBoxView:TSelectionMode
Protected Attributes
TInt iColumnWidth
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::iSpare
CListBoxView::iTopItemIndex
CListBoxView::iVerticalOffset
CListBoxView::iViewRect
CListBoxView::iWin

Constructor & Destructor Documentation

CSnakingListBoxView()

IMPORT_CCSnakingListBoxView()

~CSnakingListBoxView()

IMPORT_C~CSnakingListBoxView()

Member Functions Documentation

CalcBottomItemIndex()

IMPORT_C voidCalcBottomItemIndex()[virtual]

Recalculates the index of the bottom item in the list by using the top item index and the size of the display.

This function is called by the owning list box control when either the size of the list box or the number of items in its model changes.

CalcDataWidth()

IMPORT_C voidCalcDataWidth()[virtual]

Recalculates the data width of this list box view from the item width of its list item drawer. This method is called directly by CEikListBox when the list box s size changes or when data is added.

CalcItemIndexFromRowAndColIndexes(TInt &, TInt, TInt)

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

Parameters

TInt & aItemIndex
TInt aRowIndex
TInt aColIndex

CalcNewTopItemIndexSoItemIsVisible(TInt)

IMPORT_C TIntCalcNewTopItemIndexSoItemIsVisible(TIntaItemIndex)const [virtual]

Calculates which item should be selected in order to make a particular item visible. Calling VScrollTo(CalcNewTopItemIndexSoItemIsVisible(idx)), for example, would make the item whose index is idx visible.

Parameters

TInt aItemIndexThe index of the new top item.

CalcRowAndColIndexesFromItemIndex(TInt, TInt &, TInt &)

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

Parameters

TInt aItemIndex
TInt & aRowIndex
TInt & aColIndex

CalculateHScrollOffsetSoItemIsVisible(TInt)

IMPORT_C TIntCalculateHScrollOffsetSoItemIsVisible(TIntaItemIndex)[virtual]

Parameters

TInt aItemIndex

ClearUnusedItemSpace(TInt, TInt)

IMPORT_C voidClearUnusedItemSpace(TIntaStartItemIndex,
TIntaEndItemIndex
)const [protected]

Parameters

TInt aStartItemIndex
TInt aEndItemIndex

ColumnWidth()

TInt ColumnWidth()const [inline]

Draw(const TRect *)

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

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().

panic
EEikPanicListBoxNoModel Panics if the list box model for this class has not been defined.

Parameters

const TRect * aClipRect = NULLThe rectangle to draw into, this is ignored. Default value is NULL.

DrawColumnRange(TInt, TInt)

IMPORT_C voidDrawColumnRange(TIntaStartColIndex,
TIntaEndColIndex
)const [protected]

Parameters

TInt aStartColIndex
TInt aEndColIndex

DrawItemRange(TInt, TInt)

IMPORT_C voidDrawItemRange(TIntaStartItemIndex,
TIntaEndItemIndex
)const [protected, virtual]

Parameters

TInt aStartItemIndex
TInt aEndItemIndex

HScroll(TInt)

IMPORT_C voidHScroll(TIntaHScrollAmount)[virtual]

Scrolls horizontally by the specified number of pixels.

Parameters

TInt aHScrollAmountThe distance to scroll by in pixels. A negative value scrolls to the left, a positive value scrolls to the right.

ItemPos(TInt)

IMPORT_C TPointItemPos(TIntaItemIndex)const [virtual]

Gets the on-screen position of an item.

Parameters

TInt aItemIndexIndex of an item.

ItemSize(TInt)

IMPORT_C TSizeItemSize(TIntaItemIndex = 0)const [virtual]

Gets the on-screen size of an item.

As implemented in CListBoxView, all items report the same size. The size returned may be larger than the width of the list box view, but will not be smaller.

Parameters

TInt aItemIndex = 0Index of an item. Default value is 0.

MoveCursorL(TCursorMovement, TSelectionMode)

IMPORT_C voidMoveCursorL(TCursorMovementaCursorMovement,
TSelectionModeaSelectionMode
)[virtual]

Moves the current item cursor in the specified direction. This function is called by CEikListBox in response to user input.

Parameters

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

MoveToNextColumnL(TSelectionMode)

IMPORT_C voidMoveToNextColumnL(TSelectionModeaSelectionMode)[protected]

Parameters

TSelectionMode aSelectionMode

MoveToPreviousColumnL(TSelectionMode)

IMPORT_C voidMoveToPreviousColumnL(TSelectionModeaSelectionMode)[protected]

Parameters

TSelectionMode aSelectionMode

NumberOfItemsPerColumn()

IMPORT_C TIntNumberOfItemsPerColumn()const [virtual]

NumberOfItemsThatFitInRect(const TRect &)

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

Gets the number of items that will fit into a given rectangle.

Parameters

const TRect & aRectThe rectangle.

Reserved_1()

IMPORT_C TAny *Reserved_1()[private, virtual]

ScrollToMakeItemVisible(TInt)

IMPORT_C TBoolScrollToMakeItemVisible(TIntaItemIndex)[virtual]

Scrolls vertically to make a particular item visible.

Parameters

TInt aItemIndexThe item to make visible.

SetColumnWidth(TInt)

IMPORT_C voidSetColumnWidth(TIntaColumnWidth)

Parameters

TInt aColumnWidth

SetItemHeight(TInt)

IMPORT_C voidSetItemHeight(TIntaItemHeight)[virtual]

Sets the item height.

Parameters

TInt aItemHeightNew item height.

SetTopItemIndex(TInt)

IMPORT_C voidSetTopItemIndex(TIntaItemIndex)[virtual]

Sets the item at the top of the view by its index in the list of all items. This function also invokes CalcBottomItemIndex().

panic
EEikPanicListBoxInvalidTopItemIndexSpecified Panics if the given index is not valid.

Parameters

TInt aItemIndexIndex of the item to start the view at.

UpdateHScrollOffsetBasedOnTopItemIndex()

IMPORT_C voidUpdateHScrollOffsetBasedOnTopItemIndex()[protected]

VisibleWidth(const TRect &)

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

Gets the visible width of the specified rectangle in pixels. This function is called by CListBoxView itself on its own viewing rectangle.

Parameters

const TRect & aRectThe rectangle to get the visible width for.

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.

Parameters

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

Member Data Documentation

TInt iColumnWidth

TInt iColumnWidth[protected]