CListBoxView Class Reference

#include <mw/eiklbv.h>

Link against: glxcommoncommandhandlers.lib

class CListBoxView : public CBase

Inherits from

  • CListBoxView
    Public Member Type Definitions
    typedef CArrayFix< TInt > CSelectionIndexArray
    Protected Attributes
    TInt iBottomItemIndex
    TInt iCurrentItemIndex
    TInt iDataWidth
    TBool iDisableVerticalLineDrawing
    CListBoxViewExtension *iExtension
    TInt iFlags
    CWindowGc *iGc
    RWindowGroup *iGroupWin
    TInt iHScrollOffset
    CListItemDrawer *iItemDrawer
    TInt iItemHeight
    HBufC *iListEmptyText
    MListBoxModel *iModel
    TInt iSpare
    TInt iTopItemIndex
    TInt iVerticalOffset
    TRect iViewRect
    RWindow *iWin
    Public Member Enumerations
    enumTCursorMovement { ECursorNextItem, ECursorPreviousItem, ECursorNextColumn, ECursorPreviousColumn, ..., ECursorPrevScreen }
    enumTFlags { EAnchorExists, EEmphasized, EDimmed, EHasMatcherCursor, ..., EOffsetChanged }
    enumTSelectionMode { ENoSelection, ESingleSelection, EContiguousSelection, EDisjointSelection, ..., EChangeMarkMode }
    Public Member Functions
    CListBoxView()
    ~CListBoxView()
    IMPORT_C TRgbBackColor()
    IMPORT_C TIntBottomItemIndex()
    virtual IMPORT_C voidCalcBottomItemIndex()
    virtual IMPORT_C voidCalcDataWidth()
    virtual IMPORT_C TIntCalcNewTopItemIndexSoItemIsVisible(TInt)
    IMPORT_C voidClearSelection()
    voidClearSelection(TBool)
    IMPORT_C voidClearSelectionAnchorAndActiveIndex()
    virtual IMPORT_C voidConstructL(MListBoxModel *, CListItemDrawer *, CWsScreenDevice *, RWindowGroup *, RWindow *, const TRect &, TInt)
    virtual IMPORT_C TIntCurrentItemIndex()
    IMPORT_C TIntDataWidth()
    IMPORT_C voidDeselectItem(TInt)
    IMPORT_C voidDeselectRangeL(TInt, TInt)
    voidDisableVerticalLineDrawing(TBool)
    virtual IMPORT_C voidDraw(const TRect *)
    virtual IMPORT_C voidDrawEmptyList(const TRect &)
    virtual IMPORT_C voidDrawItem(TInt)
    virtual IMPORT_C voidDrawMatcherCursor()
    const TDesC *EmptyListText()
    IMPORT_C voidGetSelectionIndexesL(CSelectionIndexArray *)
    virtual IMPORT_C voidHScroll(TInt)
    IMPORT_C TIntHScrollOffset()
    IMPORT_C voidHideMatcherCursor()
    IMPORT_C TBoolIsVisible()
    CListItemDrawer *ItemDrawer()
    TInt ItemHeight()
    IMPORT_C TBoolItemIsPartiallyVisible(TInt)
    IMPORT_C TBoolItemIsSelected(TInt)
    IMPORT_C TBoolItemIsVisible(TInt)
    IMPORT_C TIntItemOffsetInPixels()
    virtual IMPORT_C TPointItemPos(TInt)
    virtual IMPORT_C TSizeItemSize(TInt)
    IMPORT_C TIntMatcherCursorPos()
    virtual IMPORT_C voidMoveCursorL(TCursorMovement, TSelectionMode)
    virtual IMPORT_C TIntNumberOfItemsThatFitInRect(const TRect &)
    IMPORT_C TBoolRedrawDisabled()
    virtual IMPORT_C TBoolScrollToMakeItemVisible(TInt)
    IMPORT_C voidSelectItemL(TInt)
    IMPORT_C const CSelectionIndexArray *SelectionIndexes()
    IMPORT_C voidSetAnchor(TInt)
    IMPORT_C voidSetBackColor(TRgb)
    IMPORT_C voidSetCurrentItemIndex(TInt)
    IMPORT_C voidSetDimmed(TBool)
    IMPORT_C voidSetDisableRedraw(TBool)
    IMPORT_C voidSetEmphasized(TBool)
    IMPORT_C voidSetHScrollOffset(TInt)
    virtual IMPORT_C voidSetItemHeight(TInt)
    IMPORT_C voidSetItemOffsetInPixels(TInt)
    IMPORT_C voidSetListEmptyTextL(const TDesC &)
    IMPORT_C voidSetMatcherCursor(TBool)
    IMPORT_C voidSetMatcherCursorColor(TRgb)
    IMPORT_C voidSetMatcherCursorPos(TInt)
    IMPORT_C voidSetPaintedSelection(TBool)
    voidSetScrolling(TBool)
    IMPORT_C voidSetSelectionIndexesL(const CSelectionIndexArray *)
    IMPORT_C voidSetTextColor(TRgb)
    virtual IMPORT_C voidSetTopItemIndex(TInt)
    IMPORT_C voidSetViewRect(const TRect &)
    voidSetVisibilityObserver(MListVisibilityObserver *)
    IMPORT_C TRgbTextColor()
    IMPORT_C voidToggleItemL(TInt)
    IMPORT_C TIntTopItemIndex()
    virtual IMPORT_C voidUpdateSelectionL(TSelectionMode)
    virtual IMPORT_C voidVScrollTo(TInt)
    virtual IMPORT_C voidVScrollTo(TInt, TRect &)
    virtual IMPORT_C voidVerticalMoveToItemL(TInt, TSelectionMode)
    IMPORT_C TRectViewRect()
    virtual IMPORT_C TIntVisibleWidth(const TRect &)
    virtual IMPORT_C TBoolXYPosToItemIndex(TPoint, TInt &)
    Protected Member Functions
    voidClearFlags(TInt)
    TInt Flags()
    IMPORT_C voidSelectRangeL(TInt, TInt)
    voidSetFlags(TInt)
    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()

    Detailed Description

    List box view.

    A list box view displays the list items which are currently visible in a list box. List box views draw each of the items for display using methods defined in their associated list box drawer.

    Together with its list item drawer, a CListBoxView encapsulates the on-screen appearance of data in a list box.

    List box views also encapsulate item selection, the current item, and the fundamentals of how the selection and the current item are updated according to user input. Input events themselves are handled by CEikListBox, which calls member functions of CListBoxView appropriately.

    This class is sufficient for plain list box views, and may be derived from in order to provide more complex list views. TechView supplies and uses the classes CHierarchicalListBoxView and CSnakingListBoxView, which provide two kinds of indented list views.

    Member Type Definition Documentation

    Typedef CSelectionIndexArray

    typedef CArrayFix< TInt >CSelectionIndexArray

    The items which are selected within a list box list.

    Member Attribute Documentation

    iBottomItemIndex

    TInt iBottomItemIndex[protected]

    Index of the item at the bottom of the view. This is not necessarily the item at the end of the list.

    iCurrentItemIndex

    TInt iCurrentItemIndex[protected]

    Index of the current item.

    iDataWidth

    TInt iDataWidth[protected]

    Width (in pixels) of the longest item in the model.

    iDisableVerticalLineDrawing

    TBool iDisableVerticalLineDrawing[protected]

    Indicates whether vertical line drawing is disabled.

    iExtension

    CListBoxViewExtension *iExtension[protected]

    iFlags

    TInt iFlags[protected]

    The flags for this list box. These flags are defined by the nested enum TFlags (below).

    iGc

    CWindowGc *iGc[protected]

    Graphics context for the control.

    iGroupWin

    RWindowGroup *iGroupWin[protected]

    The window group of this view.

    iHScrollOffset

    TInt iHScrollOffset[protected]

    Pixel offset of the visible portion of the data from the left margin.

    iItemDrawer

    CListItemDrawer *iItemDrawer[protected]

    This view s item drawer. Not owned.

    iItemHeight

    TInt iItemHeight[protected]

    Height of each item in the list in pixels.

    iListEmptyText

    HBufC *iListEmptyText[protected]

    The empty list text.

    iModel

    MListBoxModel *iModel[protected]

    This view s model. Not owned.

    iSpare

    TInt iSpare[protected]

    iTopItemIndex

    TInt iTopItemIndex[protected]

    Index of the item at the top of the view. This is not necessarily the item at the start of the list.

    iVerticalOffset

    TInt iVerticalOffset[protected]

    Current vertical offset of the view in pixels.

    iViewRect

    TRect iViewRect[protected]

    Graphics context for the control.

    iWin

    RWindow *iWin[protected]

    This list box view s window.

    Member Enumeration Documentation

    Enum TCursorMovement

    Cursor movement flags. These describe the cursor movements recognised by MoveCursorL().

    EnumeratorValueDescription
    ECursorNextItem

    Cursors movement to next item.

    ECursorPreviousItem

    Cursors movement to previous item.

    ECursorNextColumn

    Cursors movement to next column.

    ECursorPreviousColumn

    Cursors movement to previous column.

    ECursorPreviousPage

    Cursors movement to previous page.

    ECursorNextPage

    Cursors movement to next page.

    ECursorFirstItem

    Cursors movement to the first item.

    ECursorLastItem

    Cursors movement to the last item.

    ECursorNextScreen

    Cursors movement to the next screen.

    ECursorPrevScreen

    Cursors movement to the previous screen.

    Enum TFlags

    List box view flags.

    These flags may be combined with a logical OR to get a combination of effects.

    EnumeratorValueDescription
    EAnchorExists0x0001

    A selection anchor exists.

    EEmphasized0x0002

    The view is emphasised.

    EDimmed0x0004

    The view is dimmed.

    EHasMatcherCursor0x0008

    List box view has a cursor for incremental matching.

    EDisableRedraw0x0010

    Redraw is disabled.

    EPaintedSelection0x0020

    If set, selected items are painted.

    EMarkSelection0x0040

    Item marking enabled.

    EUnmarkSelection0x0080

    Item unmarking enabled.

    EItemCountModified0x0100

    Item count changes enabled.

    EOffsetChanged0x0200

    Vertical offset has changed.

    Enum TSelectionMode

    Modes for modifying the selection.

    Changing the current item of a list box view may also affect which items are selected. The selection mode of such an action describes how (or if) the selection is altered by the action.

    Each function of CListBoxView which affects the current item is passed an appropriate selection mode by the calling input handler method of CEikListBox. The mode is varied according to the keyboard modifiers held down by the user, or whether a pointer action was a tap or a sweep.

    Note that the behaviour of list box views may vary with the target phone due to the wide range of possible input devices. The following description assumes a phone with a pointer and a keyboard.

    EnumeratorValueDescription
    ENoSelection

    The selection is not changed by actions while this is in effect, holding CTRL while pressing cursor up or down for example.

    ESingleSelection

    Only a single item in the list is allowed to be selected by an action; when selecting individual items with the pointer, or moving using the cursor keys without any modifiers for example.

    EContiguousSelection

    A single continuous run of items can be added to the selection array by an action, when keyboard-selecting with the shift key held down, or when sweeping a selection with the pointer for example.

    EDisjointSelection

    Any single item in the list may be added to the selection by an action, when selecting or drag-selecting with the pointer when the CTRL key is held down for example.

    EDisjointMarkSelection

    Any single item in the list may be removed from the selection by an action, when unselecting for example.

    EPenMultiselection

    Multiple items can be added to the selection array by an action, when selecting with the edit key for example.

    EChangeMarkMode

    Mark mode is changed to EUnmarkSelection if item is marked or EMarkSelection if item is not marked by an action, when selecting or unselecting item for example.

    Constructor & Destructor Documentation

    CListBoxView ( )

    IMPORT_CCListBoxView()

    C++ default constructor.

    Allocates an area of memory for a CListBoxView, and begins its initialisation.

    ~CListBoxView ( )

    IMPORT_C~CListBoxView()

    Destructor.

    Member Function Documentation

    BackColor ( )

    IMPORT_C TRgbBackColor()const

    Gets the background colour for this view.

    Returns: The background colour.

    BottomItemIndex ( )

    IMPORT_C TIntBottomItemIndex()const

    Gets the index of the item at the bottom of this view.

    Returns: Index of the item at the bottom of this view.

    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.

    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.

    ClearFlags ( TInt )

    voidClearFlags(TIntaMask)[protected, inline]

    Clears this view s flags according to a bitmask.

    These flags are defined by the nested enum TFlags (below).

    ParameterDescription
    aMaskFlags to be removed.

    ClearSelection ( )

    IMPORT_C voidClearSelection()

    Resets the selection state so that there is nothing selected.

    panic
    EEikPanicListBoxNoSelIndexArray Panics if selection indexes have not been defined for this class.

    ClearSelection ( TBool )

    voidClearSelection(TBoolaDrawItems)

    Resets the selection state so that there is nothing selected.

    panic
    EEikPanicListBoxNoSelIndexArray Panics if selection indexes have not been defined for this class.
    ParameterDescription
    aDrawItemsWhether or not to draw the items which are deselected.

    ClearSelectionAnchorAndActiveIndex ( )

    IMPORT_C voidClearSelectionAnchorAndActiveIndex()

    Resets the anchor index, the active end and the EAnchorExists flag.

    ConstructL ( MListBoxModel *, CListItemDrawer *, CWsScreenDevice *, RWindowGroup *, RWindow *, const TRect &, TInt )

    IMPORT_C voidConstructL(MListBoxModel *aListBoxModel,
    CListItemDrawer *aItemDrawer,
    CWsScreenDevice *aScreen,
    RWindowGroup *aGroupWin,
    RWindow *aWsWindow,
    const TRect &aDisplayArea,
    TIntaItemHeight
    )[virtual]

    By default Symbian 2nd phase constructor is private.

    This function completes the initialisation of a default-constructed list box view. The item drawer s graphics context is created on aScreen, and the list item drawer s graphics context is set to this. See CListItemDrawer::SetGc().

    ParameterDescription
    aListBoxModelThe list box model to use.
    aItemDrawerA default-constructed item drawer.
    aScreenScreen on which to display.
    aGroupWinThis list box view s window group.
    aWsWindowWindow for this view.
    aDisplayAreaThe viewing rectangle this list box view is to use.
    aItemHeightHeight of a single list item.

    CurrentItemIndex ( )

    IMPORT_C TIntCurrentItemIndex()const [virtual]

    Gets the current item s index.

    Returns: Index number of the current item.

    DataWidth ( )

    IMPORT_C TIntDataWidth()const

    Gets the width of the widest item in the list in pixels.

    Returns: Data width in pixels.

    DeselectItem ( TInt )

    IMPORT_C voidDeselectItem(TIntaItemIndex)

    Deselects an item by index.

    panic
    EEikPanicListBoxNoSelIndexArray Panics if selection indexes have not been defined for this class.
    ParameterDescription
    aItemIndexItem to deselect.

    DeselectRangeL ( TInt, TInt )

    IMPORT_C voidDeselectRangeL(TIntaItemIndex1,
    TIntaItemIndex2
    )

    Deselects range between given indexes.

    Deprecated

    ParameterDescription
    aItemIndex1First index of selectable range.
    aItemIndex2Second index of selectable range.

    DisableVerticalLineDrawing ( TBool )

    voidDisableVerticalLineDrawing(TBoolaDisable)

    Disables vertical line drawing.

    ParameterDescription
    aDisableETrue if disabled.

    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.

    DrawEmptyList ( const TRect & )

    IMPORT_C voidDrawEmptyList(const TRect &aClientRect)const [virtual]

    Not implemented.

    ParameterDescription
    aClientRectNot used.

    DrawItem ( TInt )

    IMPORT_C voidDrawItem(TIntaItemIndex)const [virtual]

    Draws the specified item via CListBoxDrawer::DrawItem() if it is visible.

    ParameterDescription
    aItemIndexIndex number of the item to draw.

    DrawMatcherCursor ( )

    IMPORT_C voidDrawMatcherCursor()[virtual]

    Draws the match cursor in its current screen position if the matcher cursor flag has been set.

    This is deprecated and broken and should not be used.

    Deprecated

    EmptyListText ( )

    const TDesC *EmptyListText()const [inline]

    Gets an empty list box text.

    Return text currently in the empty list text

    Returns: Pointer the empty list box text.

    Flags ( )

    TInt Flags()const [protected, inline]

    Gets this view s flags.

    These flags are defined by the nested enum TFlags (below).

    Returns: List box's flags.

    GetSelectionIndexesL ( CSelectionIndexArray * )

    IMPORT_C voidGetSelectionIndexesL(CSelectionIndexArray *aSelectionArray)const

    Gets a copy of the array of currently selected items.

    panic
    EEikPanicListBoxInvalidSelIndexArraySpecified Panics if the given selection index array is not valid.
    panic
    EEikPanicListBoxNoSelIndexArray Panics if selection indexes have not been defined for this class.
    ParameterDescription
    aSelectionArrayAn instantiated CSelectionIndexArray. On return, contains a copy of selection indexes.

    HScroll ( TInt )

    IMPORT_C voidHScroll(TIntaHScrollAmount)[virtual]

    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.

    HScrollOffset ( )

    IMPORT_C TIntHScrollOffset()const

    Gets the offset of the visible portion of the data from the left margin in pixels.

    Returns: The horizontal scroll offset in pixels.

    HideMatcherCursor ( )

    IMPORT_C voidHideMatcherCursor()

    Hides the matcher cursor.

    Deprecated

    IsVisible ( )

    IMPORT_C TBoolIsVisible()const

    Tests if this view is visible.

    Returns: ETrue if this view is visible. EFalse if this view is not visible or does not exist.

    ItemDrawer ( )

    CListItemDrawer *ItemDrawer()const [inline]

    Gets the object used by this list box view to draw its items.

    Returns: Pointer to the list box item drawer.

    ItemHeight ( )

    TInt ItemHeight()const [inline]

    Returns item's height. All items have the same height.

    ItemIsPartiallyVisible ( TInt )

    IMPORT_C TBoolItemIsPartiallyVisible(TIntaItemIndex)const

    Tests whether an item is partially visible. Note that this returns EFalse also when item is fully visible, i.e. the whole item area is inside the list view rectangle.

    ParameterDescription
    aItemIndexIndex of item to be tested.

    Returns: ETrue if the item is partially visible, EFalse if it's not visible or fully visible.

    ItemIsSelected ( TInt )

    IMPORT_C TBoolItemIsSelected(TIntaItemIndex)const

    Tests whether an item is selected.

    ParameterDescription
    aItemIndexIndex of item to test.

    Returns: ETrue if the item is selected.

    ItemIsVisible ( TInt )

    IMPORT_C TBoolItemIsVisible(TIntaItemIndex)const

    Tests whether an item is visible.

    ParameterDescription
    aItemIndexIndex of item to be tested.

    Returns: ETrue if the item is visible.

    ItemOffsetInPixels ( )

    IMPORT_C TIntItemOffsetInPixels()const

    Gets view offset.

    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.

    MatcherCursorPos ( )

    IMPORT_C TIntMatcherCursorPos()const

    Gets the match cursor s position.

    Deprecated

    Returns: Character position of the match cursor within the current item s string.

    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.

    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.

    RedrawDisabled ( )

    IMPORT_C TBoolRedrawDisabled()const

    Tests whether redraw is disabled.

    Returns: ETrue if redraw is disabled.

    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.

    SelectItemL ( TInt )

    IMPORT_C voidSelectItemL(TIntaItemIndex)

    Selects an item by index.

    This function leaves if memory could not be allocated for an extra item in the array of selected items.

    panic
    EEikPanicListBoxNoSelIndexArray Panics if selection indexes have not been defined for this class.
    ParameterDescription
    aItemIndexItem to select.

    SelectRangeL ( TInt, TInt )

    IMPORT_C voidSelectRangeL(TIntaItemIndex1,
    TIntaItemIndex2
    )[protected]

    Selects items between given indexes.

    Deprecated

    ParameterDescription
    aItemIndex1First index of selectable range.
    aItemIndex2Second index of selectable range.

    SelectionIndexes ( )

    IMPORT_C const CSelectionIndexArray *SelectionIndexes()const

    Gets a pointer to the selection list of this view.

    Returns: Pointer to an array describing the items in the list which are currently selected. The object pointed at is owned by the CListBoxView.

    SetAnchor ( TInt )

    IMPORT_C voidSetAnchor(TIntaItemIndex)

    Sets the anchor to the specified item.

    ParameterDescription
    aItemIndexThe index of the item at which the anchor is set.

    SetBackColor ( TRgb )

    IMPORT_C voidSetBackColor(TRgbaColor)

    Sets the background colour.

    ParameterDescription
    aColorThe background colour.

    SetCurrentItemIndex ( TInt )

    IMPORT_C voidSetCurrentItemIndex(TIntaItemIndex)

    Set the index of the current item. This function changes the current item, but does not redraw the list view or update the selection.

    panic
    EEikPanicListBoxInvalidCurrentItemIndexSpecified Panics if the given index is not valid.
    ParameterDescription
    aItemIndexWhich item to make current.

    SetDimmed ( TBool )

    IMPORT_C voidSetDimmed(TBoolaDimmed)

    Sets whether items will be drawn dimmed.

    The function sets or resets the dim flag.

    ParameterDescription
    aDimmedIf ETrue, this view will draw items dimmed. If EFalse this view will not draw items dimmed.

    SetDisableRedraw ( TBool )

    IMPORT_C voidSetDisableRedraw(TBoolaDisableRedraw)

    Disables or enables redraws.

    If this flag is set to ETrue, all member functions which draw items will return immediately without drawing anything. Functions which update the internal state of the list box will still work, but nothing will be drawn or updated on the screen.

    ParameterDescription
    aDisableRedrawDisables redraw if ETrue.

    SetEmphasized ( TBool )

    IMPORT_C voidSetEmphasized(TBoolaEmphasized)

    Sets whether or not items are drawn as emphasised.

    The function sets or resets the emphasised flag.

    ParameterDescription
    aEmphasizedIf ETrue, this view will draw items emphasised. If EFalse will not draw items emphasised.

    SetFlags ( TInt )

    voidSetFlags(TIntaMask)[protected, inline]

    Sets this view s flags according to a bitmask.

    These flags are defined by the nested enum TFlags (below).

    ParameterDescription
    aMaskSets new flags for the list box.

    SetHScrollOffset ( TInt )

    IMPORT_C voidSetHScrollOffset(TIntaHorizontalOffset)

    Sets the horizontal scroll offset in pixels.

    ParameterDescription
    aHorizontalOffsetNew value for the horizontal scroll offset, in pixels.

    SetItemHeight ( TInt )

    IMPORT_C voidSetItemHeight(TIntaItemHeight)[virtual]

    Sets the item height.

    ParameterDescription
    aItemHeightNew item height.

    SetItemOffsetInPixels ( TInt )

    IMPORT_C voidSetItemOffsetInPixels(TIntaOffset)

    Sets the offset for view.

    SetListEmptyTextL ( const TDesC & )

    IMPORT_C voidSetListEmptyTextL(const TDesC &aText)

    Sets list box backroung text. This text is visible if the list box has no items.

    ParameterDescription
    aTextThe text for the empty list box background.

    SetMatcherCursor ( TBool )

    IMPORT_C voidSetMatcherCursor(TBoolaMatcherCursor)

    Sets whether the matcher cursor flag to specify whether the match cursor is drawn.

    Deprecated

    ParameterDescription
    aMatcherCursorIf ETrue, the view will draw match cursor.

    SetMatcherCursorColor ( TRgb )

    IMPORT_C voidSetMatcherCursorColor(TRgbaColor)

    Sets the match cursor s colour.

    Deprecated

    ParameterDescription
    aColorColour in which to display the incremental match cursor.

    SetMatcherCursorPos ( TInt )

    IMPORT_C voidSetMatcherCursorPos(TIntaPosWithinCurrentItem)

    Sets the match cursor's position.

    Deprecated

    ParameterDescription
    aPosWithinCurrentItemCharacter position for the match cursor within the current item s string.

    SetPaintedSelection ( TBool )

    IMPORT_C voidSetPaintedSelection(TBoolaPaintedSelection)

    Sets the painted selection flag.

    Deprecated

    ParameterDescription
    aPaintedSelectionIf ETrue the painted selection flag is set on. If EFalse the selection flag is set off. If NULL the painted selection flag is cleared.

    SetScrolling ( TBool )

    voidSetScrolling(TBoolaIsScrolling)

    Sets scrolling state.

    SetSelectionIndexesL ( const CSelectionIndexArray * )

    IMPORT_C voidSetSelectionIndexesL(const CSelectionIndexArray *aSelectionIndexes)

    Sets the currently selected items of this view from a selection index array.

    panic
    EEikPanicListBoxInvalidSelIndexArraySpecified Panics if the given selection index array is not valid.
    ParameterDescription
    aSelectionIndexesItems to select.

    SetTextColor ( TRgb )

    IMPORT_C voidSetTextColor(TRgbaColor)

    Sets the colour in which to display text.

    ParameterDescription
    aColorColour in which to display text.

    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.

    SetViewRect ( const TRect & )

    IMPORT_C voidSetViewRect(const TRect &aRect)

    Sets the area within the list window in which the view can draw itself.

    ParameterDescription
    aRectNew view rectangle.

    SetVisibilityObserver ( MListVisibilityObserver * )

    voidSetVisibilityObserver(MListVisibilityObserver *aObserver)

    Sets the visibility observer.

    ParameterDescription
    aObserverNew visibility observer for this control.

    TextColor ( )

    IMPORT_C TRgbTextColor()const

    Gets the colour in which text is to be displayed.

    Returns: Current text colour.

    ToggleItemL ( TInt )

    IMPORT_C voidToggleItemL(TIntaItemIndex)

    Toggles the selection of an item.

    panic
    EEikPanicListBoxNoSelIndexArray Panics if selection indexes have not been defined for this class.
    ParameterDescription
    aItemIndexItem to toggle.

    TopItemIndex ( )

    IMPORT_C TIntTopItemIndex()const

    Gets the index of the item at the top of the view.

    Returns: The item currently displayed at the top of this list box view.

    UpdateSelectionL ( TSelectionMode )

    IMPORT_C voidUpdateSelectionL(TSelectionModeaSelectionMode)[virtual]

    Updates item selection.

    ParameterDescription
    aSelectionModeThe selection mode.

    VScrollTo ( TInt )

    IMPORT_C voidVScrollTo(TIntaNewTopItemIndex)[virtual]

    Sets the index of the item to be the top item.

    ParameterDescription
    aNewTopItemIndexThe item to scroll to.

    VScrollTo ( TInt, TRect & )

    IMPORT_C voidVScrollTo(TIntaNewTopItemIndex,
    TRect &aMinRedrawRect
    )[virtual]

    Sets the index of the item to be the top item.

    This two argument version returns the area which needs redrawing via aMinRedrawRect&. This function does not perform the redraw.

    ParameterDescription
    aNewTopItemIndexThe distance by which to scroll.
    aMinRedrawRectOn return, the minimum rectangle to redraw.

    VerticalMoveToItemL ( TInt, TSelectionMode )

    IMPORT_C voidVerticalMoveToItemL(TIntaTargetItemIndex,
    TSelectionModeaSelectionMode
    )[virtual]

    Moves to the specified item, sets it as the current item and scrolls the display to make the item visible.

    ParameterDescription
    aTargetItemIndexThe index of the item to which to move.
    aSelectionModeThe selection mode.

    ViewRect ( )

    IMPORT_C TRectViewRect()const

    Gets the list box s view rectangle.

    Returns: This list box s view rectangle.

    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.