5 #include <editor/Constants.h> 6 #include <editor/EditorGlobal.h> 8 #include <UnigineNode.h> 9 #include <UnigineVector.h> 10 #include <UnigineHashSet.h> 22 class SelectorGUIDsPrivate;
23 class SelectorNodesPrivate;
24 class IndexListPrivate;
43 SELECTOR_USER = 0x0100
49 class EDITOR_API Selector
56 virtual int type()
const = 0;
59 virtual bool equal(
const Selector *selector)
const = 0;
62 virtual Selector *clone ()
const = 0;
76 static SelectorGUIDs *createRuntimesSelector (Unigine::Vector<Unigine::UGUID> guids);
80 static SelectorGUIDs *createMaterialsSelector (Unigine::Vector<Unigine::UGUID> guids);
84 static SelectorGUIDs *createPropertiesSelector(Unigine::Vector<Unigine::UGUID> guids);
90 SelectorGUIDs(
int type, Unigine::Vector<Unigine::UGUID> guids);
95 int type()
const override;
99 bool equal(
const Selector *selector)
const override;
106 Unigine::Vector<Unigine::UGUID> guids()
const;
110 bool contains(
const Unigine::UGUID &guid)
const;
117 ::Editor::Internal::SelectorGUIDsPrivate *d;
131 static SelectorNodes *createObjectsSelector(
const Unigine::Vector<Unigine::NodePtr> &nodes);
152 virtual int type()
const = 0;
162 virtual void exclude(Constants::SubObjectType sub) = 0;
168 explicit SelectorNodes(
const Unigine::Vector<Unigine::NodePtr> &nodes);
173 int type()
const override;
177 bool equal(
const Selector *selector)
const override;
184 Unigine::Vector<Unigine::NodePtr> getNodes()
const;
194 void extend(
const Unigine::NodePtr &node);
197 void extend(
const Unigine::Vector<Unigine::NodePtr> &nodes);
201 void extend(
const Unigine::NodePtr &node,
SubItemList *subs);
205 void exclude(
const Unigine::NodePtr &node);
208 void exclude(
const Unigine::Vector<Unigine::NodePtr> &nodes);
213 void exclude(Constants::SubObjectType stype);
218 bool contains(
const Unigine::NodePtr &node)
const;
227 SubItemList *getSubItemList(
const Unigine::NodePtr &node)
const;
235 IndexList *getIndexList(
int node_id)
const;
243 IndexList *getIndexList(
const Unigine::NodePtr &node)
const;
254 Unigine::HashSet<int> getIntersectedIndexes(Constants::SubObjectType stype)
const;
266 void setNeedExpand(
bool value);
268 bool isNeedExpand()
const;
271 ::Editor::Internal::SelectorNodesPrivate *d;
289 void extend(Constants::SubObjectType stype,
int index);
295 void extend(Constants::SubObjectType stype,
int from,
int to);
299 int type()
const override;
303 bool equal(SubItemList *other)
const override;
306 void merge(SubItemList *other)
override;
312 void exclude(Constants::SubObjectType stype)
override;
318 void exclude(Constants::SubObjectType stype,
int index);
325 bool contains(Constants::SubObjectType stype,
int index)
const;
330 Unigine::HashSet<int> getSubObjectIndexes(Constants::SubObjectType stype)
const;
333 bool empty(Constants::SubObjectType stype)
const;
337 int size(Constants::SubObjectType stype)
const;
344 ::Editor::Internal::IndexListPrivate *d;
Selector for GUIDs-based items (materials, properties, runtimes). An item of this type is associated ...
Definition: Selector.h:70
This class represents a list of selected subitems of a selected node. When an object is selected,...
Definition: Selector.h:146
SubType
Subitem type. The first 256 types are reserved by UNIGINE, user subitem types start from USER + i (25...
Definition: Selector.h:134
This class represents a list of indices of selected subitems of a selected node. When an object is se...
Definition: Selector.h:278
This class is used to manage selected nodes along with their subobjects (such as surfaces,...
Definition: Selector.h:126