Taxonomy Categories:
Member Functions:
Interface Category:
API.
Inherits From:
None.
Inherited By:
TTextControl
Purpose:
MDelegatingTextControl is a base class for text controls. It defines the protocol for adopting a text control state and for delegating to the adopted text control state requests to manipulate the text field in the control.
Instantiation:
Mixin class; do not instantiate.
Deriving Classes:
TTextControl, derived from MDelegatingTextControl, is the concrete class provided by Taligent that implements text controls.
Concurrency:
Not multithread safe.
Resource Use:
No special requirements.
Other Considerations:
None.
- MDelegatingTextControl ()
- MDelegatingTextControl (MTextControlState * delegate)
- MDelegatingTextControl (const MDelegatingTextControl &)
Interface Category:
API.
Purpose:
- Default constructor.
- Constructs an MDelegatingTextControl object that adopts the specified control state object.
- Copy constructor. If the object being copied had adopted its control state object, then the control state object is cloned. Otherwise, a pointer to the control state object is copied and marked as not adopted. Control state objects that are not adopted are not flattened and resurrected. This function also copies the pointer to the request processor.
Calling Context:
- Called by the Text Framework command classes. Typically not called directly by clients.
- Called by the Text Framework command classes. Typically not called directly by clients.
- Called by the Text Framework command classes. 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 ~ MDelegatingTextControl ()
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.
MDelegatingTextControl & operator =(const MDelegatingTextControl &)
Interface Category:
API.
Purpose:
Assignment operator.
Calling Context:
Called by the Text Framework classes. 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:
None.
virtual TStream & operator >>=(TStream &) const
Interface Category:
API.
Purpose:
Stream-out operator.
Calling Context:
Called by the Text Framework classes. Typically not called directly by clients.
Parameters:
- TStream & -The streams this 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:
Called by the Text Framework classes. Typically not called directly by clients.
Parameters:
- TStream & -The stream this 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.
virtual void AdoptState (MTextControlState * state)
Interface Category:
API.
Purpose:
Adopts the specified control state object. Any existing control state object for this control is deleted, as the control can only contain one control state object at a time.
Calling Context:
May be called directly by clients.
Parameters:
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
virtual void SetState (MTextControlState * state)
Interface Category:
API.
Purpose:
Sets a control state object for this control, but does not adopt it. Any existing control state object for this control is deleted, as the control can only contain one control state object at a time.
If this control has a control state object that has not been adopted, then the control state object is not automatically deleted, the control state object is not streamed out, and, if this control is copied, the control state object is copied and not cloned.
Calling Context:
May be called directly by clients.
Parameters:
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
virtual MTextControlState * GetState () const
Interface Category:
API.
Purpose:
Returns a pointer to the current control state object for this control.
Calling Context:
May be called directly by clients.
Parameters:
Return Value:
Pointer to the current control state object. This pointer will never be NIL, because the function creates and adopts an object of TSimpleTextControlState if none has been previously specified.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
virtual MTextControlState * OrphanState ()
Interface Category:
API.
Purpose:
Orphans the current control state object. This function simply removes the control's reference to the control state; it does not delete the control state object.
Calling Context:
May be called directly by clients.
Parameters:
Return Value:
Returns a pointer to the orphaned control state object; if the control state was not adopted, returns NIL.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
virtual void GetTextState (TText & text) const
Interface Category:
API.
Purpose:
Gets the state, or text data, maintained by the current text control state.
Calling Context:
May be called directly by clients.
Parameters:
- TText & text -Receives the text data maintained by the text control state.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
virtual void SetTextState (const TText & newText)
Interface Category:
API.
Purpose:
Sets the state, or text data, maintained by the current text control state.
Calling Context:
May be called directly by clients.
Parameters:
- const TText & newText -The new text data for the control state object.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
virtual TTextCount GetTextLength () const
Interface Category:
API.
Purpose:
Returns the length of the text data maintained by the current text control state.
Calling Context:
May be called directly by clients.
Parameters:
Return Value:
The text length.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
virtual bool IsEnabled () const
Interface Category:
API.
Purpose:
Determine if this object is enabled or not.
Calling Context:
May be called directly.
Parameters:
Return Value:
Returns true if this is enabled, otherwise false.
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.