ASPiK SDK
delegationcontroller.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 __delegationcontroller__
6 #define __delegationcontroller__
7 
8 #include "icontroller.h"
9 
10 namespace VSTGUI {
11 
12 //-----------------------------------------------------------------------------
14 {
15 public:
16  explicit DelegationController (IController* controller) : controller (controller) {}
17 
18  // IControlListener
19  void valueChanged (CControl* pControl) override { controller->valueChanged (pControl); }
20  int32_t controlModifierClicked (CControl* pControl, CButtonState button) override { return controller->controlModifierClicked (pControl, button); }
21  void controlBeginEdit (CControl* pControl) override { controller->controlBeginEdit (pControl); }
22  void controlEndEdit (CControl* pControl) override { controller->controlEndEdit (pControl); }
23  void controlTagWillChange (VSTGUI::CControl* pControl) override { controller->controlTagWillChange (pControl); }
24  void controlTagDidChange (VSTGUI::CControl* pControl) override { controller->controlTagDidChange (pControl); }
25  // IController
26  int32_t getTagForName (UTF8StringPtr name, int32_t registeredTag) const override { return controller->getTagForName (name, registeredTag); }
27  IControlListener* getControlListener (UTF8StringPtr name) override { return controller->getControlListener (name); }
28  CView* createView (const UIAttributes& attributes, const IUIDescription* description) override { return controller->createView (attributes, description); }
29  CView* verifyView (CView* view, const UIAttributes& attributes, const IUIDescription* description) override { return controller->verifyView (view, attributes, description); }
30  IController* createSubController (IdStringPtr name, const IUIDescription* description) override { return controller->createSubController (name, description); }
31 protected:
32  IController* controller;
33 };
34 
35 }
36 
37 #endif // __delegationcontroller__
Definition: delegationcontroller.h:13
int32_t controlModifierClicked(CControl *pControl, CButtonState button) override
return 1 if you want the control to not handle it, otherwise 0
Definition: delegationcontroller.h:20
Definition: customcontrols.cpp:8
base class of all VSTGUI controls
Definition: ccontrol.h:76
Button and Modifier state.
Definition: cbuttonstate.h:34
extension to IControlListener used by UIDescription
Definition: icontroller.h:20