5 #ifndef __uiselection__ 6 #define __uiselection__ 8 #if VSTGUI_LIVE_EDITING 10 #include "../../lib/cview.h" 11 #include "../../lib/idependency.h" 21 using UISelectionViewList = std::list<SharedPointer<CView>>;
23 class UISelection :
public CBaseObject,
protected UISelectionViewList,
public IDependency
27 using UISelectionViewList::const_iterator;
28 using UISelectionViewList::const_reverse_iterator;
29 using UISelectionViewList::begin;
30 using UISelectionViewList::end;
31 using UISelectionViewList::rbegin;
32 using UISelectionViewList::rend;
39 UISelection (int32_t style = kMultiSelectionStyle);
40 ~UISelection ()
override;
42 void setStyle (int32_t style);
44 void add (CView* view);
45 void remove (CView* view);
46 void setExclusive (CView* view);
49 CView* first ()
const;
51 bool contains (CView* view)
const;
52 bool containsParent (CView* view)
const;
54 int32_t total ()
const;
55 CRect getBounds ()
const;
56 static CRect getGlobalViewCoordinates (CView* view);
58 void moveBy (
const CPoint& p);
59 void invalidRects ()
const;
61 void setDragOffset (
const CPoint& p) { dragOffset = p; }
62 const CPoint& getDragOffset ()
const {
return dragOffset; }
64 static IdStringPtr kMsgSelectionWillChange;
65 static IdStringPtr kMsgSelectionChanged;
66 static IdStringPtr kMsgSelectionViewWillChange;
67 static IdStringPtr kMsgSelectionViewChanged;
69 bool store (OutputStream& stream, IUIDescription* uiDescription);
70 bool restore (InputStream& stream, IUIDescription* uiDescription);
73 std::list<CBaseObject*> dependencies;
81 #endif // VSTGUI_LIVE_EDITING 83 #endif // __uiselection__ Definition: customcontrols.cpp:8