Taxonomy Categories:
Member Functions:
Interface Category:
API.
Inherits From:
MCollectible
Inherited By:
TComponentAreaRectControlState
Purpose:
A simple control state that modifies the bounds of a rect. TRectControlState is an abstract base class.
Instantiation:
Allocate on the heap or the stack. Usually allocated on the heap.
Deriving Classes:
Derived classes must override the pure virtual functions GetRect and FinalSetRect. Derived classes also typically override IntermediateSetRect.
Concurrency:
Not multithread safe.
Resource Use:
No special requirements.
Other Considerations:
None.
- TRectControlState ()
- TRectControlState (const TRectControlState &)
Interface Category:
API.
Purpose:
- Default constructor.
- Copy constructor.
Calling Context:
- Called by the stream-in operators and derived class constructors.
- Called to copy an object.
Parameters:
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
virtual ~ TRectControlState ()
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:
Not multithread safe.
Other Considerations:
None.
TView * GetParent () const
Interface Category:
API.
Purpose:
Gets the parent view, or NIL if no parent view exists.
Calling Context:
Call this function directly.
Parameters:
Return Value:
Returns the parent view, or NIL if no parent view exists.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
void SetParent (TView *)
Interface Category:
API.
Purpose:
Sets the parent view. Pass NIL if no parent is desired. The parent view is used to calculate the coordinates of the rect.
Calling Context:
Call this function directly.
Parameters:
- TView * -The view which becomes the parent view. This pointer is aliased.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
This isn't the best design. This class should probably not hold onto its parent view.
virtual bool IsEnabled () const
Interface Category:
API.
Purpose:
Determines whether or not the control is enabled.
Calling Context:
Called by Control framework.
Parameters:
Return Value:
Returns true if the control is enabled. Returns true always.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
virtual bool IsSelected () const
Interface Category:
API.
Purpose:
Determines whether or not the control is selected.
Calling Context:
Call this function directly.
Parameters:
Return Value:
Returns true if the control is selected. Returns true always.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
virtual TGRect GetRect () const
Interface Category:
API.
Purpose:
Returns the bounds of the rectangle which is the state of this control.
Calling Context:
Call this function directly.
Parameters:
Return Value:
Returns the bounds of the rectangle which is the state of this control.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
This function is a pure virtual function and must be overridden by classes deriving from TRectControlState.
Member Function: TRectControlState::IntermediateSetRect
virtual void IntermediateSetRect (const TGRect &)
Interface Category:
API.
Purpose:
Sets the bounds of the rectangle. Clients promise that FinalSetRect will eventually be called after a series of zero or more IntermediateSetRect calls. Because of this, implementing IntermediateSetRect is optional. It defaults to doing nothing.
Calling Context:
Called from the Begin and Increment phases of interactors.
Parameters:
- const TGRect & -The new value for the rectangle.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
Typically, derived classes will override this function.
virtual void FinalSetRect (const TGRect &)
Interface Category:
API.
Purpose:
Sets the bounds of the rectangle. Clients promise that FinalSetRect will eventually be called after a series of zero or more IntermediateSetRect calls.
Calling Context:
Call this function directly.
Parameters:
- const TGRect & -The new value for the rectangle.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
This function is a pure virtual function and must be overridden by classes deriving from TRectControlState.
virtual void Update (const TInterest &)
Interface Category:
API.
Purpose:
Override this function to receive notification.
Calling Context:
Called by the containing TBasicFrameView when notification is received from any of the interests returned by AddInterests.
Parameters:
- const TInterest & -The interest contained in the received notification.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
It's too bad that you don't get the notification itself.
virtual void AddInterests (TSetOf < TInterest > & set)
Interface Category:
API.
Purpose:
The control state supplies a set of interests. When notification is received from any of these interests, the Update function is called. This allows the instance to track changes in the state of some other object.
Calling Context:
Called by the containing frame view.
Parameters:
- TSetOf < TInterest > & set -The set of interests as returned by this function.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
TRectControlState & operator =(const TRectControlState &)
Interface Category:
API.
Purpose:
Assignment operator.
Calling Context:
Called when an object is assigned to another compatible object.
Parameters:
Return Value:
Returns a 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 to stream out data.
Parameters:
- TStream & -The stream to which the object streams itself out.
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 to stream in data.
Parameters:
- TStream & -The stream from which the object streams itself in.
Return Value:
Returns a reference to the stream the object streams itself in from.
Exceptions:
Throws a TInvalidVersionError if the version of the object on the stream is unknown to the version of the shared library installed.
Concurrency:
Not multithread safe.
Other Considerations:
None.
virtual long Hash () const
Interface Category:
API.
Purpose:
Returns the hash value for this object. The hash value used to speed comparison.
Calling Context:
Called by collections when comparing objects.
Parameters:
Return Value:
Returns the hash value for this object.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
Provided solely because this is an MCollectible derived class. Currently implemented to return 0, which is legal, but not a very good value.
Click the icon to mail questions or corrections about this material to Taligent personnel.
Copyright©1995 Taligent,Inc. All rights reserved.