|
1 /******************************************************************************* |
|
2 * Copyright (c) 2007, 2010 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. This program and the accompanying materials |
|
4 * are made available under the terms of the Eclipse Public License v1.0 |
|
5 * which accompanies this distribution, and is available at |
|
6 * http://www.eclipse.org/legal/epl-v10.html |
|
7 * |
|
8 * Contributors: |
|
9 * Nokia Corporation - S60 implementation |
|
10 *******************************************************************************/ |
|
11 |
|
12 #ifndef SWTCUSTOMBUTTON_H |
|
13 #define SWTCUSTOMBUTTON_H |
|
14 |
|
15 |
|
16 #include <aknbutton.h> |
|
17 |
|
18 |
|
19 /** |
|
20 * CSwtCustomButton |
|
21 * |
|
22 * This class is meant for customising CAknButton by overriding. |
|
23 * |
|
24 * @lib eswtapifacade |
|
25 */ |
|
26 NONSHARABLE_CLASS(CSwtCustomButton) : public CAknButton |
|
27 { |
|
28 friend class CAknButton; |
|
29 // Own methods |
|
30 public: |
|
31 /** |
|
32 * Two-phased constructors. See CAknButton for details. |
|
33 */ |
|
34 static CSwtCustomButton* NewL( |
|
35 CGulIcon* aIcon, |
|
36 CGulIcon* aDimmedIcon, |
|
37 CGulIcon* aPressedIcon, |
|
38 CGulIcon* aHoverIcon, |
|
39 const TDesC& aText, |
|
40 const TDesC& aHelpText, |
|
41 const TInt aButtonFlags, |
|
42 const TInt aStateFlags); |
|
43 |
|
44 static CSwtCustomButton* NewLC( |
|
45 CGulIcon* aIcon, |
|
46 CGulIcon* aDimmedIcon, |
|
47 CGulIcon* aPressedIcon, |
|
48 CGulIcon* aHoverIcon, |
|
49 const TDesC& aText, |
|
50 const TDesC& aHelpText, |
|
51 const TInt aFlags, |
|
52 const TInt aStateFlags); |
|
53 |
|
54 static CSwtCustomButton* NewL( |
|
55 const TDesC& aFilePath, |
|
56 const TInt aBmpId, |
|
57 const TInt aMaskId, |
|
58 const TInt aDimmedBmpId, |
|
59 const TInt aDimmedMaskId, |
|
60 const TInt aPressedBmpId, |
|
61 const TInt aPressedMaskId, |
|
62 const TInt aHoverBmpId, |
|
63 const TInt aHoverMaskId, |
|
64 const TDesC& aText, |
|
65 const TDesC& aHelpText, |
|
66 const TInt aButtonFlags, |
|
67 const TInt aStateFlags, |
|
68 const TAknsItemID& aId = KAknsIIDNone, |
|
69 const TAknsItemID& aDimmedId = KAknsIIDNone, |
|
70 const TAknsItemID& aPressedId = KAknsIIDNone, |
|
71 const TAknsItemID& aHoverId = KAknsIIDNone); |
|
72 |
|
73 static CSwtCustomButton* NewLC( |
|
74 const TDesC& aFilePath, |
|
75 const TInt aBmpId, |
|
76 const TInt aMaskId, |
|
77 const TInt aDimmedBmpId, |
|
78 const TInt aDimmedMaskId, |
|
79 const TInt aPressedBmpId, |
|
80 const TInt aPressedMaskId, |
|
81 const TInt aHoverBmpId, |
|
82 const TInt aHoverMaskId, |
|
83 const TDesC& aText, |
|
84 const TDesC& aHelpText, |
|
85 const TInt aButtonFlags, |
|
86 const TInt aStateFlags, |
|
87 const TAknsItemID& aId = KAknsIIDNone, |
|
88 const TAknsItemID& aDimmedId = KAknsIIDNone, |
|
89 const TAknsItemID& aPressedId = KAknsIIDNone, |
|
90 const TAknsItemID& aHoverId = KAknsIIDNone); |
|
91 |
|
92 public: |
|
93 virtual ~CSwtCustomButton(); |
|
94 |
|
95 // Functions from base class |
|
96 public: |
|
97 CSwtCustomButton(const TInt aFlags); |
|
98 }; |
|
99 |
|
100 #endif // SWTCUSTOMBUTTON_H |