83
|
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 |
// System includes
|
|
23 |
#include <e32base.h>
|
|
24 |
#include <coeaui.h> //ECoeStackPriorityDefault
|
|
25 |
|
|
26 |
// User includes
|
|
27 |
#include "ainativerenderer.h"
|
|
28 |
#include "ainativeuimodel.h"
|
|
29 |
|
|
30 |
// Forward declarations
|
|
31 |
class CHsContentPublisher;
|
|
32 |
|
|
33 |
namespace AiNativeUiController
|
|
34 |
{
|
|
35 |
// CONSTANTS
|
|
36 |
// VIEW IDENTIFIERS; VALUES MUST BE UNIQUE!
|
|
37 |
|
|
38 |
// PRIORITIES FOR SOFTKEYS
|
|
39 |
|
|
40 |
// Offset
|
|
41 |
const TInt KNativeUiCbaPriorityOffset = 5;
|
|
42 |
|
|
43 |
// Real priority.
|
|
44 |
const TInt KNativeUiCbaPriority = ECoeStackPriorityDefault +
|
|
45 |
KNativeUiCbaPriorityOffset;
|
|
46 |
|
|
47 |
/**
|
|
48 |
* Soft Key renderer.
|
|
49 |
*
|
|
50 |
* This class is used to handle publishing to Soft Key labels.
|
|
51 |
* Published data can be either text or resource.
|
|
52 |
*
|
|
53 |
* @since S60 3.2
|
|
54 |
*/
|
|
55 |
NONSHARABLE_CLASS( CAiSoftKeyRenderer ) : public CAiNativeRenderer
|
|
56 |
{
|
|
57 |
public:
|
|
58 |
|
|
59 |
static CAiSoftKeyRenderer* NewLC();
|
|
60 |
|
|
61 |
virtual ~CAiSoftKeyRenderer();
|
|
62 |
|
|
63 |
// from base class CAiNativeRenderer
|
|
64 |
|
|
65 |
void DoPublishL( CHsContentPublisher& aPlugin,
|
|
66 |
TInt aContent,
|
|
67 |
const TDesC16& aText,
|
|
68 |
TInt aIndex );
|
|
69 |
void DoPublishL( CHsContentPublisher& aPlugin,
|
|
70 |
TInt aContent,
|
|
71 |
TInt aResource,
|
|
72 |
TInt aIndex );
|
|
73 |
void DoPublishL( CHsContentPublisher& aPlugin,
|
|
74 |
TInt aContent,
|
|
75 |
const TDesC8& aBuf,
|
|
76 |
TInt aIndex );
|
|
77 |
|
|
78 |
private:
|
|
79 |
|
|
80 |
CAiSoftKeyRenderer();
|
|
81 |
|
|
82 |
void ConstructL();
|
|
83 |
|
|
84 |
void CreateDefaultSoftKeysL();
|
|
85 |
|
|
86 |
void UpdateSoftKeyL( TInt aKey, CGulIcon* aIcon );
|
|
87 |
|
|
88 |
private: // data
|
|
89 |
|
|
90 |
// Softkeys.
|
|
91 |
CEikButtonGroupContainer* iCba;
|
|
92 |
|
|
93 |
// Pointer to App UI.
|
|
94 |
CAknAppUi* iAppUi;
|
|
95 |
|
|
96 |
// Soft Key label. Own.
|
|
97 |
HBufC* iText;
|
|
98 |
|
|
99 |
};
|
|
100 |
|
|
101 |
} // namespace AiNativeUiController
|
|
102 |
|
|
103 |
#endif // C_AISOFTKEYRENDERER_H
|