Taxonomy Categories:
Member Functions:
Interface Category:
API.
Inherits From:
TView
Inherited By:
TContentView
Purpose:
TActivatibleView is an abstract base class that provides activation protocol for an application's content view.
Instantiation:
TActivatibleView is an abstract class and cannot be allocated.
Deriving Classes:
Classes deriving from TActivatibleView must override the pure virtual functions Activate, Deactivate, and IsActive to provide a specific implementation. This class should not be derived directly. Derive from TContentView instead.
Concurrency:
Not multithread safe.
Resource Use:
No special requirements.
Other Considerations:
None.
virtual ~ TActivatibleView ()
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.
virtual bool Activate ()
Interface Category:
API.
Purpose:
Requests programmatic activation of this view and returns true if the activation was successful. Returns false if activation was not successful.
Calling Context:
Called to programmatically activate this view. Call this function directly.
Parameters:
Return Value:
Returns true if this view was successfully activated.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
Deriving classes must implement this member function.
virtual bool IsActive () const
Interface Category:
API.
Purpose:
Determines if the view is active. Returns true if this view is active. Returns false if the view is not active.
Calling Context:
Called to determine if this view is currently active. Call this function directly.
Parameters:
Return Value:
Returns true if this view is active.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
Deriving classes must implement this member function.
TActivatibleView & operator =(const TActivatibleView &)
Interface Category:
API.
Purpose:
Assignment operator.
Calling Context:
Called when an object is assigned to another compatible object. This operator should not be used, since views do not support value semantics.
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 & towhere) const
Interface Category:
API.
Purpose:
Stream-out operator.
Calling Context:
Called by ::Flatten to stream out data. This operator should not be called directly on this class or derived classes. ::Flatten should be used instead to preserve essential information about the view's context.
Parameters:
- TStream & towhere -The destination stream.
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 & fromwhere)
Interface Category:
API.
Purpose:
Stream-in operator.
Calling Context:
Called by ::Resurrect to stream in data. This operator should not be called directly on this class or derived classes. ::Resurrect should be used instead to assure restoration of context information.
Parameters:
- TStream & fromwhere -The source stream.
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.
- TActivatibleView ()
- TActivatibleView (const TGPoint & itsAllocatedAreaInLocalCoords, const TGPoint & itsLocationInContainerCoords =TGPoint :: kOrigin, bool visible =true)
- TActivatibleView (const TGArea & viewArea, const TGPoint & itsLocationInContainerCoords =TGPoint :: kOrigin, bool visible =true)
- TActivatibleView (const TActivatibleView &)
Interface Category:
API.
Purpose:
- Default constructor.
- Creates a TActivatibleView with the view area set to a rectangle of the specified size in local coordinates and location specified in parent coordinates.
- Creates a TActivatibleView with the view area in local coordinates and location specified in the parent view's coordinates.
- Copy constructor. Do not use this constructor, as value semantics are not supported for views.
Calling Context:
- Called by derived classes to create an object suitable for streaming into.
- Called by derived class' constructor to create an object with a rectangular area and specified location.
- Called by derived class' constructor to create an object with the specified area and location.
- Called to copy an object. Not used.
Parameters:
- Takes no parameters.
- const TGPoint & itsAllocatedAreaInLocalCoords -The size of the view in local coordinates.
- const TGPoint & itsLocationInContainerCoords =TGPoint :: kOrigin -The view's location in the parent view's coordinates.
- bool visible =true -If set to true, the content view is visible.
- const TGArea & viewArea -The view's area in local coordinates.
- const TGPoint & itsLocationInContainerCoords =TGPoint :: kOrigin -The view's location in the parent view's coordinates.
- bool visible =true -If set to true, the view is visible.
- const TActivatibleView & -The object to be copied.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
virtual void GetBounds (TGArea & area) const
Interface Category:
API.
Purpose:
Fills in the supplied parameter with the bounds of the view. Returns the same information as GetAllocatedArea.
Calling Context:
Called to obtain the bounds of the view. Call this function directly, or use one of the functions GetAllocatedArea or GetAllocatedAreaInParent to explicitly request the current area allocated for this view.
Parameters:
- TGArea & area -The parameter to be filled in.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
Deriving classes may override this member function to return the desired bounds for layout.
Member Function: TActivatibleView::CreateInterest
virtual TInterest * CreateInterest (const TToken & theChange) const
Interface Category:
API.
Purpose:
Creates an interest object that may be used to request notification when the view is activated or deactivated.
Calling Context:
Called to create an interest object for the activation or deactivation of the view. Call this function directly.
Parameters:
- const TToken & theChange -The event of interest, either kViewActivated or kViewDeactivated. Passing kViewActivated creates an interest on activation of this view, and kViewDeactivated creates an interest on deactivation of this view.
Return Value:
Returns the interest object created.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
The caller is responsible for deleting the interest object that is created.
Member Function: TActivatibleView::CancelEventActivation
virtual void CancelEventActivation () const
Interface Category:
API.
Purpose:
Prevents the current mouse event from triggering activation of this view. This member function is only effective when called during the processing of a mouse event, especially a MouseDown.
Calling Context:
Called whenever a mouse event handler wants to handle activation programmatically. Call this function directly from within the scope of a mouse event handling override.
Parameters:
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
virtual bool IsActivatible () const
Interface Category:
API.
Purpose:
Determines if this view is activatible. Returns true if this view is activatible.
Calling Context:
Called to determine if the view is activatible whenever activation is requested programmatically or through event processing. This function may be called directly
Parameters:
Return Value:
Returns true if this view is activatible.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
Member Function: TActivatibleView::SetActivatible
virtual void SetActivatible (bool activatible =true)
Interface Category:
API.
Purpose:
Enables or disables the ability to activate the view.
Calling Context:
Called to enable or disable the ability to activate the view. Call this function directly.
Parameters:
- bool activatible =true -If set to true, the view will be made activatible.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
virtual void Deactivate ()
Interface Category:
API.
Purpose:
Deactivates the view.
Calling Context:
Called to programmatically deactivate the view. Call this function directly to deactivate this view.
Parameters:
Return Value:
None.
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.