00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028 #ifndef __AKNPOPUPSETTINGPAGE_H__
00029 #define __AKNPOPUPSETTINGPAGE_H__
00030
00031
00032 #include <aknqueryvalue.h>
00033 #include <aknqueryvaluetext.h>
00034 #include <aknlistboxsettingpage.h>
00035
00036 #include <AknDesCArrayDecorator.h>
00037 #include <AknListBoxLayoutDecorator.h>
00038
00039 class CAknPopupSettingList;
00040 class CAknPopupSettingListExtension;
00041
00046 class MAknPopupSettingListObserver
00047 {
00048 public:
00052 enum TAknPopupSettingListEvent
00053 {
00054 EAknPopupSettingSelectionAndRequestAccept,
00055 EAknPopupSettingSelectionAndStayOpen,
00056 EAknPopupSettingSelectionAndClose
00057 };
00058 public:
00071 virtual void HandlePopupSettingListEventL( CAknPopupSettingList* aPopupSettingList,
00072 TAknPopupSettingListEvent aEventType,
00073 TInt aHint)=0;
00074 };
00075
00080 class CAknPopupSettingList :
00081 public CAknSetStyleListBox,
00082 public MEikListBoxObserver
00083 {
00084
00085 protected:
00086
00087
00088 public:
00092 IMPORT_C CAknPopupSettingList();
00093
00098 IMPORT_C ~CAknPopupSettingList();
00099
00104 IMPORT_C void ConstructL();
00105
00112 IMPORT_C void SetAllowsUserDefinedEntry(TBool aAllows);
00113
00114
00122 IMPORT_C void SetQueryValueL(MAknQueryValue* aValue);
00123
00124
00134 IMPORT_C void SetShowIndicators(TBool aShowIndicators);
00135
00144 IMPORT_C TInt NumLines() const;
00145
00152 IMPORT_C void SetPopupSettingListObserver(MAknPopupSettingListObserver* aObserver);
00153
00154 public:
00160 IMPORT_C void ConstructFromResourceL(TResourceReader& aReader);
00161
00162 protected:
00163
00168 IMPORT_C void CreateMenuListL();
00169
00176 IMPORT_C void ActivateMenuListL();
00177
00183 IMPORT_C void ConfigureMenuListL();
00184
00189 IMPORT_C void DestroyMenuList();
00190
00191 public:
00196 IMPORT_C void HandlePointerEventL( const TPointerEvent& aPointerEvent );
00197
00198 IMPORT_C void HandleResourceChange(TInt aType);
00199
00200 private:
00204 IMPORT_C void* ExtensionInterface( TUid aInterface );
00205
00206 protected:
00220 IMPORT_C void HandleListBoxEventL(CEikListBox* aListBox, TListBoxEvent aEventType);
00221
00222 private:
00223 IMPORT_C void Reserved_1();
00224 IMPORT_C void Reserved_2();
00225 private:
00226 void CommonConstructL();
00227 void SetUpSelectionListL();
00232 void InitialiseRadioButtonBitmapsL();
00233 private:
00239 void ConfigureDecorator();
00245 void ConstructLayoutDecoratorL();
00246
00247 private:
00248
00249
00250 TAknDesCArrayDecorator iDecorator;
00251 CAknListBoxLayoutDecorator* iLayoutDecorator;
00252
00253
00254 TInt iFlags;
00255 HBufC* iOtherText;
00256
00257 TInt iCurrentSelection;
00258
00259 TInt iNewItemSettingPageResourceId;
00260 TInt iNewItemEditorType;
00261 TInt iNewItemEditorControlResourceId;
00262
00263
00264 MAknQueryValue* iValue;
00265 MAknPopupSettingListObserver* iPopupSettingListObserver;
00266
00267
00268 CAknPopupSettingListExtension* iExtension;
00269 };
00270
00271
00277 class CAknPopupSettingPage :
00278 public CAknListBoxSettingPage,
00279 public MAknPopupSettingListObserver
00280 {
00281
00282 public:
00290 IMPORT_C CAknPopupSettingPage(TInt aResourceID, MAknQueryValue& aQueryValue );
00291
00323 IMPORT_C CAknPopupSettingPage( const TDesC* aSettingTitleText,
00324 TInt aSettingNumber,
00325 TInt aControlType,
00326 TInt aEditorResourceId,
00327 TInt aSettingPageResourceId,
00328 MAknQueryValue& aQueryValue);
00329
00335 IMPORT_C virtual void ConstructL();
00336
00342 IMPORT_C CAknSetStyleListBox* ListBoxControl() const;
00343
00349 IMPORT_C CAknPopupSettingList* PopupSettingListBox() const;
00350
00361 IMPORT_C virtual void HandlePopupSettingListEventL(CAknPopupSettingList* aPopupSettingList,
00362 TAknPopupSettingListEvent aEventType, TInt aHint);
00363
00372 IMPORT_C void UpdateQueryValueL( MAknQueryValue* aQueryValue );
00373
00377 IMPORT_C void HandlePointerEventL(const TPointerEvent& aPointerEvent);
00378
00379 protected:
00383 IMPORT_C virtual ~CAknPopupSettingPage();
00384
00392 IMPORT_C MAknQueryValue* QueryValue() const;
00393
00399 IMPORT_C virtual void SelectCurrentItemL();
00400
00401
00402
00403
00404 protected:
00405
00413 IMPORT_C virtual void WriteInternalStateL(RWriteStream& aWriteStream) const;
00414
00418 IMPORT_C virtual void Reserved_2();
00419
00420 private:
00424 IMPORT_C void* ExtensionInterface( TUid aInterface );
00425
00429 private:
00430 IMPORT_C virtual void CAknSettingPage_Reserved_1();
00431 IMPORT_C virtual void CAknSettingPage_Reserved_2();
00432
00433 private:
00438 IMPORT_C virtual void CAknListBoxSettingPage_Reserved_1();
00439
00440 private:
00441
00442
00443 MAknQueryValue& iQueryValue;
00444
00445 TInt iSpare_1;
00446 TInt iSpare_2;
00447
00448 };
00449
00450 #endif