Taxonomy Categories:
Member Functions:
Interface Category:
API.
Inherits From:
TGUIPresenterState
Inherited By:
None.
Purpose:
Derived from TGUIPresenterState, this class is responsible for creating the presenter and managing persistent presentation information. This information currently consists of margins, and colors for background, caret, and selection feedback. TTextPresenterState sends notification whenever any of this information is changed.
Instantiation:
Allocate on the heap or the stack.
Deriving Classes:
This class is designed to be used directly.
Concurrency:
Not multithread safe.
Resource Use:
No special requirements.
Other Considerations:
None.
- TTextPresenterState ()
- TTextPresenterState (const TTextPresenterState &)
Interface Category:
API.
Purpose:
- Default constructor.
- Copy constructor.
Calling Context:
- Call this function directly.
- Call this function directly.
Parameters:
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
virtual ~ TTextPresenterState ()
Interface Category:
API.
Purpose:
Destructor.
Calling Context:
Typically not called directly by clients.
Parameters:
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
virtual TStream & operator >>=(TStream &) const
Interface Category:
API.
Purpose:
Stream-out operator.
Calling Context:
Call this function directly.
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 TStream & operator <<= (TStream &)
Interface Category:
API.
Purpose:
Stream-in operator.
Calling Context:
Call this function directly.
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 TInvalidVersionError if the object has detected an unsupportable version during the stream-in process.
Concurrency:
Not multithread safe.
Other Considerations:
None.
TTextPresenterState & operator =(const TTextPresenterState &)
Interface Category:
API.
Purpose:
Assignment operator.
Calling Context:
Call this function directly.
Parameters:
Return Value:
A non-const reference to the left-hand side object. The target object of the assignment.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
Member Function: TTextPresenterState::GetTextBackgroundColor
void GetTextBackgroundColor (TColor & color) const
Interface Category:
API.
Purpose:
Returns the background color this presentation uses to display text against. Creates a default background color of white if the background color has not yet been set.
Calling Context:
Called by the view when displaying the text data and directly.
Parameters:
- TColor & color -Receives the current background color.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
Member Function: TTextPresenterState::SetTextBackgroundColor
void SetTextBackgroundColor (const TColor & color)
Interface Category:
API.
Purpose:
Specifies the background color for this presentation to use to display text against. Sends notification that the background color has changed.
Calling Context:
Call this function directly.
Parameters:
- const TColor & color -The new background color.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
Member Function: TTextPresenterState::GetTextSelectionColor
void GetTextSelectionColor (TColor & color) const
Interface Category:
API.
Purpose:
Returns the color this presentation uses to highlight text in a selection. Creates a default selection color if no color has been set yet.
Calling Context:
Call this function directly.
Parameters:
- TColor & color -Receives the selection color.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
Member Function: TTextPresenterState::SetTextSelectionColor
void SetTextSelectionColor (const TColor & color)
Interface Category:
API.
Purpose:
Specifies the color for this presentation to use to highlight selected text. Sends notification that the text selection color has changed.
Calling Context:
Call this function directly.
Parameters:
- const TColor & color -The new selection color.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
void GetTextCaretColor (TColor & color) const
Interface Category:
API.
Purpose:
Returns the color used by this presentation to display the insertion point caret. Creates a default caret color of red if it has not yet been set.
Calling Context:
Call this function directly.
Parameters:
- TColor & color -Receives the insertion point caret color.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
void SetTextCaretColor (const TColor & color)
Interface Category:
API.
Purpose:
Specifies the color for this presentation to use to display the insertion point caret. Sends notification that the caret color has changed.
Calling Context:
Call this function directly.
Parameters:
- const TColor & color -The new caret color.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
void GetTextMargins (GCoordinate & leftMargin, GCoordinate & rightMargin, GCoordinate & topMargin, GCoordinate & bottomMargin) const
Interface Category:
API.
Purpose:
Returns the margin settings for this presentation.
Calling Context:
Call this function directly.
Parameters:
- GCoordinate & leftMargin -Receives the value specifying the margin relative to the left edge.
- GCoordinate & rightMargin -Receives the value specifying the margin relative to the right edge.
- GCoordinate & topMargin -Receives the value specifying the margin relative to the top edge.
- GCoordinate & bottomMargin -Receives the value specifying the margin relative to the bottom edge.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
void SetTextMargins (GCoordinate leftMargin, GCoordinate rightMargin, GCoordinate topMargin, GCoordinate bottomMargin)
Interface Category:
API.
Purpose:
Specifies the margin settings for the text in this presentation. Sends notification that the margins have changed.
Calling Context:
Call this function directly.
Parameters:
- GCoordinate leftMargin -The margin relative to the left edge.
- GCoordinate rightMargin -The margin relative to the right edge.
- GCoordinate topMargin -The margin relative to the top edge.
- GCoordinate bottomMargin -The margin relative to the bottom edge.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
Member Function: TTextPresenterState::GetPresenterStateChangedInterest
virtual TModelPresenterStateInterest GetPresenterStateChangedInterest () const
Interface Category:
API.
Purpose:
Creates a TModelPresenterStateInterest object for callers interested in changes to the presenter state to use to register for notification. Called to register for notification sent whenever the presenter state changes. For example, the text view registers for notification so it knows when it needs to redraw new presenter state information.
Calling Context:
Call this function directly.
Parameters:
Return Value:
A TModelPresenterStateInterest object.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
Member Function: TTextPresenterState::HandleCreatePresenter
virtual TGUIPresenter * HandleCreatePresenter (const TGUIBundle & theParBdl) const
Interface Category:
API.
Purpose:
Creates and returns a TTextPresenter.
Calling Context:
Called by the Text Framework classes. Typically not called directly by clients.
Parameters:
Return Value:
A pointer to the newly created TTextPresenter.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
This protected function overrides the inherited TGUIPresenterStateFor<TTextPresenter> function.
void SetTextViewSize (const TGPoint & createSize)
Interface Category:
API.
Purpose:
Sets the text view size, by specifying the TGPoint vector from the origin (0,0) to the point indicated by the TGPoint x- and y-coordinates.
Calling Context:
Call this function directly.
Parameters:
- const TGPoint & createSize -The TGPoint specifying the text view size.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
TGPoint GetTextViewSize () const
Interface Category:
API.
Purpose:
Returns the TGPoint that specifies the text view size.
Calling Context:
Call this function directly.
Parameters:
Return Value:
The TGPoint specifying the view size.
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.