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.
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 void | ConstructFromResourceL ( TResourceReader &) |
IMPORT_C void | ConstructL (const CCoeControl *, TInt ) |
IMPORT_C void | EnableExtendedDrawingL () |
IMPORT_C void | EnableStretching (const TBool ) |
IMPORT_C void | FocusChanged ( TDrawNow ) |
IMPORT_C void | GetColorUseListL ( CArrayFix < TCoeColorUse > &) |
IMPORT_C void | HandlePointerEventL (const TPointerEvent &) |
IMPORT_C void | HandleResourceChange ( TInt ) |
IMPORT_C void | HideSecondRow (const TBool ) |
IMPORT_C CFormattedCellListBoxItemDrawer * | ItemDrawer () |
IMPORT_C CListBoxView * | MakeViewClassInstanceL () |
IMPORT_C CTextListBoxModel * | Model () |
void | SetIconSizes () |
IMPORT_C void | UseLogicalToVisualConversion ( TBool ) |
Protected Member Functions | |
---|---|
IMPORT_C TInt | AdjustRectHeightToWholeNumberOfItems ( TRect &) |
IMPORT_C void | CreateItemDrawerL () |
IMPORT_C TTypeUid::Ptr | MopSupplyObject ( TTypeUid ) |
Private Member Functions | |
---|---|
IMPORT_C void | CEikListBox_Reserved () |
IMPORT_C void * | ExtensionInterface ( TUid ) |
Inherited Enumerations | |
---|---|
CCoeControl:TZoomType | |
CEikListBox:@302 | |
CEikListBox:TFlags | |
CEikListBox:TReasonForFocusLost | |
CEikListBox:TScrollBarOwnerShip |
Private Attributes | |
---|---|
TInt | iSpare |
IMPORT_C TInt | 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.
TRect & aRect | The rectangle to be modified. |
IMPORT_C void | ConstructFromResourceL | ( | TResourceReader & | aReader | ) | [virtual] |
Constructs list box from resource file. See LISTBOX resource definition.
Flags: EAknListBoxSelectionList , EAknListBoxMenuList , EAknListBoxMarkableList , EAknListBoxMultiselectionList , EAknListBoxViewerFlags
TResourceReader & aReader | Reference to resource reader TResourceReader object. |
IMPORT_C void | ConstructL | ( | const CCoeControl * | aParent, |
TInt | aFlags | |||
) | [virtual] |
By default Symbian 2nd phase constructor is private. Must be called if resource data is not used.
const CCoeControl * aParent | Pointer to CCoeControl class, parent control. |
TInt aFlags | Flags for CEikListBox constructor. Possible flags : EAknListBoxSelectionList, EAknListBoxMenuList, EAknListBoxMarkableList, EAknListBoxMultiselectionList, EAknListBoxViewerFlags |
IMPORT_C void | CreateItemDrawerL | ( | ) | [protected, virtual] |
Creates item draver for the listbox.
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.
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.
IMPORT_C void | 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.
const TBool aEnabled | ETrue to enable list stretching. |
IMPORT_C void * | ExtensionInterface | ( | TUid | aInterface | ) | [private, virtual] |
From CAknControl
TUid aInterface |
IMPORT_C void | 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.
TDrawNow aDrawNow | If EDrawNow, a redraw is performed immediately. |
IMPORT_C void | GetColorUseListL | ( | CArrayFix < TCoeColorUse > & | aColorUseList | ) | const [virtual] |
CArrayFix < TCoeColorUse > & aColorUseList | The color list. |
IMPORT_C void | HandlePointerEventL | ( | const TPointerEvent & | aPointerEvent | ) | [virtual] |
const TPointerEvent & aPointerEvent | The pointer event. |
IMPORT_C void | HandleResourceChange | ( | TInt | aType | ) | [virtual] |
TInt aType | A message UID value. |
IMPORT_C void | HideSecondRow | ( | const TBool | aHide | ) |
Hides the second row of a double style listbox. This feature is disabled by default.
const TBool aHide | ETrue to hide the second row. |
IMPORT_C CFormattedCellListBoxItemDrawer * | ItemDrawer | ( | ) | const |
Gets list box item drawer.
IMPORT_C TTypeUid::Ptr | 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.
TTypeUid aId | An encapsulated object type ID. |
IMPORT_C void | 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.
TBool aUseConversion | If ETrue enable conversion. |
Copyright ©2010 Nokia Corporation and/or its subsidiary(-ies).
All rights
reserved. Unless otherwise stated, these materials are provided under the terms of the Eclipse Public License
v1.0.