TCoeInputCapabilities Class Reference

#include <mw/coeinput.h>

class TCoeInputCapabilities
Public Member Enumerations
enumanonymous { ENone, EWesternNumericIntegerPositive, EWesternNumericIntegerNegative, EWesternNumericReal, ..., ENavigation }
Public Member Functions
TCoeInputCapabilities()
TCoeInputCapabilities(TUint)
TCoeInputCapabilities(TUint, MCoeFepAwareTextEditor *, MCoeCaptionRetrieverForFep *)
TCoeInputCapabilities(TUint, MCoeFepAwareTextEditor *, MCoeCaptionRetrieverForFep *, TUid, MCoeFepSpecificExtensions *)
TCoeInputCapabilities(const TCoeInputCapabilities &)
IMPORT_C TUintCapabilities()
IMPORT_C MCoeCaptionRetrieverForFep *CaptionRetrieverForFep()
IMPORT_C MCoeFepAwareTextEditor *FepAwareTextEditor()
IMPORT_C MCoeFepSpecificExtensions *FepSpecificExtensions(TUid)
IMPORT_C TBoolIsNone()
IMPORT_C voidMergeWith(const TCoeInputCapabilities &)
IMPORT_C MObjectProvider *ObjectProvider()
IMPORT_C voidSetCapabilities(TUint)
IMPORT_C voidSetObjectProvider(MObjectProvider *)
IMPORT_C TBoolSupportsAllText()
IMPORT_C TBoolSupportsAutoSentenceCase()
IMPORT_C TBoolSupportsDialableCharacters()
IMPORT_C TBoolSupportsJapaneseHiragana()
IMPORT_C TBoolSupportsJapaneseKatakanaFullWidth()
IMPORT_C TBoolSupportsJapaneseKatakanaHalfWidth()
IMPORT_C TBoolSupportsNavigation()
IMPORT_C TBoolSupportsNonPredictive()
IMPORT_C TBoolSupportsSecretText()
IMPORT_C TBoolSupportsWesternAlphabetic()
IMPORT_C TBoolSupportsWesternNumericIntegerNegative()
IMPORT_C TBoolSupportsWesternNumericIntegerPositive()
IMPORT_C TBoolSupportsWesternNumericReal()
IMPORT_C TBooloperator!=(const TCoeInputCapabilities &)
IMPORT_C TCoeInputCapabilities &operator=(const TCoeInputCapabilities &)
IMPORT_C TBooloperator==(const TCoeInputCapabilities &)

Detailed Description

Describes which forms of text input are consumed by a control or view.

Member Enumeration Documentation

Enum anonymous

Text input capability flags. These are used to define the text input capabilities of a control or view.

EnumeratorValueDescription
ENone0

No text input capabilities supported.

EWesternNumericIntegerPositive0x00000001

Supports positive western integers.

EWesternNumericIntegerNegative0x00000002

Supports negative western integers.

EWesternNumericReal0x00000004

Supports real numbers.

EWesternAlphabetic0x00000008

Supports the western alphabets.

EJapaneseHiragana0x00000010

Supports Hiragana.

EJapaneseKatakanaHalfWidth0x00000020

Supports half width Katakana.

EJapaneseKatakanaFullWidth0x00000040

Supports full width Katakana.

EDialableCharacters0x00000080

Supports dialable characters

ESecretText0x00000100

Supports secret text. This is text in which characters appear as asterisks.

EAutoSentenceCase0x00000200

Supports auto sentence case. This is text in which first word in a sentence begins with an uppercase letter, with all other letters and words in lowercase.

ENonPredictive0x00000400

Supports non-predictive input.

EAllText0x01000000

Supports all types of text.

ENavigation0x02000000

Supports navigation keys. These include arrow keys, page-up, page-down, home, end, tab, etc.

Constructor & Destructor Documentation

TCoeInputCapabilities ( )

IMPORT_CTCoeInputCapabilities()

TCoeInputCapabilities ( TUint )

IMPORT_CTCoeInputCapabilities(TUintaCapabilities)

Constructor which initialises the capabilities.

The new object has NULL pointers to the FEP aware text editor and the FEP caption retriever objects.

Parameters
aCapabilitiesA bitmask of the text input capability flags giving the supported capabilities. The possible flags are given in the anonymous enumeration in this class, beginning with ENone.

TCoeInputCapabilities ( TUint, MCoeFepAwareTextEditor *, MCoeCaptionRetrieverForFep * )

IMPORT_CTCoeInputCapabilities(TUintaCapabilities,
MCoeFepAwareTextEditor *aFepAwareTextEditor,
MCoeCaptionRetrieverForFep *aCaptionRetrieverForFep
)

Constructor which sets the capabilities, a FEP aware text editor and a FEP caption retriever object.

Parameters
aCapabilitiesA bitmask of the text input capability flags giving the supported capabilities. The possible flags are given in the anonymous enumeration in this class, beginning with ENone.
aFepAwareTextEditorA FEP aware text editor. This enables FEPs to do things like inline editing, retrieving portions of text, enquiring the position of the insertion-point (cursor), etc.
aCaptionRetrieverForFepA caption retriever for a FEP.

TCoeInputCapabilities ( TUint, MCoeFepAwareTextEditor *, MCoeCaptionRetrieverForFep *, TUid, MCoeFepSpecificExtensions * )

IMPORT_CTCoeInputCapabilities(TUintaCapabilities,
MCoeFepAwareTextEditor *aFepAwareTextEditor,
MCoeCaptionRetrieverForFep *aCaptionRetrieverForFep,
TUidaFepUid,
MCoeFepSpecificExtensions *aFepSpecificExtensions
)

Constructor which sets the capabilities, a FEP aware text editor, a FEP caption retriever object, a FEP UID and a FEP specific extensions object.

This overload is provided to allow an application to report its specialised input capabilities, if any, to a FEP. The application should override CCoeControl::InputCapabilities() and/or CCoeAppUi::InputCapabilities(), to return a TCoeInputCapabilities object created using this overload, passing the FEP's UID (as published in its header file) and the address of a MCoeFepSpecificExtensions object.

See also: FepSpecificExtensions()

Parameters
aCapabilitiesA bitmask of the text input capability flags giving the supported capabilities. The possible flags are given in the anonymous enumeration in this class, beginning with ENone.
aFepAwareTextEditorA FEP aware text editor. This enables FEPs to do things like inline editing, retrieving portions of text, enquiring the position of the insertion-point (cursor), etc.
aCaptionRetrieverForFepA caption retriever for a FEP.
aFepUidThe UID of the FEP for which the extended capabilities aFepSpecificExtensions apply.
aFepSpecificExtensionsFEP specific extensions supported by the control or app UI returning this object.

TCoeInputCapabilities ( const TCoeInputCapabilities & )

IMPORT_CTCoeInputCapabilities(const TCoeInputCapabilities &aAnother)

Copy constructor. Constructs this object using the capabilities of another instance.

Parameters
aAnotherThe input capabilities object to be copied.

Member Function Documentation

Capabilities ( )

IMPORT_C TUintCapabilities()const

Gets the input capability flags of this object.

See also: SetCapabilities()

Return Value
The input capabilities. This is a bitwise OR of one or more values from the anonymous enum in this class.

CaptionRetrieverForFep ( )

IMPORT_C MCoeCaptionRetrieverForFep *CaptionRetrieverForFep()const

Gets the caption retriever pointed to by this object.

Return Value
The caption retriever pointed to by this object.

FepAwareTextEditor ( )

IMPORT_C MCoeFepAwareTextEditor *FepAwareTextEditor()const

Gets the FEP aware text editor object pointed to by this object.

Return Value
The FEP aware text editor object pointed to by this object

FepSpecificExtensions ( TUid )

IMPORT_C MCoeFepSpecificExtensions *FepSpecificExtensions(TUidaFepUid)const

Gets the specialised input capabilities of the application.

This function is called by the FEP and returns the specialised capabilities supported by the application. If the application has no specialised input capabilities, or if the application does not know about this FEP, the function returns NULL.

Notes:

The application only knows about one FEP. This is the one that was written to implement its specialised capabilities. If aFepUid does not match the UID of this known FEP then NULL is returned.

If an MCoeFepSpecificExtensions is returned, the FEP then calls the supported extension functions in the application via its virtual interface. The functions return some value, which, depending on the current context, may instruct the FEP to perform some actions.

Background information:

The specialised capabilities are defined as pure virtual functions in the concrete FEP's MCoeFepSpecificExtensions interface, and are implemented by the app UI.

When the focus in the app UI changes, the FEP queries the application's capabilities using CCoeControl::InputCapabilities() and/or CCoeAppUi::InputCapabilities(). It then gets the extensions using this function.

The FEP then calls any member functions of MCoeFepSpecificExtensions that it needs to (to inquire about the extended capabilities). The functions return a value to the FEP instructing it to perform an action, if that extended functionality is appropriate to the current state of the application.

Parameters
aFepUidThe UID of the current FEP.
Return Value
NULL if there are no FEP specific input capabilities or if the FEP is not "known" about by the application.

IsNone ( )

IMPORT_C TBoolIsNone()const

Tests whether the control supports any type of text input.

Return Value
ETrue if no text input is supported, otherwise EFalse.

MergeWith ( const TCoeInputCapabilities & )

IMPORT_C voidMergeWith(const TCoeInputCapabilities &aAnother)

Merges the capabilities of a specified TCoeInputCapabilities with this object.

The capabilities are merged using a logical OR. The pointers to the FEP aware text editor, caption retriever and object provider are merged only if this object has NULL pointers.

Parameters
aAnotherThe capabilities to be merged.

ObjectProvider ( )

IMPORT_C MObjectProvider *ObjectProvider()const

Gets the object provider of the control which supplied this TCoeInputCapabilities object.

This function can be called by a FEP to gain access to the object provider tree. For instance, the FEP might need to update an input mode indicator that is located in the same object provider tree as the editor with focus.

Return Value
The object provider. This allows the FEP to access objects in the context of the control which supplied this TCoeInputCapabilities object.

SetCapabilities ( TUint )

IMPORT_C voidSetCapabilities(TUintaCapabilities)

Sets the input capability flags of this object.

See also: Capabilities()

Parameters
aCapabilitiesThe input capabilities. This is a bitwise-"or" of one or more values from the anonymous enum in this class.

SetObjectProvider ( MObjectProvider * )

IMPORT_C voidSetObjectProvider(MObjectProvider *aObjectProvider)

Sets the object provider of the control which supplied this TCoeInputCapabilities object.

This allows the control to give the FEP access to its object provider tree.

Parameters
aObjectProviderThe object provider.

SupportsAllText ( )

IMPORT_C TBoolSupportsAllText()const

Tests whether the control supports all types of text input.

Return Value
ETrue if all text input is supported, otherwise EFalse.

SupportsAutoSentenceCase ( )

IMPORT_C TBoolSupportsAutoSentenceCase()const

Tests whether the control supports auto sentence case.

Return Value
ETrue if auto sentence case is supported, otherwise EFalse.

SupportsDialableCharacters ( )

IMPORT_C TBoolSupportsDialableCharacters()const

Tests whether the control supports dialable characters as text input.

Return Value
ETrue if dialable characters are supported, otherwise EFalse.

SupportsJapaneseHiragana ( )

IMPORT_C TBoolSupportsJapaneseHiragana()const

Tests whether the control supports text input in Japanese Hiragana.

Return Value
ETrue if Japanese Hiragana is supported, otherwise EFalse.

SupportsJapaneseKatakanaFullWidth ( )

IMPORT_C TBoolSupportsJapaneseKatakanaFullWidth()const

Tests whether the control supports text input in full width Japanese Katakana.

Return Value
ETrue if full width Japanese Katakana is supported, otherwise EFalse.

SupportsJapaneseKatakanaHalfWidth ( )

IMPORT_C TBoolSupportsJapaneseKatakanaHalfWidth()const

Tests whether the control supports text input in half width Japanese Katakana.

Return Value
ETrue if half width Japanese Katakana is supported, otherwise EFalse.

SupportsNavigation ( )

IMPORT_C TBoolSupportsNavigation()const

Tests whether the control supports navigation keys.

Return Value
ETrue if navigation keys are supported, otherwise EFalse.

SupportsNonPredictive ( )

IMPORT_C TBoolSupportsNonPredictive()const

Tests whether the control supports non-predictive input.

Return Value
ETrue if non-predictive input is supported, otherwise EFalse.

SupportsSecretText ( )

IMPORT_C TBoolSupportsSecretText()const

Tests whether the control supports secret text.

Return Value
ETrue if secret text is supported, otherwise EFalse.

SupportsWesternAlphabetic ( )

IMPORT_C TBoolSupportsWesternAlphabetic()const

Tests whether the control supports entry of text in the western alphabets.

Return Value
ETrue if the western alphabet is supported, otherwise EFalse.

SupportsWesternNumericIntegerNegative ( )

IMPORT_C TBoolSupportsWesternNumericIntegerNegative()const

Tests whether the control supports entry of negative integers.

Return Value
ETrue if negative integers are supported, otherwise EFalse.

SupportsWesternNumericIntegerPositive ( )

IMPORT_C TBoolSupportsWesternNumericIntegerPositive()const

Tests whether the control supports entry of positive integers.

Return Value
ETrue if positive integers are supported, otherwise EFalse.

SupportsWesternNumericReal ( )

IMPORT_C TBoolSupportsWesternNumericReal()const

Tests whether the control supports entry of real numbers.

Return Value
ETrue if real numbers are supported, otherwise EFalse.

operator!= ( const TCoeInputCapabilities & )

IMPORT_C TBooloperator!=(const TCoeInputCapabilities &aAnother)const

Inequality operator.

Compares this and aAnother for inequality.

Parameters
aAnotherThe object to be compared to this object.
Return Value
ETrue if aAnother is not equal to this object, otherwise EFalse.

operator= ( const TCoeInputCapabilities & )

IMPORT_C TCoeInputCapabilities &operator=(const TCoeInputCapabilities &aAnother)

Assignment operator.

This copies the capabilities of aAnother into this object.

Parameters
aAnotherThe object to be copied
Return Value
This object.

operator== ( const TCoeInputCapabilities & )

IMPORT_C TBooloperator==(const TCoeInputCapabilities &aAnother)const

Equality operator.

Compares this and aAnother for equality.

Parameters
aAnotherThe object to be compared to this object.
Return Value
ETrue if the objects are equal, otherwise EFalse.