|
1 /* |
|
2 * Copyright (c) 2008-2009 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: Interface for softkey handling |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 #ifndef M_GLXSOFTKEYHANDLER_H |
|
22 #define M_GLXSOFTKEYHANDLER_H |
|
23 |
|
24 /** |
|
25 * Available softkeys |
|
26 */ |
|
27 enum TGlxSoftkey |
|
28 { |
|
29 EGlxLeftSoftkey, |
|
30 EGlxMiddleSoftkey, |
|
31 EGlxRightSoftkey |
|
32 }; |
|
33 |
|
34 /** |
|
35 * Allow components other than views to update softkeys if necessary |
|
36 */ |
|
37 class MGlxSoftkeyHandler |
|
38 { |
|
39 public: |
|
40 /** |
|
41 * Store copy of current softkeys to allow original config |
|
42 * to be restored |
|
43 */ |
|
44 virtual void StoreCurrentSoftKeysL() = 0; |
|
45 |
|
46 /** |
|
47 * Set specified softkey with command and text |
|
48 * @param aSoftkey softkey to set (EGlxLeftSoftkey/EGlxRighttSoftkey) |
|
49 * @param aCommand id of command to associate with softkey |
|
50 * @param aSoftkeyText text for softkey (softkey takes ownership) |
|
51 */ |
|
52 virtual void ChangeSoftkeyL(TGlxSoftkey aSoftkey, TInt aCommand, |
|
53 const TDesC& aSoftkeyText) = 0; |
|
54 /** |
|
55 * Restore original softkeys and title |
|
56 */ |
|
57 virtual void RestoreSoftKeysAndTitleL() = 0; |
|
58 |
|
59 /** |
|
60 * Enables / disables a softkey |
|
61 * @param aEnable Whether to enable or disable the softkey |
|
62 * @param aSoftkey The affected softkey |
|
63 */ |
|
64 virtual void EnableSoftkey( TBool aEnable, TGlxSoftkey aSoftkey ) = 0; |
|
65 }; |
|
66 |
|
67 #endif // M_GLXSOFTKEYHANDLER_H |