CEikListBox Class Reference

#include <mw/eiklbx.h>

Link against: ConnectionUiUtilities.lib

class CEikListBox : public CEikBorderedControl

Inherits from

Protected Attributes
CListItemDrawer *iItemDrawer
TInt iItemHeight
CEikButtonBase *iLaunchingButton
TInt iListBoxFlags
MEikListBoxObserver *iListBoxObserver
MListBoxModel *iModel
TInt iRequiredHeightInNumOfItems
CEikScrollBarFrame *iSBFrame
TScrollBarOwnerShip iSBFrameOwned
CListBoxView *iView
Public Member Enumerations
enumanonymous { KEikMaxMatchingBufferLength }
enumTFlags { EMultipleSelection, ENoExtendedSelection, EIncrementalMatching, EPopout, ..., EItemSpecificMenuAlwaysShown }
enumTScrollBarOwnerShip { ENotOwnedExternally, EOwnedExternally }
Protected Member Enumerations
enumTReasonForFocusLost { EFocusLostToExternalControl, EFocusLostToInternalEditor }
Public Member Functions
CEikListBox()
~CEikListBox()
virtual IMPORT_C voidActivateL()
IMPORT_C voidAddItemChangeObserverL(MListBoxItemChangeObserver *)
IMPORT_C voidAddSelectionObserverL(MListBoxSelectionObserver *)
IMPORT_C TBoolBackgroundDrawingSuppressed()
IMPORT_C TIntBottomItemIndex()
IMPORT_C TIntCalcHeightBasedOnNumOfItems(TInt)
IMPORT_C TSizeCalcSizeInPixels(TInt, TInt)
IMPORT_C TIntCalcWidthBasedOnNumOfChars(TInt)
IMPORT_C TIntCalcWidthBasedOnRequiredItemWidth(TInt)
IMPORT_C voidCalculatePopoutRect(TInt, TInt, TRect &, TInt)
voidChangeSelectionMode(TBool)
IMPORT_C voidClearSelection()
IMPORT_C voidConstructL(MListBoxModel *, CListItemDrawer *, const CCoeControl *, TInt)
IMPORT_C voidConstructL(MListBoxModel *, CListItemDrawer *, const CCoeControl *, TGulBorder, TInt)
IMPORT_C CEikScrollBarFrame *CreateScrollBarFrameL(TBool)
IMPORT_C CEikScrollBarFrame *CreateScrollBarFrameL(TBool, TBool)
IMPORT_C CEikScrollBarFrame *CreateScrollBarFrameL(TBool, TBool, TBool)
IMPORT_C TIntCurrentItemIndex()
IMPORT_C voidDisableItemSpecificMenu()
IMPORT_C voidDisableScrolling(TBool)
IMPORT_C voidDisableSingleClick(TBool)
voidDoShiftMSKMarkingL()
IMPORT_C voidDrawItem(TInt)
virtual IMPORT_C voidEditItemL(TInt)
IMPORT_C voidEnableMSKObserver(TBool)
IMPORT_C TIntEventModifiers()
virtual IMPORT_C voidGetColorUseListL(CArrayFix< TCoeColorUse > &)
IMPORT_C voidHandleItemAdditionL()
IMPORT_C voidHandleItemAdditionL(CArrayFix< TInt > &)
IMPORT_C voidHandleItemRemovalL()
IMPORT_C voidHandleItemRemovalL(CArrayFix< TInt > &)
IMPORT_C voidHandlePhysicsScrollEventL(TInt)
virtual IMPORT_C voidHandlePointerEventL(const TPointerEvent &)
virtual IMPORT_C voidHandleResourceChange(TInt)
virtual IMPORT_C voidHandleScrollEventL(CEikScrollBar *, TEikScrollEvent)
IMPORT_C TRectHighlightRect()
voidInformMSKButtonGroupDeletion()
virtual IMPORT_C TCoeInputCapabilitiesInputCapabilities()
IMPORT_C TBoolIsHighlightEnabled()
IMPORT_C TBoolIsMultiselection()
IMPORT_C MEikListBoxEditor *ItemEditor()
IMPORT_C TIntItemHeight()
IMPORT_C TIntItemsInSingleLine()
virtual IMPORT_C voidMakeVisible(TBool)
virtual IMPORT_C TSizeMinimumSize()
IMPORT_C MListBoxModel *Model()
virtual IMPORT_C TKeyResponseOfferKeyEventL(const TKeyEvent &, TEventCode)
IMPORT_C voidRedrawItem(TInt)
IMPORT_C TBoolRemoveItemChangeObserver(MListBoxItemChangeObserver *)
IMPORT_C voidRemoveSelectionObserver(MListBoxSelectionObserver *)
IMPORT_C voidReset()
IMPORT_C voidResetItemEditor()
IMPORT_C CEikScrollBarFrame *constScrollBarFrame()
IMPORT_C voidScrollToMakeItemVisible(TInt)
IMPORT_C TBoolScrollingDisabled()
IMPORT_C const CListBoxView::CSelectionIndexArray *SelectionIndexes()
virtual IMPORT_C voidSetContainerWindowL(const CCoeControl &)
IMPORT_C voidSetCurrentItemIndex(TInt)
IMPORT_C voidSetCurrentItemIndexAndDraw(TInt)
virtual IMPORT_C voidSetDimmed(TBool)
IMPORT_C voidSetItemEditor(MEikListBoxEditor *)
virtual IMPORT_C voidSetItemHeightL(TInt)
IMPORT_C voidSetItemsInSingleLine(TInt)
IMPORT_C voidSetLaunchingButton(CEikButtonBase *)
IMPORT_C voidSetListBoxObserver(MEikListBoxObserver *)
IMPORT_C voidSetMarkingMode(TBool)
IMPORT_C voidSetMarkingModeObserver(MAknMarkingModeObserver *)
IMPORT_C voidSetPointerEventFilterDisabledL(const CArrayFix< TInt > &)
IMPORT_C voidSetScrollBarFrame(CEikScrollBarFrame *, TScrollBarOwnerShip)
IMPORT_C voidSetSelectionIndexesL(CListBoxView::CSelectionIndexArray *)
virtual IMPORT_C voidSetShortcutValueFromPrevList(TInt)
virtual IMPORT_C voidSetTopItemIndex(TInt)
virtual IMPORT_C TIntShortcutValueForNextList()
IMPORT_C voidStopEditingL(TBool)
IMPORT_C voidSuspendEffects(TBool)
IMPORT_C TIntTopItemIndex()
virtual IMPORT_C voidUpdateScrollBarsL()
IMPORT_C TIntVerticalInterItemGap()
IMPORT_C CListBoxView *View()
Protected Member Functions
virtual IMPORT_C TIntAdjustRectHeightToWholeNumberOfItems(TRect &)
virtual IMPORT_C voidAdjustTopItemIndex()
IMPORT_C TRgbBackColor()
CMatchBuffer *Buffer()
voidCheckCreateBufferL()
TBool CheckCreateExtension()
voidCheckCreateExtensionL()
IMPORT_C voidClearMargins()
IMPORT_C voidClearMatchBuffer()
virtual IMPORT_C CCoeControl *ComponentControl(TInt)
virtual IMPORT_C voidConstructL(const CCoeControl *, TInt)
virtual IMPORT_C TIntCountComponentControls()
IMPORT_C voidCreateMatchBufferL()
IMPORT_C voidCreateScrollBarFrameLayout(TEikScrollBarFrameLayout &)
virtual IMPORT_C voidCreateViewL()
virtual IMPORT_C voidDraw(const TRect &)
IMPORT_C voidDrawMatcherCursor()
IMPORT_C voidFireItemChange()
virtual IMPORT_C voidFocusChanged(TDrawNow)
virtual IMPORT_C voidHandleDragEventL(TPoint)
virtual IMPORT_C voidHandleLeftArrowKeyL(CListBoxView::TSelectionMode)
virtual IMPORT_C voidHandleRightArrowKeyL(CListBoxView::TSelectionMode)
virtual IMPORT_C voidHandleViewRectSizeChangeL()
virtual IMPORT_C TIntHorizScrollGranularityInPixels()
IMPORT_C TIntHorizontalMargin()
virtual IMPORT_C TIntHorizontalNudgeValue()
IMPORT_C TIntInterItemGap()
IMPORT_C TBoolIsMatchBuffer()
IMPORT_C TBoolItemExists(TInt)
IMPORT_C TBoolLastCharMatched()
IMPORT_C TMargins8ListBoxMargins()
virtual IMPORT_C CListBoxView *MakeViewClassInstanceL()
IMPORT_C RIncrMatcherBase *MatchBuffer()
IMPORT_C voidMatchTypedCharL(TUint)
IMPORT_C TReasonForFocusLostReasonForFocusLostL()
virtual IMPORT_C voidReportListBoxEventL(MEikListBoxObserver::TListBoxEvent)
virtual IMPORT_C voidRestoreClientRectFromViewRect(TRect &)
IMPORT_C voidRestoreCommonListBoxPropertiesL(TResourceReader &)
IMPORT_C voidSetHorizontalMargin(TInt)
IMPORT_C voidSetReasonForFocusLostL(TReasonForFocusLost)
IMPORT_C voidSetVerticalMargin(TInt)
IMPORT_C voidSetViewRectFromClientRect(const TRect &)
IMPORT_C voidSetViewRectHeightAdjustment(TInt)
IMPORT_C voidSimulateArrowKeyEventL(TKeyCode)
virtual IMPORT_C voidSizeChanged()
IMPORT_C voidUndoLastChar()
virtual IMPORT_C voidUpdateCurrentItem(TInt)
IMPORT_C voidUpdateItemDrawerColors()
voidUpdateMarkUnmarkMSKL()
virtual IMPORT_C voidUpdateScrollBarThumbs()
IMPORT_C voidUpdateViewColors()
IMPORT_C TIntVerticalMargin()
IMPORT_C TIntViewRectHeightAdjustment()
Inherited Attributes
CCoeControl::iCoeEnv
CCoeControl::iContext
CCoeControl::iPosition
CCoeControl::iSize
CEikBorderedControl::iBorder
Inherited Enumerations
CCoeControl:TZoomType
Inherited Functions
CAknControl::CAknControl()
CAknControl::~CAknControl()
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()
CCoeControl::AccumulatedZoom()const
CCoeControl::ActivateGc()const
CCoeControl::BackedUpWindow()const
CCoeControl::Background()const
CCoeControl::CCoeControl()
CCoeControl::CCoeControl(CCoeEnv *)
CCoeControl::CCoeControl(const CCoeControl &)
CCoeControl::CCoeControlArray
CCoeControl::CapturesPointer()const
CCoeControl::ClaimPointerGrab(TBool)
CCoeControl::ClaimPointerGrab(TInt,TBool)
CCoeControl::CloseWindow()
CCoeControl::ComponentArrayExists()const
CCoeControl::Components()
CCoeControl::Components()const
CCoeControl::ConstructFromResourceL(TResourceReader &)
CCoeControl::ControlContext()const
CCoeControl::ControlEnv()const
CCoeControl::CopyControlContextFrom(const CCoeControl *)
CCoeControl::CreateBackedUpWindowL(RWindowTreeNode &)
CCoeControl::CreateBackedUpWindowL(RWindowTreeNode &,TDisplayMode)
CCoeControl::CreateWindowL()
CCoeControl::CreateWindowL(RWindowGroup *)
CCoeControl::CreateWindowL(RWindowTreeNode &)
CCoeControl::CreateWindowL(const CCoeControl *)
CCoeControl::CustomGc()const
CCoeControl::DeactivateGc()const
CCoeControl::DrawBackground(const TRect &)const
CCoeControl::DrawDeferred()const
CCoeControl::DrawForeground(const TRect &)const
CCoeControl::DrawNow()const
CCoeControl::DrawNow(const TRect &)const
CCoeControl::DrawableWindow()const
CCoeControl::EnableDragEvents()
CCoeControl::EnableReportControlStateChange(TBool)
CCoeControl::EnableWindowTransparency()
CCoeControl::FindBackground()const
CCoeControl::FindFontProvider()const
CCoeControl::GetColor(TInt,TRgb &)const
CCoeControl::GetGc()const
CCoeControl::GetHelpContext(TCoeHelpContext &)const
CCoeControl::GrabbingComponent()const
CCoeControl::GrabbingComponent(TInt)const
CCoeControl::HandleComponentControlsResourceChange(TInt)
CCoeControl::HandleControlArrayEventL(CCoeControlArray::TEvent,const CCoeControlArray *,CCoeControl *,TInt)
CCoeControl::HandlePointerBufferReadyL()
CCoeControl::HandleRedrawEvent(const TRect &)const
CCoeControl::HitTest()const
CCoeControl::IgnoreEventsUntilNextPointerUp()
CCoeControl::Index(const CCoeControl *)const
CCoeControl::InitComponentArrayL()
CCoeControl::IsActivated()const
CCoeControl::IsBackedUp()const
CCoeControl::IsBeingDestroyed()const
CCoeControl::IsBlank()const
CCoeControl::IsDimmed()const
CCoeControl::IsFocused()const
CCoeControl::IsNonFocusing()const
CCoeControl::IsReadyToDraw()const
CCoeControl::IsVisible()const
CCoeControl::LayoutManager()const
CCoeControl::MaximumWidth()const
CCoeControl::MopSupplyObject(TTypeUid)
CCoeControl::NotifyFontChange(const CCoeFontProvider *)
CCoeControl::Observer()const
CCoeControl::OverrideColorL(TInt,TRgb)
CCoeControl::OwnsWindow()const
CCoeControl::Parent()
CCoeControl::Parent()const
CCoeControl::Position()const
CCoeControl::PositionChanged()
CCoeControl::PositionRelativeToScreen()const
CCoeControl::PrepareForFocusGainL()
CCoeControl::PrepareForFocusLossL()
CCoeControl::ProcessPointerBufferReadyL()
CCoeControl::ProcessPointerEventL(const TPointerEvent &)
CCoeControl::Rect()const
CCoeControl::RecursivelyMergeInputCapabilities(TCoeInputCapabilities &)const
CCoeControl::RecursivelyMergedInputCapabilities()const
CCoeControl::RefetchPixelMappingL()
CCoeControl::RemoveFromParent()
CCoeControl::ReportEventL(MCoeControlObserver::TCoeEvent)
CCoeControl::RequestRelayout(const CCoeControl *)
CCoeControl::ResetGc()const
CCoeControl::ScreenFont(const TCoeFont &)const
CCoeControl::SetAllowStrayPointers()
CCoeControl::SetBackground(const MCoeControlBackground *)
CCoeControl::SetBlank()
CCoeControl::SetCanDrawOutsideRect()
CCoeControl::SetComponentsToInheritVisibility(TBool)
CCoeControl::SetContainerWindowL(RBackedUpWindow &)
CCoeControl::SetContainerWindowL(RWindow &)
CCoeControl::SetControlContext(MCoeControlContext *)
CCoeControl::SetCornerAndSize(TGulAlignment,const TSize &)
CCoeControl::SetCustomGc(CWindowGc *)
CCoeControl::SetExtent(const TPoint &,const TSize &)
CCoeControl::SetExtentToWholeScreen()
CCoeControl::SetFocus(TBool,TDrawNow)
CCoeControl::SetFocusing(TBool)
CCoeControl::SetFontProviderL(const CCoeFontProvider &)
CCoeControl::SetGc(CWindowGc *)const
CCoeControl::SetGloballyCapturing(TBool)
CCoeControl::SetHitTest(const MCoeControlHitTest *)
CCoeControl::SetLayoutManagerL(MCoeLayoutManager *)
CCoeControl::SetMaximumWidth(TInt)
CCoeControl::SetMopParent(MObjectProvider *)
CCoeControl::SetNeighbor(CCoeControl *)
CCoeControl::SetNonFocusing()
CCoeControl::SetObserver(MCoeControlObserver *)
CCoeControl::SetParent(CCoeControl *)
CCoeControl::SetPointerCapture(TBool)
CCoeControl::SetPosition(const TPoint &)
CCoeControl::SetRect(const TRect &)
CCoeControl::SetSize(const TSize &)
CCoeControl::SetSizeWithoutNotification(const TSize &)
CCoeControl::SetTextBaselineSpacing(TInt)
CCoeControl::SetUniqueHandle(TInt)
CCoeControl::SetZoomFactorL(TInt,TZoomType)
CCoeControl::Size()const
CCoeControl::SystemGc()const
CCoeControl::TextBaselineOffset(const TSize &)const
CCoeControl::TextDrawer(TInt)const
CCoeControl::UniqueHandle()const
CCoeControl::Window()const
CCoeControl::WriteInternalStateNowL(RWriteStream &)const
CCoeControl::ZoomWithType()const
CCoeControl::operator=(const CCoeControl &)
CCoeControl::~CCoeControl()
CEikBorderedControl::Border()const
CEikBorderedControl::CEikBorderedControl()
CEikBorderedControl::CEikBorderedControl(const TGulBorder &)
CEikBorderedControl::HasBorder()const
CEikBorderedControl::SetAdjacent(TInt)
CEikBorderedControl::SetBorder(TGulBorder::TBorderType)
CEikBorderedControl::SetBorder(TInt)
CEikBorderedControl::WriteInternalStateL(RWriteStream &)const

Detailed Description

Base class for an on-screen list box control from which one or more items can be selected.

CEikListBox implements the basics of a list box. It has a scroll bar frame, an item drawer, and a model, and reports events to a list box observer.

List boxes display a number of items within a scrolling frame; the items in a list box which are visible at one time are represented by a list box view.

Writing derived classes:

This class may be derived from to provide specialisations of the basic list box behaviour. It is usual when subclassing CEikListBox to also provide specialisations of CListItemDrawer and CListBoxView for representing the data of such a list box effectively

Member Attribute Documentation

iItemDrawer

CListItemDrawer *iItemDrawer[protected]

Item drawer for this list box

iItemHeight

TInt iItemHeight[protected]

Height of each item in the list

iLaunchingButton

CEikButtonBase *iLaunchingButton[protected]

Defines which button launched the popout.

iListBoxFlags

TInt iListBoxFlags[protected]

Flags for this list box

iListBoxObserver

MEikListBoxObserver *iListBoxObserver[protected]

The button which just launched a popout menu.

iModel

MListBoxModel *iModel[protected]

Data model for this list box

iRequiredHeightInNumOfItems

TInt iRequiredHeightInNumOfItems[protected]

The required height of this list box expressed in terms of a number of items.

iSBFrame

CEikScrollBarFrame *iSBFrame[protected]

The scroll bar used by this control

iSBFrameOwned

TScrollBarOwnerShip iSBFrameOwned[protected]

Identifies if the scroll bar is owned by this list

iView

CListBoxView *iView[protected]

This List box's view

Member Enumeration Documentation

Enum anonymous

EnumeratorValueDescription
KEikMaxMatchingBufferLength2

Enum TFlags

Construction flags.

EnumeratorValueDescription
EMultipleSelectionSLafListBox::EMultipleSelection

Construction flag for a list box from which the user can select multiple items.

ENoExtendedSelectionSLafListBox::ENoExtendedSelection

Construction flag for disabling extended selection. If this is set the user cannot select multiple items by using SHIFT button.

EIncrementalMatchingSLafListBox::EIncrementalMatching

Construction flag that sets the list box to match user?s keystrokes incrementally.

EPopoutSLafListBox::EPopout

Construction flag for setting the list box as a pop-out list box. Pop-out list boxes handle certain keystrokes and events differently.

ELeftDownInViewRectSLafListBox::ELeftDownInViewRect

Construction flag that enables the indication of pointer press inside the view of the list box.

EItemDoubleClickedSLafListBox::EItemDoubleClicked

Construction flag for enabling CEiklist box item double click indication.

EKeepModelSLafListBox::EKeepModel

Construction flag for removing the ownership of the supplied list box model from the CEikListBox so that the list box model will not be deleted with the CEikListBoxes destruction.

EScrollBarSizeExcludedSLafListBox::EScrollBarSizeExcluded

Construction flag for excluding the scroll bar. If the flag is set the scroll bas is drawn ouside the window that describes the scroll bars extent.

EStateChangedSLafListBox::EStateChanged

Construction flag for enabling CEikListBox change indication.

ECreateOwnWindowSLafListBox::ECreateOwnWindow

Construction flag that indicates that the list box should be created to its own window.

ENoFirstLetterMatchingSLafListBox::ENoFirstLetterMatching

Construction flag for disabling key matching.

EPaintedSelectionSLafListBox::EPaintedSelection

Construction flag for enabling painting of selected items.

ELoopScrolling0x1000

Construction flag for enabling loop scrolling in which the list box jumps from the last item to the first item.

EEnterMarks0x2000

Construction flag for enabling Avkon multiselection list.

EShiftEnterMarks0x4000

Construction flag for enabling Avkon markable list which enables the marking of several items from the list.

EViewerFlag0x8000

Construction flag that combines EPageAtOnceScrolling and EDisableHighlight flags

EPageAtOnceScrolling0x8000

Construction flag for enabling scrolling at a page per time so that the whole list box page is scrolled to the next.

EDisableHighlight0x8000

Construction flag for disabling the highlighting of the selected item.

ES60StyleMultiselectionSLafListBox::ES60StyleMultiselection

Construction flag for enabling S60 style selection of multiple items from the list box.

ES60StyleMarkableSLafListBox::ES60StyleMarkable

Construction flag for enabling S60 style markable items.

EDisableItemSpecificMenu0x00040000

Construction flag for disabling item specific stylus popup menu.

EItemSpecificMenuAlwaysShown0x00080000

Construction flag to make item specific stylus popup menu always shown regardless of list's marking state if the tapped item has associated commands.

Enum TReasonForFocusLost

Used for indicating the reason why the item lost focus.

EnumeratorValueDescription
EFocusLostToExternalControl

Focus has been lost from the list box to an external control.

EFocusLostToInternalEditor

Focus has been moved from the list box to an internal editor.

Enum TScrollBarOwnerShip

Indicates who owns the scroll bar.

EnumeratorValueDescription
ENotOwnedExternally0x0000

Indicates that the scrollbar is not owned by an external class.

EOwnedExternally0x0001

Indicates that the scrollbar is owned by an external class.

Constructor & Destructor Documentation

CEikListBox ( )

IMPORT_CCEikListBox()

C++ default constructor.

~CEikListBox ( )

IMPORT_C~CEikListBox()

Destructor.

Member Function Documentation

ActivateL ( )

IMPORT_C voidActivateL()[virtual]

Reimplemented from CCoeControl::ActivateL()

From CCoeControl

Sets the control as ready to be drawn.

The application should call this function on all controls that are not components in a compound control.

The purpose of this function is that controls are not always ready to be drawn as soon as they have been constructed. For example, it may not be possible to set the control's extent during construction, but its extent should always be set before it is drawn. Similarly, if a control is to be made invisible, this should be done before it is activated.

The default implementation sets a flag in the control to indicate it is ready to be drawn. If the control is a compound control, the default implementation also calls ActivateL() for all the control's components. To get the control's components it uses CountComponentControls() and ComponentControl(), which should be implemented by the compound control.

ActivateL() is typically called from the control's ConstructL() function.

Notes:

This function can be overridden. This is useful for doing late initialisation of the control, using information that was not available at the time the control was created. For example, a text editor might override ActivateL() and use it to enquire whether it is focused: if it is, it makes the cursor and any highlighting visible. At the time when the editor is created, it doesn't know whether or not it has keyboard focus.

If overriding ActivateL(), the implementation must include a base call to CCoeControl's ActivateL().

AddItemChangeObserverL ( MListBoxItemChangeObserver * )

IMPORT_C voidAddItemChangeObserverL(MListBoxItemChangeObserver *aObserver)

Adds an item change observer to the listbox. Duplicates are not checked (i.e. adding the same observer multiple times is not prevented).

Since
3.0
ParameterDescription
aObserverMust be non-NULL.

AddSelectionObserverL ( MListBoxSelectionObserver * )

IMPORT_C voidAddSelectionObserverL(MListBoxSelectionObserver *aObserver)

Adds a selection (item marking) observer to the listbox. Duplicates are not checked (i.e. adding the same observer multiple times is not prevented).

Since
3.2
ParameterDescription
aObserverMust be non-NULL.

AdjustRectHeightToWholeNumberOfItems ( TRect & )

IMPORT_C TIntAdjustRectHeightToWholeNumberOfItems(TRect &aRect)const [protected, virtual]

Rounds down the height of the rectangle (if necessary) so that only a whole number of items can be displayed inside the list box.

ParameterDescription
aRectThe rectangle to be modified.

Returns: The number of pixels reduced.

AdjustTopItemIndex ( )

IMPORT_C voidAdjustTopItemIndex()const [protected, virtual]

Called by various functions of this class to ensure that the top item index is always a sane value. The implementation in CEikListBox tries to ensure the minimum amount of white space at the bottom of the list box. Note that this function does not affect the current item index.

BackColor ( )

IMPORT_C TRgbBackColor()const [protected]

Gets the background colour.

Returns: The background colour.

BackgroundDrawingSuppressed ( )

IMPORT_C TBoolBackgroundDrawingSuppressed()const

Checks whether background drawing is suppressed on item level i.e. each list item doesn't draw its background.

Since
S60 5.0

Returns: ETrue if background drawing is suppressed.

BottomItemIndex ( )

IMPORT_C TIntBottomItemIndex()const

Gets for the bottom items index.

Returns: Index for the bottom item.

Buffer ( )

CMatchBuffer *Buffer()const [protected]

Gets the list box match buffer.

Returns: The list box match buffer.

CalcHeightBasedOnNumOfItems ( TInt )

IMPORT_C TIntCalcHeightBasedOnNumOfItems(TIntaNumOfItems)const

Gets the height of the list box in pixels based on the width of the list box in characters.

Returns the number of items times the height of the font in pixels.

ParameterDescription
aNumOfItemsThe number of items.

Returns: The height of the list box in pixels.

CalcSizeInPixels ( TInt, TInt )

IMPORT_C TSizeCalcSizeInPixels(TIntaWidthAsNumOfChars,
TIntaHeightAsNumOfItems
)const

Gets the size of the list box in pixels based on the height of the list box in items and the length of the items in characters.

Returns TSize element consisting of two elements, the height and the width. Height is the number of items times the height of the font in pixels. Width is the number of characters in a single line times the width of the font in pixels.

ParameterDescription
aWidthAsNumOfCharsWidth of list box in characters.
aHeightAsNumOfItemsHeight of list box in characters.

Returns: The size of the list box in pixels as TSize.

CalcWidthBasedOnNumOfChars ( TInt )

IMPORT_C TIntCalcWidthBasedOnNumOfChars(TIntaNumOfChars)const

Gets the width of the list box in pixels based on the width of the list box in characters.

Returns the number of characters times the width of a character in pixels.

ParameterDescription
aNumOfCharsThe number of characters.

Returns: The width of the list box in pixels.

CalcWidthBasedOnRequiredItemWidth ( TInt )

IMPORT_C TIntCalcWidthBasedOnRequiredItemWidth(TIntaTextWidthInPixels)const

Gets the width of the list box in pixels based on the width of the list box text in pixels.

returns the width of the whole list box in pixels, which includes the text width and the width of elements in the list box that have an effect on the overall width.

ParameterDescription
aTextWidthInPixelsWidth of list box text in pixels.

Returns: Required width of whole list box in pixels.

CalculatePopoutRect ( TInt, TInt, TRect &, TInt )

IMPORT_C voidCalculatePopoutRect(TIntaTargetItemIndex,
TIntaTargetYPos,
TRect &aListBoxRect,
TIntaMinHeightInNumOfItems = 1
)

Gets the size of the rectangle required to display a pop out.

ParameterDescription
aTargetItemIndexThe item from which the popout originates.
aTargetYPosVertical position of the item from which the popout originates.
aListBoxRectThe list box rectangle.
aMinHeightInNumOfItemsThe minimum number of items for the popout.

ChangeSelectionMode ( TBool )

voidChangeSelectionMode(TBoolaEnable)

This switches listbox into selection mode. Basicly only changes MSK and informs selection observers about the change.

Since
3.2
ParameterDescription
aEnableETrue when entering into selection mode, EFalse when leaving

CheckCreateBufferL ( )

voidCheckCreateBufferL()[protected]

Checks the list box match buffer exists. If a buffer does not exist, one is created.

CheckCreateExtension ( )

TBool CheckCreateExtension()[protected]

Checks for a list box extension. Creates one if not present.

Returns: ETrue if a list box extension already existed or if there was no previous extension and a new extension class was created successfully. EFalse if there was no previous extension and a new one could not be constructed.

CheckCreateExtensionL ( )

voidCheckCreateExtensionL()[protected]

Checks for a list box extension. Attempts to create one if not present.

This function leaves if an extension cannot be created.

ClearMargins ( )

IMPORT_C voidClearMargins()const [protected]

Clears the list box margins. The list box is redrawn only if redraws are enabled for the list box view.

ClearMatchBuffer ( )

IMPORT_C voidClearMatchBuffer()const [protected]

Empties the match buffer .

ClearSelection ( )

IMPORT_C voidClearSelection()

Clears the selection from the view.

ComponentControl ( TInt )

IMPORT_C CCoeControl *ComponentControl(TIntaIndex)const [protected, virtual]

Gets an indexed component of a compound control.

There are two ways to implement a compound control. One way is to override this function. The other way is to use the CCoeControlArray functionality (see the InitComponentArrayL method).

Note: Within a compound control each component control is identified by an index, where the index depends on the order the controls were added: the first is given an index of 0, the next an index of 1, and so on.

ParameterDescription
aIndexThe index of the control.

Returns: The component control with an index of aIndex.

ConstructL ( MListBoxModel *, CListItemDrawer *, const CCoeControl *, TInt )

IMPORT_C voidConstructL(MListBoxModel *aListBoxModel,
CListItemDrawer *aListItemDrawer,
const CCoeControl *aParent,
TIntaFlags = 0
)

Handles 2nd phase construction.

Sets list box model and list item drawer. Request another ConstructL to handle aParent and aFlags.

ParameterDescription
aListBoxModelList box model that is to be used with the list box.
aListItemDrawerList item drawer that is to be used with the list box.
aParentHost CoeControl for the list box.
aFlagsConstruction flags (TFlags) for the list box.

ConstructL ( MListBoxModel *, CListItemDrawer *, const CCoeControl *, TGulBorder, TInt )

IMPORT_C voidConstructL(MListBoxModel *aListBoxModel,
CListItemDrawer *aListItemDrawer,
const CCoeControl *aParent,
TGulBorderaBorder,
TIntaFlags = 0
)

Handles 2nd phase construction.

Sets the border that is to be drawn outside the list box. Request another ConstructL to handle list box model, list item drawer, aParent and aFlags.

ParameterDescription
aListBoxModelList box model that is to be used with the list box.
aListItemDrawerList item drawer that is to be used with the list box.
aParentHost CoeControl for the list box.
aBorderBorder to be drawn outside the list box.
aFlagsConstruction flags (TFlags) for the list box.

ConstructL ( const CCoeControl *, TInt )

IMPORT_C voidConstructL(const CCoeControl *aParent,
TIntaFlags = 0
)[protected, virtual]

Second-phase constructor.

This protected form is overridden non-virtually by the second-phase constructors of each subclass, and should be invoked by them using CEikListBox::ConstructL().

ParameterDescription
aParentThe parent control. May be NULL.
aFlagsConstruction flags.

CountComponentControls ( )

IMPORT_C TIntCountComponentControls()const [protected, virtual]

Gets the number of controls contained in a compound control.

There are two ways to implement a compound control. One way is to override this function. The other way is to use the CCoeControlArray functionality (see the InitComponentArrayL method).

Returns: The number of component controls contained by this control.

CreateMatchBufferL ( )

IMPORT_C voidCreateMatchBufferL()[protected]

Creates a buffer for checking how well two strings match up.

CreateScrollBarFrameL ( TBool )

IMPORT_C CEikScrollBarFrame *CreateScrollBarFrameL(TBoolaPreAlloc = EFalse)

Creates a scrollbar frame.

ParameterDescription
aPreAllocBoolean defining if there should be initial memory allocations.

Returns: The new scroll bar frame.

CreateScrollBarFrameL ( TBool, TBool )

IMPORT_C CEikScrollBarFrame *CreateScrollBarFrameL(TBoolaPreAlloc,
TBoolaRemote
)

Creates a scrollbar for the listbox. The caller may choose if the scrollbar is requested remotely via the mop chain from parent control

ParameterDescription
aPreAllocIs the scrollbar created immediately or when taking in to use
aRemoteIf True, the scrollbar is obtained via mop-chain from parent control. If used, the listbox only sets the scrollbar values. The scrollbar position and size must set in the parent control's code.

Returns: CEikScrollBarFrame* pointer to scrollbar frame object

CreateScrollBarFrameL ( TBool, TBool, TBool )

IMPORT_C CEikScrollBarFrame *CreateScrollBarFrameL(TBoolaPreAlloc,
TBoolaRemote,
TBoolaWindowOwning
)

Creates a scrollbar for the listbox. The caller may choose if the scrollbar is requested remotely via the mop chain from parent control

ParameterDescription
aPreAllocIs the scrollbar created immediately or when taking in to use
aRemoteIf True, the scrollbar is obtained via mop-chain from parent control. If used, the listbox only sets the scrollbar values. The scrollbar position and size must set in the parent control's code.
aWindowOwningDoes the created scrollbar create own window or is it compound control. The listbox uses a window owning scrollbar by default.

Returns: CEikScrollBarFrame* pointer to scrollbar frame object

CreateScrollBarFrameLayout ( TEikScrollBarFrameLayout & )

IMPORT_C voidCreateScrollBarFrameLayout(TEikScrollBarFrameLayout &aLayout)const [protected]

Creates a scroll bar frame layout according to aLayout.

ParameterDescription
aLayoutDefines the layout.

CreateViewL ( )

IMPORT_C voidCreateViewL()[protected, virtual]

Completes the list box view?s construction.

This function is called by ConstructL() to complete construction of the resource view, calling its ConstructL() with appropriate arguments and assigning it to iView. Also prepares the view for use.

CurrentItemIndex ( )

IMPORT_C TIntCurrentItemIndex()const

Gets the index number of the selected item.

Returns: Index of the selected item.

DisableItemSpecificMenu ( )

IMPORT_C voidDisableItemSpecificMenu()

Disables item specific menu from the list. This has the same effect as construction time flag EAknListBoxItemSpecificMenuDisabled and calling this method also turns that flag on.

Since
S60 5.2

DisableScrolling ( TBool )

IMPORT_C voidDisableScrolling(TBoolaDisabled)

Disables the kinetic scrolling functionality in the list. By default the feature is enabled.

Since
5.0
ParameterDescription
aDisabledETrue to disable kinetic scrolling, EFalse otherwise.

DisableSingleClick ( TBool )

IMPORT_C voidDisableSingleClick(TBoolaDisabled)

Disables the single click functionality in the list. By default the feature is enabled.

Since
S60 5.2
ParameterDescription
aDisabledETrue to disable single click EFalse does currently nothing

DoShiftMSKMarkingL ( )

voidDoShiftMSKMarkingL()

Called from MSK observer when shift+MSK have been pressed

S60 3.1

Draw ( const TRect & )

IMPORT_C voidDraw(const TRect &aRect)const [protected, virtual]

Redraws the specified area of this list box into the specified rectangle.

ParameterDescription
aRectRectangle to be redrawn. Specified relative to the origin of this control.

DrawItem ( TInt )

IMPORT_C voidDrawItem(TIntaItemIndex)const

Draws a list box item, first scrolling the list to make it visible if it is not already.

DrawItem() panics if there is no list box view currently set.

ParameterDescription
aItemIndexIndex of the item to reveal.

DrawMatcherCursor ( )

IMPORT_C voidDrawMatcherCursor()const [protected]

Draws the matcher cursor in the correct location for the current match. If there is no match buffer, this function returns immediately; otherwise the cursor is drawn on the current item using CListBoxView::DrawMatcherCursor() after scrolling to make the current item visible.

A list box control?s matcher cursor is an on-screen cursor which is drawn to indicate to the user the location of the current text. Whether the cursor is drawn is dependent on the CListBoxView::TFlags::EHasMatcherCursor flag, which may be set on the list box?s view.

Note, that CListBoxView::DrawMatcherCursor() is not implemented in S60.

EditItemL ( TInt )

IMPORT_C voidEditItemL(TIntaMaxLength)[virtual]

Creates an item editor and starts editing the current item.

The editor can edit the current item up to a maximum length of aMaxLength characters. Also reports an EEventEditingStarted event to any list box observer by default.

The function only creates a new editor if one does not already exist.

ParameterDescription
aMaxLengthMaximum length of characters to edit.

EnableMSKObserver ( TBool )

IMPORT_C voidEnableMSKObserver(TBoolaEnable)

By default markable listbox has middle softkey observer, which handles Mark / Unmark functionality. By this method, the caller may disable default observer.

Since
S60 3.1
ParameterDescription
aEnableIf EFalse, disables default middle softkey observer for markable lists. ETrue enables observer again.

EventModifiers ( )

IMPORT_C TIntEventModifiers()

Returns: Event modifiers for the CEikListBox.

FireItemChange ( )

IMPORT_C voidFireItemChange()[protected]

Notifies item change observers about item change. Subclasses must call this method if they have implemented item handling functions (e.g. HandleItemAdditionL or HandleItemRemovalL).

Since
S60 3.0

FocusChanged ( TDrawNow )

IMPORT_C voidFocusChanged(TDrawNowaDrawNow)[protected, virtual]

Responds to a change in focus.

This is called whenever the control gains or loses focus, as a result of a call to SetFocus(). A typical use of FocusChanged() is to change the appearance of the control, for example by drawing a focus rectangle around it.

The default implementation is empty, and should be overridden by the CCoeControl-derived class.

ParameterDescription
aDrawNowContains the value that was passed to it by SetFocus().

GetColorUseListL ( CArrayFix< TCoeColorUse > & )

IMPORT_C voidGetColorUseListL(CArrayFix< TCoeColorUse > &aColorUseList)const [virtual]

From CCoeControl

Gets the list of logical colours employed in the drawing of the control, paired with an explanation of how they are used. Appends the list to aColorUseList.

ParameterDescription
aColorUseListList of logical colours.

HandleDragEventL ( TPoint )

IMPORT_C voidHandleDragEventL(TPointaPointerPos)[protected, virtual]

Handles drag events.

This function is called by HandlePointerEventL() to handle pointer drag events appropriately.

ParameterDescription
aPointerPosThe position of the TPointerEvent for which this handler is invoked.

HandleItemAdditionL ( )

IMPORT_C voidHandleItemAdditionL()

Handles the addition of item to the list box.

HandleItemAdditionL ( CArrayFix< TInt > & )

IMPORT_C voidHandleItemAdditionL(CArrayFix< TInt > &aArrayOfNewIndexesAfterAddition)

Handles the addition of new items to the list box and updates selection indexes array.

NOTE. This algorithm can not handle position of the list highlight nor can it update the top item index correctly.

ParameterDescription
aArrayOfNewIndexesAfterAdditionArray of new indexes to be added.

HandleItemRemovalL ( )

IMPORT_C voidHandleItemRemovalL()

Handles the removal of an item from the list box.

HandleItemRemovalL ( CArrayFix< TInt > & )

IMPORT_C voidHandleItemRemovalL(CArrayFix< TInt > &aArrayOfOldIndexesBeforeRemoval)

Handles the removal of items to the list box and updates selection indexes array.

NOTE. This algorithm cannot handle position of the list highlight nor can it update the top item index correctly.

ParameterDescription
aArrayOfOldIndexesBeforeRemovalArray of indexes to be removed.

HandleLeftArrowKeyL ( CListBoxView::TSelectionMode )

IMPORT_C voidHandleLeftArrowKeyL(CListBoxView::TSelectionModeaSelectionMode)[protected, virtual]

Handles a left arrow key event.

The method used to handle the event depends on the selection mode, e.g. whether the user has pressed the SHIFT or CONTROL key.

ParameterDescription
aSelectionModeNot used

HandlePhysicsScrollEventL ( TInt )

IMPORT_C voidHandlePhysicsScrollEventL(TIntaDeltaPixels)

Scrolls the view by the given amount of pixels while keeping the physics parameters up-to-date. This should be called when scrolling the list box view except for when it is done by list dragging (e.g. scrolling with scroll bar).

Since
5.0
ParameterDescription
aDeltaPixelsAmount of pixels to scroll the view.

HandlePointerEventL ( const TPointerEvent & )

IMPORT_C voidHandlePointerEventL(const TPointerEvent &aPointerEvent)[virtual]

Handling of pointer event within the CEikListBox. Used for e.g. selecting an item from the list box.

ParameterDescription
aPointerEventDetails of the pointer event that is being handled.

HandleResourceChange ( TInt )

IMPORT_C voidHandleResourceChange(TIntaType)[virtual]

From CCoeControl

Handles a change to the list box?s resources of type aType which are shared across the environment, colours or fonts for example.

ParameterDescription
aTypeThe type of resources that have changed.

HandleRightArrowKeyL ( CListBoxView::TSelectionMode )

IMPORT_C voidHandleRightArrowKeyL(CListBoxView::TSelectionModeaSelectionMode)[protected, virtual]

Handles a right arrow key event.

The method used to handle the event depends on the selection mode, e.g. whether the user has pressed the SHIFT or CONTROL key.

ParameterDescription
aSelectionModeNot used.

HandleScrollEventL ( CEikScrollBar *, TEikScrollEvent )

IMPORT_C voidHandleScrollEventL(CEikScrollBar *aScrollBar,
TEikScrollEventaEventType
)[virtual]

Used for scrolling through the items in the list box.

ParameterDescription
aScrollBarScroll bar for the list box.
aEventTypeType of the event that occured.

HandleViewRectSizeChangeL ( )

IMPORT_C voidHandleViewRectSizeChangeL()[protected, virtual]

Handles the change in case that the size of the view rectangle for the list box changes.

HighlightRect ( )

IMPORT_C TRectHighlightRect()const

Gets the position and the size of the list box.

Returns: A rectangle with the correct position data as well as size data for the list box.

HorizScrollGranularityInPixels ( )

IMPORT_C TIntHorizScrollGranularityInPixels()const [protected, virtual]

Get horizontal scroll granularity in pixels. The granularity is the minimum size of a horizontal move of the client area.

Returns: Grain size for horizontal scrolling in pixels.

HorizontalMargin ( )

IMPORT_C TIntHorizontalMargin()const [protected]

This function gets the horizontal margin. Use CEikListBox::ListBoxMargins() instead, as this provides a more accurate value due to the bit shifting involved.

DeprecatedUse CEikListBox::ListBoxMargins()

Returns: The horizontal margin in pixels.

HorizontalNudgeValue ( )

IMPORT_C TIntHorizontalNudgeValue()const [protected, virtual]

Gets the number of grains to move horizontally when a nudge button is tapped. For simple list boxes, this value is a fraction of the width of the client area.

Returns: Number of grains to move left or right on each nudge

InformMSKButtonGroupDeletion ( )

voidInformMSKButtonGroupDeletion()

This method is only called by CEikButtonGroupContainer when MSK observer is enabled and CEikButtonGroupContainer is deleted.

S60 3.1

InputCapabilities ( )

IMPORT_C TCoeInputCapabilitiesInputCapabilities()const [virtual]

From CCoeControl.

Gets the input capabilities of the control and all its components.

Returns: The input capabilities of the control.

InterItemGap ( )

IMPORT_C TIntInterItemGap()[protected, static]

Gets the vertical gap between elements in the list box.

Returns: The vertical gap between elements in the list box.

IsHighlightEnabled ( )

IMPORT_C TBoolIsHighlightEnabled()

Checks if highlight drawing is enabled. If single click is enabled highlight drawing is by default disabled, but highlight comes visible with hardware keys.

Since
S60 5.2

Returns: ETrue if highlight is enabled, EFalse if not.

IsMatchBuffer ( )

IMPORT_C TBoolIsMatchBuffer()const [protected]

Tests whether the list box match buffer exists.

Returns: ETrue if the list box match buffer exists. EFalse if the list box match buffer does not exist.

IsMultiselection ( )

IMPORT_C TBoolIsMultiselection()

ItemEditor ( )

IMPORT_C MEikListBoxEditor *ItemEditor()

Gets item editor for the current class.

Returns: The item editor used by the list box class.

ItemExists ( TInt )

IMPORT_C TBoolItemExists(TIntaItemIndex)const [protected]

Tests whether an item exists.

ParameterDescription
aItemIndexIndex to test.

Returns: ETrue if the specified item exists, EFalse otherwise.

ItemHeight ( )

IMPORT_C TIntItemHeight()const

Gets height of the item.

Returns: Height of the item.

ItemsInSingleLine ( )

IMPORT_C TIntItemsInSingleLine()const

Gets the number of list items in one line. This is more than one for grids only.

Since
S60 5.2

Returns: The number of list items in one line.

LastCharMatched ( )

IMPORT_C TBoolLastCharMatched()const [protected]

Checks if the last character matched with the string.

Returns: ETrue if a match was found from the buffer with the character.

ListBoxMargins ( )

IMPORT_C TMargins8ListBoxMargins()const [protected]

Gets list box margins.

Returns: The list box margins in pixels.

MakeViewClassInstanceL ( )

IMPORT_C CListBoxView *MakeViewClassInstanceL()[protected, virtual]

Creates the list box view.

The function is called by ConstructL() to create an instance of the appropriate list box view class for this list box. The returned instance is owned by this object, and does not have to have its second-phase constructor run. This function is called by CreateViewL().

Returns: Pointer to a newly constructed list box view for this object.

MakeVisible ( TBool )

IMPORT_C voidMakeVisible(TBoolaVisible)[virtual]

Sets this control as visible or invisible.

Since
5.2
ParameterDescription
aVisibleETrue to make the control visible, EFalse to make it invisible.

MatchBuffer ( )

IMPORT_C RIncrMatcherBase *MatchBuffer()const [protected]

Gets a pointer to the match buffer. Returns NULL if the match buffer does not exist.

Returns: Pointer to the match buffer.

MatchTypedCharL ( TUint )

IMPORT_C voidMatchTypedCharL(TUintaCode)[protected]

Checks matching for the given character.

ParameterDescription
aCodeCharacter code.

MinimumSize ( )

IMPORT_C TSizeMinimumSize()[virtual]

Reimplemented from CCoeControl::MinimumSize()

Checks the minimum size needed for the list box.

Returns: The two dimensional minimum size for the list box.

Model ( )

IMPORT_C MListBoxModel *Model()const

Gets the list box data model.

Returns: Interface to the list box data model.

OfferKeyEventL ( const TKeyEvent &, TEventCode )

IMPORT_C TKeyResponseOfferKeyEventL(const TKeyEvent &aKeyEvent,
TEventCodeaType
)[virtual]

Informs the CEikListbox of a key press.

ParameterDescription
aKeyEventDetails of the key event that is being handled.
aTypeDefines what kind of key event is being handled e.g. EEventKeyUp.

Returns: EKeyWasConsumed if the key was handled by the method. EKeyWasNotConsumed if the key was not handled.

ReasonForFocusLostL ( )

IMPORT_C TReasonForFocusLostReasonForFocusLostL()[protected]

Gets the reason for the list box?s loss of focus.

Returns: The reason for the loss of focus.

RedrawItem ( TInt )

IMPORT_C voidRedrawItem(TIntaItemIndex)
Redraws list item.
Since
3.2
ParameterDescription
aItemIndexindex of item to be redrawn.

RemoveItemChangeObserver ( MListBoxItemChangeObserver * )

IMPORT_C TBoolRemoveItemChangeObserver(MListBoxItemChangeObserver *aObserver)

Removes an item change observer from the listbox.

Since
3.0
ParameterDescription
aObserverThe observer to be removed.

Returns: ETrue if removal ok, EFalse if observer was not removed (not found from the list of observers).

RemoveSelectionObserver ( MListBoxSelectionObserver * )

IMPORT_C voidRemoveSelectionObserver(MListBoxSelectionObserver *aObserver)

Removes a selection (item marking) observer from the listbox.

Since
3.2
ParameterDescription
aObserverThe observer to be removed.

ReportListBoxEventL ( MEikListBoxObserver::TListBoxEvent )

IMPORT_C voidReportListBoxEventL(MEikListBoxObserver::TListBoxEventaEvent)[protected, virtual]

Reports a list box event to any observer of this list box. This function returns immediately if no observer is set.

ParameterDescription
aEventThe event to report.

Reset ( )

IMPORT_C voidReset()

Deletes the item editor

ResetItemEditor ( )

IMPORT_C voidResetItemEditor()

Resets the list boxes item editor.

RestoreClientRectFromViewRect ( TRect & )

IMPORT_C voidRestoreClientRectFromViewRect(TRect &aClientRect)const [protected, virtual]

Calculates the client area.

This method is called by various functions of this class to recalculate the extent of the client area from iViewRect. This implementation takes into account any rounding of the viewing rectangle made to fit a whole number of items.

ParameterDescription
aClientRectOn return contains a size for the client area in pixels.

RestoreCommonListBoxPropertiesL ( TResourceReader & )

IMPORT_C voidRestoreCommonListBoxPropertiesL(TResourceReader &aReader)[protected]

Restores the list box properties shared by all subclasses from a resource reader. This function is not called within CEikListBox itself, but is used by subclasses which support construction from resources.

ParameterDescription
aReaderA resource reader.

ScrollBarFrame ( )

IMPORT_C CEikScrollBarFrame *constScrollBarFrame()

Gets pointer for the scroll bar frame.

Returns: Pointer to the scroll bar frame.

ScrollToMakeItemVisible ( TInt )

IMPORT_C voidScrollToMakeItemVisible(TIntaItemIndex)const

Makes an item visible in the list, scrolling it if necessary.

ParameterDescription
aItemIndexIndex of the item to reveal.

ScrollingDisabled ( )

IMPORT_C TBoolScrollingDisabled()

Checks if the kinetic scrolling is currently enabled in the list.

Since
5.0

Returns: ETrue if kinetic scrolling is enabled, EFalse otherwise.

SelectionIndexes ( )

IMPORT_C const CListBoxView::CSelectionIndexArray *SelectionIndexes()const

Gets for list boxes selection indexes.

Returns: Pointer to the list boxes in array of selection indexes.

SetContainerWindowL ( const CCoeControl & )

IMPORT_C voidSetContainerWindowL(const CCoeControl &aContainer)[virtual]

Creates an own window for the list box or draws the list box to an old window defined by the aContainer.

ParameterDescription
aContainerDefines the container where the list box will be drawn.

SetCurrentItemIndex ( TInt )

IMPORT_C voidSetCurrentItemIndex(TIntaItemIndex)const

Changes the current item index to the selected item index. Does not redraw the list. If the item was not previously visible it is set to the top item in the view.

ParameterDescription
aItemIndexDefines the index of the selected item.

SetCurrentItemIndexAndDraw ( TInt )

IMPORT_C voidSetCurrentItemIndexAndDraw(TIntaItemIndex)const

Changes the current item index to the selected item index and redraws the view.

ParameterDescription
aItemIndexDefines the index of the selected item.

SetDimmed ( TBool )

IMPORT_C voidSetDimmed(TBoolaDimmed)[virtual]

This function sets a flag within the control which indicates whether or not the control is dimmed (greyed out).

ParameterDescription
aDimmedETrue dimmed. EFalse not dimmed.

SetHorizontalMargin ( TInt )

IMPORT_C voidSetHorizontalMargin(TIntaMargin)[protected]

Sets the horizontal margin.

ParameterDescription
aMarginThe required horizontal margin.

SetItemEditor ( MEikListBoxEditor * )

IMPORT_C voidSetItemEditor(MEikListBoxEditor *aEditor)

Selects an item editor for the list box.

ParameterDescription
aEditorThe editor that has been selected for usage.

SetItemHeightL ( TInt )

IMPORT_C voidSetItemHeightL(TIntaHeight)[virtual]

Sets the height of the item to the selected value.

ParameterDescription
aHeightNew height for the item.

SetItemsInSingleLine ( TInt )

IMPORT_C voidSetItemsInSingleLine(TIntaItems)

Sets the number of list items that form one grid line.

Since
S60 5.0
ParameterDescription
aItemsNumber of items in one grid line.

SetLaunchingButton ( CEikButtonBase * )

IMPORT_C voidSetLaunchingButton(CEikButtonBase *aButton)

Provides a call back mechanism to the button which just launched a popout menu.

ParameterDescription
aButtonThe button which just launched a popout menu.

SetListBoxObserver ( MEikListBoxObserver * )

IMPORT_C voidSetListBoxObserver(MEikListBoxObserver *aObserver)

Sets the observer for the list box.

ParameterDescription
aObserverWanted observer for the list box.

SetMarkingMode ( TBool )

IMPORT_C voidSetMarkingMode(TBoolaEnable)

Turns the marking mode on / off.

Since
S60 5.2
ParameterDescription
aEnableETrue to turn marking mode on EFalse to turn marking mode off

SetMarkingModeObserver ( MAknMarkingModeObserver * )

IMPORT_C voidSetMarkingModeObserver(MAknMarkingModeObserver *aObserver)

Sets the marking mode observer.

Since
S60 5.2
ParameterDescription
aObserverMarking mode observer, NULL removes the existing observer.

SetPointerEventFilterDisabledL ( const CArrayFix< TInt > & )

IMPORT_C voidSetPointerEventFilterDisabledL(const CArrayFix< TInt > &aItemIndexes)

Removes pointer event filtering for list items.

When there are two pointer up events on the same item at short interval, listbox will only get the first one and drop the second one. This method forces listbox to handle all pointer up events.

Since
S60 5.0
ParameterDescription
aItemIndexesArray of item indexes to be added.

SetReasonForFocusLostL ( TReasonForFocusLost )

IMPORT_C voidSetReasonForFocusLostL(TReasonForFocusLostaReasonForFocusLost)[protected]

Sets the reason for the list box?s loss of focus.

This is required so the list box can determine whether loss of focus is due to an external control or an internal component.

ParameterDescription
aReasonForFocusLostThe reason for the loss of focus.

SetScrollBarFrame ( CEikScrollBarFrame *, TScrollBarOwnerShip )

IMPORT_C voidSetScrollBarFrame(CEikScrollBarFrame *aScrollBarFrame,
TScrollBarOwnerShipaOwnerShip
)

Sets the given scroll bar frame for the list box with the given ownership leve.

ParameterDescription
aScrollBarFrameThe new frame that is going to be used.
aOwnerShipOwnership level of the scroll bar frame.

SetSelectionIndexesL ( CListBoxView::CSelectionIndexArray * )

IMPORT_C voidSetSelectionIndexesL(CListBoxView::CSelectionIndexArray *aArrayOfSelectionIndexes)

Assigns a array of selection indexes for the list box.

ParameterDescription
aArrayOfSelectionIndexesThe index array that is to be assigned to the list Box.

SetShortcutValueFromPrevList ( TInt )

IMPORT_C voidSetShortcutValueFromPrevList(TIntaValue)[virtual]

No Implementation.

ParameterDescription
aValueNot Used.

SetTopItemIndex ( TInt )

IMPORT_C voidSetTopItemIndex(TIntaItemIndex)const [virtual]

Sets the selected item to be the top item.

ParameterDescription
aItemIndexIndex for the item to be set as the top item.

SetVerticalMargin ( TInt )

IMPORT_C voidSetVerticalMargin(TIntaMargin)[protected]

Sets the vertical margin.

ParameterDescription
aMarginThe required vertical margin.

SetViewRectFromClientRect ( const TRect & )

IMPORT_C voidSetViewRectFromClientRect(const TRect &aClientRect)[protected]

Sets the view rectangle from the client rectangle making sure a whole number of items is displayed.

ParameterDescription
aClientRectThe client rectangle

SetViewRectHeightAdjustment ( TInt )

IMPORT_C voidSetViewRectHeightAdjustment(TIntaAdjustment)[protected]

Sets the view rectangle height adjustment.

ParameterDescription
aAdjustmentNew adjustment.

ShortcutValueForNextList ( )

IMPORT_C TIntShortcutValueForNextList()[virtual]

No Implementation.

Returns: Always returns 0.

SimulateArrowKeyEventL ( TKeyCode )

IMPORT_C voidSimulateArrowKeyEventL(TKeyCodeaKeyCode)[protected]

Simulates an arrow key event.

If the list box flags include EMultipleSelection, this has the effect of pressing SHIFT with the arrow key represented by aKeyCode. Calls CEikListBox::OfferKeyEventL() with aKeyCode translated into a key event.

ParameterDescription
aKeyCodeA key code.

SizeChanged ( )

IMPORT_C voidSizeChanged()[protected, virtual]

Reimplemented from CCoeControl::SizeChanged()

Responds to changes to the size and position of the contents of this control.

For a simple control this might include text or graphics. For a compound control it sets the size and position of the components. It has an empty default implementation and should be implemented by the CCoeControl-derived class.

The function is called whenever SetExtent(), SetSize(), SetRect(), SetCornerAndSize(), or SetExtentToWholeScreen() are called on the control. Note that the window server does not generate size-changed events: SizeChanged() gets called only as a result of calling the functions listed above. Therefore, if a resize of one control affects the size of other controls, it is up to the application to ensure that it handles the re-sizing of all affected controls.

StopEditingL ( TBool )

IMPORT_C voidStopEditingL(TBoolaUpdateModel)

Stops editing and deletes the item editor.

The function reports an EEventEditingStopped event to any list box observer, and updates the list box model if aUpdateModel is ETrue.

ParameterDescription
aUpdateModelIf ETrue the list box model is updated.

SuspendEffects ( TBool )

IMPORT_C voidSuspendEffects(TBoolaSuspend)

Suspends transitions effects.

Since
S60 5.0
ParameterDescription
aSuspendETrue to suspend effects, EFalse to re-enable them.

TopItemIndex ( )

IMPORT_C TIntTopItemIndex()const

Gets the index number of the top item.

Returns: Index number for the top item.

UndoLastChar ( )

IMPORT_C voidUndoLastChar()[protected]

Undoes changes from the match buffer that have been caused by the last match with a character.

UpdateCurrentItem ( TInt )

IMPORT_C voidUpdateCurrentItem(TIntaItemIndex)const [protected, virtual]

Sets an item as the current item, even if it is not currently visible. Redraws the list box to reflect the change. This should not be called from within another Draw function.

ParameterDescription
aItemIndexThe index of the list box item to update.

UpdateItemDrawerColors ( )

IMPORT_C voidUpdateItemDrawerColors()[protected]

Updates the item drawer colours in line with the colours in effect for the Uikon environment. Has no effect if there is no item drawer.

UpdateMarkUnmarkMSKL ( )

voidUpdateMarkUnmarkMSKL()const [protected]

If MiddleSoftKey is either Mark or Unmark, this method sets MSK according to the current item selection state.

UpdateScrollBarThumbs ( )

IMPORT_C voidUpdateScrollBarThumbs()const [protected, virtual]

Updates the position of this list box?s scroll bars? thumbs to reflect the horizontal and vertical position of the list view within the list.

UpdateScrollBarsL ( )

IMPORT_C voidUpdateScrollBarsL()[virtual]

Updates all scroll bars.

UpdateViewColors ( )

IMPORT_C voidUpdateViewColors()[protected]

Updates the view colours in line with the colours in effect for the Uikon environment. Has no effect if there is no view.

VerticalInterItemGap ( )

IMPORT_C TIntVerticalInterItemGap()const

Gets the size of the vertical gap between items. This space is used by the view to allow a box to be drawn around each item.

Returns: Size of the vertical gap in pixels.

VerticalMargin ( )

IMPORT_C TIntVerticalMargin()const [protected]

This function gets the vertical margin. This function is deprecated, use CEikListBox::ListBoxMargins() instead, this provides a more accurate value due to the bit shifting involved.

DeprecatedUse CEikListBox::ListBoxMargins()

Returns: The vertical margin in pixels.

View ( )

IMPORT_C CListBoxView *View()const

Gets the list box view.

Returns: Interface to the list box view.

ViewRectHeightAdjustment ( )

IMPORT_C TIntViewRectHeightAdjustment()const [protected]

Gets the view rectangle height adjustment.

These are the adjustments that were made to the view rectangle when the SetViewRectFromClientRect() function was called.

Returns: Height adjustment.