ufe  3.2
Universal Front End is a DCC-agnostic component that will allow a DCC to browse and edit data in multiple data models
selectionNotification.h
Go to the documentation of this file.
1 #line 1 "S:/jenkins/workspace/ECP/ufe/ufe-full-python3.9-windows/ufe/include/selectionNotification.h"
2 #ifndef _ufeSelectionNotification
3 #define _ufeSelectionNotification
4 // ===========================================================================
5 // Copyright 2020 Autodesk, Inc. All rights reserved.
6 //
7 // Use of this software is subject to the terms of the Autodesk license
8 // agreement provided at the time of installation or download, or which
9 // otherwise accompanies this software in either electronic or hard copy form.
10 // ===========================================================================
11 
12 #include "notification.h"
13 #include "sceneItem.h"
14 
15 #include <list>
16 
17 UFE_NS_DEF {
18 
20 
26 {
27 public:
30 
32  SelectionChanged(const SelectionChanged&) = default;
33 
35  ~SelectionChanged() override;
36 };
37 
39 
46 {
47 public:
48 
52 
55 
57  ~SelectionItemAppended() override;
58 
60  SceneItem::Ptr item() const;
61 
62 private:
64 };
65 
67 
74 {
75 public:
79 
82 
84  ~SelectionItemRemoved() override;
85 
87  SceneItem::Ptr item() const;
88 
89 private:
91 };
92 
94 
103 {
104 public:
109  const SceneItem::Ptr& position,
110  const SceneItem::Ptr& item
111  );
112 
115 
117  ~SelectionItemInserted() override;
118 
120  SceneItem::Ptr item() const;
121 
123  SceneItem::Ptr position() const;
124 
125 private:
128 };
129 
131 
137 {
138 public:
141 
143  SelectionCleared(const SelectionCleared&) = default;
144 
146  ~SelectionCleared() override;
147 };
148 
150 
157 {
158 public:
159 
162 
164  SelectionReplaced(const SelectionReplaced&) = default;
165 
167  ~SelectionReplaced() override;
168 };
169 
171 
179 {
180 public:
181 
182  enum OpType {Append, Remove, Insert, Clear, ReplaceWith};
183 
184  struct Op {
185  Op(OpType opTypeArg) : opType(opTypeArg) {}
186  Op(OpType opTypeArg, const SceneItem::Ptr& itemArg)
187  : opType(opTypeArg), item(itemArg) {}
188  Op(OpType opTypeArg,
189  const SceneItem::Ptr& positionArg,
190  const SceneItem::Ptr& itemArg)
191  : opType(opTypeArg), item(itemArg), position(positionArg) {}
193  SceneItem::Ptr item{nullptr};
194  SceneItem::Ptr position{nullptr};
195  };
196 
197  typedef std::list<Op> Ops;
198 
201 
204 
206  ~SelectionCompositeNotification() override;
207 
209  void appendAppendOp(const SceneItem::Ptr& item);
210 
212  void appendRemoveOp(const SceneItem::Ptr& item);
213 
215  void appendInsertOp(
216  const SceneItem::Ptr& position,
217  const SceneItem::Ptr& item
218  );
219 
221  void appendClearOp();
222 
227  void appendReplaceWithOp();
228 
230  std::size_t size() const;
231 
233  bool empty() const;
234 
236  Ops::const_iterator cbegin() const;
238  Ops::const_iterator begin() const;
239  Ops::const_iterator cend() const;
240  Ops::const_iterator end() const;
241  Ops::iterator begin();
242  Ops::iterator end();
244 
245 private:
246 
248 };
249 
250 }
251 
252 #endif /* _ufeSelectionNotification */
Selection cleared notification.
Selection replaced notification.
Op(OpType opTypeArg, const SceneItem::Ptr &positionArg, const SceneItem::Ptr &itemArg)
#define UFE_NS_DEF
Definition: ufe.h:35
Base class for all notifications.
Definition: notification.h:27
Selection composite notification.
std::shared_ptr< SceneItem > Ptr
Definition: sceneItem.h:40
Base class for all selection notifications.
Op(OpType opTypeArg, const SceneItem::Ptr &itemArg)
Item inserted into selection notification.
Item added to selection notification.
Item removed from selection notification.
#define UFE_SDK_DECL
Definition: ufeExport.h:36