epoc32/include/mw/aknsettingpage.h
branchSymbian2
changeset 2 2fe1408b6811
parent 1 666f914201fb
child 4 837f303aceeb
     1.1 --- a/epoc32/include/mw/aknsettingpage.h	Tue Nov 24 13:55:44 2009 +0000
     1.2 +++ b/epoc32/include/mw/aknsettingpage.h	Tue Mar 16 16:12:26 2010 +0000
     1.3 @@ -1,1 +1,805 @@
     1.4 -aknsettingpage.h
     1.5 +/*
     1.6 +* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
     1.7 +* All rights reserved.
     1.8 +* This component and the accompanying materials are made available
     1.9 +* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members
    1.10 +* which accompanies this distribution, and is available
    1.11 +* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
    1.12 +*
    1.13 +* Initial Contributors:
    1.14 +* Nokia Corporation - initial contribution.
    1.15 +*
    1.16 +* Contributors:
    1.17 +*
    1.18 +* Description: 
    1.19 +*  Base class for setting page (setting item editing) UI
    1.20 +*
    1.21 +*/
    1.22 +
    1.23 +
    1.24 +#ifndef __AKNSETTINGPAGE_H__
    1.25 +#define __AKNSETTINGPAGE_H__ 
    1.26 +
    1.27 +#include <AknControl.h>
    1.28 +
    1.29 +#include <eikdef.h>
    1.30 +#include <eikbtgpc.h>
    1.31 +
    1.32 +// For menu support
    1.33 +#include <eikmenub.h>
    1.34 +#include <eikmenup.h>
    1.35 +#include <eikmobs.h>
    1.36 +
    1.37 +// for layout support
    1.38 +#include <aknutils.h>
    1.39 +
    1.40 +// for navipane support (hint text)
    1.41 +#include <aknnavi.h>
    1.42 +
    1.43 +//
    1.44 +// Forward declarations
    1.45 +//
    1.46 +class CEikLabel;
    1.47 +class CAknSettingPageSkinsInfo;
    1.48 +class MAknsControlContext;
    1.49 +class CAknsFrameBackgroundControlContext;
    1.50 +class CAknSettingPageExtension;
    1.51 +
    1.52 +
    1.53 +// Used as the return value of SettingId() if not yet set.
    1.54 +// This because the Id might want to be the index of a 0-based array
    1.55 +
    1.56 +const TInt KAknSettingPageNoIdSet = -1;
    1.57 +
    1.58 +class CAknSettingPage;
    1.59 +
    1.60 +// This class is used as a means of notifying change in settings.
    1.61 +
    1.62 +class MAknSettingPageObserver 
    1.63 +{
    1.64 +public:
    1.65 +enum TAknSettingPageEvent
    1.66 +	{
    1.67 +	EEventSettingChanged,
    1.68 +	EEventSettingCancelled,
    1.69 +	EEventSettingOked
    1.70 +	};
    1.71 +public:
    1.72 +
    1.73 +/**
    1.74 + * Handles an event of type aEventType reported by the Setting Page to this observer.
    1.75 + */
    1.76 +virtual void HandleSettingPageEventL(CAknSettingPage* aSettingPage,TAknSettingPageEvent aEventType )=0;
    1.77 +
    1.78 +};
    1.79 +
    1.80 +class CAknSettingPage : public CAknControl, public MCoeControlObserver, public MEikMenuObserver
    1.81 +{
    1.82 +public:
    1.83 +
    1.84 +/**
    1.85 +* This enumeration is passed in the ExecuteLD() method to control how often the setting page 
    1.86 +* updates the externally held client object
    1.87 +*/
    1.88 +	enum TAknSettingPageUpdateMode
    1.89 +		{
    1.90 +		EUpdateWhenChanged,
    1.91 +		EUpdateWhenAccepted
    1.92 +		};
    1.93 +
    1.94 +/**
    1.95 +* This enumeration is used to select the type and IIDs for the various classes defined in the 
    1.96 +* Skins LAF spec for "Opened Setting Items"
    1.97 +*/
    1.98 +	enum TEditedItemSkinClass
    1.99 +		{
   1.100 +		ESettingPageSkinEditedItemClassValueItemList,
   1.101 +		ESettingPageSkinEditedItemClassVolume,
   1.102 +		ESettingPageSkinEditedItemClassSlider,
   1.103 +		ESettingPageSkinEditedItemClassTextEntry,
   1.104 +		ESettingPageSkinEditedItemClassCodeDateTimeEntry
   1.105 +		};
   1.106 +/**
   1.107 + * Simple contructor for using a single setting page resource which itself gives all 
   1.108 + * the setup
   1.109 + */
   1.110 +	IMPORT_C CAknSettingPage( TInt aSettingPageResourceId );
   1.111 + /**
   1.112 + * Constructor that allows separate setting page and editor resources
   1.113 + *
   1.114 + * In all cases the number (if supplied i.e. <> 0 ) is used.  
   1.115 + *
   1.116 + *		Editor Resource 	Setting Page Resource
   1.117 + *			present 			present 			Both are used (but text & number overridden)
   1.118 + *			 = 0				present 			Editor resource is used via SP resource
   1.119 + *			present 			= 0 				Default Avkon SP resource if used
   1.120 + *			 = 0				= 0 				Not permitted
   1.121 + *
   1.122 + * Note: The first argument is a TDesC* (rather than TDesC&) because the other constructor
   1.123 + * cannot initialize such a member without allocation or having an internal dummy buffer.
   1.124 + *
   1.125 + * Rules for text and numbers: The rules are the same for both:  (non-zero length) text or number other 
   1.126 + * than EAknSettingPageNoOrdinalDisplayed if given in this constructor will not override resource 
   1.127 + * (unless that is zero length or EAknSettingPageNoOrdinalDisplayed).  Note, however, that text or number given via the 
   1.128 + * specific API for setting them, WILL override resource.
   1.129 + * It is assumed that number from resource is very rare.  Special text is somewhat more likely.
   1.130 + * 
   1.131 + * @param aSettingTitleText		Text at top of setting pane (not copied; must be owned externally until ExecuteLD is called)
   1.132 + * @param aSettingNumber		Number at top left (if present)
   1.133 + * @param aControlType			Determines the type constructed and how its resource is read
   1.134 + * @param aEditorResourceId Editor resource to use in the setting page (if present)
   1.135 + * @param aSettingPageResourceId		Setting Page to use (if present)
   1.136 + */
   1.137 +	IMPORT_C CAknSettingPage(	const TDesC* aSettingTitleText, 
   1.138 +								TInt aSettingNumber, 
   1.139 +								TInt aControlType,
   1.140 +								TInt aEditorResourceId, 
   1.141 +								TInt aSettingPageResourceId = 0 );
   1.142 +/**
   1.143 +* C++ destructor
   1.144 +*/
   1.145 +	IMPORT_C virtual ~CAknSettingPage();
   1.146 +
   1.147 +/**
   1.148 + * Executes a waiting dialog-like setting page
   1.149 + * 
   1.150 + * The passed mode determines if the editor's value is updated continuously, or just
   1.151 + * when it is accepted.
   1.152 + * 
   1.153 + * @param	aMode		The update mode of the class
   1.154 + */
   1.155 +	IMPORT_C TBool ExecuteLD( enum CAknSettingPage::TAknSettingPageUpdateMode aMode=EUpdateWhenAccepted );
   1.156 +
   1.157 +/**
   1.158 + * public method for construction.	Only thing required to do in this class is to call the 
   1.159 + * BaseConstructL(). Derived classes may be required to do more
   1.160 + *
   1.161 + */
   1.162 +	IMPORT_C virtual void ConstructL();
   1.163 +
   1.164 +/**
   1.165 + * Returns reference to the hosted "editor" control as a CCoeControl.
   1.166 + * This routine is used in derived classes, which may then cast to the specific run-time type
   1.167 + * Note also that derived classes may provide type-specific access that performs these casts already
   1.168 + * 
   1.169 + * @return CCoeControl* pointer to the hosted editor control
   1.170 + */
   1.171 +	IMPORT_C CCoeControl* EditorControl() const;
   1.172 +
   1.173 +/**
   1.174 + * Returns the setting Id.
   1.175 + *
   1.176 + * @return TInt the setting Id
   1.177 + */
   1.178 +	IMPORT_C TInt SettingId() const;
   1.179 +
   1.180 +/**
   1.181 + * Sets the setting Id.  The Id may be used to unabiguously number a setting in some context.
   1.182 + * It would be useful to call SettingId() on aSettingPageControl in handling an observer
   1.183 + * callback.  The Id is not used internally.
   1.184 + *
   1.185 + * @param	aSettingId		An id to provide to the observer in the callback 
   1.186 + */
   1.187 +	IMPORT_C void SetSettingId( TInt aSettingId );
   1.188 +/**
   1.189 +* Substitutes the new setting number. 
   1.190 +*
   1.191 +* @param	aSettingNumber	The new setting number to display
   1.192 +*/
   1.193 +	IMPORT_C void SetSettingNumberL( const TInt aSettingNumber );
   1.194 +
   1.195 +/**
   1.196 + * Substitutes the new setting text.  Memory is allocated for a copy.
   1.197 + * If already constructed, the label is reformatted.  
   1.198 + * 
   1.199 + * Note that calling this will over-ride text in Setting Page resource
   1.200 + * 
   1.201 + * @param	aSettingText	The new setting text to display
   1.202 + */
   1.203 +	IMPORT_C void SetSettingTextL( const TDesC& aSettingText );
   1.204 +
   1.205 +/**
   1.206 + * Sets the observer for the setting page.
   1.207 + *
   1.208 + * @param	aObserver	The observer for changes to the setting
   1.209 + */
   1.210 +	IMPORT_C void SetSettingPageObserver( MAknSettingPageObserver* aObserver);
   1.211 +
   1.212 +/**
   1.213 + * Access method for the number of the setting page
   1.214 + *
   1.215 + */
   1.216 +	IMPORT_C TInt SettingNumber() const;
   1.217 +
   1.218 +/**
   1.219 + * Access method for whether the setting page is numbered or not
   1.220 + *
   1.221 + */
   1.222 +	IMPORT_C TBool IsNumbered() const;
   1.223 +
   1.224 +/**
   1.225 + * Set method for whether the setting page is numbered or not
   1.226 + *
   1.227 + */
   1.228 +	IMPORT_C void SetNumbered( TBool aNumbered );
   1.229 +
   1.230 +/**
   1.231 + * Reads the passed-in setting page resource in order to read the contained editor control
   1.232 + * resource information
   1.233 + * @param aSettingPageResoruceId	This is used to specifiy what resource to read
   1.234 + * @param aControlType				Returns the control type (MAY return 0 - that's a valid control type!
   1.235 + * @param aEditorResourceId 		Returns the setting page's LLINK editor resource, but returns 0 if not present
   1.236 + * 
   1.237 + * This will leave if an invalid resource ID is passed
   1.238 + */
   1.239 +	IMPORT_C static void GetEditorResourceInfoL( 
   1.240 +		TInt aSettingPageResourceId, 
   1.241 +		TInt& aControlType, 
   1.242 +		TInt& aEditorResourceId );
   1.243 + 
   1.244 + 
   1.245 + /**
   1.246 + * Set the edit-state of the setting page. The setting page can be edited or 
   1.247 + * it can be only viewed by the user.
   1.248 + *
   1.249 + * @since 3.1
   1.250 + * @param   aEditable If false, the setting page cannot be modified by the user
   1.251 + */
   1.252 + IMPORT_C void SetEditState(const TBool aEditable);
   1.253 + 
   1.254 + /**
   1.255 + * Is the setting page possible to edit by the user.
   1.256 + *
   1.257 + * @since 3.1
   1.258 + * @return  Can user modify the setting page. True if can, false if cannot.
   1.259 + */
   1.260 + IMPORT_C TBool IsEditable() const;
   1.261 + 
   1.262 + /**
   1.263 + * Used for aknsettingpage's extenstion corresponding function
   1.264 + *
   1.265 + * @since 5.0
   1.266 + * @param  aCaption On return, this should be set to the caption of the target control. 
   1.267 + */ 
   1.268 + void GetCaptionForFep(TDes& aCaption) const;
   1.269 + 
   1.270 +protected:
   1.271 +
   1.272 +/**
   1.273 +* From CCoeControl
   1.274 +* This routine is called as part of the set-up of the control.	It is the place to put
   1.275 +* layout code. 
   1.276 +*
   1.277 +*/
   1.278 +	IMPORT_C virtual void SizeChanged();
   1.279 +
   1.280 +
   1.281 +/**
   1.282 +* From CCoeControl
   1.283 +* Takes any action required when the control gains or loses focus e.g. to change its appearance.
   1.284 +* The control should be redrawn depending on the value of aDrawNow. Empty by default.
   1.285 +*/
   1.286 +	IMPORT_C virtual void FocusChanged(TDrawNow aDrawNow); 
   1.287 +	
   1.288 +/**
   1.289 + * From MEikCommandObserver
   1.290 + * Processes events from the softkeys. Responds to EAknSoftkeyOk and EAknSoftkeyBack
   1.291 + * to accept or cancel the pop-up.
   1.292 + *
   1.293 + * @param	aCommandId	Event Id from the soft-key
   1.294 + */
   1.295 +	IMPORT_C virtual void ProcessCommandL(TInt aCommandId);
   1.296 +
   1.297 +/**
   1.298 + * From MCoeControlObserver:
   1.299 + * Acts upon changes in the hosted control's state. 
   1.300 + * 
   1.301 + * This class's implementation is trivial and should be able to be
   1.302 + * safely re-implemented in directly client-derived classes. 
   1.303 + * For non-base setting page classes, a call to the base class should be made
   1.304 + *
   1.305 + * @param	aControl	The control changing its state (not used)
   1.306 + * @param	aEventType	The type of control event 
   1.307 + */
   1.308 +	IMPORT_C virtual void HandleControlEventL(CCoeControl* aControl,TCoeEvent aEventType);
   1.309 +
   1.310 +//
   1.311 +//
   1.312 +// Framework functions. New in this class
   1.313 +//
   1.314 +//
   1.315 +	/**
   1.316 +	* Framework method to determine if it is OK to exit the setting page.
   1.317 +	* Derived classes may check for valid data before allowing the dismissal of the 
   1.318 +	* setting page.
   1.319 +	*
   1.320 +	* @param	aAccept ETrue if the user has indicated to accept the setting page; EFalse otherwise
   1.321 +	* @return	TBool	a value indicating whether the setting page should be dismissed
   1.322 +	*/
   1.323 +	IMPORT_C virtual TBool OkToExitL(TBool aAccept);
   1.324 +	
   1.325 +/**
   1.326 +* Called immediately prior to activation of the dialog.  Framework routine for derived
   1.327 +* classes.
   1.328 +*
   1.329 +*/
   1.330 +	IMPORT_C virtual void DynamicInitL();
   1.331 +
   1.332 +/**
   1.333 + * Called when something has changed and the client's object needs to have its value updated
   1.334 + *
   1.335 + */
   1.336 +	IMPORT_C virtual void UpdateSettingL();
   1.337 +
   1.338 +/**
   1.339 + * Called when the user accepts a setting and the setting page is about to be dismissed.  The latest value of the
   1.340 + * setting is written to the client's object
   1.341 + */
   1.342 +	IMPORT_C virtual void AcceptSettingL();
   1.343 +
   1.344 +/**
   1.345 + * Called when the user rejects the setting.  A backup copy may need to be restored if UpdateWhenChanged flag was set
   1.346 + *
   1.347 + */
   1.348 +	IMPORT_C virtual void RestoreOriginalSettingL();
   1.349 +
   1.350 +/** 
   1.351 + * Display the menu
   1.352 + */
   1.353 +	IMPORT_C virtual void DisplayMenuL() ;
   1.354 +
   1.355 +/**
   1.356 + * Hide the menu
   1.357 + */
   1.358 +	IMPORT_C virtual void HideMenu() ;
   1.359 +
   1.360 +/** 
   1.361 + * Puts the focus back on the editor. For complicated setting pages that have focus removed from them
   1.362 + * at some point, then a re-implementation may have to do some work here.
   1.363 + */
   1.364 +	IMPORT_C virtual void SetFocusToEditor();
   1.365 +
   1.366 +/**
   1.367 + * This method should be implemented in listbox classes to move the selection in 
   1.368 + * listbox editors prior to exiting from the setting page. It is called on a 
   1.369 + * CAknSettingPage* reference, and is therefore declared here.
   1.370 + */
   1.371 +	IMPORT_C virtual void SelectCurrentItemL();
   1.372 +
   1.373 +/**
   1.374 + * Protected non-virtual base method for construction.	Only thing required to do in this class is 
   1.375 + * call the ConstructFromResourceL routine and set the flag that says construction has occured
   1.376 + *
   1.377 + */
   1.378 +	IMPORT_C void BaseConstructL();
   1.379 +
   1.380 +/**
   1.381 + * Called to remove the setting page. Should not be called except from within re-implemented
   1.382 + * AttemptExitL
   1.383 + *
   1.384 + * @param	aAccept ETrue to accept the current value; EFalse otherwise
   1.385 + */
   1.386 +	IMPORT_C void DismissL( TBool aAccept );  
   1.387 +
   1.388 +/**
   1.389 + * This is used as a protected access function for the state of the menu bar
   1.390 + *
   1.391 + * @return TBool	ETrue if the menu is currently showing 
   1.392 + */
   1.393 +	IMPORT_C TBool MenuShowing() const ;
   1.394 +
   1.395 +/** 
   1.396 +* This constructs the control based upon the id passed
   1.397 +*
   1.398 +*/
   1.399 +	IMPORT_C void ConstructFromResourceL( TInt aResourceId);
   1.400 +
   1.401 +/** 
   1.402 +* This constructs the control based upon a constructed and positioned reader
   1.403 +*
   1.404 +*/
   1.405 +	IMPORT_C void ConstructFromResourceL(TResourceReader& aRes);
   1.406 +
   1.407 + /**
   1.408 + * Called when the user accepts or cancels the setting. Default implementation
   1.409 + * sets the return value and exists. 
   1.410 + * 
   1.411 + * Re-implementations must call DismissL and StopActiveScheduler() if the setting is
   1.412 + * to leave.
   1.413 + *
   1.414 + * @param	aAccept ETrue if the user accepted. EFalse if the user cancelled.
   1.415 + */
   1.416 +	IMPORT_C void AttemptExitL(TBool aAccept);
   1.417 +/**
   1.418 +* Method to determine the current running state of the setting page's 
   1.419 +* ActiveScheduler level. 
   1.420 +*
   1.421 +* @return	EFalse only if the CActiveSheduler level is not running
   1.422 +*/
   1.423 +	IMPORT_C TBool Waiting(); 
   1.424 +
   1.425 +/**
   1.426 +* Access method to the Command button array
   1.427 +*
   1.428 +* Must be called after full construction, or null reference will be returned.
   1.429 +*
   1.430 +* @return CEikButtonGroupContainer* a pointer to the cba owned by the setting page
   1.431 +*/
   1.432 +	IMPORT_C CEikButtonGroupContainer* Cba() const ;
   1.433 +
   1.434 +/**
   1.435 + * This is used to access the default resource id for the cba - the one used when 
   1.436 + * data is valid.
   1.437 + *
   1.438 + * @return TInt 	the default resource Id 
   1.439 + */
   1.440 +	IMPORT_C TInt DefaultCbaResourceId() const; 
   1.441 +
   1.442 +/** 
   1.443 +* This routine routes the keys to the editor. 
   1.444 +* However, if the menu is showing, then events are sent to the menu. 
   1.445 +*
   1.446 +* @param	aKeyEvent	event information	
   1.447 +* @param	aType		type of event being handled
   1.448 +*
   1.449 +*/
   1.450 +	IMPORT_C TKeyResponse OfferKeyEventL( const TKeyEvent& aKeyEvent, TEventCode aType);
   1.451 +
   1.452 +/**
   1.453 +* This routine is the base layout for CAknSettingPage. It lays out the labels and configures
   1.454 +* the drawing in general.
   1.455 +*/	
   1.456 +	IMPORT_C void StandardSettingPageLayout();
   1.457 +
   1.458 +/**
   1.459 + * This method can be used to test if BaseConstructL() has been called yet
   1.460 + * successfully
   1.461 + *
   1.462 + * @return TBool	ETrue if BaseContructL has been called (and not left)
   1.463 + */
   1.464 +	IMPORT_C TBool IsBaseConstructed();
   1.465 +
   1.466 +/**
   1.467 + * Access method for the internally held resource Id
   1.468 + *
   1.469 + */
   1.470 +	IMPORT_C TInt SettingPageResourceId();
   1.471 +/** 
   1.472 +* Perform the drawing of coded within CAknSettingPage
   1.473 +* 
   1.474 +*/
   1.475 +	IMPORT_C void BaseDraw(const TRect& aRect) const;
   1.476 +
   1.477 +/**
   1.478 +* Set default construction values of internal state
   1.479 +*/
   1.480 +	IMPORT_C void ResetFlags();
   1.481 +
   1.482 +/**
   1.483 + * Framework method called as soon as the setting page is displayed, but before the new active sheduler level
   1.484 + * is started.	Returning EFalse will dismiss the setting page right away
   1.485 + *
   1.486 + * @return TBool	ETrue if the setting page is to continue
   1.487 + */
   1.488 +	IMPORT_C virtual TBool PostDisplayCheckL();
   1.489 +
   1.490 +/** 
   1.491 + * This framework method is used to update the contents of the CBA in a custom way.
   1.492 + * Some setting page classes implement a degree of validation and will implement this.
   1.493 + * Derived classes should ensure that this is being called frequently enough for their
   1.494 + * purposes.
   1.495 + */
   1.496 +	IMPORT_C virtual void UpdateCbaL();
   1.497 +
   1.498 +/**
   1.499 + * Called to access the validity state of the data
   1.500 + *
   1.501 + * @return TBool ETRrue if the data is valid
   1.502 + */
   1.503 +	IMPORT_C TBool DataValidity() const;
   1.504 +
   1.505 +/**
   1.506 + * used to set the validity of the data
   1.507 + *
   1.508 + * @param TBool aValid	Sets the validity true or false
   1.509 + */
   1.510 +	IMPORT_C void SetDataValidity(TBool aValid);
   1.511 +
   1.512 +/**
   1.513 + * Framework method to set the validity of the data
   1.514 + * This is called when the data changes.
   1.515 + *
   1.516 + */
   1.517 +	IMPORT_C virtual void CheckAndSetDataValidity();
   1.518 +
   1.519 +/**
   1.520 + * Method to be called by CAknSettingPage descendents when they have laid themselves out.
   1.521 + * This tells the base class how big the layout spec rectangle hosting the editor is.  
   1.522 + * The second rectangle is the size of the area that the base class does not have to 
   1.523 + * draw to for skins. Usually, this is the area actually inhabited by the editor control.
   1.524 + *
   1.525 + * Coordinates are to be given in pixels relative to the main_pane. 
   1.526 + *
   1.527 + * @param aFrameRect		Layout rectangle in which to host the editor. 
   1.528 + * @param aRealEditorRect	Layout rectangle actually occupied by the editor control
   1.529 + *
   1.530 + * @since 2.0
   1.531 + */
   1.532 +	void SetEditedItemLayoutRect( const TRect& aFrameRect, const TRect& aRealEditorRect);
   1.533 +
   1.534 + /**
   1.535 + * Method to cause this class to construct a control context or type and IID, selected according to
   1.536 + * the value of enumeration TEditedItemSkinClass, set its coordinate system 
   1.537 + *
   1.538 + * This must be called after a call to SetEditedItemLayoutRect has been made on CAknSettingPage.
   1.539 + * This is becasue this routine must set the control context's origin to the top left of the value 
   1.540 + * given to SetEditedItemLayoutRect. Since SetEditeItemLayoutRect is to be called in a SizeChanged 
   1.541 + * method, this means that the this should be called after the SizeChanged in the child class.
   1.542 +
   1.543 + * @param	aClass	enumeration specifying which class of editor (according to LAF spec) is being
   1.544 + * constructed.
   1.545 + * @param	aParentAbsolute	ETrue if there is an intervening Window between CAknSettingPage's window
   1.546 + * and any control that is to draw skin items with this component.
   1.547 + *
   1.548 + * since 2.0
   1.549 + * 
   1.550 + */
   1.551 +	void CreateEditedItemControlContextL( TEditedItemSkinClass aSkinClass, TBool aParentAbsolute);
   1.552 +
   1.553 + /**
   1.554 + * Indicates whether skin system will be able to draw the editor frame and background
   1.555 + *
   1.556 + * @return TBool ETrue iff the drawing of the edited item frame is going to be handled by
   1.557 + *					the base CAknSettingPage class itself using Skins
   1.558 + * @since 2.0
   1.559 + */
   1.560 +	TBool IsSkinsHandlingEditorFrameDrawing() const;
   1.561 +
   1.562 + /**
   1.563 + * Control context for providing to the skinning for the hosted editor and its framing
   1.564 + *
   1.565 + * @return      A valid control context for frame drawing for a hosted editor or NULL
   1.566 + * @since 2.0
   1.567 + */ 
   1.568 +    CAknsFrameBackgroundControlContext* EditedItemControlContext() const;
   1.569 +
   1.570 +
   1.571 +protected:
   1.572 + /**
   1.573 + * From MEikMenuObserver 
   1.574 + * Called when menu is cancelled.
   1.575 + */
   1.576 +	IMPORT_C virtual void SetEmphasis(CCoeControl* /*aMenuControl*/,TBool aEmphasis);
   1.577 +
   1.578 + /**
   1.579 + * From MEikMenuObserver 
   1.580 + * This function intializes the items on the menu. It is used to disable and enable menu items and may be
   1.581 + * over ridden to add new ones.
   1.582 + * In addition it adds menu items which have been provided in the ConstructL in the form of a Menu Bar resource.
   1.583 + * Instead of using the Menu Bar directly it extracts the menu panes and adds them to its own menu pane.
   1.584 + * It must be called in the DynInitMenuPaneL() function of any derived class before anything else.
   1.585 + */
   1.586 +	IMPORT_C virtual void DynInitMenuPaneL( TInt aResourceId, CEikMenuPane* aMenuPane ); 
   1.587 +
   1.588 +public: // From CCoeControl
   1.589 + /**
   1.590 + * Handles a change to the control's resources of type aType
   1.591 + * which are shared across the environment, e.g. colors or fonts.
   1.592 + *
   1.593 + * @since 2.0
   1.594 + * @param aType  Reason for the "resource" change, usually an system event UID
   1.595 + */
   1.596 +    IMPORT_C void HandleResourceChange(TInt aType);
   1.597 +/**
   1.598 + * Standard CCoeControl routine to return the number of componentn controls
   1.599 + *
   1.600 + * @param	aIndex	index at which to return control
   1.601 + */
   1.602 +	IMPORT_C TInt CountComponentControls() const;
   1.603 +
   1.604 +/**
   1.605 + * Standard CCoeControl routine to return the control at a given index
   1.606 + *
   1.607 + * @param	aIndex	index at which to return control
   1.608 + */ 
   1.609 +
   1.610 +	IMPORT_C CCoeControl* ComponentControl(TInt anIndex) const;
   1.611 +
   1.612 + /**
   1.613 + * Handles pointer events
   1.614 + */
   1.615 +    IMPORT_C void HandlePointerEventL(const TPointerEvent& aPointerEvent);
   1.616 + /**
   1.617 + * From CCoeControl.
   1.618 + * Gets the control's input capabilities.
   1.619 + *
   1.620 + * @return The control's input capabilities.
   1.621 + */   
   1.622 +	IMPORT_C TCoeInputCapabilities InputCapabilities() const;
   1.623 +	
   1.624 +private:
   1.625 +	IMPORT_C virtual void Reserved_MtsmPosition();
   1.626 +	IMPORT_C virtual void Reserved_MtsmObject();
   1.627 +
   1.628 +protected:
   1.629 +/** 
   1.630 +*	Access method for the softkey resource used when there is invalid data
   1.631 +*
   1.632 +* @return TInt The resource Id of the softkey bindings. 
   1.633 +*/
   1.634 +	IMPORT_C TInt InvalidDataCbaResourceId() const; 
   1.635 +
   1.636 +protected: // from MObjectProvider
   1.637 +	IMPORT_C TTypeUid::Ptr MopSupplyObject(TTypeUid aId);
   1.638 +
   1.639 +protected:
   1.640 +	/**
   1.641 +	* Hold the update mode passed in the constructor
   1.642 +	*/
   1.643 +	TInt iUpdateMode;
   1.644 +
   1.645 +	// The following are not owned:
   1.646 +
   1.647 +	/**
   1.648 +	* Pointer to setting page observer; may be NULL
   1.649 +	*/
   1.650 +	MAknSettingPageObserver* iSettingPageObserver;
   1.651 +
   1.652 +private:
   1.653 +	//From CCoeControl
   1.654 +	IMPORT_C void Draw(const TRect& aRect) const;
   1.655 +	
   1.656 +private:
   1.657 +    /**
   1.658 +    * From CAknControl
   1.659 +    */
   1.660 +    IMPORT_C void* ExtensionInterface( TUid aInterface );
   1.661 +
   1.662 +protected:
   1.663 +
   1.664 +/**
   1.665 + * Writes the internal state of the control and its components to aStream.
   1.666 + * Does nothing in release mode.
   1.667 + * Designed to be overidden and base called by subclasses.
   1.668 + *
   1.669 + * @param	aWriteSteam		A connected write stream
   1.670 + */	
   1.671 +	IMPORT_C virtual void WriteInternalStateL(RWriteStream& aWriteStream) const;
   1.672 +
   1.673 +private:
   1.674 +/**
   1.675 +*	Reserved method derived from CCoeControl
   1.676 +*/
   1.677 +	IMPORT_C virtual void Reserved_2();
   1.678 +
   1.679 + /** 
   1.680 + * Activate another level on the active scheduler
   1.681 + */ 
   1.682 +	void StartActiveScheduler();
   1.683 + /** 
   1.684 + * Stop current (additional) level on the active scheduler
   1.685 + */ 
   1.686 +	void StopActiveScheduler();
   1.687 +
   1.688 +/**
   1.689 +* Pop the navidecorator. The iNaviPane is used as a flag to show if popping is required to 
   1.690 +* be done or not. It is zeroed by this method.
   1.691 +*
   1.692 +*/
   1.693 +	void PopNaviDecoratorIfRequired();
   1.694 +
   1.695 +private:
   1.696 +
   1.697 +/**
   1.698 +* New reserved methods for CAknSettingPage hierarchy
   1.699 +*/ 
   1.700 +private: 
   1.701 +	IMPORT_C virtual void CAknSettingPage_Reserved_1();
   1.702 +	IMPORT_C virtual void CAknSettingPage_Reserved_2();
   1.703 +
   1.704 +protected:
   1.705 +    /**
   1.706 +    * Enables / disables transparency effect, i.e. does the setting page draw its own background or not.
   1.707 +    * @param aDrawBackground  EFalse enables transparency
   1.708 +    */ 
   1.709 +    void SetDrawBackground(const TBool aDrawBackground);    
   1.710 +
   1.711 +    /**
   1.712 +    * Is the setting page drawing the background itself or not (= "transparency")
   1.713 +    */ 
   1.714 +    TBool IsBackgroundDrawingEnabled() const;
   1.715 +    /**
   1.716 +    * Set the flag to indicate that if the function CAknSettingPage::StopActiveScheduler called or not
   1.717 +    *@param aStopCalled ETrue means the StopActiveScheduler is called.
   1.718 +    */
   1.719 +    void SetStopActiveSchedulerFlag(const TBool aStopCalled );
   1.720 +
   1.721 +    /**
   1.722 +     * Is the setting page call the StopActiveScheduler or not 
   1.723 +     */ 
   1.724 +    TBool IsStopActiveSchudlerCalled()const;
   1.725 +
   1.726 +    /**
   1.727 +    * Pointer to setting text label
   1.728 +    * @return pointer to the label
   1.729 +    *
   1.730 +	* @since 5.0
   1.731 +    */    
   1.732 +    IMPORT_C CEikLabel* TextLabel() const;
   1.733 +    
   1.734 +    /**
   1.735 +    * Pointer to shadow text label
   1.736 +    * @return pointer to the label
   1.737 +    *
   1.738 +	* @since 5.0
   1.739 +    */    
   1.740 +    IMPORT_C CEikLabel* ShadowText() const;
   1.741 +
   1.742 +private:
   1.743 +/** 
   1.744 +* This member points to the setting title text that is passed as part of its more complicated constructor.
   1.745 +* The descriptor pointed to is not owned, and therefor must be preserved in the client, at least until the 
   1.746 +* 2nd stage construction is performed (inside ExecuteLD). 
   1.747 +*
   1.748 +* Since, however, setting pages are all waiting, the descriptor can usually be on the stack in the client.
   1.749 +*
   1.750 +*/
   1.751 +	const TDesC* iSettingTextFromConstructor;
   1.752 +	TInt iResourceId;
   1.753 +
   1.754 +	TInt iSettingNumber;
   1.755 +	TInt iSettingId;
   1.756 +	TInt iMenuBarId;
   1.757 +	TInt iControlType;
   1.758 +	TInt iEditorResourceId;
   1.759 +	TInt iExtensionId;
   1.760 +	TInt iCbaResourceId;
   1.761 +
   1.762 +	TAknLayoutRect iShadow;
   1.763 +	TAknLayoutRect iHighlight;
   1.764 +
   1.765 +// pointer to the return value from the setting page.  
   1.766 +// Needed when presented in waiting mode.  
   1.767 +	TBool* iReturn; 
   1.768 +	
   1.769 +// Internal flags
   1.770 +	TBitFlags iFlags ;
   1.771 +
   1.772 +	enum TFlagIndices
   1.773 +		{
   1.774 +		EMenuShowingIndex = 0,
   1.775 +		ENumberedStyleIndex,
   1.776 +		EIsBaseConstructedIndex,
   1.777 +		EHasValidDataIndex
   1.778 +		};
   1.779 +
   1.780 +// Heap objects pointed to here are owned:
   1.781 +	CCoeControl* iEditorControl;
   1.782 +	CEikLabel* iNumberLabel;
   1.783 +	CEikLabel* iTextLabel;
   1.784 +	CEikButtonGroupContainer* iCba;
   1.785 +	CEikMenuBar* iMenuBar ;
   1.786 +	HBufC* iHintText;
   1.787 +	HBufC* iSettingText; 
   1.788 +	CAknNavigationDecorator* iNaviDecorator;
   1.789 +
   1.790 +	// The following are not owned:
   1.791 +	// For hint text support
   1.792 +	CAknNavigationControlContainer* iNaviPane;
   1.793 +
   1.794 +	// Softkey resource when the data is invalid
   1.795 +	TInt iInvalidDataCbaResourceId;
   1.796 +	
   1.797 +	// The following object is used to contain all skinning information required
   1.798 +	CAknSettingPageSkinsInfo* iSkinsInfo;
   1.799 +
   1.800 +	CActiveSchedulerWait iWait;		// owned, safe to use as direct member data.
   1.801 +
   1.802 +    // is setting page editable
   1.803 +    TInt iIsProtected;
   1.804 +    
   1.805 +    // extension to setting page
   1.806 +    CAknSettingPageExtension* iExtension;
   1.807 +};
   1.808 +
   1.809 +#endif