epoc32/include/mw/aknnavide.h
author William Roberts <williamr@symbian.org>
Wed, 31 Mar 2010 12:33:34 +0100
branchSymbian3
changeset 4 837f303aceeb
parent 2 2fe1408b6811
permissions -rw-r--r--
Current Symbian^3 public API header files (from PDK 3.0.h)
This is the epoc32/include tree with the "platform" subtrees removed, and
all but a selected few mbg and rsg files removed.
williamr@2
     1
/*
williamr@2
     2
* Copyright (c) 2002-2008 Nokia Corporation and/or its subsidiary(-ies).
williamr@2
     3
* All rights reserved.
williamr@2
     4
* This component and the accompanying materials are made available
williamr@4
     5
* under the terms of "Eclipse Public License v1.0"
williamr@2
     6
* which accompanies this distribution, and is available
williamr@4
     7
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
williamr@2
     8
*
williamr@2
     9
* Initial Contributors:
williamr@2
    10
* Nokia Corporation - initial contribution.
williamr@2
    11
*
williamr@2
    12
* Contributors:
williamr@2
    13
*
williamr@2
    14
* Description:  Decorator class for navigation pane controls.
williamr@2
    15
*                The class, for example, decorates navigation pane controls
williamr@2
    16
*                with navi arrows.
williamr@2
    17
*
williamr@2
    18
*/
williamr@2
    19
williamr@2
    20
williamr@2
    21
#ifndef C_AKNNAVIDE_H
williamr@2
    22
#define C_AKNNAVIDE_H
williamr@2
    23
williamr@4
    24
#include <AknControl.h>
williamr@2
    25
#include <coeccntx.h>
williamr@2
    26
#include <e32std.h>
williamr@2
    27
williamr@4
    28
#include <AknNaviObserver.h>
williamr@2
    29
#include <aknnavi.h>
williamr@2
    30
williamr@2
    31
class CEikScrollButton;
williamr@2
    32
class CAknTabGroup;
williamr@2
    33
class MAknNaviDecoratorObserver;
williamr@2
    34
class CAknNavigationDecoratorExtension;
williamr@2
    35
williamr@2
    36
/**
williamr@2
    37
 * Decorator class for navigation pane controls.
williamr@2
    38
 * The class, for example, decorates navigation pane controls with navi arrows.
williamr@2
    39
 */
williamr@2
    40
class CAknNavigationDecorator :  public CAknControl,
williamr@2
    41
                                 public MCoeControlObserver,
williamr@2
    42
                                 public MAknNavigationDecoratorInterface
williamr@2
    43
    {
williamr@2
    44
williamr@2
    45
friend class CAknNavigationControlContainer;
williamr@2
    46
williamr@2
    47
public:
williamr@2
    48
williamr@2
    49
    /**
williamr@2
    50
     * Defines scroll buttons.
williamr@2
    51
     */
williamr@2
    52
    enum TScrollButton
williamr@2
    53
        {
williamr@2
    54
        /** Scroll left. */
williamr@2
    55
        ELeftButton =  0x0001,
williamr@2
    56
williamr@2
    57
        /** Scroll right. */
williamr@2
    58
        ERightButton = 0x0002
williamr@2
    59
        };
williamr@2
    60
williamr@2
    61
    /**
williamr@2
    62
     * Defines type of the decorated control.
williamr@2
    63
     */
williamr@2
    64
    enum TControlType
williamr@2
    65
        {
williamr@2
    66
        /** Type not specified. */
williamr@2
    67
        ENotSpecified,
williamr@2
    68
williamr@2
    69
        /** Tab group. */
williamr@2
    70
        ETabGroup,
williamr@2
    71
williamr@2
    72
        /** Label. */
williamr@2
    73
        ENaviLabel,
williamr@2
    74
williamr@2
    75
        /** Image. */
williamr@2
    76
        ENaviImage,
williamr@2
    77
williamr@2
    78
        /** Text. */
williamr@2
    79
        EHintText,
williamr@2
    80
williamr@2
    81
        /** Indicator. */
williamr@2
    82
        EEditorIndicator,
williamr@2
    83
williamr@2
    84
        /** Volume. */
williamr@2
    85
        ENaviVolume
williamr@2
    86
        };
williamr@2
    87
williamr@2
    88
public:
williamr@2
    89
williamr@2
    90
    /**
williamr@2
    91
     * Creates a new navigation decorator. The object takes ownership of the
williamr@2
    92
     * decorated object at the beginning of the method before any leaving
williamr@2
    93
     * functions.
williamr@2
    94
     *
williamr@2
    95
     * @param aNavigationControlContainer Container control.
williamr@2
    96
     * @param aDecoratedControl Control to be decorated.
williamr@2
    97
     * @param aType = @c ENotSpecified Control type.
williamr@2
    98
     * @return Navigation Decorator object that
williamr@2
    99
     *         contains decorated object.
williamr@2
   100
     */
williamr@2
   101
    IMPORT_C static CAknNavigationDecorator* NewL(
williamr@2
   102
        CAknNavigationControlContainer* aNavigationControlContainer,
williamr@2
   103
        CCoeControl* aDecoratedControl,
williamr@2
   104
        TControlType aType = ENotSpecified);
williamr@2
   105
williamr@2
   106
    /**
williamr@2
   107
    * Destructor.
williamr@2
   108
    */
williamr@2
   109
    IMPORT_C ~CAknNavigationDecorator();
williamr@2
   110
williamr@2
   111
    /**
williamr@2
   112
     * Returns the control inside a navigation decorator object. Ownership of
williamr@2
   113
     * the control is not changed.
williamr@2
   114
     *
williamr@2
   115
     * @return Control that is decorated with the decorator.
williamr@2
   116
     */
williamr@2
   117
    IMPORT_C CCoeControl* DecoratedControl();
williamr@2
   118
williamr@2
   119
    /**
williamr@2
   120
     * Shows or hides the navigation arrows at the both ends of the navigation
williamr@2
   121
     * pane when current object is shown.
williamr@2
   122
     *
williamr@2
   123
     * @param aVisible Boolean value if navigation arrows are shown with the
williamr@2
   124
     *        decorated control. Visible if @c ETrue.
williamr@2
   125
     */
williamr@2
   126
    IMPORT_C void MakeScrollButtonVisible(TBool aVisible);
williamr@2
   127
williamr@2
   128
    /**
williamr@2
   129
     * Gets the State of the visibility of navigation arrows.
williamr@2
   130
     *
williamr@2
   131
     * @return @c ETrue if visible.
williamr@2
   132
     */
williamr@2
   133
    IMPORT_C TBool ScrollButtonVisible() const;
williamr@2
   134
williamr@2
   135
    /**
williamr@2
   136
     * Sets the navigation arrow dimmed (and highlighted). Arrows have to be
williamr@2
   137
     * visible so that the dimmed arrow is shown on the screen.
williamr@2
   138
     *
williamr@2
   139
     * @param aButton Navigation arrow to be set (@c ELeftButton or
williamr@2
   140
     *        @c ERightButton).
williamr@2
   141
     * @param aDimmed @c ETrue is the button is dimmed, @c EFalse if the button
williamr@2
   142
     *        is set highlighted.
williamr@2
   143
     */
williamr@2
   144
    IMPORT_C void SetScrollButtonDimmed(TScrollButton aButton, TBool aDimmed);
williamr@2
   145
williamr@2
   146
    /**
williamr@2
   147
    * Is button dimmed or highlighted.
williamr@2
   148
    *
williamr@2
   149
    * @param aButton Navigation arrow.
williamr@2
   150
    * @return @c ETrue If the navigation arrow is dimmed, @c EFalse if
williamr@2
   151
    *         it is highlighted.
williamr@2
   152
    */
williamr@2
   153
    IMPORT_C TBool IsScrollButtonDimmed(TScrollButton aButton) const;
williamr@2
   154
williamr@2
   155
    /**
williamr@2
   156
     * Sets the type of the decorated control.
williamr@2
   157
     *
williamr@2
   158
     * @param aType Type of the control.
williamr@2
   159
     */
williamr@2
   160
    IMPORT_C void SetControlType(TControlType aType);
williamr@2
   161
williamr@2
   162
    /**
williamr@2
   163
     * Returns the type of the decorated control.
williamr@2
   164
     *
williamr@2
   165
     * @return Control type.
williamr@2
   166
     */
williamr@2
   167
    IMPORT_C TControlType ControlType() const;
williamr@2
   168
williamr@2
   169
    /**
williamr@2
   170
     * Sets observer for navigation decorator events in the decorated control.
williamr@2
   171
     *
williamr@2
   172
     * @param aObserver Pointer to observer.
williamr@2
   173
     */
williamr@2
   174
    IMPORT_C virtual void SetNaviDecoratorObserver(
williamr@2
   175
                        MAknNaviDecoratorObserver* aObserver);
williamr@2
   176
williamr@2
   177
    /**
williamr@2
   178
     * Sets the pointer to the default navigation pane control.
williamr@2
   179
     *
williamr@2
   180
     * @param aContainer Pointer to default control in navigation pane.
williamr@2
   181
     */
williamr@2
   182
    void SetNaviStack(CAknNavigationControlContainer* aContainer);
williamr@2
   183
williamr@2
   184
    /**
williamr@2
   185
     * From @c CCoeControl.
williamr@2
   186
     *
williamr@2
   187
     * Handle pointer events.
williamr@2
   188
     *
williamr@2
   189
     * @param aPointerEvent Pointer event to be handled.
williamr@2
   190
     */
williamr@2
   191
    IMPORT_C void HandlePointerEventL(const TPointerEvent& aPointerEvent);
williamr@2
   192
williamr@2
   193
    /**
williamr@2
   194
     * Defines the navigation control layout style.
williamr@2
   195
     */
williamr@2
   196
    enum TAknNaviControlLayoutStyle
williamr@2
   197
        {
williamr@2
   198
        /** Normal layout style. */
williamr@2
   199
        ENaviControlLayoutNormal = 0x1,
williamr@2
   200
williamr@2
   201
        /** Narrow layout style. */
williamr@2
   202
        ENaviControlLayoutNarrow = 0x2,
williamr@2
   203
williamr@2
   204
        /**
williamr@2
   205
         * Wide layout style, can be used only in portrait mode, in
williamr@2
   206
         * usual status pane layout (@c R_AVKON_STATUS_PANE_LAYOUT_USUAL_EXT).
williamr@2
   207
         *
williamr@2
   208
         * Tabs are not currently supported in wide layout style.
williamr@2
   209
         */
williamr@2
   210
        ENaviControlLayoutWide   = 0x4
williamr@2
   211
        };
williamr@2
   212
williamr@2
   213
    /**
williamr@2
   214
     * Defines the navigation control layout mode.
williamr@2
   215
     */
williamr@2
   216
    enum TAknNaviControlLayoutMode
williamr@2
   217
        {
williamr@2
   218
        /**
williamr@2
   219
         * This is the default layout mode. It lets UI framework to decide the
williamr@2
   220
         * proper layout style which is applied to decorated controls in all
williamr@2
   221
         * situations.
williamr@2
   222
         */
williamr@2
   223
        ENaviControlLayoutModeAutomatic = 0x400,
williamr@2
   224
williamr@2
   225
        /**
williamr@2
   226
         * @c ENaviControlLayoutModeForced layout mode can be used to lock
williamr@2
   227
         * the layout style to the current style.
williamr@2
   228
         */
williamr@2
   229
        ENaviControlLayoutModeForced = 0x800
williamr@2
   230
        };
williamr@2
   231
williamr@2
   232
williamr@2
   233
    /**
williamr@2
   234
     * Sets the layout style for this objects decorated control. The layout
williamr@2
   235
     * style can be normal or narrow style.
williamr@2
   236
     *
williamr@2
   237
     * The style is really applied if the decorated control supports it or if
williamr@2
   238
     * the layout mode has been set to forced mode
williamr@2
   239
     * (@c ENaviControlLayoutModeForced). Additionally narrow mode may not be
williamr@2
   240
     * supported at all in some statuspane configurations (even if forced).
williamr@2
   241
     *
williamr@2
   242
     * Whether decorated control supports or does not support given style at the
williamr@2
   243
     * currently active statuspane layout can be queried using
williamr@2
   244
     * @c NaviControlLayoutStyleSupported() method.
williamr@2
   245
     *
williamr@2
   246
     * @since S60 3.0
williamr@2
   247
     * @param aStyle Can be normal (@c ENaviControlLayoutNormal),
williamr@2
   248
     *                      narrow (@c ENaviControlLayoutNarrow) or
williamr@2
   249
     *                      wide   (@c ENaviControlLayoutWide).
williamr@2
   250
     *
williamr@2
   251
     */
williamr@2
   252
    IMPORT_C void SetNaviControlLayoutStyle(TAknNaviControlLayoutStyle aStyle);
williamr@2
   253
williamr@2
   254
    /**
williamr@2
   255
    * Gets the current layout style of this objects decorated control
williamr@2
   256
    * (@c ENaviControlLayoutNormalm @c ENaviControlLayoutNarrow or
williamr@2
   257
    *  @c ENaviControlLayoutWide).
williamr@2
   258
    *
williamr@2
   259
    * @since S60 3.0
williamr@2
   260
    * @return Current layout style of the navicontrol
williamr@2
   261
    */
williamr@2
   262
    IMPORT_C TAknNaviControlLayoutStyle NaviControlLayoutStyle();
williamr@2
   263
williamr@2
   264
    /**
williamr@2
   265
     * Tells if decorated control supports given layout style at the current
williamr@2
   266
     * statuspane layout. For @c ENotSpecified type of controls this always
williamr@2
   267
     * returns @c EFalse (just for safety) because their implementation is
williamr@2
   268
     * not known.
williamr@2
   269
     *
williamr@2
   270
     * @since S60 3.0
williamr@2
   271
     * @param aStyle The layout style.
williamr@2
   272
     * @return @c ETrue if the control supports given layout style
williamr@2
   273
     *         otherwise returns @c EFalse.
williamr@2
   274
     */
williamr@2
   275
    IMPORT_C TBool NaviControlLayoutStyleSupported(TAknNaviControlLayoutStyle
williamr@2
   276
                                                   aStyle);
williamr@2
   277
williamr@2
   278
    /**
williamr@2
   279
     * Sets the layout mode @c ENaviControlLayoutModeAutomatic or
williamr@2
   280
     * @c ENaviControlLayoutModeForced. See @c TAknNaviControlLayoutMode
williamr@2
   281
     * for more information.
williamr@2
   282
     *
williamr@2
   283
     * @since S60 3.0
williamr@2
   284
     * @param aMode New layout mode.
williamr@2
   285
     *
williamr@2
   286
     */
williamr@2
   287
    IMPORT_C void SetNaviControlLayoutMode(TAknNaviControlLayoutMode aMode);
williamr@2
   288
williamr@2
   289
    /**
williamr@2
   290
     * Gets the current layout mode of decorated control. Can be
williamr@2
   291
     * @c ENaviControlLayoutModeAutomatic (default) or
williamr@2
   292
     * @c ENaviControlLayoutModeForced (usually set by the application).
williamr@2
   293
     *
williamr@2
   294
     * @since S60 3.0
williamr@2
   295
     * @return Decorated control's current layout
williamr@2
   296
     *         mode.
williamr@2
   297
     *
williamr@2
   298
     */
williamr@2
   299
    IMPORT_C TAknNaviControlLayoutMode NaviControlLayoutMode();
williamr@2
   300
williamr@2
   301
williamr@2
   302
protected: // from CCoeControl
williamr@2
   303
williamr@2
   304
    /**
williamr@2
   305
     * From @c CCoeControl.
williamr@2
   306
     *
williamr@2
   307
     * Handles the size change events.
williamr@2
   308
     */
williamr@2
   309
    IMPORT_C virtual void SizeChanged();
williamr@2
   310
williamr@2
   311
    /**
williamr@2
   312
     * From @c CCoeControl.
williamr@2
   313
     *
williamr@2
   314
     * Returns the number of controls inside the context pane control.
williamr@2
   315
     *
williamr@2
   316
     * @return Number of controls.
williamr@2
   317
     */
williamr@2
   318
    IMPORT_C virtual TInt CountComponentControls() const;
williamr@2
   319
williamr@2
   320
    /**
williamr@2
   321
     * From @c CCoeControl.
williamr@2
   322
     *
williamr@2
   323
     * Returns a control determined by control id.
williamr@2
   324
     *
williamr@2
   325
     * @param aIndex Index of a control to be returned.
williamr@2
   326
     * @return Pointer to the control.
williamr@2
   327
     */
williamr@2
   328
    IMPORT_C virtual CCoeControl* ComponentControl(TInt aIndex) const;
williamr@2
   329
williamr@2
   330
public: // from CCoeControl
williamr@2
   331
    /**
williamr@2
   332
     * Handles a change to the control's resources of type aType
williamr@2
   333
     * which are shared across the environment, e.g. color scheme change.
williamr@2
   334
     * @param aType Event type.
williamr@2
   335
     */
williamr@2
   336
    IMPORT_C virtual void HandleResourceChange(TInt aType);
williamr@2
   337
williamr@2
   338
protected: // from MCoeControlObserver
williamr@2
   339
williamr@2
   340
    /**
williamr@2
   341
     * From @c MCoeControlObserver.
williamr@2
   342
     *
williamr@2
   343
     * Handles an event from an observed control.
williamr@2
   344
     *
williamr@2
   345
     * @param aControl Control that caused the event.
williamr@2
   346
     * @param aEventType Type of the event.
williamr@2
   347
     */
williamr@2
   348
    IMPORT_C void HandleControlEventL(CCoeControl* aControl,
williamr@2
   349
                                      TCoeEvent aEventType);
williamr@2
   350
williamr@2
   351
private:
williamr@2
   352
williamr@2
   353
    /**
williamr@2
   354
     * From CAknControl
williamr@2
   355
     */
williamr@2
   356
    IMPORT_C void* ExtensionInterface( TUid aInterface );
williamr@2
   357
williamr@2
   358
private:
williamr@2
   359
williamr@2
   360
    /**
williamr@2
   361
     * Private constructor.
williamr@2
   362
     */
williamr@2
   363
    IMPORT_C void ConstructL();
williamr@2
   364
williamr@2
   365
private:
williamr@2
   366
williamr@2
   367
    /**
williamr@2
   368
     * From CAknControl
williamr@2
   369
     */
williamr@2
   370
    IMPORT_C virtual void Draw(const TRect& aRect) const;
williamr@2
   371
williamr@2
   372
    /**
williamr@2
   373
     * Gets parent rect of this control. Used for layout calculation purposes.
williamr@2
   374
     */
williamr@2
   375
    TRect ParentRect();
williamr@2
   376
williamr@2
   377
public:
williamr@2
   378
williamr@2
   379
    /**
williamr@2
   380
    * Gets the default rectangle of the given control type.
williamr@2
   381
    *
williamr@2
   382
    * @param  aControlType  The control type from which default rectangle is
williamr@2
   383
    *                       asked.
williamr@2
   384
    * @param  aArrowsUsed   Whether or not the navigation arrows are used
williamr@2
   385
    *                       for the control. This is only used for the
williamr@2
   386
    *                       tab group control. If arrows are not used with
williamr@2
   387
    *                       tab group, then the whole navi pane area
williamr@2
   388
    *                       is provided to the tab group control.
williamr@2
   389
    * 
williamr@2
   390
    * @return Rectangle which tells the default area for given
williamr@2
   391
    *         controltype. Coordinates are relative to navi pane.
williamr@2
   392
    */
williamr@2
   393
    static TRect DecoratedControlRect( TInt aControlType,
williamr@2
   394
                                       TBool aArrowsUsed = ETrue );
williamr@2
   395
williamr@2
   396
    /**
williamr@2
   397
     * Gets the default rectangle of the navigation pane's default control.
williamr@2
   398
     *
williamr@2
   399
     * @param aControlType Not used.
williamr@2
   400
     * @return Rectangle of the navigation pane's default control.
williamr@2
   401
     */
williamr@2
   402
    static TRect DecoratedControlNarrowRect( TInt aControlType );
williamr@2
   403
williamr@2
   404
private:
williamr@2
   405
williamr@2
   406
    /**
williamr@2
   407
     * Gets the default rect of default controltype relative to navipane in
williamr@2
   408
     * normal layoutstyle (@c ENaviControlLayoutNormal)
williamr@2
   409
     *
williamr@2
   410
     * @return Rectangle which is tells the default area for a navi control.
williamr@2
   411
     *         Coordinates are relative to navipane.
williamr@2
   412
     *
williamr@2
   413
     */
williamr@2
   414
    static TRect DecoratedDefaultControlRect();
williamr@2
   415
williamr@2
   416
public:
williamr@2
   417
williamr@2
   418
    /**
williamr@2
   419
    * Gets the default rect of tab group control type relative to navipane in
williamr@2
   420
    * normal (@c ENaviControlLayoutNormal) or wide (@c ENaviControlLayoutWide)
williamr@2
   421
    * layout style.
williamr@2
   422
    *
williamr@2
   423
    * @param  aTopAdjacent  @c ETrue to return a rectangle adjacent to the
williamr@2
   424
    *                       top of navi pane, @c EFalse for a rectangle
williamr@2
   425
    *                       adjacent to the bottom of navi pane.
williamr@2
   426
    * @param  aArrowsUsed   Whether or not the navigation arrows are used
williamr@2
   427
    *                       for the tab group. If arrows are not used, then
williamr@2
   428
    *                       the whole navi pane area is provided to the tab
williamr@2
   429
    *                       group control.
williamr@2
   430
    *
williamr@2
   431
    * @return Rectangle which tells the default area for a tab group.
williamr@2
   432
    */
williamr@2
   433
    static TRect DecoratedTabControlRect( TBool aTopAdjacent,
williamr@2
   434
                                          TBool aArrowsUsed );
williamr@2
   435
williamr@2
   436
private:
williamr@2
   437
williamr@2
   438
    /**
williamr@2
   439
     * Gets the default rect of volume controltype relative to navipane in
williamr@2
   440
     * normal layoutstyle (@c ENaviControlLayoutNormal)
williamr@2
   441
     *
williamr@2
   442
     * @return Rectangle which is tells the default area for a volume control.
williamr@2
   443
     *         Coordinates are relative to navipane.
williamr@2
   444
     *
williamr@2
   445
     */
williamr@2
   446
    static TRect DecoratedVolumeControlRect();
williamr@2
   447
williamr@2
   448
    /**
williamr@2
   449
     * This method handles sizechanges in normal layout style.
williamr@2
   450
     */
williamr@2
   451
    void SizeChangedInNormalLayout();
williamr@2
   452
williamr@2
   453
    /**
williamr@2
   454
     * This method handles sizechanges in narrow layout style.
williamr@2
   455
     */
williamr@2
   456
    void SizeChangedInNarrowLayout();
williamr@2
   457
williamr@2
   458
    /**
williamr@2
   459
     * This method handles sizechanges in wide layout style.
williamr@2
   460
     */
williamr@2
   461
    void SizeChangedInWideLayout();
williamr@2
   462
williamr@2
   463
    /**
williamr@2
   464
     * This method initializes timer that is used for times layout style
williamr@2
   465
     * changes.
williamr@2
   466
     */
williamr@2
   467
    void InitLayoutStyleTimer();
williamr@2
   468
williamr@2
   469
    /**
williamr@2
   470
     * This method cancels timer that is used for times layout style changes.
williamr@2
   471
     */
williamr@2
   472
    void CancelLayoutStyleTimer();
williamr@2
   473
williamr@2
   474
    /**
williamr@2
   475
     * This method is executed when timer that is used for times layout style
williamr@2
   476
     * changes expires.
williamr@2
   477
     */
williamr@2
   478
    static TInt LayoutStyleEvent(TAny * aPtr);
williamr@2
   479
williamr@2
   480
    /**
williamr@2
   481
     * This method is executed when timer that is used for times layout style
williamr@2
   482
     * changes expires.
williamr@2
   483
     */
williamr@2
   484
    void DoLayoutStyleEvent();
williamr@2
   485
williamr@2
   486
    void StartTimerL();
williamr@2
   487
williamr@2
   488
    void SmallDirectionIndicationL();
williamr@2
   489
williamr@2
   490
    static TInt IndicationDrawCallbackL( TAny* aThis );
williamr@2
   491
williamr@2
   492
    /**
williamr@2
   493
     * This method cancels the timer that is used in the small direction
williamr@2
   494
     * indication animation.
williamr@2
   495
     */
williamr@2
   496
    void CancelTimer();
williamr@2
   497
williamr@2
   498
    /**
williamr@2
   499
     * Gets the rectangle for a navigation arrow.
williamr@2
   500
     *
williamr@2
   501
     * @param   aScrollButton  @c ELeftButton to return the rectangle
williamr@2
   502
     *                         of the left navi arrow,
williamr@2
   503
     *                         @c ERightButton for right navi arrow.
williamr@2
   504
     *
williamr@2
   505
     * @param   aNarrowLayout  @c ETrue to get a navi arrow rectangle
williamr@2
   506
     *                         for a narrow decorator layout,
williamr@2
   507
     *                         @c EFalse otherwise.
williamr@2
   508
     *
williamr@2
   509
     * @param   aNaviRect  Navi pane rectangle to be used as parent,
williamr@2
   510
     *                     the returned rectangle is relative to this.
williamr@2
   511
     *                     If not defined, then relative to the
williamr@2
   512
     *                     default navi pane area.
williamr@2
   513
     *
williamr@2
   514
     * @return  Navigation arrow rectangle.
williamr@2
   515
     *          Coordinates are relative to navipane.
williamr@2
   516
     *
williamr@2
   517
     */
williamr@2
   518
    static TRect NaviArrowRect( TScrollButton aScrollButton,
williamr@2
   519
                                TBool aNarrowLayout = EFalse,
williamr@2
   520
                                TRect aNaviRect = TRect( 0,0,0,0 ) );
williamr@2
   521
williamr@2
   522
protected:
williamr@2
   523
williamr@2
   524
    /**
williamr@2
   525
     * Decorated control.
williamr@2
   526
     * Own.
williamr@2
   527
     */
williamr@2
   528
    CCoeControl* iDecoratedControl;
williamr@2
   529
williamr@2
   530
    /**
williamr@2
   531
     * Navigation pane default control.
williamr@2
   532
     */
williamr@2
   533
    CAknNavigationControlContainer* iContainer;
williamr@2
   534
williamr@2
   535
    /**
williamr@2
   536
     * Observer for handling decorator events.
williamr@2
   537
     */
williamr@2
   538
    MAknNaviDecoratorObserver* iNaviDecoratorObserver;
williamr@2
   539
williamr@2
   540
private:
williamr@2
   541
    TBool iNaviArrowsVisible;
williamr@2
   542
    TBool iNaviArrowLeftDimmed;
williamr@2
   543
    TBool iNaviArrowRightDimmed;
williamr@2
   544
    TControlType iControlType;
williamr@2
   545
    TPoint iArrowLeftPos;
williamr@2
   546
    TSize  iArrowLeftSize;
williamr@2
   547
    TPoint iArrowRightPos;
williamr@2
   548
    TSize  iArrowRightSize;
williamr@2
   549
williamr@2
   550
    TInt iLayoutFlags;
williamr@2
   551
    CPeriodic* iLayoutStyleTimer;
williamr@2
   552
williamr@2
   553
    CAknNavigationDecoratorExtension* iExtension;
williamr@2
   554
williamr@2
   555
    TInt iSpare;
williamr@2
   556
    };
williamr@2
   557
williamr@2
   558
#endif // C_AKNNAVIDE_H