williamr@4
|
1 |
/*
|
williamr@4
|
2 |
* Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies).
|
williamr@4
|
3 |
* All rights reserved.
|
williamr@4
|
4 |
* This component and the accompanying materials are made available
|
williamr@4
|
5 |
* under the terms of "Eclipse Public License v1.0"
|
williamr@4
|
6 |
* which accompanies this distribution, and is available
|
williamr@4
|
7 |
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
|
williamr@4
|
8 |
*
|
williamr@4
|
9 |
* Initial Contributors:
|
williamr@4
|
10 |
* Nokia Corporation - initial contribution.
|
williamr@4
|
11 |
*
|
williamr@4
|
12 |
* Contributors:
|
williamr@4
|
13 |
*
|
williamr@4
|
14 |
* Description:
|
williamr@4
|
15 |
*
|
williamr@4
|
16 |
*/
|
williamr@4
|
17 |
|
williamr@4
|
18 |
|
williamr@4
|
19 |
#if !defined(__EIKDPAGE_H__)
|
williamr@4
|
20 |
#define __EIKDPAGE_H__
|
williamr@4
|
21 |
|
williamr@4
|
22 |
#include <coeccntx.h>
|
williamr@4
|
23 |
#include <eiksbfrm.h>
|
williamr@4
|
24 |
#include <coecobs.h>
|
williamr@4
|
25 |
#include <eikedwob.h>
|
williamr@4
|
26 |
#include <AknPopupFieldText.h>
|
williamr@4
|
27 |
#include <AknControl.h>
|
williamr@4
|
28 |
|
williamr@4
|
29 |
//
|
williamr@4
|
30 |
// Forward declarations.
|
williamr@4
|
31 |
//
|
williamr@4
|
32 |
|
williamr@4
|
33 |
class CEikCapCArray;
|
williamr@4
|
34 |
class CEikCaptionedControl;
|
williamr@4
|
35 |
class CEikDialogPageContainer;
|
williamr@4
|
36 |
class CEikEdwin;
|
williamr@4
|
37 |
class CEikLabel;
|
williamr@4
|
38 |
class MEikDialogPageObserver;
|
williamr@4
|
39 |
struct SEikControlInfo;
|
williamr@4
|
40 |
class CAknLayoutData;
|
williamr@4
|
41 |
class CDialogPageExtension;
|
williamr@4
|
42 |
|
williamr@4
|
43 |
class CEikFormAnim;
|
williamr@4
|
44 |
class MEikFormAnimObserver;
|
williamr@4
|
45 |
class CAknPaneScroll;
|
williamr@4
|
46 |
class CAknFormPhysics;
|
williamr@4
|
47 |
|
williamr@4
|
48 |
/**
|
williamr@4
|
49 |
* The CEikDialogPage class implements a scrollable dialog page control.
|
williamr@4
|
50 |
*
|
williamr@4
|
51 |
* @internal
|
williamr@4
|
52 |
* @since ER5U
|
williamr@4
|
53 |
*/
|
williamr@4
|
54 |
NONSHARABLE_CLASS(CEikDialogPage) :
|
williamr@4
|
55 |
public CAknControl,
|
williamr@4
|
56 |
public MCoeControlObserver,
|
williamr@4
|
57 |
public MEikScrollBarObserver,
|
williamr@4
|
58 |
public MEikEdwinSizeObserver,
|
williamr@4
|
59 |
public MAknPopupFieldObserver,
|
williamr@4
|
60 |
public MEikEdwinObserver
|
williamr@4
|
61 |
{
|
williamr@4
|
62 |
public:
|
williamr@4
|
63 |
enum TFocusNavigationMode
|
williamr@4
|
64 |
{
|
williamr@4
|
65 |
ECyclic,
|
williamr@4
|
66 |
ENonCyclic
|
williamr@4
|
67 |
};
|
williamr@4
|
68 |
enum TAScrollBarBreadthAllocationMode
|
williamr@4
|
69 |
{
|
williamr@4
|
70 |
ENone =0x0000,
|
williamr@4
|
71 |
EScrollBarBreadthPreAllocated =0x1000
|
williamr@4
|
72 |
};
|
williamr@4
|
73 |
/**
|
williamr@4
|
74 |
* Enumeration to express what layout is currently being used. Note that the use of
|
williamr@4
|
75 |
* bitmaps on the left is controlled by D
|
williamr@4
|
76 |
*
|
williamr@4
|
77 |
*/
|
williamr@4
|
78 |
enum TFormLayoutSelection
|
williamr@4
|
79 |
{
|
williamr@4
|
80 |
ESingle,
|
williamr@4
|
81 |
EDouble
|
williamr@4
|
82 |
};
|
williamr@4
|
83 |
|
williamr@4
|
84 |
/**
|
williamr@4
|
85 |
* Used with iFormFlags to indicate where optimisations may or may not occur.
|
williamr@4
|
86 |
* Uses bits above 0x100 as those below are used as static form flags for configuration by resource file.
|
williamr@4
|
87 |
*/
|
williamr@4
|
88 |
enum TDynamicFormFlags
|
williamr@4
|
89 |
{
|
williamr@4
|
90 |
EFormResizeOptimisationFlag = 0x100 ,
|
williamr@4
|
91 |
EFormForceEdwinResizeFlag = 0x200
|
williamr@4
|
92 |
} ;
|
williamr@4
|
93 |
|
williamr@4
|
94 |
public:
|
williamr@4
|
95 |
~CEikDialogPage();
|
williamr@4
|
96 |
static CEikDialogPage* NewL(TInt aId,RWindow& aViewWin,CEikScrollBarFrame& aSBFrame,const CEikDialogPageContainer& aParent,MEikDialogPageObserver* aPageObserver);
|
williamr@4
|
97 |
static CEikDialogPage* NewLC(TInt aId,RWindow& aViewWin,CEikScrollBarFrame& aSBFrame,const CEikDialogPageContainer& aParent,MEikDialogPageObserver* aPageObserver);
|
williamr@4
|
98 |
static CEikDialogPage* NewL(TInt aId,RWindow& aViewWin,CEikScrollBarFrame& aSBFrame,const CEikDialogPageContainer& aParent,MEikDialogPageObserver* aPageObserver,TResourceReader& aReader);
|
williamr@4
|
99 |
static CEikDialogPage* NewLC(TInt aId,RWindow& aViewWin,CEikScrollBarFrame& aSBFrame,const CEikDialogPageContainer& aParent,MEikDialogPageObserver* aPageObserver,TResourceReader& aReader);
|
williamr@4
|
100 |
void SetDataPosition( TInt aTopY, TInt aBottomY, TBool aForceResize );
|
williamr@4
|
101 |
TSize PreferredSize() const;
|
williamr@4
|
102 |
void SetActiveL();
|
williamr@4
|
103 |
void SetActiveAndFocusL();
|
williamr@4
|
104 |
void SetInactiveL();
|
williamr@4
|
105 |
TInt PageId() const;
|
williamr@4
|
106 |
TInt LineId(const CCoeControl& aControl) const;
|
williamr@4
|
107 |
TBool SetInitialFocus();
|
williamr@4
|
108 |
CCoeControl* CreateLineByTypeL(const TDesC& aCaption,TInt aLineId,TInt aControlType,TAny* aReturnValue);
|
williamr@4
|
109 |
CCoeControl* Control(TInt aLineId) const;
|
williamr@4
|
110 |
CCoeControl* ControlOrNull(TInt aLineId) const;
|
williamr@4
|
111 |
TInt ControlHeight(TInt aLineIndex) const;
|
williamr@4
|
112 |
CEikCaptionedControl* Line(TInt aLineId) const;
|
williamr@4
|
113 |
CEikCaptionedControl* LineOrNull(TInt aLineId) const;
|
williamr@4
|
114 |
CEikCaptionedControl* CurrentLine() const;
|
williamr@4
|
115 |
void SetDensePacking(TBool aDensePacking);
|
williamr@4
|
116 |
void InsertLineL(TInt aPosition,TInt aResourceId);
|
williamr@4
|
117 |
void DeleteLine(TInt aLineId,TBool aRedrawNow);
|
williamr@4
|
118 |
void AdjustAllIds(TInt aControlIdDelta);
|
williamr@4
|
119 |
TInt FocusLineL(TInt aLineId);
|
williamr@4
|
120 |
TInt FocusedLineId() const;
|
williamr@4
|
121 |
void GetAutoValues();
|
williamr@4
|
122 |
TKeyResponse OfferUpDownKeyEventL(const TKeyEvent& aKeyEvent,TEventCode aType,TFocusNavigationMode aFocusNavigationMode);
|
williamr@4
|
123 |
TBool OwnsLine(TInt aLineId) const;
|
williamr@4
|
124 |
void ResetLineMinimumSizes();
|
williamr@4
|
125 |
TInt FindLineIndex(const CCoeControl* aControl) const;
|
williamr@4
|
126 |
TBool RotateFocusByL(TInt aDelta);
|
williamr@4
|
127 |
TKeyResponse OfferHotKeysKeyEventL(const TKeyEvent& aKeyEvent,TEventCode aType);
|
williamr@4
|
128 |
TBool TakesEnterKey();
|
williamr@4
|
129 |
TInt LineIndex(TInt aLineId);
|
williamr@4
|
130 |
void ReportPageChangedL();
|
williamr@4
|
131 |
TInt GetFormFlags() const;
|
williamr@4
|
132 |
void SetFormFlag( TInt16 aFlag, TBool aEnable ) ; // used with TDynamicFormFlags
|
williamr@4
|
133 |
void ConstructFormFromResourceL( TResourceReader& aReader ) ;
|
williamr@4
|
134 |
void SetEditableL( TBool aEditable, TBool aActivePage ) ;
|
williamr@4
|
135 |
TBool IsEditable() const;
|
williamr@4
|
136 |
TBool IsForm() const;
|
williamr@4
|
137 |
|
williamr@4
|
138 |
void SetDoubleQuery(TBool aIsDoubleQuery);
|
williamr@4
|
139 |
|
williamr@4
|
140 |
CEikFormAnim* AcquireAnim( TBool aAcquire, MEikFormAnimObserver* aObserver ) const;
|
williamr@4
|
141 |
|
williamr@4
|
142 |
public:
|
williamr@4
|
143 |
void UpdateScrollBarL();
|
williamr@4
|
144 |
TBool LineHandlerCalled() const;
|
williamr@4
|
145 |
|
williamr@4
|
146 |
public: // from CCoeControl
|
williamr@4
|
147 |
TSize MinimumSize();
|
williamr@4
|
148 |
virtual void GetColorUseListL(CArrayFix<TCoeColorUse>& aColorUseList) const;
|
williamr@4
|
149 |
virtual void HandleResourceChange(TInt aType);
|
williamr@4
|
150 |
virtual void PrepareForFocusLossL();
|
williamr@4
|
151 |
virtual void SetDimmed(TBool aDimmed);
|
williamr@4
|
152 |
virtual TKeyResponse OfferKeyEventL(const TKeyEvent& aKeyEvent,TEventCode aType);
|
williamr@4
|
153 |
public: // from MCoeControlObserver
|
williamr@4
|
154 |
virtual void HandleControlEventL(CCoeControl* aControl,TCoeEvent aEventType);
|
williamr@4
|
155 |
public: // from MEikEdwinSizeObserver
|
williamr@4
|
156 |
virtual TBool HandleEdwinSizeEventL(CEikEdwin* aEdwin, TEdwinSizeEvent aEventType, TSize aDesirableEdwinSize);
|
williamr@4
|
157 |
public: // from MEikEdwinObserver
|
williamr@4
|
158 |
virtual void HandleEdwinEventL(CEikEdwin* aEdwin,TEdwinEvent aEventType);
|
williamr@4
|
159 |
|
williamr@4
|
160 |
public: // from MAknPopupFieldObserver
|
williamr@4
|
161 |
virtual void HandlePopupFieldEventL(CAknPopupField* aPopupField, TAknPopupFieldEvent aEventType, TInt aHint);
|
williamr@4
|
162 |
public:
|
williamr@4
|
163 |
void SetPageContainer(const CEikDialogPageContainer* aPageContainer);
|
williamr@4
|
164 |
const CEikDialogPageContainer* PageContainer() const;
|
williamr@4
|
165 |
protected: // from CCoeControl
|
williamr@4
|
166 |
void WriteInternalStateL(RWriteStream& aWriteStream) const;
|
williamr@4
|
167 |
void SizeChanged();
|
williamr@4
|
168 |
TInt CountComponentControls() const;
|
williamr@4
|
169 |
CCoeControl* ComponentControl(TInt aIndex) const;
|
williamr@4
|
170 |
void FocusChanged(TDrawNow aDrawNow);
|
williamr@4
|
171 |
void Draw(const TRect& aRect) const;
|
williamr@4
|
172 |
public:
|
williamr@4
|
173 |
// added to allow Form format to be set by API
|
williamr@4
|
174 |
IMPORT_C void SetFormLayout(TFormLayoutSelection aLayout);
|
williamr@4
|
175 |
IMPORT_C TFormLayoutSelection FormLayout() const;
|
williamr@4
|
176 |
public:
|
williamr@4
|
177 |
public:
|
williamr@4
|
178 |
TBool IsAtOrOffTopOfPage(const CCoeControl* aControl) const;
|
williamr@4
|
179 |
TBool IsAtOrOffBottomOfPage(const CCoeControl* aControl) const ;
|
williamr@4
|
180 |
public:
|
williamr@4
|
181 |
TBool VisibleSizeOnPage(TInt& aHeightOfControlVisibleOnPage, const CCoeControl* aControl) const;
|
williamr@4
|
182 |
|
williamr@4
|
183 |
/**
|
williamr@4
|
184 |
* Scrolls cached drawing commands by @c aDelta pixels in y direction.
|
williamr@4
|
185 |
*
|
williamr@4
|
186 |
* @param aDelta A y-asix base on the sliding control's coordinate.
|
williamr@4
|
187 |
* @param aDebugMsg Not used.
|
williamr@4
|
188 |
* @param aDrawNow Whether or not the view should be drawn.
|
williamr@4
|
189 |
*/
|
williamr@4
|
190 |
void ScrollCacheByPixels( TInt aDelta,
|
williamr@4
|
191 |
const TDesC& aDebugMsg,
|
williamr@4
|
192 |
TBool aDrawNow = ETrue );
|
williamr@4
|
193 |
|
williamr@4
|
194 |
/**
|
williamr@4
|
195 |
* Updates line's cached drawing commands.
|
williamr@4
|
196 |
*/
|
williamr@4
|
197 |
void UpdateLineInCache( CEikCaptionedControl* aLine );
|
williamr@4
|
198 |
|
williamr@4
|
199 |
/**
|
williamr@4
|
200 |
* Physics simulation ended.
|
williamr@4
|
201 |
*/
|
williamr@4
|
202 |
void Synchronize();
|
williamr@4
|
203 |
|
williamr@4
|
204 |
/**
|
williamr@4
|
205 |
* Can be used to query whether highlight graphics should be drawn.
|
williamr@4
|
206 |
*
|
williamr@4
|
207 |
* @since S60 5.2
|
williamr@4
|
208 |
*
|
williamr@4
|
209 |
* @return ETrue if highlight should be drawn.
|
williamr@4
|
210 |
*/
|
williamr@4
|
211 |
TBool HighlightVisible() const;
|
williamr@4
|
212 |
|
williamr@4
|
213 |
protected: // from MEikScrollBarObserver
|
williamr@4
|
214 |
virtual void HandleScrollEventL(CEikScrollBar* aScrollBar,TEikScrollEvent aEventType);
|
williamr@4
|
215 |
|
williamr@4
|
216 |
private: // new functions
|
williamr@4
|
217 |
void AfterAddingNewLinesL(TInt aNewLineAdded);
|
williamr@4
|
218 |
|
williamr@4
|
219 |
CEikDialogPage(TInt aId,RWindow& aViewWin,CEikScrollBarFrame& aSBFrame,MEikDialogPageObserver* aPageObserver);
|
williamr@4
|
220 |
void ConstructL();
|
williamr@4
|
221 |
void ConstructFromResourceL(TResourceReader& aReader, TBool aFormControl = EFalse );
|
williamr@4
|
222 |
void ConstructByTypeL(TInt aControlType,CEikCaptionedControl* aLine,CCoeControl* aContainer);
|
williamr@4
|
223 |
void ShowFocus(TBool aFocus, TBool aRedraw=ETrue);
|
williamr@4
|
224 |
SEikControlInfo CreateCustomControlL(TInt aControlType);
|
williamr@4
|
225 |
void ChangeFocusTo(TInt aLineIndex);
|
williamr@4
|
226 |
void PrepareForFocusTransitionL();
|
williamr@4
|
227 |
void ChangeFocusToAndExposeL(TInt aLine,TBool aShowWholeControl=EFalse);
|
williamr@4
|
228 |
TInt TopFocusableLine() const;
|
williamr@4
|
229 |
TInt BottomFocusableLine() const;
|
williamr@4
|
230 |
TBool LineIsFocusable(TInt aLine) const;
|
williamr@4
|
231 |
TBool ResizeEdwinToFitTextL(CEikEdwin* aEdwin, TDrawNow aDrawNow, TSize aDesirableEdwinSize);
|
williamr@4
|
232 |
TInt YPosToLine2(TInt aYPos) const;
|
williamr@4
|
233 |
TInt LineToYPos(TInt& aLine) const;
|
williamr@4
|
234 |
void ExposeLine(TInt aLine, TBool aForceResize, TBool aShowWholeLine = EFalse );
|
williamr@4
|
235 |
void PassOnEventL(CCoeControl* aControl,MCoeControlObserver::TCoeEvent aEvent);
|
williamr@4
|
236 |
CEikCaptionedControl* ConstructLineL(TInt aResourceId);
|
williamr@4
|
237 |
CEikCaptionedControl* ConstructLineL(TResourceReader& aReader);
|
williamr@4
|
238 |
TKeyResponse HandleCyclicFocusNavigationKeyL(const TKeyEvent& aKeyEvent);
|
williamr@4
|
239 |
TKeyResponse HandleNonCyclicFocusNavigationKeyL(const TKeyEvent& aKeyEvent);
|
williamr@4
|
240 |
void MakeEdwinScrollbarsVisibleL(TBool aVisible);
|
williamr@4
|
241 |
void LineChangedL(TInt aControlId);
|
williamr@4
|
242 |
void UpdateScrollBarThumb();
|
williamr@4
|
243 |
void ReconsiderPageSize();
|
williamr@4
|
244 |
void PrepareToDrawVerticalLine() const;
|
williamr@4
|
245 |
|
williamr@4
|
246 |
/**
|
williamr@4
|
247 |
* Specialized pointer event handling for forms.
|
williamr@4
|
248 |
*/
|
williamr@4
|
249 |
void HandleFormPointerEventL( const TPointerEvent& aPointerEvent );
|
williamr@4
|
250 |
|
williamr@4
|
251 |
/**
|
williamr@4
|
252 |
* Updates physics data.
|
williamr@4
|
253 |
*/
|
williamr@4
|
254 |
void UpdatePhysics();
|
williamr@4
|
255 |
|
williamr@4
|
256 |
/**
|
williamr@4
|
257 |
* Callback for highlight timer.
|
williamr@4
|
258 |
*/
|
williamr@4
|
259 |
static TInt HighlightTimerCallBack( TAny* aPtr );
|
williamr@4
|
260 |
|
williamr@4
|
261 |
/**
|
williamr@4
|
262 |
* Handles highlight timer's expiration.
|
williamr@4
|
263 |
*/
|
williamr@4
|
264 |
void HandleHighlightTimer();
|
williamr@4
|
265 |
|
williamr@4
|
266 |
/**
|
williamr@4
|
267 |
* Performs forced redraw of aControl and its component controls.
|
williamr@4
|
268 |
*/
|
williamr@4
|
269 |
void DrawControl( CCoeControl* aControl ) const;
|
williamr@4
|
270 |
|
williamr@4
|
271 |
/**
|
williamr@4
|
272 |
* Record all lines drawing commands to the cache. Existing cache is purged.
|
williamr@4
|
273 |
*/
|
williamr@4
|
274 |
void RecordLinesL();
|
williamr@4
|
275 |
|
williamr@4
|
276 |
/**
|
williamr@4
|
277 |
* Records one line's drawing commands to the cache replacing existing commands for that line.
|
williamr@4
|
278 |
*/
|
williamr@4
|
279 |
void RecordLineL( TInt aLine );
|
williamr@4
|
280 |
|
williamr@4
|
281 |
/**
|
williamr@4
|
282 |
* Scrolls all lines by aPixels in y direction.
|
williamr@4
|
283 |
*/
|
williamr@4
|
284 |
void ScrollByPixels( TInt aDelta );
|
williamr@4
|
285 |
|
williamr@4
|
286 |
/**
|
williamr@4
|
287 |
* Removes pressed down highlight.
|
williamr@4
|
288 |
*/
|
williamr@4
|
289 |
void RemovePressedDownHighlight();
|
williamr@4
|
290 |
|
williamr@4
|
291 |
/**
|
williamr@4
|
292 |
* Sets highlight's visibility.
|
williamr@4
|
293 |
*
|
williamr@4
|
294 |
* @since S60 5.2
|
williamr@4
|
295 |
*
|
williamr@4
|
296 |
* @param aVisible ETrue to set highlight visible.
|
williamr@4
|
297 |
*/
|
williamr@4
|
298 |
void HighlightVisible( TBool aVisible );
|
williamr@4
|
299 |
|
williamr@4
|
300 |
enum TScrollDirection
|
williamr@4
|
301 |
{
|
williamr@4
|
302 |
ESingleLineScrollUp ,
|
williamr@4
|
303 |
ESingleLineScrollDown
|
williamr@4
|
304 |
} ;
|
williamr@4
|
305 |
void RegisterComponentL(TInt aControlType, CCoeControl* aControl, CEikCaptionedControl* aLine);
|
williamr@4
|
306 |
static void CommonConstructCodeBetweenNewL(CEikDialogPage& aDialogPage, const CEikDialogPageContainer& aParent);
|
williamr@4
|
307 |
|
williamr@4
|
308 |
public:
|
williamr@4
|
309 |
TBool AnythingToDisplay() const;
|
williamr@4
|
310 |
void DrawVerticalLine() const;
|
williamr@4
|
311 |
CEikCaptionedControl* LineOnPageOrNull(TInt aLine) const;
|
williamr@4
|
312 |
TSize RealDataSize() const;
|
williamr@4
|
313 |
TInt NumberOfLines() const;
|
williamr@4
|
314 |
CEikCaptionedControl* LineByIndex(TInt aIndex) const;
|
williamr@4
|
315 |
|
williamr@4
|
316 |
private:
|
williamr@4
|
317 |
CEikCapCArray* iLines;
|
williamr@4
|
318 |
MEikDialogPageObserver* iPageObserver;
|
williamr@4
|
319 |
TInt iPageId;
|
williamr@4
|
320 |
TInt iCurrentLine;
|
williamr@4
|
321 |
TInt16 iFormFlags ;
|
williamr@4
|
322 |
TBool iIsEditable;
|
williamr@4
|
323 |
TBool iFormControl ;
|
williamr@4
|
324 |
TInt iLastExposedLine;
|
williamr@4
|
325 |
TInt iLastExposedLineViewWinYPosition;
|
williamr@4
|
326 |
const CEikDialogPageContainer* iPageContainer;
|
williamr@4
|
327 |
TFormLayoutSelection iFormLayout;
|
williamr@4
|
328 |
CAknPaneScroll *iScroll;
|
williamr@4
|
329 |
public:
|
williamr@4
|
330 |
mutable CEikEdwin* iIgnoreFurtherEdwinResizeEvents;
|
williamr@4
|
331 |
private:
|
williamr@4
|
332 |
CDialogPageExtension* iExtension;
|
williamr@4
|
333 |
void DrawEmptyListL( CWindowGc& aGc );
|
williamr@4
|
334 |
CAknFormPhysics* iPhysics;
|
williamr@4
|
335 |
|
williamr@4
|
336 |
/**
|
williamr@4
|
337 |
* Stores highlight's visibility.
|
williamr@4
|
338 |
*/
|
williamr@4
|
339 |
TBool iHighlightVisible;
|
williamr@4
|
340 |
|
williamr@4
|
341 |
public:
|
williamr@4
|
342 |
/**
|
williamr@4
|
343 |
* HandlePointerEventL
|
williamr@4
|
344 |
* Function notifys the pages observer that the page has been tapped. (stylus down&up)
|
williamr@4
|
345 |
* @param aPointerEvent the pointer event.
|
williamr@4
|
346 |
*/
|
williamr@4
|
347 |
virtual void HandlePointerEventL(const TPointerEvent& aPointerEvent);
|
williamr@4
|
348 |
|
williamr@4
|
349 |
void SetScbState(TBool aExternal);
|
williamr@4
|
350 |
TBool ScbState() const;
|
williamr@4
|
351 |
|
williamr@4
|
352 |
private:
|
williamr@4
|
353 |
/**
|
williamr@4
|
354 |
* From CAknControl
|
williamr@4
|
355 |
*/
|
williamr@4
|
356 |
IMPORT_C void* ExtensionInterface( TUid aInterface );
|
williamr@4
|
357 |
};
|
williamr@4
|
358 |
|
williamr@4
|
359 |
|
williamr@4
|
360 |
/**
|
williamr@4
|
361 |
* The CEikDialogPageContainer class contains one or more dialog pages and provides an interface to the active
|
williamr@4
|
362 |
* page.
|
williamr@4
|
363 |
*
|
williamr@4
|
364 |
* @internal
|
williamr@4
|
365 |
* @since ER5U
|
williamr@4
|
366 |
*/
|
williamr@4
|
367 |
NONSHARABLE_CLASS(CEikDialogPageContainer) : public CAknControl, public MCoeControlContext, public MCoeControlHitTest
|
williamr@4
|
368 |
{
|
williamr@4
|
369 |
public:
|
williamr@4
|
370 |
~CEikDialogPageContainer();
|
williamr@4
|
371 |
static CEikDialogPageContainer* NewL(const CCoeControl& aParent,MEikDialogPageObserver* aPageObserver);
|
williamr@4
|
372 |
static CEikDialogPageContainer* NewLC(const CCoeControl& aParent,MEikDialogPageObserver* aPageObserver);
|
williamr@4
|
373 |
TSize PreferredSize(const TSize& aMaxSize) const;
|
williamr@4
|
374 |
void SetActivePageByIdL(TInt aPageId);
|
williamr@4
|
375 |
void SetActivePageByIndexL(TInt aPageIndex);
|
williamr@4
|
376 |
TInt ActivateFirstPageL();
|
williamr@4
|
377 |
void AddPageL(TInt aPageId);
|
williamr@4
|
378 |
void AddPageL(TInt aPageId,TResourceReader& aReader);
|
williamr@4
|
379 |
TBool SetInitialFocus();
|
williamr@4
|
380 |
CEikCaptionedControl* Line(TInt aLineId) const;
|
williamr@4
|
381 |
CEikCaptionedControl* LineOrNull(TInt aLineId) const;
|
williamr@4
|
382 |
CEikCaptionedControl* CurrentLine() const;
|
williamr@4
|
383 |
void SetPageDensePacked(TInt aPageId,TBool aDensePacked);
|
williamr@4
|
384 |
void SetAllPagesDensePacked(TBool aDensePacked);
|
williamr@4
|
385 |
void SetPageDimmed(TInt aPageId,TBool aDimmed,TDrawNow aDrawNow);
|
williamr@4
|
386 |
TBool IsActivePageDimmed() const;
|
williamr@4
|
387 |
TInt LineId(const CCoeControl& aControl) const;
|
williamr@4
|
388 |
void InsertLineL(TInt aPosition,TInt aPageId,TInt aResourceId);
|
williamr@4
|
389 |
void DeleteLine(TInt aLineId, TBool aRedrawNow);
|
williamr@4
|
390 |
void AdjustAllIds(TInt aPageId,TInt aControlIdDelta);
|
williamr@4
|
391 |
CCoeControl* CreateLineByTypeL(const TDesC& aCaption,TInt aLineId,TInt aControlType,TAny* aReturnValue);
|
williamr@4
|
392 |
CCoeControl* CreateLineByTypeL(const TDesC& aCaption,TInt aPageId,TInt aLineId,TInt aControlType,TAny* aReturnValue);
|
williamr@4
|
393 |
TInt FocusLineL(TInt aLineId);
|
williamr@4
|
394 |
TInt FocusedLineId() const;
|
williamr@4
|
395 |
void GetAutoValues();
|
williamr@4
|
396 |
TKeyResponse OfferUpDownKeyEventL(const TKeyEvent& aKeyEvent,TEventCode aType,CEikDialogPage::TFocusNavigationMode aFocusNavigationMode);
|
williamr@4
|
397 |
TInt ActivePageId() const;
|
williamr@4
|
398 |
TInt ActivePageIndex() const;
|
williamr@4
|
399 |
void ResetLineMinimumSizes();
|
williamr@4
|
400 |
TInt FindLineIndex(const CCoeControl& aControl) const;
|
williamr@4
|
401 |
TBool RotateFocusByL(TInt aDelta);
|
williamr@4
|
402 |
TInt NumPages() const;
|
williamr@4
|
403 |
TKeyResponse OfferHotKeysKeyEventL(const TKeyEvent& aKeyEvent,TEventCode aType);
|
williamr@4
|
404 |
TBool TakesEnterKey();
|
williamr@4
|
405 |
TInt FindPageIndexForLineId(TInt aLineId);
|
williamr@4
|
406 |
CEikDialogPage* Page( TInt aPageID ) ;
|
williamr@4
|
407 |
void SetEditableL( TBool aEditable ) ;
|
williamr@4
|
408 |
|
williamr@4
|
409 |
CEikFormAnim* AcquireAnim( TBool aAcquire, MEikFormAnimObserver* aObserver ) const;
|
williamr@4
|
410 |
|
williamr@4
|
411 |
public: // from CCoeControl
|
williamr@4
|
412 |
virtual void Draw(const TRect& aRect) const;
|
williamr@4
|
413 |
virtual TSize MinimumSize();
|
williamr@4
|
414 |
virtual void PrepareForFocusLossL();
|
williamr@4
|
415 |
virtual TKeyResponse OfferKeyEventL(const TKeyEvent& aKeyEvent,TEventCode aType);
|
williamr@4
|
416 |
virtual void HandleResourceChange(TInt aType);
|
williamr@4
|
417 |
public: // from MCoeControlContext
|
williamr@4
|
418 |
virtual void PrepareContext(CWindowGc& aGc) const;
|
williamr@4
|
419 |
public:
|
williamr@4
|
420 |
TBool HitRegionContains( const TPoint& aPoint, const CCoeControl& aControl ) const;
|
williamr@4
|
421 |
public:
|
williamr@4
|
422 |
void SetPageFormSized();
|
williamr@4
|
423 |
protected: // from CCoeControl
|
williamr@4
|
424 |
virtual void SizeChanged();
|
williamr@4
|
425 |
virtual TInt CountComponentControls() const;
|
williamr@4
|
426 |
virtual CCoeControl* ComponentControl(TInt aIndex) const;
|
williamr@4
|
427 |
virtual void ActivateL();
|
williamr@4
|
428 |
virtual void FocusChanged(TDrawNow aDrawNow);
|
williamr@4
|
429 |
virtual void WriteInternalStateL(RWriteStream& aWriteStream) const;
|
williamr@4
|
430 |
public:
|
williamr@4
|
431 |
void SetPageSelector(const CEikDialogPageSelector* aPageSelector);
|
williamr@4
|
432 |
const CEikDialogPageSelector* PageSelector() const;
|
williamr@4
|
433 |
private:
|
williamr@4
|
434 |
CEikDialogPageContainer(MEikDialogPageObserver* aPageObserver);
|
williamr@4
|
435 |
void ConstructL(const CCoeControl& aParent);
|
williamr@4
|
436 |
void ConstructFromResourceL(TResourceReader& aReader,const CCoeControl& aParent);
|
williamr@4
|
437 |
void CommonConstructL(const CCoeControl& aParent);
|
williamr@4
|
438 |
void CreatePageArrayL();
|
williamr@4
|
439 |
TInt PageIndex(TInt aPageId) const;
|
williamr@4
|
440 |
TInt PageId(TInt aIndex) const;
|
williamr@4
|
441 |
TInt PageIdFromLineId(TInt aLineId) const;
|
williamr@4
|
442 |
public:
|
williamr@4
|
443 |
void CreateScrollBarL(const CCoeControl& aParent);
|
williamr@4
|
444 |
CEikScrollBarFrame* ScrollBar() const;
|
williamr@4
|
445 |
|
williamr@4
|
446 |
private:
|
williamr@4
|
447 |
CEikScrollBarFrame* iSBFrame;
|
williamr@4
|
448 |
CArrayPtr<CEikDialogPage>* iPageArray;
|
williamr@4
|
449 |
MEikDialogPageObserver* iPageObserver;
|
williamr@4
|
450 |
TInt iActivePage;
|
williamr@4
|
451 |
const CEikDialogPageSelector* iPageSelector;
|
williamr@4
|
452 |
TBool iForm;
|
williamr@4
|
453 |
TBool iIsEditable;
|
williamr@4
|
454 |
|
williamr@4
|
455 |
/**
|
williamr@4
|
456 |
* A singleton animation object for interfacing AknsEffectAnimation. All
|
williamr@4
|
457 |
* captioned controls (in all dialog pages) share the same animation.
|
williamr@4
|
458 |
* Only animation creation and memory management is vested here. Actual
|
williamr@4
|
459 |
* animation usage is implemented in CaptionedControl.
|
williamr@4
|
460 |
*/
|
williamr@4
|
461 |
CEikFormAnim* iAnimation;
|
williamr@4
|
462 |
};
|
williamr@4
|
463 |
|
williamr@4
|
464 |
#endif
|