00001 /* 00002 * ============================================================================ 00003 * Name : AknRadioButtonSettingPage.h 00004 * Part of : Avkon 00005 * 00006 * Description: 00007 * Support for Radio Button setting page 00008 * Version: 00009 * 00010 * Copyright © 2002 Nokia Corporation. 00011 * This material, including documentation and any related 00012 * computer programs, is protected by copyright controlled by 00013 * Nokia Corporation. All rights are reserved. Copying, 00014 * including reproducing, storing, adapting or translating, any 00015 * or all of this material requires the prior written consent of 00016 * Nokia Corporation. This material also contains confidential 00017 * information which may not be disclosed to others without the 00018 * prior written consent of Nokia Corporation. 00019 * ============================================================================ 00020 */ 00021 00022 #ifndef __AKNRADIOBUTTONSETTINGPAGE_H__ 00023 #define __AKNRADIOBUTTONSETTINGPAGE_H__ 00024 00025 // For coecontrol 00026 #include <coecntrl.h> 00027 #include <eikdef.h> 00028 00029 #include <aknlistboxsettingpage.h> 00030 00035 class CAknRadioButtonSettingPage : public CAknListBoxSettingPage 00036 { 00037 public: 00038 IMPORT_C CAknRadioButtonSettingPage( 00039 TInt aResourceID, 00040 TInt& aCurrentSelectionIndex, 00041 const MDesCArray* aItemArray ); 00071 IMPORT_C CAknRadioButtonSettingPage( const TDesC* aSettingTitleText, 00072 TInt aSettingNumber, 00073 TInt aControlType, 00074 TInt aEditorResourceId, 00075 TInt aSettingPageResourceId, 00076 TInt& aCurrentSelectionIndex, 00077 const MDesCArray* aItemArray ); 00078 00083 IMPORT_C virtual void ConstructL(); 00084 00090 IMPORT_C CAknSetStyleListBox* ListBoxControl() const; 00091 00097 IMPORT_C virtual void HandleListBoxEventL(CEikListBox* aListBox, 00098 MEikListBoxObserver::TListBoxEvent aEventType); 00099 00107 IMPORT_C void SetItemArrayAndSelectionL( const MDesCArray* aItemArray, TInt aPushed ); 00108 00115 IMPORT_C void HandlePointerEventL(const TPointerEvent& aPointerEvent); 00116 00117 #start_since SINCE_3_1_SDK 00118 00121 IMPORT_C void HandleResourceChange(TInt aType); 00122 #end_since SINCE_3_1_SDK 00123 protected: 00127 IMPORT_C virtual ~CAknRadioButtonSettingPage(); 00128 00132 IMPORT_C virtual void UpdateSettingL(); 00133 00137 IMPORT_C void DynamicInitL(); 00138 00144 IMPORT_C virtual void SelectCurrentItemL(); 00145 00146 private: 00151 void SetRadioButtonSelectionL( TInt aPushed ); 00152 00157 void GenerateInternalArrayAndGiveToListBoxL(); 00158 00159 void InitialiseRadioButtonBitmapsL(); 00160 00161 // 00162 // CoeControl Framework and reserved methods 00163 // 00164 protected: 00165 00173 IMPORT_C virtual void WriteInternalStateL(RWriteStream& aWriteStream) const; 00174 00175 private: 00179 IMPORT_C virtual void Reserved_2(); 00180 00181 private: 00185 IMPORT_C void* ExtensionInterface( TUid aInterface ); 00186 00190 private: 00191 IMPORT_C virtual void CAknSettingPage_Reserved_1(); 00192 IMPORT_C virtual void CAknSettingPage_Reserved_2(); 00193 00194 private: 00199 IMPORT_C virtual void CAknListBoxSettingPage_Reserved_1(); 00200 00201 00202 private: 00203 // Back up copy of the selection index 00204 TInt iOldSelectionIndex; 00205 00206 // This CBase object is owned. Note that this depends upon the ownership flag given 00207 // to the CTextListBoxModel object 00208 CDesCArrayFlat* iInternalItemArray; 00209 00210 // The objects pointed to or referenced by these are not owned 00211 TInt& iCurrentSelectionIndex; 00212 const MDesCArray* iItemArray; 00213 00214 }; 00215 00216 #endif