ASPiK SDK
uiviewcreatecontroller.h
1 // This file is part of VSTGUI. It is subject to the license terms
2 // in the LICENSE file found in the top-level directory of this
3 // distribution and at http://github.com/steinbergmedia/vstgui/LICENSE
4 
5 #ifndef __uiviewcreatorcontroller__
6 #define __uiviewcreatorcontroller__
7 
8 #include "../uidescription.h"
9 
10 #if VSTGUI_LIVE_EDITING
11 
12 #include "../delegationcontroller.h"
13 #include <vector>
14 #include <string>
15 
16 namespace VSTGUI {
17 class UIViewCreatorDataSource;
18 
19 //----------------------------------------------------------------------------------------------------
20 class UIViewCreatorController : public NonAtomicReferenceCounted, public DelegationController, public IContextMenuController
21 {
22 public:
23  UIViewCreatorController (IController* baseController, UIDescription* description);
24  ~UIViewCreatorController () override;
25 
26  IController* getBaseController () const { return controller; }
27 protected:
28  void valueChanged (CControl* pControl) override;
29  CView* createView (const UIAttributes& attributes, const IUIDescription* description) override;
30  CView* verifyView (CView* view, const UIAttributes& attributes, const IUIDescription* description) override;
31  IControlListener* getControlListener (UTF8StringPtr name) override;
32  void appendContextMenuItems (COptionMenu& contextMenu, const CPoint& where) override;
33 
34  void setupDataSource (UTF8StringPtr filter = nullptr);
35 
36  UIViewCreatorDataSource* dataSource {nullptr};
37  CDataBrowser* dataBrowser {nullptr};
38  SharedPointer<UIDescription> description;
39  std::vector<std::string> filteredViewNames;
40  std::vector<std::string> allViewNames;
41 
42  enum {
43  kSearchFieldTag = 100
44  };
45 
46 };
47 
48 } // namespace
49 
50 #endif // VSTGUI_LIVE_EDITING
51 
52 #endif // __uiviewcreatorcontroller__
Definition: customcontrols.cpp:8