![](../../Home/Icons/Home.gif)
![](../icons/UpCNM.gif)
![](../icons/CNMContext.gif)
![](../../Home/Icons/Search.gif)
Taxonomy Categories:
Member Functions:
Interface Category:
API.
Inherits From:
TTypingConfiguration
Inherited By:
None.
Purpose:
Concrete class for editable typing configuration which allows end users to select tools (virtual keyboard, TTextModifiers such as transliterators, and input member functions) appropriate for typing.
The configuration can have one virtual keyboard and zero or more text modifiers.
Instantiation:
Allocate on the heap or the stack.
Deriving Classes:
None.
Concurrency:
Not multithread safe.
Resource Use:
Shared throughout the system so typically installed in shared memory.
- TEditableTypingConfiguration ()
- TEditableTypingConfiguration (const TEditableTypingConfiguration & copy)
Interface Category:
API.
Purpose:
- Default constructor.
- Copy constructor.
Calling Context:
- Called by the stream-in operators and by clients create a new instance ready for editing.
- Called to copy an object.
Parameters:
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
virtual TEditableTypingConfiguration * Copy (TMemoryHeap * thisHeap =NIL) const
Interface Category:
API.
Purpose:
Creates a copy of this configuration on the specified heap.
Calling Context:
Called by editor programs. Configurations are typically modifications of existing configurations, so would be called before editing a new configuration based on a previous one.
Parameters:
- TMemoryHeap * thisHeap =NIL -The heap in which to create the copy.
Return Value:
A copy of the configuration.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
Client is responsible for deletion of the copy.
virtual bool HasTextModifiers () const
Interface Category:
API.
Purpose:
Indicates whether or not there are text modifiers associated with this configuration.
Calling Context:
Called by the typing configuration handle.
Parameters:
Return Value:
Returns true if this configuration has one or more text modifiers.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
virtual void AddTextModifier (TTextModifier * textModifier)
Interface Category:
API.
Purpose:
Adds a TTextModifier to this typing configuration.
Calling Context:
Called directly by typing configuration editor programs and other clients during editing.
Parameters:
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
virtual void SetLanguage (const TLanguageStyle & language)
Interface Category:
API.
Purpose:
Allows editors and other programs to associate a language with this configuration.
Calling Context:
Called directly by typing configuration editor programs and other clients during editing. Also called internally.
Parameters:
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
virtual const TLanguageStyle * GetLanguage () const
Interface Category:
API.
Purpose:
Returns the language of this configuration.
Calling Context:
Called directly by typing configuration editor programs and other clients during editing. Also called internally by the typing configuration handle.
Parameters:
Return Value:
TLanguageStyle for this configuration. NIL if there is none.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
TEditableTypingConfiguration & operator =(const TEditableTypingConfiguration & copy)
Interface Category:
API.
Purpose:
Assignment operator.
Calling Context:
Called when an object is assigned to another compatible object.
Parameters:
Return Value:
A non-const reference to the left-hand side object.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
virtual TStream & operator <<= (TStream & fromStream)
Interface Category:
API.
Purpose:
Stream-in operator.
Calling Context:
Called to stream in data.
Parameters:
- TStream & fromWhere -The stream the object streams itself in from.
Return Value:
Returns a reference to the stream the object streams itself in from.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
virtual TStream & operator >>=(TStream & toStream) const
Interface Category:
API.
Purpose:
Stream-out operator.
Calling Context:
Called to stream out data.
Parameters:
- TStream & toWhere -The stream the object streams itself out to.
Return Value:
Returns a reference to the stream the object streams itself out to.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
virtual ~ TEditableTypingConfiguration ()
Interface Category:
API.
Purpose:
Destructor.
Calling Context:
Called to destroy an object.
Parameters:
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
virtual void MapKeyToText (TVirtualKeyCode :: EVirtualKey key, const TModifierKeys & modifiers, TText & text) const
Interface Category:
API.
Purpose:
Maps a key event using the virtual keyboard for this configuration.
Calling Context:
Called internally by the TypingConfigurationHandle.
Parameters:
- TVirtualKeyCode :: EVirtualKey key -The key code.
- const TModifierKeys & modifiers -The modifier keys on when the key was hit.
- TText & text -The result of the key mapping.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
virtual void TypeText (TTypingStore & store, const TTextRange & newRange, const TText & newText)
Interface Category:
API.
Purpose:
Replaces the specified range in the typing store with the newText after it is processed. First calls Modify to produce a modified text result. This result and a replacementRange (also produced by Modify) are then passed to the input member function by a call to TypeText on the specified typing store.
Calling Context:
Called internally by the TypingConfigurationHandle.
Parameters:
- TTypingStore & store -The typing store whose TypeText function is called.
- const TTextRange & newRange -The range indicating where the new text is to be added.
- const TText & newText -The new text to be added.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
virtual bool Modify (const TText & currentText, const TTextRange & newRange, const TText & newText, TText & replacementText, TTextRange & replacementRange)
Interface Category:
API.
Purpose:
Given the current text, the new text to be added to the current text, and the newRange indicating where the new text is to be added, this function generates the replacement text and replacement range by invoking each modifier in the typing configuration's chain of modifiers. The modified text is returned in the replacementText parameter. The return value in replacementRange indicates the range of text in currentText that is to be replaced by the modified text.
This function is intended for non-interactive processing of text.
Calling Context:
Called by TypeText to invoke the text modifiers on text to be added. Can be used directly on a TText derived class.
Parameters:
- const TText & currentText -The current text.
- const TTextRange & newRange -The range indicating where new text is to be added, including any backspaces. Note: newRange.GetCount is defined to be the number of deletions, and newRange.GetEnd is defined to be the insertion point relative to currentText.
- const TText & newText -The new text to be added to currentText.
- TText & replacementText -The modified text, after invoking the modifiers on the new text.
- TTextRange & replacementRange -The range of text in currentText that is to be replaced.
Return Value:
Returns true if the configuration actually generated a modified replacementText.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
virtual void GetVirtualKeyboard (TVirtualKeyboardHandle & keyboardName) const
Interface Category:
API.
Purpose:
Returns the virtual keyboard for this typing configuration.
Calling Context:
Called directly by typing configuration editor programs and other clients during editing.
Parameters:
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
virtual void SetVirtualKeyboard (const TVirtualKeyboardHandle & keyboard)
Interface Category:
API.
Purpose:
Associates a virtual keyboard with this typing configuration. If none is specified, a default will be used.
Calling Context:
Called directly by typing configuration editor programs and other clients.
Parameters:
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
Click the icon to mail questions or corrections about this material to Taligent personnel.
Copyright©1995 Taligent,Inc. All rights reserved.