class CAknSettingPage : public CAknControl |
Private Member Functions | |
---|---|
IMPORT_C void | CAknSettingPage_Reserved_1 () |
IMPORT_C void | CAknSettingPage_Reserved_2 () |
IMPORT_C void | Draw (const TRect &) |
IMPORT_C void * | ExtensionInterface ( TUid ) |
void | PopNaviDecoratorIfRequired () |
IMPORT_C void | Reserved_2 () |
IMPORT_C void | Reserved_MtsmObject () |
IMPORT_C void | Reserved_MtsmPosition () |
void | StartActiveScheduler () |
Private Member Enumerations | |
---|---|
enum | TFlagIndices { EMenuShowingIndex = 0, ENumberedStyleIndex , EIsBaseConstructedIndex , EHasValidDataIndex } |
Inherited Enumerations | |
---|---|
CCoeControl:TZoomType |
Protected Attributes | |
---|---|
MAknSettingPageObserver * | iSettingPageObserver |
TInt | iUpdateMode |
Private Attributes | |
---|---|
CEikButtonGroupContainer * | iCba |
TInt | iCbaResourceId |
TInt | iControlType |
CCoeControl * | iEditorControl |
TInt | iEditorResourceId |
CAknSettingPageExtension * | iExtension |
TInt | iExtensionId |
TBitFlags | iFlags |
TAknLayoutRect | iHighlight |
HBufC * | iHintText |
TInt | iInvalidDataCbaResourceId |
TInt | iIsProtected |
CEikMenuBar * | iMenuBar |
TInt | iMenuBarId |
CAknNavigationDecorator * | iNaviDecorator |
CAknNavigationControlContainer * | iNaviPane |
CEikLabel * | iNumberLabel |
TInt | iResourceId |
TBool * | iReturn |
TInt | iSettingId |
TInt | iSettingNumber |
HBufC * | iSettingText |
const TDesC * | iSettingTextFromConstructor |
TAknLayoutRect | iShadow |
CAknSettingPageSkinsInfo * | iSkinsInfo |
CEikLabel * | iTextLabel |
CActiveSchedulerWait | iWait |
Inherited Attributes | |
---|---|
CCoeControl::iCoeEnv | |
CCoeControl::iContext | |
CCoeControl::iPosition | |
CCoeControl::iSize |
IMPORT_C | CAknSettingPage | ( | TInt | aSettingPageResourceId | ) |
Simple contructor for using a single setting page resource which itself gives all the setup
TInt aSettingPageResourceId |
IMPORT_C | CAknSettingPage | ( | const TDesC * | aSettingTitleText, |
TInt | aSettingNumber, | |||
TInt | aControlType, | |||
TInt | aEditorResourceId, | |||
TInt | aSettingPageResourceId = 0 | |||
) |
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.
const TDesC * aSettingTitleText | Text at top of setting pane (not copied; must be owned externally until ExecuteLD is called) |
TInt aSettingNumber | Number at top left (if present) |
TInt aControlType | Determines the type constructed and how its resource is read |
TInt aEditorResourceId | Editor resource to use in the setting page (if present) |
TInt aSettingPageResourceId = 0 | Setting Page to use (if present) |
IMPORT_C void | AcceptSettingL | ( | ) | [protected, virtual] |
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
IMPORT_C void | AttemptExitL | ( | TBool | aAccept | ) | [protected] |
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.
TBool aAccept | ETrue if the user accepted. EFalse if the user cancelled. |
IMPORT_C void | BaseConstructL | ( | ) | [protected] |
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
void | BaseConstructL | ( | TUint | aFlags | ) | [protected] |
Performs base construction and takes possible flags into account.
TUint aFlags | Construction flags |
IMPORT_C void | BaseDraw | ( | const TRect & | aRect | ) | const [protected] |
Perform the drawing of coded within CAknSettingPage
const TRect & aRect |
IMPORT_C void | CAknSettingPage_Reserved_1 | ( | ) | [private, virtual] |
New reserved methods for CAknSettingPage hierarchy
IMPORT_C CEikButtonGroupContainer * | Cba | ( | ) | const |
Access method to the Command button array
Must be called after full construction, or null reference will be returned.
IMPORT_C void | CheckAndSetDataValidity | ( | ) | [protected, virtual] |
Framework method to set the validity of the data This is called when the data changes.
IMPORT_C CCoeControl * | ComponentControl | ( | TInt | anIndex | ) | const [virtual] |
Standard CCoeControl routine to return the control at a given index
TInt anIndex |
IMPORT_C void | ConstructFromResourceL | ( | TInt | aResourceId | ) | [protected] |
This constructs the control based upon the id passed
TInt aResourceId |
IMPORT_C void | ConstructFromResourceL | ( | TResourceReader & | aRes | ) | [protected, virtual] |
This constructs the control based upon a constructed and positioned reader
TResourceReader & aRes |
IMPORT_C void | ConstructL | ( | ) | [virtual] |
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
IMPORT_C TInt | CountComponentControls | ( | ) | const [virtual] |
Standard CCoeControl routine to return the number of componentn controls
IMPORT_C TBool | DataValidity | ( | ) | const [protected] |
Called to access the validity state of the data
IMPORT_C TInt | DefaultCbaResourceId | ( | ) | const [protected] |
This is used to access the default resource id for the cba - the one used when data is valid.
IMPORT_C void | DismissL | ( | TBool | aAccept | ) | [protected] |
Called to remove the setting page. Should not be called except from within re-implemented AttemptExitL
TBool aAccept | ETrue to accept the current value; EFalse otherwise |
IMPORT_C void | Draw | ( | const TRect & | aRect | ) | const [private, virtual] |
const TRect & aRect |
IMPORT_C void | DynInitMenuPaneL | ( | TInt | aResourceId, |
CEikMenuPane * | aMenuPane | |||
) | [protected, virtual] |
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.
TInt aResourceId | |
CEikMenuPane * aMenuPane |
IMPORT_C void | DynamicInitL | ( | ) | [protected, virtual] |
Called immediately prior to activation of the dialog. Framework routine for derived classes.
CAknsFrameBackgroundControlContext * | EditedItemControlContext | ( | ) | const [protected] |
Control context for providing to the skinning for the hosted editor and its framing
IMPORT_C CCoeControl * | EditorControl | ( | ) | const |
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
IMPORT_C TBool | ExecuteLD | ( | enum CAknSettingPage::TAknSettingPageUpdateMode | aMode = EUpdateWhenAccepted | ) |
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.
enum CAknSettingPage::TAknSettingPageUpdateMode aMode = EUpdateWhenAccepted | The update mode of the class |
IMPORT_C void * | ExtensionInterface | ( | TUid | aInterface | ) | [private, virtual] |
From CAknControl
TUid aInterface |
IMPORT_C void | FocusChanged | ( | TDrawNow | aDrawNow | ) | [protected, virtual] |
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.
TDrawNow aDrawNow |
void | GetCaptionForFep | ( | TDes & | aCaption | ) | const |
Used for aknsettingpage's extenstion corresponding function
TDes & aCaption | On return, this should be set to the caption of the target control. |
IMPORT_C void | GetEditorResourceInfoL | ( | TInt | aSettingPageResourceId, |
TInt & | aControlType, | |||
TInt & | aEditorResourceId | |||
) | [static] |
Reads the passed-in setting page resource in order to read the contained editor control resource information This will leave if an invalid resource ID is passed
IMPORT_C void | HandleControlEventL | ( | CCoeControl * | aControl, |
TCoeEvent | aEventType | |||
) | [protected, virtual] |
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
CCoeControl * aControl | The control changing its state (not used) |
TCoeEvent aEventType | The type of control event |
IMPORT_C void | HandlePointerEventL | ( | const TPointerEvent & | aPointerEvent | ) | [virtual] |
Handles pointer events
const TPointerEvent & aPointerEvent |
IMPORT_C void | HandleResourceChange | ( | TInt | aType | ) | [virtual] |
Handles a change to the control's resources of type aType which are shared across the environment, e.g. colors or fonts.
TInt aType | Reason for the "resource" change, usually an system event UID |
IMPORT_C TCoeInputCapabilities | InputCapabilities | ( | ) | const [virtual] |
From CCoeControl . Gets the control's input capabilities.
IMPORT_C TInt | InvalidDataCbaResourceId | ( | ) | const [protected] |
Access method for the softkey resource used when there is invalid data
TBool | IsBackgroundDrawingEnabled | ( | ) | const |
Is the setting page drawing the background itself or not (= "transparency")
IMPORT_C TBool | IsBaseConstructed | ( | ) | [protected] |
This method can be used to test if BaseConstructL() has been called yet successfully
IMPORT_C TBool | IsEditable | ( | ) | const |
Is the setting page possible to edit by the user.
IMPORT_C TBool | IsNumbered | ( | ) | const |
Access method for whether the setting page is numbered or not
TBool | IsSkinsHandlingEditorFrameDrawing | ( | ) | const [protected] |
Indicates whether skin system will be able to draw the editor frame and background
TBool | IsStopActiveSchudlerCalled | ( | ) | const [protected] |
Is the setting page call the StopActiveScheduler or not
IMPORT_C TBool | MenuShowing | ( | ) | const [protected] |
This is used as a protected access function for the state of the menu bar
IMPORT_C TTypeUid::Ptr | MopSupplyObject | ( | TTypeUid | aId | ) | [protected] |
TTypeUid aId |
IMPORT_C TKeyResponse | OfferKeyEventL | ( | const TKeyEvent & | aKeyEvent, |
TEventCode | aType | |||
) | [protected, virtual] |
This routine routes the keys to the editor. However, if the menu is showing, then events are sent to the menu.
const TKeyEvent & aKeyEvent | event information |
TEventCode aType | type of event being handled |
IMPORT_C TBool | OkToExitL | ( | TBool | aAccept | ) | [protected, virtual] |
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.
TBool aAccept | ETrue if the user has indicated to accept the setting page; EFalse otherwise |
void | PopNaviDecoratorIfRequired | ( | ) | [private] |
Pop the navidecorator. The iNaviPane is used as a flag to show if popping is required to be done or not. It is zeroed by this method.
IMPORT_C TBool | PostDisplayCheckL | ( | ) | [protected, virtual] |
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
IMPORT_C void | ProcessCommandL | ( | TInt | aCommandId | ) | [protected, virtual] |
From MEikCommandObserver Processes events from the softkeys. Responds to EAknSoftkeyOk and EAknSoftkeyBack to accept or cancel the pop-up.
TInt aCommandId | Event Id from the soft-key |
IMPORT_C void | Reserved_2 | ( | ) | [private, virtual] |
Reserved method derived from CCoeControl
IMPORT_C void | ResetFlags | ( | ) | [protected] |
Set default construction values of internal state
IMPORT_C void | RestoreOriginalSettingL | ( | ) | [protected, virtual] |
Called when the user rejects the setting. A backup copy may need to be restored if UpdateWhenChanged flag was set
IMPORT_C void | SelectCurrentItemL | ( | ) | [protected, virtual] |
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.
IMPORT_C void | SetDataValidity | ( | TBool | aValid | ) | [protected] |
used to set the validity of the data
TBool aValid |
void | SetDrawBackground | ( | const TBool | aDrawBackground | ) | [protected] |
Enables / disables transparency effect, i.e. does the setting page draw its own background or not.
const TBool aDrawBackground | EFalse enables transparency |
IMPORT_C void | SetEditState | ( | const TBool | aEditable | ) |
Set the edit-state of the setting page. The setting page can be edited or it can be only viewed by the user.
const TBool aEditable | If false, the setting page cannot be modified by the user |
void | SetEditedItemFrameIID | ( | const TAknsItemID & | aFrameIID, |
const TAknsItemID & | aFrameCenterIID | |||
) | [protected] |
Sets the skin item ID for the frame graphics that is drawn around the setting item.
const TAknsItemID & aFrameIID | Skin item ID of the frame graphics. |
const TAknsItemID & aFrameCenterIID | Skin item ID of the center piece of the frame graphics |
void | SetEditedItemFrameRects | ( | const TRect & | aOuterRect, |
const TRect & | aInnerRect | |||
) | [protected] |
Sets the outer and inner rectangle for the frame graphics that is drawn around the setting item.
void | SetEditorIndicatorRect | ( | const TRect & | aRect | ) | [protected] |
Sets the rectangle for the editing state indicators. Should only be called by setting pages that have an editor which displays the editor indicators as the editor control.
const TRect & aRect | Editor indicator rectangle. |
IMPORT_C void | SetEmphasis | ( | CCoeControl * | , |
TBool | aEmphasis | |||
) | [protected, virtual] |
From MEikMenuObserver Called when menu is cancelled.
CCoeControl * | |
TBool aEmphasis |
IMPORT_C void | SetFocusToEditor | ( | ) | [protected, virtual] |
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.
IMPORT_C void | SetNumbered | ( | TBool | aNumbered | ) |
Set method for whether the setting page is numbered or not
TBool aNumbered |
IMPORT_C void | SetSettingId | ( | TInt | aSettingId | ) |
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.
TInt aSettingId | An id to provide to the observer in the callback |
IMPORT_C void | SetSettingNumberL | ( | const TInt | aSettingNumber | ) |
Substitutes the new setting number.
const TInt aSettingNumber | The new setting number to display |
IMPORT_C void | SetSettingPageObserver | ( | MAknSettingPageObserver * | aObserver | ) |
Sets the observer for the setting page.
MAknSettingPageObserver * aObserver | The observer for changes to the setting |
IMPORT_C void | SetSettingTextL | ( | const TDesC & | aSettingText | ) |
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
const TDesC & aSettingText | The new setting text to display |
void | SetStopActiveSchedulerFlag | ( | const TBool | aStopCalled | ) | [protected] |
Set the flag to indicate that if the function CAknSettingPage::StopActiveScheduler called or not
const TBool aStopCalled | ETrue means the StopActiveScheduler is called. |
TRect | SettingItemContentRect | ( | TBool | aScrollBarUsed | ) |
Calculates and returns setting item content rect.
TBool aScrollBarUsed | ETrue if the setting page content should have scrollbar, EFalse otherwise. |
IMPORT_C TInt | SettingNumber | ( | ) | const |
Access method for the number of the setting page
IMPORT_C TInt | SettingPageResourceId | ( | ) | [protected] |
Access method for the internally held resource Id
IMPORT_C CEikLabel * | ShadowText | ( | ) | const [protected] |
IMPORT_C void | SizeChanged | ( | ) | [protected, virtual] |
From CCoeControl This routine is called as part of the set-up of the control. It is the place to put layout code.
IMPORT_C void | StandardSettingPageLayout | ( | ) | [protected] |
This routine is the base layout for CAknSettingPage . It lays out the labels and configures the drawing in general.
void | StartActiveScheduler | ( | ) | [private] |
Activate another level on the active scheduler
void | StopActiveScheduler | ( | ) | [protected] |
Stop current (additional) level on the active scheduler.
IMPORT_C CEikLabel * | TextLabel | ( | ) | const [protected] |
IMPORT_C void | UpdateCbaL | ( | ) | [protected, virtual] |
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.
IMPORT_C void | UpdateSettingL | ( | ) | [protected, virtual] |
Called when something has changed and the client's object needs to have its value updated
IMPORT_C TBool | Waiting | ( | ) | [protected] |
Method to determine the current running state of the setting page's ActiveScheduler level.
IMPORT_C void | WriteInternalStateL | ( | RWriteStream & | aWriteStream | ) | const [protected, virtual] |
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.
RWriteStream & aWriteStream |
This enumeration is passed in the ExecuteLD() method to control how often the setting page updates the externally held client object
EUpdateWhenChanged | |
EUpdateWhenAccepted |
This enumeration is used to select the type and IIDs for the various classes defined in the Skins LAF spec for "Opened Setting Items"
ESettingPageSkinEditedItemClassValueItemList | |
ESettingPageSkinEditedItemClassVolume | |
ESettingPageSkinEditedItemClassSlider | |
ESettingPageSkinEditedItemClassTextEntry | |
ESettingPageSkinEditedItemClassCodeDateTimeEntry |
EMenuShowingIndex = 0 | |
ENumberedStyleIndex | |
EIsBaseConstructedIndex | |
EHasValidDataIndex |
MAknSettingPageObserver * | iSettingPageObserver | [protected] |
Pointer to setting page observer; may be NULL
const TDesC * | iSettingTextFromConstructor | [private] |
This member points to the setting title text that is passed as part of its more complicated constructor. The descriptor pointed to is not owned, and therefor must be preserved in the client, at least until the 2nd stage construction is performed (inside ExecuteLD).
Since, however, setting pages are all waiting, the descriptor can usually be on the stack in the client.
Copyright ©2010 Nokia Corporation and/or its subsidiary(-ies).
All rights
reserved. Unless otherwise stated, these materials are provided under the terms of the Eclipse Public License
v1.0.