CEikFormattedCellListBox Class Reference

class CEikFormattedCellListBox : public CEikTextListBox

Avkon base class similar to uikon's column listbox.

  ListBox <>--> View ---> ItemDrawer ---> Model
  ListBox <>--> ItemDrawer <>---> Data
  ListBox <>--> Model <>---> MDesCArray <--- Array <>---> Engine

Content for list items are tab-separated strings.

See concrete classes derived from CEikFormattedCellListBox for details.

Starting from 3.0 listbox uses highlight animations. Starting and stopping animation is connected to focus events. To support highlight animations properly you have to make sure that the list has focus when it has 'visual focus'. Common issues:
  • In many cases list is in a container which sits on top of the control stack. The container receives all focus events and should hand them to the list too. E.g.
     void CContainer::FocusChanged( TDrawNow aDrawNow )
                     {
                     ... some code ...
                     if( iListBox )
                         iListBox->SetFocus( IsFocused(), aDrawNow );
                     }
  • When switching components programmatically, e.g. from one list to another in the same view, make sure that you remove focus from the other component.

  • In more complex cases you may have to add a dummy interceptor control to the top of control stack to hand focus events to list.

  • Make sure you handle resource changes correctly. If resource handle chain is solid it should reach CCoeControl::HandleResourceChange, which informs child components about resource change.

See methods CEikListBox::ConstructL() CEikTextListBox::SetItemTextArray() CEikFormattedCellListBoxData::SetIconArray()

Related flags for dialogs (avkon.hrh) EAknDialogSelectionList EAknDialogMenuList EAknDialogMultiselectionList

Check also: CAknSelectionListDialog (aknselectionlist.h) CAknMarkableListDialog (aknselectionlist.h) CAknPopupList (aknpopup.h) CAknListQueryDialog (aknquerydialog.h) CAknColumnListBox (aknlists.h)

avkon

Public Member Functions
CEikFormattedCellListBox()
IMPORT_C voidConstructFromResourceL(TResourceReader &)
IMPORT_C voidConstructL(const CCoeControl *, TInt)
IMPORT_C voidEnableExtendedDrawingL()
IMPORT_C voidEnableStretching(const TBool)
IMPORT_C voidFocusChanged(TDrawNow)
IMPORT_C voidGetColorUseListL(CArrayFix< TCoeColorUse > &)
IMPORT_C voidHandlePointerEventL(const TPointerEvent &)
IMPORT_C voidHandleResourceChange(TInt)
IMPORT_C voidHideSecondRow(const TBool)
IMPORT_C CFormattedCellListBoxItemDrawer *ItemDrawer()
IMPORT_C CListBoxView *MakeViewClassInstanceL()
IMPORT_C CTextListBoxModel *Model()
voidSetIconSizes()
IMPORT_C voidUseLogicalToVisualConversion(TBool)
Protected Member Functions
IMPORT_C TIntAdjustRectHeightToWholeNumberOfItems(TRect &)
IMPORT_C voidCreateItemDrawerL()
IMPORT_C TTypeUid::PtrMopSupplyObject(TTypeUid)
Private Member Functions
IMPORT_C voidCEikListBox_Reserved()
IMPORT_C void *ExtensionInterface(TUid)
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::CapturesPointer()const
CCoeControl::ClaimPointerGrab(TBool)
CCoeControl::ClaimPointerGrab(TInt,TBool)
CCoeControl::CloseWindow()
CCoeControl::ComponentArrayExists()const
CCoeControl::Components()
CCoeControl::Components()const
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::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)
CEikListBox::ActivateL()
CEikListBox::AddItemChangeObserverL(MListBoxItemChangeObserver *)
CEikListBox::AddSelectionObserverL(MListBoxSelectionObserver *)
CEikListBox::AdjustTopItemIndex()const
CEikListBox::BackColor()const
CEikListBox::BackgroundDrawingSuppressed()const
CEikListBox::BottomItemIndex()const
CEikListBox::Buffer()const
CEikListBox::CEikListBox()
CEikListBox::CalcHeightBasedOnNumOfItems(TInt)const
CEikListBox::CalcSizeInPixels(TInt,TInt)const
CEikListBox::CalcWidthBasedOnNumOfChars(TInt)const
CEikListBox::CalcWidthBasedOnRequiredItemWidth(TInt)const
CEikListBox::CalculatePopoutRect(TInt,TInt,TRect &,TInt)
CEikListBox::ChangeSelectionMode(TBool)
CEikListBox::CheckCreateBufferL()
CEikListBox::CheckCreateExtension()
CEikListBox::CheckCreateExtensionL()
CEikListBox::ClearMargins()const
CEikListBox::ClearMatchBuffer()const
CEikListBox::ClearSelection()
CEikListBox::ComponentControl(TInt)const
CEikListBox::ConstructL(MListBoxModel *,CListItemDrawer *,const CCoeControl *,TGulBorder,TInt)
CEikListBox::ConstructL(MListBoxModel *,CListItemDrawer *,const CCoeControl *,TInt)
CEikListBox::CountComponentControls()const
CEikListBox::CreateMatchBufferL()
CEikListBox::CreateScrollBarFrameL(TBool)
CEikListBox::CreateScrollBarFrameL(TBool,TBool)
CEikListBox::CreateScrollBarFrameL(TBool,TBool,TBool)
CEikListBox::CreateScrollBarFrameLayout(TEikScrollBarFrameLayout &)const
CEikListBox::CreateViewL()
CEikListBox::CurrentItemIndex()const
CEikListBox::DisableItemSpecificMenu()
CEikListBox::DisableScrolling(TBool)
CEikListBox::DisableSingleClick(TBool)
CEikListBox::DoShiftMSKMarkingL()
CEikListBox::Draw(const TRect &)const
CEikListBox::DrawItem(TInt)const
CEikListBox::DrawMatcherCursor()const
CEikListBox::EditItemL(TInt)
CEikListBox::EnableMSKObserver(TBool)
CEikListBox::EventModifiers()
CEikListBox::FireItemChange()
CEikListBox::HandleDragEventL(TPoint)
CEikListBox::HandleItemAdditionL()
CEikListBox::HandleItemAdditionL(CArrayFix< TInt > &)
CEikListBox::HandleItemRemovalL()
CEikListBox::HandleItemRemovalL(CArrayFix< TInt > &)
CEikListBox::HandleLeftArrowKeyL(CListBoxView::TSelectionMode)
CEikListBox::HandlePhysicsScrollEventL(TInt)
CEikListBox::HandleRightArrowKeyL(CListBoxView::TSelectionMode)
CEikListBox::HandleScrollEventL(CEikScrollBar *,TEikScrollEvent)
CEikListBox::HandleViewRectSizeChangeL()
CEikListBox::HighlightRect()const
CEikListBox::HorizScrollGranularityInPixels()const
CEikListBox::HorizontalMargin()const
CEikListBox::HorizontalNudgeValue()const
CEikListBox::InformMSKButtonGroupDeletion()
CEikListBox::InputCapabilities()const
CEikListBox::InterItemGap()
CEikListBox::IsMatchBuffer()const
CEikListBox::IsMultiselection()
CEikListBox::ItemEditor()
CEikListBox::ItemExists(TInt)const
CEikListBox::ItemHeight()const
CEikListBox::ItemsInSingleLine()const
CEikListBox::LastCharMatched()const
CEikListBox::ListBoxMargins()const
CEikListBox::MakeVisible(TBool)
CEikListBox::MatchBuffer()const
CEikListBox::MatchTypedCharL(TUint)
CEikListBox::MinimumSize()
CEikListBox::OfferKeyEventL(const TKeyEvent &,TEventCode)
CEikListBox::ReasonForFocusLostL()
CEikListBox::RedrawItem(TInt)
CEikListBox::RemoveItemChangeObserver(MListBoxItemChangeObserver *)
CEikListBox::RemoveSelectionObserver(MListBoxSelectionObserver *)
CEikListBox::ReportListBoxEventL(MEikListBoxObserver::TListBoxEvent)
CEikListBox::Reset()
CEikListBox::ResetItemEditor()
CEikListBox::RestoreClientRectFromViewRect(TRect &)const
CEikListBox::RestoreCommonListBoxPropertiesL(TResourceReader &)
CEikListBox::ScrollBarFrame()
CEikListBox::ScrollToMakeItemVisible(TInt)const
CEikListBox::ScrollingDisabled()
CEikListBox::SelectionIndexes()const
CEikListBox::SetContainerWindowL(const CCoeControl &)
CEikListBox::SetCurrentItemIndex(TInt)const
CEikListBox::SetCurrentItemIndexAndDraw(TInt)const
CEikListBox::SetDimmed(TBool)
CEikListBox::SetHorizontalMargin(TInt)
CEikListBox::SetItemEditor(MEikListBoxEditor *)
CEikListBox::SetItemHeightL(TInt)
CEikListBox::SetItemsInSingleLine(TInt)
CEikListBox::SetLaunchingButton(CEikButtonBase *)
CEikListBox::SetListBoxObserver(MEikListBoxObserver *)
CEikListBox::SetPointerEventFilterDisabledL(const CArrayFix< TInt > &)
CEikListBox::SetReasonForFocusLostL(TReasonForFocusLost)
CEikListBox::SetScrollBarFrame(CEikScrollBarFrame *,TScrollBarOwnerShip)
CEikListBox::SetSelectionIndexesL(CListBoxView::CSelectionIndexArray *)
CEikListBox::SetShortcutValueFromPrevList(TInt)
CEikListBox::SetTopItemIndex(TInt)const
CEikListBox::SetVerticalMargin(TInt)
CEikListBox::SetViewRectFromClientRect(const TRect &)
CEikListBox::SetViewRectHeightAdjustment(TInt)
CEikListBox::ShortcutValueForNextList()
CEikListBox::SimulateArrowKeyEventL(TKeyCode)
CEikListBox::SizeChanged()
CEikListBox::StopEditingL(TBool)
CEikListBox::SuspendEffects(TBool)
CEikListBox::TopItemIndex()const
CEikListBox::UndoLastChar()
CEikListBox::UpdateCurrentItem(TInt)const
CEikListBox::UpdateItemDrawerColors()
CEikListBox::UpdateMarkUnmarkMSKL()const
CEikListBox::UpdateScrollBarThumbs()const
CEikListBox::UpdateScrollBarsL()
CEikListBox::UpdateViewColors()
CEikListBox::VerticalInterItemGap()const
CEikListBox::VerticalMargin()const
CEikListBox::View()const
CEikListBox::ViewRectHeightAdjustment()const
CEikListBox::~CEikListBox()
CEikTextListBox::CEikTextListBox()
CEikTextListBox::WriteInternalStateL(RWriteStream &)const
CEikTextListBox::~CEikTextListBox()
Inherited Enumerations
CCoeControl:TZoomType
CEikListBox:@170
CEikListBox:TFlags
CEikListBox:TReasonForFocusLost
CEikListBox:TScrollBarOwnerShip
Private Attributes
TInt iSpare
Inherited Attributes
CCoeControl::iCoeEnv
CCoeControl::iContext
CCoeControl::iPosition
CCoeControl::iSize
CEikBorderedControl::iBorder
CEikListBox::iItemDrawer
CEikListBox::iItemHeight
CEikListBox::iLaunchingButton
CEikListBox::iListBoxFlags
CEikListBox::iListBoxObserver
CEikListBox::iModel
CEikListBox::iRequiredHeightInNumOfItems
CEikListBox::iSBFrame
CEikListBox::iSBFrameOwned
CEikListBox::iView
CEikTextListBox::iRequiredCellCharWidth

Constructor & Destructor Documentation

CEikFormattedCellListBox()

IMPORT_CCEikFormattedCellListBox()

C++ default constructor.

Member Functions Documentation

AdjustRectHeightToWholeNumberOfItems(TRect &)

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

From CEikListBox.

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

The number of pixels reduced.

Parameters

TRect & aRectThe rectangle to be modified.

CEikListBox_Reserved()

IMPORT_C voidCEikListBox_Reserved()[private, virtual]

ConstructFromResourceL(TResourceReader &)

IMPORT_C voidConstructFromResourceL(TResourceReader &aReader)[virtual]

Constructs list box from resource file. See LISTBOX resource definition.

Flags: EAknListBoxSelectionList, EAknListBoxMenuList, EAknListBoxMarkableList, EAknListBoxMultiselectionList, EAknListBoxViewerFlags

Parameters

TResourceReader & aReaderReference to resource reader TResourceReader object.

ConstructL(const CCoeControl *, TInt)

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

By default Symbian 2nd phase constructor is private. Must be called if resource data is not used.

Parameters

const CCoeControl * aParentPointer to CCoeControl class, parent control.
TInt aFlagsFlags for CEikListBox constructor. Possible flags : EAknListBoxSelectionList, EAknListBoxMenuList, EAknListBoxMarkableList, EAknListBoxMultiselectionList, EAknListBoxViewerFlags

CreateItemDrawerL()

IMPORT_C voidCreateItemDrawerL()[protected, virtual]

Creates item draver for the listbox.

EnableExtendedDrawingL()

IMPORT_C voidEnableExtendedDrawingL()

This method needs to be called to enable extended drawing features such as skinning, pictograph drawing and marquee text in the listbox draw routine.

Methods CEikFormattedCellListBox::ConstructL and CEikFormattedCellListBox::ConstructFromResourceL call this method. So, you only need to call this if your listbox implementation does not call either of those.

This method can be safely called more than once. Item drawer must be created before calling this method, or a panic is raised.

S60 2.6

panic

EAknPanicListBoxItemDrawerNotCreated Panics if the item drawer for the current class has not been defined.

EnableStretching(const TBool)

IMPORT_C voidEnableStretching(const TBoolaEnabled)

Enables/disables list stretching. When a list is stretched its second line is moved after the first line. This is intented for devices with a large screen. This feature might be set as default by a product specific flag.

Item drawer must be created before calling this method.

S60 3.1

Parameters

const TBool aEnabledETrue to enable list stretching.

ExtensionInterface(TUid)

IMPORT_C void *ExtensionInterface(TUidaInterface)[private, virtual]

Parameters

TUid aInterface

FocusChanged(TDrawNow)

IMPORT_C voidFocusChanged(TDrawNowaDrawNow)[virtual]

From CEikListBox.

Handles focus changes.

The function emphasizes or de-emphasizes the view as needed, and shows or hides the matcher cursor.

Parameters

TDrawNow aDrawNowIf EDrawNow, a redraw is performed immediately.

GetColorUseListL(CArrayFix< TCoeColorUse > &)

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

From CCoeControl.

Gets the list of logical colors used to draw the control.

Parameters

CArrayFix< TCoeColorUse > & aColorUseListThe color list.

HandlePointerEventL(const TPointerEvent &)

IMPORT_C voidHandlePointerEventL(const TPointerEvent &aPointerEvent)[virtual]

From CCoeControl.

Handles pointer events.

Parameters

const TPointerEvent & aPointerEventThe pointer event.

HandleResourceChange(TInt)

IMPORT_C voidHandleResourceChange(TIntaType)[virtual]

From CCoeControl.

Handles a change to the control's resources.

Parameters

TInt aTypeA message UID value.

HideSecondRow(const TBool)

IMPORT_C voidHideSecondRow(const TBoolaHide)

Hides the second row of a double style listbox. This feature is disabled by default.

S60 3.1

Parameters

const TBool aHideETrue to hide the second row.

ItemDrawer()

IMPORT_C CFormattedCellListBoxItemDrawer *ItemDrawer()const

Gets list box item drawer.

Pointer to item drawer object.

MakeViewClassInstanceL()

IMPORT_C CListBoxView *MakeViewClassInstanceL()[virtual]

From CEikListBox.

Creates the list box view.

Pointer to new list box view class instance.

Model()

IMPORT_C CTextListBoxModel *Model()const

Gets model class of the list box.

Pointer to list box model class instance.

MopSupplyObject(TTypeUid)

IMPORT_C TTypeUid::PtrMopSupplyObject(TTypeUidaId)[protected, virtual]

From MObjectProvider.

Retrieves an object of the same type as that encapsulated in aId. This function is used to allow controls to ask their owners for access to other objects that they own.

Encapsulates the pointer to the object provided. Note that the encapsulated pointer may be NULL.

Parameters

TTypeUid aIdAn encapsulated object type ID.

SetIconSizes()

voidSetIconSizes()

Sets icon sizes for visible list box items.

UseLogicalToVisualConversion(TBool)

IMPORT_C voidUseLogicalToVisualConversion(TBoolaUseConversion)

Enable or disable logical to visual reordering in listbox data text drawing. By default, it is enabled. This has any effect only when bidirectional text is rendered.

If you convert text to visual order prior to passing it to the listbox (for example by wrapping text to lines with methods in AknBidiTextUtils), then you should disable conversion in listbox by calling this method.

S60 2.0

Parameters

TBool aUseConversionIf ETrue enable conversion.

Member Data Documentation

TInt iSpare

TInt iSpare[private]