ufe  1.0
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 "E:/jenkins/workspace/ufe-full-windows/ufe/include/selectionNotification.h"
2 #ifndef _ufeSelectionNotification
3 #define _ufeSelectionNotification
4 // ===========================================================================
5 // Copyright 2018 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 
100 {
101 public:
104 
106  SelectionCleared(const SelectionCleared&) = default;
107 
109  ~SelectionCleared() override;
110 };
111 
113 
120 {
121 public:
122 
125 
127  SelectionReplaced(const SelectionReplaced&) = default;
128 
130  ~SelectionReplaced() override;
131 };
132 
134 
142 {
143 public:
144 
145  enum OpType {Append, Remove, Clear, ReplaceWith};
146 
147  struct Op {
148  Op(OpType opTypeArg, const SceneItem::Ptr& itemArg)
149  : opType(opTypeArg), item(itemArg) {}
151  };
152 
153  typedef std::list<Op> Ops;
154 
157 
160 
162  ~SelectionCompositeNotification() override;
163 
165  void appendAppendOp(const SceneItem::Ptr& item);
166 
168  void appendRemoveOp(const SceneItem::Ptr& item);
169 
171  void appendClearOp();
172 
177  void appendReplaceWithOp();
178 
180  std::size_t size() const;
181 
183  bool empty() const;
184 
186  Ops::const_iterator cbegin() const;
188  Ops::const_iterator begin() const;
189  Ops::const_iterator cend() const;
190  Ops::const_iterator end() const;
191  Ops::iterator begin();
192  Ops::iterator end();
194 
195 private:
196 
197  Ops fOps;
198 };
199 
200 }
201 
202 #endif /* _ufeSelectionNotification */
Selection cleared notification.
Selection replaced notification.
#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:39
Base class for all selection notifications.
Op(OpType opTypeArg, const SceneItem::Ptr &itemArg)
Item added to selection notification.
Item removed from selection notification.
#define UFE_SDK_DECL
Definition: ufeExport.h:36