#include <mw/eikfrlb.h>
class CEikFormattedCellListBox : public CEikTextListBox |
Public Member Functions | |
---|---|
CEikFormattedCellListBox() | |
virtual IMPORT_C void | ConstructFromResourceL(TResourceReader &) |
virtual IMPORT_C void | ConstructL(const CCoeControl *, TInt) |
IMPORT_C void | EnableExtendedDrawingL() |
IMPORT_C void | EnableStretching(const TBool) |
virtual IMPORT_C void | FocusChanged(TDrawNow) |
virtual IMPORT_C void | GetColorUseListL(CArrayFix< TCoeColorUse > &) |
virtual IMPORT_C void | HandlePointerEventL(const TPointerEvent &) |
virtual IMPORT_C void | HandleResourceChange(TInt) |
IMPORT_C void | HideSecondRow(const TBool) |
IMPORT_C CFormattedCellListBoxItemDrawer * | ItemDrawer() |
virtual IMPORT_C CListBoxView * | MakeViewClassInstanceL() |
IMPORT_C CTextListBoxModel * | Model() |
void | SetIconSizes() |
IMPORT_C void | UseLogicalToVisualConversion(TBool) |
Protected Member Functions | |
---|---|
virtual IMPORT_C TInt | AdjustRectHeightToWholeNumberOfItems(TRect &) |
virtual IMPORT_C void | CreateItemDrawerL() |
virtual IMPORT_C TTypeUid::Ptr | MopSupplyObject(TTypeUid) |
Inherited Enumerations | |
---|---|
CCoeControl:TZoomType | |
CEikListBox:@130 | |
CEikListBox:TFlags | |
CEikListBox:TReasonForFocusLost | |
CEikListBox:TScrollBarOwnerShip |
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)
Reimplemented from CEikListBox::AdjustRectHeightToWholeNumberOfItems(TRect &)const
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.
Parameter | Description |
---|---|
aRect | The rectangle to be modified. |
Returns: The number of pixels reduced.
IMPORT_C void | ConstructFromResourceL | ( | TResourceReader & | aReader | ) | [virtual] |
Reimplemented from CEikTextListBox::ConstructFromResourceL(TResourceReader &)
Constructs list box from resource file. See LISTBOX resource definition.
Flags: EAknListBoxSelectionList, EAknListBoxMenuList, EAknListBoxMarkableList, EAknListBoxMultiselectionList, EAknListBoxViewerFlags
Parameter | Description |
---|---|
aReader | Reference to resource reader TResourceReader object. |
IMPORT_C void | ConstructL | ( | const CCoeControl * | aParent, |
TInt | aFlags | |||
) | [virtual] |
Reimplemented from CEikTextListBox::ConstructL(const CCoeControl *,TInt)
By default Symbian 2nd phase constructor is private. Must be called if resource data is not used.
Parameter | Description |
---|---|
aParent | Pointer to CCoeControl class, parent control. |
aFlags | Flags for CEikListBox constructor. Possible flags : EAknListBoxSelectionList, EAknListBoxMenuList, EAknListBoxMarkableList, EAknListBoxMultiselectionList, EAknListBoxViewerFlags |
IMPORT_C void | CreateItemDrawerL | ( | ) | [protected, virtual] |
Reimplemented from CEikTextListBox::CreateItemDrawerL()
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.
Parameter | Description |
---|---|
aEnabled | ETrue to enable list stretching. |
IMPORT_C void | FocusChanged | ( | TDrawNow | aDrawNow | ) | [virtual] |
Reimplemented from CEikListBox::FocusChanged(TDrawNow)
From CEikListBox.
Handles focus changes.
The function emphasizes or de-emphasizes the view as needed, and shows or hides the matcher cursor.
Parameter | Description |
---|---|
aDrawNow | If EDrawNow, a redraw is performed immediately. |
IMPORT_C void | GetColorUseListL | ( | CArrayFix< TCoeColorUse > & | aColorUseList | ) | const [virtual] |
Reimplemented from CEikTextListBox::GetColorUseListL(CArrayFix< TCoeColorUse > &)const
From CCoeControl.
Gets the list of logical colors used to draw the control.
Parameter | Description |
---|---|
aColorUseList | The color list. |
IMPORT_C void | HandlePointerEventL | ( | const TPointerEvent & | aPointerEvent | ) | [virtual] |
Reimplemented from CEikTextListBox::HandlePointerEventL(const TPointerEvent &)
From CCoeControl.
Handles pointer events.
Parameter | Description |
---|---|
aPointerEvent | The pointer event. |
IMPORT_C void | HandleResourceChange | ( | TInt | aType | ) | [virtual] |
Reimplemented from CEikTextListBox::HandleResourceChange(TInt)
From CCoeControl.
Handles a change to the control's resources.
Parameter | Description |
---|---|
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.
Parameter | Description |
---|---|
aHide | ETrue to hide the second row. |
IMPORT_C CFormattedCellListBoxItemDrawer * | ItemDrawer | ( | ) | const |
Gets list box item drawer.
Returns: Pointer to item drawer object.
IMPORT_C CListBoxView * | MakeViewClassInstanceL | ( | ) | [virtual] |
Reimplemented from CEikListBox::MakeViewClassInstanceL()
From CEikListBox.
Creates the list box view.
Returns: Pointer to new list box view class instance.
IMPORT_C CTextListBoxModel * | Model | ( | ) | const |
Reimplemented from CEikTextListBox::Model()const
Gets model class of the list box.
Returns: Pointer to list box model class instance.
IMPORT_C TTypeUid::Ptr | MopSupplyObject | ( | TTypeUid | aId | ) | [protected, virtual] |
Reimplemented from CCoeControl::MopSupplyObject(TTypeUid)
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.
Parameter | Description |
---|---|
aId | An encapsulated object type ID. |
Returns: Encapsulates the pointer to the object provided. Note that the encapsulated pointer may be NULL.
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.
Parameter | Description |
---|---|
aUseConversion | If ETrue enable conversion. |