![](../../Home/Icons/Home.gif)
![](../icons/UpCNM.gif)
![](../icons/CNMContext.gif)
![](../../Home/Icons/Search.gif)
Taxonomy Categories:
Member Functions:
Interface Category:
API.
Inherits From:
None.
Inherited By:
TEmbedderTextSelection
TGUIEmbedderModelSelection
Purpose:
This mixin defines the protocol that commands can use to access and modify selected components. The modifications are limited to change the area associated with the component. TComponentAreaRectControlState uses commands that require MEmbeddedComponentAccessor to change the allocated area associated with a component when the user manipulates the frame.
Instantiation:
MEmbeddedComponentAccessor is an abstract class and is never instantiated except as part of a derived class.
Deriving Classes:
Derived class of TModelSelection that want to enable commands on MEmbeddedComponentAccessor will derive from this mixin class.
Derived classes must override the pure virtual functions GetSelectedComponentCount, IsSelected, GetSelectedComponents, GetComponentArea, and SetComponentArea.
Concurrency:
Not multithread safe.
Resource Use:
No special requirements.
Other Considerations:
None.
virtual ~ MEmbeddedComponentAccessor ()
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 long GetSelectedComponentCount () const
Interface Category:
API.
Purpose:
Gets the count of components selected by the selection.
Calling Context:
Called by any client object.
Parameters:
Return Value:
Returns the count of selected components.
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 MEmbeddedComponentAccessor.
virtual bool IsSelected (const TDocumentComponentReference &) const
Interface Category:
API.
Purpose:
Determines if a specific component is selected by this selection.
Calling Context:
Called by any client object.
Parameters:
Return Value:
Returns true if the specified component is selected.
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 MEmbeddedComponentAccessor.
virtual void AddInterests (TSetOf < TInterest > & set)
Interface Category:
API.
Purpose:
Gets interests to connect for notification on changes to the area associated with components in the model selected by this selection. Derived classes override this function to return the appropriate interests.
Calling Context:
Called by an client object.
Parameters:
- TSetOf < TInterest > & set -The set of interests as returned by this function. The caller owns the interests.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
virtual void GetSelectedComponents (TCollectionOf < TDocumentComponentReference > &) const
Interface Category:
API.
Purpose:
Returns a list of all the components selected by this selection.
Calling Context:
Called by any client.
Parameters:
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 MEmbeddedComponentAccessor.
virtual void GetComponentArea (const TDocumentComponentReference &, TGArea &) const
Interface Category:
API.
Purpose:
Returns the area associated with a component in the model specified by this selection.
Calling Context:
Called by any client object.
Parameters:
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 MEmbeddedComponentAccessor.
virtual void SetComponentArea (const TDocumentComponentReference &, const TGArea &)
Interface Category:
API.
Purpose:
Sets the area associated with a component in the model specified by this selection.
Calling Context:
Called by any client object.
Parameters:
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 MEmbeddedComponentAccessor.
MEmbeddedComponentAccessor & operator =(const MEmbeddedComponentAccessor &)
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.
- MEmbeddedComponentAccessor ()
- MEmbeddedComponentAccessor (const MEmbeddedComponentAccessor &)
Interface Category:
API.
Purpose:
- Default constructor.
- Copy constructor.
Calling Context:
- Called by the stream-in operators.
- Called to copy an object.
Parameters:
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
MEmbeddedComponentAccessor is an abstract base class--all the constructors are protected. Do not instantiate this class.
Click the icon to mail questions or corrections about this material to Taligent personnel.
Copyright©1995 Taligent,Inc. All rights reserved.