1 /* |
|
2 * Copyright (c) 2005 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: ScreenSaverAnimPlugin Settings Dialog |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #ifndef C_SCREENSAVERANIMSETTINGDIALOH_H |
|
21 #define C_SCREENSAVERANIMSETTINGDIALOH_H |
|
22 |
|
23 |
|
24 // FORWARD DECLARATIONS |
|
25 class CAknDialog; |
|
26 class CScreenSaverAnimPluginContainer; |
|
27 class CScreenSaverAnimSettingObject; |
|
28 |
|
29 /** |
|
30 * Provides the dialog functionality for viewing Settings. |
|
31 * @lib ScreenSaverAnimPlugin.dll |
|
32 * @since 3.1 |
|
33 */ |
|
34 |
|
35 class CScreenSaverAnimSettingDialog : public CAknDialog |
|
36 { |
|
37 public: // Constructors and destructor |
|
38 /** |
|
39 * Two-phased constructor. |
|
40 */ |
|
41 static CScreenSaverAnimSettingDialog* NewL( |
|
42 CScreenSaverAnimPlugin* aCaller, |
|
43 CScreenSaverAnimSettingObject* aSettingObject ); |
|
44 |
|
45 /** |
|
46 * Two-phased constructor. |
|
47 */ |
|
48 static CScreenSaverAnimSettingDialog* NewLC( |
|
49 CScreenSaverAnimPlugin* aCaller, |
|
50 CScreenSaverAnimSettingObject* aSettingObject ); |
|
51 |
|
52 // Destructor |
|
53 virtual ~CScreenSaverAnimSettingDialog(); |
|
54 |
|
55 public: // New functions |
|
56 public: // Functions from base classes |
|
57 |
|
58 /** |
|
59 * From CAknDialog Executes the dialog and deletes the dialog on exit. |
|
60 * @since 3.1 |
|
61 * @param aFileHandle File handle to the SVGT content. |
|
62 * @param aAppObs Implementation Class provided by application that |
|
63 * uses this dialog |
|
64 * Note: The ownership of the file handle is not transferred. |
|
65 * It is the responsibility of the caller to close this file |
|
66 * after deleting this dialog. |
|
67 * @return Integer - Indicates Exit Reason. |
|
68 */ |
|
69 virtual TInt ExecuteLD(); |
|
70 /** |
|
71 * From CAknDialog - Called by framework to process commands invoked by |
|
72 * the user. |
|
73 */ |
|
74 virtual void ProcessCommandL( TInt aCommandId ); |
|
75 |
|
76 #ifdef __SERIES60_HELP |
|
77 /** |
|
78 * From CCoeControl Context Sensitive Help ID retrieving function. |
|
79 * @since 3.0 |
|
80 * @see CCoeControl |
|
81 */ |
|
82 void GetHelpContext( TCoeHelpContext& aContext ) const; |
|
83 #endif |
|
84 |
|
85 public: |
|
86 |
|
87 /** |
|
88 * Function used by the application to handle background/foreground |
|
89 * events. When the application goes to background the presentation |
|
90 * needs to be paused. When application comes back to foreground, |
|
91 * the user would need to start the paused presentation. |
|
92 * @param aForeground: ETrue: Foreground event, |
|
93 * EFalse: Background event. |
|
94 * @since 3.1 |
|
95 */ |
|
96 virtual void HandleApplicationForegroundEvent( TBool aForeground ); |
|
97 |
|
98 protected: // Functions from base classes |
|
99 // From CEikDialog |
|
100 // From CAknDialog |
|
101 |
|
102 /** |
|
103 * From CAknDialog - Called by framework to dynamically manipulate |
|
104 * the menu for the dialog. |
|
105 */ |
|
106 void DynInitMenuPaneL( TInt aResourceId, CEikMenuPane* aMenuPane ); |
|
107 |
|
108 /** |
|
109 * From CEikDialog. Prelayouts the dialog. |
|
110 */ |
|
111 void PreLayoutDynInitL(); |
|
112 |
|
113 /** |
|
114 * From CAknDialog - Framework method to determine if it OK |
|
115 * to exit the dialog. |
|
116 */ |
|
117 TBool OkToExitL( TInt aButtonId ); |
|
118 |
|
119 /** |
|
120 * From CAknDialog - Called by framework to add custom control to the |
|
121 * dialog when specified in resource. |
|
122 */ |
|
123 SEikControlInfo CreateCustomControlL( TInt aControlType ); |
|
124 |
|
125 /** |
|
126 * From CAknDialog - Called by framework to notify resize of dialog. |
|
127 */ |
|
128 void SizeChanged(); |
|
129 |
|
130 /** |
|
131 * From CCoeControl Key Handling Method for control. |
|
132 * @since 3.1 |
|
133 * @param aKeyEvent Key Event. |
|
134 * @param aType Type of Key Event. |
|
135 * @return TKeyResponse - EKeyWasConsumed/EKeyWasNotConsumed. |
|
136 */ |
|
137 TKeyResponse OfferKeyEventL( const TKeyEvent& aKeyEvent, |
|
138 TEventCode aType ); |
|
139 |
|
140 /** |
|
141 * From CCoeControl |
|
142 * @see CCoeControl::HandleResourceChange |
|
143 */ |
|
144 void HandleResourceChange( TInt aType ); |
|
145 |
|
146 /** |
|
147 * From CCoeControl |
|
148 * @see CCoeControl::FocusChanged |
|
149 */ |
|
150 void FocusChanged( TDrawNow aDrawNow ); |
|
151 |
|
152 /** |
|
153 * Sets middle softkey label. |
|
154 * @param aResourceId resource ID of label text to use. |
|
155 * @param aCommandId command to place to middle softkey. |
|
156 */ |
|
157 void SetMiddleSoftKeyLabelL( const TInt aResourceId, |
|
158 const TInt aCommandId ); |
|
159 |
|
160 private: |
|
161 /** |
|
162 * C++ default constructor. |
|
163 */ |
|
164 CScreenSaverAnimSettingDialog( |
|
165 CScreenSaverAnimPlugin* aCaller, |
|
166 CScreenSaverAnimSettingObject* aSettingObject ); |
|
167 /** |
|
168 * Second Phase constructor. |
|
169 */ |
|
170 void ConstructL(); |
|
171 |
|
172 private: // Data |
|
173 |
|
174 // Pointer to Custom CCoeControl. |
|
175 CScreenSaverAnimPluginContainer* iCustControl; |
|
176 |
|
177 // Application Title Text |
|
178 HBufC* iAppTitleText; |
|
179 |
|
180 // Text to be displayed in the title pane |
|
181 HBufC* iTitlePaneString; |
|
182 |
|
183 // Setting Object |
|
184 CScreenSaverAnimSettingObject* iSettingObject ; |
|
185 |
|
186 // Caller's reference |
|
187 CScreenSaverAnimPlugin* iCaller; |
|
188 |
|
189 }; |
|
190 |
|
191 #endif // C_SCREENSAVERANIMSETTINGDIALOH_H |
|
192 // End of File |
|