Jamba  3.0.2
CustomViewFactory.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2018 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 
23 namespace pongasoft {
24 namespace VST {
25 namespace GUI {
26 namespace Views {
27 
28 using namespace Params;
29 
33 class CustomUIViewFactory : public VSTGUI::UIViewFactory
34 {
35 public:
36  explicit CustomUIViewFactory(GUIState *iGUIState) : fGUIState{iGUIState}
37  {
38  }
39 
40 protected:
41  // overridden to detect GUIParamCxAware instances
42  bool applyAttributeValues(CView *view, const UIAttributes &attributes, const IUIDescription *desc) const override;
43 
44  // overridden to detect GUIParamCxAware instances
45  bool applyCustomViewAttributeValues(CView *customView,
46  IdStringPtr baseViewName,
47  const UIAttributes &attributes,
48  const IUIDescription *desc) const override;
49 
50  // overridden to detect GUIParamCxAware instances
51  CView *createView(const UIAttributes &attributes, const IUIDescription *description) const override;
52 
53 private:
54  GUIState *fGUIState{};
55 };
56 
57 
58 }
59 }
60 }
61 }
Definition: GUIState.h:39
Definition: Clock.h:22
CustomUIViewFactory(GUIState *iGUIState)
Definition: CustomViewFactory.h:36
Definition: CustomViewFactory.h:33