|
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: This file implements overlay controls |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef CTESTOVERLAYCONTROL_H |
|
19 #define CTESTOVERLAYCONTROL_H |
|
20 |
|
21 // INCLUDES |
|
22 #include <e32std.h> |
|
23 #include <e32base.h> |
|
24 #include <coecntrl.h> |
|
25 #include <eikenv.h> |
|
26 #include <AknIconUtils.h> |
|
27 |
|
28 #include <touchfeedback.h> |
|
29 #include <touchlogicalfeedback.h> |
|
30 |
|
31 #include <freestyleemailui.mbg> |
|
32 #include "FreestyleEmailUiUtilities.h" |
|
33 |
|
34 // forward declarations. |
|
35 class RWsSession; |
|
36 class TFsEmailUiUtility; |
|
37 |
|
38 // CLASS DECLARATION |
|
39 class COverlayControl; |
|
40 |
|
41 /** |
|
42 * Observer for overlay control touch events |
|
43 */ |
|
44 class MOverlayControlObserver |
|
45 { |
|
46 public: |
|
47 virtual void HandleOverlayPointerEventL( COverlayControl* aControl, const TPointerEvent& aEvent ) = 0; |
|
48 }; |
|
49 |
|
50 /** |
|
51 * COverlayControl |
|
52 */ |
|
53 class COverlayControl : public CCoeControl |
|
54 { |
|
55 public: |
|
56 // Constructors and destructor |
|
57 |
|
58 /** |
|
59 * Destructor. |
|
60 */ |
|
61 ~COverlayControl(); |
|
62 |
|
63 /** |
|
64 * Two-phased constructor. |
|
65 * @param aParent if not NULL, parent control |
|
66 * @param aObserver observer for touch events |
|
67 * @param aRect initial size and position |
|
68 * @param aBitmapId bitmap to be used |
|
69 * @param aMaskId mask to be used |
|
70 */ |
|
71 static COverlayControl* NewL( CCoeControl* aParent, MOverlayControlObserver* aObserver, |
|
72 const TRect& aRect, TInt aBitmapId, TInt aMaskId ); |
|
73 |
|
74 void Draw( const TRect& ) const; |
|
75 |
|
76 void SetRect( const TRect& aRect ); |
|
77 |
|
78 void HandlePointerEventL(const TPointerEvent& aPointerEvent); |
|
79 |
|
80 void MakeVisible( TBool aVisible ); |
|
81 |
|
82 private: |
|
83 |
|
84 /** |
|
85 * Constructor for performing 1st stage construction |
|
86 * @param aObserver observer for touch events |
|
87 */ |
|
88 COverlayControl( MOverlayControlObserver* aObserver ); |
|
89 |
|
90 /** |
|
91 * EPOC default constructor for performing 2nd stage construction |
|
92 */ |
|
93 void ConstructL( CCoeControl* aParent, const TRect& aRect, TInt aBitmapId, TInt aMaskId ); |
|
94 |
|
95 private: |
|
96 |
|
97 CFbsBitmap* iBitmap; |
|
98 CFbsBitmap* iMask; |
|
99 MOverlayControlObserver* iObserver; |
|
100 // tactile feed back -- not owned |
|
101 MTouchFeedback* iTouchFeedBack; |
|
102 }; |
|
103 |
|
104 #endif // CTESTOVERLAYCONTROL_H |