2 * Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
 
     4 * This component and the accompanying materials are made available
 
     5 * under the terms of "Eclipse Public License v1.0"
 
     6 * which accompanies this distribution, and is available
 
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
 
     9 * Initial Contributors:
 
    10 * Nokia Corporation - initial contribution.
 
    14 * Description:  Slider Setting Page
 
    19 #ifndef __AKNSLIDERSETTINGPAGE__
 
    20 #define __AKNSLIDERSETTINGPAGE__ 
 
    27 #include <aknslider.h>
 
    28 #include <aknsettingpage.h>
 
    30 class CAknSliderSettingPage : public CAknSettingPage
 
    34 	 * Simple constructor depending only on a single resource Id. Editor resource is given via
 
    35 	 * the link in the setting page resource.
 
    37 	 * @param aSettingPageResourceId		Setting Page to use (if present)
 
    38 	 * @param aSliderValue					ref. to external slider value
 
    40 	IMPORT_C CAknSliderSettingPage(TInt aResourceID, TInt& aSliderValue);
 
    43 	 * Constructor that allows separate setting page and editor resources
 
    45 	 * This constructor allows the use of setting page using only the editor resource.  Other combinations are also possible
 
    47 	 * In all cases the number (if supplied i.e. <> 0 ) is used.  
 
    49 	 *		Editor Resource		Setting Page Resource
 
    50 	 *			present				present				Both are used (but text & number overridden)
 
    51 	 *			 = 0					present				Editor resource is used via SP resource (Effectively like the other constructor)
 
    52 	 *			present				= 0					Default Avkon SP resource if used + this editor resource
 
    53 	 *			 = 0					= 0					uses default resource for both SP and editor. This is OK if:
 
    54 	 *	 i) control type is present, 
 
    55 	 *  ii) a default resource exists ( OK for text, integer, date, time, duration )
 
    57 	 * Note: THe first argument is a TDesC* (rather than TDesC&) because the other constructor
 
    58 	 * cannot initialize such a member without allocation or having an internal dummy buffer.
 
    60 	 * Rules for text and numbers: The rules are the same for both:  (non-zero length) text or number other 
 
    61 	 * than EAknSettingPageNoOrdinalDisplayed if given in this constructor will not override resource 
 
    62 	 * (unless that is zero length or EAknSettingPageNoOrdinalDisplayed).  Note, however, that text or number given via the 
 
    63 	 * specific API for setting them, WILL override resource.
 
    64 	 * It is assumed that number from resource is very rare.  Special text is somewhat more likely.
 
    67 	 * @param aSettingTitleText		Text at top of setting pane (not copied to object until ExecuteLD is called)
 
    68 	 * @param aSettingNumber		Number at top left (if present)
 
    69 	 * @param aControlType			Determines the type constructed and how its resource is read
 
    70 	 * @param aEditorResourceId	Editor resource to use in the setting page (if present)
 
    71 	 * @param aSettingPageResourceId		Setting Page to use (if present)
 
    72 	 * @param aSliderValue			Reference to integer holding the slider value
 
    75 	IMPORT_C CAknSliderSettingPage(	const TDesC* aSettingTitleText, 
 
    78 								TInt aEditorResourceId, 
 
    79 								TInt aSettingPageResourceId,
 
    82  * Access method for the contained slider control. No transfer of ownership
 
    84  * @return	Reference ptr to the contained CAknSlider object
 
    86 	IMPORT_C CAknSlider* SliderControl();
 
    89 // From CAknSettingPage
 
    93  * 2nd stage contructor
 
    96 	IMPORT_C virtual void ConstructL();
 
   101     IMPORT_C void HandlePointerEventL(const TPointerEvent& aPointerEvent);
 
   107 	IMPORT_C virtual void SizeChanged();
 
   108 	IMPORT_C virtual void Draw(const TRect &aRect) const;
 
   111  * Writes the internal state of the control and its components to aStream.
 
   112  * Does nothing in release mode.
 
   113  * Designed to be overidden and base called by subclasses.
 
   115  * @param	aWriteSteam		A connected write stream
 
   117 	IMPORT_C virtual void WriteInternalStateL(RWriteStream& aWriteStream) const;
 
   121 *	Reserved method derived from CCoeControl
 
   123 	IMPORT_C virtual void Reserved_2();
 
   129     IMPORT_C void* ExtensionInterface( TUid aInterface );
 
   132 // Framework methods derived from CAknSettingPage
 
   139 	IMPORT_C virtual ~CAknSliderSettingPage();
 
   142  * Called when something has changed and the client's object needs to have its value updated
 
   145 	IMPORT_C virtual void UpdateSettingL();
 
   148  * Called when the user accepts a setting and the setting page is about to be dismissed.  The latest value of the
 
   149  * setting is written to the client's object
 
   151 	IMPORT_C virtual void AcceptSettingL();
 
   154  * Called when the user rejects the setting.  A backup copy may need to be restored if UpdateWhenChanged flag was set
 
   157 	IMPORT_C virtual void RestoreOriginalSettingL();
 
   160  * New reserved methods for CAknSettingPage hierarchy
 
   163 	IMPORT_C virtual void CAknSettingPage_Reserved_1();
 
   164 	IMPORT_C virtual void CAknSettingPage_Reserved_2();
 
   168 	TInt iBackupSliderValue;