class CEikSecretEditor : public CEikBorderedControl |
A single line text editor which displays an asterisk for every character entered.
The editor is suitable for editing confidential information such as a password. You can paste to the editor but no other clipboard functions are available.
The editor has an associated resource struct SECRETED and control factory identifier EEikCtSecretEd.
Protected Member Functions | |
---|---|
IMPORT_C void | AppendCharacterL(TInt) |
void | InsertSecretChar() |
IMPORT_C void | SizeChanged() |
IMPORT_C void | Update() |
Public Member Enumerations | |
---|---|
enum | anonymous { EMaxSecEdBufLength = 32, EMaxSecEdSecArrayLength = 255 } |
enum | TFeatureId { EDisablePenInput, ELaunchPenInputAutomatic, EPartialScreenInput } |
Inherited Enumerations | |
---|---|
CCoeControl:TZoomType |
Private Member Type Definitions | |
---|---|
typedef | TBuf< EMaxSecEdBufLength > TSecEdBuf |
Protected Attributes | |
---|---|
TInt | iAscent |
TSecEdBuf | iBuf |
TBool | iBufferFull |
TInt | iCharWidth |
TInt | iMaxLen |
HBufC * | iSecCharArr |
TInt | iSecPos |
Private Attributes | |
---|---|
CGraphicsContext::TTextAlign | iAlign |
CEikSecretEditorExtension * | iExtension |
CState * | iFepState |
const CFont * | iFont |
HBufC * | iInlineEditText |
TBool | iRevealSecretText |
CPeriodic * | iTimer |
Inherited Attributes | |
---|---|
CCoeControl::iCoeEnv | |
CCoeControl::iContext | |
CCoeControl::iPosition | |
CCoeControl::iSize | |
CEikBorderedControl::iBorder |
IMPORT_C | CEikSecretEditor | ( | ) |
Default constructor.
This constructs a editor with a border type of TGulBorder::ESingleGray.
This function should be used as the first stage in two stage construction, followed by a call to either ConstructFromResourceL() or SetMaxLength().
IMPORT_C void | AknSetAlignment | ( | const CGraphicsContext::TTextAlign & | aAlign | ) |
Sets the alignment of the editor.
const CGraphicsContext::TTextAlign & aAlign | The editor's alignment. |
IMPORT_C void | AknSetFont | ( | const CFont & | aFont | ) |
Sets the font that is used to draw the text in this editor.
const CFont & aFont | A pointer to a CFont object that is used to draw the text in this editor. |
IMPORT_C void | AppendCharacterL | ( | TInt | aKeyCode | ) | [protected, virtual] |
Appends a character to the editor.
TInt aKeyCode | The character to append. |
IMPORT_C const TDesC & | Buffer | ( | ) | const |
Access method for getting at the buffer without copying out from it.
Non-modifiable descriptor reference to the contained buffer.
IMPORT_C void | ConstructFromResourceL | ( | TResourceReader & | aReader | ) | [virtual] |
Second-phase construction from a resource file.
This function reads the number of characters which may be entered by the user into the editor from a SECRETED resource. You should call either this function or SetMaxLength() before drawing the editor and offering key events, otherwise the editor will not accept text input.
panic
EIKCTL 13 If the value read from resource is greater than EMaxSecEdLength.
TResourceReader & aReader | A resource file reader. |
IMPORT_C MCoeFepAwareTextEditor_Extension1::CState * | CreateFepStateL | ( | ) | [private, virtual] |
IMPORT_C void | Draw | ( | const TRect & | aRect | ) | const [private, virtual] |
From CCoeControl. Draws the border around the control. This function also clears the central area if the IsBlank() method returns ETrue.
From CCoeControl
const TRect & aRect | Not used. |
IMPORT_C void | EnableSCT | ( | TBool | aEnable = ETrue | ) |
Method for enabling/disabling special character table from the secret editor. By default the SCT is enabled in the secret editors. ConstructFromResourceL need to be called before this method.
3.2
TBool aEnable = ETrue | Boolean value for enabling or disabling the special character table. |
IMPORT_C MCoeFepAwareTextEditor_Extension1 * | Extension1 | ( | TBool & | aSetToTrue | ) | [private] |
TBool & aSetToTrue |
IMPORT_C void * | ExtensionInterface | ( | TUid | aInterface | ) | [private, virtual] |
From CAknControl
TUid aInterface |
IMPORT_C void | FocusChanged | ( | TDrawNow | aDrawNow | ) | [virtual] |
TDrawNow aDrawNow |
IMPORT_C void | GetColorUseListL | ( | CArrayFix< TCoeColorUse > & | aColorUseList | ) | const [virtual] |
Gets the list of logical colours used to draw the editor.
Overrides CCoeControl::GetColorUseListL().
CArrayFix< TCoeColorUse > & aColorUseList | On return, the colour list. |
IMPORT_C void | GetCursorSelectionForFep | ( | TCursorSelection & | aCursorSelection | ) | const [private] |
TCursorSelection & aCursorSelection |
IMPORT_C void | GetEditorContentForFep | ( | TDes & | aEditorContent, |
TInt | aDocumentPosition, | |||
TInt | aLengthToRetrieve | |||
) | const [private] |
IMPORT_C TInt | GetFeature | ( | TInt | aFeatureId, |
TInt & | aFeatureParam | |||
) | const |
Used to getting feature statuses.
KErrNone if the feature is supported and fetching its value succeeded
S60 5.0
IMPORT_C void | GetFormatForFep | ( | TCharFormat & | aFormat, |
TInt | aDocumentPosition | |||
) | const [private] |
TCharFormat & aFormat | |
TInt aDocumentPosition |
IMPORT_C void | GetScreenCoordinatesForFepL | ( | TPoint & | aLeftSideOfBaseLine, |
TInt & | aHeight, | |||
TInt & | aAscent, | |||
TInt | aDocumentPosition | |||
) | const [private] |
IMPORT_C void | GetText | ( | TDes & | aText | ) | const |
Gets the editor's text string.
This may be called from the container class when the model data should be updated according to the text contained in the editor.
TDes & aText | On return, the editor's text. This is what is stored in memory, not what is displayed. This descriptor must be capable of holding the maxlength of the internal buffer. |
IMPORT_C void | HandlePointerEventL | ( | const TPointerEvent & | aPointerEvent | ) | [virtual] |
From CCoeControl.
Handles pointer events.
const TPointerEvent & aPointerEvent | The pointer event. |
IMPORT_C void | HandleResourceChange | ( | TInt | aType | ) | [virtual] |
Handles a change to the editor's resources.
The types of resources handled are those which are shared across the environment, e.g. colours or fonts.
TInt aType | A message UID value. |
IMPORT_C void | InitializeDisplay | ( | TInt | aNumberOfChars | ) | [virtual] |
Set the initial display of the secret editor. Calling this routine doesn't affect the actual character buffer.
TInt aNumberOfChars |
IMPORT_C TCoeInputCapabilities | InputCapabilities | ( | ) | const [virtual] |
Gets the editor's input capabilities.
Overrides CCoeControl::InputCapabilities().
If this function is overrided in a subclass, the subclass should obtain this class' InputCapabilities' object provider through TCoeInputCapabilities::ObjectProvider() and set that as a part of the subclass' InputCapabilities object provider chain to ensure maximum functionality.
The editor's input capabilities. The ESecretText and ENavigation flags are set.
IMPORT_C void | MCoeFepAwareTextEditor_Extension1_Reserved_2 | ( | ) | [private, virtual] |
IMPORT_C void | MCoeFepAwareTextEditor_Extension1_Reserved_3 | ( | ) | [private, virtual] |
IMPORT_C void | MCoeFepAwareTextEditor_Extension1_Reserved_4 | ( | ) | [private, virtual] |
IMPORT_C TInt | MaxLength | ( | ) | const |
Returns the current maximum length of the internal buffer.
the current maximum length of the internal buffer.
IMPORT_C TSize | MinimumSize | ( | ) | [virtual] |
Gets the editor's minimum size in pixels.
Overrides CCoeControl::MinimumSize().
The editor's minimum size in pixels.
IMPORT_C TKeyResponse | OfferKeyEventL | ( | const TKeyEvent & | aKeyEvent, |
TEventCode | aType | |||
) | [virtual] |
Responds to key presses.
Overrides CCoeControl::OfferKeyEventL().
Indicates whether or not the key event was consumed.
const TKeyEvent & aKeyEvent | The key event. |
TEventCode aType | Not used. |
IMPORT_C void | RevealSecretText | ( | TBool | aReveal | ) |
Method to reveal (or hide) the currently input editor contents.
TBool aReveal | - if ETrue, reveals the contents; if EFalse hides them. |
IMPORT_C void | SetCursorSelectionForFepL | ( | const TCursorSelection & | aCursorSelection | ) | [private] |
const TCursorSelection & aCursorSelection |
IMPORT_C void | SetDefaultInputMode | ( | TInt | aInputMode | ) |
Changes default and current input mode of a secret editor. By default input mode in the secret editor is alpha input mode (EAknEditorSecretAlphaInputMode). By using this method the default input mode can be changed to numeric input mode (EAknEditorNumericInputMode).
2.1
TInt aInputMode | Default input mode in the secret editor. Only EAknEditorNumericInputMode and EAknEditorSecretAlphaInputMode are supported. |
IMPORT_C TInt | SetFeature | ( | TInt | aFeatureId, |
TInt | aFeatureParam | |||
) |
Used for setting various flag-like features to the editor.
KErrNone if the feature modification succeeded
S60 5.0
IMPORT_C void | SetInlineEditingCursorVisibilityL | ( | TBool | aCursorVisibility | ) | [private] |
TBool aCursorVisibility |
IMPORT_C void | SetMaxLength | ( | TInt | aMaxLength | ) |
Set the maximum length of the editor.
This is the maximum number of characters which may be entered by the user into the editor.
panic
EIKCTL 13 If aMaxLength is greater than EMaxSecEdLength.
TInt aMaxLength | The maximum number of characters which may be entered. |
IMPORT_C void | SetSkinBackgroundControlContextL | ( | MAknsControlContext * | aContext | ) |
Set the skin control context to be used with this secret editor. If this method is not called, the control context available through MOP (if any) is used. If NULL control context is specified, no control context is used at all.
2.0
MAknsControlContext * aContext | The background control context used to draw the background of this editor or NULL. Ownership is not transferred. |
IMPORT_C void | SetSkinTextColorL | ( | TInt | aAknSkinIDForTextColor, |
TInt | aAknSkinIdForBgColor = KErrNotFound | |||
) |
Sets the colors for text and background as skin IDs.
3.0
TInt aAknSkinIDForTextColor | ID for text color. |
TInt aAknSkinIdForBgColor = KErrNotFound |
IMPORT_C void | SetStateTransferingOwnershipL | ( | CState * | aState, |
TUid | aTypeSafetyUid | |||
) | [private] |
CState * aState | |
TUid aTypeSafetyUid |
IMPORT_C void | SetText | ( | const TDesC & | aText | ) | [virtual] |
Set the contents of the character buffer.
const TDesC & aText | The text to be set as the contents of the character buffer. |
IMPORT_C void | SizeChanged | ( | ) | [protected, virtual] |
Responds to changes to the size and position of the contents of this control.
Overrides CCoeControl::SizeChanged().
IMPORT_C void | StartFepInlineEditL | ( | const TDesC & | aInitialInlineText, |
TInt | aPositionOfInsertionPointInInlineText, | |||
TBool | aCursorVisibility, | |||
const MFormCustomDraw * | aCustomDraw, | |||
MFepInlineTextFormatRetriever & | aInlineTextFormatRetriever, | |||
MFepPointerEventHandlerDuringInlineEdit & | aPointerEventHandlerDuringInlineEdit | |||
) | [private] |
const TDesC & aInitialInlineText | |
TInt aPositionOfInsertionPointInInlineText | |
TBool aCursorVisibility | |
const MFormCustomDraw * aCustomDraw | |
MFepInlineTextFormatRetriever & aInlineTextFormatRetriever | |
MFepPointerEventHandlerDuringInlineEdit & aPointerEventHandlerDuringInlineEdit |
IMPORT_C TBool | SupportsFeature | ( | TInt | aFeatureId | ) | const |
Used for checking if the editor supports a feature. For features, see TFeatureId.
ETrue if the feature is supported
S60 5.0
TInt aFeatureId |
IMPORT_C void | UpdateFepInlineTextL | ( | const TDesC & | aNewInlineText, |
TInt | aPositionOfInsertionPointInInlineText | |||
) | [private] |
EMaxSecEdBufLength = 32 |
The maximum number of characters in the displayed text buffer. |
EMaxSecEdSecArrayLength = 255 |
Indicates the maximum number of characters which may be entered into the editor. Editors additionally have a maximum length, see SetMaxLength(), which must not exceed this value. |
Settable features for Secret Editor. See SetFeature().
S60 5.0
EDisablePenInput |
Disables VKB. Non-zero (or ETrue) parameter disables VKB, 0 (or EFalse) enables VKB. When disabled, editor doesn't request PenInputServer to start VKB |
ELaunchPenInputAutomatic | |
EPartialScreenInput |