idlehomescreen/nativeuicontroller/inc/aisoftkeyrenderer.h
changeset 0 f72a12da539e
child 9 f966699dea19
equal deleted inserted replaced
-1:000000000000 0:f72a12da539e
       
     1 /*
       
     2 * Copyright (c) 2005-2007 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:  Handles publishing to title pane.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef C_AISOFTKEYRENDERER_H
       
    20 #define C_AISOFTKEYRENDERER_H
       
    21 
       
    22 
       
    23 #include <e32base.h>
       
    24 #include <coeaui.h> //ECoeStackPriorityDefault
       
    25 #include "ainativerenderer.h"
       
    26 #include "ainativeuimodel.h"
       
    27 
       
    28 
       
    29 namespace AiNativeUiController
       
    30 {
       
    31 // CONSTANTS
       
    32 // VIEW IDENTIFIERS; VALUES MUST BE UNIQUE!
       
    33 
       
    34 // PRIORITIES FOR SOFTKEYS
       
    35 
       
    36 // Offset
       
    37 const TInt KNativeUiCbaPriorityOffset = 5;
       
    38 
       
    39 // Real priority.
       
    40 const TInt KNativeUiCbaPriority = ECoeStackPriorityDefault + 
       
    41                                     KNativeUiCbaPriorityOffset;
       
    42 
       
    43 /**
       
    44  *  Soft Key renderer.
       
    45  *
       
    46  *  This class is used to handle publishing to Soft Key labels.
       
    47  *  Published data can be either text or resource.
       
    48  *
       
    49  *  @since S60 3.2
       
    50  */
       
    51 class CAiSoftKeyRenderer : public CAiNativeRenderer
       
    52     {
       
    53 public:
       
    54 
       
    55     static CAiSoftKeyRenderer* NewLC();
       
    56 
       
    57     virtual ~CAiSoftKeyRenderer();
       
    58 
       
    59 // from base class CAiNativeRenderer
       
    60 
       
    61     void DoPublishL( MAiPropertyExtension& aPlugin,
       
    62                         TInt aContent,
       
    63                         const TDesC16& aText,
       
    64                         TInt aIndex );
       
    65     void DoPublishL( MAiPropertyExtension& aPlugin,
       
    66                         TInt aContent,
       
    67                         TInt aResource,
       
    68                         TInt aIndex );
       
    69     void DoPublishL( MAiPropertyExtension& aPlugin,
       
    70                         TInt aContent,
       
    71                         const TDesC8& aBuf,
       
    72                         TInt aIndex );
       
    73 
       
    74 private:
       
    75 
       
    76     CAiSoftKeyRenderer();
       
    77 
       
    78     void ConstructL();
       
    79 
       
    80     void CreateDefaultSoftKeysL();
       
    81 
       
    82     void UpdateSoftKeyL( TInt aKey, CGulIcon* aIcon );
       
    83 
       
    84 private: // data
       
    85 
       
    86       // Softkeys.
       
    87       CEikButtonGroupContainer* iCba;
       
    88 
       
    89       // Pointer to App UI.
       
    90       CAknAppUi* iAppUi;
       
    91       
       
    92       // Soft Key label. Own.
       
    93       HBufC* iText;
       
    94 
       
    95     };
       
    96 
       
    97 } // namespace AiNativeUiController
       
    98 
       
    99 #endif // C_AISOFTKEYRENDERER_H