CAknTextSettingPage Class Reference

API published in: S60 1st Ed

Link against: avkon.lib

Capability Information

Required Capabilities

None


#include <akntextsettingpage.h>

Inherits CAknEdwinSettingPage.


Public Types

enum   TAknTextSettingPageFlags {
  EZeroLengthNotOffered = 0x0, EPutCursorAtEnd = 0x0, EZeroLengthAllowed = 0x0000001, ENoInitialSelection = 0x0000004,
  EPutCursorAtBeginning = 0x0000008, EUseEdwinCursorAndSelectionFlags = 0x0000010, EPredictiveTextEntryPermitted = 0x0020
}

Public Member Functions

IMPORT_C  CAknTextSettingPage (TInt aResourceID, TDes &aText, TInt aTextSettingPageFlags=0)
  Simple constructor depending only on a single resource Id.
IMPORT_C  CAknTextSettingPage (const TDesC *aSettingTitleText, TInt aSettingNumber, TInt aControlType, TInt aEditorResourceId, TInt aSettingPageResourceId, TDes &aText, TInt aTextSettingPageFlags=0)
  Constructor that allows separate setting page and editor resources.
virtual IMPORT_C void  ConstructL ()
  2nd stage construction for this specific type.
IMPORT_C void  HandlePointerEventL (const TPointerEvent &aPointerEvent)
  From CCoeControl.

Protected Member Functions

virtual IMPORT_C  ~CAknTextSettingPage ()
  C++ destructor.
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 text updated.
virtual IMPORT_C void  AcceptSettingL ()
  Called when the user accepts the text 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  HandleControlEventL (CCoeControl *aControl, TCoeEvent aEventType)
  From MCoeControlObserver: Acts upon changes in the hosted control's state.
virtual IMPORT_C void  CheckAndSetDataValidity ()
  Framework method to set the validity of the data This is called when the data changes.
virtual IMPORT_C void  UpdateTextL ()
  This method copies out the text from the editor into the client's descriptor.
virtual IMPORT_C void  UpdateCbaL ()
  Update the CBA.
virtual IMPORT_C TBool  OkToExitL (TBool aAccept)
  Framework method to determine if it is OK to exit the setting page.
IMPORT_C TKeyResponse  OfferKeyEventL (const TKeyEvent &aKeyEvent, TEventCode aType)
  This routine routes the keys to the editor.
virtual IMPORT_C void  SizeChanged ()
  From CCoeControl This routine is called as part of the set-up of the control.
virtual IMPORT_C void  WriteInternalStateL (RWriteStream &aWriteStream) const
  Writes the internal state of the control and its components to aStream.

Member Enumeration Documentation

enum CAknTextSettingPage::TAknTextSettingPageFlags
 
Enumerator:
EZeroLengthNotOffered 
EPutCursorAtEnd 
EZeroLengthAllowed 
ENoInitialSelection 
EPutCursorAtBeginning 
EUseEdwinCursorAndSelectionFlags 
EPredictiveTextEntryPermitted 

Constructor & Destructor Documentation

IMPORT_C CAknTextSettingPage::CAknTextSettingPage TInt  aResourceID,
TDes &  aText,
TInt  aTextSettingPageFlags = 0
 

Simple constructor depending only on a single resource Id.

Editor resource is given via the link in the setting page resource.

Parameters:
aSettingPageResourceId  Setting Page to use (if present)
aText  Reference to text for editing
aTextSettingPageFlags  option flags for miscellaneous things
IMPORT_C CAknTextSettingPage::CAknTextSettingPage const TDesC *  aSettingTitleText,
TInt  aSettingNumber,
TInt  aControlType,
TInt  aEditorResourceId,
TInt  aSettingPageResourceId,
TDes &  aText,
TInt  aTextSettingPageFlags = 0
 

Constructor that allows separate setting page and editor resources.

This constructor allows the use of setting page using only the editor resource. Other combinations are also possible

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 (Effectively like the other constructor) present = 0 Default Avkon SP resource if used + this editor resource = 0 = 0 uses default resource for both SP and editor. This is OK if: i) control type is present, ii) a default resource exists ( OK for text, integer, date, time, duration )

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. Note that this buffer must be owned by the client until ExecuteLD has been called.

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.

Parameters:
aSettingTitleText  Text at top of setting pane; OWNED EXTERNALLY
aSettingNumber  Number at top left (if present)
aControlType  Determines the type constructed and how its resource is read
aEditorResourceId  Editor resource to use in the setting page (if present)
aSettingPageResourceId  Setting Page to use (if present)
aText  Reference to text for editing
aTextSettingPageFlags  option flags for miscellaneous things
virtual IMPORT_C CAknTextSettingPage::~CAknTextSettingPage  )  [protected, virtual]
 

C++ destructor.


Member Function Documentation

virtual IMPORT_C void CAknTextSettingPage::AcceptSettingL  )  [protected, virtual]
 

Called when the user accepts the text and the setting page is about to be dismissed.

The latest value of the text is written to the client's object

Reimplemented from CAknSettingPage.

virtual IMPORT_C void CAknTextSettingPage::CheckAndSetDataValidity  )  [protected, virtual]
 

Framework method to set the validity of the data This is called when the data changes.

Reimplemented from CAknSettingPage.

virtual IMPORT_C void CAknTextSettingPage::ConstructL  )  [virtual]
 

2nd stage construction for this specific type.

Calls BaseConstructL in CAknSettingPage, where the object is constructed from resource.

After calling this method, the contained editor is fully constructed and has its text set, copied from the aText parameter of the constructor.

This constructor can be called prior to a call to ExecuteLD in order to ensure construction of the editor if API needs to be called on it prior to setting page launch. ExecuteLD will not attempt itself to do the construction a 2nd time.

Reimplemented from CAknSettingPage.

virtual IMPORT_C void CAknTextSettingPage::DynamicInitL  )  [protected, virtual]
 

Called immediately prior to activation of the dialog.

Framework routine for derived classes.

Reimplemented from CAknSettingPage.

virtual IMPORT_C void CAknTextSettingPage::HandleControlEventL CCoeControl *  aControl,
TCoeEvent  aEventType
[protected, virtual]
 

From MCoeControlObserver: Acts upon changes in the hosted control's state.

If the EUpdateWhenChanged flag is set, this updates the setting text.

Parameters:
aControl  The control changing its state (not used)
aEventType  The type of control event

Reimplemented from CAknSettingPage.

IMPORT_C void CAknTextSettingPage::HandlePointerEventL const TPointerEvent &  aPointerEvent  ) 
 

From CCoeControl.

Handles pointer events

Reimplemented from CAknEdwinSettingPage.

IMPORT_C TKeyResponse CAknTextSettingPage::OfferKeyEventL const TKeyEvent &  aKeyEvent,
TEventCode  aType
[protected]
 

This routine routes the keys to the editor.

However, if the menu is showing, then events are sent to the menu.

Parameters:
aKeyEvent  event information
aType  type of event being handled

Reimplemented from CAknSettingPage.

virtual IMPORT_C TBool CAknTextSettingPage::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.

Parameters:
aAccept  ETrue if the user has indicated to accept the setting page; EFalse otherwise
Returns:
TBool a value indicating whether the setting page should be dismissed

Reimplemented from CAknSettingPage.

virtual IMPORT_C void CAknTextSettingPage::RestoreOriginalSettingL  )  [protected, virtual]
 

Called when the user rejects the setting.

A backed up copy is used to restore the initial value

Reimplemented from CAknSettingPage.

virtual IMPORT_C void CAknTextSettingPage::SizeChanged  )  [protected, virtual]
 

From CCoeControl This routine is called as part of the set-up of the control.

It is the place to put the layout code.

Implements CAknEdwinSettingPage.

virtual IMPORT_C void CAknTextSettingPage::UpdateCbaL  )  [protected, virtual]
 

Update the CBA.

This should be called after a control state change in case there has been a change in data validity.

Reimplemented from CAknSettingPage.

virtual IMPORT_C void CAknTextSettingPage::UpdateSettingL  )  [protected, virtual]
 

Called when something has changed and the client's object needs to have its text updated.

Reimplemented from CAknSettingPage.

virtual IMPORT_C void CAknTextSettingPage::UpdateTextL  )  [protected, virtual]
 

This method copies out the text from the editor into the client's descriptor.

virtual IMPORT_C void CAknTextSettingPage::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.

Parameters:
aWriteSteam  A connected write stream

Reimplemented from CAknSettingPage.


The documentation for this class was generated from the following file:

Copyright © Nokia Corporation 2001-2008
Back to top