CEikFormattedCellListBox Class Reference

API published in: S60 1st Ed

Link against: avkon.lib eikctl.lib eikcoctl.lib

Capability Information

Required Capabilities

None


#include <
eikfrlb.h>

Inherits CEikTextListBox.

Inherited by AknListBoxLinesTemplate< CEikFormattedCellListBox >, AknPopupListEmpty< CEikFormattedCellListBox >, and CEikSettingsListBox.


Detailed Description

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:

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)


Public Member Functions

IMPORT_C CEikFormattedCellListBox ()
 C++ default constructor.
IMPORT_C void ConstructFromResourceL (TResourceReader &aReader)
 Constructs list box from resource file.
IMPORT_C void ConstructL (const CCoeControl *aParent, TInt aFlags)
 By default Symbian 2nd phase constructor is private.
IMPORT_C CTextListBoxModelModel () const
 Gets model class of the list box.
IMPORT_C CFormattedCellListBoxItemDrawerItemDrawer () const
 Gets list box item drawer.
void SetIconSizes ()
 Sets icon sizes for visible list box items.
IMPORT_C void UseLogicalToVisualConversion (TBool aUseConversion)
 Enable or disable logical to visual reordering in listbox data text drawing.
IMPORT_C void EnableExtendedDrawingL ()
 This method needs to be called to enable extended drawing features such as skinning, pictograph drawing and marquee text in the listbox draw routine.
IMPORT_C void EnableStretching (const TBool aEnabled)
 Enables/disables list stretching.
IMPORT_C void HideSecondRow (const TBool aHide)
 Hides the second row of a double style listbox.
IMPORT_C CListBoxViewMakeViewClassInstanceL ()
 From CEikListBox.
IMPORT_C void FocusChanged (TDrawNow aDrawNow)
 From CEikListBox.
IMPORT_C void GetColorUseListL (CArrayFix< TCoeColorUse > &aColorUseList) const
 From CCoeControl.
IMPORT_C void HandleResourceChange (TInt aType)
 From CCoeControl.
IMPORT_C void HandlePointerEventL (const TPointerEvent &aPointerEvent)
 From CCoeControl.

Protected Member Functions

virtual IMPORT_C void CreateItemDrawerL ()
 Creates item draver for the listbox.
virtual IMPORT_C TInt AdjustRectHeightToWholeNumberOfItems (TRect &aRect) const
 From CEikListBox.
virtual IMPORT_C TTypeUid::Ptr MopSupplyObject (TTypeUid aId)
 From MObjectProvider.

Constructor & Destructor Documentation

IMPORT_C CEikFormattedCellListBox::CEikFormattedCellListBox  ) 
 

C++ default constructor.


Member Function Documentation

virtual IMPORT_C TInt CEikFormattedCellListBox::AdjustRectHeightToWholeNumberOfItems 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.

Parameters:
aRect The rectangle to be modified.
Returns:
The number of pixels reduced.

Reimplemented from CEikListBox.

Reimplemented in CAknFormGraphicStyleListBox.

IMPORT_C void CEikFormattedCellListBox::ConstructFromResourceL TResourceReader &  aReader  )  [virtual]
 

Constructs list box from resource file.

See LISTBOX resource definition.

Flags: EAknListBoxSelectionList, EAknListBoxMenuList, EAknListBoxMarkableList, EAknListBoxMultiselectionList, EAknListBoxViewerFlags

Parameters:
aReader Reference to resource reader TResourceReader object.

Reimplemented from CEikTextListBox.

Reimplemented in CAknPopupSettingList.

IMPORT_C void CEikFormattedCellListBox::ConstructL const CCoeControl *  aParent,
TInt  aFlags
[virtual]
 

By default Symbian 2nd phase constructor is private.

Must be called if resource data is not used.

Parameters:
aParent Pointer to CCoeControl class, parent control.
aFlags Flags for CEikListBox constructor. Possible flags : EAknListBoxSelectionList, EAknListBoxMenuList, EAknListBoxMarkableList, EAknListBoxMultiselectionList, EAknListBoxViewerFlags

Reimplemented from CEikTextListBox.

virtual IMPORT_C void CEikFormattedCellListBox::CreateItemDrawerL  )  [protected, virtual]
 

Creates item draver for the listbox.

Reimplemented from CEikTextListBox.

Reimplemented in CAknDouble2GraphicStyleListBox, CAknDouble2LargeStyleListBox, CAknSinglePopupMenuStyleListBox, CAknSingleGraphicPopupMenuStyleListBox, CAknSingleHeadingPopupMenuStyleListBox, CAknSingleGraphicHeadingPopupMenuStyleListBox, CAknDoublePopupMenuStyleListBox, CAknDoubleLargeGraphicPopupMenuStyleListBox, CAknDouble2PopupMenuStyleListBox, CAknSingle2GraphicPopupMenuStyleListBox, CAknDoubleGraphicPopupMenuStyleListBox, CAknSetStyleListBox, CAknFormGraphicStyleListBox, and CEikSettingsListBox.

IMPORT_C void CEikFormattedCellListBox::EnableExtendedDrawingL  ) 
 

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.

Panic:
EAknPanicListBoxItemDrawerNotCreated Panics if the item drawer for the current class has not been defined.
IMPORT_C void CEikFormattedCellListBox::EnableStretching const TBool  aEnabled  ) 
 

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.

Parameters:
aEnabled ETrue to enable list stretching.
IMPORT_C void CEikFormattedCellListBox::FocusChanged TDrawNow  aDrawNow  )  [virtual]
 

From CEikListBox.

Handles focus changes.

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

Parameters:
aDrawNow If EDrawNow, a redraw is performed immediately.

Reimplemented from CEikListBox.

IMPORT_C void CEikFormattedCellListBox::GetColorUseListL CArrayFix< TCoeColorUse > &  aColorUseList  )  const [virtual]
 

From CCoeControl.

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

Parameters:
aColorUseList The color list.

Reimplemented from CEikTextListBox.

IMPORT_C void CEikFormattedCellListBox::HandlePointerEventL const TPointerEvent &  aPointerEvent  )  [virtual]
 

From CCoeControl.

Handles pointer events.

Parameters:
aPointerEvent The pointer event.

Reimplemented from CEikTextListBox.

Reimplemented in CAknDoubleNumberStyleListBox, CAknDoubleTimeStyleListBox, CAknDouble2GraphicStyleListBox, CAknDouble2LargeStyleListBox, CAknSettingStyleListBox, CAknSinglePopupMenuStyleListBox, CAknSingleGraphicPopupMenuStyleListBox, CAknSingleGraphicBtPopupMenuStyleListBox, CAknSingleHeadingPopupMenuStyleListBox, CAknSingleGraphicHeadingPopupMenuStyleListBox, CAknDoublePopupMenuStyleListBox, CAknSinglePopupSubmenuStyleListBox, CAknDoubleLargeGraphicPopupMenuStyleListBox, CAknDouble2PopupMenuStyleListBox, CAknSingle2GraphicPopupMenuStyleListBox, CAknDoubleGraphicPopupMenuStyleListBox, CAknSetStyleListBox, CAknFormGraphicStyleListBox, CAknFormGraphicWideStyleListBox, CAknPopupSettingList, and CEikSettingsListBox.

IMPORT_C void CEikFormattedCellListBox::HandleResourceChange TInt  aType  )  [virtual]
 

From CCoeControl.

Handles a change to the control's resources.

Parameters:
aType A message UID value.

Reimplemented from CEikTextListBox.

Reimplemented in CAknPopupSettingList.

IMPORT_C void CEikFormattedCellListBox::HideSecondRow const TBool  aHide  ) 
 

Hides the second row of a double style listbox.

This feature is disabled by default.

Parameters:
aHide ETrue to hide the second row.
IMPORT_C CFormattedCellListBoxItemDrawer* CEikFormattedCellListBox::ItemDrawer  )  const
 

Gets list box item drawer.

Returns:
Pointer to item drawer object.

Reimplemented in CEikSettingsListBox.

IMPORT_C CListBoxView* CEikFormattedCellListBox::MakeViewClassInstanceL  )  [virtual]
 

From CEikListBox.

Creates the list box view.

Returns:
Pointer to new list box view class instance.

Reimplemented from CEikListBox.

Reimplemented in CAknSetStyleListBox, and CEikSettingsListBox.

IMPORT_C CTextListBoxModel* CEikFormattedCellListBox::Model  )  const
 

Gets model class of the list box.

Returns:
Pointer to list box model class instance.

Reimplemented from CEikTextListBox.

virtual IMPORT_C TTypeUid::Ptr CEikFormattedCellListBox::MopSupplyObject TTypeUid  aId  )  [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.

Parameters:
aId An encapsulated object type ID.
Returns:
Encapsulates the pointer to the object provided. Note that the encapsulated pointer may be NULL.

Reimplemented in CAknSetStyleListBox.

void CEikFormattedCellListBox::SetIconSizes  ) 
 

Sets icon sizes for visible list box items.

IMPORT_C void CEikFormattedCellListBox::UseLogicalToVisualConversion TBool  aUseConversion  ) 
 

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.

Parameters:
aUseConversion If ETrue enable conversion.

The documentation for this class was generated from the following file:

Copyright © Nokia Corporation 2001-2008
Back to top