|
1 /* |
|
2 * Copyright (c) 2008 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: Button state for CAknButton use in CEikCba. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef C_AKNCOMMANDBUTTONSTATE_H |
|
20 #define C_AKNCOMMANDBUTTONSTATE_H |
|
21 |
|
22 #include <aknbutton.h> |
|
23 |
|
24 // CLASS DECLARATION |
|
25 |
|
26 /** |
|
27 * Extension to the button state class to support attaching |
|
28 * commands to the states. |
|
29 * |
|
30 * @lib eikcoctl.lib |
|
31 * @since 5.0 |
|
32 */ |
|
33 NONSHARABLE_CLASS( CAknCommandButtonState ) : public CAknButtonState |
|
34 { |
|
35 friend class CAknButton; |
|
36 |
|
37 public: // Constructors and destructors |
|
38 |
|
39 /** |
|
40 * Destructor. |
|
41 */ |
|
42 ~CAknCommandButtonState(); |
|
43 |
|
44 protected: // Constructors and destructors |
|
45 |
|
46 /** |
|
47 * Constructor. |
|
48 * |
|
49 * @param aFlags The flags for the button state. |
|
50 * @param aCommandId The command associated with the button state. |
|
51 */ |
|
52 CAknCommandButtonState( const TInt aFlags, const TInt aCommandId ); |
|
53 |
|
54 public: |
|
55 |
|
56 /** |
|
57 * Sets the command attached with this state. |
|
58 * |
|
59 * @param aCommandId New command |
|
60 */ |
|
61 void SetCommand( const TInt aCommandId ); |
|
62 |
|
63 /** |
|
64 * Gets the command attached with this state. |
|
65 * |
|
66 * @return The command ID. |
|
67 */ |
|
68 TInt CommandId() const; |
|
69 |
|
70 private: // data |
|
71 |
|
72 /** Command for this state. */ |
|
73 TInt iCommandId; |
|
74 }; |
|
75 |
|
76 #endif // C_AKNCOMMANDBUTTONSTATE_H |