plugins/score-plugin-vst/Vst/Window.hpp
1 #pragma once
2 #include <Vst/EffectModel.hpp>
3 
4 #include <score/widgets/PluginWindow.hpp>
5 
6 #include <memory>
7 #include <verdigris>
8 
9 namespace vst
10 {
11 
12 class Window final : public score::PluginWindow
13 {
14 public:
15  static ERect getRect(AEffect& e);
16 
17  Window(const Model& e, const score::DocumentContext& ctx, QWidget* parent);
18  ~Window() override;
19  void resize(int w, int h);
20 
21  void initNativeWindow(const Model& e, const score::DocumentContext& ctx);
22 
23 private:
24  static void setup_rect(QWidget* container, int width, int height);
25  void refreshTimer();
26 
27  void resizeEvent(QResizeEvent* event) override;
28  void closeEvent(QCloseEvent* event) override;
29 
30  std::weak_ptr<AEffectWrapper> effect;
31  const Model& m_model;
32 };
33 
34 }
Definition: PluginWindow.hpp:9
Definition: plugins/score-plugin-vst/Vst/Window.hpp:13
Definition: DocumentContext.hpp:18