Class: TActivatibleView

Declaration: ActivatibleView.h

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.

Member Function: TActivatibleView::~TActivatibleView

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.

Member Function: TActivatibleView::Activate

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.

Member Function: TActivatibleView::IsActive

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.

Member Function: TActivatibleView::operator=

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.

Member Function: TActivatibleView::operator>>=

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:

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

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:

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.

Member Function: TActivatibleView::TActivatibleView

  1. TActivatibleView ()
  2. TActivatibleView (const TGPoint & itsAllocatedAreaInLocalCoords, const TGPoint & itsLocationInContainerCoords =TGPoint :: kOrigin, bool visible =true)
  3. TActivatibleView (const TGArea & viewArea, const TGPoint & itsLocationInContainerCoords =TGPoint :: kOrigin, bool visible =true)
  4. TActivatibleView (const TActivatibleView &)

Interface Category:

API.

Purpose:

  1. Default constructor.
  2. Creates a TActivatibleView with the view area set to a rectangle of the specified size in local coordinates and location specified in parent coordinates.
  3. Creates a TActivatibleView with the view area in local coordinates and location specified in the parent view's coordinates.
  4. Copy constructor. Do not use this constructor, as value semantics are not supported for views.

Calling Context:

  1. Called by derived classes to create an object suitable for streaming into.
  2. Called by derived class' constructor to create an object with a rectangular area and specified location.
  3. Called by derived class' constructor to create an object with the specified area and location.
  4. Called to copy an object. Not used.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TActivatibleView::GetBounds

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:

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:

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.

Member Function: TActivatibleView::IsActivatible

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:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TActivatibleView::Deactivate

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.