Symbian Developer Library

SYMBIAN OS V6.1 EDITION FOR C++

[Index] [Glossary] [Previous] [Next]



Location: eiklbx.h
Link against: eikcoctl.lib

Class CEikSnakingListBox

CEikSnakingListBox

Support

Supported from 6.0

Description

Snaking list box.

This is a list box that scrolls horizontally, displaying its items in as many vertical columns as needed. Columns are arranged across the control from left to right; within columns, items are arranged from top to bottom. The flow of items or text ‘snakes’ across the face of the control.

This is a flexible control class that makes good use of short, wide display areas; subclasses of CEikSnakingListBox are used in the EPOC shell for the file list and for the control panel. A standard user subclass, CEikSnakingTextListBox, also exists.

Derivation

CBaseBase class for all classes to be instantiated on the heap
CCoeControlControl base class from which all other controls are derived
CEikBorderedControlA control which is drawn surrounded by a rectangular border
CEikListBoxBase class for an on-screen list box control from which one or more items can be selected
CEikSnakingListBoxSnaking list box
MEikScrollBarObserverThis mixin is implemented by classes wishing to receive notification about scroll events from a scroll bar

Defined in CEikSnakingListBox:
AdjustRectHeightToWholeNumberOfItems(), AdjustTopItemIndex(), CEikSnakingListBox(), ColumnWidth(), GetColorUseListL(), HandleDragEventL(), HandleLeftArrowKeyL(), HandleResourceChange(), HandleRightArrowKeyL(), HandleViewRectSizeChangeL(), HorizScrollGranularityInPixels(), HorizontalNudgeValue(), MakeViewClassInstanceL(), MoveToNextOrPreviousItemL(), RestoreClientRectFromViewRect(), SetColumnWidth(), SetTopItemIndex(), SizeChanged(), ~CEikSnakingListBox()

Inherited from CBase:
operator new()

Inherited from CCoeControl:
ActivateGc(), ActivateL(), BackedUpWindow(), CapturesPointer(), ClaimPointerGrab(), CloseWindow(), ConstructFromResourceL(), ControlContext(), ControlEnv(), CopyControlContextFrom(), CreateBackedUpWindowL(), CreateWindowL(), DeactivateGc(), DrawDeferred(), DrawNow(), DrawableWindow(), EnableDragEvents(), GetColor(), GetHelpContext(), GrabbingComponent(), HandleComponentControlsResourceChange(), HandlePointerBufferReadyL(), HandleRedrawEvent(), IgnoreEventsUntilNextPointerUp(), Index(), IsActivated(), IsBackedUp(), IsBeingDestroyed(), IsBlank(), IsDimmed(), IsFocused(), IsNonFocusing(), IsReadyToDraw(), IsVisible(), MakeVisible(), Observer(), OverrideColorL(), OwnsWindow(), Position(), PositionChanged(), PositionRelativeToScreen(), PrepareForFocusGainL(), PrepareForFocusLossL(), Rect(), RecursivelyMergedInputCapabilities(), ReportEventL(), ResetGc(), SetAllowStrayPointers(), SetBlank(), SetCanDrawOutsideRect(), SetComponentsToInheritVisibility(), SetContainerWindow(), SetControlContext(), SetCornerAndSize(), SetCornerAndSizeL(), SetExtent(), SetExtentL(), SetExtentToWholeScreen(), SetExtentToWholeScreenL(), SetFocus(), SetFocusing(), SetGloballyCapturing(), SetNeighbor(), SetNonFocusing(), SetObserver(), SetPointerCapture(), SetPosition(), SetRect(), SetRectL(), SetSize(), SetSizeL(), SetSizeWithoutNotification(), SetSizeWithoutNotificationL(), Size(), SizeChangedL(), SystemGc(), Window()

Inherited from CEikBorderedControl:
Border(), HasBorder(), SetAdjacent(), SetBorder(), iBorder

Inherited from CEikListBox:
Anonymous, BackColor(), BottomItemIndex(), Buffer(), CalcHeightBasedOnNumOfItems(), CalcSizeInPixels(), CalcWidthBasedOnNumOfChars(), CalcWidthBasedOnRequiredItemWidth(), CalculatePopoutRect(), CheckCreateBufferL(), CheckCreateExtension(), CheckCreateExtensionL(), ClearMargins(), ClearMatchBuffer(), ClearSelection(), ComponentControl(), ConstructL(), CountComponentControls(), CreateMatchBufferL(), CreateScrollBarFrameL(), CreateViewL(), CurrentItemIndex(), Draw(), DrawItem(), DrawMatcherCursor(), ECreateOwnWindow, EIncrementalMatching, EItemDoubleClicked, EKeepModel, ELeftDownInViewRect, EMultipleSelection, ENoExtendedSelection, ENoFirstLetterMatching, EPaintedSelection, EPopout, EScrollBarSizeExcluded, EStateChanged, EditItemL(), FocusChanged(), HandleItemAdditionL(), HandleItemRemovalL(), HandlePointerEventL(), HandleScrollEventL(), HorizontalMargin(), InputCapabilities(), InterItemGap(), IsMatchBuffer(), ItemEditor(), ItemExists(), ItemHeight(), KEikListBoxInterItemGap, KEikMaxMatchingBufferLength, ListBoxMargins(), MatchBuffer(), MatchTypedCharL(), MinimumSize(), Model(), OfferKeyEventL(), ReasonForFocusLostL(), ReportListBoxEventL(), Reset(), ResetItemEditor(), RestoreCommonListBoxPropertiesL(), ScrollBarFrame(), ScrollToMakeItemVisible(), SelectionIndexes(), SetContainerWindowL(), SetCurrentItemIndex(), SetCurrentItemIndexAndDraw(), SetDimmed(), SetHorizontalMargin(), SetItemEditor(), SetItemHeightL(), SetLaunchingButton(), SetListBoxObserver(), SetReasonForFocusLostL(), SetSelectionIndexesL(), SetVerticalMargin(), SetViewRectFromClientRect(), SimulateArrowKeyEventL(), StopEditingL(), TFlags, TopItemIndex(), UndoLastChar(), UpdateCurrentItem(), UpdateItemDrawerColors(), UpdateScrollBarThumbs(), UpdateScrollBarsL(), UpdateViewColors(), VerticalInterItemGap(), VerticalMargin(), View(), ViewRectHeightAdjustment(), iItemDrawer, iItemHeight, iLaunchingButton, iListBoxFlags, iListBoxObserver, iModel, iRequiredHeightInNumOfItems, iSBFrame, iView

Inherited from MEikScrollBarObserver:
EEikScrollBottom, EEikScrollDown, EEikScrollEnd, EEikScrollHome, EEikScrollLeft, EEikScrollPageDown, EEikScrollPageLeft, EEikScrollPageRight, EEikScrollPageUp, EEikScrollRight, EEikScrollThumbDragHoriz, EEikScrollThumbDragVert, EEikScrollThumbReleaseHoriz, EEikScrollThumbReleaseVert, EEikScrollTop, EEikScrollUp, TEikScrollEvent


Construction and destruction


CEikSnakingListBox()

CEikSnakingListBox();

Description

Empty default constructor.


MakeViewClassInstanceL()

virtual CListBoxView* MakeViewClassInstanceL();

Description

Creates an instance of the view class.

This function is called during construction to create (but not second-phase construct) an instance of the correct view class for this list box control. In the case of the snaking list box, a CSnakingListBoxView is returned.

This function overrides CEikListBox::MakeViewClassInstanceL().

Return value

CListBoxView*

The view which will be used by the list box being created.


~CEikSnakingListBox()

~CEikSnakingListBox();

Description

Destructor.

[Top]


Current item


MoveToNextOrPreviousItemL()

protected: void MoveToNextOrPreviousItemL(TPoint aPoint);

Description

Moves to the next or previous item in the direction of a pen tap.

This function is used by HandleDragEventL() to highlight the next or previous item in the direction of a point.

Parameters

TPoint aPoint

The current position of the cursor.

[Top]


Column widths


ColumnWidth()

TInt ColumnWidth() const;

Description

Gets the width of this list box’s columns.

Return value

TInt

Width of each column.

See also:


SetColumnWidth()

void SetColumnWidth(TInt aColumnWidth);

Description

Sets the width of all columns in the list box.

Parameters

TInt aColumnWidth

New column width.

See also:

[Top]


List box framework implementations

Description

The following member functions override functions declared virtual in CEikListBox:


HorizScrollGranularityInPixels()

protected: virtual TInt HorizScrollGranularityInPixels() const;

Description

Gets the granularity of horizontal scroll actions. For snaking list boxes, this is the same as the column width.

Return value

TInt

Movement grain size in pixels.


HorizontalNudgeValue()

protected: virtual TInt HorizontalNudgeValue() const;

Description

Gets the number of horizontal scroll grains to move left or right when the nudge buttons are pressed.

Return value

TInt

Number of grains to move left or right by.


SetTopItemIndex()

virtual void SetTopItemIndex(TInt aItemIndex) const;

Description

Sets the top item’s index.

Parameters

TInt aItemIndex

Index of the item to set as the top item.

See also:


AdjustTopItemIndex()

protected: virtual void AdjustTopItemIndex() const;

Description

Sets which item is displayed at the top of the view. Ensures that the rightmost column has at least one element in it in list boxes with a large number of items. If all the list box’s items can be displayed in the view, then this function does nothing.


AdjustRectHeightToWholeNumberOfItems()

protected: virtual TInt AdjustRectHeightToWholeNumberOfItems(TRect& aRect) const;

Description

Shrinks the view rectangle to fit a whole number of items

Parameters

TRect& aRect

Rectangle to adjust.

Return value

TInt

Number of pixels removed vertically.


GetColorUseListL()

void GetColorUseListL(CArrayFix<TCoeColorUse>& aColorUseList) const;

Description

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.

Parameters

CArrayFix<TCoeColorUse>& aColorUseList

On return, a list of logical colours.


HandleResourceChange()

void HandleResourceChange(TInt aType);

Description

Handles a change in a resource.

The types (aType) of list box resources handled are those which are shared across the environment, for example, colours or fonts.

Parameters

TInt aType

The type of resource that has changed.


RestoreClientRectFromViewRect()

protected: virtual void RestoreClientRectFromViewRect(TRect& aClientRect) const;

Description

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.

Parameters

TRect& aClientRect

On return contains a size for the client area in pixels.


HandleLeftArrowKeyL()

protected: virtual void HandleLeftArrowKeyL(CListBoxView::TSelectionMode aSelectionMode);

Description

Handles left arrow keypresses.

Moves the cursor into the correct column and clears any matcher buffer that may have been built up.

Parameters

CListBoxView::TSelectionMode aSelectionMode

The current selection mode.


HandleRightArrowKeyL()

protected: virtual void HandleRightArrowKeyL(CListBoxView::TSelectionMode aSelectionMode);

Description

Handles right arrow keypresses.

Moves the cursor into the correct column and clears any matcher buffer that may have been built up.

Parameters

CListBoxView::TSelectionMode aSelectionMode

The current selection mode.


HandleDragEventL()

protected: virtual void HandleDragEventL(TPoint aPointerPos);

Description

Handles a drag event.

Updates the view and scroll bars when a drag event has occurred. If you drag out of the current item any the match buffer is cleared.

Parameters

TPoint aPointerPos

Position of the drag event.


HandleViewRectSizeChangeL()

protected: virtual void HandleViewRectSizeChangeL();

Description

Handles a change in the size of the viewing rectangle.

[Top]


Control environment framework implementations

Description

The following member functions override functions declared virtual in CCoeControl:


SizeChanged()

protected: virtual void SizeChanged();

Description

Responds to the size being changed. This function over-ridest the CCoeControl::SizeChanged() function.