diff options
Diffstat (limited to 'ingen/client/PluginUI.hpp')
-rw-r--r-- | ingen/client/PluginUI.hpp | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/ingen/client/PluginUI.hpp b/ingen/client/PluginUI.hpp index f29f2994..1ccadc58 100644 --- a/ingen/client/PluginUI.hpp +++ b/ingen/client/PluginUI.hpp @@ -42,10 +42,24 @@ class INGEN_API PluginUI { public: ~PluginUI(); + /** Create a UI for the given block and plugin. + * + * This does not actually instantiate the UI itself, so signals can be + * connected first. The caller should connect to signal_property_changed, + * then call instantiate(). + */ static SPtr<PluginUI> create(Ingen::World* world, SPtr<const BlockModel> block, const LilvPlugin* plugin); + /** Instantiate the UI. + * + * If true is returned, instantiation was successfull and the widget can be + * obtained with get_widget(). Otherwise, instantiation failed, so there is + * no widget and the UI can not be used. + */ + bool instantiate(); + SuilWidget get_widget(); void port_event(uint32_t port_index, @@ -71,12 +85,17 @@ public: private: PluginUI(Ingen::World* world, SPtr<const BlockModel> block, - const LilvNode* ui_node); + LilvUIs* uis, + const LilvUI* ui, + const LilvNode* ui_type); Ingen::World* _world; SPtr<const BlockModel> _block; SuilInstance* _instance; + LilvUIs* _uis; + const LilvUI* _ui; LilvNode* _ui_node; + LilvNode* _ui_type; std::set<uint32_t> _subscribed_ports; static SuilHost* ui_host; |