S60 3rd Edition API Reference: aknpopupsettingpage.h Source File

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 #start_since SINCE_3_1_SDK
00198 
00201     IMPORT_C void HandleResourceChange(TInt aType);
00202 #end_since SINCE_3_1_SDK
00203 private:
00207     IMPORT_C void* ExtensionInterface( TUid aInterface );
00208 
00209 protected: 
00223         IMPORT_C void HandleListBoxEventL(CEikListBox* aListBox, TListBoxEvent aEventType);
00224 
00225 private: // from CCoeControl
00226         IMPORT_C void Reserved_1();
00227         IMPORT_C void Reserved_2();
00228 private: 
00229         void CommonConstructL();
00230         void SetUpSelectionListL();
00235         void InitialiseRadioButtonBitmapsL();
00236 private: 
00242         void ConfigureDecorator();
00248         void ConstructLayoutDecoratorL();
00249 
00250 private:
00251         // the following members are owned
00252 
00253         TAknDesCArrayDecorator iDecorator;
00254         CAknListBoxLayoutDecorator* iLayoutDecorator;
00255 
00256         // the following fields are reflected in the POPUP_SETTING_LIST resource structure
00257         TInt iFlags;
00258         HBufC* iOtherText;
00259         
00260         TInt iCurrentSelection;
00261         // elements to hold info regarding "new Item"- produced setting page
00262         TInt iNewItemSettingPageResourceId;
00263         TInt iNewItemEditorType;
00264         TInt iNewItemEditorControlResourceId;
00265 
00266         // the following members are not owned
00267         MAknQueryValue* iValue;
00268         MAknPopupSettingListObserver* iPopupSettingListObserver;
00269 
00270         TInt iSpare_1;
00271 
00272         };
00273 
00274 
00280 class CAknPopupSettingPage : 
00281         public CAknListBoxSettingPage, 
00282         public MAknPopupSettingListObserver
00283         {
00284 
00285 public:
00293         IMPORT_C CAknPopupSettingPage(TInt aResourceID, MAknQueryValue& aQueryValue );
00294 
00326         IMPORT_C CAknPopupSettingPage(  const TDesC* aSettingTitleText, 
00327                                                                 TInt aSettingNumber, 
00328                                                                 TInt aControlType,
00329                                                                 TInt aEditorResourceId, 
00330                                                                 TInt aSettingPageResourceId,
00331                                                                 MAknQueryValue& aQueryValue);
00332 
00338         IMPORT_C virtual void ConstructL();
00339 
00345         IMPORT_C CAknSetStyleListBox* ListBoxControl() const;
00346 
00352         IMPORT_C CAknPopupSettingList* PopupSettingListBox() const;
00353 
00364         IMPORT_C virtual void HandlePopupSettingListEventL(CAknPopupSettingList* aPopupSettingList, 
00365                 TAknPopupSettingListEvent aEventType, TInt aHint);
00366 
00375         IMPORT_C void UpdateQueryValueL( MAknQueryValue* aQueryValue );
00376 
00380     IMPORT_C void HandlePointerEventL(const TPointerEvent& aPointerEvent);
00381     
00382 protected:
00386         IMPORT_C virtual ~CAknPopupSettingPage();
00387 
00395         IMPORT_C MAknQueryValue* QueryValue() const;
00396 
00402         IMPORT_C virtual void SelectCurrentItemL();
00403 
00404 //
00405 // CoeControl Framework and reserved methods
00406 //
00407 protected:
00408 
00416         IMPORT_C virtual void WriteInternalStateL(RWriteStream& aWriteStream) const;
00417 
00421         IMPORT_C virtual void Reserved_2();
00422 
00423 private:
00427     IMPORT_C void* ExtensionInterface( TUid aInterface );
00428 
00432 private: 
00433         IMPORT_C virtual void CAknSettingPage_Reserved_1();
00434         IMPORT_C virtual void CAknSettingPage_Reserved_2();
00435 
00436 private:
00441         IMPORT_C virtual void CAknListBoxSettingPage_Reserved_1();
00442 
00443 private:
00444 
00445         // The objects pointed to or referenced by this is not owned
00446         MAknQueryValue& iQueryValue;
00447 
00448         TInt iSpare_1;
00449         TInt iSpare_2;
00450 
00451 };
00452 
00453 #endif

Copyright © Nokia Corporation 2001-2007
Back to top