|
1 /* |
|
2 * Copyright (c) 2007 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: CVideoDTMFDialer class provides dialer keypad |
|
15 * functionalities |
|
16 * |
|
17 */ |
|
18 |
|
19 |
|
20 |
|
21 #ifndef CVIDEODTMFDIALER_H |
|
22 #define CVIDEODTMFDIALER_H |
|
23 |
|
24 // INCLUDES |
|
25 #include <coecntrl.h> |
|
26 #include <coemain.h> |
|
27 // CONSTANTS |
|
28 |
|
29 // FORWARD DECLARATIONS |
|
30 class CDialerKeyPadContainer; |
|
31 class CDialerVideoContainer; |
|
32 class CEikonEnv; |
|
33 |
|
34 // CLASS DECLARATION |
|
35 |
|
36 /** |
|
37 * CVideoDTMFDialer class. |
|
38 * |
|
39 * @lib dialer.lib |
|
40 * @since Series60_5.0 |
|
41 * |
|
42 * Description: |
|
43 * |
|
44 * In Video Telephony dialer offers touch keypad for enter as DTMFs |
|
45 * and client's CCoeControl is used to show video and keypad. |
|
46 * Video DTMF dialer does not implement menu or command buttons, |
|
47 * only keypad which presses are forwarded to host application as key events. |
|
48 * |
|
49 * From host application dialer requires: |
|
50 * - View/container as CCoeControl |
|
51 * - App UI HandleCommand, DynInitMenuBar/Pane and CBA handling |
|
52 * - HandleKeyEventL to handle numbers/characters from touch pane input. |
|
53 * |
|
54 * |
|
55 * Usage: |
|
56 |
|
57 // Create 'video window'. |
|
58 CCoeControl* videoControl = new( ELeave ) CEikLabel; |
|
59 videoControl->SetBufferReserveLengthL( 10 ); |
|
60 videoControl->SetTextL( _L("Video Here") ) ; |
|
61 |
|
62 // Create dialer. |
|
63 CVideoDTMFDialer* videoDialer = CVideoDTMFDialer::NewL( *this, *videoControl, aDialerArea ); |
|
64 // Delete dialer |
|
65 delete dialer; |
|
66 |
|
67 * |
|
68 */ |
|
69 NONSHARABLE_CLASS(CVideoDTMFDialer) : public CCoeControl |
|
70 { |
|
71 public: // Constructors and destructor |
|
72 |
|
73 /** |
|
74 * Two phase constructor |
|
75 * @param aContainer Parent container |
|
76 * @param aVideoWindow Control viewing video |
|
77 * @param aRect Area to use for dialer |
|
78 * @return New instance or Dialer |
|
79 */ |
|
80 IMPORT_C static CVideoDTMFDialer* NewL( const CCoeControl& aContainer, |
|
81 CCoeControl& aVideoWindow, |
|
82 const TRect& aRect ); |
|
83 |
|
84 /** |
|
85 * Destructor. |
|
86 */ |
|
87 IMPORT_C virtual ~CVideoDTMFDialer(); |
|
88 |
|
89 private: // Functions from CCoeControl |
|
90 |
|
91 /** |
|
92 * @see CCoeControl |
|
93 */ |
|
94 void SizeChanged(); |
|
95 |
|
96 /** |
|
97 * @see CCoeControl |
|
98 */ |
|
99 void PositionChanged(); |
|
100 |
|
101 /** |
|
102 * @see CCoeControl |
|
103 */ |
|
104 TInt CountComponentControls() const; |
|
105 |
|
106 /** |
|
107 * @see CCoeControl |
|
108 */ |
|
109 CCoeControl* ComponentControl( TInt aIndex ) const; |
|
110 |
|
111 /** |
|
112 * @see CCoeControl |
|
113 */ |
|
114 void Draw( const TRect& aRect ) const; |
|
115 |
|
116 /** |
|
117 * @see CCoeControl |
|
118 */ |
|
119 void HandleResourceChange( TInt aType ); |
|
120 |
|
121 /** |
|
122 * @see CCoeControl |
|
123 */ |
|
124 void HandlePointerEventL( const TPointerEvent& aPointerEvent ); |
|
125 |
|
126 private: |
|
127 |
|
128 /** |
|
129 * Constructor |
|
130 */ |
|
131 CVideoDTMFDialer( ); |
|
132 |
|
133 /** |
|
134 * 2nd phase constructor. |
|
135 * @param aContainer Parent container |
|
136 * @param aVideoWindow Control containing the video |
|
137 * @param aRect area to use for dialer |
|
138 */ |
|
139 void ConstructL( const CCoeControl& aContainer , |
|
140 CCoeControl& aVideoWindow, |
|
141 const TRect& aRect ); |
|
142 |
|
143 /** |
|
144 * Load resource file. |
|
145 */ |
|
146 void LoadResourceL(); |
|
147 |
|
148 /** |
|
149 * Unload resource file. |
|
150 */ |
|
151 void UnLoadResources(); |
|
152 |
|
153 /** |
|
154 * @see CCoeControl::ComponentControl() |
|
155 * @param aIndex control index |
|
156 */ |
|
157 CCoeControl* ComponentControlForVideoMode( const TInt aIndex ) const; |
|
158 |
|
159 private: // Data |
|
160 |
|
161 // Keypad container - owned |
|
162 CDialerKeyPadContainer* iKeypadArea; |
|
163 |
|
164 // Video container - owned |
|
165 CDialerVideoContainer* iVideoWindow; |
|
166 |
|
167 // Parent container |
|
168 const CCoeControl* iParentControl; |
|
169 |
|
170 // Reference to CEikonEnv |
|
171 CEikonEnv& iEikEnv; |
|
172 |
|
173 // Resource |
|
174 TInt iResourceOffset; |
|
175 |
|
176 // For future use. |
|
177 TBool* iReserved1; |
|
178 TBool* iReserved2; |
|
179 }; |
|
180 |
|
181 #endif // CVIDEODTMFDIALER_H |
|
182 |
|
183 // End of File |