AknPopupSettingPage.h

Go to the documentation of this file.
00001 /*
00002 * ============================================================================
00003 *  Name     : AknPopupSettingPage.h
00004 *  Part of  : Avkon
00005 *
00006 *  Description: 
00007 *
00008 * Support for popup setting item lists.  THe MAknQueryValue abstract type is 
00009 * used to carry the state of the selection. 
00010 *
00011 * This file also contains the definition for the contained editor of the setting page,
00012 * CAknPopupSettingList  
00013 *
00014 *  Version:
00015 *
00016 *  Copyright © 2002 Nokia Corporation.
00017 *  This material, including documentation and any related 
00018 *  computer programs, is protected by copyright controlled by 
00019 *  Nokia Corporation. All rights are reserved. Copying, 
00020 *  including reproducing, storing,  adapting or translating, any 
00021 *  or all of this material requires the prior written consent of 
00022 *  Nokia Corporation. This material also contains confidential 
00023 *  information which may not be disclosed to others without the 
00024 *  prior written consent of Nokia Corporation.
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: // from CCoeControl
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         // the following members are owned
00249 
00250         TAknDesCArrayDecorator iDecorator;
00251         CAknListBoxLayoutDecorator* iLayoutDecorator;
00252 
00253         // the following fields are reflected in the POPUP_SETTING_LIST resource structure
00254         TInt iFlags;
00255         HBufC* iOtherText;
00256         
00257         TInt iCurrentSelection;
00258         // elements to hold info regarding "new Item"- produced setting page
00259         TInt iNewItemSettingPageResourceId;
00260         TInt iNewItemEditorType;
00261         TInt iNewItemEditorControlResourceId;
00262 
00263         // the following members are not owned
00264         MAknQueryValue* iValue;
00265         MAknPopupSettingListObserver* iPopupSettingListObserver;
00266 
00267         //TInt iSpare_1;
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 // CoeControl Framework and reserved methods
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         // The objects pointed to or referenced by this is not owned
00443         MAknQueryValue& iQueryValue;
00444 
00445         TInt iSpare_1;
00446         TInt iSpare_2;
00447 
00448 };
00449 
00450 #endif 

Copyright © Nokia Corporation 2001-2007
Back to top