UIQ Technology
 Developer Library

UIQ 3 SDK

UIQ developer portal

FEEDBACK 

[Index] [Spacer] [Previous] [Next]



Location: QikListBox.h
Link against: qiklbx.lib

Class CQikListBox

class CQikListBox : public CCoeControl, public MEikScrollBarObserver, public MQikCommandListOwner, public MQikCommandHandler;

Description

Primary API for access to the graphical listbox control.

All data is transparently stored in a model, hiding the complexity for simple usage of the listbox. More advanced users with great amounts of data will have to create their own model since the basic standard model is optimized for small amounts of data. A custom model must inherit from MQikListBoxModel .

The listbox uses two standard views to draw the listbox content in a row listbox or grid listbox, it is designed to allow custom implementations of any type of view as well. Runtime view switching is supported but the listbox can only have one view at the time, the application needs to implement it's own list of views if needed.

Each data entry is presented as an item in the view, each item can have two different layouts attached, that draws the item differently depending on if it is highlighted or not. I.e. fisheye. In the common case all items will use the same layouts but it is possible to set different layouts for each item as well.

An ornament can be used for adding additional graphical effects for each layout.

The user of a listbox might want to have a different string for the select command, such as view, choose, or edit. The correct way of changing the text is to change it in your view by inheriting DynInitOrDeleteCommandL. Switch on the Id() and change the text using an appropriate resource string (for i18n / l10n reasons).

Example:

CQikCommand* CYourView::DynInitOrDeleteCommandL(CQikCommand* aCommand, const CCoeControl& aControlAddingCommands)
    {
    switch(aCommand->Id())
        {
        case EQikListBoxCmdSelect:
            {
            aCommand->SetTextL(iYourResource); // Add with resource to support i18n / l10n
            break;
            }

        default:
            break;
        }
    return aCommand;
    }

Using listboxes in building blocks.

It's possible to use a listbox inside a building block, but it is not supported in UIQ 3.0. If you plan on doing it anyway, be aware of the following problems:

Both the building blocks and the listbox wants key up and key down events. The listbox will not work when there is no touch screen unless extra care is taken when designing the solution. A custom building block might be needed.

Derivation

Members

Defined in CQikListBox:
ActivateL(), AddLayoutL(), AddLayoutL(), AddLayoutL(), CQikListBox(), ClearMatchBufferL(), ClearSelectionL(), ComponentControl(), ConstructFromResourceL(), ConstructFromResourceL(), ConstructL(), ConstructL(), CountComponentControls(), CurrentIncrementalMatchBuffer(), CurrentItemIndex(), DefaultLayoutId(), EHighlightedItem, FocusChanged(), GetColorUseListL(), GetHelpContext(), GetIncrementalMatching(), GetLayout(), GetTextDrawer(), HScrollBarVisibility(), HandleAttemptDimmedSelectionL(), HandleCommandL(), HandleControlArrayEventL(), HandlePointerBufferReadyL(), HandlePointerEventL(), HandleResourceChange(), HasBorder(), HasHighlight(), HasMultipleSelect(), InputCapabilities(), IsItemSelected(), IsItemVisible(), ItemCount(), ItemIdL(), LayoutCount(), LayoutUpdatedL(), LoopingEnabled(), MakeVisible(), MapCommandHandler(), Margins(), MinimumSize(), Mirroring(), Model(), MopSupplyObject(), OfferKeyEventL(), PositionChanged(), PrepareForFocusGainL(), PrepareForFocusLossL(), RemoveAllItemsL(), RemoveItemL(), RemoveLayout(), ReplaceLayoutL(), ReportListBoxEventL(), RequestRelayout(), ResetL(), SelectionIndexes(), SetAdjacent(), SetContainerWindowL(), SetCurrentAndTopItemIndexL(), SetCurrentItemIndexL(), SetDefaultLayoutIdL(), SetDimmed(), SetHighlightEnabledL(), SetIncrementalMatching(), SetItemIdL(), SetItemSelectedL(), SetLayoutManagerL(), SetListBoxObserver(), SetLoopingEnabled(), SetMargins(), SetMirroring(), SetModelL(), SetMultipleSelectL(), SetNeighbor(), SetParent(), SetScrollBarVisibility(), SetSelectionIndexesL(), SetTextBaselineSpacing(), SetViewL(), SetViewL(), SortL(), TListBoxTextDrawerKeys, TextBaselineOffset(), TopItemIndex(), VScrollBarVisibility(), View(), View(), ~CQikListBox()

Inherited from CBase:
Delete(), Extension_(), operator new()

Inherited from CCoeControl:
AccumulatedZoom(), ActivateGc(), BackedUpWindow(), Background(), CapturesPointer(), ClaimPointerGrab(), CloseWindow(), Components(), ControlContext(), ControlEnv(), CopyControlContextFrom(), CreateBackedUpWindowL(), CreateWindowL(), DeactivateGc(), DrawBackground(), DrawDeferred(), DrawForeground(), DrawNow(), DrawableWindow(), EAbsoluteZoom, ERelativeZoom, EnableDragEvents(), FindBackground(), FindFontProvider(), GetColor(), GetGc(), GrabbingComponent(), HandleComponentControlsResourceChange(), HandleRedrawEvent(), HitTest(), IgnoreEventsUntilNextPointerUp(), Index(), InitComponentArrayL(), IsActivated(), IsBackedUp(), IsBeingDestroyed(), IsBlank(), IsDimmed(), IsFocused(), IsNonFocusing(), IsReadyToDraw(), IsVisible(), LayoutManager(), MaximumWidth(), Observer(), OverrideColorL(), OwnsWindow(), Parent(), Position(), PositionRelativeToScreen(), Rect(), RecursivelyMergedInputCapabilities(), ReportEventL(), Reserved_CCoeControl_10(), Reserved_CCoeControl_11(), Reserved_CCoeControl_12(), Reserved_CCoeControl_13(), ResetGc(), ScreenFont(), SetAllowStrayPointers(), SetBackground(), SetBlank(), SetCanDrawOutsideRect(), SetComponentsToInheritVisibility(), SetControlContext(), SetCornerAndSize(), SetExtent(), SetExtentToWholeScreen(), SetFocus(), SetFocusing(), SetFontProviderL(), SetGc(), SetGloballyCapturing(), SetHitTest(), SetMaximumWidth(), SetMopParent(), SetNonFocusing(), SetObserver(), SetPointerCapture(), SetPosition(), SetRect(), SetSize(), SetSizeWithoutNotification(), SetUniqueHandle(), SetZoomFactorL(), Size(), SizeChanged(), SystemGc(), TZoomType, TextDrawer(), UniqueHandle(), Window(), WriteInternalStateL(), ZoomWithType(), iCoeEnv, iContext, iPosition, iSize

Inherited from MEikScrollBarObserver:
HandleScrollEventL()

Inherited from MObjectProvider:
MopGetObject(), MopGetObjectNoChaining()

See also:


Construction and destruction


CQikListBox()

IMPORT_C CQikListBox();

Description

Constructor.


~CQikListBox()

IMPORT_C ~CQikListBox();

Description

Destructor.


ConstructL()

IMPORT_C void ConstructL();

Description

Constructs a ListBox with the default model and column ListBox view. Default values for all other settings are used.

See also:


ConstructL()

IMPORT_C void ConstructL(MQikListBoxModel *aModel, CQikListBoxViewBase *aView);

Description

Constructs a ListBox with the specified model and view. The view and model supplied is taken ownership of by the class.

The model and view needs to be fully constructed before calling this method.

! Need to give this the right behavior, as we turn on pointer grab from the window which owns us.

Parameters

MQikListBoxModel *aModel

The data model, if NULL the default model is created.

CQikListBoxViewBase *aView

The ListBox view, if NULL a ListBox row view is created.

[Top]


Member functions


ConstructFromResourceL()

virtual IMPORT_C void ConstructFromResourceL(TResourceReader &aReader);

Description

Constructs a ListBox from a resource.

Parameters

TResourceReader &aReader

The resource reader.


ConstructFromResourceL()

IMPORT_C void ConstructFromResourceL(TResourceReader &aReader, MQikListBoxModel *aModel, CQikListBoxViewBase *aView);

Description

Constructs a ListBox from a resource.

The view and model is taken ownership of.

! Need to give this the right behavior, as we turn on pointer grab from the window which owns us.

Parameters

TResourceReader &aReader

The resource reader.

MQikListBoxModel *aModel

A user supplied model or NULL

CQikListBoxViewBase *aView

A user supplied view which hasn't been constructed from resource yet. Will be added (ownership transfered) and constructed from resource. Should only be supplied if the type is EQikCustomListBox.

Panic codes

EQikListBoxPanicModelIsNotNull

This objects model do exists before this method is called (debug build only).

EQikListBoxPanicViewIsNotNull

This objects view do exists before this method is called (debug build only).


OfferKeyEventL()

virtual IMPORT_C TKeyResponse OfferKeyEventL(const TKeyEvent &aKeyEvent, TEventCode aType);

Description

The key event will be offered to the view if the control is focus able.

Parameters

const TKeyEvent &aKeyEvent

The key event.

TEventCode aType

The type of key event: EEventKey, EEventKeyUp or EEventKeyDown.

Return value

TKeyResponse

Indicates whether or not the key event was used by this control.

See also:


HandlePointerEventL()

virtual IMPORT_C void HandlePointerEventL(const TPointerEvent &aPointerEvent);

Description

Handles pointer events that occur in the control.

Parameters

const TPointerEvent &aPointerEvent

The pointer event.

See also:


SetDimmed()

virtual IMPORT_C void SetDimmed(TBool aDimmed);

Description

This function sets a flag within the control which indicates whether or not the control is dimmed (greyed out). This is typically used to show that the control is temporarily unavailable. Note that this method unlike CCoeControl::SetDimmed() initiates a redraw by calling DrawDeferred().

When the ListBox is dimmed it will not handle any commands through CQikListBox::HandleCommandL, instead a MCoeControlObserver::EEventInteractionRefused event will be reported.

Parameters

TBool aDimmed

ETrue to dim the control, EFalse to set the control as not dimmed.

See also:


PrepareForFocusLossL()

virtual IMPORT_C void PrepareForFocusLossL();

Description

Prepares the control for loss of focus by removing the commands.

This function is called immediately before focus is removed from a control.

See also:


PrepareForFocusGainL()

virtual IMPORT_C void PrepareForFocusGainL();

Description

Prepares the control for gaining focus by adding the commands.

This function is called immediately before a control is focused.

See also:


GetColorUseListL()

virtual IMPORT_C void GetColorUseListL(CArrayFix< TCoeColorUse > &aColorUseList) const;

Description

Parameters

CArrayFix< TCoeColorUse > &aColorUseList

The colour list.

See also:


HandleResourceChange()

virtual IMPORT_C void HandleResourceChange(TInt aType);

Description

Handles a change to the control's resources.

Parameters

TInt aType

A message UID value.

See also:


InputCapabilities()

virtual IMPORT_C TCoeInputCapabilities InputCapabilities() const;

Description

Gets the control's input capabilities.

Return value

TCoeInputCapabilities

The control's input capabilities.

See also:


MinimumSize()

virtual IMPORT_C TSize MinimumSize();

Description

Returns minimum size of the listbox.

Return value

TSize

The minimum size of the listbox.


CountComponentControls()

virtual IMPORT_C TInt CountComponentControls() const;

Description

Return value

TInt

See also:


ComponentControl()

virtual IMPORT_C CCoeControl *ComponentControl(TInt aIndex) const;

Description

Parameters

TInt aIndex

Return value

CCoeControl *

See also:


SetModelL()

IMPORT_C void SetModelL(MQikListBoxModel *aNewModel);

Description

Sets a new model on the listbox. The old model will get a ReleaseModel() call. Takes ownership in the sense that the model will get a ReleaseModel() call if it is replaced again or the listbox is deleted.

Parameters

MQikListBoxModel *aNewModel

The new model to be added.

Panic codes

EQikListBoxPanicModelIsNull

aNewModel is NULL (debug build only).

The

current model is NULL (debug build only).


AddLayoutL()

IMPORT_C TInt AddLayoutL(CQikListBoxLayoutPair *aLayoutPair);

Description

Adds a new layout pair to the ListBox. Takes ownership of the layout pair.

Parameters

CQikListBoxLayoutPair *aLayoutPair

The layout pair

Return value

TInt

The new layout index

Panic codes

EQikListBoxPanicLayoutIsNull

The parameter aLayoutPair is NULL (debug build only).

EQikListBoxPanicLayoutIsNull

The parameter aLayoutPair::NormalLayout is NULL (debug build only).

See also:


AddLayoutL()

IMPORT_C TInt AddLayoutL(TQikListBoxStandardLayout aNormalLayout);

Description

Adds layout pair to the ListBox in which the normal layout is the layout corresponding to aNormalLayout and the highlight layout is NULL.

Parameters

TQikListBoxStandardLayout aNormalLayout

The enum of the standard layout to be used as normal layout.

Return value

TInt

The new layout index/id.

See also:


AddLayoutL()

IMPORT_C TInt AddLayoutL(TQikListBoxStandardLayout aNormalLayout, TQikListBoxStandardLayout aHighlightLayout);

Description

Adds layout pair to the ListBox where the normal layout is the standard layout corresponding to aNormalLayout and the highlight layout is the standard layout corresponding to aHighlightLayout.

Parameters

TQikListBoxStandardLayout aNormalLayout

The enum of the normal layout to create.

TQikListBoxStandardLayout aHighlightLayout

The enum of the highlight layout to create.

Return value

TInt

The new layout index/id.

See also:


ReplaceLayoutL()

IMPORT_C void ReplaceLayoutL(CQikListBoxLayoutPair *aLayoutPair, TInt aIndex);

Description

Replaces an existing layout pair in the ListBox. Deletes the old layout pair. Ownership of aLayoutPair is taken in the beginning of this function, hence aLayoutPair should not be owned by the calling object or be pushed to cleanup stack before call.

Parameters

CQikListBoxLayoutPair *aLayoutPair

The new layout pair

TInt aIndex

index/id of The layout pair that will be replaced

Panic codes

EQikListBoxPanicLayoutIsNull

The parameter aLayoutPair is NULL (debug build only).

EQikListBoxPanicLayoutIsNull

The parameter aLayoutPair::NormalLayout is NULL (debug build only).

EQikListBoxPanicInvalidLayoutIndex

The parameter aIndex is out of bounds (debug build only).

See also:


RemoveLayout()

IMPORT_C CQikListBoxLayoutPair *RemoveLayout(TInt aIndex);

Description

Removes an existing layout pair in the ListBox. Transfers ownership of the return pair to the caller. There should be at least one layout left, i.e the last layout should not be removed. A ListBox without at least one layout is in an uncertain state.

Parameters

TInt aIndex

Index/id of the layout pair that will be removed.

Return value

CQikListBoxLayoutPair *

A pointer to the CQikListBoxLayoutPair that was removed from the ListBox, or NULL if the layout could not be removed.

Panic codes

EQikListBoxPanicInvalidLayoutIndex

The paramter aIndex is out of bounds.

See also:


LayoutCount()

IMPORT_C TInt LayoutCount() const;

Description

Counts the number of layout pairs currently owned by this ListBox.

Return value

TInt

The number of layout pairs currently owned by this ListBox.

See also:


SetDefaultLayoutIdL()

IMPORT_C void SetDefaultLayoutIdL(TInt aLayoutId);

Description

Sets the default layout and updates the listbox.

It is up to the caller to make sure the layout set has been previously added.

Parameters

TInt aLayoutId

The id/index of the layout that will be default layout. This id is the id/index a layout got when it was added to the listbox, as returned by the AddLayout method or assigned at construction from resource.


DefaultLayoutId()

IMPORT_C TInt DefaultLayoutId() const;

Description

Gets the default layout.

Return value

TInt

The default layout.


LayoutUpdatedL()

IMPORT_C void LayoutUpdatedL();

Description

Updates the view after layout has been changed. Should be called if the layout has been manually edited.


RemoveItemL()

IMPORT_C void RemoveItemL(TInt aItemIndex);

Description

Removes an item from the ListBox and deletes the item data.

Note that this method includes calls to MQikListBoxModel::ModelBeginUpdateLC and MQikListBoxModel::ModelEndUpdateL .

Parameters

TInt aItemIndex

The item that will be removed. The position is relative to zero, i.e. zero implies at the beginning of the array. This value must not be negative and must be lesser than the number of object pointers currently in the ListBox model.

Panic codes

EQikListBoxPanicModelIsNull

The model is NULL (debug build only).

EQikListBoxPanicInvalidItemIndex

The parameter aItemIndex is greater than the number of object pointers currently in the model (debug build only).


RemoveAllItemsL()

IMPORT_C void RemoveAllItemsL();

Description

Removes all items from the ListBox and deletes the item's data.

Calls the models RemoveAllDataL.

Panic codes

EQikListBoxPanicModelIsNull

The model is NULL (debug build only).

See also:


ItemCount()

IMPORT_C TInt ItemCount() const;

Description

Get the number of data items.

Return value

TInt

The number of data items.

Panic codes

EQikListBoxPanicModelIsNull

The model is NULL (debug build only).

See also:


SetViewL()

IMPORT_C CQikListBoxViewBase *SetViewL(CQikListBoxViewBase *aView);

Description

Switches to another view. The ListBox takes ownership of the new view and the application is given back the ownership of the old view. The application is also responsible for constructing the new view as well as activating it before this function is called.

The standard behavior is that current item remains when switching views. To set the current item to 0 for example during the view switch, simply call SetCurrentItemIndexL(0,EFalse,ENoDrawNow) before the SetViewL function is called.

Parameters

CQikListBoxViewBase *aView

The new view. Ownership taken at end of funtion.

Return value

CQikListBoxViewBase *

The old view. The reciever must take ownership of the view.

Panic codes

EQikListBoxPanicViewIsNull

The view is NULL (debug build only).

See also:


SetViewL()

IMPORT_C CQikListBoxViewBase *SetViewL(CQikListBoxViewBase *aView, RPointerArray< CQikListBoxLayoutPair > *aLayoutPairArray, RArray< TInt > *aIndexArray);

Description

Switches to another view. The ListBox takes ownership of the new view and the application is given back the ownership of the old view. The application is also responsible for constructing the new view as well as activating it before this function is called.

The standard behavior is that current item remains when switching views. To set the current item to 0 for example during the view switch, simply call SetCurrentItemIndexL(0,EFalse,ENoDrawNow) before the SetViewL function is called.

An array of layoutpairs and layoutid's should be passed as this method also changes layouts. If only the view should be switched and not the layouts, CQikListBox::SetViewL(CQikListBoxViewBase* aView) should be used instead.

Ownership of aView is taken at the end of the function, while ownership of aLayoutPairArray and aIndexArray is taken in the beginning. This means that if the function leaves aLayoutPairArray and aIndexArray is destroyed while the caller still has ownership of aView. In case of a leave the ListBox will keep it's old layout pairs and view.

Parameters

CQikListBoxViewBase *aView

The new view. Ownership taken at end of funtion.

RPointerArray< CQikListBoxLayoutPair > *aLayoutPairArray

An array of new layoutpairs. Ownership taken at beginning of function.

RArray< TInt > *aIndexArray

An array of the layoutid's to change. Ownership taken at beginning of function.

Return value

CQikListBoxViewBase *

The old view. The reciever must take ownership of the view.

Panic codes

EQikListBoxPanicViewIsNull

The view is NULL (debug build only).

See also:


GetLayout()

IMPORT_C CQikListBoxLayoutPair *GetLayout(TInt aIndex) const;

Description

Returns a pointer to the layout pair at the specified index.

Parameters

TInt aIndex

The index of the the layout pair to be retrieved.

Return value

CQikListBoxLayoutPair *

Panic codes

EQikListBoxPanicInvalidLayoutIndex

The parameter aIndex is out of bounds (debug build only).


Model()

IMPORT_C MQikListBoxModel &Model() const;

Description

Returns the ListBox data model.

Return value

MQikListBoxModel &

The data model

Panic codes

EQikListBoxPanicModelIsNull

The model is NULL (debug build only).


View()

IMPORT_C const CQikListBoxViewBase *View() const;

Description

Returns the ListBox view.

Return value

const CQikListBoxViewBase *

The ListBox view.


View()

IMPORT_C CQikListBoxViewBase *View();

Description

Returns the ListBox view.

Return value

CQikListBoxViewBase *

The ListBox view.


CurrentItemIndex()

IMPORT_C TInt CurrentItemIndex() const;

Description

Returns the index of the item currently highlighted.

Return value

TInt

The current item index


TopItemIndex()

IMPORT_C TInt TopItemIndex() const;

Description

Returns the index of the top most item shown in a page.

Return value

TInt

The top item index.


SetCurrentItemIndexL()

IMPORT_C void SetCurrentItemIndexL(TInt aItemIndex, TBool aMoveToCurrent, TDrawNow aDrawNow);

Description

Set current item index and optionally updates the view.

Parameters

TInt aItemIndex

The item to highlight

TBool aMoveToCurrent

ETrue makes selected item visible in view

TDrawNow aDrawNow

Deprecated. The ListBox internally decides whether a redraw is necessary or not.


SetCurrentAndTopItemIndexL()

IMPORT_C void SetCurrentAndTopItemIndexL(TInt aItemIndex, TInt aTopItemIndex, TDrawNow aDrawNow);

Description

Set current item index and top index and optionally updates the view.

Parameters

TInt aItemIndex

The first item in view.

TInt aTopItemIndex

TDrawNow aDrawNow

Deprecated. The ListBox internally decides whether a redraw is necessary or not.


IsItemVisible()

IMPORT_C TBool IsItemVisible(TInt aItemIndex) const;

Description

Returns whether the specified item is currently visible in the ListBox.

Parameters

TInt aItemIndex

The item index

Return value

TBool

ETrue if the item is visible.


SelectionIndexes()

IMPORT_C const RArray< TInt > &SelectionIndexes() const;

Description

Returns the ListBox item indexes for all items currently selected.

Return value

const RArray< TInt > &

An array of items which are currently selected.


SetSelectionIndexesL()

IMPORT_C void SetSelectionIndexesL(const RArray< TInt > &aArrayOfSelectionIndexes);

Description

Sets the ListBox selection index list.

Parameters

const RArray< TInt > &aArrayOfSelectionIndexes

New list of selected item indexes.


ClearSelectionL()

IMPORT_C void ClearSelectionL();

Description

Clears all current selections.


IsItemSelected()

IMPORT_C TBool IsItemSelected(TInt aItemIndex) const;

Description

Returns the current selection state of an item.

Parameters

TInt aItemIndex

The item index.

Return value

TBool

ETrue if the item is selected.


SetItemSelectedL()

IMPORT_C void SetItemSelectedL(TInt aItemIndex, TBool aSelected, TBool aReportSelectionChanged);

Description

Sets the selection state of the specified item. If the selection state is set to ETrue , the item will be selected and EFalse consequently deselects it.

Parameters

TInt aItemIndex

The item index

TBool aSelected

If ETrue the item is selected, if EFalse it is deselected.

TBool aReportSelectionChanged

If ETrue, a ListBox changed selection event is sent to the observer.

See also:


ResetL()

IMPORT_C void ResetL();

Description

Reset the state of the ListBox. Removes all multiple selections and clears match buffer.


VScrollBarVisibility()

IMPORT_C CEikScrollBarFrame::TScrollBarVisibility VScrollBarVisibility() const;

Description

Returns the current settings vertical scrollbar.

Return value

CEikScrollBarFrame::TScrollBarVisibility

On, off or auto.


HScrollBarVisibility()

IMPORT_C CEikScrollBarFrame::TScrollBarVisibility HScrollBarVisibility() const;

Description

Returns the current settings vertical scrollbar.

Return value

CEikScrollBarFrame::TScrollBarVisibility

On, off or auto.


SetScrollBarVisibility()

IMPORT_C void SetScrollBarVisibility(CEikScrollBarFrame::TScrollBarVisibility aVScrollBarVisibility, CEikScrollBarFrame::TScrollBarVisibility aHScrollBarVisibility);

Description

Settings for using vertical or horizontal scrollbar.

The auto setting only shows the scrollbar if necessary.

The ListBox View to use should state in its documentation which scrollbars it supports. Setting visibility setting on an unsupported scrollbar yields no effect.

Parameters

CEikScrollBarFrame::TScrollBarVisibility aVScrollBarVisibility

Setting for the vertical scrollbar, On, off or auto.

CEikScrollBarFrame::TScrollBarVisibility aHScrollBarVisibility

Setting for the horizontal scrollbar, On, off or auto.


SetListBoxObserver()

IMPORT_C void SetListBoxObserver(MQikListBoxObserver *aObserver);

Description

Sets the ListBox observer, only a single observer is supported. When a observer is registered it will recieve MQikListBoxObserver events. If no ListBox observer is registered the ListBox will report MCoeControlObserver::EEventStateChanged when an item is tapped (what would have been reported as MQikListBoxObserver::EEventItemTapped) or confirmed (what would have been reported as MQikListBoxObserver::EEventItemConfirmed).

Parameters

MQikListBoxObserver *aObserver

The ListBox observer.

See also:


SortL()

IMPORT_C void SortL(TLinearOrder< MQikListBoxData > aOrder);

Description

Sorts the items in the ListBox.

Note that this method includes calls to MQikListBoxModel::ModelBeginUpdateLC and MQikListBoxModel::ModelEndUpdateL .

The application must provide the comparison function.

Parameters

TLinearOrder< MQikListBoxData > aOrder

See also:


HasMultipleSelect()

IMPORT_C TBool HasMultipleSelect() const;

Description

Checks if multiple select is enabled or not.

Return value

TBool

Non-zero if the listbox has multiple selection.


HasHighlight()

IMPORT_C TBool HasHighlight() const;

Description

Checks if highlight is enabled or not.

Return value

TBool

Non-zero if the listbox has highlight.


SetMultipleSelectL()

IMPORT_C void SetMultipleSelectL(TBool aMultiple);

Description

Turns multiple select on and off.

Parameters

TBool aMultiple

ETrue to turn on, EFalse to turn off.


SetHighlightEnabledL()

IMPORT_C void SetHighlightEnabledL(TBool aHighlight);

Description

Turns highlighting on and off. Not to be confused with highlighting an individual item.

Parameters

TBool aHighlight

ETrue to turn on, EFalse to turn off.


Margins()

IMPORT_C TMargins8 Margins() const;

Description

Returns the margins between the ListBox´ inner edge and the view's outer edge.

Return value

TMargins8

The margins


SetMargins()

IMPORT_C void SetMargins(const TMargins8 &aMargins);

Description

Sets the margins between the ListBox´ inner edge and the view's outer edge.

Parameters

const TMargins8 &aMargins

Numeric values in pixels


LoopingEnabled()

IMPORT_C TBool LoopingEnabled() const;

Description

Returns the setting for looping in the ListBox.

Return value

TBool

ETrue if looping is enabled.


SetLoopingEnabled()

IMPORT_C void SetLoopingEnabled(TQikListBoxProperty aLooping);

Description

Sets looping in the Lis