ufe  4.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.10-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 #include <bitset>
17 
18 UFE_NS_DEF {
19 
21 
27 {
28 public:
29  enum OpType {Append, Remove, Insert, Clear, ReplaceWith, SelectionCompositeNotification};
30 
32  SelectionChanged(OpType opType);
33 
35  SelectionChanged(const SelectionChanged&) = default;
36 
38  ~SelectionChanged() override;
39 
43  OpType opType() const;
44 private:
45  const OpType fOpType;
46 };
47 
49 
56 {
57 public:
58 
62 
65 
67  ~SelectionItemAppended() override;
68 
70  SceneItem::Ptr item() const;
71 
72 private:
74 };
75 
77 
84 {
85 public:
89 
92 
94  ~SelectionItemRemoved() override;
95 
97  SceneItem::Ptr item() const;
98 
99 private:
101 };
102 
104 
113 {
114 public:
119  const SceneItem::Ptr& position,
120  const SceneItem::Ptr& item
121  );
122 
125 
127  ~SelectionItemInserted() override;
128 
130  SceneItem::Ptr item() const;
131 
133  SceneItem::Ptr position() const;
134 
135 private:
138 };
139 
141 
147 {
148 public:
151 
153  SelectionCleared(const SelectionCleared&) = default;
154 
156  ~SelectionCleared() override;
157 };
158 
160 
167 {
168 public:
169 
172 
174  SelectionReplaced(const SelectionReplaced&) = default;
175 
177  ~SelectionReplaced() override;
178 };
179 
181 
189 {
190 public:
191 
192  struct UFE_SDK_DECL Op {
193  Op(OpType opTypeArg) : opType(opTypeArg) {}
194  Op(OpType opTypeArg, const SceneItem::Ptr& itemArg)
195  : opType(opTypeArg), item(itemArg) {}
196  Op(OpType opTypeArg,
197  const SceneItem::Ptr& positionArg,
198  const SceneItem::Ptr& itemArg)
199  : opType(opTypeArg), item(itemArg), position(positionArg) {}
200 
201  Op(const SelectionChanged&);
202 
203  OpType opType;
204  SceneItem::Ptr item{nullptr};
205  SceneItem::Ptr position{nullptr};
206  };
207 
208  typedef std::list<Op> Ops;
209 
212 
215 
217  ~SelectionCompositeNotification() override;
218 
220  void appendAppendOp(const SceneItem::Ptr& item);
221 
223  void appendRemoveOp(const SceneItem::Ptr& item);
224 
226  void appendInsertOp(
227  const SceneItem::Ptr& position,
228  const SceneItem::Ptr& item
229  );
230 
232  void appendClearOp();
233 
238  void appendReplaceWithOp();
239 
241  std::size_t size() const;
242 
244  bool empty() const;
245 
247  Ops::const_iterator cbegin() const;
249  Ops::const_iterator begin() const;
250  Ops::const_iterator cend() const;
251  Ops::const_iterator end() const;
252  Ops::iterator begin();
253  Ops::iterator end();
255 
256 private:
257 
259 };
260 
261 }
262 
263 #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:28
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