ObjectEditor.hpp
1 #pragma once
2 #include <score/plugins/Interface.hpp>
3 #include <score/plugins/InterfaceList.hpp>
4 #include <score/selection/Selection.hpp>
5 
6 class QMimeData;
7 namespace score
8 {
9 struct DocumentContext;
10 // TODO do it for curve, c.f. CurvePresenter::removeSelection
11 struct SCORE_LIB_BASE_EXPORT ObjectEditor : public score::InterfaceBase
12 {
13  SCORE_INTERFACE(ObjectEditor, "12951ea1-ffb0-4f77-8a3a-bf28ccb60a2e")
14 public:
15  virtual ~ObjectEditor() override;
16 
17  virtual bool copy(JSONReader& r, const Selection& s, const score::DocumentContext& ctx)
18  = 0;
19  virtual bool paste(
20  QPoint pos, QObject* focusedObject, const QMimeData& mime,
21  const score::DocumentContext& ctx)
22  = 0;
23  virtual bool remove(const Selection& s, const score::DocumentContext& ctx) = 0;
24 };
25 
26 class SCORE_LIB_BASE_EXPORT ObjectEditorList final
27  : public score::InterfaceList<ObjectEditor>
28 {
29 public:
30  virtual ~ObjectEditorList() override;
31 };
32 
33 }
Definition: JSONVisitor.hpp:52
Definition: Selection.hpp:12
Base class for plug-in interfaces.
Definition: Interface.hpp:52
InterfaceList Default implementation of InterfaceListBase.
Definition: InterfaceList.hpp:80
Definition: ObjectEditor.hpp:28
Base toolkit upon which the software is built.
Definition: Application.cpp:90
Definition: DocumentContext.hpp:18
Definition: ObjectEditor.hpp:12