Class: TGUIEmbedderModelView

Declaration: GUICompoundDocumentEmbedder.h

Taxonomy Categories:

Member Functions:


Interface Category:

API.

Inherits From:

TDocumentComponentView, MMouseEventHandler

Inherited By:

None.

Purpose:

TGUIEmbedderModelView implements a simple content view that can be used to build a view on TGUIEmbedderModels. It connects for notification on all the notifications generated by the TGUIEmbedderModel. For Add/Remove Component Notifications, it will automatically add/remove TComponentAreaFrameViews on the embedded components.

Instantiation:

Always allocate on the heap.

Deriving Classes:

Any view on a derived class of TGUIEmbedderModel will derive from this class.

Concurrency:

Not multithread safe.

Resource Use:

No special requirements.

Other Considerations:

None.

Member Function: TGUIEmbedderModelView::TGUIEmbedderModelView

  1. TGUIEmbedderModelView (TGUIBundle * theBundleToAlias)
  2. TGUIEmbedderModelView ()
  3. TGUIEmbedderModelView (const TGUIEmbedderModelView &)

Interface Category:

API.

Purpose:

  1. Create a view for the presenter specified by the TGUIBundle.
  2. Default constructor.
  3. Copy constructor.

Calling Context:

  1. Called by any client object. Typically called by a TGUIPresenter.
  2. Only for internal use by Resurrect. Developers should treat as protected.
  3. Called to copy an object. Only for internal use by Copy. Developers should treat as protected.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

The default and copy constructors are protected.

Member Function: TGUIEmbedderModelView::~TGUIEmbedderModelView

virtual ~ TGUIEmbedderModelView ()

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: TGUIEmbedderModelView::CreateComponentAreaView

void CreateComponentAreaView (const TComponentArea & theComp)

Interface Category:

API.

Purpose:

Creates a view on a component embedded in the TGUIEmbedderModel presented by this view. The view is added as a child of this view and is laid out using the area in the TComponentArea.

Calling Context:

Called to create a view on an embedded component.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TGUIEmbedderModelView::DeleteComponentAreaView

void DeleteComponentAreaView (const TDocumentComponentReference &)

Interface Category:

API.

Purpose:

Deletes a view on a component embedded in the TGUIEmbedderModel presented by this view. The view is orphaned and deleted if it exists.

Calling Context:

Called to delete a view on an embedded component.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TGUIEmbedderModelView::UpdateComponentAreaView

void UpdateComponentAreaView (const TComponentArea & theComp)

Interface Category:

API.

Purpose:

Updates the layout of a view on a component embedded in the TGUIEmbedderModel this view presents. The area of the TComponentArea is used to set the allocated area of the child view in this view.

Calling Context:

Called to update a view on an embedded component.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TGUIEmbedderModelView::HandleActivate

virtual void HandleActivate ()

Interface Category:

API.

Purpose:

Override of TActivatibleView. Selects the frame view for any embedded components that are part of the current selection.

Calling Context:

Called by the View system.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TGUIEmbedderModelView::HandleDeactivate

virtual void HandleDeactivate ()

Interface Category:

API.

Purpose:

Override of TActivatibleView. Deselects all frame views.

Calling Context:

Called by the View system.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TGUIEmbedderModelView::DrawContents

virtual void DrawContents (TGrafPort & port) const

Interface Category:

API.

Purpose:

Override of TView function. Does nothing.

Calling Context:

Called by View system to refresh to view contents.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TGUIEmbedderModelView::HandleAddedComponent

virtual void HandleAddedComponent (const TNotification &)

Interface Category:

API.

Purpose:

Handles the added component notification from the TGUIEmbedderModel. Calls CreateComponentAreaView for the newly added component.

Calling Context:

Called by Notification Framework.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TGUIEmbedderModelView::HandleRemovedComponent

virtual void HandleRemovedComponent (const TNotification &)

Interface Category:

API.

Purpose:

Handles the removed component notification from the TGUIEmbedderModel. Calls DeleteComponentAreaView for the removed component.

Calling Context:

Called by the Notification Framework

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TGUIEmbedderModelView::HandleComponentAreaChanged

virtual void HandleComponentAreaChanged (const TNotification &)

Interface Category:

API.

Purpose:

Handles the component area changed notification from the TGUIEmbedderModel. Calls UpdateComponentAreaView for the changed component.

Calling Context:

Called by the Notification Framework

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TGUIEmbedderModelView::CreateFrameIterator

virtual TIteratorOver < TKeyValuePair < TDocumentComponentReference , TFrameView >>* CreateFrameIterator () const

Interface Category:

API.

Purpose:

Creates an iterator over all the frame views owned by this view.

Calling Context:

Called by derived classes.

Parameters:

Return Value:

Returns an iterator over all frame views.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TGUIEmbedderModelView::MouseDown

virtual bool MouseDown (TMouseDownEvent &)

Interface Category:

API.

Purpose:

Handles the mouse down event. Starts an interactor that supports rectangular drag out selection. The interactor calls the HandleSelectionDragStart, HandleSelectionDragChange, and HandleSelectionDragEnd to allow to view to make the selection.

Calling Context:

Called by the Input system.

Parameters:

Return Value:

Always returns true.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TGUIEmbedderModelView::HandleSelectionDragStart

virtual void HandleSelectionDragStart (const TGPoint & start)

Interface Category:

API.

Purpose:

Handles the start of a rectangular drag out selection. An empty selection is set.

Calling Context:

Called by the selection interactor.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TGUIEmbedderModelView::HandleSelectionDragChange

virtual void HandleSelectionDragChange (const TGRect & theOldDragBounds, const TGRect & theNewDragBounds)

Interface Category:

API.

Purpose:

Handles a change in the drag selection rectangle. SelectComponentsIntersecting is called with the new bounds to select any component intersecting the rectangle.

Calling Context:

Called by the selection interactor.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TGUIEmbedderModelView::HandleSelectionDragEnd

virtual void HandleSelectionDragEnd (const TGRect & theDragBounds)

Interface Category:

API.

Purpose:

Handles the final drag selection rectangle. SelectComponentsIntersecting is called with the final bounds to select any component intersecting the rectangle.

Calling Context:

Called by the selection interactor.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TGUIEmbedderModelView::SelectComponentsIntersecting

void SelectComponentsIntersecting (const TGRect & theRect, TGUIEmbedderModelSelection &)

Interface Category:

API.

Purpose:

Selects all components intersecting the specified rectangle. The components are selected in the passed in selection.

Calling Context:

Called by the selection interactor.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TGUIEmbedderModelView::HandleCreateComponentAreaView

virtual TFrameView * HandleCreateComponentAreaView (const TComponentArea & theComp)

Interface Category:

API.

Purpose:

Creates the instance of the component area view. This function only creates the view, it does not added it as child. Derived classes can override this function to create a custom class of frame view.

Calling Context:

Called by CreateComponentAreaView.

Parameters:

Return Value:

Returns the frame view for the component.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TGUIEmbedderModelView::HandleDeleteComponentAreaView

virtual void HandleDeleteComponentAreaView (const TDocumentComponentReference &, TFrameView * theEmbeddedComponentView)

Interface Category:

API.

Purpose:

Deletes an instance of a component area view. This function only deletes the view instance. It has already been orphaned from its parent. The default just deletes the view.

Calling Context:

Called by DeleteComponentAreaView.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TGUIEmbedderModelView::HandleUpdateComponentAreaView

virtual void HandleUpdateComponentAreaView (const TComponentArea & theComp, TFrameView & theEmbeddedComponentView)

Interface Category:

API.

Purpose:

Updates the view's area based on a change in the component's area. The default just sets the view's allocated area in parent to the component's area.

Calling Context:

Called by UpdateComponentAreaView.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TGUIEmbedderModelView::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: TGUIEmbedderModelView::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: TGUIEmbedderModelView::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: TGUIEmbedderModelView::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.