Symbian
Symbian Developer Library

SYMBIAN OS V9.4

Feedback

[Index] [Previous] [Next]

#include <COEINPUT.H>
Link against: cone.lib

Class TCoeInputCapabilities

class TCoeInputCapabilities;

Description

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

Members

Defined in TCoeInputCapabilities:


Construction and destruction


TCoeInputCapabilities()

IMPORT_C TCoeInputCapabilities();

Description


TCoeInputCapabilities(TUint)

IMPORT_C TCoeInputCapabilities(TUint aCapabilities);

Description

Constructor which initialises the capabilities.

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

Parameters

TUint aCapabilities

A 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_C TCoeInputCapabilities(TUint aCapabilities, MCoeFepAwareTextEditor *aFepAwareTextEditor, MCoeCaptionRetrieverForFep *aCaptionRetrieverForFep);

Description

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

Parameters

TUint aCapabilities

A 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.

MCoeFepAwareTextEditor *aFepAwareTextEditor

A 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.

MCoeCaptionRetrieverForFep *aCaptionRetrieverForFep

A caption retriever for a FEP.


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

IMPORT_C TCoeInputCapabilities(TUint aCapabilities, MCoeFepAwareTextEditor *aFepAwareTextEditor, MCoeCaptionRetrieverForFep *aCaptionRetrieverForFep, TUid aFepUid, MCoeFepSpecificExtensions *aFepSpecificExtensions);

Description

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()const and/or CCoeAppUi::InputCapabilities()const, 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.

Parameters

TUint aCapabilities

A 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.

MCoeFepAwareTextEditor *aFepAwareTextEditor

A 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.

MCoeCaptionRetrieverForFep *aCaptionRetrieverForFep

A caption retriever for a FEP.

TUid aFepUid

The UID of the FEP for which the extended capabilities aFepSpecificExtensions apply.

MCoeFepSpecificExtensions *aFepSpecificExtensions

FEP specific extensions supported by the control or app UI returning this object.

See also:


TCoeInputCapabilities(const TCoeInputCapabilities &)

IMPORT_C TCoeInputCapabilities(const TCoeInputCapabilities &aAnother);

Description

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

Parameters

const TCoeInputCapabilities &aAnother

The input capabilities object to be copied.

[Top]


Member functions


operator=(const TCoeInputCapabilities &)

IMPORT_C TCoeInputCapabilities& operator=(const TCoeInputCapabilities &aAnother);

Description

Assignment operator.

This copies the capabilities of aAnother into this object.

Parameters

const TCoeInputCapabilities &aAnother

The object to be copied

Return value

TCoeInputCapabilities &

This object.


operator==(const TCoeInputCapabilities &)const

IMPORT_C TBool operator==(const TCoeInputCapabilities &aAnother) const;

Description

Equality operator.

Compares this and aAnother for equality.

Parameters

const TCoeInputCapabilities &aAnother

The object to be compared to this object.

Return value

TBool

ETrue if the objects are equal, otherwise EFalse.


operator!=(const TCoeInputCapabilities &)const

IMPORT_C TBool operator!=(const TCoeInputCapabilities &aAnother) const;

Description

Inequality operator.

Compares this and aAnother for inequality.

Parameters

const TCoeInputCapabilities &aAnother

The object to be compared to this object.

Return value

TBool

ETrue if aAnother is not equal to this object, otherwise EFalse.


MergeWith(const TCoeInputCapabilities &)

IMPORT_C void MergeWith(const TCoeInputCapabilities &aAnother);

Description

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

const TCoeInputCapabilities &aAnother

The capabilities to be merged.


SetCapabilities(TUint)

IMPORT_C void SetCapabilities(TUint aCapabilities);

Description

Sets the input capability flags of this object.

Parameters

TUint aCapabilities

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

See also:


Capabilities()const

IMPORT_C TUint Capabilities() const;

Description

Gets the input capability flags of this object.

Return value

TUint

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

See also:


IsNone()const

IMPORT_C TBool IsNone() const;

Description

Tests whether the control supports any type of text input.

Return value

TBool

ETrue if no text input is supported, otherwise EFalse.


SupportsWesternNumericIntegerPositive()const

IMPORT_C TBool SupportsWesternNumericIntegerPositive() const;

Description

Tests whether the control supports entry of positive integers.

Return value

TBool

ETrue if positive integers are supported, otherwise EFalse.


SupportsWesternNumericIntegerNegative()const

IMPORT_C TBool SupportsWesternNumericIntegerNegative() const;

Description

Tests whether the control supports entry of negative integers.

Return value

TBool

ETrue if negative integers are supported, otherwise EFalse.


SupportsWesternNumericReal()const

IMPORT_C TBool SupportsWesternNumericReal() const;

Description

Tests whether the control supports entry of real numbers.

Return value

TBool

ETrue if real numbers are supported, otherwise EFalse.


SupportsWesternAlphabetic()const

IMPORT_C TBool SupportsWesternAlphabetic() const;

Description

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

Return value

TBool

ETrue if the western alphabet is supported, otherwise EFalse.


SupportsJapaneseHiragana()const

IMPORT_C TBool SupportsJapaneseHiragana() const;

Description

Tests whether the control supports text input in Japanese Hiragana.

Return value

TBool

ETrue if Japanese Hiragana is supported, otherwise EFalse.


SupportsJapaneseKatakanaHalfWidth()const

IMPORT_C TBool SupportsJapaneseKatakanaHalfWidth() const;

Description

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

Return value

TBool

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


SupportsJapaneseKatakanaFullWidth()const

IMPORT_C TBool SupportsJapaneseKatakanaFullWidth() const;

Description

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

Return value

TBool

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


SupportsDialableCharacters()const

IMPORT_C TBool SupportsDialableCharacters() const;

Description

Tests whether the control supports dialable characters as text input.

Return value

TBool

ETrue if dialable characters are supported, otherwise EFalse.


SupportsSecretText()const

IMPORT_C TBool SupportsSecretText() const;

Description

Tests whether the control supports secret text.

Return value

TBool

ETrue if secret text is supported, otherwise EFalse.


SupportsAutoSentenceCase()const

IMPORT_C TBool SupportsAutoSentenceCase() const;

Description

Tests whether the control supports auto sentence case.

Return value

TBool

ETrue if auto sentence case is supported, otherwise EFalse.


SupportsNonPredictive()const

IMPORT_C TBool SupportsNonPredictive() const;

Description

Tests whether the control supports non-predictive input.

Return value

TBool

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


SupportsAllText()const

IMPORT_C TBool SupportsAllText() const;

Description

Tests whether the control supports all types of text input.

Return value

TBool

ETrue if all text input is supported, otherwise EFalse.


SupportsNavigation()const

IMPORT_C TBool SupportsNavigation() const;

Description

Tests whether the control supports navigation keys.

Return value

TBool

ETrue if navigation keys are supported, otherwise EFalse.


FepAwareTextEditor()const

IMPORT_C MCoeFepAwareTextEditor* FepAwareTextEditor() const;

Description

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

Return value

MCoeFepAwareTextEditor *

The FEP aware text editor object pointed to by this object


CaptionRetrieverForFep()const

IMPORT_C MCoeCaptionRetrieverForFep* CaptionRetrieverForFep() const;

Description

Gets the caption retriever pointed to by this object.

Return value

MCoeCaptionRetrieverForFep *

The caption retriever pointed to by this object.


FepSpecificExtensions(TUid)const

IMPORT_C MCoeFepSpecificExtensions* FepSpecificExtensions(TUid aFepUid) const;

Description

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()const and/or CCoeAppUi::InputCapabilities()const. 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

TUid aFepUid

The UID of the current FEP.

Return value

MCoeFepSpecificExtensions *

NULL if there are no FEP specific input capabilities or if the FEP is not "known" about by the application.


ObjectProvider()const

IMPORT_C MObjectProvider* ObjectProvider() const;

Description

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

MObjectProvider *

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


SetObjectProvider(MObjectProvider *)

IMPORT_C void SetObjectProvider(MObjectProvider *aObjectProvider);

Description

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

MObjectProvider *aObjectProvider

The object provider.

[Top]


Member enumerations


Enum anonymous

n/a

Description

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

ENone

No text input capabilities supported.

EWesternNumericIntegerPositive

Supports positive western integers.

EWesternNumericIntegerNegative

Supports negative western integers.

EWesternNumericReal

Supports real numbers.

EWesternAlphabetic

Supports the western alphabets.

EJapaneseHiragana

Supports Hiragana.

EJapaneseKatakanaHalfWidth

Supports half width Katakana.

EJapaneseKatakanaFullWidth

Supports full width Katakana.

EDialableCharacters

Supports dialable characters

ESecretText

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

EAutoSentenceCase

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.

ENonPredictive

Supports non-predictive input.

EAllText

Supports all types of text.

ENavigation

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