Exemplo n.º 1
0
        protected override IVstPluginEditor CreateEditor(IVstPluginEditor instance)
        {
            if (instance == null)
            {
                return(new SuperEditor(this));
            }

            return(base.CreateEditor(instance));
        }
Exemplo n.º 2
0
        /// <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));
        }
Exemplo n.º 3
0
        /// <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));
        }
Exemplo n.º 4
0
 /// <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);
 }
Exemplo n.º 6
0
        /// <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);
        }
Exemplo n.º 7
0
 protected override IVstPluginEditor CreateEditor(IVstPluginEditor instance)
 {
     return(PluginUI.Instance);
 }
Exemplo n.º 8
0
        /// <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);
        }