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:
- ECaretSide side -Enum value specifying the side of the caret on which text should be inserted.
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:
- ECharacterDirection dir -The direction of text inserted at the caret's position.
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:
- GCoordinate run -Run value used to determine the slope of the caret.
- GCoordinate rise -Rise value used to determine the slope of the caret.
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:
- const TGPoint & position -Position of the caret.
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:
- const TCaretPlace & x -The source object for the assignment
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:
- const TCaretPlace & x -The object to compare with this object.
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:
- const TCaretPlace & x -The object to compare with this object.
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:
- const GCoordinate & y -The current vertical position of the caret.
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:
- GCoordinate & returnRun -The run coordinate of the slope.
- GCoordinate & returnRise -The rise coordinate of the slope.
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.
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.
- TCaretPlace ()
- TCaretPlace (const TCaretPlace &)
Interface Category:
API.
Purpose:
- Default constructor.
- Copy constructor.
Calling Context:
- Called by the stream-in operators and directly to instantiate this class.
- Called to copy an object.
Parameters:
- Takes no parameters.
- const TCaretPlace & -The object to copy.
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.