Taxonomy Categories:
Member Functions:
Interface Category:
API.
Inherits From:
TSimpleMouseTool
Inherited By:
None.
Purpose:
TSimpleTextTool is derived from TSimpleMouseTool. It is a tool that creates and starts a TSimpleTextToolInteractor that will apply either a TCommandOn<MTextSelection> or a TCommandOn<TTextPresenterStateSelection> to the text selected during tool interaction.
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.
- TSimpleTextTool (TCommandOn < MTextSelection > * commandToAdopt, TColor * highlightColorToAdopt =NIL, MGraphic * cursorGraphicToAdopt =NIL, MGraphic * paletteGraphicToAdopt =NIL, const TText & paletteText =TStandardText :: GetEmptyText ())
- TSimpleTextTool (const TSimpleTextTool &)
- TSimpleTextTool ()
Interface Category:
API.
Purpose:
- Constructs a TSimpleTextTool whose interactor will apply the specified TCommandOn < MTextSelection > command. Adopts the specified highlight color, cursor graphic, palette graphic, and palette text.
- Copy constructor.
- Default constructor. This constructor is protected.
Calling Context:
- Typically not called directly by clients.
- Typically not called directly by clients.
- Typically not called directly by clients.
Parameters:
- TCommandOn < MTextSelection > * commandToAdopt -The command to adopt.
- TColor * highlightColorToAdopt =NIL -The highlight color to adopt (default: NIL).
- MGraphic * cursorGraphicToAdopt =NIL -The cursor graphic to adopt (default: NIL).
- MGraphic * paletteGraphicToAdopt =NIL -The palette graphic to adopt (default: NIL).
- const TText & paletteText =TStandardText :: GetEmptyText () -The palette text to adopt (default: empty).
- const TSimpleTextTool & -The object to copy.
- Takes no parameters.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
virtual ~ TSimpleTextTool ()
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: TSimpleTextTool::GetHighlightColor
virtual void GetHighlightColor (TColor & color) const
Interface Category:
API.
Purpose:
Accessor that returns the tool's current highlight color.
Calling Context:
Typically not called directly by clients.
Parameters:
- TColor & color -Receives the highlight color.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
Member Function: TSimpleTextTool::SetHighlightColor
virtual void SetHighlightColor (const TColor & color)
Interface Category:
API.
Purpose:
Sets the tool's highlight color to the specified color.
Calling Context:
Typically not called directly by clients.
Parameters:
- const TColor & color -The new color.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
TSimpleTextTool & operator =(const TSimpleTextTool &)
Interface Category:
API.
Purpose:
Assignment operator.
Calling Context:
Typically not called directly by clients.
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:
Overrides inherited MCollectible function.
virtual TStream & operator >>=(TStream &) const
Interface Category:
API.
Purpose:
Stream-out operator.
Calling Context:
Typically not called directly by clients.
Parameters:
- TStream & -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:
Overrides inherited MCollectible function.
virtual TStream & operator <<= (TStream &)
Interface Category:
API.
Purpose:
Stream-in operator.
Calling Context:
Typically not called directly by clients.
Parameters:
- TStream & -The stream the object streams itself out to.
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:
Overrides inherited MCollectible function.
Member Function: TSimpleTextTool::GetPaletteText
virtual void GetPaletteText (TText &) const
Interface Category:
API.
Purpose:
Returns the palette text, as specified in the constructor (default: empty).
Calling Context:
Typically not called directly by clients.
Parameters:
- TText & -Receives the palette text.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
Overrides inherited TTool function.
Member Function: TSimpleTextTool::CreatePaletteGraphic
virtual MGraphic * CreatePaletteGraphic () const
Interface Category:
API.
Purpose:
Returns the palette graphic, as specified in the constructor (default: NIL).
Calling Context:
Called by the Text Framework command classes. Typically not called directly by clients.
Parameters:
Return Value:
A pointer to the palette graphic.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
Overrides inherited TTool function.
Member Function: TSimpleTextTool::CreateCursorGraphic
virtual MGraphic * CreateCursorGraphic () const
Interface Category:
API.
Purpose:
Returns the cursor graphic, as specified in the constructor (default: highlight pen).
Calling Context:
Called by the Text Framework command classes. Typically not called directly by clients.
Parameters:
Return Value:
A pointer to the cursor graphic.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
Overrides inherited TTool function.
Member Function: TSimpleTextTool::CreateInteractor
virtual TToolInteractor * CreateInteractor (MToolTarget* adoptTarget) const
Interface Category:
API.
Purpose:
Creates and returns a pointer to a TSimpleTextToolInteractor if the target is a TTextToolInteractionTarget. Otherwise returns NIL. Provides the interactor with either a TCommandOn<MTextSelection> or a TCommandOn<TTextPresenterStateSelection> to be applied to the text selected during tool interaction.
Calling Context:
Called by the Text Framework command classes. Typically not called directly by clients.
Parameters:
- MToolTarget * adoptTarget -A pointer to the target to adopt.
Return Value:
A pointer to a TSimpleTextToolInteractor if the target is a TTextToolInteractionTarget. Otherwise returns NIL.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
Overrides inherited TSimpleMouseTool function.
Click the icon to mail questions or corrections about this material to Taligent personnel.
Copyright©1995 Taligent,Inc. All rights reserved.