Attempt to represent the S^2->S^3 header reorganisation as a series of "hg rename" operations
2 * Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies).
4 * This component and the accompanying materials are made available
5 * under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members
6 * which accompanies this distribution, and is available
7 * at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
9 * Initial Contributors:
10 * Nokia Corporation - initial contribution.
20 #if !defined(__EIKLBV_H__)
23 #if !defined(__E32BASE_H__)
27 #if !defined(__GDI_H__)
31 class CListItemDrawer;
35 class CWsScreenDevice;
38 class CListBoxViewExtension;
42 // class MListVisibiltyObserver
45 class MListVisibilityObserver
48 virtual TBool IsVisible() const = 0;
54 * A list box view displays the list items which are currently visible in
55 * a list box. List box views draw each of the items for display using
56 * methods defined in their associated list box drawer.
58 * Together with its list item drawer, a @c CListBoxView encapsulates the
59 * on-screen appearance of data in a list box.
61 * List box views also encapsulate item selection, the current item, and the
62 * fundamentals of how the selection and the current item are updated according
63 * to user input. Input events themselves are handled by @c CEikListBox,
64 * which calls member functions of @c CListBoxView appropriately.
66 * This class is sufficient for plain list box views, and may be derived from
67 * in order to provide more complex list views. @c TechView supplies and uses
68 * the classes @c CHierarchicalListBoxView and @c CSnakingListBoxView, which
69 * provide two kinds of indented list views.
71 class CListBoxView : public CBase
76 * Cursor movement flags. These describe the cursor movements recognised by
81 /** Cursors movement to next item. */
84 /** Cursors movement to previous item. */
87 /** Cursors movement to next column. */
90 /** Cursors movement to previous column. */
91 ECursorPreviousColumn,
93 /** Cursors movement to previous page. */
96 /** Cursors movement to next page. */
99 /** Cursors movement to the first item. */
102 /** Cursors movement to the last item. */
105 /** Cursors movement to the next screen. */
108 /** Cursors movement to the previous screen. */
113 * List box view flags.
115 * These flags may be combined with a logical OR to get a combination of
120 /** A selection anchor exists. */
121 EAnchorExists = 0x0001,
123 /** The view is emphasised. */
124 EEmphasized = 0x0002,
126 /** The view is dimmed. */
129 /** List box view has a cursor for incremental matching. */
130 EHasMatcherCursor = 0x0008,
132 /** Redraw is disabled. */
133 EDisableRedraw = 0x0010,
135 /** If set, selected items are painted. */
136 EPaintedSelection = 0x0020,
138 /** Item marking enabled. */
139 EMarkSelection = 0x0040,
141 /** Item unmarking enabled. */
142 EUnmarkSelection = 0x0080,
144 /** Item count changes enabled. */
145 EItemCountModified = 0x0100,
147 /** Vertical offset has changed. */
148 EOffsetChanged = 0x0200,
152 * Modes for modifying the selection.
154 * Changing the current item of a list box view may also affect which items
155 * are selected. The selection mode of such an action describes how (or if)
156 * the selection is altered by the action.
158 * Each function of @c CListBoxView which affects the current item is
159 * passed an appropriate selection mode by the calling input handler method
160 * of @c CEikListBox. The mode is varied according to the keyboard
161 * modifiers held down by the user, or whether a pointer action was a tap
164 * Note that the behaviour of list box views may vary with the target
165 * phone due to the wide range of possible input devices.
166 * The following description assumes a phone with a pointer and a keyboard.
171 * The selection is not changed by actions while this is in effect,
172 * holding CTRL while pressing cursor up or down for example.
177 * Only a single item in the list is allowed to be selected by an
178 * action; when selecting individual items with the pointer, or
179 * moving using the cursor keys without any modifiers for example.
184 * A single continuous run of items can be added to the selection array
185 * by an action, when keyboard-selecting with the shift key held down,
186 * or when sweeping a selection with the pointer for example.
188 EContiguousSelection,
191 * Any single item in the list may be added to the selection by an
192 * action, when selecting or drag-selecting with the pointer when the
193 * @c CTRL key is held down for example.
198 * Any single item in the list may be removed from the selection by an
199 * action, when unselecting for example.
201 EDisjointMarkSelection,
204 * Multiple items can be added to the selection array by an action,
205 * when selecting with the edit key for example.
210 * Mark mode is changed to @c EUnmarkSelection if item is marked or
211 * @c EMarkSelection if item is not marked by an action, when selecting
212 * or unselecting item for example.
217 /** The items which are selected within a list box list. */
218 typedef CArrayFix<TInt> CSelectionIndexArray;
225 IMPORT_C ~CListBoxView();
228 * C++ default constructor.
230 * Allocates an area of memory for a @c CListBoxView, and begins its
233 IMPORT_C CListBoxView();
236 * By default Symbian 2nd phase constructor is private.
238 * This function completes the initialisation of a default-constructed list
239 * box view. The item drawer’s graphics context is created on @c aScreen,
240 * and the list item drawer’s graphics context is set to this. See
241 * @c CListItemDrawer::SetGc().
243 * @param aListBoxModel The list box model to use.
244 * @param aItemDrawer A default-constructed item drawer.
245 * @param aScreen Screen on which to display.
246 * @param aGroupWin This list box view’s window group.
247 * @param aWsWindow Window for this view.
248 * @param aDisplayArea The viewing rectangle this list box view is to use.
249 * @param aItemHeight Height of a single list item.
251 IMPORT_C virtual void ConstructL(MListBoxModel* aListBoxModel,
252 CListItemDrawer* aItemDrawer,
253 CWsScreenDevice* aScreen,
254 RWindowGroup* aGroupWin,
256 const TRect& aDisplayArea,
259 // functions for accessing the view rect (the area of the host window in
260 // which the items are drawn)
262 * Gets the list box’s view rectangle.
264 * @return This list box’s view rectangle.
266 IMPORT_C TRect ViewRect() const;
269 * Sets the area within the list window in which the view can draw itself.
271 * @param aRect New view rectangle.
273 IMPORT_C void SetViewRect(const TRect& aRect);
275 // misc. access functions for the main attributes
277 * Gets the current item’s index.
279 * @return Index number of the current item.
281 IMPORT_C virtual TInt CurrentItemIndex() const;
284 * Set the index of the current item. This function changes the current
285 * item, but does not redraw the list view or update the selection.
287 * @param aItemIndex Which item to make current.
288 * @panic EEikPanicListBoxInvalidCurrentItemIndexSpecified Panics if the
289 * given index is not valid.
291 IMPORT_C void SetCurrentItemIndex(TInt aItemIndex);
294 * Gets the index of the item at the top of the view.
296 * @return The item currently displayed at the top of this list box view.
298 IMPORT_C TInt TopItemIndex() const;
301 * Sets the item at the top of the view by its index in the list of all
302 * items. This function also invokes @c CalcBottomItemIndex().
304 * @param aItemIndex Index of the item to start the view at.
305 * @panic EEikPanicListBoxInvalidTopItemIndexSpecified Panics if the given
306 * index is not valid.
308 IMPORT_C virtual void SetTopItemIndex(TInt aItemIndex);
311 * Gets the index of the item at the bottom of this view.
313 * @return Index of the item at the bottom of this view.
315 IMPORT_C TInt BottomItemIndex() const;
318 * Recalculates the index of the bottom item in the list by using the top
319 * item index and the size of the display.
321 * This function is called by the owning list box control when either the
322 * size of the list box or the number of items in its model changes.
324 IMPORT_C virtual void CalcBottomItemIndex();
327 * Sets the item height.
329 * @param aItemHeight New item height.
331 IMPORT_C virtual void SetItemHeight(TInt aItemHeight);
333 // functions that support incremental matching
335 * Sets the match cursor’s colour.
338 * @param aColor Colour in which to display the incremental match cursor.
340 IMPORT_C void SetMatcherCursorColor(TRgb aColor);
343 * Sets the match cursor's position.
346 * @param aPosWithinCurrentItem Character position for the match cursor
347 * within the current item’s string.
349 IMPORT_C void SetMatcherCursorPos(TInt aPosWithinCurrentItem);
352 * Gets the match cursor’s position.
355 * @return Character position of the match cursor within the current
358 IMPORT_C TInt MatcherCursorPos() const;
361 * Draws the match cursor in its current screen position if the matcher
362 * cursor flag has been set.
364 * This is deprecated and broken and should not be used.
368 IMPORT_C virtual void DrawMatcherCursor();
371 * Hides the matcher cursor.
375 IMPORT_C void HideMatcherCursor();
378 * Sets whether the matcher cursor flag to specify whether the match
382 * @param aMatcherCursor If @c ETrue, the view will draw match cursor.
384 IMPORT_C void SetMatcherCursor(TBool aMatcherCursor);
387 * Sets whether or not items are drawn as emphasised.
389 * The function sets or resets the emphasised flag.
391 * @param aEmphasized If @c ETrue, this view will draw items emphasised.
392 * If @c EFalse will not draw items emphasised.
394 IMPORT_C void SetEmphasized(TBool aEmphasized);
397 * Sets whether items will be drawn dimmed.
399 * The function sets or resets the dim flag.
401 * @param aDimmed If @c ETrue, this view will draw items dimmed.
402 * If @c EFalse this view will not draw items dimmed.
404 IMPORT_C void SetDimmed(TBool aDimmed);
407 * Disables or enables redraws.
409 * If this flag is set to @c ETrue, all member functions which draw items
410 * will return immediately without drawing anything. Functions which update
411 * the internal state of the list box will still work, but nothing will be
412 * drawn or updated on the screen.
414 * @param aDisableRedraw Disables redraw if @c ETrue.
416 IMPORT_C void SetDisableRedraw(TBool aDisableRedraw);
419 * Tests whether redraw is disabled.
421 * @return ETrue if redraw is disabled.
423 IMPORT_C TBool RedrawDisabled() const;
426 * Sets the painted selection flag.
429 * @param aPaintedSelection If @c ETrue the painted selection flag is set
430 * on. If @c EFalse the selection flag is set off. If NULL the
431 * painted selection flag is cleared.
433 IMPORT_C void SetPaintedSelection( TBool aPaintedSelection );
435 // functions that support selection
437 * Gets a pointer to the selection list of this view.
439 * @return Pointer to an array describing the items
440 * in the list which are currently selected. The object pointed
441 * at is owned by the @c CListBoxView.
443 IMPORT_C const CSelectionIndexArray* SelectionIndexes() const;
446 * Gets a copy of the array of currently selected items.
448 * @param[in,out] aSelectionArray An instantiated @c CSelectionIndexArray.
449 * On return, contains a copy of selection indexes.
450 * @panic EEikPanicListBoxInvalidSelIndexArraySpecified Panics if the given
451 * selection index array is not valid.
452 * @panic EEikPanicListBoxNoSelIndexArray Panics if selection indexes have
453 * not been defined for this class.
455 IMPORT_C void GetSelectionIndexesL(
456 CSelectionIndexArray* aSelectionArray) const;
459 * Sets the currently selected items of this view from a selection index
462 * @param aSelectionIndexes Items to select.
463 * @panic EEikPanicListBoxInvalidSelIndexArraySpecified Panics if the given
464 * selection index array is not valid.
466 IMPORT_C void SetSelectionIndexesL(const CSelectionIndexArray*
470 * Resets the selection state so that there is nothing selected.
472 * @panic EEikPanicListBoxNoSelIndexArray Panics if selection indexes have
473 * not been defined for this class.
475 IMPORT_C void ClearSelection();
477 // select/highlight items without moving the cursor
479 * Updates item selection.
481 * @param aSelectionMode The selection mode.
483 IMPORT_C virtual void UpdateSelectionL(TSelectionMode aSelectionMode);
486 * Toggles the selection of an item.
488 * @param aItemIndex Item to toggle.
489 * @panic EEikPanicListBoxNoSelIndexArray Panics if selection indexes have
490 * not been defined for this class.
492 IMPORT_C void ToggleItemL(TInt aItemIndex);
495 * Selects an item by index.
497 * This function leaves if memory could not be allocated for an extra item
498 * in the array of selected items.
500 * @param aItemIndex Item to select.
501 * @panic EEikPanicListBoxNoSelIndexArray Panics if selection indexes have
502 * not been defined for this class.
504 IMPORT_C void SelectItemL(TInt aItemIndex);
507 * Deselects an item by index.
509 * @param aItemIndex Item to deselect.
510 * @panic EEikPanicListBoxNoSelIndexArray Panics if selection indexes have
511 * not been defined for this class.
513 IMPORT_C void DeselectItem(TInt aItemIndex);
516 * Sets the anchor to the specified item.
518 * @param aItemIndex The index of the item at which the anchor is set.
520 IMPORT_C void SetAnchor(TInt aItemIndex);
523 * Resets the anchor index, the active end and the @c EAnchorExists flag.
525 IMPORT_C void ClearSelectionAnchorAndActiveIndex();
527 // functions that support scrolling
529 * Scrolls vertically to make a particular item visible.
531 * @param aItemIndex The item to make visible.
532 * @return @c ETrue if any scrolling was done, @c EFalse if no
533 * scrolling was necessary.
535 IMPORT_C virtual TBool ScrollToMakeItemVisible(TInt aItemIndex);
538 * Sets the index of the item to be the top item.
540 * @param aNewTopItemIndex The item to scroll to.
542 IMPORT_C virtual void VScrollTo(TInt aNewTopItemIndex);
545 * Sets the index of the item to be the top item.
547 * This two argument version returns the area which needs redrawing via
548 * @c aMinRedrawRect&. This function does not perform the redraw.
550 * @param aNewTopItemIndex The distance by which to scroll.
551 * @param aMinRedrawRect On return, the minimum rectangle to redraw.
553 IMPORT_C virtual void VScrollTo(TInt aNewTopItemIndex,
554 TRect& aMinRedrawRect);
557 * Scrolls horizontally by the specified number of pixels.
559 * @param aHScrollAmount The distance to scroll by in pixels. A negative
560 * value scrolls to the left, a positive value scrolls to the right.
562 IMPORT_C virtual void HScroll(TInt aHScrollAmount);
565 * Gets the offset of the visible portion of the data from the left margin
568 * @return The horizontal scroll offset in pixels.
570 IMPORT_C TInt HScrollOffset() const;
573 * Sets the horizontal scroll offset in pixels.
575 * @param aHorizontalOffset New value for the horizontal scroll offset, in
578 IMPORT_C void SetHScrollOffset(TInt aHorizontalOffset);
581 * Gets the width of the widest item in the list in pixels.
583 * @return Data width in pixels.
585 IMPORT_C TInt DataWidth() const;
588 * Recalculates the data width of this list box view from the item width
589 * of its list item drawer. This method is called directly by
590 * @c CEikListBox when the list box’s size changes or when data is added.
592 IMPORT_C virtual void CalcDataWidth();
595 * Gets the visible width of the specified rectangle in pixels. This
596 * function is called by @c CListBoxView itself on its own viewing
599 * @param aRect The rectangle to get the visible width for.
600 * @return Visible width of @c aRect.
602 IMPORT_C virtual TInt VisibleWidth(const TRect& aRect) const;
605 * Calculates which item should be selected in order to make a
606 * particular item visible. Calling
607 * @c VScrollTo(CalcNewTopItemIndexSoItemIsVisible(idx)), for example,
608 * would make the item whose index is @c idx visible.
610 * @param aItemIndex The index of the new top item.
611 * @return The item to be selected.
613 IMPORT_C virtual TInt CalcNewTopItemIndexSoItemIsVisible(
614 TInt aItemIndex) const;
616 // functions that support drawing
618 * Draws every visible item into the specified rectangle.
620 * As implemented in @c CListBoxView, this function's argument is ignored
621 * and the internal viewing rectangle is used. See @c SetViewRect().
623 * @param aClipRect The rectangle to draw into, this is ignored. Default
625 * @panic EEikPanicListBoxNoModel Panics if the list box model for this
626 * class has not been defined.
628 IMPORT_C virtual void Draw(const TRect* aClipRect = NULL) const;
631 * Draws the specified item via @c CListBoxDrawer::DrawItem() if it is
634 * @param aItemIndex Index number of the item to draw.
636 IMPORT_C virtual void DrawItem(TInt aItemIndex) const;
639 * Sets list box backroung text. This text is visible if the list box
642 * @param aText The text for the empty list box background.
644 IMPORT_C void SetListEmptyTextL(const TDesC& aText);
647 * Gets an empty list box text.
649 * @return Pointer the empty list box text.
651 inline const TDesC* EmptyListText() const;
654 * Tests whether an item is selected.
656 * @param aItemIndex Index of item to test.
657 * @return @c ETrue if the item is selected.
659 IMPORT_C TBool ItemIsSelected(TInt aItemIndex) const;
662 * Tests whether an item is visible.
664 * @param aItemIndex Index of item to be tested.
665 * @return @c ETrue if the item is visible.
667 IMPORT_C TBool ItemIsVisible(TInt aItemIndex) const;
670 * Gets the on-screen position of an item.
672 * @param aItemIndex Index of an item.
673 * @return Position of the item.
675 IMPORT_C virtual TPoint ItemPos(TInt aItemIndex) const;
678 * Gets the on-screen size of an item.
680 * As implemented in @c CListBoxView, all items report the same size.
681 * The size returned may be larger than the width of the list box view, but
682 * will not be smaller.
684 * @param aItemIndex Index of an item. Default value is 0.
685 * @return Size of the item.
687 IMPORT_C virtual TSize ItemSize(TInt aItemIndex=0) const;
690 * Sets the colour in which to display text.
692 * @param aColor Colour in which to display text.
694 IMPORT_C void SetTextColor(TRgb aColor);
697 * Sets the background colour.
699 * @param aColor The background colour.
701 IMPORT_C void SetBackColor(TRgb aColor);
704 * Gets the colour in which text is to be displayed.
706 * @return Current text colour.
708 IMPORT_C TRgb TextColor() const;
711 * Gets the background colour for this view.
713 * @return The background colour.
715 IMPORT_C TRgb BackColor() const;
718 * Moves the current item cursor in the specified direction. This function
719 * is called by @c CEikListBox in response to user input.
721 * @param aCursorMovement The cursor movement to apply.
722 * @param aSelectionMode The selection mode of the calling list box.
724 IMPORT_C virtual void MoveCursorL(TCursorMovement aCursorMovement,
725 TSelectionMode aSelectionMode);
728 * Moves to the specified item, sets it as the current item and scrolls the
729 * display to make the item visible.
731 * @param aTargetItemIndex The index of the item to which to move.
732 * @param aSelectionMode The selection mode.
734 IMPORT_C virtual void VerticalMoveToItemL(TInt aTargetItemIndex,
735 TSelectionMode aSelectionMode);
738 * Converts a pixel position into an item index.
740 * The function returns @c ETrue and sets @c aItemIndex to the index of the
741 * item whose bounding box contains @c aPosition. Returns @c EFalse if no
744 * @param aPosition A position relative to the origin of the list box
746 * @param aItemIndex Is set to the item at that position.
747 * @return @c ETrue if there was an item at @c aPosition.
749 IMPORT_C virtual TBool XYPosToItemIndex(TPoint aPosition,
750 TInt& aItemIndex) const;
753 * Gets the number of items that will fit into a given rectangle.
755 * @param aRect The rectangle.
756 * @return The number of items that will fit into the given rectangle.
758 IMPORT_C virtual TInt NumberOfItemsThatFitInRect(const TRect& aRect) const;
761 * Sets the visibility observer.
763 * @param aObserver New visibility observer for this control.
765 void SetVisibilityObserver(MListVisibilityObserver* aObserver);
768 * Tests if this view is visible.
770 * @return @c ETrue if this view is visible. @c EFalse if this view
771 * is not visible or does not exist.
773 IMPORT_C TBool IsVisible() const;
776 * Gets the object used by this list box view to draw its items.
778 * @return Pointer to the list box item drawer.
780 inline CListItemDrawer* ItemDrawer() const;
785 * @param aClientRect Not used.
787 IMPORT_C virtual void DrawEmptyList(const TRect &aClientRect) const;
789 // disables vertical line drawing, useful only for certain
792 * Disables vertical line drawing.
794 * @param aDisable @c ETrue if disabled.
796 void DisableVerticalLineDrawing( TBool aDisable );
799 * Deselects range between given indexes.
802 * @param aItemIndex1 First index of selectable range.
803 * @param aItemIndex2 Second index of selectable range.
805 IMPORT_C void DeselectRangeL(TInt aItemIndex1, TInt aItemIndex2);
808 * Sets the offset for view.
811 * @param aOffset Offset in pixels.
813 IMPORT_C void SetItemOffsetInPixels(TInt aOffset);
819 * @return View's offset.
821 IMPORT_C TInt ItemOffsetInPixels() const;
824 * Sets scrolling state.
828 void SetScrolling( TBool aIsScrolling );
831 * Returns item's height. All items have the same height.
834 * @return Item height.
836 TInt ItemHeight() const { return iItemHeight; }
839 * Tests whether an item is partially visible.
840 * Note that this returns @c EFalse also when item is fully visible,
841 * i.e. the whole item area is inside the list view rectangle.
843 * @param aItemIndex Index of item to be tested.
845 * @return @c ETrue if the item is partially visible,
846 * @c EFalse if it's not visible or fully visible.
848 IMPORT_C TBool ItemIsPartiallyVisible( TInt aItemIndex ) const;
852 // functions for accessing the flags
854 * Gets this view’s flags.
856 * These flags are defined by the nested enum @c TFlags (below).
858 * @return List box's flags.
860 inline TInt Flags() const;
863 * Sets this view’s flags according to a bitmask.
865 * These flags are defined by the nested enum @c TFlags (below).
867 * @param aMask Sets new flags for the list box.
869 inline void SetFlags(TInt aMask);
872 * Clears this view’s flags according to a bitmask.
874 * These flags are defined by the nested enum @c TFlags (below).
876 * @param aMask Flags to be removed.
878 inline void ClearFlags(TInt aMask);
881 * List box base class.
882 * To access @c SetFlags()/ClearFlags().
884 friend class CEikListBox;
888 * Selects items between given indexes.
891 * @param aItemIndex1 First index of selectable range.
892 * @param aItemIndex2 Second index of selectable range.
894 IMPORT_C void SelectRangeL(TInt aItemIndex1, TInt aItemIndex2);
898 * Set item index directly.
900 * @param aItemIndex New item index.
902 void SetItemIndex( TInt aItemIndex );
905 * Tests whether an item is visible. This method get bottom item index
908 * @param aItemIndex Index of item to be tested.
909 * @param aBottomItemIndex Index of item in the bottom of view.
910 * @return @c ETrue if the item is visible.
912 TBool ItemIsVisible(TInt aItemIndex, TInt aBottomItemIndex) const;
915 * Selects an item by index.
917 * This function leaves if memory could not be allocated for an extra item
918 * in the array of selected items.
920 * @param aItemIndex Item to select.
921 * @param aBottomItemIndex Index of item in the bottom of view.
922 * @panic EEikPanicListBoxNoSelIndexArray Panics if selection indexes have
923 * not been defined for this class.
925 void SelectItemL(TInt aItemIndex, TInt aBottomItemIndex);
928 * Deselects an item by index.
930 * @param aItemIndex Item to deselect.
931 * @param aBottomItemIndex Index of item in the bottom of view.
932 * @panic EEikPanicListBoxNoSelIndexArray Panics if selection indexes have
933 * not been defined for this class.
935 void DeselectItem(TInt aItemIndex, TInt aBottomItemIndex);
938 * Draws the specified item via @c CListBoxDrawer::DrawItem() if it is
941 * @param aItemIndex Index number of the item to draw.
942 * @param aBottomItemIndex Index of item in the bottom of view.
944 void DrawItem(TInt aItemIndex, TInt aBottomItemIndex) const;
947 * Updates item selection.
949 * @param aSelectionMode The selection mode.
950 * @param aBottomItemIndex Index of item in the bottom of view.
952 void UpdateSelectionL(TSelectionMode aSelectionMode, TInt aBottomItemIndex);
957 * The flags for this list box. These flags are defined by the nested enum
963 * This view’s item drawer.
966 CListItemDrawer* iItemDrawer;
972 MListBoxModel* iModel;
975 * Width (in pixels) of the longest item in the model.
980 * Index of the item at the top of the view. This is not necessarily the
981 * item at the start of the list.
986 * Index of the item at the bottom of the view. This is not necessarily the
987 * item at the end of the list.
989 TInt iBottomItemIndex;
992 * Pixel offset of the visible portion of the data from the left margin.
997 * Index of the current item.
999 TInt iCurrentItemIndex;
1002 * Height of each item in the list in pixels.
1007 * This list box view’s window.
1012 * The window group of this view.
1014 RWindowGroup* iGroupWin;
1017 * Graphics context for the control.
1022 * Graphics context for the control.
1027 * The empty list text.
1029 HBufC *iListEmptyText;
1032 * Indicates whether vertical line drawing is disabled.
1034 TBool iDisableVerticalLineDrawing /*TInt iSpare*/;
1037 TInt iMatcherCursorPos;
1038 TRgb iMatcherCursorColor;
1042 TInt iActiveEndIndex;
1043 CSelectionIndexArray* iSelectionIndexes;
1044 MListVisibilityObserver* iVisibilityObserver;
1047 * Current vertical offset of the view in pixels.
1049 TInt iVerticalOffset;
1051 CListBoxViewExtension* iExtension;
1055 NONSHARABLE_CLASS( CListBoxViewExtension ) : public CBase
1058 static CListBoxViewExtension* NewL();
1060 ~CListBoxViewExtension();
1066 CEikListBox* iListBox;
1068 TBool iScrollingDisabled;
1073 * Return text currently in the empty list text
1075 inline const TDesC* CListBoxView::EmptyListText() const
1076 { return(iListEmptyText); }
1079 class CSnakingListBoxView : public CListBoxView
1082 IMPORT_C ~CSnakingListBoxView();
1083 IMPORT_C CSnakingListBoxView();
1084 inline TInt ColumnWidth() const;
1085 IMPORT_C void SetColumnWidth(TInt aColumnWidth);
1086 IMPORT_C virtual void MoveCursorL(TCursorMovement aCursorMovement, TSelectionMode aSelectionMode);
1087 IMPORT_C virtual void SetTopItemIndex(TInt aItemIndex);
1088 IMPORT_C virtual void SetItemHeight(TInt aItemHeight);
1089 IMPORT_C virtual TBool XYPosToItemIndex(TPoint aPosition, TInt& aItemIndex) const;
1090 IMPORT_C virtual TInt NumberOfItemsThatFitInRect(const TRect& aRect) const;
1091 IMPORT_C virtual void HScroll(TInt aHScrollAmount);
1092 IMPORT_C virtual void CalcDataWidth();
1093 IMPORT_C virtual void CalcBottomItemIndex();
1094 IMPORT_C virtual void Draw(const TRect* aClipRect = NULL) const;
1095 IMPORT_C virtual TInt VisibleWidth(const TRect& aRect) const;
1096 IMPORT_C virtual TBool ScrollToMakeItemVisible(TInt aItemIndex);
1097 IMPORT_C virtual TInt CalculateHScrollOffsetSoItemIsVisible(TInt aItemIndex);
1098 IMPORT_C virtual TInt CalcNewTopItemIndexSoItemIsVisible(TInt aItemIndex) const;
1099 IMPORT_C virtual TPoint ItemPos(TInt aItemIndex) const;
1100 IMPORT_C virtual TSize ItemSize(TInt aItemIndex=0) const;
1101 IMPORT_C void CalcRowAndColIndexesFromItemIndex(TInt aItemIndex, TInt& aRowIndex, TInt& aColIndex) const;
1102 IMPORT_C void CalcItemIndexFromRowAndColIndexes(TInt& aItemIndex, TInt aRowIndex, TInt aColIndex) const;
1103 IMPORT_C virtual TInt NumberOfItemsPerColumn() const;
1105 IMPORT_C virtual void DrawItemRange(TInt aStartItemIndex, TInt aEndItemIndex) const;
1106 IMPORT_C void DrawColumnRange(TInt aStartColIndex, TInt aEndColIndex) const;
1107 IMPORT_C void MoveToPreviousColumnL(TSelectionMode aSelectionMode);
1108 IMPORT_C void MoveToNextColumnL(TSelectionMode aSelectionMode);
1109 IMPORT_C void ClearUnusedItemSpace(TInt aStartItemIndex, TInt aEndItemIndex) const;
1110 IMPORT_C void UpdateHScrollOffsetBasedOnTopItemIndex();
1111 private: // overridden from CListBoxView
1112 IMPORT_C virtual TAny* Reserved_1();
1119 inline TInt CListBoxView::Flags() const
1122 inline void CListBoxView::SetFlags(TInt aMask)
1125 inline void CListBoxView::ClearFlags(TInt aMask)
1126 { iFlags&=(~aMask); }
1128 inline CListItemDrawer* CListBoxView::ItemDrawer() const
1129 { return iItemDrawer; }
1131 inline TInt CSnakingListBoxView::ColumnWidth() const
1132 { return iColumnWidth; }
1135 #endif // __EIKLBV_H__