Class: TClipboardPasteControlState

Declaration: GUICompoundDocumentClipboard.h

Taxonomy Categories:

Member Functions:


Interface Category:

API.

Inherits From:

MMomentaryControlState, MGUIBundle

Inherited By:

None.

Purpose:

TClipboardPasteControlState derives from MMomentaryControlState and MGUIBundle and is a control state used to paste data into the current selection from the clipboard. TClipboardPasteControlState is one of three base classes provided by the Clipboard subsystem for manipulating the clipboard.

Instantiation:

Allocate on the heap or the stack.

Deriving Classes:

Generally you should not derive from this class. If derived you should call the Select member function of this class, if interested in pasting the selected data from clipboard.

Concurrency:

Not multithread safe.

Resource Use:

No special requirements.

Member Function: TClipboardPasteControlState::TClipboardPasteControlState

  1. TClipboardPasteControlState (TGUIBundleConnection * bundleConnectionToAlias, TLabel * theAdoptedLabel)
  2. TClipboardPasteControlState (const TClipboardPasteControlState & state)
  3. TClipboardPasteControlState ()

Interface Category:

API.

Purpose:

  1. Creates a new paste control state with the specified bundle connection and label.
  2. Copy constructor.
  3. Default constructor.

Calling Context:

  1. Called to create a new paste control state with a specific bundle connection and label.
  2. Called to copy an object.
  3. Called by the stream-in operators.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TClipboardPasteControlState::~TClipboardPasteControlState

virtual ~ TClipboardPasteControlState ()

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: TClipboardPasteControlState::Select

void Select ()

Interface Category:

API.

Purpose:

Selects this control state. This function pastes the contents of the clipboard into the current selection. Any currently selected data is deleted.

Calling Context:

Called by the Input System framework.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TClipboardPasteControlState::IsEnabled

virtual bool IsEnabled () const

Interface Category:

API.

Purpose:

Computes and returns whether or not this control state is enabled. The paste control state is enabled if there is data in the clipboard, and if its type matches the data in the current selection.

Calling Context:

Called by the Input System framework.

Parameters:

Return Value:

Returns true if the control state is enabled.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TClipboardPasteControlState::AddInterests

virtual void AddInterests (TSetOf < TInterest > & set)

Interface Category:

API.

Purpose:

Adds a notification interest to the specified set. The interest added is an interest that occurs when the user changes the current selection.

Calling Context:

Called by the Input System framework.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TClipboardPasteControlState::operator=

TClipboardPasteControlState & operator =(const TClipboardPasteControlState & copy)

Interface Category:

API.

Purpose:

Assignment operator.

Calling Context:

Call this function by using the operator in an assignment statement.

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.

Member Function: TClipboardPasteControlState::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: TClipboardPasteControlState::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: TClipboardPasteControlState::GetNameLabel

const TLabel * GetNameLabel () const

Interface Category:

API.

Purpose:

Returns this control state's name label.

Calling Context:

Call this function directly.

Parameters:

Return Value:

Returns this control state's name label.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TClipboardPasteControlState::HandleCreateCommandBinding

virtual TAbstractDocumentComponentCommandBinding * HandleCreateCommandBinding (MDataExchanger * targetToAdopt) const

Interface Category:

API.

Purpose:

Creates a new document component command binding that binds the paste command with the specified data exchanger.

Calling Context:

Called by the Input System framework.

Parameters:

Return Value:

Returns the newly created command binding.

Exceptions:

Throws no exceptions, passes all exceptions through.

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.