Audacity 3.2.0
Classes | Public Member Functions | Private Member Functions | Private Attributes | List of all members
VSTControl Class Referencefinal

#include <VSTControlGTK.h>

Inheritance diagram for VSTControl:
[legend]
Collaboration diagram for VSTControl:
[legend]

Classes

struct  Impl
 

Public Member Functions

 VSTControl ()
 
virtual ~VSTControl ()
 
bool Create (wxWindow *parent, VSTLink *link) override
 
 VSTControl ()
 
 ~VSTControl ()
 
bool Create (wxWindow *parent, VSTLink *link)
 
 VSTControl ()
 
 ~VSTControl ()
 
bool Create (wxWindow *parent, VSTLink *link)
 
void Close ()
 
- Public Member Functions inherited from VSTControlBase
 VSTControlBase ()
 
virtual ~VSTControlBase ()
 
virtual bool Create (wxWindow *parent, VSTLink *link)
 

Private Member Functions

void CreateCocoa ()
 
void CreateCarbon ()
 
void OnSize (wxSizeEvent &evt)
 

Private Attributes

std::unique_ptr< ImplmImpl
 
HANDLE mHwnd
 
NSView * mVSTView
 
NSView * mView
 
WindowRef mWindowRef
 
HIViewRef mHIView
 

Additional Inherited Members

- Protected Attributes inherited from VSTControlBase
wxWindow * mParent
 
VSTLinkmLink
 

Detailed Description

Definition at line 17 of file VSTControlGTK.h.

Constructor & Destructor Documentation

◆ VSTControl() [1/3]

VSTControl::VSTControl ( )

Definition at line 31 of file VSTControlGTK.cpp.

32{
33
34}

◆ ~VSTControl() [1/3]

VSTControl::~VSTControl ( )
virtual

Definition at line 36 of file VSTControlGTK.cpp.

37{
38 if (mImpl)
39 mLink->callDispatcher(effEditClose, 0, (intptr_t)mImpl->display, (void *)mImpl->window, 0.0);
40}
const int effEditClose
Definition: aeffectx.h:107
VSTLink * mLink
Definition: VSTControl.h:46
std::unique_ptr< Impl > mImpl
Definition: VSTControlGTK.h:26

References VSTLink::callDispatcher(), effEditClose, mImpl, and VSTControlBase::mLink.

Here is the call graph for this function:

◆ VSTControl() [2/3]

VSTControl::VSTControl ( )

◆ ~VSTControl() [2/3]

VSTControl::~VSTControl ( )

◆ VSTControl() [3/3]

VSTControl::VSTControl ( )

◆ ~VSTControl() [3/3]

VSTControl::~VSTControl ( )

Member Function Documentation

◆ Close()

void VSTControl::Close ( )

Referenced by VSTEditor::OnClose().

Here is the caller graph for this function:

◆ Create() [1/3]

bool VSTControl::Create ( wxWindow *  parent,
VSTLink link 
)
virtual

Reimplemented from VSTControlBase.

◆ Create() [2/3]

bool VSTControl::Create ( wxWindow *  parent,
VSTLink link 
)
virtual

Reimplemented from VSTControlBase.

◆ Create() [3/3]

bool VSTControl::Create ( wxWindow *  parent,
VSTLink link 
)
overridevirtual

Reimplemented from VSTControlBase.

Definition at line 42 of file VSTControlGTK.cpp.

43{
44 if (!VSTControlBase::Create(parent, link))
45 {
46 return false;
47 }
48
49 mImpl = std::make_unique<VSTControl::Impl>();
50
51 VstRect *rect;
52
53 // Some effects like to have us get their rect before opening them.
54 mLink->callDispatcher(effEditGetRect, 0, 0, &rect, 0.0);
55
56 // Make sure the parent has a window
57 if (!gtk_widget_get_realized(GTK_WIDGET(m_wxwindow)))
58 {
59 gtk_widget_realize(GTK_WIDGET(m_wxwindow));
60 }
61
62 GdkWindow *gwin = gtk_widget_get_window(GTK_WIDGET(m_wxwindow));
63 mImpl->display = GDK_WINDOW_XDISPLAY(gwin);
64 mImpl->window = GDK_WINDOW_XID(gwin);
65
66 mLink->callDispatcher(effEditOpen, 0, (intptr_t)mImpl->display, (void *)mImpl->window, 0.0);
67
68 // Get the final bounds of the effect GUI
69 mLink->callDispatcher(effEditGetRect, 0, 0, &rect, 0.0);
70
71 // Add the effect host window to the layout
72 SetMinSize(wxSize(rect->right - rect->left, rect->bottom - rect->top));
73
74 // Must get the size again since SetPeer() could cause it to change
75 SetInitialSize(GetMinSize());
76
77 return true;
78}
const int effEditGetRect
Definition: aeffectx.h:105
const int effEditOpen
Definition: aeffectx.h:106
virtual bool Create(wxWindow *parent, VSTLink *link)
Definition: VSTControl.h:31
short right
Definition: aeffectx.h:388
short left
Definition: aeffectx.h:386
short top
Definition: aeffectx.h:385
short bottom
Definition: aeffectx.h:387

References VstRect::bottom, VSTLink::callDispatcher(), VSTControlBase::Create(), effEditGetRect, effEditOpen, VstRect::left, mImpl, VSTControlBase::mLink, VstRect::right, and VstRect::top.

Here is the call graph for this function:

◆ CreateCarbon()

void VSTControl::CreateCarbon ( )
private

◆ CreateCocoa()

void VSTControl::CreateCocoa ( )
private

◆ OnSize()

void VSTControl::OnSize ( wxSizeEvent &  evt)
private

Member Data Documentation

◆ mHIView

HIViewRef VSTControl::mHIView
private

Definition at line 53 of file VSTControlOSX.h.

◆ mHwnd

HANDLE VSTControl::mHwnd
private

Definition at line 27 of file VSTControlMSW.h.

◆ mImpl

std::unique_ptr<Impl> VSTControl::mImpl
private

Definition at line 27 of file VSTControlGTK.h.

Referenced by Create(), and ~VSTControl().

◆ mView

NSView* VSTControl::mView
private

Definition at line 49 of file VSTControlOSX.h.

◆ mVSTView

NSView* VSTControl::mVSTView
private

Definition at line 48 of file VSTControlOSX.h.

◆ mWindowRef

WindowRef VSTControl::mWindowRef
private

Definition at line 52 of file VSTControlOSX.h.


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