Class: TDocumentComponentView

Declaration: GUICompoundDocument.h

Taxonomy Categories:

Member Functions:


Interface Category:

API.

Inherits From:

TContentView, MGUIBundle

Inherited By:

TGUIEmbedderModelView

Purpose:

TDocumentComponentView is a simple content view for use with document components

Instantiation:

Always allocate on the heap.

Deriving Classes:

Derived classes may want to override HandleAllocatedAreaChanged, HandleAddedToHierarchy, HandleRemovedFromHierarchy, and HandleCurrentSelectionChanged to provide specialized behavior.

Concurrency:

Not multithread safe.

Resource Use:

No special requirements.

Other Considerations:

None.

Member Function: TDocumentComponentView::TDocumentComponentView

  1. TDocumentComponentView ()
  2. TDocumentComponentView (TGUIBundle * theBundleToAlias)
  3. TDocumentComponentView (TGUIBundle * theBundleToAlias, const TGPoint & itsAllocatedAreaInLocalCoords, const TGPoint & itsLocationInContainerCoords =TGPoint :: kOrigin, bool visible =true)
  4. TDocumentComponentView (TGUIBundle * theBundleToAlias, const TGArea & viewArea, const TGPoint & itsLocationInContainerCoords =TGPoint :: kOrigin, bool visible =true)
  5. TDocumentComponentView (const TDocumentComponentView &)

Interface Category:

API.

Purpose:

  1. Default constructor.
  2. Main constructor. Used to create the view associated with a TGUIBundle.
  3. Constructor used to create view with initial size and location.
  4. Constructor used to create view with initial area and location.
  5. Copy constructor.

Calling Context:

  1. Only for internal use by Resurrect. Developers should treat as protected.
  2. Called to create the view associated with a TGUIBundle.
  3. Called to create the view with initial size and location.
  4. Called to create the view with initial area and location.
  5. Called to copy an object.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TDocumentComponentView::~TDocumentComponentView

virtual ~ TDocumentComponentView ()

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: TDocumentComponentView::HandleCurrentSelectionChanged

virtual void HandleCurrentSelectionChanged (const TNotification &)

Interface Category:

API.

Purpose:

The derived class should override this function and take whatever steps are necessary to update the view for the changed selection. By default this function calls HandleNotification.

Calling Context:

Called by the Presentation framework when the current selection changes.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TDocumentComponentView::HandleAddedLink

virtual void HandleAddedLink (const TNotification &)

Interface Category:

API.

Purpose:

Called when a link is added to the model this view displays. The default does nothing.

Calling Context:

Called by Document framework when a link is added to the model.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TDocumentComponentView::HandleRemovedLink

virtual void HandleRemovedLink (const TNotification &)

Interface Category:

API.

Purpose:

Called when a link is removed from the model this view displays. The default does nothing.

Calling Context:

Called by Document framework when a link is removed from the model.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TDocumentComponentView::HandleAddedAnchor

virtual void HandleAddedAnchor (const TNotification &)

Interface Category:

API.

Purpose:

Called when an anchor is added to the model this view displays. The default does nothing.

Calling Context:

Called by Document framework when an anchor is added to the model.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TDocumentComponentView::HandleRemovedAnchor

virtual void HandleRemovedAnchor (const TNotification &)

Interface Category:

API.

Purpose:

Called when an anchor is removed from the model this view displays. The default does nothing.

Calling Context:

Called by Document framework when an anchor is removed from the model.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TDocumentComponentView::HandleAnchorContentsReplaced

virtual void HandleAnchorContentsReplaced (const TNotification &)

Interface Category:

API.

Purpose:

Called when the contents of an anchor are replaced. The default delegates to HandleNotification

Calling Context:

Called by Document framework when an anchor's contents are replaced.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TDocumentComponentView::HandleModelChanged

virtual void HandleModelChanged (const TNotification &)

Interface Category:

API.

Purpose:

Called when some generic change was made to the model. Defaults to calling HandleNotification.

Calling Context:

Called by Document framework when the model changes.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

This function is not currently called by the framework.

Member Function: TDocumentComponentView::HandleNotification

virtual void HandleNotification (const TNotification &)

Interface Category:

API.

Purpose:

Implements one-stop handling of several kinds of notification. The default is to InvalidateAll. Since many kinds of notification are redundant, this can lead to multiple InvalidateAll calls. The View system is supposed to coalesce these multiple InvalidateAll calls, but sometimes it doesn't, which means that multiple redrawing of your content view could occur. Most clients in quest of high performance override this function to do nothing.

Calling Context:

Call this function directly. Mostly called by the default implementation of certain HandleXXX functions of TDocumentComponentView.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TDocumentComponentView::SetBundle

virtual void SetBundle (TGUIBundle * theBundleToAlias)

Interface Category:

API.

Purpose:

Sets the bundle for this view to the one specified.

Calling Context:

Called by the Presentation framework.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TDocumentComponentView::operator<<=

virtual TStream & operator <<= (TStream & fromWhere)

Interface Category:

API.

Purpose:

Stream-in operator.

Calling Context:

Called to stream in data.

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

virtual TStream & operator >>=(TStream & toWhere) const

Interface Category:

API.

Purpose:

Stream-out operator.

Calling Context:

Called to stream out data.

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: TDocumentComponentView::HandleBeforeDisconnectionFromViewRoot

virtual void HandleBeforeDisconnectionFromViewRoot ()

Interface Category:

API.

Purpose:

Called by the View system when a view is about to be disconnected from a rooted view hierarchy. The connection has not yet taken place, so you can take whatever housekeeping actions you need to before the connection to the view root is severed. All views from the point of connection on down have this function called on them, with parent views getting called before child views.

Calling Context:

Called by the View system before the view is disconnected (directly or indirectly) from the view root.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

This function is useful for anyone using input in views.

Member Function: TDocumentComponentView::HandleAfterConnectionToViewRoot

virtual void HandleAfterConnectionToViewRoot ()

Interface Category:

API.

Purpose:

Called by the View system after a view is connected to a rooted view hierarchy. The connection has occurred by the time this function is called. As such, you can get things like the request processor, the direct drawing GrafPort, and the event receiver. All views from the point of connection on down have this function called on them, with parent views getting called before child views.

Calling Context:

Called by the View system after the view is connected (directly or indirectly) to the view root.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

This function is useful for anyone using input in views.
Click the icon to mail questions or corrections about this material to Taligent personnel.
Copyright©1995 Taligent,Inc. All rights reserved.