protected override IVstPluginEditor CreateEditor(IVstPluginEditor instance) { if (instance == null) { return(new SuperEditor(this)); } return(base.CreateEditor(instance)); }
/// <summary> /// Implement this when you need a custom editor (UI). /// </summary> /// <param name="instance">A previous instance returned by this method. /// When non-null, return a thread-safe version (or wrapper) for the object.</param> /// <returns>Returns null when not supported by the plugin.</returns> protected override IVstPluginEditor CreateEditor(IVstPluginEditor instance) { if (instance == null) { return(new PluginEditor(this)); } // TODO: implement a thread-safe wrapper. return(base.CreateEditor(instance)); }
/// <summary> /// Implement this when you need a custom editor (UI). /// </summary> /// <param name="instance">A previous instance returned by this method. /// When non-null, return a thread-safe version (or wrapper) for the object.</param> /// <returns>Returns null when not supported by the plugin.</returns> protected override IVstPluginEditor CreateEditor(IVstPluginEditor instance) { if (instance == null) { PluginEditor pluginEditor = new PluginEditor(); pluginEditor.Init(() => this.MssHub); return(pluginEditor); } return(base.CreateEditor(instance)); }
/// <summary> /// Creates a default instance and reuses that for all threads. /// </summary> /// <param name="instance">A reference to the default instance or null.</param> /// <returns>Returns the default instance.</returns> protected override IVstPluginEditor CreateEditor(IVstPluginEditor instance) { if (instance == null) return new PluginEditor(this); return instance; }
/// <summary> /// Called when an instance of the <see cref="IVstPluginEditor"/> interface is requested. /// </summary> /// <param name="instance">The default instance or null.</param> /// <returns>Returns <paramref name="instance"/>.</returns> /// <remarks>Override to create an instance of the <see cref="IVstPluginEditor"/> interface. /// When <paramref name="instance"/> is null, create the default instance. When the <paramref name="instance"/> /// is not null, create a Thread Safe instance, possibly wrapping the default <paramref name="instance"/>.</remarks> protected virtual IVstPluginEditor CreateEditor(IVstPluginEditor instance) { return(instance); }
/// <summary> /// Implement this when you need a custom editor (UI). /// </summary> /// <param name="instance">A previous instance returned by this method. /// When non-null, return a thread-safe version (or wrapper) for the object.</param> /// <returns>Returns null when not supported by the plugin.</returns> protected override IVstPluginEditor CreateEditor(IVstPluginEditor instance) { if (instance == null) { return new PluginEditor(this); } // TODO: implement a thread-safe wrapper. return base.CreateEditor(instance); }
protected override IVstPluginEditor CreateEditor(IVstPluginEditor instance) { return(PluginUI.Instance); }
/// <summary> /// Implement this when you need a custom editor (UI). /// </summary> /// <param name="instance">A previous instance returned by this method. /// When non-null, return a thread-safe version (or wrapper) for the object.</param> /// <returns>Returns null when not supported by the plugin.</returns> protected override IVstPluginEditor CreateEditor(IVstPluginEditor instance) { if (instance == null) { PluginEditor pluginEditor = new PluginEditor(); pluginEditor.Init(() => this.MssHub); return pluginEditor; } return base.CreateEditor(instance); }