CEikColumnListBox Class Reference

class CEikColumnListBox : public CEikTextListBox

Column list box control.

This is a list box whose lines consist of cells that are grouped vertically into columns. The columns can be either textual or graphical, and column widths and fonts can be set explicitly through CColumnListBoxData.

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

Public Member Functions
CEikColumnListBox()
IMPORT_C voidConstructFromResourceL(TResourceReader &)
IMPORT_C voidConstructL(const CCoeControl *, TInt)
IMPORT_C voidEditItemL(TInt, 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 CColumnListBoxItemDrawer *ItemDrawer()
IMPORT_C CListBoxView *MakeViewClassInstanceL()
IMPORT_C CTextListBoxModel *Model()
IMPORT_C TTypeUid::PtrMopSupplyObject(TTypeUid)
voidSetIconSizes()
Protected Member Functions
IMPORT_C voidCreateItemDrawerL()
IMPORT_C voidCreateModelL()
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::AdjustRectHeightToWholeNumberOfItems(TRect &)const
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::IsHighlightEnabled()
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::SetMarkingMode(TBool)
CEikListBox::SetMarkingModeObserver(MAknMarkingModeObserver *)
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:@113
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

CEikColumnListBox()

IMPORT_CCEikColumnListBox()

C++ default constructor.

Member Functions Documentation

CEikListBox_Reserved()

IMPORT_C voidCEikListBox_Reserved()[private, virtual]

ConstructFromResourceL(TResourceReader &)

IMPORT_C voidConstructFromResourceL(TResourceReader &aReader)[virtual]

Second-phase construction from a resource.

This function completes the construction of a column list box, initialising any members from the specified resource reader.

Parameters

TResourceReader & aReaderA resource file reader

ConstructL(const CCoeControl *, TInt)

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

By default Symbian 2nd phase constructor is private.

This function completes the construction of a column list box.

Parameters

const CCoeControl * aParentParent control for the column list box.
TInt aFlags = 0Flags for the column list box.

CreateItemDrawerL()

IMPORT_C voidCreateItemDrawerL()[protected, virtual]

This member is internal and not intended for use.

CreateModelL()

IMPORT_C voidCreateModelL()[protected, virtual]

Creates a new CTextListBoxModel

EditItemL(TInt, TInt)

IMPORT_C voidEditItemL(TIntaColumn,
TIntaMaxLength
)

Not supported in S60.

Creates an item editor in column aColumn, if one does not already exist, and starts editing the current item up to a maximum length of aMaxLength characters.

Since
ER5U

Parameters

TInt aColumn
TInt aMaxLength

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.

Since
S60 2.6
Note that it must be possible to call this method multiple times.

EnableStretching(const TBool)

IMPORT_C voidEnableStretching(const TBoolaEnabled)

Enables/disables list stretching. When a column list is stretched its layout is optimized to take advantage of the extra screen space. 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.

Since
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 emphasises or de-emphasises 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.

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

Since
ER5U

Parameters

CArrayFix< TCoeColorUse > & aColorUseListThe colour list

HandlePointerEventL(const TPointerEvent &)

IMPORT_C voidHandlePointerEventL(const TPointerEvent &aPointerEvent)[virtual]

From CCoeControl.

Handles pointer events.

This function gets called whenever a pointer event occurs in the control, i.e. when the pointer is within the control's extent, or when the control has grabbed the pointer. The control should implement this function to handle pointer events.

Note: events of type EButton1Down are processed before HandlePointerEventL() is called, in order to transfer keyboard focus to the control in which the EButton1Down event occurred.

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

Parameters

const TPointerEvent & aPointerEventThe pointer event

HandleResourceChange(TInt)

IMPORT_C voidHandleResourceChange(TIntaType)[virtual]

From CCoeControl.

Handles a change to the control's resources.

The types of resources handled are those which are shared across the environment, e.g. colours or fonts. For colour scheme changes, DrawDeferred() is called in order to redraw the control.

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

Handles a change to the control's resources of type aType which are shared across the environment, e.g. colors or fonts.

Since
ER5U

Parameters

TInt aTypeA message UID value

ItemDrawer()

IMPORT_C CColumnListBoxItemDrawer *ItemDrawer()const

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

MakeViewClassInstanceL()

IMPORT_C CListBoxView *MakeViewClassInstanceL()[virtual]

From CEikListBox.

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().

Model()

IMPORT_C CTextListBoxModel *Model()const

Gets the list box model.

MopSupplyObject(TTypeUid)

IMPORT_C TTypeUid::PtrMopSupplyObject(TTypeUidaUid)

From CCoeControl.

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.

Other than in the case where NULL is returned, the object returned must be of the same object type - that is, the ETypeId member of the object pointed to by the pointer returned by this function must be equal to the iUid member of aUid.

Parameters

TTypeUid aUidAn encapsulated object type ID.

SetIconSizes()

voidSetIconSizes()

Helper function that setst icon sizes for visible list items

Member Data Documentation

TInt iSpare

TInt iSpare[private]