Jamba C++ API  6.3.0
CustomViewFactory.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2018-2019 pongasoft
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License"); you may not
5  * use this file except in compliance with the License. You may obtain a copy of
6  * the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12  * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13  * License for the specific language governing permissions and limitations under
14  * the License.
15  *
16  * @author Yan Pujante
17  */
18 #pragma once
19 
20 #include <vstgui4/vstgui/uidescription/uiviewfactory.h>
22 
24 
25 using namespace Params;
26 
30 class CustomUIViewFactory : public VSTGUI::UIViewFactory
31 {
32 public:
33  explicit CustomUIViewFactory(GUIState *iGUIState) : fGUIState{iGUIState}
34  {
35  }
36 
37 protected:
38  // overridden to detect ParamAware instances
39  bool applyAttributeValues(CView *view, const UIAttributes &attributes, const IUIDescription *desc) const override;
40 
41  // overridden to detect ParamAware instances
42  bool applyCustomViewAttributeValues(CView *customView,
43  IdStringPtr baseViewName,
44  const UIAttributes &attributes,
45  const IUIDescription *desc) const override;
46 
47  // overridden to detect ParamAware instances
48  CView *createView(const UIAttributes &attributes, const IUIDescription *description) const override;
49 
50 private:
51  GUIState *fGUIState{};
52 };
53 
54 
55 }
Definition: GUIState.h:41
CustomUIViewFactory(GUIState *iGUIState)
Definition: CustomViewFactory.h:33
Definition: CustomController.h:24
Custom view factory to give access to vst parameters.
Definition: CustomViewFactory.h:30