#include <mw/eiklbx.h>
class CEikListBox : public CEikBorderedControl |
Public Member Enumerations | |
---|---|
enum | anonymous { KEikMaxMatchingBufferLength } |
enum | TFlags { EMultipleSelection, ENoExtendedSelection, EIncrementalMatching, EPopout, ..., EItemSpecificMenuAlwaysShown } |
enum | TScrollBarOwnerShip { ENotOwnedExternally, EOwnedExternally } |
Protected Member Enumerations | |
---|---|
enum | TReasonForFocusLost { EFocusLostToExternalControl, EFocusLostToInternalEditor } |
Inherited Attributes | |
---|---|
CCoeControl::iCoeEnv | |
CCoeControl::iContext | |
CCoeControl::iPosition | |
CCoeControl::iSize | |
CEikBorderedControl::iBorder |
Inherited Enumerations | |
---|---|
CCoeControl:TZoomType |
Base class for an on-screen list box control from which one or more items can be selected.
CEikListBox implements the basics of a list box. It has a scroll bar frame, an item drawer, and a model, and reports events to a list box observer.
List boxes display a number of items within a scrolling frame; the items in a list box which are visible at one time are represented by a list box view.
Writing derived classes:
This class may be derived from to provide specialisations of the basic list box behaviour. It is usual when subclassing CEikListBox to also provide specialisations of CListItemDrawer and CListBoxView for representing the data of such a list box effectively
CEikButtonBase * | iLaunchingButton | [protected] |
Defines which button launched the popout.
MEikListBoxObserver * | iListBoxObserver | [protected] |
The button which just launched a popout menu.
TInt | iRequiredHeightInNumOfItems | [protected] |
The required height of this list box expressed in terms of a number of items.
TScrollBarOwnerShip | iSBFrameOwned | [protected] |
Identifies if the scroll bar is owned by this list
Construction flags.
Enumerator | Value | Description |
---|---|---|
EMultipleSelection | SLafListBox::EMultipleSelection |
Construction flag for a list box from which the user can select multiple items. |
ENoExtendedSelection | SLafListBox::ENoExtendedSelection |
Construction flag for disabling extended selection. If this is set the user cannot select multiple items by using SHIFT button. |
EIncrementalMatching | SLafListBox::EIncrementalMatching |
Construction flag that sets the list box to match user?s keystrokes incrementally. |
EPopout | SLafListBox::EPopout |
Construction flag for setting the list box as a pop-out list box. Pop-out list boxes handle certain keystrokes and events differently. |
ELeftDownInViewRect | SLafListBox::ELeftDownInViewRect |
Construction flag that enables the indication of pointer press inside the view of the list box. |
EItemDoubleClicked | SLafListBox::EItemDoubleClicked |
Construction flag for enabling CEiklist box item double click indication. |
EKeepModel | SLafListBox::EKeepModel |
Construction flag for removing the ownership of the supplied list box model from the CEikListBox so that the list box model will not be deleted with the CEikListBoxes destruction. |
EScrollBarSizeExcluded | SLafListBox::EScrollBarSizeExcluded |
Construction flag for excluding the scroll bar. If the flag is set the scroll bas is drawn ouside the window that describes the scroll bars extent. |
EStateChanged | SLafListBox::EStateChanged |
Construction flag for enabling CEikListBox change indication. |
ECreateOwnWindow | SLafListBox::ECreateOwnWindow |
Construction flag that indicates that the list box should be created to its own window. |
ENoFirstLetterMatching | SLafListBox::ENoFirstLetterMatching |
Construction flag for disabling key matching. |
EPaintedSelection | SLafListBox::EPaintedSelection |
Construction flag for enabling painting of selected items. |
ELoopScrolling | 0x1000 |
Construction flag for enabling loop scrolling in which the list box jumps from the last item to the first item. |
EEnterMarks | 0x2000 |
Construction flag for enabling Avkon multiselection list. |
EShiftEnterMarks | 0x4000 |
Construction flag for enabling Avkon markable list which enables the marking of several items from the list. |
EViewerFlag | 0x8000 |
Construction flag that combines EPageAtOnceScrolling and EDisableHighlight flags |
EPageAtOnceScrolling | 0x8000 |
Construction flag for enabling scrolling at a page per time so that the whole list box page is scrolled to the next. |
EDisableHighlight | 0x8000 |
Construction flag for disabling the highlighting of the selected item. |
ES60StyleMultiselection | SLafListBox::ES60StyleMultiselection |
Construction flag for enabling S60 style selection of multiple items from the list box. |
ES60StyleMarkable | SLafListBox::ES60StyleMarkable |
Construction flag for enabling S60 style markable items. |
EDisableItemSpecificMenu | 0x00040000 |
Construction flag for disabling item specific stylus popup menu. |
EItemSpecificMenuAlwaysShown | 0x00080000 |
Construction flag to make item specific stylus popup menu always shown regardless of list's marking state if the tapped item has associated commands. |
IMPORT_C void | ActivateL | ( | ) | [virtual] |
Reimplemented from CCoeControl::ActivateL()
From CCoeControl
Sets the control as ready to be drawn.
The application should call this function on all controls that are not components in a compound control.
The purpose of this function is that controls are not always ready to be drawn as soon as they have been constructed. For example, it may not be possible to set the control's extent during construction, but its extent should always be set before it is drawn. Similarly, if a control is to be made invisible, this should be done before it is activated.
The default implementation sets a flag in the control to indicate it is ready to be drawn. If the control is a compound control, the default implementation also calls ActivateL() for all the control's components. To get the control's components it uses CountComponentControls() and ComponentControl(), which should be implemented by the compound control.
ActivateL() is typically called from the control's ConstructL() function.
Notes:
This function can be overridden. This is useful for doing late initialisation of the control, using information that was not available at the time the control was created. For example, a text editor might override ActivateL() and use it to enquire whether it is focused: if it is, it makes the cursor and any highlighting visible. At the time when the editor is created, it doesn't know whether or not it has keyboard focus.
If overriding ActivateL(), the implementation must include a base call to CCoeControl's ActivateL().
IMPORT_C void | AddItemChangeObserverL | ( | MListBoxItemChangeObserver * | aObserver | ) |
Adds an item change observer to the listbox. Duplicates are not checked (i.e. adding the same observer multiple times is not prevented).
Parameter | Description |
---|---|
aObserver | Must be non-NULL. |
IMPORT_C void | AddSelectionObserverL | ( | MListBoxSelectionObserver * | aObserver | ) |
Adds a selection (item marking) observer to the listbox. Duplicates are not checked (i.e. adding the same observer multiple times is not prevented).
Parameter | Description |
---|---|
aObserver | Must be non-NULL. |
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 | AdjustTopItemIndex | ( | ) | const [protected, virtual] |
Called by various functions of this class to ensure that the top item index is always a sane value. The implementation in CEikListBox tries to ensure the minimum amount of white space at the bottom of the list box. Note that this function does not affect the current item index.
IMPORT_C TRgb | BackColor | ( | ) | const [protected] |
Gets the background colour.
Returns: The background colour.
IMPORT_C TBool | BackgroundDrawingSuppressed | ( | ) | const |
Checks whether background drawing is suppressed on item level i.e. each list item doesn't draw its background.
Returns: ETrue if background drawing is suppressed.
IMPORT_C TInt | BottomItemIndex | ( | ) | const |
Gets for the bottom items index.
Returns: Index for the bottom item.
CMatchBuffer * | Buffer | ( | ) | const [protected] |
Gets the list box match buffer.
Returns: The list box match buffer.
Gets the height of the list box in pixels based on the width of the list box in characters.
Returns the number of items times the height of the font in pixels.
Parameter | Description |
---|---|
aNumOfItems | The number of items. |
Returns: The height of the list box in pixels.
Gets the size of the list box in pixels based on the height of the list box in items and the length of the items in characters.
Returns TSize element consisting of two elements, the height and the width. Height is the number of items times the height of the font in pixels. Width is the number of characters in a single line times the width of the font in pixels.
Parameter | Description |
---|---|
aWidthAsNumOfChars | Width of list box in characters. |
aHeightAsNumOfItems | Height of list box in characters. |
Returns: The size of the list box in pixels as TSize.
Gets the width of the list box in pixels based on the width of the list box in characters.
Returns the number of characters times the width of a character in pixels.
Parameter | Description |
---|---|
aNumOfChars | The number of characters. |
Returns: The width of the list box in pixels.
Gets the width of the list box in pixels based on the width of the list box text in pixels.
returns the width of the whole list box in pixels, which includes the text width and the width of elements in the list box that have an effect on the overall width.
Parameter | Description |
---|---|
aTextWidthInPixels | Width of list box text in pixels. |
Returns: Required width of whole list box in pixels.
IMPORT_C void | CalculatePopoutRect | ( | TInt | aTargetItemIndex, |
TInt | aTargetYPos, | |||
TRect & | aListBoxRect, | |||
TInt | aMinHeightInNumOfItems = 1 | |||
) |
Gets the size of the rectangle required to display a pop out.
Parameter | Description |
---|---|
aTargetItemIndex | The item from which the popout originates. |
aTargetYPos | Vertical position of the item from which the popout originates. |
aListBoxRect | The list box rectangle. |
aMinHeightInNumOfItems | The minimum number of items for the popout. |
void | ChangeSelectionMode | ( | TBool | aEnable | ) |
This switches listbox into selection mode. Basicly only changes MSK and informs selection observers about the change.
Parameter | Description |
---|---|
aEnable | ETrue when entering into selection mode, EFalse when leaving |
void | CheckCreateBufferL | ( | ) | [protected] |
Checks the list box match buffer exists. If a buffer does not exist, one is created.
TBool | CheckCreateExtension | ( | ) | [protected] |
Checks for a list box extension. Creates one if not present.
Returns: ETrue if a list box extension already existed or if there was no previous extension and a new extension class was created successfully. EFalse if there was no previous extension and a new one could not be constructed.
void | CheckCreateExtensionL | ( | ) | [protected] |
Checks for a list box extension. Attempts to create one if not present.
This function leaves if an extension cannot be created.
IMPORT_C void | ClearMargins | ( | ) | const [protected] |
Clears the list box margins. The list box is redrawn only if redraws are enabled for the list box view.
IMPORT_C CCoeControl * | ComponentControl | ( | TInt | aIndex | ) | const [protected, virtual] |
Reimplemented from CCoeControl::ComponentControl(TInt)const
Gets an indexed component of a compound control.
There are two ways to implement a compound control. One way is to override this function. The other way is to use the CCoeControlArray functionality (see the InitComponentArrayL method).
Note: Within a compound control each component control is identified by an index, where the index depends on the order the controls were added: the first is given an index of 0, the next an index of 1, and so on.
Parameter | Description |
---|---|
aIndex | The index of the control. |
Returns: The component control with an index of aIndex.
IMPORT_C void | ConstructL | ( | MListBoxModel * | aListBoxModel, |
CListItemDrawer * | aListItemDrawer, | |||
const CCoeControl * | aParent, | |||
TInt | aFlags = 0 | |||
) |
Handles 2nd phase construction.
Sets list box model and list item drawer. Request another ConstructL to handle aParent and aFlags.
Parameter | Description |
---|---|
aListBoxModel | List box model that is to be used with the list box. |
aListItemDrawer | List item drawer that is to be used with the list box. |
aParent | Host CoeControl for the list box. |
aFlags | Construction flags (TFlags) for the list box. |
IMPORT_C void | ConstructL | ( | MListBoxModel * | aListBoxModel, |
CListItemDrawer * | aListItemDrawer, | |||
const CCoeControl * | aParent, | |||
TGulBorder | aBorder, | |||
TInt | aFlags = 0 | |||
) |
Handles 2nd phase construction.
Sets the border that is to be drawn outside the list box. Request another ConstructL to handle list box model, list item drawer, aParent and aFlags.
Parameter | Description |
---|---|
aListBoxModel | List box model that is to be used with the list box. |
aListItemDrawer | List item drawer that is to be used with the list box. |
aParent | Host CoeControl for the list box. |
aBorder | Border to be drawn outside the list box. |
aFlags | Construction flags (TFlags) for the list box. |
IMPORT_C void | ConstructL | ( | const CCoeControl * | aParent, |
TInt | aFlags = 0 | |||
) | [protected, virtual] |
Second-phase constructor.
This protected form is overridden non-virtually by the second-phase constructors of each subclass, and should be invoked by them using CEikListBox::ConstructL().
Parameter | Description |
---|---|
aParent | The parent control. May be NULL. |
aFlags | Construction flags. |
IMPORT_C TInt | CountComponentControls | ( | ) | const [protected, virtual] |
Reimplemented from CCoeControl::CountComponentControls()const
Gets the number of controls contained in a compound control.
There are two ways to implement a compound control. One way is to override this function. The other way is to use the CCoeControlArray functionality (see the InitComponentArrayL method).
Returns: The number of component controls contained by this control.
IMPORT_C void | CreateMatchBufferL | ( | ) | [protected] |
Creates a buffer for checking how well two strings match up.
IMPORT_C CEikScrollBarFrame * | CreateScrollBarFrameL | ( | TBool | aPreAlloc = EFalse | ) |
Creates a scrollbar frame.
Parameter | Description |
---|---|
aPreAlloc | Boolean defining if there should be initial memory allocations. |
Returns: The new scroll bar frame.
IMPORT_C CEikScrollBarFrame * | CreateScrollBarFrameL | ( | TBool | aPreAlloc, |
TBool | aRemote | |||
) |
Creates a scrollbar for the listbox. The caller may choose if the scrollbar is requested remotely via the mop chain from parent control
Parameter | Description |
---|---|
aPreAlloc | Is the scrollbar created immediately or when taking in to use |
aRemote | If True, the scrollbar is obtained via mop-chain from parent control. If used, the listbox only sets the scrollbar values. The scrollbar position and size must set in the parent control's code. |
Returns: CEikScrollBarFrame* pointer to scrollbar frame object
IMPORT_C CEikScrollBarFrame * | CreateScrollBarFrameL | ( | TBool | aPreAlloc, |
TBool | aRemote, | |||
TBool | aWindowOwning | |||
) |
Creates a scrollbar for the listbox. The caller may choose if the scrollbar is requested remotely via the mop chain from parent control
Parameter | Description |
---|---|
aPreAlloc | Is the scrollbar created immediately or when taking in to use |
aRemote | If True, the scrollbar is obtained via mop-chain from parent control. If used, the listbox only sets the scrollbar values. The scrollbar position and size must set in the parent control's code. |
aWindowOwning | Does the created scrollbar create own window or is it compound control. The listbox uses a window owning scrollbar by default. |
Returns: CEikScrollBarFrame* pointer to scrollbar frame object
IMPORT_C void | CreateScrollBarFrameLayout | ( | TEikScrollBarFrameLayout & | aLayout | ) | const [protected] |
Creates a scroll bar frame layout according to aLayout.
Parameter | Description |
---|---|
aLayout | Defines the layout. |
IMPORT_C void | CreateViewL | ( | ) | [protected, virtual] |
Completes the list box view?s construction.
This function is called by ConstructL() to complete construction of the resource view, calling its ConstructL() with appropriate arguments and assigning it to iView. Also prepares the view for use.
IMPORT_C TInt | CurrentItemIndex | ( | ) | const |
Gets the index number of the selected item.
Returns: Index of the selected item.
IMPORT_C void | DisableItemSpecificMenu | ( | ) |
Disables item specific menu from the list. This has the same effect as construction time flag EAknListBoxItemSpecificMenuDisabled and calling this method also turns that flag on.
IMPORT_C void | DisableScrolling | ( | TBool | aDisabled | ) |
Disables the kinetic scrolling functionality in the list. By default the feature is enabled.
Parameter | Description |
---|---|
aDisabled | ETrue to disable kinetic scrolling, EFalse otherwise. |
IMPORT_C void | DisableSingleClick | ( | TBool | aDisabled | ) |
Disables the single click functionality in the list. By default the feature is enabled.
Parameter | Description |
---|---|
aDisabled | ETrue to disable single click EFalse does currently nothing |
void | DoShiftMSKMarkingL | ( | ) |
Called from MSK observer when shift+MSK have been pressed
S60 3.1
IMPORT_C void | Draw | ( | const TRect & | aRect | ) | const [protected, virtual] |
Reimplemented from CEikBorderedControl::Draw(const TRect &)const
Redraws the specified area of this list box into the specified rectangle.
Parameter | Description |
---|---|
aRect | Rectangle to be redrawn. Specified relative to the origin of this control. |
IMPORT_C void | DrawItem | ( | TInt | aItemIndex | ) | const |
Draws a list box item, first scrolling the list to make it visible if it is not already.
DrawItem() panics if there is no list box view currently set.
Parameter | Description |
---|---|
aItemIndex | Index of the item to reveal. |
IMPORT_C void | DrawMatcherCursor | ( | ) | const [protected] |
Draws the matcher cursor in the correct location for the current match. If there is no match buffer, this function returns immediately; otherwise the cursor is drawn on the current item using CListBoxView::DrawMatcherCursor() after scrolling to make the current item visible.
A list box control?s matcher cursor is an on-screen cursor which is drawn to indicate to the user the location of the current text. Whether the cursor is drawn is dependent on the CListBoxView::TFlags::EHasMatcherCursor flag, which may be set on the list box?s view.
Note, that CListBoxView::DrawMatcherCursor() is not implemented in S60.
IMPORT_C void | EditItemL | ( | TInt | aMaxLength | ) | [virtual] |
Creates an item editor and starts editing the current item.
The editor can edit the current item up to a maximum length of aMaxLength characters. Also reports an EEventEditingStarted event to any list box observer by default.
The function only creates a new editor if one does not already exist.
Parameter | Description |
---|---|
aMaxLength | Maximum length of characters to edit. |
IMPORT_C void | EnableMSKObserver | ( | TBool | aEnable | ) |
By default markable listbox has middle softkey observer, which handles Mark / Unmark functionality. By this method, the caller may disable default observer.
Parameter | Description |
---|---|
aEnable | If EFalse, disables default middle softkey observer for markable lists. ETrue enables observer again. |
IMPORT_C void | FireItemChange | ( | ) | [protected] |
Notifies item change observers about item change. Subclasses must call this method if they have implemented item handling functions (e.g. HandleItemAdditionL or HandleItemRemovalL).
IMPORT_C void | FocusChanged | ( | TDrawNow | aDrawNow | ) | [protected, virtual] |
Reimplemented from CCoeControl::FocusChanged(TDrawNow)
Responds to a change in focus.
This is called whenever the control gains or loses focus, as a result of a call to SetFocus(). A typical use of FocusChanged() is to change the appearance of the control, for example by drawing a focus rectangle around it.
The default implementation is empty, and should be overridden by the CCoeControl-derived class.
Parameter | Description |
---|---|
aDrawNow | Contains the value that was passed to it by SetFocus(). |
IMPORT_C void | GetColorUseListL | ( | CArrayFix< TCoeColorUse > & | aColorUseList | ) | const [virtual] |
Reimplemented from CEikBorderedControl::GetColorUseListL(CArrayFix< TCoeColorUse > &)const
From CCoeControl
Gets the list of logical colours employed in the drawing of the control, paired with an explanation of how they are used. Appends the list to aColorUseList.
Parameter | Description |
---|---|
aColorUseList | List of logical colours. |
IMPORT_C void | HandleDragEventL | ( | TPoint | aPointerPos | ) | [protected, virtual] |
Handles drag events.
This function is called by HandlePointerEventL() to handle pointer drag events appropriately.
Parameter | Description |
---|---|
aPointerPos | The position of the TPointerEvent for which this handler is invoked. |
IMPORT_C void | HandleItemAdditionL | ( | ) |
Handles the addition of item to the list box.
Handles the addition of new items to the list box and updates selection indexes array.
NOTE. This algorithm can not handle position of the list highlight nor can it update the top item index correctly.
Parameter | Description |
---|---|
aArrayOfNewIndexesAfterAddition | Array of new indexes to be added. |
IMPORT_C void | HandleItemRemovalL | ( | ) |
Handles the removal of an item from the list box.
Handles the removal of items to the list box and updates selection indexes array.
NOTE. This algorithm cannot handle position of the list highlight nor can it update the top item index correctly.
Parameter | Description |
---|---|
aArrayOfOldIndexesBeforeRemoval | Array of indexes to be removed. |
IMPORT_C void | HandleLeftArrowKeyL | ( | CListBoxView::TSelectionMode | aSelectionMode | ) | [protected, virtual] |
Handles a left arrow key event.
The method used to handle the event depends on the selection mode, e.g. whether the user has pressed the SHIFT or CONTROL key.
Parameter | Description |
---|---|
aSelectionMode | Not used |
IMPORT_C void | HandlePhysicsScrollEventL | ( | TInt | aDeltaPixels | ) |
Scrolls the view by the given amount of pixels while keeping the physics parameters up-to-date. This should be called when scrolling the list box view except for when it is done by list dragging (e.g. scrolling with scroll bar).
Parameter | Description |
---|---|
aDeltaPixels | Amount of pixels to scroll the view. |
IMPORT_C void | HandlePointerEventL | ( | const TPointerEvent & | aPointerEvent | ) | [virtual] |
Reimplemented from CEikBorderedControl::HandlePointerEventL(const TPointerEvent &)
Handling of pointer event within the CEikListBox. Used for e.g. selecting an item from the list box.
Parameter | Description |
---|---|
aPointerEvent | Details of the pointer event that is being handled. |
IMPORT_C void | HandleResourceChange | ( | TInt | aType | ) | [virtual] |
Reimplemented from CEikBorderedControl::HandleResourceChange(TInt)
From CCoeControl
Handles a change to the list box?s resources of type aType which are shared across the environment, colours or fonts for example.
Parameter | Description |
---|---|
aType | The type of resources that have changed. |
IMPORT_C void | HandleRightArrowKeyL | ( | CListBoxView::TSelectionMode | aSelectionMode | ) | [protected, virtual] |
Handles a right arrow key event.
The method used to handle the event depends on the selection mode, e.g. whether the user has pressed the SHIFT or CONTROL key.
Parameter | Description |
---|---|
aSelectionMode | Not used. |
IMPORT_C void | HandleScrollEventL | ( | CEikScrollBar * | aScrollBar, |
TEikScrollEvent | aEventType | |||
) | [virtual] |
Used for scrolling through the items in the list box.
Parameter | Description |
---|---|
aScrollBar | Scroll bar for the list box. |
aEventType | Type of the event that occured. |
IMPORT_C void | HandleViewRectSizeChangeL | ( | ) | [protected, virtual] |
Handles the change in case that the size of the view rectangle for the list box changes.
IMPORT_C TRect | HighlightRect | ( | ) | const |
Gets the position and the size of the list box.
Returns: A rectangle with the correct position data as well as size data for the list box.
IMPORT_C TInt | HorizScrollGranularityInPixels | ( | ) | const [protected, virtual] |
Get horizontal scroll granularity in pixels. The granularity is the minimum size of a horizontal move of the client area.
Returns: Grain size for horizontal scrolling in pixels.
IMPORT_C TInt | HorizontalMargin | ( | ) | const [protected] |
This function gets the horizontal margin. Use CEikListBox::ListBoxMargins() instead, as this provides a more accurate value due to the bit shifting involved.
Returns: The horizontal margin in pixels.
IMPORT_C TInt | HorizontalNudgeValue | ( | ) | const [protected, virtual] |
Gets the number of grains to move horizontally when a nudge button is tapped. For simple list boxes, this value is a fraction of the width of the client area.
Returns: Number of grains to move left or right on each nudge
void | InformMSKButtonGroupDeletion | ( | ) |
This method is only called by CEikButtonGroupContainer when MSK observer is enabled and CEikButtonGroupContainer is deleted.
S60 3.1
IMPORT_C TCoeInputCapabilities | InputCapabilities | ( | ) | const [virtual] |
Reimplemented from CCoeControl::InputCapabilities()const
From CCoeControl.
Gets the input capabilities of the control and all its components.
Returns: The input capabilities of the control.
IMPORT_C TInt | InterItemGap | ( | ) | [protected, static] |
Gets the vertical gap between elements in the list box.
Returns: The vertical gap between elements in the list box.
IMPORT_C TBool | IsHighlightEnabled | ( | ) |
Checks if highlight drawing is enabled. If single click is enabled highlight drawing is by default disabled, but highlight comes visible with hardware keys.
Returns: ETrue if highlight is enabled, EFalse if not.
IMPORT_C TBool | IsMatchBuffer | ( | ) | const [protected] |
Tests whether the list box match buffer exists.
Returns: ETrue if the list box match buffer exists. EFalse if the list box match buffer does not exist.
IMPORT_C MEikListBoxEditor * | ItemEditor | ( | ) |
Gets item editor for the current class.
Returns: The item editor used by the list box class.
IMPORT_C TInt | ItemsInSingleLine | ( | ) | const |
Gets the number of list items in one line. This is more than one for grids only.
Returns: The number of list items in one line.
IMPORT_C TBool | LastCharMatched | ( | ) | const [protected] |
Checks if the last character matched with the string.
Returns: ETrue if a match was found from the buffer with the character.
IMPORT_C TMargins8 | ListBoxMargins | ( | ) | const [protected] |
Gets list box margins.
Returns: The list box margins in pixels.
IMPORT_C CListBoxView * | MakeViewClassInstanceL | ( | ) | [protected, virtual] |
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().
Returns: Pointer to a newly constructed list box view for this object.
IMPORT_C void | MakeVisible | ( | TBool | aVisible | ) | [virtual] |
Reimplemented from CCoeControl::MakeVisible(TBool)
Sets this control as visible or invisible.
Parameter | Description |
---|---|
aVisible | ETrue to make the control visible, EFalse to make it invisible. |
IMPORT_C RIncrMatcherBase * | MatchBuffer | ( | ) | const [protected] |
Gets a pointer to the match buffer. Returns NULL if the match buffer does not exist.
Returns: Pointer to the match buffer.
IMPORT_C void | MatchTypedCharL | ( | TUint | aCode | ) | [protected] |
Checks matching for the given character.
Parameter | Description |
---|---|
aCode | Character code. |
IMPORT_C TSize | MinimumSize | ( | ) | [virtual] |
Reimplemented from CCoeControl::MinimumSize()
Checks the minimum size needed for the list box.
Returns: The two dimensional minimum size for the list box.
IMPORT_C MListBoxModel * | Model | ( | ) | const |
Gets the list box data model.
Returns: Interface to the list box data model.
IMPORT_C TKeyResponse | OfferKeyEventL | ( | const TKeyEvent & | aKeyEvent, |
TEventCode | aType | |||
) | [virtual] |
Reimplemented from CCoeControl::OfferKeyEventL(const TKeyEvent &,TEventCode)
Informs the CEikListbox of a key press.
Parameter | Description |
---|---|
aKeyEvent | Details of the key event that is being handled. |
aType | Defines what kind of key event is being handled e.g. EEventKeyUp. |
Returns: EKeyWasConsumed if the key was handled by the method. EKeyWasNotConsumed if the key was not handled.
IMPORT_C TReasonForFocusLost | ReasonForFocusLostL | ( | ) | [protected] |
Gets the reason for the list box?s loss of focus.
Returns: The reason for the loss of focus.
IMPORT_C void | RedrawItem | ( | TInt | aItemIndex | ) |
Parameter | Description |
---|---|
aItemIndex | index of item to be redrawn. |
IMPORT_C TBool | RemoveItemChangeObserver | ( | MListBoxItemChangeObserver * | aObserver | ) |
Removes an item change observer from the listbox.
Parameter | Description |
---|---|
aObserver | The observer to be removed. |
Returns: ETrue if removal ok, EFalse if observer was not removed (not found from the list of observers).
IMPORT_C void | RemoveSelectionObserver | ( | MListBoxSelectionObserver * | aObserver | ) |
Removes a selection (item marking) observer from the listbox.
Parameter | Description |
---|---|
aObserver | The observer to be removed. |
IMPORT_C void | ReportListBoxEventL | ( | MEikListBoxObserver::TListBoxEvent | aEvent | ) | [protected, virtual] |
Reports a list box event to any observer of this list box. This function returns immediately if no observer is set.
Parameter | Description |
---|---|
aEvent | The event to report. |
IMPORT_C void | RestoreClientRectFromViewRect | ( | TRect & | aClientRect | ) | const [protected, virtual] |
Calculates the client area.
This method is called by various functions of this class to recalculate the extent of the client area from iViewRect. This implementation takes into account any rounding of the viewing rectangle made to fit a whole number of items.
Parameter | Description |
---|---|
aClientRect | On return contains a size for the client area in pixels. |
IMPORT_C void | RestoreCommonListBoxPropertiesL | ( | TResourceReader & | aReader | ) | [protected] |
Restores the list box properties shared by all subclasses from a resource reader. This function is not called within CEikListBox itself, but is used by subclasses which support construction from resources.
Parameter | Description |
---|---|
aReader | A resource reader. |
IMPORT_C CEikScrollBarFrame *const | ScrollBarFrame | ( | ) |
Gets pointer for the scroll bar frame.
Returns: Pointer to the scroll bar frame.
IMPORT_C void | ScrollToMakeItemVisible | ( | TInt | aItemIndex | ) | const |
Makes an item visible in the list, scrolling it if necessary.
Parameter | Description |
---|---|
aItemIndex | Index of the item to reveal. |
IMPORT_C TBool | ScrollingDisabled | ( | ) |
Checks if the kinetic scrolling is currently enabled in the list.
Returns: ETrue if kinetic scrolling is enabled, EFalse otherwise.
IMPORT_C const CListBoxView::CSelectionIndexArray * | SelectionIndexes | ( | ) | const |
Gets for list boxes selection indexes.
Returns: Pointer to the list boxes in array of selection indexes.
IMPORT_C void | SetContainerWindowL | ( | const CCoeControl & | aContainer | ) | [virtual] |
Reimplemented from CCoeControl::SetContainerWindowL(const CCoeControl &)
Creates an own window for the list box or draws the list box to an old window defined by the aContainer.
Parameter | Description |
---|---|
aContainer | Defines the container where the list box will be drawn. |
IMPORT_C void | SetCurrentItemIndex | ( | TInt | aItemIndex | ) | const |
Changes the current item index to the selected item index. Does not redraw the list. If the item was not previously visible it is set to the top item in the view.
Parameter | Description |
---|---|
aItemIndex | Defines the index of the selected item. |
IMPORT_C void | SetCurrentItemIndexAndDraw | ( | TInt | aItemIndex | ) | const |
Changes the current item index to the selected item index and redraws the view.
Parameter | Description |
---|---|
aItemIndex | Defines the index of the selected item. |
IMPORT_C void | SetDimmed | ( | TBool | aDimmed | ) | [virtual] |
Reimplemented from CCoeControl::SetDimmed(TBool)
This function sets a flag within the control which indicates whether or not the control is dimmed (greyed out).
Parameter | Description |
---|---|
aDimmed | ETrue dimmed. EFalse not dimmed. |
IMPORT_C void | SetHorizontalMargin | ( | TInt | aMargin | ) | [protected] |
Sets the horizontal margin.
Parameter | Description |
---|---|
aMargin | The required horizontal margin. |
IMPORT_C void | SetItemEditor | ( | MEikListBoxEditor * | aEditor | ) |
Selects an item editor for the list box.
Parameter | Description |
---|---|
aEditor | The editor that has been selected for usage. |
IMPORT_C void | SetItemHeightL | ( | TInt | aHeight | ) | [virtual] |
Sets the height of the item to the selected value.
Parameter | Description |
---|---|
aHeight | New height for the item. |
IMPORT_C void | SetItemsInSingleLine | ( | TInt | aItems | ) |
Sets the number of list items that form one grid line.
Parameter | Description |
---|---|
aItems | Number of items in one grid line. |
IMPORT_C void | SetLaunchingButton | ( | CEikButtonBase * | aButton | ) |
Provides a call back mechanism to the button which just launched a popout menu.
Parameter | Description |
---|---|
aButton | The button which just launched a popout menu. |
IMPORT_C void | SetListBoxObserver | ( | MEikListBoxObserver * | aObserver | ) |
Sets the observer for the list box.
Parameter | Description |
---|---|
aObserver | Wanted observer for the list box. |
IMPORT_C void | SetMarkingMode | ( | TBool | aEnable | ) |
Turns the marking mode on / off.
Parameter | Description |
---|---|
aEnable | ETrue to turn marking mode on EFalse to turn marking mode off |
IMPORT_C void | SetMarkingModeObserver | ( | MAknMarkingModeObserver * | aObserver | ) |
Sets the marking mode observer.
Parameter | Description |
---|---|
aObserver | Marking mode observer, NULL removes the existing observer. |
Removes pointer event filtering for list items.
When there are two pointer up events on the same item at short interval, listbox will only get the first one and drop the second one. This method forces listbox to handle all pointer up events.
Parameter | Description |
---|---|
aItemIndexes | Array of item indexes to be added. |
IMPORT_C void | SetReasonForFocusLostL | ( | TReasonForFocusLost | aReasonForFocusLost | ) | [protected] |
Sets the reason for the list box?s loss of focus.
This is required so the list box can determine whether loss of focus is due to an external control or an internal component.
Parameter | Description |
---|---|
aReasonForFocusLost | The reason for the loss of focus. |
IMPORT_C void | SetScrollBarFrame | ( | CEikScrollBarFrame * | aScrollBarFrame, |
TScrollBarOwnerShip | aOwnerShip | |||
) |
Sets the given scroll bar frame for the list box with the given ownership leve.
Parameter | Description |
---|---|
aScrollBarFrame | The new frame that is going to be used. |
aOwnerShip | Ownership level of the scroll bar frame. |
IMPORT_C void | SetSelectionIndexesL | ( | CListBoxView::CSelectionIndexArray * | aArrayOfSelectionIndexes | ) |
Assigns a array of selection indexes for the list box.
Parameter | Description |
---|---|
aArrayOfSelectionIndexes | The index array that is to be assigned to the list Box. |
IMPORT_C void | SetShortcutValueFromPrevList | ( | TInt | aValue | ) | [virtual] |
No Implementation.
Parameter | Description |
---|---|
aValue | Not Used. |
IMPORT_C void | SetTopItemIndex | ( | TInt | aItemIndex | ) | const [virtual] |
Sets the selected item to be the top item.
Parameter | Description |
---|---|
aItemIndex | Index for the item to be set as the top item. |
IMPORT_C void | SetVerticalMargin | ( | TInt | aMargin | ) | [protected] |
Sets the vertical margin.
Parameter | Description |
---|---|
aMargin | The required vertical margin. |
IMPORT_C void | SetViewRectFromClientRect | ( | const TRect & | aClientRect | ) | [protected] |
Sets the view rectangle from the client rectangle making sure a whole number of items is displayed.
Parameter | Description |
---|---|
aClientRect | The client rectangle |
IMPORT_C void | SetViewRectHeightAdjustment | ( | TInt | aAdjustment | ) | [protected] |
Sets the view rectangle height adjustment.
Parameter | Description |
---|---|
aAdjustment | New adjustment. |
IMPORT_C void | SimulateArrowKeyEventL | ( | TKeyCode | aKeyCode | ) | [protected] |
Simulates an arrow key event.
If the list box flags include EMultipleSelection, this has the effect of pressing SHIFT with the arrow key represented by aKeyCode. Calls CEikListBox::OfferKeyEventL() with aKeyCode translated into a key event.
Parameter | Description |
---|---|
aKeyCode | A key code. |
IMPORT_C void | SizeChanged | ( | ) | [protected, virtual] |
Reimplemented from CCoeControl::SizeChanged()
Responds to changes to the size and position of the contents of this control.
For a simple control this might include text or graphics. For a compound control it sets the size and position of the components. It has an empty default implementation and should be implemented by the CCoeControl-derived class.
The function is called whenever SetExtent(), SetSize(), SetRect(), SetCornerAndSize(), or SetExtentToWholeScreen() are called on the control. Note that the window server does not generate size-changed events: SizeChanged() gets called only as a result of calling the functions listed above. Therefore, if a resize of one control affects the size of other controls, it is up to the application to ensure that it handles the re-sizing of all affected controls.
IMPORT_C void | StopEditingL | ( | TBool | aUpdateModel | ) |
Stops editing and deletes the item editor.
The function reports an EEventEditingStopped event to any list box observer, and updates the list box model if aUpdateModel is ETrue.
Parameter | Description |
---|---|
aUpdateModel | If ETrue the list box model is updated. |
IMPORT_C void | SuspendEffects | ( | TBool | aSuspend | ) |
Suspends transitions effects.
Parameter | Description |
---|---|
aSuspend | ETrue to suspend effects, EFalse to re-enable them. |
IMPORT_C TInt | TopItemIndex | ( | ) | const |
Gets the index number of the top item.
Returns: Index number for the top item.
IMPORT_C void | UndoLastChar | ( | ) | [protected] |
Undoes changes from the match buffer that have been caused by the last match with a character.
IMPORT_C void | UpdateCurrentItem | ( | TInt | aItemIndex | ) | const [protected, virtual] |
Sets an item as the current item, even if it is not currently visible. Redraws the list box to reflect the change. This should not be called from within another Draw function.
Parameter | Description |
---|---|
aItemIndex | The index of the list box item to update. |
IMPORT_C void | UpdateItemDrawerColors | ( | ) | [protected] |
Updates the item drawer colours in line with the colours in effect for the Uikon environment. Has no effect if there is no item drawer.
void | UpdateMarkUnmarkMSKL | ( | ) | const [protected] |
If MiddleSoftKey is either Mark or Unmark, this method sets MSK according to the current item selection state.
IMPORT_C void | UpdateScrollBarThumbs | ( | ) | const [protected, virtual] |
Updates the position of this list box?s scroll bars? thumbs to reflect the horizontal and vertical position of the list view within the list.
IMPORT_C void | UpdateViewColors | ( | ) | [protected] |
Updates the view colours in line with the colours in effect for the Uikon environment. Has no effect if there is no view.
IMPORT_C TInt | VerticalInterItemGap | ( | ) | const |
Gets the size of the vertical gap between items. This space is used by the view to allow a box to be drawn around each item.
Returns: Size of the vertical gap in pixels.
IMPORT_C TInt | VerticalMargin | ( | ) | const [protected] |
This function gets the vertical margin. This function is deprecated, use CEikListBox::ListBoxMargins() instead, this provides a more accurate value due to the bit shifting involved.
Returns: The vertical margin in pixels.
IMPORT_C TInt | ViewRectHeightAdjustment | ( | ) | const [protected] |
Gets the view rectangle height adjustment.
These are the adjustments that were made to the view rectangle when the SetViewRectFromClientRect() function was called.
Returns: Height adjustment.