Class: MGUIDocumentComponentCommandBinding

Declaration: GUICompoundDocumentCommand.h

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.

Member Function: MGUIDocumentComponentCommandBinding::~MGUIDocumentComponentCommandBinding

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.

Member Function: MGUIDocumentComponentCommandBinding::GetNameLabel

  1. TLabel * GetNameLabel ()
  2. const TLabel * GetNameLabel () const

Interface Category:

API.

Purpose:

  1. Returns the name label for the command.
  2. Returns a const pointer to the name label for the command.

Calling Context:

  1. Called when the name label is required.
  2. Called when the name label is required.

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.

Member Function: MGUIDocumentComponentCommandBinding::SetUpdateCurrentSelection

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:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: MGUIDocumentComponentCommandBinding::GetUpdateCurrentSelection

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.

Member Function: MGUIDocumentComponentCommandBinding::GetModelSelection

  1. TModelSelection * GetModelSelection ()
  2. const TModelSelection * GetModelSelection () const

Interface Category:

API.

Purpose:

  1. Returns the bound model selection.
  2. Returns a const pointer to the bound model selection.

Calling Context:

  1. Called when the bound model selection is required.
  2. Called when the bound model selection is required.

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.

Member Function: MGUIDocumentComponentCommandBinding::GetPresenterStateSelection

  1. TPresenterStateSelection * GetPresenterStateSelection ()
  2. const TPresenterStateSelection * GetPresenterStateSelection () const

Interface Category:

API.

Purpose:

  1. Returns the bound presenter state selection.
  2. Returns a const pointer to the bound presenter state selection.

Calling Context:

  1. Called when the bound presenter state selection is required.
  2. Called when the bound presenter state selection is required.

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.

Member Function: MGUIDocumentComponentCommandBinding::SetPresenterReference

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.

Member Function: MGUIDocumentComponentCommandBinding::GetPresenterReference

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.

Member Function: MGUIDocumentComponentCommandBinding::AdoptNameLabel

void AdoptNameLabel ( TLabel * )

Interface Category:

API.

Purpose:

Adopts the name label to be used for this command.

Calling Context:

Called by any client.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: MGUIDocumentComponentCommandBinding::MGUIDocumentComponentCommandBinding

  1. MGUIDocumentComponentCommandBinding ()
  2. MGUIDocumentComponentCommandBinding (const TGUIBundle & guiBundle, const TText & name)
  3. MGUIDocumentComponentCommandBinding (const TGUIBundle & guiBundle, TLabel * nameLabelToAdopt)
  4. MGUIDocumentComponentCommandBinding (const MGUIDocumentComponentCommandBinding &)

Interface Category:

API.

Purpose:

  1. Default constructor.
  2. Creates a command binding whose target is specified by the GUI bundle, and whose regular command label is the one specified.
  3. Creates a command binding whose target is specified by the GUI bundle, and whose regular command label is the one specified to adopt.
  4. Copy constructor.

Calling Context:

  1. Called by the stream-in operators.
  2. Classes deriving from MGUIDocumentComponentCommandBinding can call this function directly.
  3. Classes deriving from MGUIDocumentComponentCommandBinding can call this function directly.
  4. Called to copy an object.

Parameters:

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.

Member Function: MGUIDocumentComponentCommandBinding::HandleGetModelSelection

  1. virtual TModelSelection * HandleGetModelSelection ()
  2. virtual const TModelSelection * HandleGetModelSelection () const

Interface Category:

API.

Purpose:

  1. Handles the retrieval of the bound model selection. Classes deriving from MGUIDocumentComponentCommandBinding override this function to provide specific model selection retrieval behavior.
  2. Handles the retrieval of the bound model selection. Classes deriving from MGUIDocumentComponentCommandBinding override this function to provide specific model selection retrieval behavior.

Calling Context:

  1. Called from GetModelSelection.
  2. Called from GetModelSelection.

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.

Member Function: MGUIDocumentComponentCommandBinding::HandleGetPresenterStateSelection

  1. virtual TPresenterStateSelection * HandleGetPresenterStateSelection ()
  2. virtual const TPresenterStateSelection * HandleGetPresenterStateSelection () const

Interface Category:

API.

Purpose:

  1. Handles the retrieval of the bound presenter state selection. Classes deriving from MGUIDocumentComponentCommandBinding override this function to provide specific presenter state selection retrieval behavior.
  2. 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:

  1. Called from GetPresenterStateSelection.
  2. Called from GetPresenterStateSelection.

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.

Member Function: MGUIDocumentComponentCommandBinding::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: MGUIDocumentComponentCommandBinding::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.
Click the icon to mail questions or corrections about this material to Taligent personnel.
Copyright©1995 Taligent,Inc. All rights reserved.