Class: TTextPresenterState

Declaration: TextPresenterState.h

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.

Member Function: TTextPresenterState::TTextPresenterState

  1. TTextPresenterState ()
  2. TTextPresenterState (const TTextPresenterState &)

Interface Category:

API.

Purpose:

  1. Default constructor.
  2. Copy constructor.

Calling Context:

  1. Call this function directly.
  2. Call this function directly.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TTextPresenterState::~TTextPresenterState

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.

Member Function: TTextPresenterState::operator>>=

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

Interface Category:

API.

Purpose:

Stream-out operator.

Calling Context:

Call this function directly.

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: TTextPresenterState::operator<<=

virtual TStream & operator <<= (TStream &)

Interface Category:

API.

Purpose:

Stream-in operator.

Calling Context:

Call this function directly.

Parameters:

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.

Member Function: TTextPresenterState::operator=

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:

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:

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:

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:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TTextPresenterState::GetTextCaretColor

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:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TTextPresenterState::SetTextCaretColor

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:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TTextPresenterState::GetTextMargins

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:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TTextPresenterState::SetTextMargins

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:

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.

Member Function: TTextPresenterState::SetTextViewSize

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:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TTextPresenterState::GetTextViewSize

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.