1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/epoc32/include/mw/eikfrlbd.h Wed Mar 31 12:33:34 2010 +0100
1.3 @@ -0,0 +1,1400 @@
1.4 +/*
1.5 +* Copyright (c) 2002-2006 Nokia Corporation and/or its subsidiary(-ies).
1.6 +* All rights reserved.
1.7 +* This component and the accompanying materials are made available
1.8 +* under the terms of "Eclipse Public License v1.0"
1.9 +* which accompanies this distribution, and is available
1.10 +* at the URL "http://www.eclipse.org/legal/epl-v10.html".
1.11 +*
1.12 +* Initial Contributors:
1.13 +* Nokia Corporation - initial contribution.
1.14 +*
1.15 +* Contributors:
1.16 +*
1.17 +* Description:
1.18 +*
1.19 +*/
1.20 +
1.21 +
1.22 +//
1.23 +// EIKFRLBD.H
1.24 +//
1.25 +// Copyright (c) 2001 Symbian Ltd. All rights reserved.
1.26 +//
1.27 +#if !defined(__EIKFRLBD_H__)
1.28 +#define __EIKFRLBD_H__
1.29 +
1.30 +#include <e32base.h>
1.31 +#include <gdi.h>
1.32 +
1.33 +#include <eiklbd.h>
1.34 +#include <eikfrlb.h>
1.35 +#include <avkon.hrh>
1.36 +#include <AknsDrawUtils.h> // for TAknsQsnTextColorsIndex
1.37 +#include <babitflags.h> // for TBitFlags32
1.38 +
1.39 +class CWindowGc;
1.40 +class CGulIcon;
1.41 +class CFormattedCellListBoxDataExtension;
1.42 +class MAknsControlContext;
1.43 +class TAknsItemID;
1.44 +class CAknLayoutData;
1.45 +class CAknsEffectAnim;
1.46 +class TAknTextLineLayout;
1.47 +class TAknWindowLineLayout;
1.48 +class TAknTextComponentLayout;
1.49 +class TAknWindowComponentLayout;
1.50 +
1.51 +/**
1.52 +* A callback interface for overriding highlight animation input layer
1.53 +* preparation in derived classes. Usually drawing the background under the
1.54 +* highlight rect will yield the right kind of result. The size of the render
1.55 +* target is equal to item cell size.
1.56 +*
1.57 +* @since 3.0
1.58 +*/
1.59 +class MListBoxAnimBackgroundDrawer
1.60 + {
1.61 + public:
1.62 + /**
1.63 + * @param aGc Bitmapped graphical context to draw to.
1.64 + * @return
1.65 + */
1.66 + virtual TBool DrawHighlightAnimBackground( CFbsBitGc& aGc ) const = 0;
1.67 + };
1.68 +
1.69 +/**
1.70 + * @c CFormattedCellListBoxData can draw list items.
1.71 + * This is similar class than @c CColumnListBoxData, but it can more freely
1.72 + * layout the list items; more parameters can be used to position the elements.
1.73 + * In particular, the position of the elements is free, and not tied to fixed
1.74 + * width columns.
1.75 + *
1.76 + * This class is used to draw most of the S60 list and grid layouts.
1.77 + *
1.78 + * It also handles truncation of the text elements, centering and cropping of
1.79 + * images, z-order/overlapping cells, bi-directional text drawing, backgrounds
1.80 + * for lists, highlight drawing, various text and image properties and finally
1.81 + * the parts of the separator lines that are inside list items.
1.82 + *
1.83 + * This is a very low level class. The less you use this class, the better.
1.84 + * Applications should be using @c CAknSelectionListDialog or
1.85 + * @c CAknMarkableListDialog or @c CAknListQueryDialog to use lists. There are
1.86 + * enough predefined list layouts available, so there should be no need for
1.87 + * applications to use this class. See Style Guide for more information. Use of
1.88 + * this class may cause your application to not look ok when properties of the
1.89 + * device change.
1.90 + *
1.91 + * @lib avkon
1.92 + */
1.93 +class CFormattedCellListBoxData : public CListBoxData
1.94 + {
1.95 + friend class CFormattedCellListBoxDataExtension;
1.96 +
1.97 +public:
1.98 +
1.99 + //INNER CLASS DECLARATION
1.100 + /*
1.101 + * A container class for storage of colour values.
1.102 + * Used by @c CFormattedCellListBoxData.
1.103 + */
1.104 + class TColors
1.105 + {
1.106 +
1.107 + public:
1.108 +
1.109 + /**
1.110 + * C++ default constructor.
1.111 + */
1.112 + IMPORT_C TColors();
1.113 +
1.114 + public:
1.115 +
1.116 + /**
1.117 + * The text colour.
1.118 + */
1.119 + TRgb iText;
1.120 +
1.121 + /**
1.122 + * The background colour.
1.123 + */
1.124 + TRgb iBack;
1.125 +
1.126 + /**
1.127 + * The highlighted text colour.
1.128 + */
1.129 + TRgb iHighlightedText;
1.130 +
1.131 + /**
1.132 + * The highlighted background colour.
1.133 + */
1.134 + TRgb iHighlightedBack;
1.135 +
1.136 + /**
1.137 + * The separator line colour.
1.138 + *
1.139 + * @deprecated The separator line colour is no longer used because the
1.140 + * separator lines are skinned.
1.141 + */
1.142 + TRgb iRightSeparatorColor;
1.143 + };
1.144 +
1.145 +public:
1.146 +
1.147 + /**
1.148 + * Two-phased constructor.
1.149 + *
1.150 + * @return Pointer to a new formatted cell listbox data object.
1.151 + */
1.152 + IMPORT_C static CFormattedCellListBoxData* NewL();
1.153 +
1.154 + /**
1.155 + * Destructor.
1.156 + */
1.157 + IMPORT_C ~CFormattedCellListBoxData();
1.158 +
1.159 +public:
1.160 +
1.161 + /**
1.162 + * Gets colours attached to the cell.
1.163 + *
1.164 + * @param aSubCellIndex Index number of the subcell.
1.165 + * @return Text and background colors.
1.166 + */
1.167 + IMPORT_C const TColors& SubCellColors(TInt aSubCellIndex) const;
1.168 +
1.169 + /**
1.170 + * Sets colours attached to the cell.
1.171 + *
1.172 + * @param aSubCellIndex Index number of the subcell.
1.173 + * @param aColors Text and background colors.
1.174 + */
1.175 + IMPORT_C void SetSubCellColorsL(TInt aSubCellIndex, const TColors &aColors);
1.176 +
1.177 + /**
1.178 + * Gets baseline position from top of the cell.
1.179 + *
1.180 + * @param aSubCellIndex Index number of the subcell.
1.181 + * @return Baseline y-position.
1.182 + */
1.183 + IMPORT_C TInt SubCellBaselinePos(TInt aSubCellIndex) const;
1.184 +
1.185 + /**
1.186 + * Sets baseline position from top of the cell.
1.187 + *
1.188 + * @param aSubCellIndex Index number of the subcell.
1.189 + * @param aPos Position which is set for the item.
1.190 + */
1.191 + IMPORT_C void SetSubCellBaselinePosL(TInt aSubCellIndex, TInt aPos);
1.192 +
1.193 + /**
1.194 + * Gets cell size in pixels.
1.195 + *
1.196 + * @param aSubCellIndex Index number of the subcell.
1.197 + * @return Cell size.
1.198 + */
1.199 + IMPORT_C TSize SubCellSize(TInt aSubCellIndex) const;
1.200 +
1.201 + /**
1.202 + * Sets cell size in pixels.
1.203 + *
1.204 + * @param aSubCellIndex Index number of the subcell.
1.205 + * @param aSize Cell size.
1.206 + */
1.207 + IMPORT_C void SetSubCellSizeL(TInt aSubCellIndex, TSize aSize);
1.208 +
1.209 + /**
1.210 + * Gets cell position inside an item.
1.211 + *
1.212 + * @param aSubCellIndex Index number of the subcell.
1.213 + * @return Cell position.
1.214 + */
1.215 + IMPORT_C TPoint SubCellPosition(TInt aSubCellIndex) const;
1.216 +
1.217 + /**
1.218 + * Sets cell position inside an item.
1.219 + *
1.220 + * @param aSubCellIndex Index number of the subcell.
1.221 + * @param aPosition New position for cell.
1.222 + */
1.223 + IMPORT_C void SetSubCellPositionL(TInt aSubCellIndex, TPoint aPosition);
1.224 +
1.225 + /**
1.226 + * Determines whether this cell can overlap with one of the previous cells.
1.227 + *
1.228 + * @param aSubCellIndex Index number of the subcell.
1.229 + * @return @c ETrue if cell overlaps another one, @c EFalse if cell allocates
1.230 + * area from other cells.
1.231 + */
1.232 + IMPORT_C TBool SubCellIsTransparent(TInt aSubCellIndex) const;
1.233 +
1.234 + /**
1.235 + * Modifies whether the cell can overlap with one of the previous cells.
1.236 + *
1.237 + * @param aSubCellIndex Index number of the subcell.
1.238 + * @param aIsTransparent @c ETrue if transparent, @c EFalse if not.
1.239 + */
1.240 + IMPORT_C void SetTransparentSubCellL(TInt aSubCellIndex,
1.241 + TBool aIsTransparent);
1.242 +
1.243 + /**
1.244 + * Checks whether drawing algorithm always draws the cell or whether empty
1.245 + * string in list item can disable the drawing of the cell.
1.246 + *
1.247 + * @param aSubCellIndex Index number of the subcell.
1.248 + * @return @c ETrue when empty string disables cell,
1.249 + * @c EFalse if always drawn.
1.250 + */
1.251 + IMPORT_C TBool SubCellIsNotAlwaysDrawn(TInt aSubCellIndex) const;
1.252 +
1.253 + /**
1.254 + * Sets whether drawing algorithm always draws the cell.
1.255 + *
1.256 + * @param aSubCellIndex Index number of the subcell.
1.257 + * @param aIsNotAlwaysDrawn If @c ETrue, empty string disables cell.
1.258 + */
1.259 + IMPORT_C void SetNotAlwaysDrawnSubCellL(TInt aSubCellIndex,
1.260 + TBool aIsNotAlwaysDrawn);
1.261 +
1.262 + /**
1.263 + * Gets margins used for the content inside the cell.
1.264 + *
1.265 + * @param aSubCellIndex Index number of the subcell.
1.266 + * @return Margins in pixels.
1.267 + */
1.268 + IMPORT_C TMargins SubCellMargins(TInt aSubCellIndex) const;
1.269 +
1.270 + /**
1.271 + * Sets margins for the content inside the cell.
1.272 + *
1.273 + * @param aSubCellIndex Index number of the subcell.
1.274 + * @param aMargins Margins for the content inside the cell.
1.275 + */
1.276 + IMPORT_C void SetSubCellMarginsL(TInt aSubCellIndex, TMargins aMargins);
1.277 +
1.278 + /**
1.279 + * Gets font attached to the cell.
1.280 + *
1.281 + * @param aSubCellIndex Index number of the subcell.
1.282 + * @return Handle to the attached font.
1.283 + */
1.284 + IMPORT_C const CFont* SubCellFont(TInt aSubCellIndex) const;
1.285 +
1.286 + /**
1.287 + * Sets the font attached to the cell.
1.288 + *
1.289 + * @param aSubCellIndex Index number of the subcell.
1.290 + * @param aFont Font to attach to the cell.
1.291 + */
1.292 + IMPORT_C void SetSubCellFontL(TInt aSubCellIndex, const CFont* aFont);
1.293 +
1.294 + /**
1.295 + * Gets the alignment attached to the cell.
1.296 + *
1.297 + * @param aSubCellIndex Index number of the subcell.
1.298 + * @return Alignment of the text.
1.299 + */
1.300 + IMPORT_C CGraphicsContext::TTextAlign SubCellAlignment(TInt aSubCellIndex)
1.301 + const;
1.302 +
1.303 + /**
1.304 + * Sets the alignment attached to the cell.
1.305 + *
1.306 + * @param aSubCellIndex Index number of the subcell.
1.307 + * @param aAlign Alignment that is attached to the cell
1.308 + */
1.309 + IMPORT_C void SetSubCellAlignmentL(TInt aSubCellIndex,
1.310 + CGraphicsContext::TTextAlign aAlign);
1.311 +
1.312 + /**
1.313 + * Checks whetherdrawing algorithm considers the text
1.314 + * string in list item as unicode text string displayable on the screen,
1.315 + * or as string representation of an index to icon array.
1.316 + *
1.317 + * @param aSubCellIndex Index number of the subcell.
1.318 + * @return @c ETrue if graphics cell, @c EFalse if text cell.
1.319 + */
1.320 + IMPORT_C TBool SubCellIsGraphics(TInt aSubCellIndex) const;
1.321 +
1.322 + /**
1.323 + * Sets whether drawing algorithm considers the text string in list item as
1.324 + * unicode text string displayable on the screen, or as string
1.325 + * representation of an index to icon array.
1.326 + *
1.327 + * @param aSubCellIndex Index number of the subcell.
1.328 + * @param aIsGraphics @c ETrue if graphics cell, @c EFalse if text cell.
1.329 + */
1.330 + IMPORT_C void SetGraphicsSubCellL(TInt aSubCellIndex, TBool aIsGraphics);
1.331 +
1.332 + /**
1.333 + * Checks whether vertical line is drawn to the right side of the cell.
1.334 + *
1.335 + * @param aColumn Index number of the subcell.
1.336 + * @return Style of pen used to draw a line for the right side of the cell.
1.337 + */
1.338 + IMPORT_C CGraphicsContext::TPenStyle
1.339 + SubCellRightSeparatorStyle(TInt aColumn) const;
1.340 +
1.341 + /**
1.342 + * Sets whether vertical line is drawn to the right side of the cell.
1.343 + *
1.344 + * @param aSubCell Index number of the subcell.
1.345 + * @param aStyle Style of a pen used to draw a line for the right side of
1.346 + * the cell.
1.347 + */
1.348 + IMPORT_C void SetSubCellRightSeparatorStyleL(TInt aSubCell,
1.349 + CGraphicsContext::TPenStyle aStyle);
1.350 +
1.351 + /**
1.352 + * Gets the amount of pixels text margins is grown if it is truncated.
1.353 + * This is usually very small number used to make the layout look more
1.354 + * balanced when text is truncated. (the glyph used for truncation is
1.355 + * almost empty and on narrow text elements, it looks odd if the truncated
1.356 + * text element is exactly same size as non-truncated version.)
1.357 + *
1.358 + * @param aSubCellIndex Index number of the subcell.
1.359 + * @return Amount of pixels that are used for growing the text margins in
1.360 + * truncation.
1.361 + */
1.362 + IMPORT_C TInt SubCellTextClipGap(TInt aSubCellIndex) const;
1.363 +
1.364 + /**
1.365 + * Sets the amount of pixels truncation grows a text element.
1.366 + *
1.367 + * @param aSubCellIndex Index number of the subcell.
1.368 + * @param aGap The amount of pixels that are required for growing the text
1.369 + * element when it is truncated.
1.370 + */
1.371 + IMPORT_C void SetSubCellTextClipGapL(TInt aSubCellIndex, TInt aGap);
1.372 +
1.373 + /**
1.374 + * SkinEnabled checks whether skins are enabled on this list.
1.375 + *
1.376 + * @since Symbian 2.0
1.377 + * @return @c ETrue if enabled, @c EFalse if disabled.
1.378 + */
1.379 + IMPORT_C TBool SkinEnabled() const;
1.380 +
1.381 + /**
1.382 + * Sets whether skins are enabled on this list.
1.383 + * The default value is determined from global setting from @c CAknAppUi.
1.384 + *
1.385 + * @since Symbian 2.0
1.386 + * @param aEnabled If @c ETrue skins are set enabled.
1.387 + * If @c EFalse skins are set disabled.
1.388 + */
1.389 + IMPORT_C void SetSkinEnabledL(TBool aEnabled);
1.390 +
1.391 + /**
1.392 + * Checks whether the cell is used for numbers.
1.393 + *
1.394 + * @since Symbian 2.0
1.395 + * @param aSubCellIndex Index number of the subcell.
1.396 + * @return @c ETrue if enabled, @c EFalse if disabled.
1.397 + */
1.398 + IMPORT_C TBool SubCellIsNumberCell(TInt aSubCellIndex) const;
1.399 +
1.400 + /**
1.401 + * Sets whether the cell is used for numbers.
1.402 + *
1.403 + * @since Symbian 2.0
1.404 + * @param aSubCellIndex Index number of the subcell.
1.405 + * @param aIsNumberCell New value for the flag.
1.406 + */
1.407 + IMPORT_C void SetNumberCellL(TInt aSubCellIndex, TBool aIsNumberCell);
1.408 +
1.409 + /**
1.410 + * Gets the icon array used when drawing bitmaps for the listbox items.
1.411 + */
1.412 + IMPORT_C CArrayPtr<CGulIcon>* IconArray() const;
1.413 +
1.414 + /**
1.415 + * Sets the icon array used when drawing bitmaps.
1.416 + * The array can be modified (no need to call this method when modifying),
1.417 + * even in @c MdcaPoint() or @c MdcaCount() methods of @c MDesCArray class.
1.418 + * See also @c CTextListBoxModel::SetItemTextArray().
1.419 + *
1.420 + * The most common way to crash a listbox is by forgetting to call this
1.421 + * method, or the list item string for graphics cell is not an index of
1.422 + * a bitmap.
1.423 + *
1.424 + * @param aArray Pointer to the icon array.
1.425 + */
1.426 + IMPORT_C void SetIconArrayL(CArrayPtr<CGulIcon>* aArray);
1.427 +
1.428 + /**
1.429 + * SetIconArray sets the icon array used when drawing bitmaps.
1.430 + * The array can be modified (no need to call this method when modifying),
1.431 + * even in @c MdcaPoint() or @c MdcaCount() methods of @c MDesCArray class.
1.432 + * See also @c CTextListBoxModel::SetItemTextArray().
1.433 + *
1.434 + * The most common way to crash a listbox is by forgetting to call this
1.435 + * method, or the list item string for graphics cell is not an index of
1.436 + * a bitmap.
1.437 + *
1.438 + * @param aArray Pointer to the icon array.
1.439 + */
1.440 + IMPORT_C void SetIconArray(CArrayPtr<CGulIcon>* aArray);
1.441 +
1.442 + /**
1.443 + * Font access to the font used in subcell.
1.444 + *
1.445 + * @param aItemProperties Not used in code.
1.446 + * @param aSubCellIndex Index number of the subcell.
1.447 + * @return Font used in subcell.
1.448 + */
1.449 + IMPORT_C CFont* Font(const TListItemProperties& aItemProperties,
1.450 + TInt aSubCellIndex) const;
1.451 +
1.452 + /**
1.453 + * From @c CListBoxData.
1.454 + *
1.455 + * @c Draw() is the most important method in
1.456 + * @c CEikFormattedCellListBoxData.
1.457 + * This is the only method that needs to be implemented in this class and
1.458 + * it draws the whole list item.
1.459 + *
1.460 + * @param aProperties Properties attached to the list item.
1.461 + * @param aGc Graphics Context used for drawing the list item.
1.462 + * @param aText A text string describing the list item cells.
1.463 + * @param aRect The area of the screen for the whole list item.
1.464 + * @param aHighlight Whether the list item is selected.
1.465 + * @param aColors The colours used for drawing the item.
1.466 + */
1.467 + IMPORT_C virtual void Draw(TListItemProperties aProperties,
1.468 + CWindowGc& aGc,
1.469 + const TDesC* aText,
1.470 + const TRect& aRect,
1.471 + TBool aHighlight,
1.472 + const TColors& aColors) const;
1.473 +
1.474 + /**
1.475 + * Indicates if sub cell is using its own colors rather than common colors.
1.476 + *
1.477 + * @param aSubCell Index number of the subcell.
1.478 + * @return Boolean indicating whether own colors enabled.
1.479 + * @c ETrue enabled, @c EFalse disabled.
1.480 + */
1.481 + IMPORT_C TBool UseSubCellColors(TInt aSubCell) const;
1.482 +
1.483 + /**
1.484 + * Ability for a skin subsystem to access Mop chain through current
1.485 + * listbox control.
1.486 + *
1.487 + * @since Symbian 2.0
1.488 + * @return Current listbox instance or NULL.
1.489 + */
1.490 + IMPORT_C CCoeControl* Control() const;
1.491 +
1.492 + /**
1.493 + * Ability for a skin subsystem to access mop chain through current listbox
1.494 + * control.
1.495 + *
1.496 + * @since Symbian 2.0
1.497 + * @param aControlOrNull Current listbox instance or NULL. Cannot be other
1.498 + * control than the current listbox!
1.499 + */
1.500 + IMPORT_C void SetControl(CCoeControl* aControlOrNull);
1.501 +
1.502 + /**
1.503 + * Access to the background context of the listbox.
1.504 + *
1.505 + * @since Symbian 2.0
1.506 + * @return Skin background context.
1.507 + */
1.508 + IMPORT_C MAknsControlContext* SkinBackgroundContext() const;
1.509 + /**
1.510 + * Modify properties of the skin context (background).
1.511 + *
1.512 + * @since Symbian 2.0
1.513 + * @param aId Skin background identifier.
1.514 + * @param aRect Skin background rectangle.
1.515 + */
1.516 + IMPORT_C void SetBackgroundSkinStyle(const TAknsItemID *aId,
1.517 + const TRect &aRect);
1.518 +
1.519 + /**
1.520 + * Modify properties of the skin context (AB-column).
1.521 + *
1.522 + * @since Symbian 2.0
1.523 + * @param aId Skin background identifier.
1.524 + * @param aTileRect Skin background area from LAF.
1.525 + */
1.526 + IMPORT_C void SetSkinStyle(const TAknsItemID* aId, const TRect& aTileRect);
1.527 +
1.528 + /**
1.529 + * Modify position of the parent for list default context.
1.530 + *
1.531 + * @since Symbian 2.0
1.532 + * @param aPos The new position.
1.533 + */
1.534 + IMPORT_C void SetSkinParentPos(const TPoint& aPos);
1.535 +
1.536 + /**
1.537 + * Modify properties of the skin context (list ending)*
1.538 +
1.539 + * @since Symbian 2.0
1.540 + * @param listEndId List ending skin background identifier.
1.541 + * @param aRect List ending background area from LAF.
1.542 + */
1.543 + IMPORT_C void SetListEndSkinStyle(const TAknsItemID *listEndId,
1.544 + const TRect &aRect);
1.545 +
1.546 + /**
1.547 + * Gets RespectFocus flag.
1.548 + *
1.549 + * @return RespectFocus flag. @c ETrue if list item highlights are only
1.550 + * shown when the list is has been focused on.
1.551 + */
1.552 + IMPORT_C TBool RespectFocus() const;
1.553 +
1.554 + /**
1.555 + * Sets RespectFocus flag.
1.556 + *
1.557 + * @param aBool Value of RespectFocus flag. @c ETrue means that the
1.558 + * list item highlight is only shown if list is focused on.
1.559 + */
1.560 + IMPORT_C void SetRespectFocus(TBool aBool);
1.561 +
1.562 + /**
1.563 + * Set list higlight skin style.
1.564 + *
1.565 + * @since Symbian 2.0
1.566 + * @param aFrameId The id for the frame.
1.567 + * @param aFrameCenterId The id for the frame center.
1.568 + */
1.569 + IMPORT_C void SetSkinHighlightFrame(const TAknsItemID* aFrameId,
1.570 + const TAknsItemID* aFrameCenterId);
1.571 + /**
1.572 + * Set popup skin style.
1.573 + *
1.574 + * @since Symbian 2.0
1.575 + * @param aFrameId The id for the frame.
1.576 + * @param aFrameCenterId The id for the frame center.
1.577 + */
1.578 + IMPORT_C void SetSkinPopupFrame(const TAknsItemID* aFrameId,
1.579 + const TAknsItemID* aFrameCenterId);
1.580 +
1.581 + /**
1.582 + * Set popup skin frame position.
1.583 + *
1.584 + * @since Symbian 2.0
1.585 + * @param aOuterRect Outer position of the frame.
1.586 + * @param aInnerRect Inner position of the frame.
1.587 + */
1.588 + IMPORT_C void SetSkinPopupFramePosition(const TRect& aOuterRect,
1.589 + const TRect& aInnerRect);
1.590 +
1.591 + /**
1.592 + * Enable or disable logical to visual reordering in listbox data text
1.593 + * drawing. By default, it is enabled. This has any effect only when
1.594 + * bidirectional text is rendered.
1.595 + *
1.596 + * If you convert text to visual order prior to passing it to the listbox
1.597 + * (for example by wrapping text to lines with methods in
1.598 + * @c AknBidiTextUtils), then you should disable conversion in listbox by
1.599 + * calling this method.
1.600 + *
1.601 + * @since Symbian 2.0
1.602 + * @param aUseConversion Enable (@c ETrue) or disable
1.603 + * (@c EFalse) conversion.
1.604 + */
1.605 + IMPORT_C void UseLogicalToVisualConversion( TBool aUseConversion );
1.606 +
1.607 + /**
1.608 + * Enables or disables marquee.
1.609 + *
1.610 + * @param aEnable @c ETrue if On, @c EFalse if Off.
1.611 + */
1.612 + IMPORT_C void EnableMarqueeL(TBool aEnable);
1.613 +
1.614 + /**
1.615 + * Determines if marquee is on.
1.616 + *
1.617 + * @return Flag indicating if marquee is on (@c ETrue on, @c EFalse off)
1.618 + */
1.619 +#ifdef __WINS__
1.620 + IMPORT_C const TBool IsMarqueeOn();
1.621 +#else
1.622 + IMPORT_C TBool IsMarqueeOn();
1.623 +#endif // __WINS__
1.624 + /**
1.625 + * Function that is called when the owning control has gained the focus.
1.626 + * Causes that animation is continued because the control is visible and
1.627 + * focused.
1.628 + */
1.629 + void FocusGained();
1.630 +
1.631 + /**
1.632 + * Function that is called when the owning control has lost the focus.
1.633 + * Causes the animation to pause, even if the control is partially
1.634 + * visible.
1.635 + */
1.636 + void FocusLost();
1.637 +
1.638 + /**
1.639 + * Handles the skin change situation. Causes change of animation.
1.640 + *
1.641 + * @param aType Type of resource change.
1.642 + */
1.643 + void HandleResourceChange( TInt aType );
1.644 +
1.645 + /**
1.646 + * Gets animation used for drawing the list highlight.
1.647 + * May return NULL, in which case the normal skinned highlight should be
1.648 + * drawn. This pointer is valid only during the draw -> you should not
1.649 + * store it locally outside draw scope.
1.650 + *
1.651 + * @return Animation used for drawing the list highlight.
1.652 + */
1.653 + IMPORT_C const CAknsEffectAnim* HighlightAnim() const;
1.654 +
1.655 + /**
1.656 + * This method should be called before drawing animated highlight. It will
1.657 + * sync the animation with the background under the current highlight (only
1.658 + * when current item index has changed).
1.659 + */
1.660 + IMPORT_C void AboutToDrawHighlightAnim() const;
1.661 +
1.662 + /**
1.663 + * Sets the observer for overriding default highlight input layer drawing
1.664 + * functionality. Note that you should still call
1.665 + * @c AboutToDrawHighlightAnim (it will call the observer if it is set).
1.666 + *
1.667 + * @param aDrawer Highlight animation drawer.
1.668 + */
1.669 + IMPORT_C void SetHighlightAnimBackgroundDrawer(
1.670 + MListBoxAnimBackgroundDrawer* aDrawer );
1.671 +
1.672 + /**
1.673 + * Changes item cell size and resizes highlight animation. Called by list
1.674 + * when item cell size changes. If you are using non-standard highlight
1.675 + * sizes make sure to sync the list item cell size.
1.676 + *
1.677 + * @param aSize New cell size.
1.678 + */
1.679 + IMPORT_C void SetItemCellSize( const TSize& aSize );
1.680 +
1.681 + /**
1.682 + * @return ETrue if highlight animation exists, EFalse otherwise.
1.683 + *
1.684 + * @since 3.1
1.685 + */
1.686 + IMPORT_C TBool HasHighlightAnim() const;
1.687 + /**
1.688 + * The preferred method for drawing highlight animation in derived classes.
1.689 + * Before calling this method you should check that highlight animation
1.690 + * exists by calling HasHighlightAnim. In case of draw failure you should
1.691 + * default to normal skinned highlight drawing. For example:
1.692 + *
1.693 + * TBool drawOk = EFalse;
1.694 + *
1.695 + * if( HasHighlightAnim() )
1.696 + * {
1.697 + * drawOk = DrawHighlightAnim( gc, rect );
1.698 + * }
1.699 + *
1.700 + * if( !drawOk )
1.701 + * {
1.702 + * ...do normal skinned draw
1.703 + * }
1.704 + *
1.705 + * @param aGc Graphics context for blitting animation frame
1.706 + * @param aRect Target rect for blitting animation frame
1.707 + * @return The draw status, ETrue if drawing was ok, EFalse otherwise.
1.708 + *
1.709 + * @since 3.1
1.710 + */
1.711 + IMPORT_C TBool DrawHighlightAnim( CBitmapContext& aGc, const TRect& aRect ) const;
1.712 + /**
1.713 + * Creates pictograph interface.
1.714 + * Only effective in Japanese variant.
1.715 + * Called by the listbox.
1.716 + */
1.717 + void CreatePictographInterfaceL();
1.718 +
1.719 + /**
1.720 + * Creates marquee control.
1.721 + * Called by the listbox.
1.722 + */
1.723 + void CreateMarqueeControlL();
1.724 +
1.725 + /**
1.726 + * Resets the marquee animation data.
1.727 + */
1.728 + void ResetMarquee();
1.729 +
1.730 + /**
1.731 + * Gets the current list item index that is / was drawn by marquee.
1.732 + *
1.733 + * @return Index of the item that is / was drawn by marquee.
1.734 + */
1.735 + TInt CurrentMarqueeItemIndex();
1.736 +
1.737 + /**
1.738 + * Sets the current list item index that was drawn by marquee.
1.739 + *
1.740 + * @param aIndex Index of list item.
1.741 + */
1.742 + void SetCurrentMarqueeItemIndex(TInt aIndex);
1.743 +
1.744 + /**
1.745 + * Sets the current list item index (not for marquee). Since Symbian 3.0
1.746 + * causes highlight animation to change its background (only if the current
1.747 + * item index changes). Don't call this method if the index is not the
1.748 + * current item index.
1.749 + *
1.750 + * @param aIndex Index number of list item.
1.751 + */
1.752 + void SetCurrentItemIndex(TInt aIndex);
1.753 +
1.754 + // previous method was used both as current item index AND as currently
1.755 + // drawn item index. Not really good idea.
1.756 + void SetCurrentlyDrawnItemIndex( TInt aIndex );
1.757 +
1.758 + /**
1.759 + * Sets the font attached to the cell for each row separately.
1.760 + *
1.761 + * @param aRowIndex Row, which subcells are to be changed.
1.762 + * @param aSubCellIndex Index number of the subcell.
1.763 + * @param aFont Font to be used.
1.764 + */
1.765 + IMPORT_C void SetSubCellFontForRowL(TInt aRowIndex,
1.766 + TInt aSubCellIndex,
1.767 + const CFont* aFont);
1.768 +
1.769 + /**
1.770 + * Gets font attached to the row and cell.
1.771 + *
1.772 + * @param aRow Index number of the row.
1.773 + * @param aSubCellIndex Index number of the subcell.
1.774 + * @return Font handle.
1.775 + */
1.776 + IMPORT_C const CFont* RowAndSubCellFont(TInt aRow,
1.777 + TInt aSubCellIndex) const;
1.778 +
1.779 + /**
1.780 + * Enables or disables transparency effect i.e. does the listbox draw its
1.781 + * own background or not.
1.782 + *
1.783 + * @param aDrawBackground @c EFalse enables transparency, @c ETrue disables.
1.784 + */
1.785 + IMPORT_C void SetDrawBackground(const TBool aDrawBackground);
1.786 +
1.787 + /**
1.788 + * Checks if the list is transparent and drawing the background
1.789 + * that would fall behind it.
1.790 + *
1.791 + * @return @c EFalse if transparent, @c ETrue otherwise.
1.792 + */
1.793 + TBool IsBackgroundDrawingEnabled() const;
1.794 +
1.795 + /**
1.796 + * Enables or disables drawing background after scrollbar.
1.797 + *
1.798 + * @param aDrawBackground Default is @c ETrue which means that Scrollbar
1.799 + * is drawn first.
1.800 + */
1.801 + void SetDrawScrollbarBackground(const TBool aDrawBackground);
1.802 +
1.803 + /**
1.804 + * Is the listbox drawing the background behind the scrollbar or not.
1.805 + *
1.806 + * @return @c ETrue if background is drawn after scrollbar, @c EFalse
1.807 + * otherwise.
1.808 + */
1.809 + TBool IsScrollbarBackgroundDrawingEnabled() const;
1.810 +
1.811 + /**
1.812 + * Sets position of listbox separator line.
1.813 + *
1.814 + * @param aPosition Position in which separator line is placed.
1.815 + */
1.816 + IMPORT_C void SetSeparatorLinePosition(TAknSeparatorLinePosition aPosition);
1.817 +
1.818 + /**
1.819 + * Gets separator line position.
1.820 + *
1.821 + * @return Position of separator line.
1.822 + */
1.823 + IMPORT_C TAknSeparatorLinePosition SeparatorLinePosition() const;
1.824 +
1.825 + /**
1.826 + *
1.827 + * @deprecated
1.828 + *
1.829 + * Gets layout data needed for separator lines drawing.
1.830 + *
1.831 + * @return Layout data.
1.832 + */
1.833 + IMPORT_C CAknLayoutData* LayoutData() const;
1.834 +
1.835 + /**
1.836 + *
1.837 + * @deprecated
1.838 + *
1.839 + * Gets LayOutInit flag used for drawing separator lines in lists.
1.840 + *
1.841 + * @internal
1.842 + * @return LayOutInit flag.
1.843 + */
1.844 + IMPORT_C TBool LayoutInit() const;
1.845 +
1.846 + /**
1.847 + *
1.848 + * @deprecated
1.849 + *
1.850 + * Sets LayOutInit flag used for drawing separator lines in lists.
1.851 + *
1.852 + * @internal
1.853 + * @param aValue LayOutInit flag value.
1.854 + */
1.855 + IMPORT_C void SetLayoutInit(TBool aValue);
1.856 +
1.857 + /**
1.858 + * Enables or disables underlining per text subcell only if
1.859 + * @c TListItemProperties also has underlining enabled. If this method is
1.860 + * not called and @c TListItemProperties has underlining enabled, drawing
1.861 + * will revert to old style where only first text subcell will be underlined.
1.862 + *
1.863 + * @since S60 3.1
1.864 + * @param aUnderlinedCells Bitmask of cells to be underlined.
1.865 + */
1.866 + IMPORT_C void SetSubcellUnderlined( TBitFlags32 aUnderlinedCells );
1.867 +
1.868 + /**
1.869 + *
1.870 + * enables certain highlight skinning for
1.871 + * radibutton / checkbox set style lists
1.872 + *
1.873 + * should be used only by avkon internally
1.874 + *
1.875 + * @since S60 3.1
1.876 + *
1.877 + */
1.878 +
1.879 + void UseHighlightIconSwapping( TBool aUse );
1.880 + TBool UseHighlightIconSwapping() const;
1.881 +
1.882 + // next methods are only used inside the drawing algorithm.
1.883 + // The set methods are also const because they do not change observable behavior of the system.
1.884 + TSize SubCellRealSize(TInt aSubCellIndex) const;
1.885 + void SetSubCellRealSize(TInt aSubCellIndex, TSize aRealSize) const;
1.886 + //
1.887 + TSize SubCellRealTextSize(TInt aSubCellIndex) const;
1.888 + void SetSubCellRealTextSize(TInt aSubCellIndex, TSize aRealSize) const;
1.889 +
1.890 +
1.891 + struct SSubCell
1.892 + {
1.893 + SSubCell() { }
1.894 + TInt iSubCell; // Must be first entry
1.895 +
1.896 + TInt iWidth;
1.897 + TMargins iMargin;
1.898 + const CFont* iBaseFont;
1.899 + TInt iActualFontIndex;
1.900 + TBool iGraphics;
1.901 + TBool iTransparent;
1.902 + TBool iNotAlwaysDrawn;
1.903 + CGraphicsContext::TTextAlign iAlign;
1.904 + CGraphicsContext::TPenStyle iRightSeparatorStyle;
1.905 +
1.906 + TPoint iPosition;
1.907 + TInt iBaseline;
1.908 + TSize iSize;
1.909 +
1.910 + TBool iUseSubCellColors; // this is set if someone calls SetSubCellColorsL()
1.911 + TColors iColors;
1.912 + TInt iTextClipGap;
1.913 +
1.914 + TBool iNumberCell;
1.915 + // the next ones change during drawing algorithm
1.916 + __MUTABLE TSize iRealSize;
1.917 + __MUTABLE TSize iRealTextSize;
1.918 + };
1.919 +
1.920 +protected:
1.921 +
1.922 + /**
1.923 + * C++ default constructor.
1.924 + */
1.925 + IMPORT_C CFormattedCellListBoxData();
1.926 +
1.927 + /**
1.928 + * Second phase constructor. Highlight animation will be
1.929 + * created by default (if it is provided by the skin).
1.930 + */
1.931 + IMPORT_C void ConstructLD();
1.932 +
1.933 + /**
1.934 + * Second phase constructor for subclasses that want to override highlight
1.935 + * animation creation.
1.936 + *
1.937 + * @param aAnimationIID Skin ItemID of the constructed animation. Passing
1.938 + * @c KAknsIIDNone will disable highlight animation.
1.939 + */
1.940 + IMPORT_C void ConstructLD(const TAknsItemID& aAnimationIID);
1.941 +
1.942 + /**
1.943 + * Main drawing algorithm used for drawing S60 list item.
1.944 + * @c Draw() method should call this method after clearing the list item
1.945 + * area and drawing the highlight.
1.946 + *
1.947 + * @param aProperties Properties attached to the list item.
1.948 + * @param aGc Graphics Context used for drawing the list item.
1.949 + * @param aText A text string describing the list item cells.
1.950 + * @param aRect The area of the screen for the whole list item.
1.951 + * @param aHighlight Whether the list item is selected.
1.952 + * @param aColors The colors used for drawing the item.
1.953 + * @panic EAknPanicFormattedCellListInvalidBitmapIndex The defined bitmap
1.954 + * index is invalid.
1.955 + * @panic EAknPanicOutOfRange The defined index is out of the range.
1.956 + */
1.957 + IMPORT_C void DrawFormatted(TListItemProperties aProperties,
1.958 + CWindowGc& aGc,
1.959 + const TDesC* aText,
1.960 + const TRect& aRect,
1.961 + TBool aHighlight,
1.962 + const TColors& aColors) const;
1.963 +
1.964 + /**
1.965 + * Draws list items.
1.966 + *
1.967 + * @param aProperties Properties attached to the list item.
1.968 + * @param aGc Graphics Context used for drawing the list item.
1.969 + * @param aText A text string describing the list item cells.
1.970 + * @param aRect The area of the screen for the whole list item.
1.971 + * @param aHighlight Whether the list item is selected.
1.972 + * @param aColors The colors used for drawing the item.
1.973 + * @internal
1.974 + */
1.975 + void DrawFormattedSimple( TListItemProperties& aProperties,
1.976 + CWindowGc& aGc,
1.977 + const TDesC* aText,
1.978 + const TRect& aRect,
1.979 + TBool aHighlight,
1.980 + const TColors& aColors ) const;
1.981 +private:
1.982 + /**
1.983 + * @internal
1.984 + */
1.985 + void DrawFormattedOld( TListItemProperties& aProperties,
1.986 + CWindowGc& aGc,
1.987 + const TDesC* aText,
1.988 + const TRect& aItemRect,
1.989 + TBool aHighlight,
1.990 + const TColors& aColors ) const;
1.991 +
1.992 + /**
1.993 + * @internal helper
1.994 + */
1.995 + void BitBltColored( CWindowGc& aGc,
1.996 + TBool aHighlight,
1.997 + const CGulIcon* aIcon,
1.998 + TInt aSubcell,
1.999 + TBool aColorIcon,
1.1000 + const TRect& aGraphicRect ) const;
1.1001 +
1.1002 +
1.1003 +public:
1.1004 + /**
1.1005 + * Customizes marquee default behavior.
1.1006 + * Use this before enabling marquee ( @c EnableMarqueeL() ), otherwise
1.1007 + * marquee behavior will change during animation.
1.1008 + *
1.1009 + * @since S60 2.8
1.1010 + * @param aLoops Max number of loops to be executed (default 1).
1.1011 + * @param aScrollAmount The amount of pixels scrolled per frame (default 6).
1.1012 + * @param aScrollDelay The delay between each loop
1.1013 + * (in microseconds, default 1000000 microseconds).
1.1014 + * @param aInterval The interval between frame updates after
1.1015 + * the initial delay, in microseconds.
1.1016 + */
1.1017 + IMPORT_C void SetMarqueeParams(const TInt aLoops,
1.1018 + const TInt aScrollAmount,
1.1019 + const TInt aScrollDelay,
1.1020 + const TInt aInterval);
1.1021 +
1.1022 +
1.1023 + /**
1.1024 + * @internal helper
1.1025 + */
1.1026 + void SetClippedByWrap( TUint32 aClippedCells, TBool aUseClippedByWrap );
1.1027 +
1.1028 + /**
1.1029 + * Tells whether current item has clipped text cells
1.1030 + * @since S60 3.2
1.1031 + * @return bitfield of clipped subcells
1.1032 + */
1.1033 + IMPORT_C TUint32 CurrentItemTextWasClipped() const;
1.1034 +
1.1035 +protected: // non-exported!
1.1036 +
1.1037 + /**
1.1038 + * Gets list box extension, which is used for adding more funtionality to
1.1039 + * list boxes without destroying compatibility with previous versions.
1.1040 + *
1.1041 + * @return Pointer to the list box extension.
1.1042 + */
1.1043 + CFormattedCellListBoxDataExtension* Extension();
1.1044 +
1.1045 + /**
1.1046 + * Gets list box extension, which is used for adding more funtionality to
1.1047 + * list boxes without destroying compatibility with previous versions.
1.1048 + *
1.1049 + * @return Pointer to the list box extension.
1.1050 + */
1.1051 + CFormattedCellListBoxDataExtension* Extension() const;
1.1052 +
1.1053 +public:
1.1054 + /**
1.1055 + * Renders a default animated highlight.
1.1056 + *
1.1057 + * @param aGc Graphics context used for drawing.
1.1058 + * @param aItemRect the area of the screen for drawing.
1.1059 + * @param aHighlight If @c ETrue highlight is rendered
1.1060 + * if @c EFalse, nothing is done.
1.1061 + */
1.1062 + void DrawDefaultHighlight(CWindowGc &aGc,
1.1063 + const TRect &aItemRect,
1.1064 + TBool aHighlight) const;
1.1065 +
1.1066 + /**
1.1067 + * Renders a settings animated highlight.
1.1068 + *
1.1069 + * @param aGc Graphics context used for drawing.
1.1070 + * @param aItemRect the area of the screen for drawing.
1.1071 + * @param aHighlight If @c ETrue highlight is rendered
1.1072 + * if @c EFalse, nothing is done.
1.1073 + */
1.1074 + void DrawSettingHighlight(CWindowGc &aGc,
1.1075 + const TRect &aItemRect,
1.1076 + TBool aHighlight) const;
1.1077 +
1.1078 + /**
1.1079 + * Renders a popup animated highlight.
1.1080 + *
1.1081 + * @param aGc Graphics context used for drawing.
1.1082 + * @param aItemRect the area of the screen for drawing.
1.1083 + * @param aHighlight If @c ETrue highlight is rendered
1.1084 + * if @c EFalse, nothing is done.
1.1085 + */
1.1086 + void DrawPopupHighlight(CWindowGc &aGc,
1.1087 + const TRect &aItemRect,
1.1088 + TBool aHighlight) const;
1.1089 +
1.1090 + /**
1.1091 + * Draws a popup frame.
1.1092 + *
1.1093 + * @param aGc Graphics context used for drawing.
1.1094 + */
1.1095 + void DrawPopupFrame(CWindowGc &aGc) const;
1.1096 +
1.1097 + /**
1.1098 + * Disables logical-to-visual conversion in subcells between indexes.
1.1099 + *
1.1100 + * @param aFirstIndex First subcell not to use logical-to-visual conversion.
1.1101 + * @param aSecondIndex Last subcell not to use logical-to-visual conversion.
1.1102 + */
1.1103 + void SetWordWrappedSubcellIndices( TInt aFirstIndex, TInt aSecondIndex );
1.1104 +
1.1105 + /**
1.1106 + * Sets the size of the subcell's icon.
1.1107 + *
1.1108 + * @internal
1.1109 + * @param aIndex Subcell to modify.
1.1110 + * @param aSize New size for the icon.
1.1111 + */
1.1112 + IMPORT_C void SetSubCellIconSize(TInt aIndex, TSize aSize);
1.1113 +
1.1114 + /**
1.1115 + * Gets the size of the subcell's icon.
1.1116 + *
1.1117 + * @internal
1.1118 + * @param aIndex Subcell to query.
1.1119 + * @return Size of the subcell's icon.
1.1120 + */
1.1121 + TSize GetSubCellIconSize(TInt aIndex);
1.1122 +
1.1123 + /**
1.1124 + * Create and set the defaul skin context. Needed by the dynamic skin support.
1.1125 + *
1.1126 + * @internal
1.1127 + * @panic EAknPanicNullPointer Panics if @c iExtension has not been defined.
1.1128 + */
1.1129 + void SetupSkinContextL();
1.1130 +
1.1131 + /**
1.1132 + * Sets a text color if enhanced skin support is available.
1.1133 + *
1.1134 + * @internal
1.1135 + * @param aIndex Index Number of text color in @c TAknsQsnTextColorsIndex.
1.1136 + * @see @c TAknsQsnTextColorsIndex.
1.1137 + */
1.1138 + void SetESSTextColor( TAknsQsnTextColorsIndex aIndex );
1.1139 +
1.1140 + /**
1.1141 + * Set a highlighted text color if enhanced skin support is available.
1.1142 + *
1.1143 + * @internal
1.1144 + * @param aIndex Index Number of text color in @c TAknsQsnTextColorsIndex.
1.1145 + * @see @c TAknsQsnTextColorsIndex.
1.1146 + */
1.1147 + void SetESSHighlightedTextColor( TAknsQsnTextColorsIndex aIndex );
1.1148 +
1.1149 + /**
1.1150 + * Set window line layout for the defined sub cell.
1.1151 + *
1.1152 + * @internal
1.1153 + * @param aSubCell Target cell for which the layout is changed.
1.1154 + * @param aGraphicLayout The new layout.
1.1155 + */
1.1156 + void SetGraphicSubCellL(TInt aSubCell, const TAknWindowLineLayout& aGraphicLayout);
1.1157 +
1.1158 + /**
1.1159 + * Support for new layouts.
1.1160 + *
1.1161 + * Set text line layout for the defined sub cell.
1.1162 + *
1.1163 + * @internal
1.1164 + * @param aSubCell Target cell.
1.1165 + * @param aTextLayout The new layout.
1.1166 + */
1.1167 + void SetTextSubCellL(TInt aSubCell,const TAknTextLineLayout& aTextLayout);
1.1168 +
1.1169 +
1.1170 + /**
1.1171 + * Support for new layouts.
1.1172 + *
1.1173 + * @internal
1.1174 + * Changes setting of a graphical sub cell which is contained by the
1.1175 + * defined text sub cell.
1.1176 + *
1.1177 + * @param aSubCell Target text sub cell.
1.1178 + * @param aTextLayout New text layout.
1.1179 + * @param aAffectedSubCell The graphical sub cell affected by the change.
1.1180 + */
1.1181 + void SetConditionalSubCellL(TInt aSubCell,
1.1182 + const TAknTextLineLayout& aTextLayout,
1.1183 + TInt aAffectedSubCell);
1.1184 +
1.1185 + /**
1.1186 + * Checks if the list box uses scalable layouts.
1.1187 + *
1.1188 + * @internal
1.1189 + */
1.1190 + TBool UsesScalableLayoutData() const;
1.1191 + /**
1.1192 + * @internal. Do NOT use.
1.1193 + */
1.1194 + void UseScalableLayoutData( TBool aUse );
1.1195 +
1.1196 + /**
1.1197 + * @internal
1.1198 + */
1.1199 + void SetStretchableGraphicSubCellL(TInt aSubCell,
1.1200 + const TAknWindowComponentLayout& aNormalLayout,
1.1201 + const TAknWindowComponentLayout& aStretchedLayout);
1.1202 + /**
1.1203 + * @internal
1.1204 + */
1.1205 + void SetStretchableTextSubCellL(TInt aSubCell,
1.1206 + const TAknTextComponentLayout& aNormalLayout,
1.1207 + const TAknTextComponentLayout& aStretchedLayout);
1.1208 + /**
1.1209 + * @internal
1.1210 + */
1.1211 + void SetStretchableConditionalSubCellL(TInt aSubCell,
1.1212 + const TAknTextComponentLayout& aNormalLayout,
1.1213 + const TAknTextComponentLayout& aStretchedLayout,
1.1214 + TInt aNormalSubCell,
1.1215 + TInt aStretchedSubCell );
1.1216 + /**
1.1217 + * @internal
1.1218 + */
1.1219 + void ResetSLSubCellArray();
1.1220 +
1.1221 + /**
1.1222 + * @internal
1.1223 + */
1.1224 + void EnableStretching(const TBool aEnabled);
1.1225 + /**
1.1226 + * @internal
1.1227 + */
1.1228 + TBool StretchingEnabled() const;
1.1229 + /**
1.1230 + * @internal
1.1231 + */
1.1232 + void HideSecondRow(const TBool aHide);
1.1233 + /**
1.1234 + * @internal
1.1235 + */
1.1236 + TBool SecondRowHidden() const;
1.1237 + /**
1.1238 + * @internal
1.1239 + */
1.1240 + void SubCellsMightIntersect( const TBool aMightIntersect );
1.1241 +
1.1242 + // Drop shadows can be toggled on/off in
1.1243 + // "transparent" lists (eg. transparent camera setting page).
1.1244 + // ETrue = on, EFalse = off
1.1245 + /**
1.1246 + * @internal
1.1247 + */
1.1248 + void ToggleDropShadows( const TBool aEnable );
1.1249 +
1.1250 + // changes tactile feedback behaviour
1.1251 + // ETrue - feedback for any item
1.1252 + // EFalse - feedback for focused item only
1.1253 + /**
1.1254 + * @internal
1.1255 + */
1.1256 + void SetFeedbackForAllItems( TBool aFeedbackForAllItems );
1.1257 + // gets tactile feedback behaviour
1.1258 + // ETrue - feedback for any item
1.1259 + // EFalse - feedback for focused item only
1.1260 + /**
1.1261 + * @internal
1.1262 + */
1.1263 + TBool FeedbackForAllItems();
1.1264 +
1.1265 + /**
1.1266 + * Returns ETrue if kinetic scrolling is enabled.
1.1267 + * @internal
1.1268 + * @since S60 5.0
1.1269 + * @return ETrue if kinetic scrolling feature is enabled.
1.1270 + */
1.1271 + TBool KineticScrollingEnabled() const;
1.1272 +
1.1273 + /**
1.1274 + * Returns instance of CEikListBox.
1.1275 + * @internal
1.1276 + * @since S60 5.0
1.1277 + * @return Instance of CEikListBox.
1.1278 + */
1.1279 + CEikListBox* ListBox() const;
1.1280 +
1.1281 +
1.1282 +private:
1.1283 + void DoConstructL( const TAknsItemID& aAnimationIID );
1.1284 +
1.1285 + const TColors &Colors(TInt aItemIndex, TInt aSubCell) const;
1.1286 + TInt LastSubCell() const;
1.1287 + void AddSubCellL(TInt aSubCell);
1.1288 + SSubCell& At(TInt aArrayIndex);
1.1289 + const SSubCell& At(TInt aArrayIndex) const;
1.1290 + TInt FindSubCellIndex(TInt& aArrayIndex,TInt aSubCell) const;
1.1291 + void FindSubCellIndexOrAddL(TInt& aArrayIndex,TInt aSubCell);
1.1292 + TInt AddActualFontL(const CFont* aBaseFont);
1.1293 + void SetUnderlineStyle( TListItemProperties aProperties, CWindowGc& aGc, TInt aSubCell ) const;
1.1294 + void CheckIfSubCellsIntersect( TAknTextLineLayout* aLayouts, TBool* aResults, const TDesC& aText, const TRect& aItemRect ) const;
1.1295 +
1.1296 +private:
1.1297 + CArrayFix<SSubCell>* iSubCellArray;
1.1298 + CArrayPtr<CGulIcon>* iIconArray;
1.1299 + friend class CFormattedCellListBoxItemDrawer; // this is for "lastsubcell" -access.
1.1300 + TColors defaultcolors;
1.1301 + CFormattedCellListBoxDataExtension *iExtension;
1.1302 + };
1.1303 +
1.1304 +// CLASS DECLARATION
1.1305 +/**
1.1306 +* CSettingItemEditingListBoxData draws list items for setting page
1.1307 +* Special feature of this class is the rectangular style of highlight used in
1.1308 +* settings
1.1309 +*
1.1310 +* @lib avkon
1.1311 +*/
1.1312 +class CSettingItemEditingListBoxData : public CFormattedCellListBoxData
1.1313 + {
1.1314 +public:
1.1315 + IMPORT_C static CSettingItemEditingListBoxData* NewL();
1.1316 + IMPORT_C virtual void Draw(TListItemProperties aProperties,
1.1317 + CWindowGc& aGc,
1.1318 + const TDesC* aText,
1.1319 + const TRect& aRect,
1.1320 + TBool aHighlight,
1.1321 + const TColors& aColors) const;
1.1322 + };
1.1323 +
1.1324 +// CLASS DECLARATION
1.1325 +/**
1.1326 +* CSettingItemEditingListBoxData draws list items for form popup fields
1.1327 +* Special feature of this class is the rectangular style of highlight used in
1.1328 +* popup fields.
1.1329 +*
1.1330 +* @lib avkon
1.1331 +*/
1.1332 +class CFormGraphicListBoxData : public CFormattedCellListBoxData
1.1333 + {
1.1334 +public:
1.1335 + IMPORT_C static CFormGraphicListBoxData* NewL();
1.1336 + IMPORT_C virtual void Draw(TListItemProperties aProperties,
1.1337 + CWindowGc& aGc,
1.1338 + const TDesC* aText,
1.1339 + const TRect& aRect,
1.1340 + TBool aHighlight,
1.1341 + const TColors& aColors) const;
1.1342 + };
1.1343 +
1.1344 +
1.1345 +// CLASS DECLARATION
1.1346 +/**
1.1347 +* CPopupFormattedListBoxData draws list items for popup windows
1.1348 +* Special feature of this class is the narrower style of highlight used in
1.1349 +* popups.
1.1350 +*
1.1351 +* @lib avkon
1.1352 +*/
1.1353 +class CPopupFormattedListBoxData : public CFormattedCellListBoxData
1.1354 + {
1.1355 +public:
1.1356 + IMPORT_C static CPopupFormattedListBoxData* NewL();
1.1357 + IMPORT_C virtual void Draw(TListItemProperties aProperties,
1.1358 + CWindowGc& aGc,
1.1359 + const TDesC* aText,
1.1360 + const TRect& aRect,
1.1361 + TBool aHighlight,
1.1362 + const TColors& aColors) const;
1.1363 + };
1.1364 +
1.1365 +/**
1.1366 + * CPopupFormattedListBoxData draws list items for grids.
1.1367 + * Special feature of this class is the rectangular highlight used in grids.
1.1368 + *
1.1369 + * @lib avkon
1.1370 + */
1.1371 +class CFormattedCellGridData : public CFormattedCellListBoxData
1.1372 + {
1.1373 +
1.1374 +public:
1.1375 +
1.1376 + /**
1.1377 + * Symbian two-phase constructor.
1.1378 + */
1.1379 + IMPORT_C static CFormattedCellGridData* NewL();
1.1380 +
1.1381 + /**
1.1382 + * From @c CFormattedCellListBoxData.
1.1383 + *
1.1384 + * This is the only method that needs to be implemented in this class and
1.1385 + * it draws the whole list item.
1.1386 + *
1.1387 + * @param aProperties Properties attached to the list item.
1.1388 + * @param aGc Graphics Context used for drawing the list item.
1.1389 + * @param aText A text string describing the list item cells.
1.1390 + * @param aRect The area of the screen for the whole list item.
1.1391 + * @param aHighlight Whether the list item is selected.
1.1392 + * @param aColors The colors used for drawing the item.
1.1393 + */
1.1394 + IMPORT_C virtual void Draw(TListItemProperties aProperties,
1.1395 + CWindowGc& aGc,
1.1396 + const TDesC* aText,
1.1397 + const TRect& aRect,
1.1398 + TBool aHighlight,
1.1399 + const TColors& aColors) const;
1.1400 + };
1.1401 +
1.1402 +#endif // __EIKFRLBD_H__
1.1403 +