|
1 /* |
|
2 * Copyright (c) 2006 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: Toolbar hide item action class definition. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef C_VTUIHIDETOLLBARITEMACTION_H |
|
20 #define C_VTUIHIDETOLLBARITEMACTION_H |
|
21 |
|
22 #include <e32base.h> |
|
23 #include "cvtuicmdvalidationactionbase.h" |
|
24 #include "tvtuistates.h" |
|
25 |
|
26 class CVtUiToolbarBase; |
|
27 |
|
28 /** |
|
29 * CVtUiHideToolbarItemAction |
|
30 * |
|
31 * Toolbar hide item action definition. |
|
32 * |
|
33 * @since S60 v3.2 |
|
34 */ |
|
35 class CVtUiHideToolbarItemAction : public CVtUiCmdValidationActionBase |
|
36 { |
|
37 public: |
|
38 |
|
39 /** |
|
40 * Leave-safe constructor. |
|
41 * @param aToolbar Pointer to toolbar. |
|
42 * @param aUiStates Reference to uistates. |
|
43 */ |
|
44 static CVtUiHideToolbarItemAction* NewL( CVtUiToolbarBase* aToolbar, |
|
45 const TVtUiStates& aUiStates ); |
|
46 |
|
47 /** |
|
48 * Destructor |
|
49 * |
|
50 */ |
|
51 ~CVtUiHideToolbarItemAction(); |
|
52 |
|
53 public: // from CVtUiCmdValidationActionBase |
|
54 |
|
55 /** |
|
56 * @See CVtUiCmdValidationActionBase::ProcessL |
|
57 */ |
|
58 void ProcessL( const MVtUiCmdValidatorCallBack& aCallBack ); |
|
59 |
|
60 |
|
61 /** |
|
62 * @See CVtUiCmdValidationActionBase::EndProcess |
|
63 */ |
|
64 virtual void EndProcess(); |
|
65 |
|
66 private: |
|
67 |
|
68 /** |
|
69 * C++ constructor. |
|
70 * |
|
71 */ |
|
72 CVtUiHideToolbarItemAction( CVtUiToolbarBase* aToolbar, |
|
73 const TVtUiStates& aUiStates ); |
|
74 |
|
75 /** |
|
76 * Sets given toolbar control hidden in toolbar. |
|
77 * |
|
78 */ |
|
79 void SetItemHiddenL( TInt aCommandId ); |
|
80 |
|
81 /** |
|
82 * Decides if toolbar control should be dimmed or shown. |
|
83 * |
|
84 */ |
|
85 void HideOrShowToolbarControlL( TInt aCommandId ); |
|
86 |
|
87 private: // data |
|
88 |
|
89 // Toolbar instance this action is currently working on |
|
90 CVtUiToolbarBase* iToolbar; |
|
91 |
|
92 // Reference to UI states instance |
|
93 const TVtUiStates& iUiStates; |
|
94 }; |
|
95 |
|
96 #endif // C_VTUIHIDETOLLBARITEMACTION_H |