CSnakingListBoxView Class Reference

API published in: S60 1st Ed

Link against: avkon.lib eikctl.lib eikcoctl.lib

Capability Information

Required Capabilities

None


#include <eiklbv.h>

Inherits CListBoxView.


Public Member Functions

IMPORT_C  ~CSnakingListBoxView ()
IMPORT_C  CSnakingListBoxView ()
TInt  ColumnWidth () const
IMPORT_C void  SetColumnWidth (TInt aColumnWidth)
virtual IMPORT_C void  MoveCursorL (TCursorMovement aCursorMovement, TSelectionMode aSelectionMode)
virtual IMPORT_C void  SetTopItemIndex (TInt aItemIndex)
  Sets the item at the top of the view by its index in the list of all items.
virtual IMPORT_C void  SetItemHeight (TInt aItemHeight)
  Sets the item height.
virtual IMPORT_C TBool  XYPosToItemIndex (TPoint aPosition, TInt &aItemIndex) const
  Converts a pixel position into an item index.
virtual IMPORT_C TInt  NumberOfItemsThatFitInRect (const TRect &aRect) const
  Gets the number of items that will fit into a given rectangle.
virtual IMPORT_C void  HScroll (TInt aHScrollAmount)
  Scrolls horizontally by the specified number of pixels.
virtual IMPORT_C void  CalcDataWidth ()
  Recalculates the data width of this list box view from the item width of its list item drawer.
virtual IMPORT_C void  CalcBottomItemIndex ()
  Recalculates the index of the bottom item in the list by using the top item index and the size of the display.
virtual IMPORT_C void  Draw (const TRect *aClipRect=NULL) const
  Draws every visible item into the specified rectangle.
virtual IMPORT_C TInt  VisibleWidth (const TRect &aRect) const
  Gets the visible width of the specified rectangle in pixels.
virtual IMPORT_C TBool  ScrollToMakeItemVisible (TInt aItemIndex)
  Scrolls vertically to make a particular item visible.
virtual IMPORT_C TInt  CalculateHScrollOffsetSoItemIsVisible (TInt aItemIndex)
virtual IMPORT_C TInt  CalcNewTopItemIndexSoItemIsVisible (TInt aItemIndex) const
  Calculates which item should be selected in order to make a particular item visible.
virtual IMPORT_C TPoint  ItemPos (TInt aItemIndex) const
  Gets the on-screen position of an item.
virtual IMPORT_C TSize  ItemSize (TInt aItemIndex=0) const
  Gets the on-screen size of an item.
IMPORT_C void  CalcRowAndColIndexesFromItemIndex (TInt aItemIndex, TInt &aRowIndex, TInt &aColIndex) const
IMPORT_C void  CalcItemIndexFromRowAndColIndexes (TInt &aItemIndex, TInt aRowIndex, TInt aColIndex) const
virtual IMPORT_C TInt  NumberOfItemsPerColumn () const

Protected Member Functions

virtual IMPORT_C void  DrawItemRange (TInt aStartItemIndex, TInt aEndItemIndex) const
IMPORT_C void  DrawColumnRange (TInt aStartColIndex, TInt aEndColIndex) const
IMPORT_C void  MoveToPreviousColumnL (TSelectionMode aSelectionMode)
IMPORT_C void  MoveToNextColumnL (TSelectionMode aSelectionMode)
IMPORT_C void  ClearUnusedItemSpace (TInt aStartItemIndex, TInt aEndItemIndex) const
IMPORT_C void  UpdateHScrollOffsetBasedOnTopItemIndex ()

Protected Attributes

TInt  iColumnWidth

Constructor & Destructor Documentation

IMPORT_C CSnakingListBoxView::~CSnakingListBoxView  ) 
 
IMPORT_C CSnakingListBoxView::CSnakingListBoxView  ) 
 

Member Function Documentation

virtual IMPORT_C void CSnakingListBoxView::CalcBottomItemIndex  )  [virtual]
 

Recalculates the index of the bottom item in the list by using the top item index and the size of the display.

This function is called by the owning list box control when either the size of the list box or the number of items in its model changes.

Reimplemented from CListBoxView.

virtual IMPORT_C void CSnakingListBoxView::CalcDataWidth  )  [virtual]
 

Recalculates the data width of this list box view from the item width of its list item drawer.

This method is called directly by CEikListBox when the list box’s size changes or when data is added.

Reimplemented from CListBoxView.

IMPORT_C void CSnakingListBoxView::CalcItemIndexFromRowAndColIndexes TInt &  aItemIndex,
TInt  aRowIndex,
TInt  aColIndex
const
 
virtual IMPORT_C TInt CSnakingListBoxView::CalcNewTopItemIndexSoItemIsVisible TInt  aItemIndex  )  const [virtual]
 

Calculates which item should be selected in order to make a particular item visible.

Calling VScrollTo(CalcNewTopItemIndexSoItemIsVisible(idx)), for example, would make the item whose index is idx visible.

Parameters:
aItemIndex  The index of the new top item.
Returns:
The item to be selected.

Reimplemented from CListBoxView.

IMPORT_C void CSnakingListBoxView::CalcRowAndColIndexesFromItemIndex TInt  aItemIndex,
TInt &  aRowIndex,
TInt &  aColIndex
const
 
virtual IMPORT_C TInt CSnakingListBoxView::CalculateHScrollOffsetSoItemIsVisible TInt  aItemIndex  )  [virtual]
 
IMPORT_C void CSnakingListBoxView::ClearUnusedItemSpace TInt  aStartItemIndex,
TInt  aEndItemIndex
const [protected]
 
TInt CSnakingListBoxView::ColumnWidth  )  const [inline]
 
virtual IMPORT_C void CSnakingListBoxView::Draw const TRect *  aClipRect = NULL  )  const [virtual]
 

Draws every visible item into the specified rectangle.

As implemented in CListBoxView, this function's argument is ignored and the internal viewing rectangle is used. See SetViewRect().

Parameters:
aClipRect  The rectangle to draw into, this is ignored. Default value is NULL.
Panic:
EEikPanicListBoxNoModel Panics if the list box model for this class has not been defined.

Reimplemented from CListBoxView.

IMPORT_C void CSnakingListBoxView::DrawColumnRange TInt  aStartColIndex,
TInt  aEndColIndex
const [protected]
 
virtual IMPORT_C void CSnakingListBoxView::DrawItemRange TInt  aStartItemIndex,
TInt  aEndItemIndex
const [protected, virtual]
 
virtual IMPORT_C void CSnakingListBoxView::HScroll TInt  aHScrollAmount  )  [virtual]
 

Scrolls horizontally by the specified number of pixels.

Parameters:
aHScrollAmount  The distance to scroll by in pixels. A negative value scrolls to the left, a positive value scrolls to the right.

Reimplemented from CListBoxView.

virtual IMPORT_C TPoint CSnakingListBoxView::ItemPos TInt  aItemIndex  )  const [virtual]
 

Gets the on-screen position of an item.

Parameters:
aItemIndex  Index of an item.
Returns:
Position of the item.

Reimplemented from CListBoxView.

virtual IMPORT_C TSize CSnakingListBoxView::ItemSize TInt  aItemIndex = 0  )  const [virtual]
 

Gets the on-screen size of an item.

As implemented in CListBoxView, all items report the same size. The size returned may be larger than the width of the list box view, but will not be smaller.

Parameters:
aItemIndex  Index of an item. Default value is 0.
Returns:
Size of the item.

Reimplemented from CListBoxView.

virtual IMPORT_C void CSnakingListBoxView::MoveCursorL TCursorMovement  aCursorMovement,
TSelectionMode  aSelectionMode
[virtual]
 
IMPORT_C void CSnakingListBoxView::MoveToNextColumnL TSelectionMode  aSelectionMode  )  [protected]
 
IMPORT_C void CSnakingListBoxView::MoveToPreviousColumnL TSelectionMode  aSelectionMode  )  [protected]
 
virtual IMPORT_C TInt CSnakingListBoxView::NumberOfItemsPerColumn  )  const [virtual]
 
virtual IMPORT_C TInt CSnakingListBoxView::NumberOfItemsThatFitInRect const TRect &  aRect  )  const [virtual]
 

Gets the number of items that will fit into a given rectangle.

Parameters:
aRect  The rectangle.
Returns:
The number of items that will fit into the given rectangle.

Reimplemented from CListBoxView.

virtual IMPORT_C TBool CSnakingListBoxView::ScrollToMakeItemVisible TInt  aItemIndex  )  [virtual]
 

Scrolls vertically to make a particular item visible.

Parameters:
aItemIndex  The item to make visible.
Returns:
ETrue if any scrolling was done, EFalse if no scrolling was necessary.

Reimplemented from CListBoxView.

IMPORT_C void CSnakingListBoxView::SetColumnWidth TInt  aColumnWidth  ) 
 
virtual IMPORT_C void CSnakingListBoxView::SetItemHeight TInt  aItemHeight  )  [virtual]
 

Sets the item height.

Parameters:
aItemHeight  New item height.

Reimplemented from CListBoxView.

virtual IMPORT_C void CSnakingListBoxView::SetTopItemIndex TInt  aItemIndex  )  [virtual]
 

Sets the item at the top of the view by its index in the list of all items.

This function also invokes CalcBottomItemIndex().

Parameters:
aItemIndex  Index of the item to start the view at.
Panic:
EEikPanicListBoxInvalidTopItemIndexSpecified Panics if the given index is not valid.

Reimplemented from CListBoxView.

IMPORT_C void CSnakingListBoxView::UpdateHScrollOffsetBasedOnTopItemIndex  )  [protected]
 
virtual IMPORT_C TInt CSnakingListBoxView::VisibleWidth const TRect &  aRect  )  const [virtual]
 

Gets the visible width of the specified rectangle in pixels.

This function is called by CListBoxView itself on its own viewing rectangle.

Parameters:
aRect  The rectangle to get the visible width for.
Returns:
Visible width of aRect.

Reimplemented from CListBoxView.

virtual IMPORT_C TBool CSnakingListBoxView::XYPosToItemIndex TPoint  aPosition,
TInt &  aItemIndex
const [virtual]
 

Converts a pixel position into an item index.

The function returns ETrue and sets aItemIndex to the index of the item whose bounding box contains aPosition. Returns EFalse if no such item exists.

Parameters:
aPosition  A position relative to the origin of the list box control.
aItemIndex  Is set to the item at that position.
Returns:
ETrue if there was an item at aPosition.

Reimplemented from CListBoxView.


Field Documentation

TInt CSnakingListBoxView::iColumnWidth [protected]
 

The documentation for this class was generated from the following file:

Copyright © Nokia Corporation 2001-2008
Back to top