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 
00045 class MAknPopupSettingListObserver
00046         {
00047 public:
00051         enum TAknPopupSettingListEvent
00052                 {
00053                 EAknPopupSettingSelectionAndRequestAccept,
00054                 EAknPopupSettingSelectionAndStayOpen,
00055                 EAknPopupSettingSelectionAndClose
00056                 };
00057 public:
00070         virtual void HandlePopupSettingListEventL(      CAknPopupSettingList* aPopupSettingList, 
00071                                                                                                 TAknPopupSettingListEvent aEventType, 
00072                                                                                                 TInt aHint)=0;
00073         };
00074 
00079 class CAknPopupSettingList :
00080         public CAknSetStyleListBox,
00081         public MEikListBoxObserver
00082         {
00083 
00084 protected:
00085 
00086 
00087 public:
00091         IMPORT_C CAknPopupSettingList();
00092 
00097         IMPORT_C ~CAknPopupSettingList();
00098 
00103         IMPORT_C void ConstructL();
00104 
00111         IMPORT_C void SetAllowsUserDefinedEntry(TBool aAllows);
00112 
00113 
00121         IMPORT_C void SetQueryValueL(MAknQueryValue* aValue);
00122 
00123 
00133         IMPORT_C void SetShowIndicators(TBool aShowIndicators);
00134 
00143         IMPORT_C TInt NumLines() const;
00144 
00151         IMPORT_C void SetPopupSettingListObserver(MAknPopupSettingListObserver* aObserver);
00152 
00153 public: 
00159         IMPORT_C void ConstructFromResourceL(TResourceReader& aReader);
00160 
00161 protected:
00162 
00167         IMPORT_C void CreateMenuListL();
00168 
00175         IMPORT_C void ActivateMenuListL();
00176 
00182         IMPORT_C void ConfigureMenuListL();
00183 
00188         IMPORT_C void DestroyMenuList();
00189 
00190 public:
00195     IMPORT_C void HandlePointerEventL( const TPointerEvent& aPointerEvent );
00196     
00197     IMPORT_C void HandleResourceChange(TInt aType);
00198 
00199 private:
00203     IMPORT_C void* ExtensionInterface( TUid aInterface );
00204 
00205 protected: 
00219         IMPORT_C void HandleListBoxEventL(CEikListBox* aListBox, TListBoxEvent aEventType);
00220 
00221 private: // from CCoeControl
00222         IMPORT_C void Reserved_1();
00223         IMPORT_C void Reserved_2();
00224 private: 
00225         void CommonConstructL();
00226         void SetUpSelectionListL();
00231         void InitialiseRadioButtonBitmapsL();
00232 private: 
00238         void ConfigureDecorator();
00244         void ConstructLayoutDecoratorL();
00245 
00246 private:
00247         // the following members are owned
00248 
00249         TAknDesCArrayDecorator iDecorator;
00250         CAknListBoxLayoutDecorator* iLayoutDecorator;
00251 
00252         // the following fields are reflected in the POPUP_SETTING_LIST resource structure
00253         TInt iFlags;
00254         HBufC* iOtherText;
00255         
00256         TInt iCurrentSelection;
00257         // elements to hold info regarding "new Item"- produced setting page
00258         TInt iNewItemSettingPageResourceId;
00259         TInt iNewItemEditorType;
00260         TInt iNewItemEditorControlResourceId;
00261 
00262         // the following members are not owned
00263         MAknQueryValue* iValue;
00264         MAknPopupSettingListObserver* iPopupSettingListObserver;
00265 
00266         TInt iSpare_1;
00267 
00268         };
00269 
00270 
00276 class CAknPopupSettingPage : 
00277         public CAknListBoxSettingPage, 
00278         public MAknPopupSettingListObserver
00279         {
00280 
00281 public:
00289         IMPORT_C CAknPopupSettingPage(TInt aResourceID, MAknQueryValue& aQueryValue );
00290 
00322         IMPORT_C CAknPopupSettingPage(  const TDesC* aSettingTitleText, 
00323                                                                 TInt aSettingNumber, 
00324                                                                 TInt aControlType,
00325                                                                 TInt aEditorResourceId, 
00326                                                                 TInt aSettingPageResourceId,
00327                                                                 MAknQueryValue& aQueryValue);
00328 
00334         IMPORT_C virtual void ConstructL();
00335 
00341         IMPORT_C CAknSetStyleListBox* ListBoxControl() const;
00342 
00348         IMPORT_C CAknPopupSettingList* PopupSettingListBox() const;
00349 
00360         IMPORT_C virtual void HandlePopupSettingListEventL(CAknPopupSettingList* aPopupSettingList, 
00361                 TAknPopupSettingListEvent aEventType, TInt aHint);
00362 
00371         IMPORT_C void UpdateQueryValueL( MAknQueryValue* aQueryValue );
00372 
00376     IMPORT_C void HandlePointerEventL(const TPointerEvent& aPointerEvent);
00377     
00378 protected:
00382         IMPORT_C virtual ~CAknPopupSettingPage();
00383 
00391         IMPORT_C MAknQueryValue* QueryValue() const;
00392 
00398         IMPORT_C virtual void SelectCurrentItemL();
00399 
00400 //
00401 // CoeControl Framework and reserved methods
00402 //
00403 protected:
00404 
00412         IMPORT_C virtual void WriteInternalStateL(RWriteStream& aWriteStream) const;
00413 
00417         IMPORT_C virtual void Reserved_2();
00418 
00419 private:
00423     IMPORT_C void* ExtensionInterface( TUid aInterface );
00424 
00428 private: 
00429         IMPORT_C virtual void CAknSettingPage_Reserved_1();
00430         IMPORT_C virtual void CAknSettingPage_Reserved_2();
00431 
00432 private:
00437         IMPORT_C virtual void CAknListBoxSettingPage_Reserved_1();
00438 
00439 private:
00440 
00441         // The objects pointed to or referenced by this is not owned
00442         MAknQueryValue& iQueryValue;
00443 
00444         TInt iSpare_1;
00445         TInt iSpare_2;
00446 
00447 };
00448 
00449 #endif

Copyright © Nokia Corporation 2001-2008
Back to top