#include <clipboardHandler.h>
This base class defines an interface that runtimes can implement to provide cut/copy and paste operations for sceneItem and Selection.
Definition at line 27 of file clipboardHandler.h.
◆ Ptr
◆ ClipboardHandler() [1/2]
Ufe::ClipboardHandler::ClipboardHandler |
( |
| ) |
|
|
default |
◆ ClipboardHandler() [2/2]
Default copy constructor.
◆ ~ClipboardHandler()
virtual Ufe::ClipboardHandler::~ClipboardHandler |
( |
| ) |
|
|
virtualdefault |
◆ canBeCut()
static bool Ufe::ClipboardHandler::canBeCut |
( |
const SceneItem::Ptr & |
item | ) |
|
|
static |
Convenience method that calls canBeCut_ on the appropriate clipboard handler.
- Parameters
-
- Note
- Returns false if input item is nullptr or no clipboard handler exists for runtime of item.
◆ canBeCut_()
virtual bool Ufe::ClipboardHandler::canBeCut_ |
( |
const SceneItem::Ptr & |
item | ) |
|
|
pure virtual |
Utility method to test if an item meets specific conditions for the cut action.
- Parameters
-
- Returns
- true if the item can be cut, otherwise false.
◆ clipboardHandler()
static Ptr Ufe::ClipboardHandler::clipboardHandler |
( |
Rtid |
| ) |
|
|
static |
Convenience method to retrieve the Clipboard Handler from the input runtime id. The handler interface will remain valid as long as the given runtime remains set in the runtime manager.
◆ copyCmd()
Convenience method that groups the items from the input selection into their runtime ID and calls the corresponding virtual copyCmd_ on each clipboard handler. Creates a command to perform the copy operation. The command is not executed.
- Exceptions
-
- Parameters
-
[in] | selection | The input selection to copy. |
- Returns
- Command whose execution will copy the input items.
◆ copyCmd_() [1/2]
Creates a command which will copy the input item. The command is not executed. The default implementation provided puts the input item in a Selection and then calls the corresponding method which takes a Selection argument.
- Parameters
-
[in] | item | The item to copy. |
- Exceptions
-
std::invalid_argument | if the argument is a null pointer. |
- Returns
- Command whose execution will copy the input items.
◆ copyCmd_() [2/2]
Creates a command which will copy the items in the input selection. The command is not executed. The items are copied to the clipboard.
- Parameters
-
◆ cutCmd()
Convenience method that groups the items from the input selection into their runtime ID and calls the corresponding virtual cutCmd_ on each clipboard handler. Creates a command to perform the cut operation. The command is not executed.
- Exceptions
-
- Parameters
-
[in] | selection | The input selection to cut. |
- Returns
- Command whose execution will cut the input items.
◆ cutCmd_() [1/2]
Creates a command which will cut the input item. The command is not executed. The default implementation provided puts the input item in a Selection and then calls the corresponding method which takes a Selection argument.
- Parameters
-
- Exceptions
-
std::invalid_argument | if the argument is a null pointer. |
- Returns
- Command whose execution will cut the input items.
◆ cutCmd_() [2/2]
Creates a command which will cut the items in the input selection. The command is not executed. The items are copied to the clipboard, then they are deleted.
- Parameters
-
◆ hasItemsToPaste()
static bool Ufe::ClipboardHandler::hasItemsToPaste |
( |
const Rtid & |
rtid | ) |
|
|
static |
Convenience method that calls hasItemsToPaste_ on the appropriate clipboard handler.
- Parameters
-
[in] | rtid | Runtime ID for the clipboard handler to call. |
- Note
- Returns false if no clipboard handler exists for given runtime ID.
◆ hasItemsToPaste_()
virtual bool Ufe::ClipboardHandler::hasItemsToPaste_ |
( |
| ) |
|
|
pure virtual |
Utility method to check if the clipboard handler has any items to paste.
- Returns
- true if there are items to paste, otherwise false.
◆ pasteCmd() [1/2]
Convenience method that gets the clipboard handler corresponding to the runtime ID of the input item and then calls the virtual method pasteCmd_.
- Exceptions
-
std::invalid_argument | if the input item is a null pointer. |
NoClipboardHandler | if no clipboard handler found for runtime of item. |
- Parameters
-
[in] | parentItem | The target parent item into which the clipboard is pasted. |
- Returns
- Command whose execution will paste the input items.
◆ pasteCmd() [2/2]
Convenience method that groups the items from the input selection into their runtime ID and calls the corresponding virtual pasteCmd_ on each clipboard handler. Creates a command to perform the paste operation. The command is not executed.
- Exceptions
-
- Parameters
-
[in] | parentItems | The target parent items into which the clipboard is pasted. |
- Returns
- Command whose execution will paste the input items.
◆ pasteCmd_() [1/2]
Creates a command which will paste the item(s) from clipboard to the input parent destination item. The command is not executed.
- Parameters
-
[in] | parentItem | The parent where to try and paste the the clipboard item(s). |
- Returns
- Command whose execution will paste the input items.
◆ pasteCmd_() [2/2]
Creates a command which will be paste the item(s) from the clipboard to the most suitable parent destination item. The command is not executed.
- Parameters
-
[in] | parentItems | The parent items where to try and paste the clipboard item(s). |
- Returns
- Command whose execution will paste the input items.
◆ preCopy()
static void Ufe::ClipboardHandler::preCopy |
( |
| ) |
|
|
static |
Convenience method that calls preCopy_ for each clipboard handler that exists for for all the registered runtimes.
◆ preCopy_()
virtual void Ufe::ClipboardHandler::preCopy_ |
( |
| ) |
|
|
pure virtual |
Utility method to perform any cleanup before the copy operation is executed.
◆ preCut()
static void Ufe::ClipboardHandler::preCut |
( |
| ) |
|
|
static |
Convenience method that calls preCut_ for each clipboard handler that exists for for all the registered runtimes.
◆ preCut_()
virtual void Ufe::ClipboardHandler::preCut_ |
( |
| ) |
|
|
pure virtual |
Utility method to perform any cleanup before the cut operation is executed.
The documentation for this class was generated from the following file: