Class: TVirtualKeyboardHandle

Declaration: Keyboards.h

Taxonomy Categories:

Member Functions:


Interface Category:

API.

Inherits From:

None.

Inherited By:

None.

Purpose:

Provides a handle object through which most clients access virtual keyboards. A single handle can be used to access all available keyboards by changing the current keyboard through the handle.

Instantiation:

Allocate on the heap or the stack.

Deriving Classes:

Not typically derived. It might be required to support different types of TStandardEditableVirtualKeyboard.

Concurrency:

Not multithread safe.

Resource Use:

No special requirements.

Member Function: TVirtualKeyboardHandle::TVirtualKeyboardHandle

  1. TVirtualKeyboardHandle ()
  2. TVirtualKeyboardHandle (const TLocalizableName & keyboardName)
  3. TVirtualKeyboardHandle (const TVirtualKeyboardHandle & copy)

Interface Category:

API.

Purpose:

  1. Default constructor. Maps using the current system keyboard.
  2. Creates a handle for a specified keyboard.
  3. Copy constructor.

Calling Context:

  1. Called by the stream-in operators and directly.
  2. Call this function directly.
  3. Called to copy an object.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TVirtualKeyboardHandle::GetCurrentKeyboard

virtual void GetCurrentKeyboard (TLocalizableName & name) const

Interface Category:

API.

Purpose:

Returns the keyboard currently used by this handle.

Calling Context:

Called by clients who want to get the name of the current keyboard.

Parameters:

Return Value:

None. Returns the name in name.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TVirtualKeyboardHandle::SetCurrentKeyboard

virtual void SetCurrentKeyboard (const TLocalizableName & name)

Interface Category:

API.

Purpose:

Sets the current keyboard for this handle to that indicated by name. Only works on currently installed keyboards.

Calling Context:

Called by clients to change the keyboard referenced by this handle.

Parameters:

Return Value:

None.

Exceptions:

Throws TVirtualKeyboardException::kSpecifiedKeyboardNotInstalled if the keyboard is not installed.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TVirtualKeyboardHandle::operator<<=

virtual TStream & operator <<= (TStream & fromWhere)

Interface Category:

API.

Purpose:

Stream-in operator.

Calling Context:

Called to stream in data.

Parameters:

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.

Member Function: TVirtualKeyboardHandle::operator>>=

virtual TStream & operator >>=(TStream & toWhere) const

Interface Category:

API.

Purpose:

Stream-out operator.

Calling Context:

Called to stream out data.

Parameters:

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.

Member Function: TVirtualKeyboardHandle::~TVirtualKeyboardHandle

virtual ~ TVirtualKeyboardHandle ()

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.

Member Function: TVirtualKeyboardHandle::operator=

TVirtualKeyboard & operator =(const TVirtualKeyboardHandle & from)

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.

Member Function: TVirtualKeyboardHandle::CommandText

virtual void CommandText (TVirtualKeyCode :: EVirtualKey key, const TModifierKeys & modifiers, TText & text) const

Interface Category:

API.

Purpose:

Maps from the key and the modifiers to the representative character(s) for the command key using the command keyboard that has been designated for this keyboard. The default calls MapKeyToText. For example, a virtual keyboard can be set up so that the combination of the key, kVirtualA, with the command and option modifiers set results in a TText that can be displayed in a menu as TUnicode::kCommandKey+TUnicode::kOptionKey+TUnicode::kLatinCapitalLetterA.

Calling Context:

Called by menus and other subsystems that need to display a visual representation for command key equivalents.

Parameters:

Return Value:

None. The text for display is returned in the text parameter.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

Overrides inherited TVirtualKeyboard function.

Member Function: TVirtualKeyboardHandle::MapKeyToText

virtual void MapKeyToText (TVirtualKeyCode :: EVirtualKey key, const TModifierKeys & modifiers, TText & text) const

Interface Category:

API.

Purpose:

Defines the primary mapping functionality of virtual keyboards.

Calling Context:

Called by the typing configuration to produce text from a virtual key and modifier combination.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

Overrides inherited TVirtualKeyboard function.
Click the icon to mail questions or corrections about this material to Taligent personnel.
Copyright©1995 Taligent,Inc. All rights reserved.