Taxonomy Categories:
Member Functions:
Interface Category:
API.
Inherits From:
None.
Inherited By:
TDocumentComponentToolCommandBinding
TGUIDocumentComponentCommandBindingTo
TGUIToolCommandBinding
Purpose:
MGUIDocumentComponentCommandBinding is an abstract base class that provides for a name label and public accessors to retrieve the model or presenter state selection. This binding also supports setting the Undo/Redo labels in a menu correctly
Instantiation:
Abstract base class; do not allocate.
Deriving Classes:
Provided classes include TGUIDocumentComponentCommandBindingTo. Classes deriving from MGUIDocumentComponentCommandBinding must override both forms of the pure virtual functions HandleGetModelSelection and HandleGetPresenterStateSelection.
Concurrency:
Not multithread safe.
Resource Use:
No special requirements.
virtual ~ MGUIDocumentComponentCommandBinding ()
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.
- TLabel * GetNameLabel ()
- const TLabel * GetNameLabel () const
Interface Category:
API.
Purpose:
- Returns the name label for the command.
- Returns a const pointer to the name label for the command.
Calling Context:
- Called when the name label is required.
- Called when the name label is required.
Parameters:
- Takes no parameters.
- Takes no parameters.
Return Value:
Returns the name label for the command.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
void SetUpdateCurrentSelection ( bool =true )
Interface Category:
API.
Purpose:
Sets whether the current selection should be updated from the selection bound to this command when the command is executed.
Calling Context:
Called by the command creator.
Parameters:
- bool =true -Indicates whether or not the selection bound to this command will be set as the current selection after this command is executed.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
bool GetUpdateCurrentSelection () const
Interface Category:
API.
Purpose:
Returns whether the current selection should be updated from the selection bound to this command when the command is executed.
Calling Context:
Called by the GUI Compound Document framework to determine if the current selection should be updated from the selection bound to this command.
Parameters:
Return Value:
Returns true if current selection should be updated; false otherwise.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
- TModelSelection * GetModelSelection ()
- const TModelSelection * GetModelSelection () const
Interface Category:
API.
Purpose:
- Returns the bound model selection.
- Returns a const pointer to the bound model selection.
Calling Context:
- Called when the bound model selection is required.
- Called when the bound model selection is required.
Parameters:
- Takes no parameters.
- Takes no parameters.
Return Value:
Returns the bound model selection.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
This function calls HandleGetModelSelection. Derived classes wishing to modify the behavior of GetModelSelection should not override this function, but rather HandleGetModelSelection.
- TPresenterStateSelection * GetPresenterStateSelection ()
- const TPresenterStateSelection * GetPresenterStateSelection () const
Interface Category:
API.
Purpose:
- Returns the bound presenter state selection.
- Returns a const pointer to the bound presenter state selection.
Calling Context:
- Called when the bound presenter state selection is required.
- Called when the bound presenter state selection is required.
Parameters:
- Takes no parameters.
- Takes no parameters.
Return Value:
Returns the bound presenter state selection.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
This function calls HandleGetPresenterStateSelection. Derived classes wishing to modify the behavior of GetPresenterStateSelection should not override this function, but rather HandleGetPresenterStateSelection.
void SetPresenterReference (const TPresenterReference &)
Interface Category:
API.
Purpose:
Sets the presenter reference for the presenter from which this command was applied.
Calling Context:
Called by the command creator.
Parameters:
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
TPresenterReference GetPresenterReference () const
Interface Category:
API.
Purpose:
Returns the presenter reference from which this command was applied.
Calling Context:
Called when the presenter is required.
Parameters:
Return Value:
Returns the presenter from which this command was applied.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
void AdoptNameLabel ( TLabel * )
Interface Category:
API.
Purpose:
Adopts the name label to be used for this command.
Calling Context:
Called by any client.
Parameters:
- const TLabel * -The name label to be adopted.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
- MGUIDocumentComponentCommandBinding ()
- MGUIDocumentComponentCommandBinding (const TGUIBundle & guiBundle, const TText & name)
- MGUIDocumentComponentCommandBinding (const TGUIBundle & guiBundle, TLabel * nameLabelToAdopt)
- MGUIDocumentComponentCommandBinding (const MGUIDocumentComponentCommandBinding &)
Interface Category:
API.
Purpose:
- Default constructor.
- Creates a command binding whose target is specified by the GUI bundle, and whose regular command label is the one specified.
- Creates a command binding whose target is specified by the GUI bundle, and whose regular command label is the one specified to adopt.
- Copy constructor.
Calling Context:
- Called by the stream-in operators.
- Classes deriving from MGUIDocumentComponentCommandBinding can call this function directly.
- Classes deriving from MGUIDocumentComponentCommandBinding can call this function directly.
- Called to copy an object.
Parameters:
- Takes no parameters.
- const TGUIBundle & -The GUIBundle specifying the target of this command.
- const TText & name -The regular command label for the new command binding.
- const TGUIBundle &guiBundle -The GUIBundle specifying the target of this command.
- TLabel * nameLabelToAdopt -The name label for the new command binding.
- const MGUIDocumentComponentCommandBinding & -The object to be copied.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
MGUIDocumentComponentCommandBinding is an abstract base class. Do not instantiate this class.
- virtual TModelSelection * HandleGetModelSelection ()
- virtual const TModelSelection * HandleGetModelSelection () const
Interface Category:
API.
Purpose:
- Handles the retrieval of the bound model selection. Classes deriving from MGUIDocumentComponentCommandBinding override this function to provide specific model selection retrieval behavior.
- Handles the retrieval of the bound model selection. Classes deriving from MGUIDocumentComponentCommandBinding override this function to provide specific model selection retrieval behavior.
Calling Context:
- Called from GetModelSelection.
- Called from GetModelSelection.
Parameters:
- Takes no parameters.
- Takes no parameters.
Return Value:
Returns the bound model selection.
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 MGUIDocumentComponentCommandBinding.
- virtual TPresenterStateSelection * HandleGetPresenterStateSelection ()
- virtual const TPresenterStateSelection * HandleGetPresenterStateSelection () const
Interface Category:
API.
Purpose:
- Handles the retrieval of the bound presenter state selection. Classes deriving from MGUIDocumentComponentCommandBinding override this function to provide specific presenter state selection retrieval behavior.
- Handles the retrieval of the bound presenter state selection. Classes deriving from MGUIDocumentComponentCommandBinding override this function to provide specific presenter state selection retrieval behavior.
Calling Context:
- Called from GetPresenterStateSelection.
- Called from GetPresenterStateSelection.
Parameters:
- Takes no parameters.
- Takes no parameters.
Return Value:
Returns the bound presenter state selection.
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 MGUIDocumentComponentCommandBinding.
virtual TStream & operator >>=(TStream & towhere) const
Interface Category:
API.
Purpose:
Stream-out operator.
Calling Context:
Called to stream out data.
Parameters:
- TStream & towhere -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 & fromwhere)
Interface Category:
API.
Purpose:
Stream-in operator.
Calling Context:
Called to stream in data.
Parameters:
- TStream & fromwhere -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.
Click the icon to mail questions or corrections about this material to Taligent personnel.
Copyright©1995 Taligent,Inc. All rights reserved.