Zrythm v2.0.0-DEV
a highly automated and intuitive digital audio workstation
Loading...
Searching...
No Matches
zrythm::plugins::JuceDocumentPluginHostWindow Class Referencefinal

Implementation of IPluginHostWindow based on juce::DocumentWindow. More...

#include <src/gui/backend/plugin_host_window.h>

Inheritance diagram for zrythm::plugins::JuceDocumentPluginHostWindow:
Collaboration diagram for zrythm::plugins::JuceDocumentPluginHostWindow:

Public Types

using CloseHandler = std::function<void ()>

Public Member Functions

 JuceDocumentPluginHostWindow (const utils::Utf8String &title, CloseHandler close_handler)
void setJuceComponentContentNonOwned (juce::Component *content_non_owned) override
 Sets the JUCE component (normally a juce editor component) as the child of this window.
void setSizeAndCenter (int width, int height) override
 Sets the window size and centers it on the screen.
void setSize (int width, int height) override
 Set the window size without centering.
void setVisible (bool shouldBeVisible) override
WId getEmbedWindowId () const override
 Gets a native window handle to embed in.

Detailed Description

Implementation of IPluginHostWindow based on juce::DocumentWindow.

Note
This is more reliable than using Qt since JUCE always uses X11 windows on GNU/Linux, whereas Qt will use Wayland windows if we are on Wayland, and forcing QT_QPA_PLATFORM=xcb for the whole application just for plugin UIs is excessive.

Definition at line 19 of file plugin_host_window.h.

Member Typedef Documentation

◆ CloseHandler

using zrythm::plugins::JuceDocumentPluginHostWindow::CloseHandler = std::function<void ()>

Definition at line 24 of file plugin_host_window.h.

Member Function Documentation

◆ getEmbedWindowId()

WId zrythm::plugins::JuceDocumentPluginHostWindow::getEmbedWindowId ( ) const
overridevirtual

Gets a native window handle to embed in.

To be used in natively hosted plugins.

Implements zrythm::plugins::IPluginHostWindow.

◆ setJuceComponentContentNonOwned()

void zrythm::plugins::JuceDocumentPluginHostWindow::setJuceComponentContentNonOwned ( juce::Component * content_non_owned)
overridevirtual

Sets the JUCE component (normally a juce editor component) as the child of this window.

To be used by JUCE-hosted plugins.

Implements zrythm::plugins::IPluginHostWindow.

◆ setSize()

void zrythm::plugins::JuceDocumentPluginHostWindow::setSize ( int width,
int height )
inlineoverridevirtual

Set the window size without centering.

Used for resizes.

Implements zrythm::plugins::IPluginHostWindow.

Definition at line 51 of file plugin_host_window.h.

◆ setSizeAndCenter()

void zrythm::plugins::JuceDocumentPluginHostWindow::setSizeAndCenter ( int width,
int height )
overridevirtual

Sets the window size and centers it on the screen.

Note
This is not needed when using setJuceComponentContentNonOwned.

Implements zrythm::plugins::IPluginHostWindow.

◆ setVisible()

void zrythm::plugins::JuceDocumentPluginHostWindow::setVisible ( bool shouldBeVisible)
inlineoverridevirtual

Implements zrythm::plugins::IPluginHostWindow.

Definition at line 56 of file plugin_host_window.h.


The documentation for this class was generated from the following file: