API published in: S60 1st Ed
Link against: avkon.lib
Required Capabilities
None
#include <aknsettingpage.h>
Inherits CAknControl.
Inherited by CAknEdwinSettingPage, CAknListBoxSettingPage, CAknMfneSettingPage, CAknPasswordSettingPage, CAknSliderSettingPage, and CAknVolumeSettingPage.
Public Types |
|
enum | TAknSettingPageUpdateMode { EUpdateWhenChanged, EUpdateWhenAccepted } |
This enumeration is passed in the ExecuteLD() method to control how often the setting page updates the externally held client object. More... |
|
enum | TEditedItemSkinClass { ESettingPageSkinEditedItemClassValueItemList, ESettingPageSkinEditedItemClassVolume, ESettingPageSkinEditedItemClassSlider, ESettingPageSkinEditedItemClassTextEntry, ESettingPageSkinEditedItemClassCodeDateTimeEntry } |
This enumeration is used to select the type and IIDs for the various classes defined in the Skins LAF spec for "Opened Setting
Items". More... |
|
Public Member Functions |
|
IMPORT_C | CAknSettingPage (TInt aSettingPageResourceId) |
Simple contructor for using a single setting page resource which itself gives all the setup. |
|
IMPORT_C | CAknSettingPage (const TDesC *aSettingTitleText, TInt aSettingNumber, TInt aControlType, TInt aEditorResourceId, TInt aSettingPageResourceId=0) |
Constructor that allows separate setting page and editor resources. |
|
virtual IMPORT_C | ~CAknSettingPage () |
C++ destructor. |
|
IMPORT_C TBool | ExecuteLD (enum CAknSettingPage::TAknSettingPageUpdateMode aMode=EUpdateWhenAccepted) |
Executes a waiting dialog-like setting page. |
|
virtual IMPORT_C void | ConstructL () |
public method for construction. |
|
IMPORT_C CCoeControl * | EditorControl () const |
Returns reference to the hosted "editor" control as a CCoeControl. |
|
IMPORT_C TInt | SettingId () const |
Returns the setting Id. |
|
IMPORT_C void | SetSettingId (TInt aSettingId) |
Sets the setting Id. |
|
IMPORT_C void | SetSettingNumberL (const TInt aSettingNumber) |
Substitutes the new setting number. |
|
IMPORT_C void | SetSettingTextL (const TDesC &aSettingText) |
Substitutes the new setting text. |
|
IMPORT_C void | SetSettingPageObserver (MAknSettingPageObserver *aObserver) |
Sets the observer for the setting page. |
|
IMPORT_C TInt | SettingNumber () const |
Access method for the number of the setting page. |
|
IMPORT_C TBool | IsNumbered () const |
Access method for whether the setting page is numbered or not. |
|
IMPORT_C void | SetNumbered (TBool aNumbered) |
Set method for whether the setting page is numbered or not. |
|
IMPORT_C void | SetEditState (const TBool aEditable) |
Set the edit-state of the setting page. |
|
IMPORT_C TBool | IsEditable () const |
Is the setting page possible to edit by the user. |
|
IMPORT_C void | HandleResourceChange (TInt aType) |
Handles a change to the control's resources of type aType which are shared across the environment, e.g. |
|
IMPORT_C TInt | CountComponentControls () const |
Standard CCoeControl routine to return the number of componentn controls. |
|
IMPORT_C CCoeControl * | ComponentControl (TInt anIndex) const |
Standard CCoeControl routine to return the control at a given index. |
|
IMPORT_C void | HandlePointerEventL (const TPointerEvent &aPointerEvent) |
Handles pointer events. |
|
Static Public Member Functions |
|
static IMPORT_C void | GetEditorResourceInfoL (TInt aSettingPageResourceId, TInt &aControlType, TInt &aEditorResourceId) |
Reads the passed-in setting page resource in order to read the contained editor control resource information. |
|
Protected Member Functions |
|
virtual IMPORT_C void | SizeChanged () |
From CCoeControl This routine is called as part of the set-up of the control. |
|
virtual IMPORT_C void | FocusChanged (TDrawNow aDrawNow) |
From CCoeControl Takes any action required when the control gains or loses focus e.g. |
|
virtual IMPORT_C void | ProcessCommandL (TInt aCommandId) |
From MEikCommandObserver Processes events from the softkeys. |
|
virtual IMPORT_C void | HandleControlEventL (CCoeControl *aControl, TCoeEvent aEventType) |
From MCoeControlObserver: Acts upon changes in the hosted control's state. |
|
virtual IMPORT_C TBool | OkToExitL (TBool aAccept) |
Framework method to determine if it is OK to exit the setting page. |
|
virtual IMPORT_C void | DynamicInitL () |
Called immediately prior to activation of the dialog. |
|
virtual IMPORT_C void | UpdateSettingL () |
Called when something has changed and the client's object needs to have its value updated. |
|
virtual IMPORT_C void | AcceptSettingL () |
Called when the user accepts a setting and the setting page is about to be dismissed. |
|
virtual IMPORT_C void | RestoreOriginalSettingL () |
Called when the user rejects the setting. |
|
virtual IMPORT_C void | DisplayMenuL () |
Display the menu. |
|
virtual IMPORT_C void | HideMenu () |
Hide the menu. |
|
virtual IMPORT_C void | SetFocusToEditor () |
Puts the focus back on the editor. |
|
virtual IMPORT_C void | SelectCurrentItemL () |
This method should be implemented in listbox classes to move the selection in listbox editors prior to exiting from the setting
page. |
|
IMPORT_C void | BaseConstructL () |
Protected non-virtual base method for construction. |
|
IMPORT_C void | DismissL (TBool aAccept) |
Called to remove the setting page. |
|
IMPORT_C TBool | MenuShowing () const |
This is used as a protected access function for the state of the menu bar. |
|
IMPORT_C void | ConstructFromResourceL (TInt aResourceId) |
This constructs the control based upon the id passed. |
|
IMPORT_C void | ConstructFromResourceL (TResourceReader &aRes) |
This constructs the control based upon a constructed and positioned reader. |
|
IMPORT_C void | AttemptExitL (TBool aAccept) |
Called when the user accepts or cancels the setting. |
|
IMPORT_C TBool | Waiting () |
Method to determine the current running state of the setting page's ActiveScheduler level. |
|
IMPORT_C CEikButtonGroupContainer * | Cba () const |
Access method to the Command button array. |
|
IMPORT_C TInt | DefaultCbaResourceId () const |
This is used to access the default resource id for the cba - the one used when data is valid. |
|
IMPORT_C TKeyResponse | OfferKeyEventL (const TKeyEvent &aKeyEvent, TEventCode aType) |
This routine routes the keys to the editor. |
|
IMPORT_C void | StandardSettingPageLayout () |
This routine is the base layout for CAknSettingPage. |
|
IMPORT_C TBool | IsBaseConstructed () |
This method can be used to test if BaseConstructL() has been called yet successfully. |
|
IMPORT_C TInt | SettingPageResourceId () |
Access method for the internally held resource Id. |
|
IMPORT_C void | BaseDraw (const TRect &aRect) const |
Perform the drawing of coded within CAknSettingPage. |
|
IMPORT_C void | ResetFlags () |
Set default construction values of internal state. |
|
virtual IMPORT_C TBool | PostDisplayCheckL () |
Framework method called as soon as the setting page is displayed, but before the new active sheduler level is started. |
|
virtual IMPORT_C void | UpdateCbaL () |
This framework method is used to update the contents of the CBA in a custom way. |
|
IMPORT_C TBool | DataValidity () const |
Called to access the validity state of the data. |
|
IMPORT_C void | SetDataValidity (TBool aValid) |
used to set the validity of the data |
|
virtual IMPORT_C void | CheckAndSetDataValidity () |
Framework method to set the validity of the data This is called when the data changes. |
|
void | SetEditedItemLayoutRect (const TRect &aFrameRect, const TRect &aRealEditorRect) |
Method to be called by CAknSettingPage descendents when they have laid themselves out. |
|
void | CreateEditedItemControlContextL (TEditedItemSkinClass aSkinClass, TBool aParentAbsolute) |
Method to cause this class to construct a control context or type and IID, selected according to the value of enumeration
TEditedItemSkinClass, set its coordinate system. |
|
TBool | IsSkinsHandlingEditorFrameDrawing () const |
Indicates whether skin system will be able to draw the editor frame and background. |
|
CAknsFrameBackgroundControlContext * | EditedItemControlContext () const |
Control context for providing to the skinning for the hosted editor and its framing. |
|
virtual IMPORT_C void | SetEmphasis (CCoeControl *, TBool aEmphasis) |
From MEikMenuObserver Called when menu is cancelled. |
|
virtual IMPORT_C void | DynInitMenuPaneL (TInt aResourceId, CEikMenuPane *aMenuPane) |
From MEikMenuObserver This function intializes the items on the menu. |
|
IMPORT_C TInt | InvalidDataCbaResourceId () const |
Access method for the softkey resource used when there is invalid data. |
|
IMPORT_C TTypeUid::Ptr | MopSupplyObject (TTypeUid aId) |
virtual IMPORT_C void | WriteInternalStateL (RWriteStream &aWriteStream) const |
Writes the internal state of the control and its components to aStream. |
|
void | SetDrawBackground (const TBool aDrawBackground) |
Enables / disables transparency effect, i.e. |
|
TBool | IsBackgroundDrawingEnabled () const |
Is the setting page drawing the background itself or not (= "transparency"). |
|
Protected Attributes |
|
TInt | iUpdateMode |
Hold the update mode passed in the constructor. |
|
MAknSettingPageObserver * | iSettingPageObserver |
Pointer to setting page observer; may be NULL. |
|
This enumeration is passed in the ExecuteLD() method to control how often the setting page updates the externally held client object. |
|
This enumeration is used to select the type and IIDs for the various classes defined in the Skins LAF spec for "Opened Setting Items". |
|
Simple contructor for using a single setting page resource which itself gives all the setup. |
|
Constructor that allows separate setting page and editor resources. In all cases the number (if supplied i.e. <> 0 ) is used. Editor Resource Setting Page Resource present present Both are used (but text & number overridden) = 0 present Editor resource is used via SP resource present = 0 Default Avkon SP resource if used = 0 = 0 Not permitted Note: The first argument is a TDesC* (rather than TDesC&) because the other constructor cannot initialize such a member without allocation or having an internal dummy buffer. Rules for text and numbers: The rules are the same for both: (non-zero length) text or number other than EAknSettingPageNoOrdinalDisplayed if given in this constructor will not override resource (unless that is zero length or EAknSettingPageNoOrdinalDisplayed). Note, however, that text or number given via the specific API for setting them, WILL override resource. It is assumed that number from resource is very rare. Special text is somewhat more likely.
|
|
C++ destructor. |
|
Called when the user accepts a setting and the setting page is about to be dismissed. The latest value of the setting is written to the client's object Reimplemented in CAknDateSettingPage, CAknTimeSettingPage, CAknDurationSettingPage, CAknTimeOffsetSettingPage, CAknIpFieldSettingPage, CAknPasswordSettingPage, CAknSliderSettingPage, CAknTextSettingPage, and CAknVolumeSettingPage. |
|
Called when the user accepts or cancels the setting. Default implementation sets the return value and exists. Re-implementations must call DismissL and StopActiveScheduler() if the setting is to leave.
|
|
Protected non-virtual base method for construction. Only thing required to do in this class is call the ConstructFromResourceL routine and set the flag that says construction has occured |
|
Perform the drawing of coded within CAknSettingPage. |
|
Access method to the Command button array. Must be called after full construction, or null reference will be returned.
|
|
Framework method to set the validity of the data This is called when the data changes. Reimplemented in CAknListBoxSettingPage, CAknMfneSettingPage, CAknTextSettingPage, and CAknIntegerSettingPage. |
|
Standard CCoeControl routine to return the control at a given index.
Reimplemented in CAknMfneSettingPage. |
|
This constructs the control based upon a constructed and positioned reader. |
|
This constructs the control based upon the id passed. |
|
public method for construction. Only thing required to do in this class is to call the BaseConstructL(). Derived classes may be required to do more Reimplemented in CAknCheckBoxSettingPage, CAknMfneSettingPage, CAknDateSettingPage, CAknTimeSettingPage, CAknDurationSettingPage, CAknTimeOffsetSettingPage, CAknIpFieldSettingPage, CAknAlphaPasswordSettingPage, CAknNumericPasswordSettingPage, CAknPopupSettingPage, CAknRadioButtonSettingPage, CAknSliderSettingPage, CAknTextSettingPage, CAknIntegerSettingPage, and CAknVolumeSettingPage. |
|
Standard CCoeControl routine to return the number of componentn controls.
Reimplemented in CAknMfneSettingPage. |
|
Method to cause this class to construct a control context or type and IID, selected according to the value of enumeration TEditedItemSkinClass, set its coordinate system. This must be called after a call to SetEditedItemLayoutRect has been made on CAknSettingPage. This is becasue this routine must set the control context's origin to the top left of the value given to SetEditedItemLayoutRect. Since SetEditeItemLayoutRect is to be called in a SizeChanged method, this means that the this should be called after the SizeChanged in the child class.
|
|
Called to access the validity state of the data.
|
|
This is used to access the default resource id for the cba - the one used when data is valid.
|
|
Called to remove the setting page. Should not be called except from within re-implemented AttemptExitL
|
|
Display the menu. |
|
Called immediately prior to activation of the dialog. Framework routine for derived classes. Reimplemented in CAknCheckBoxSettingPage, CAknRadioButtonSettingPage, CAknTextSettingPage, and CAknIntegerSettingPage. |
|
From MEikMenuObserver This function intializes the items on the menu. It is used to disable and enable menu items and may be over ridden to add new ones. In addition it adds menu items which have been provided in the ConstructL in the form of a Menu Bar resource. Instead of using the Menu Bar directly it extracts the menu panes and adds them to its own menu pane. It must be called in the DynInitMenuPaneL() function of any derived class before anything else. |
|
Control context for providing to the skinning for the hosted editor and its framing.
|
|
Returns reference to the hosted "editor" control as a CCoeControl. This routine is used in derived classes, which may then cast to the specific run-time type Note also that derived classes may provide type-specific access that performs these casts already
|
|
Executes a waiting dialog-like setting page. The passed mode determines if the editor's value is updated continuously, or just when it is accepted.
|
|
From CCoeControl Takes any action required when the control gains or loses focus e.g. to change its appearance. The control should be redrawn depending on the value of aDrawNow. Empty by default. |
|
Reads the passed-in setting page resource in order to read the contained editor control resource information.
|
|
From MCoeControlObserver: Acts upon changes in the hosted control's state. This class's implementation is trivial and should be able to be safely re-implemented in directly client-derived classes. For non-base setting page classes, a call to the base class should be made
Reimplemented in CAknMfneSettingPage, CAknPasswordSettingPage, CAknTextSettingPage, and CAknIntegerSettingPage. |
|
|
Handles a change to the control's resources of type aType which are shared across the environment, e.g. colors or fonts.
Reimplemented in CAknCheckBoxSettingPage, and CAknRadioButtonSettingPage. |
|
Hide the menu. |
|
Access method for the softkey resource used when there is invalid data.
|
|
Is the setting page drawing the background itself or not (= "transparency"). |
|
This method can be used to test if BaseConstructL() has been called yet successfully.
|
|
Is the setting page possible to edit by the user.
|
|
Access method for whether the setting page is numbered or not. |
|
Indicates whether skin system will be able to draw the editor frame and background.
|
|
This is used as a protected access function for the state of the menu bar.
|
|
|
This routine routes the keys to the editor. However, if the menu is showing, then events are sent to the menu.
Reimplemented in CAknTextSettingPage. |
|
Framework method to determine if it is OK to exit the setting page. Derived classes may check for valid data before allowing the dismissal of the setting page.
Reimplemented in CAknPasswordSettingPage, and CAknTextSettingPage. |
|
Framework method called as soon as the setting page is displayed, but before the new active sheduler level is started. Returning EFalse will dismiss the setting page right away
Reimplemented in CAknPasswordSettingPage. |
|
From MEikCommandObserver Processes events from the softkeys. Responds to EAknSoftkeyOk and EAknSoftkeyBack to accept or cancel the pop-up.
Reimplemented in CAknCheckBoxSettingPage. |
|
Set default construction values of internal state. |
|
Called when the user rejects the setting. A backup copy may need to be restored if UpdateWhenChanged flag was set Reimplemented in CAknDateSettingPage, CAknTimeSettingPage, CAknDurationSettingPage, CAknTimeOffsetSettingPage, CAknIpFieldSettingPage, CAknSliderSettingPage, CAknTextSettingPage, CAknIntegerSettingPage, and CAknVolumeSettingPage. |
|
This method should be implemented in listbox classes to move the selection in listbox editors prior to exiting from the setting page. It is called on a CAknSettingPage* reference, and is therefore declared here. Reimplemented in CAknCheckBoxSettingPage, CAknPopupSettingPage, and CAknRadioButtonSettingPage. |
|
used to set the validity of the data
|
|
Enables / disables transparency effect, i.e. does the setting page draw its own background or not.
|
|
Method to be called by CAknSettingPage descendents when they have laid themselves out. This tells the base class how big the layout spec rectangle hosting the editor is. The second rectangle is the size of the area that the base class does not have to draw to for skins. Usually, this is the area actually inhabited by the editor control. Coordinates are to be given in pixels relative to the main_pane.
|
|
Set the edit-state of the setting page. The setting page can be edited or it can be only viewed by the user.
|
|
From MEikMenuObserver Called when menu is cancelled. |
|
Puts the focus back on the editor. For complicated setting pages that have focus removed from them at some point, then a re-implementation may have to do some work here. |
|
Set method for whether the setting page is numbered or not. |
|
Sets the setting Id. The Id may be used to unabiguously number a setting in some context. It would be useful to call SettingId() on aSettingPageControl in handling an observer callback. The Id is not used internally.
|
|
Substitutes the new setting number.
|
|
Sets the observer for the setting page.
|
|
Substitutes the new setting text. Memory is allocated for a copy. If already constructed, the label is reformatted. Note that calling this will over-ride text in Setting Page resource
|
|
Returns the setting Id.
|
|
Access method for the number of the setting page. |
|
Access method for the internally held resource Id. |
|
From CCoeControl This routine is called as part of the set-up of the control. It is the place to put layout code. Reimplemented in CAknListBoxSettingPage, CAknMfneSettingPage, CAknPasswordSettingPage, CAknSliderSettingPage, CAknEdwinSettingPage, CAknTextSettingPage, CAknIntegerSettingPage, and CAknVolumeSettingPage. |
|
This routine is the base layout for CAknSettingPage. It lays out the labels and configures the drawing in general. |
|
This framework method is used to update the contents of the CBA in a custom way. Some setting page classes implement a degree of validation and will implement this. Derived classes should ensure that this is being called frequently enough for their purposes. Reimplemented in CAknListBoxSettingPage, CAknTextSettingPage, and CAknIntegerSettingPage. |
|
Called when something has changed and the client's object needs to have its value updated. Reimplemented in CAknCheckBoxSettingPage, CAknDateSettingPage, CAknTimeSettingPage, CAknDurationSettingPage, CAknTimeOffsetSettingPage, CAknIpFieldSettingPage, CAknPasswordSettingPage, CAknRadioButtonSettingPage, CAknSliderSettingPage, CAknTextSettingPage, CAknIntegerSettingPage, and CAknVolumeSettingPage. |
|
Method to determine the current running state of the setting page's ActiveScheduler level.
|
|
Writes the internal state of the control and its components to aStream. Does nothing in release mode. Designed to be overidden and base called by subclasses.
Reimplemented in CAknCheckBoxSettingPage, CAknDateSettingPage, CAknTimeSettingPage, CAknDurationSettingPage, CAknTimeOffsetSettingPage, CAknIpFieldSettingPage, CAknPasswordSettingPage, CAknAlphaPasswordSettingPage, CAknNumericPasswordSettingPage, CAknPopupSettingPage, CAknRadioButtonSettingPage, CAknSliderSettingPage, CAknTextSettingPage, CAknIntegerSettingPage, and CAknVolumeSettingPage. |
|
Pointer to setting page observer; may be NULL. |
|
Hold the update mode passed in the constructor. |