CSnakingListBoxView Class Reference

#include <mw/eiklbv.h>

Link against: mpxalbumarteditordialog.lib

class CSnakingListBoxView : public CListBoxView

Inherits from

Protected Attributes
TInt iColumnWidth
Public Member Functions
CSnakingListBoxView()
~CSnakingListBoxView()
virtual IMPORT_C voidCalcBottomItemIndex()
virtual IMPORT_C voidCalcDataWidth()
IMPORT_C voidCalcItemIndexFromRowAndColIndexes(TInt &, TInt, TInt)
virtual IMPORT_C TIntCalcNewTopItemIndexSoItemIsVisible(TInt)
IMPORT_C voidCalcRowAndColIndexesFromItemIndex(TInt, TInt &, TInt &)
virtual IMPORT_C TIntCalculateHScrollOffsetSoItemIsVisible(TInt)
TInt ColumnWidth()
virtual IMPORT_C voidDraw(const TRect *)
virtual IMPORT_C voidHScroll(TInt)
virtual IMPORT_C TPointItemPos(TInt)
virtual IMPORT_C TSizeItemSize(TInt)
virtual IMPORT_C voidMoveCursorL(TCursorMovement, TSelectionMode)
virtual IMPORT_C TIntNumberOfItemsPerColumn()
virtual IMPORT_C TIntNumberOfItemsThatFitInRect(const TRect &)
virtual IMPORT_C TBoolScrollToMakeItemVisible(TInt)
IMPORT_C voidSetColumnWidth(TInt)
virtual IMPORT_C voidSetItemHeight(TInt)
virtual IMPORT_C voidSetTopItemIndex(TInt)
virtual IMPORT_C TIntVisibleWidth(const TRect &)
virtual IMPORT_C TBoolXYPosToItemIndex(TPoint, TInt &)
Protected Member Functions
IMPORT_C voidClearUnusedItemSpace(TInt, TInt)
IMPORT_C voidDrawColumnRange(TInt, TInt)
virtual IMPORT_C voidDrawItemRange(TInt, TInt)
IMPORT_C voidMoveToNextColumnL(TSelectionMode)
IMPORT_C voidMoveToPreviousColumnL(TSelectionMode)
IMPORT_C voidUpdateHScrollOffsetBasedOnTopItemIndex()
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
Inherited Enumerations
CListBoxView:TCursorMovement
CListBoxView:TFlags
CListBoxView:TSelectionMode
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::CEikListBox
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 Type Definitions
CListBoxView::CSelectionIndexArray

Member Attribute Documentation

iColumnWidth

TInt iColumnWidth[protected]

Constructor & Destructor Documentation

CSnakingListBoxView ( )

IMPORT_CCSnakingListBoxView()

~CSnakingListBoxView ( )

IMPORT_C~CSnakingListBoxView()

Member Function 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

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.

ParameterDescription
aItemIndexThe index of the new top item.

Returns: The item to be selected.

CalcRowAndColIndexesFromItemIndex ( TInt, TInt &, TInt & )

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

CalculateHScrollOffsetSoItemIsVisible ( TInt )

IMPORT_C TIntCalculateHScrollOffsetSoItemIsVisible(TIntaItemIndex)[virtual]

ClearUnusedItemSpace ( TInt, TInt )

IMPORT_C voidClearUnusedItemSpace(TIntaStartItemIndex,
TIntaEndItemIndex
)const [protected]

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.
ParameterDescription
aClipRectThe rectangle to draw into, this is ignored. Default value is NULL.

DrawColumnRange ( TInt, TInt )

IMPORT_C voidDrawColumnRange(TIntaStartColIndex,
TIntaEndColIndex
)const [protected]

DrawItemRange ( TInt, TInt )

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

HScroll ( TInt )

IMPORT_C voidHScroll(TIntaHScrollAmount)[virtual]

Reimplemented from CListBoxView::HScroll(TInt)

Scrolls horizontally by the specified number of pixels.

ParameterDescription
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.

ParameterDescription
aItemIndexIndex of an item.

Returns: Position of the 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.

ParameterDescription
aItemIndexIndex of an item. Default value is 0.

Returns: Size of the item.

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.

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

MoveToNextColumnL ( TSelectionMode )

IMPORT_C voidMoveToNextColumnL(TSelectionModeaSelectionMode)[protected]

MoveToPreviousColumnL ( TSelectionMode )

IMPORT_C voidMoveToPreviousColumnL(TSelectionModeaSelectionMode)[protected]

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.

ParameterDescription
aRectThe rectangle.

Returns: The number of items that will fit into the given rectangle.

ScrollToMakeItemVisible ( TInt )

IMPORT_C TBoolScrollToMakeItemVisible(TIntaItemIndex)[virtual]

Scrolls vertically to make a particular item visible.

ParameterDescription
aItemIndexThe item to make visible.

Returns: ETrue if any scrolling was done, EFalse if no scrolling was necessary.

SetColumnWidth ( TInt )

IMPORT_C voidSetColumnWidth(TIntaColumnWidth)

SetItemHeight ( TInt )

IMPORT_C voidSetItemHeight(TIntaItemHeight)[virtual]

Sets the item height.

ParameterDescription
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.
ParameterDescription
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.

ParameterDescription
aRectThe rectangle to get the visible width for.

Returns: Visible width of aRect.

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.

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

Returns: ETrue if there was an item at aPosition.