1 /* |
|
2 * Copyright (c) 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: Toolbar command policy implementation. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef C_VTUITOOLBARCMDPOLICY_H |
|
20 #define C_VTUITOOLBARCMDPOLICY_H |
|
21 |
|
22 #include <e32base.h> |
|
23 |
|
24 #include "tvtuicmdpolicypriority.h" |
|
25 #include "cvtuicmdvalidatorbase.h" |
|
26 |
|
27 class CVtUiCmdValidationActionBase; |
|
28 class CVtUiToolbarBase; |
|
29 |
|
30 /** |
|
31 * CVtUiToolbarCmdPolicy |
|
32 * |
|
33 * Toolbar command policy implementation. |
|
34 * |
|
35 * @since S60 v3.2 |
|
36 */ |
|
37 class CVtUiToolbarCmdPolicy : public CVtUiCmdValidatorBase |
|
38 { |
|
39 public: // public methods |
|
40 |
|
41 /** |
|
42 * Static constructor. |
|
43 * @param aToolbar Reference to toolbar. |
|
44 */ |
|
45 static CVtUiToolbarCmdPolicy* NewL( CVtUiToolbarBase& aToolbar ); |
|
46 |
|
47 public: // from CVtUiCmdValidatorBase |
|
48 |
|
49 /** |
|
50 * @see CVtUiCmdValidatorBase::ValidateMenuItemsL |
|
51 */ |
|
52 void ValidateMenuItemsL( CVtUiCmdValidationActionBase& aAction, |
|
53 TInt aReferencePriority ); |
|
54 |
|
55 /** |
|
56 * @see CVtUiCmdValidatorBase::ValidateSoftkeyItemsL |
|
57 */ |
|
58 void ValidateSoftkeyItemsL( CVtUiCmdValidationActionBase& aAction, |
|
59 TInt aReferencePriority ); |
|
60 |
|
61 /** |
|
62 * @see CVtUiCmdValidatorBase::ValidateToolbarItemsL |
|
63 */ |
|
64 void ValidateToolbarItemsL( CVtUiCmdValidationActionBase& aAction, |
|
65 TInt aReferencePriority ); |
|
66 |
|
67 /** |
|
68 * @see CVtUiCmdValidatorBase::CustomValidationL |
|
69 */ |
|
70 void CustomValidationL( CVtUiCmdCustomValidationActionBase& aAction, |
|
71 TInt aReferencePriority ); |
|
72 |
|
73 /** |
|
74 * @see CVtUiCmdValidatorBase::ValidatesContext |
|
75 */ |
|
76 TBool ValidatesContext( const TVtUiCmdContextType& aCtxType ) |
|
77 const; |
|
78 |
|
79 private: |
|
80 |
|
81 /** |
|
82 * C++ constructor |
|
83 * |
|
84 */ |
|
85 CVtUiToolbarCmdPolicy( CVtUiToolbarBase& aToolbar ); |
|
86 |
|
87 /** |
|
88 * Callback for menu validation. |
|
89 * |
|
90 */ |
|
91 TBool ValidateMenuCommand( TInt aCommandId ) const; |
|
92 |
|
93 private: // data |
|
94 |
|
95 // Reference to cvtuitoolbar |
|
96 CVtUiToolbarBase& iToolbar; |
|
97 |
|
98 }; |
|
99 |
|
100 #endif // C_VTUITOOLBARCMDPOLICY_H |
|