ASPiK SDK
uigradientscontroller.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 __uigradientscontroller__
6 #define __uigradientscontroller__
7 
8 #include "../uidescription.h"
9 
10 #if VSTGUI_LIVE_EDITING
11 
12 #include "../delegationcontroller.h"
13 #include "../../lib/cdatabrowser.h"
14 
15 namespace VSTGUI {
16 
17 class UIGradientsDataSource;
18 class IActionPerformer;
19 
20 //----------------------------------------------------------------------------------------------------
21 class UIGradientsController : public NonAtomicReferenceCounted, public DelegationController, public IGenericStringListDataBrowserSourceSelectionChanged
22 {
23 public:
24  UIGradientsController (IController* baseController, UIDescription* description, IActionPerformer* actionPerformer);
25  ~UIGradientsController () override;
26 
27 protected:
28  CView* createView (const UIAttributes& attributes, const IUIDescription* description) override;
29  CView* verifyView (CView* view, const UIAttributes& attributes, const IUIDescription* description) override;
30  IControlListener* getControlListener (UTF8StringPtr name) override;
31  void valueChanged (CControl* pControl) override;
32  void dbSelectionChanged (int32_t selectedRow, GenericStringListDataBrowserSource* source) override;
33 
34  void showEditDialog ();
35 
36  SharedPointer<UIDescription> editDescription;
37  SharedPointer<CControl> editButton;
38  IActionPerformer* actionPerformer;
39  UIGradientsDataSource* dataSource;
40 
41  enum {
42  kAddTag = 0,
43  kRemoveTag,
44  kSearchTag,
45  kEditTag
46  };
47 };
48 
49 } // namespace
50 
51 #endif // VSTGUI_LIVE_EDITING
52 
53 #endif // __uigradientscontroller__
Definition: customcontrols.cpp:8