CFormattedCellListBoxData Class Reference

API published in: S60 1st Ed

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

Capability Information

Required Capabilities

None


#include <eikfrlbd.h>

Inherits CListBoxData.

Inherited by CFormattedCellGridData, CFormGraphicListBoxData, CPopupFormattedListBoxData, and CSettingItemEditingListBoxData.


Detailed Description

CFormattedCellListBoxData can draw list items.

This is similar class than CColumnListBoxData, but it can more freely layout the list items; more parameters can be used to position the elements. In particular, the position of the elements is free, and not tied to fixed width columns.

This class is used to draw most of the S60 list and grid layouts.

It also handles truncation of the text elements, centering and cropping of images, z-order/overlapping cells, bi-directional text drawing, backgrounds for lists, highlight drawing, various text and image properties and finally the parts of the separator lines that are inside list items.

This is a very low level class. The less you use this class, the better. Applications should be using CAknSelectionListDialog or CAknMarkableListDialog or CAknListQueryDialog to use lists. There are enough predefined list layouts available, so there should be no need for applications to use this class. See Style Guide for more information. Use of this class may cause your application to not look ok when properties of the device change.


Public Member Functions

IMPORT_C  ~CFormattedCellListBoxData ()
  Destructor.
IMPORT_C const TColors SubCellColors (TInt aSubCellIndex) const
  Gets colours attached to the cell.
IMPORT_C void  SetSubCellColorsL (TInt aSubCellIndex, const TColors &aColors)
  Sets colours attached to the cell.
IMPORT_C TInt  SubCellBaselinePos (TInt aSubCellIndex) const
  Gets baseline position from top of the cell.
IMPORT_C void  SetSubCellBaselinePosL (TInt aSubCellIndex, TInt aPos)
  Sets baseline position from top of the cell.
IMPORT_C TSize  SubCellSize (TInt aSubCellIndex) const
  Gets cell size in pixels.
IMPORT_C void  SetSubCellSizeL (TInt aSubCellIndex, TSize aSize)
  Sets cell size in pixels.
IMPORT_C TPoint  SubCellPosition (TInt aSubCellIndex) const
  Gets cell position inside an item.
IMPORT_C void  SetSubCellPositionL (TInt aSubCellIndex, TPoint aPosition)
  Sets cell position inside an item.
IMPORT_C TBool  SubCellIsTransparent (TInt aSubCellIndex) const
  Determines whether this cell can overlap with one of the previous cells.
IMPORT_C void  SetTransparentSubCellL (TInt aSubCellIndex, TBool aIsTransparent)
  Modifies whether the cell can overlap with one of the previous cells.
IMPORT_C TBool  SubCellIsNotAlwaysDrawn (TInt aSubCellIndex) const
  Checks whether drawing algorithm always draws the cell or whether empty string in list item can disable the drawing of the cell.
IMPORT_C void  SetNotAlwaysDrawnSubCellL (TInt aSubCellIndex, TBool aIsNotAlwaysDrawn)
  Sets whether drawing algorithm always draws the cell.
IMPORT_C TMargins  SubCellMargins (TInt aSubCellIndex) const
  Gets margins used for the content inside the cell.
IMPORT_C void  SetSubCellMarginsL (TInt aSubCellIndex, TMargins aMargins)
  Sets margins for the content inside the cell.
IMPORT_C const CFont *  SubCellFont (TInt aSubCellIndex) const
  Gets font attached to the cell.
IMPORT_C void  SetSubCellFontL (TInt aSubCellIndex, const CFont *aFont)
  Sets the font attached to the cell.
IMPORT_C CGraphicsContext::TTextAlign  SubCellAlignment (TInt aSubCellIndex) const
  Gets the alignment attached to the cell.
IMPORT_C void  SetSubCellAlignmentL (TInt aSubCellIndex, CGraphicsContext::TTextAlign aAlign)
  Sets the alignment attached to the cell.
IMPORT_C TBool  SubCellIsGraphics (TInt aSubCellIndex) const
  Checks whetherdrawing algorithm considers the text string in list item as unicode text string displayable on the screen, or as string representation of an index to icon array.
IMPORT_C void  SetGraphicsSubCellL (TInt aSubCellIndex, TBool aIsGraphics)
  Sets whether drawing algorithm considers the text string in list item as unicode text string displayable on the screen, or as string representation of an index to icon array.
IMPORT_C CGraphicsContext::TPenStyle  SubCellRightSeparatorStyle (TInt aColumn) const
  Checks whether vertical line is drawn to the right side of the cell.
IMPORT_C void  SetSubCellRightSeparatorStyleL (TInt aSubCell, CGraphicsContext::TPenStyle aStyle)
  Sets whether vertical line is drawn to the right side of the cell.
IMPORT_C TInt  SubCellTextClipGap (TInt aSubCellIndex) const
  Gets the amount of pixels text margins is grown if it is truncated.
IMPORT_C void  SetSubCellTextClipGapL (TInt aSubCellIndex, TInt aGap)
  Sets the amount of pixels truncation grows a text element.
IMPORT_C TBool  SkinEnabled () const
  SkinEnabled checks whether skins are enabled on this list.
IMPORT_C void  SetSkinEnabledL (TBool aEnabled)
  Sets whether skins are enabled on this list.
IMPORT_C TBool  SubCellIsNumberCell (TInt aSubCellIndex) const
  Checks whether the cell is used for numbers.
IMPORT_C void  SetNumberCellL (TInt aSubCellIndex, TBool aIsNumberCell)
  Sets whether the cell is used for numbers.
IMPORT_C CArrayPtr< CGulIcon > *  IconArray () const
  Gets the icon array used when drawing bitmaps for the listbox items.
IMPORT_C void  SetIconArrayL (CArrayPtr< CGulIcon > *aArray)
  Sets the icon array used when drawing bitmaps.
IMPORT_C void  SetIconArray (CArrayPtr< CGulIcon > *aArray)
  SetIconArray sets the icon array used when drawing bitmaps.
IMPORT_C CFont *  Font (const TListItemProperties &aItemProperties, TInt aSubCellIndex) const
  Font access to the font used in subcell.
virtual IMPORT_C void  Draw (TListItemProperties aProperties, CWindowGc &aGc, const TDesC *aText, const TRect &aRect, TBool aHighlight, const TColors &aColors) const
  From CListBoxData.
IMPORT_C TBool  UseSubCellColors (TInt aSubCell) const
  Indicates if sub cell is using its own colors rather than common colors.
IMPORT_C CCoeControl *  Control () const
  Ability for a skin subsystem to access Mop chain through current listbox control.
IMPORT_C void  SetControl (CCoeControl *aControlOrNull)
  Ability for a skin subsystem to access mop chain through current listbox control.
IMPORT_C MAknsControlContext SkinBackgroundContext () const
  Access to the background context of the listbox.
IMPORT_C void  SetBackgroundSkinStyle (const TAknsItemID *aId, const TRect &aRect)
  Modify properties of the skin context (background).
IMPORT_C void  SetSkinStyle (const TAknsItemID *aId, const TRect &aTileRect)
  Modify properties of the skin context (AB-column).
IMPORT_C void  SetSkinParentPos (const TPoint &aPos)
  Modify position of the parent for list default context.
IMPORT_C void  SetListEndSkinStyle (const TAknsItemID *listEndId, const TRect &aRect)
  Modify properties of the skin context (list ending)*.
IMPORT_C TBool  RespectFocus () const
  Gets RespectFocus flag.
IMPORT_C void  SetRespectFocus (TBool aBool)
  Sets RespectFocus flag.
IMPORT_C void  SetSkinHighlightFrame (const TAknsItemID *aFrameId, const TAknsItemID *aFrameCenterId)
  Set list higlight skin style.
IMPORT_C void  SetSkinPopupFrame (const TAknsItemID *aFrameId, const TAknsItemID *aFrameCenterId)
  Set popup skin style.
IMPORT_C void  SetSkinPopupFramePosition (const TRect &aOuterRect, const TRect &aInnerRect)
  Set popup skin frame position.
IMPORT_C void  UseLogicalToVisualConversion (TBool aUseConversion)
  Enable or disable logical to visual reordering in listbox data text drawing.
IMPORT_C void  EnableMarqueeL (TBool aEnable)
  Enables or disables marquee.
IMPORT_C TBool  IsMarqueeOn ()
  Determines if marquee is on.
void  FocusGained ()
  Function that is called when the owning control has gained the focus.
void  FocusLost ()
  Function that is called when the owning control has lost the focus.
void  HandleResourceChange (TInt aType)
  Handles the skin change situation.
IMPORT_C const CAknsEffectAnim *  HighlightAnim () const
  Gets animation used for drawing the list highlight.
IMPORT_C void  AboutToDrawHighlightAnim () const
  This method should be called before drawing animated highlight.
IMPORT_C void  SetHighlightAnimBackgroundDrawer (MListBoxAnimBackgroundDrawer *aDrawer)
  Sets the observer for overriding default highlight input layer drawing functionality.
IMPORT_C void  SetItemCellSize (const TSize &aSize)
  Changes item cell size and resizes highlight animation.
IMPORT_C TBool  HasHighlightAnim () const
IMPORT_C TBool  DrawHighlightAnim (CBitmapContext &aGc, const TRect &aRect) const
  The preferred method for drawing highlight animation in derived classes.
void  CreatePictographInterfaceL ()
  Creates pictograph interface.
void  CreateMarqueeControlL ()
  Creates marquee control.
void  ResetMarquee ()
  Resets the marquee animation data.
TInt  CurrentMarqueeItemIndex ()
  Gets the current list item index that is / was drawn by marquee.
void  SetCurrentMarqueeItemIndex (TInt aIndex)
  Sets the current list item index that was drawn by marquee.
void  SetCurrentItemIndex (TInt aIndex)
  Sets the current list item index (not for marquee).
void  SetCurrentlyDrawnItemIndex (TInt aIndex)
IMPORT_C void  SetSubCellFontForRowL (TInt aRowIndex, TInt aSubCellIndex, const CFont *aFont)
  Sets the font attached to the cell for each row separately.
IMPORT_C const CFont *  RowAndSubCellFont (TInt aRow, TInt aSubCellIndex) const
  Gets font attached to the row and cell.
IMPORT_C void  SetDrawBackground (const TBool aDrawBackground)
  Enables or disables transparency effect i.e.
TBool  IsBackgroundDrawingEnabled () const
  Checks if the list is transparent and drawing the background that would fall behind it.
void  SetDrawScrollbarBackground (const TBool aDrawBackground)
  Enables or disables drawing background after scrollbar.
TBool  IsScrollbarBackgroundDrawingEnabled () const
  Is the listbox drawing the background behind the scrollbar or not.
IMPORT_C void  SetSeparatorLinePosition (TAknSeparatorLinePosition aPosition)
  Sets position of listbox separator line.
IMPORT_C TAknSeparatorLinePosition  SeparatorLinePosition () const
  Gets separator line position.
IMPORT_C CAknLayoutData *  LayoutData () const
IMPORT_C TBool  LayoutInit () const
IMPORT_C void  SetLayoutInit (TBool aValue)
IMPORT_C void  SetSubcellUnderlined (TBitFlags32 aUnderlinedCells)
  Enables or disables underlining per text subcell only if TListItemProperties also has underlining enabled.
void  UseHighlightIconSwapping (TBool aUse)
  enables certain highlight skinning for radibutton / checkbox set style lists
TBool  UseHighlightIconSwapping () const
TSize  SubCellRealSize (TInt aSubCellIndex) const
void  SetSubCellRealSize (TInt aSubCellIndex, TSize aRealSize) const
TSize  SubCellRealTextSize (TInt aSubCellIndex) const
void  SetSubCellRealTextSize (TInt aSubCellIndex, TSize aRealSize) const
IMPORT_C void  SetMarqueeParams (const TInt aLoops, const TInt aScrollAmount, const TInt aScrollDelay, const TInt aInterval)
  Customizes marquee default behavior.
void  SetClippedByWrap (TUint32 aClippedCells, TBool aUseClippedByWrap)
IMPORT_C TUint32  CurrentItemTextWasClipped () const
  Tells whether current item has clipped text cells.
void  DrawDefaultHighlight (CWindowGc &aGc, const TRect &aItemRect, TBool aHighlight) const
  Renders a default animated highlight.
void  DrawSettingHighlight (CWindowGc &aGc, const TRect &aItemRect, TBool aHighlight) const
  Renders a settings animated highlight.
void  DrawPopupHighlight (CWindowGc &aGc, const TRect &aItemRect, TBool aHighlight) const
  Renders a popup animated highlight.
void  DrawPopupFrame (CWindowGc &aGc) const
  Draws a popup frame.
void  SetWordWrappedSubcellIndices (TInt aFirstIndex, TInt aSecondIndex)
  Disables logical-to-visual conversion in subcells between indexes.
IMPORT_C void  SetSubCellIconSize (TInt aIndex, TSize aSize)
  Sets the size of the subcell's icon.
TSize  GetSubCellIconSize (TInt aIndex)
  Gets the size of the subcell's icon.
void  SetupSkinContextL ()
  Create and set the defaul skin context.
void  SetESSTextColor (TAknsQsnTextColorsIndex aIndex)
  Sets a text color if enhanced skin support is available.
void  SetESSHighlightedTextColor (TAknsQsnTextColorsIndex aIndex)
  Set a highlighted text color if enhanced skin support is available.
void  SetGraphicSubCellL (TInt aSubCell, const TAknWindowLineLayout &aGraphicLayout)
  Set window line layout for the defined sub cell.
void  SetTextSubCellL (TInt aSubCell, const TAknTextLineLayout &aTextLayout)
  Support for new layouts.
void  SetConditionalSubCellL (TInt aSubCell, const TAknTextLineLayout &aTextLayout, TInt aAffectedSubCell)
  Support for new layouts.
TBool  UsesScalableLayoutData () const
  Checks if the list box uses scalable layouts.
void  UseScalableLayoutData (TBool aUse)
void  SetStretchableGraphicSubCellL (TInt aSubCell, const TAknWindowComponentLayout &aNormalLayout, const TAknWindowComponentLayout &aStretchedLayout)
void  SetStretchableTextSubCellL (TInt aSubCell, const TAknTextComponentLayout &aNormalLayout, const TAknTextComponentLayout &aStretchedLayout)
void  SetStretchableConditionalSubCellL (TInt aSubCell, const TAknTextComponentLayout &aNormalLayout, const TAknTextComponentLayout &aStretchedLayout, TInt aNormalSubCell, TInt aStretchedSubCell)
void  ResetSLSubCellArray ()
void  EnableStretching (const TBool aEnabled)
TBool  StretchingEnabled () const
void  HideSecondRow (const TBool aHide)
TBool  SecondRowHidden () const
void  SubCellsMightIntersect (const TBool aMightIntersect)
void  ToggleDropShadows (const TBool aEnable)

Static Public Member Functions

static IMPORT_C CFormattedCellListBoxData NewL ()
  Two-phased constructor.

Protected Member Functions

IMPORT_C  CFormattedCellListBoxData ()
  C++ default constructor.
IMPORT_C void  ConstructLD ()
  Second phase constructor.
IMPORT_C void  ConstructLD (const TAknsItemID &aAnimationIID)
  Second phase constructor for subclasses that want to override highlight animation creation.
IMPORT_C void  DrawFormatted (TListItemProperties aProperties, CWindowGc &aGc, const TDesC *aText, const TRect &aRect, TBool aHighlight, const TColors &aColors) const
  Main drawing algorithm used for drawing S60 list item.
void  DrawFormattedSimple (TListItemProperties &aProperties, CWindowGc &aGc, const TDesC *aText, const TRect &aRect, TBool aHighlight, const TColors &aColors) const
  Draws list items.
CFormattedCellListBoxDataExtension *  Extension ()
  Gets list box extension, which is used for adding more funtionality to list boxes without destroying compatibility with previous versions.
CFormattedCellListBoxDataExtension *  Extension () const
  Gets list box extension, which is used for adding more funtionality to list boxes without destroying compatibility with previous versions.

Friends

class  CFormattedCellListBoxDataExtension
class  CFormattedCellListBoxItemDrawer

Data Structures

struct   SSubCell
class   TColors

Constructor & Destructor Documentation

IMPORT_C CFormattedCellListBoxData::~CFormattedCellListBoxData  ) 
 

Destructor.

IMPORT_C CFormattedCellListBoxData::CFormattedCellListBoxData  )  [protected]
 

C++ default constructor.


Member Function Documentation

IMPORT_C void CFormattedCellListBoxData::AboutToDrawHighlightAnim  )  const
 

This method should be called before drawing animated highlight.

It will sync the animation with the background under the current highlight (only when current item index has changed).

IMPORT_C void CFormattedCellListBoxData::ConstructLD const TAknsItemID aAnimationIID  )  [protected]
 

Second phase constructor for subclasses that want to override highlight animation creation.

Parameters:
aAnimationIID  Skin ItemID of the constructed animation. Passing KAknsIIDNone will disable highlight animation.
IMPORT_C void CFormattedCellListBoxData::ConstructLD  )  [protected]
 

Second phase constructor.

Highlight animation will be created by default (if it is provided by the skin).

IMPORT_C CCoeControl* CFormattedCellListBoxData::Control  )  const
 

Ability for a skin subsystem to access Mop chain through current listbox control.

Returns:
Current listbox instance or NULL.
void CFormattedCellListBoxData::CreateMarqueeControlL  ) 
 

Creates marquee control.

Called by the listbox.

void CFormattedCellListBoxData::CreatePictographInterfaceL  ) 
 

Creates pictograph interface.

Only effective in Japanese variant. Called by the listbox.

IMPORT_C TUint32 CFormattedCellListBoxData::CurrentItemTextWasClipped  )  const
 

Tells whether current item has clipped text cells.

Returns:
bitfield of clipped subcells
TInt CFormattedCellListBoxData::CurrentMarqueeItemIndex  ) 
 

Gets the current list item index that is / was drawn by marquee.

Returns:
Index of the item that is / was drawn by marquee.
virtual IMPORT_C void CFormattedCellListBoxData::Draw TListItemProperties  aProperties,
CWindowGc &  aGc,
const TDesC *  aText,
const TRect &  aRect,
TBool  aHighlight,
const TColors aColors
const [virtual]
 

From CListBoxData.

Draw() is the most important method in CEikFormattedCellListBoxData. This is the only method that needs to be implemented in this class and it draws the whole list item.

Parameters:
aProperties  Properties attached to the list item.
aGc  Graphics Context used for drawing the list item.
aText  A text string describing the list item cells.
aRect  The area of the screen for the whole list item.
aHighlight  Whether the list item is selected.
aColors  The colours used for drawing the item.
void CFormattedCellListBoxData::DrawDefaultHighlight CWindowGc &  aGc,
const TRect &  aItemRect,
TBool  aHighlight
const
 

Renders a default animated highlight.

Parameters:
aGc  Graphics context used for drawing.
aItemRect  the area of the screen for drawing.
aHighlight  If ETrue highlight is rendered if EFalse, nothing is done.
IMPORT_C void CFormattedCellListBoxData::DrawFormatted TListItemProperties  aProperties,
CWindowGc &  aGc,
const TDesC *  aText,
const TRect &  aRect,
TBool  aHighlight,
const TColors aColors
const [protected]
 

Main drawing algorithm used for drawing S60 list item.

Draw() method should call this method after clearing the list item area and drawing the highlight.

Parameters:
aProperties  Properties attached to the list item.
aGc  Graphics Context used for drawing the list item.
aText  A text string describing the list item cells.
aRect  The area of the screen for the whole list item.
aHighlight  Whether the list item is selected.
aColors  The colors used for drawing the item.
Panic:
EAknPanicFormattedCellListInvalidBitmapIndex The defined bitmap index is invalid.
Panic:
EAknPanicOutOfRange The defined index is out of the range.
void CFormattedCellListBoxData::DrawFormattedSimple TListItemProperties aProperties,
CWindowGc &  aGc,
const TDesC *  aText,
const TRect &  aRect,
TBool  aHighlight,
const TColors aColors
const [protected]
 

Draws list items.

Parameters:
aProperties  Properties attached to the list item.
aGc  Graphics Context used for drawing the list item.
aText  A text string describing the list item cells.
aRect  The area of the screen for the whole list item.
aHighlight  Whether the list item is selected.
aColors  The colors used for drawing the item.
IMPORT_C TBool CFormattedCellListBoxData::DrawHighlightAnim CBitmapContext &  aGc,
const TRect &  aRect
const
 

The preferred method for drawing highlight animation in derived classes.

Before calling this method you should check that highlight animation exists by calling HasHighlightAnim. In case of draw failure you should default to normal skinned highlight drawing. For example:

TBool drawOk = EFalse;

if( HasHighlightAnim() ) { drawOk = DrawHighlightAnim( gc, rect ); }

if( !drawOk ) { ...do normal skinned draw }

Parameters:
aGc  Graphics context for blitting animation frame
aRect  Target rect for blitting animation frame
Returns:
The draw status, ETrue if drawing was ok, EFalse otherwise.
void CFormattedCellListBoxData::DrawPopupFrame CWindowGc &  aGc  )  const
 

Draws a popup frame.

Parameters:
aGc  Graphics context used for drawing.
void CFormattedCellListBoxData::DrawPopupHighlight CWindowGc &  aGc,
const TRect &  aItemRect,
TBool  aHighlight
const
 

Renders a popup animated highlight.

Parameters:
aGc  Graphics context used for drawing.
aItemRect  the area of the screen for drawing.
aHighlight  If ETrue highlight is rendered if EFalse, nothing is done.
void CFormattedCellListBoxData::DrawSettingHighlight CWindowGc &  aGc,
const TRect &  aItemRect,
TBool  aHighlight
const
 

Renders a settings animated highlight.

Parameters:
aGc  Graphics context used for drawing.
aItemRect  the area of the screen for drawing.
aHighlight  If ETrue highlight is rendered if EFalse, nothing is done.
IMPORT_C void CFormattedCellListBoxData::EnableMarqueeL TBool  aEnable  ) 
 

Enables or disables marquee.

Parameters:
aEnable  ETrue if On, EFalse if Off.
void CFormattedCellListBoxData::EnableStretching const TBool  aEnabled  ) 
 
CFormattedCellListBoxDataExtension* CFormattedCellListBoxData::Extension  )  const [protected]
 

Gets list box extension, which is used for adding more funtionality to list boxes without destroying compatibility with previous versions.

Returns:
Pointer to the list box extension.
CFormattedCellListBoxDataExtension* CFormattedCellListBoxData::Extension  )  [protected]
 

Gets list box extension, which is used for adding more funtionality to list boxes without destroying compatibility with previous versions.

Returns:
Pointer to the list box extension.
void CFormattedCellListBoxData::FocusGained  ) 
 

Function that is called when the owning control has gained the focus.

Causes that animation is continued because the control is visible and focused.

void CFormattedCellListBoxData::FocusLost  ) 
 

Function that is called when the owning control has lost the focus.

Causes the animation to pause, even if the control is partially visible.

IMPORT_C CFont* CFormattedCellListBoxData::Font const TListItemProperties aItemProperties,
TInt  aSubCellIndex
const
 

Font access to the font used in subcell.

Parameters:
aItemProperties  Not used in code.
aSubCellIndex  Index number of the subcell.
Returns:
Font used in subcell.
TSize CFormattedCellListBoxData::GetSubCellIconSize TInt  aIndex  ) 
 

Gets the size of the subcell's icon.

void CFormattedCellListBoxData::HandleResourceChange TInt  aType  ) 
 

Handles the skin change situation.

Causes change of animation.

Parameters:
aType  Type of resource change.
IMPORT_C TBool CFormattedCellListBoxData::HasHighlightAnim  )  const
 
Returns:
ETrue if highlight animation exists, EFalse otherwise.
void CFormattedCellListBoxData::HideSecondRow const TBool  aHide  ) 
 
IMPORT_C const CAknsEffectAnim* CFormattedCellListBoxData::HighlightAnim  )  const
 

Gets animation used for drawing the list highlight.

May return NULL, in which case the normal skinned highlight should be drawn. This pointer is valid only during the draw -> you should not store it locally outside draw scope.

Returns:
Animation used for drawing the list highlight.
IMPORT_C CArrayPtr<CGulIcon>* CFormattedCellListBoxData::IconArray  )  const
 

Gets the icon array used when drawing bitmaps for the listbox items.

TBool CFormattedCellListBoxData::IsBackgroundDrawingEnabled  )  const
 

Checks if the list is transparent and drawing the background that would fall behind it.

Returns:
EFalse if transparent, ETrue otherwise.
IMPORT_C TBool CFormattedCellListBoxData::IsMarqueeOn  ) 
 

Determines if marquee is on.

Returns:
Flag indicating if marquee is on (ETrue on, EFalse off)
TBool CFormattedCellListBoxData::IsScrollbarBackgroundDrawingEnabled  )  const
 

Is the listbox drawing the background behind the scrollbar or not.

Returns:
ETrue if background is drawn after scrollbar, EFalse otherwise.
IMPORT_C CAknLayoutData* CFormattedCellListBoxData::LayoutData  )  const
 
Deprecated:
Gets layout data needed for separator lines drawing.
Returns:
Layout data.
IMPORT_C TBool CFormattedCellListBoxData::LayoutInit  )  const
 
Deprecated:
Gets LayOutInit flag used for drawing separator lines in lists.
static IMPORT_C CFormattedCellListBoxData* CFormattedCellListBoxData::NewL  )  [static]
 

Two-phased constructor.

Returns:
Pointer to a new formatted cell listbox data object.

Reimplemented in CSettingItemEditingListBoxData, CFormGraphicListBoxData, CPopupFormattedListBoxData, and CFormattedCellGridData.

void CFormattedCellListBoxData::ResetMarquee  ) 
 

Resets the marquee animation data.

void CFormattedCellListBoxData::ResetSLSubCellArray  ) 
 
IMPORT_C TBool CFormattedCellListBoxData::RespectFocus  )  const
 

Gets RespectFocus flag.

Returns:
RespectFocus flag. ETrue if list item highlights are only shown when the list is has been focused on.
IMPORT_C const CFont* CFormattedCellListBoxData::RowAndSubCellFont TInt  aRow,
TInt  aSubCellIndex
const
 

Gets font attached to the row and cell.

Parameters:
aRow  Index number of the row.
aSubCellIndex  Index number of the subcell.
Returns:
Font handle.
TBool CFormattedCellListBoxData::SecondRowHidden  )  const
 
IMPORT_C TAknSeparatorLinePosition CFormattedCellListBoxData::SeparatorLinePosition  )  const
 

Gets separator line position.

Returns:
Position of separator line.
IMPORT_C void CFormattedCellListBoxData::SetBackgroundSkinStyle const TAknsItemID aId,
const TRect &  aRect
 

Modify properties of the skin context (background).

Parameters:
aId  Skin background identifier.
aRect  Skin background rectangle.
void CFormattedCellListBoxData::SetClippedByWrap TUint32  aClippedCells,
TBool  aUseClippedByWrap
 
void CFormattedCellListBoxData::SetConditionalSubCellL TInt  aSubCell,
const TAknTextLineLayout &  aTextLayout,
TInt  aAffectedSubCell
 

Support for new layouts.

IMPORT_C void CFormattedCellListBoxData::SetControl CCoeControl *  aControlOrNull  ) 
 

Ability for a skin subsystem to access mop chain through current listbox control.

Parameters:
aControlOrNull  Current listbox instance or NULL. Cannot be other control than the current listbox!
void CFormattedCellListBoxData::SetCurrentItemIndex TInt  aIndex  ) 
 

Sets the current list item index (not for marquee).

Since Symbian 3.0 causes highlight animation to change its background (only if the current item index changes). Don't call this method if the index is not the current item index.

Parameters:
aIndex  Index number of list item.
void CFormattedCellListBoxData::SetCurrentlyDrawnItemIndex TInt  aIndex  ) 
 
void CFormattedCellListBoxData::SetCurrentMarqueeItemIndex TInt  aIndex  ) 
 

Sets the current list item index that was drawn by marquee.

Parameters:
aIndex  Index of list item.
IMPORT_C void CFormattedCellListBoxData::SetDrawBackground const TBool  aDrawBackground  ) 
 

Enables or disables transparency effect i.e.

does the listbox draw its own background or not.

Parameters:
aDrawBackground  EFalse enables transparency, ETrue disables.
void CFormattedCellListBoxData::SetDrawScrollbarBackground const TBool  aDrawBackground  ) 
 

Enables or disables drawing background after scrollbar.

Parameters:
aDrawBackground  Default is ETrue which means that Scrollbar is drawn first.
void CFormattedCellListBoxData::SetESSHighlightedTextColor TAknsQsnTextColorsIndex  aIndex  ) 
 

Set a highlighted text color if enhanced skin support is available.

void CFormattedCellListBoxData::SetESSTextColor TAknsQsnTextColorsIndex  aIndex  ) 
 

Sets a text color if enhanced skin support is available.

IMPORT_C void CFormattedCellListBoxData::SetGraphicsSubCellL TInt  aSubCellIndex,
TBool  aIsGraphics
 

Sets whether drawing algorithm considers the text string in list item as unicode text string displayable on the screen, or as string representation of an index to icon array.

Parameters:
aSubCellIndex  Index number of the subcell.
aIsGraphics  ETrue if graphics cell, EFalse if text cell.
void CFormattedCellListBoxData::SetGraphicSubCellL TInt  aSubCell,
const TAknWindowLineLayout &  aGraphicLayout
 

Set window line layout for the defined sub cell.

IMPORT_C void CFormattedCellListBoxData::SetHighlightAnimBackgroundDrawer MListBoxAnimBackgroundDrawer aDrawer  ) 
 

Sets the observer for overriding default highlight input layer drawing functionality.

Note that you should still call AboutToDrawHighlightAnim (it will call the observer if it is set).

Parameters:
aDrawer  Highlight animation drawer.
IMPORT_C void CFormattedCellListBoxData::SetIconArray CArrayPtr< CGulIcon > *  aArray  ) 
 

SetIconArray sets the icon array used when drawing bitmaps.

The array can be modified (no need to call this method when modifying), even in MdcaPoint() or MdcaCount() methods of MDesCArray class. See also CTextListBoxModel::SetItemTextArray().

The most common way to crash a listbox is by forgetting to call this method, or the list item string for graphics cell is not an index of a bitmap.

Parameters:
aArray  Pointer to the icon array.
IMPORT_C void CFormattedCellListBoxData::SetIconArrayL CArrayPtr< CGulIcon > *  aArray  ) 
 

Sets the icon array used when drawing bitmaps.

The array can be modified (no need to call this method when modifying), even in MdcaPoint() or MdcaCount() methods of MDesCArray class. See also CTextListBoxModel::SetItemTextArray().

The most common way to crash a listbox is by forgetting to call this method, or the list item string for graphics cell is not an index of a bitmap.

Parameters:
aArray  Pointer to the icon array.
IMPORT_C void CFormattedCellListBoxData::SetItemCellSize const TSize &  aSize  ) 
 

Changes item cell size and resizes highlight animation.

Called by list when item cell size changes. If you are using non-standard highlight sizes make sure to sync the list item cell size.

Parameters:
aSize  New cell size.
IMPORT_C void CFormattedCellListBoxData::SetLayoutInit TBool  aValue  ) 
 
Deprecated:
Sets LayOutInit flag used for drawing separator lines in lists.
IMPORT_C void CFormattedCellListBoxData::SetListEndSkinStyle const TAknsItemID listEndId,
const TRect &  aRect
 

Modify properties of the skin context (list ending)*.

Parameters:
listEndId  List ending skin background identifier.
aRect  List ending background area from LAF.
IMPORT_C void CFormattedCellListBoxData::SetMarqueeParams const TInt  aLoops,
const TInt  aScrollAmount,
const TInt  aScrollDelay,
const TInt  aInterval
 

Customizes marquee default behavior.

Use this before enabling marquee ( EnableMarqueeL() ), otherwise marquee behavior will change during animation.

Parameters:
aLoops  Max number of loops to be executed (default 1).
aScrollAmount  The amount of pixels scrolled per frame (default 6).
aScrollDelay  The delay between each loop (in microseconds, default 1000000 microseconds).
aInterval  The interval between frame updates after the initial delay, in microseconds.
IMPORT_C void CFormattedCellListBoxData::SetNotAlwaysDrawnSubCellL TInt  aSubCellIndex,
TBool  aIsNotAlwaysDrawn
 

Sets whether drawing algorithm always draws the cell.

Parameters:
aSubCellIndex  Index number of the subcell.
aIsNotAlwaysDrawn  If ETrue, empty string disables cell.
IMPORT_C void CFormattedCellListBoxData::SetNumberCellL TInt  aSubCellIndex,
TBool  aIsNumberCell
 

Sets whether the cell is used for numbers.

Parameters:
aSubCellIndex  Index number of the subcell.
aIsNumberCell  New value for the flag.
IMPORT_C void CFormattedCellListBoxData::SetRespectFocus TBool  aBool  ) 
 

Sets RespectFocus flag.

Parameters:
aBool  Value of RespectFocus flag. ETrue means that the list item highlight is only shown if list is focused on.
IMPORT_C void CFormattedCellListBoxData::SetSeparatorLinePosition TAknSeparatorLinePosition  aPosition  ) 
 

Sets position of listbox separator line.

Parameters:
aPosition  Position in which separator line is placed.
IMPORT_C void CFormattedCellListBoxData::SetSkinEnabledL TBool  aEnabled  ) 
 

Sets whether skins are enabled on this list.

The default value is determined from global setting from CAknAppUi.

Parameters:
aEnabled  If ETrue skins are set enabled. If EFalse skins are set disabled.

Reimplemented from CListBoxData.

IMPORT_C void CFormattedCellListBoxData::SetSkinHighlightFrame const TAknsItemID aFrameId,
const TAknsItemID aFrameCenterId
 

Set list higlight skin style.

Parameters:
aFrameId  The id for the frame.
aFrameCenterId  The id for the frame center.
IMPORT_C void CFormattedCellListBoxData::SetSkinParentPos const TPoint &  aPos  ) 
 

Modify position of the parent for list default context.

Parameters:
aPos  The new position.
IMPORT_C void CFormattedCellListBoxData::SetSkinPopupFrame const TAknsItemID aFrameId,
const TAknsItemID aFrameCenterId
 

Set popup skin style.

Parameters:
aFrameId  The id for the frame.
aFrameCenterId  The id for the frame center.
IMPORT_C void CFormattedCellListBoxData::SetSkinPopupFramePosition const TRect &  aOuterRect,
const TRect &  aInnerRect
 

Set popup skin frame position.

Parameters:
aOuterRect  Outer position of the frame.
aInnerRect  Inner position of the frame.
IMPORT_C void CFormattedCellListBoxData::SetSkinStyle const TAknsItemID aId,
const TRect &  aTileRect
 

Modify properties of the skin context (AB-column).

Parameters:
aId  Skin background identifier.
aTileRect  Skin background area from LAF.
void CFormattedCellListBoxData::SetStretchableConditionalSubCellL TInt  aSubCell,
const TAknTextComponentLayout &  aNormalLayout,
const TAknTextComponentLayout &  aStretchedLayout,
TInt  aNormalSubCell,
TInt  aStretchedSubCell
 
void CFormattedCellListBoxData::SetStretchableGraphicSubCellL TInt  aSubCell,
const TAknWindowComponentLayout &  aNormalLayout,
const TAknWindowComponentLayout &  aStretchedLayout
 
void CFormattedCellListBoxData::SetStretchableTextSubCellL TInt  aSubCell,
const TAknTextComponentLayout &  aNormalLayout,
const TAknTextComponentLayout &  aStretchedLayout
 
IMPORT_C void CFormattedCellListBoxData::SetSubCellAlignmentL TInt  aSubCellIndex,
CGraphicsContext::TTextAlign  aAlign
 

Sets the alignment attached to the cell.

Parameters:
aSubCellIndex  Index number of the subcell.
aAlign  Alignment that is attached to the cell
IMPORT_C void CFormattedCellListBoxData::SetSubCellBaselinePosL TInt  aSubCellIndex,
TInt  aPos
 

Sets baseline position from top of the cell.

Parameters:
aSubCellIndex  Index number of the subcell.
aPos  Position which is set for the item.
IMPORT_C void CFormattedCellListBoxData::SetSubCellColorsL TInt  aSubCellIndex,
const TColors aColors
 

Sets colours attached to the cell.

Parameters:
aSubCellIndex  Index number of the subcell.
aColors  Text and background colors.
IMPORT_C void CFormattedCellListBoxData::SetSubCellFontForRowL TInt  aRowIndex,
TInt  aSubCellIndex,
const CFont *  aFont
 

Sets the font attached to the cell for each row separately.

Parameters:
aRowIndex  Row, which subcells are to be changed.
aSubCellIndex  Index number of the subcell.
aFont  Font to be used.
IMPORT_C void CFormattedCellListBoxData::SetSubCellFontL TInt  aSubCellIndex,
const CFont *  aFont
 

Sets the font attached to the cell.

Parameters:
aSubCellIndex  Index number of the subcell.
aFont  Font to attach to the cell.
IMPORT_C void CFormattedCellListBoxData::SetSubCellIconSize TInt  aIndex,
TSize  aSize
 

Sets the size of the subcell's icon.

IMPORT_C void CFormattedCellListBoxData::SetSubCellMarginsL TInt  aSubCellIndex,
TMargins  aMargins
 

Sets margins for the content inside the cell.

Parameters:
aSubCellIndex  Index number of the subcell.
aMargins  Margins for the content inside the cell.
IMPORT_C void CFormattedCellListBoxData::SetSubCellPositionL TInt  aSubCellIndex,
TPoint  aPosition
 

Sets cell position inside an item.

Parameters:
aSubCellIndex  Index number of the subcell.
aPosition  New position for cell.
void CFormattedCellListBoxData::SetSubCellRealSize TInt  aSubCellIndex,
TSize  aRealSize
const
 
void CFormattedCellListBoxData::SetSubCellRealTextSize TInt  aSubCellIndex,
TSize  aRealSize
const
 
IMPORT_C void CFormattedCellListBoxData::SetSubCellRightSeparatorStyleL TInt  aSubCell,
CGraphicsContext::TPenStyle  aStyle
 

Sets whether vertical line is drawn to the right side of the cell.

Parameters:
aSubCell  Index number of the subcell.
aStyle  Style of a pen used to draw a line for the right side of the cell.
IMPORT_C void CFormattedCellListBoxData::SetSubCellSizeL TInt  aSubCellIndex,
TSize  aSize
 

Sets cell size in pixels.

Parameters:
aSubCellIndex  Index number of the subcell.
aSize  Cell size.
IMPORT_C void CFormattedCellListBoxData::SetSubCellTextClipGapL TInt  aSubCellIndex,
TInt  aGap
 

Sets the amount of pixels truncation grows a text element.

Parameters:
aSubCellIndex  Index number of the subcell.
aGap  The amount of pixels that are required for growing the text element when it is truncated.
IMPORT_C void CFormattedCellListBoxData::SetSubcellUnderlined TBitFlags32  aUnderlinedCells  ) 
 

Enables or disables underlining per text subcell only if TListItemProperties also has underlining enabled.

If this method is not called and TListItemProperties has underlining enabled, drawing will revert to old style where only first text subcell will be underlined.

Parameters:
aUnderlinedCells  Bitmask of cells to be underlined.
void CFormattedCellListBoxData::SetTextSubCellL TInt  aSubCell,
const TAknTextLineLayout &  aTextLayout
 

Support for new layouts.

Set text line layout for the defined sub cell.

IMPORT_C void CFormattedCellListBoxData::SetTransparentSubCellL TInt  aSubCellIndex,
TBool  aIsTransparent
 

Modifies whether the cell can overlap with one of the previous cells.

Parameters:
aSubCellIndex  Index number of the subcell.
aIsTransparent  ETrue if transparent, EFalse if not.
void CFormattedCellListBoxData::SetupSkinContextL  ) 
 

Create and set the defaul skin context.

Needed by the dynamic skin support.

void CFormattedCellListBoxData::SetWordWrappedSubcellIndices TInt  aFirstIndex,
TInt  aSecondIndex
 

Disables logical-to-visual conversion in subcells between indexes.

Parameters:
aFirstIndex  First subcell not to use logical-to-visual conversion.
aSecondIndex  Last subcell not to use logical-to-visual conversion.
IMPORT_C MAknsControlContext* CFormattedCellListBoxData::SkinBackgroundContext  )  const
 

Access to the background context of the listbox.

Returns:
Skin background context.
IMPORT_C TBool CFormattedCellListBoxData::SkinEnabled  )  const
 

SkinEnabled checks whether skins are enabled on this list.

Returns:
ETrue if enabled, EFalse if disabled.
TBool CFormattedCellListBoxData::StretchingEnabled  )  const
 
IMPORT_C CGraphicsContext::TTextAlign CFormattedCellListBoxData::SubCellAlignment TInt  aSubCellIndex  )  const
 

Gets the alignment attached to the cell.

Parameters:
aSubCellIndex  Index number of the subcell.
Returns:
Alignment of the text.
IMPORT_C TInt CFormattedCellListBoxData::SubCellBaselinePos TInt  aSubCellIndex  )  const
 

Gets baseline position from top of the cell.

Parameters:
aSubCellIndex  Index number of the subcell.
Returns:
Baseline y-position.
IMPORT_C const TColors& CFormattedCellListBoxData::SubCellColors TInt  aSubCellIndex  )  const
 

Gets colours attached to the cell.

Parameters:
aSubCellIndex  Index number of the subcell.
Returns:
Text and background colors.
IMPORT_C const CFont* CFormattedCellListBoxData::SubCellFont TInt  aSubCellIndex  )  const
 

Gets font attached to the cell.

Parameters:
aSubCellIndex  Index number of the subcell.
Returns:
Handle to the attached font.
IMPORT_C TBool CFormattedCellListBoxData::SubCellIsGraphics TInt  aSubCellIndex  )  const
 

Checks whetherdrawing algorithm considers the text string in list item as unicode text string displayable on the screen, or as string representation of an index to icon array.

Parameters:
aSubCellIndex  Index number of the subcell.
Returns:
ETrue if graphics cell, EFalse if text cell.
IMPORT_C TBool CFormattedCellListBoxData::SubCellIsNotAlwaysDrawn TInt  aSubCellIndex  )  const
 

Checks whether drawing algorithm always draws the cell or whether empty string in list item can disable the drawing of the cell.

Parameters:
aSubCellIndex  Index number of the subcell.
Returns:
ETrue when empty string disables cell, EFalse if always drawn.
IMPORT_C TBool CFormattedCellListBoxData::SubCellIsNumberCell TInt  aSubCellIndex  )  const
 

Checks whether the cell is used for numbers.

Parameters:
aSubCellIndex  Index number of the subcell.
Returns:
ETrue if enabled, EFalse if disabled.
IMPORT_C TBool CFormattedCellListBoxData::SubCellIsTransparent TInt  aSubCellIndex  )  const
 

Determines whether this cell can overlap with one of the previous cells.

Parameters:
aSubCellIndex  Index number of the subcell.
Returns:
ETrue if cell overlaps another one, EFalse if cell allocates area from other cells.
IMPORT_C TMargins CFormattedCellListBoxData::SubCellMargins TInt  aSubCellIndex  )  const
 

Gets margins used for the content inside the cell.

Parameters:
aSubCellIndex  Index number of the subcell.
Returns:
Margins in pixels.
IMPORT_C TPoint CFormattedCellListBoxData::SubCellPosition TInt  aSubCellIndex  )  const
 

Gets cell position inside an item.

Parameters:
aSubCellIndex  Index number of the subcell.
Returns:
Cell position.
TSize CFormattedCellListBoxData::SubCellRealSize TInt  aSubCellIndex  )  const
 
TSize CFormattedCellListBoxData::SubCellRealTextSize TInt  aSubCellIndex  )  const
 
IMPORT_C CGraphicsContext::TPenStyle CFormattedCellListBoxData::SubCellRightSeparatorStyle TInt  aColumn  )  const
 

Checks whether vertical line is drawn to the right side of the cell.

Parameters:
aColumn  Index number of the subcell.
Returns:
Style of pen used to draw a line for the right side of the cell.
IMPORT_C TSize CFormattedCellListBoxData::SubCellSize TInt  aSubCellIndex  )  const
 

Gets cell size in pixels.

Parameters:
aSubCellIndex  Index number of the subcell.
Returns:
Cell size.
void CFormattedCellListBoxData::SubCellsMightIntersect const TBool  aMightIntersect  ) 
 
IMPORT_C TInt CFormattedCellListBoxData::SubCellTextClipGap TInt  aSubCellIndex  )  const
 

Gets the amount of pixels text margins is grown if it is truncated.

This is usually very small number used to make the layout look more balanced when text is truncated. (the glyph used for truncation is almost empty and on narrow text elements, it looks odd if the truncated text element is exactly same size as non-truncated version.)

Parameters:
aSubCellIndex  Index number of the subcell.
Returns:
Amount of pixels that are used for growing the text margins in truncation.
void CFormattedCellListBoxData::ToggleDropShadows const TBool  aEnable  ) 
 
TBool CFormattedCellListBoxData::UseHighlightIconSwapping  )  const
 
void CFormattedCellListBoxData::UseHighlightIconSwapping TBool  aUse  ) 
 

enables certain highlight skinning for radibutton / checkbox set style lists

should be used only by avkon internally

IMPORT_C void CFormattedCellListBoxData::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.

Parameters:
aUseConversion  Enable (ETrue) or disable (EFalse) conversion.
void CFormattedCellListBoxData::UseScalableLayoutData TBool  aUse  ) 
 
TBool CFormattedCellListBoxData::UsesScalableLayoutData  )  const
 

Checks if the list box uses scalable layouts.

IMPORT_C TBool CFormattedCellListBoxData::UseSubCellColors TInt  aSubCell  )  const
 

Indicates if sub cell is using its own colors rather than common colors.

Parameters:
aSubCell  Index number of the subcell.
Returns:
Boolean indicating whether own colors enabled. ETrue enabled, EFalse disabled.

Friends And Related Function Documentation

friend class CFormattedCellListBoxDataExtension [friend]
 
friend class CFormattedCellListBoxItemDrawer [friend]
 

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

Copyright © Nokia Corporation 2001-2008
Back to top