ufe 5.5
Universal Front End is a DCC-agnostic component that will allow a DCC to browse and edit data in multiple data models
clipboardHandler.h
Go to the documentation of this file.
1#line 1 "S:/jenkins/workspace/ECP/ufe/ufe-full-python3.11-windows/ufe/include/clipboardHandler.h"
2#ifndef _clipboardHandler
3#define _clipboardHandler
4
5// ===========================================================================
6// Copyright 2024 Autodesk, Inc. All rights reserved.
7//
8// Use of this software is subject to the terms of the Autodesk license
9// agreement provided at the time of installation or download, or which
10// otherwise accompanies this software in either electronic or hard copy form.
11// ===========================================================================
12
13#include "common/ufeExport.h"
14
15#include "sceneItem.h"
16#include "selection.h"
17#include "undoableCommand.h"
18#include "clipboardCommands.h"
19
21
28{
29public:
30 typedef std::shared_ptr<ClipboardHandler> Ptr;
31
33 ClipboardHandler() = default;
37 virtual ~ClipboardHandler() = default;
38
43
51
59
70 static UndoableCommand::Ptr cutCmd(const Selection& selection);
71
82 static UndoableCommand::Ptr copyCmd(const Selection& selection);
83
94 static UndoableCommand::Ptr pasteCmd(const Selection& parentItems);
95
103
108 virtual UndoableCommand::Ptr cutCmd_(const Selection& selection) = 0;
109
114 virtual UndoableCommand::Ptr copyCmd_(const Selection& selection) = 0;
115
121
127 virtual UndoableCommand::Ptr pasteCmd_(const Selection& parentItems) = 0;
128
132 static bool hasItemsToPaste(const Rtid& rtid);
133
136 virtual bool hasItemsToPaste_() = 0;
137
141 static bool canBeCut(const SceneItem::Ptr& item);
142
146 virtual bool canBeCut_(const SceneItem::Ptr& item) = 0;
147
150 static void preCopy();
151
153 virtual void preCopy_() = 0;
154
157 static void preCut();
158
160 virtual void preCut_() = 0;
161};
162
163}
164
165#endif /* _clipboardHandler */
static PasteClipboardCommand::Ptr pasteCmd(const SceneItem::Ptr &parentItem)
virtual void preCopy_()=0
Utility method to perform any cleanup before the copy operation is executed.
ClipboardHandler(const ClipboardHandler &)=default
Default copy constructor.
static UndoableCommand::Ptr pasteCmd(const Selection &parentItems)
static UndoableCommand::Ptr cutCmd(const Selection &selection)
std::shared_ptr< ClipboardHandler > Ptr
virtual bool hasItemsToPaste_()=0
virtual UndoableCommand::Ptr copyCmd_(const Selection &selection)=0
virtual UndoableCommand::Ptr copyCmd_(const SceneItem::Ptr &item)
virtual UndoableCommand::Ptr pasteCmd_(const Selection &parentItems)=0
ClipboardHandler()=default
Constructor.
virtual ~ClipboardHandler()=default
Destructor.
static bool hasItemsToPaste(const Rtid &rtid)
virtual UndoableCommand::Ptr cutCmd_(const SceneItem::Ptr &item)
static bool canBeCut(const SceneItem::Ptr &item)
static UndoableCommand::Ptr copyCmd(const Selection &selection)
virtual void preCut_()=0
Utility method to perform any cleanup before the cut operation is executed.
virtual bool canBeCut_(const SceneItem::Ptr &item)=0
static void preCopy()
static void preCut()
static Ptr clipboardHandler(Rtid)
virtual PasteClipboardCommand::Ptr pasteCmd_(const SceneItem::Ptr &parentItem)=0
virtual UndoableCommand::Ptr cutCmd_(const Selection &selection)=0
std::shared_ptr< PasteClipboardCommand > Ptr
std::shared_ptr< SceneItem > Ptr
Definition: sceneItem.h:44
Selection list for objects in the scene.
Definition: selection.h:28
std::shared_ptr< UndoableCommand > Ptr
uint32_t Rtid
Definition: rtid.h:26
#define UFE_NS_DEF
Definition: ufe.h:35
Definition of macros for symbol visibility.
#define UFE_SDK_DECL
Definition: ufeExport.h:36