Class: TCaretPlace

Declaration: LineLayout.h

Taxonomy Categories:

Member Functions:


Interface Category:

API.

Inherits From:

None.

Inherited By:

None.

Purpose:

Encapsulates information about a caret, such as its position and slope.

Instantiation:

Allocate on the heap or the stack.

Deriving Classes:

Do not derive unless you are implementing your own version of Line Layout.

Concurrency:

Multithread safe.

Resource Use:

No special requirements.

Member Function: TCaretPlace::SetSide

virtual void SetSide (ECaretSide side)

Interface Category:

API.

Purpose:

Sets the side of the caret on which text should be inserted. This information is used when the caret is positioned between right-to-left and left-to-right text.

Calling Context:

Called by TTextLineLayout.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Multithread safe.

Other Considerations:

None.

Member Function: TCaretPlace::SetDirection

virtual void SetDirection (ECharacterDirection dir)

Interface Category:

API.

Purpose:

Sets the direction of text inserted at the caret's position.

Calling Context:

Called by TTextLineLayout.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Multithread safe.

Other Considerations:

None.

Member Function: TCaretPlace::SetSlope

virtual void SetSlope (GCoordinate run, GCoordinate rise)

Interface Category:

API.

Purpose:

Sets the slope of the caret.

Calling Context:

Called by TTextLineLayout.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Multithread safe.

Other Considerations:

None.

Member Function: TCaretPlace::SetPosition

virtual void SetPosition (const TGPoint & position)

Interface Category:

API.

Purpose:

Sets the position of the caret.

Calling Context:

Called by TTextLineLayout.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Multithread safe.

Other Considerations:

None.

Member Function: TCaretPlace::operator=

TCaretPlace & operator =(const TCaretPlace & x)

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:

Multithread safe.

Other Considerations:

None.

Member Function: TCaretPlace::operator!=

virtual bool operator != (const TCaretPlace & x) const

Interface Category:

API.

Purpose:

Inequality operator.

Calling Context:

Call to compare two instances of this class.

Parameters:

Return Value:

Returns true if the objects are not equal.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Multithread safe.

Other Considerations:

None.

Member Function: TCaretPlace::operator==

virtual bool operator ==(const TCaretPlace & x) const

Interface Category:

API.

Purpose:

Equality operator.

Calling Context:

Call to compare two instance of this class.

Parameters:

Return Value:

Returns true if the objects are equal.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Multithread safe.

Other Considerations:

None.

Member Function: TCaretPlace::GetSide

virtual ECaretSide GetSide () const

Interface Category:

API.

Purpose:

Returns the side of the caret on which text should currently be added.

Calling Context:

Call to access this information.

Parameters:

Return Value:

Enum value specifying the side of the caret on which text should currently be added.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Multithread safe.

Other Considerations:

None.

Member Function: TCaretPlace::GetDirection

virtual ECharacterDirection GetDirection () const

Interface Category:

API.

Purpose:

Returns the direction of the text at the caret (such as right-to-left or left-to-right).

Calling Context:

Call to access this information.

Parameters:

Return Value:

Enum value indicating the direction of the text at the caret.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Multithread safe.

Other Considerations:

None.

Member Function: TCaretPlace::GetXPosition

virtual GCoordinate GetXPosition (const GCoordinate & y) const

Interface Category:

API.

Purpose:

Returns the caret's horizontal position given a vertical position.

Calling Context:

Call to access this information.

Parameters:

Return Value:

The caret's horizontal position.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Multithread safe.

Other Considerations:

None.

Member Function: TCaretPlace::GetSlope

virtual void GetSlope (GCoordinate & returnRun, GCoordinate & returnRise) const

Interface Category:

API.

Purpose:

Returns the caret's slope.

Calling Context:

Call to access this information.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Multithread safe.

Other Considerations:

None.

Member Function: TCaretPlace::GetPosition

virtual TGPoint GetPosition () const

Interface Category:

API.

Purpose:

Returns the caret's position.

Calling Context:

Call to access this information.

Parameters:

Return Value:

TGPoint instance representing the caret's position.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Multithread safe.

Other Considerations:

None.

Member Function: TCaretPlace::~TCaretPlace

virtual ~ TCaretPlace ()

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:

Multithread safe.

Other Considerations:

None.

Member Function: TCaretPlace::TCaretPlace

  1. TCaretPlace ()
  2. TCaretPlace (const TCaretPlace &)

Interface Category:

API.

Purpose:

  1. Default constructor.
  2. Copy constructor.

Calling Context:

  1. Called by the stream-in operators and directly to instantiate this class.
  2. Called to copy an object.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

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.