Audacity 3.2.0
Public Member Functions | Private Attributes | List of all members
internal::x11::PlugFrame Class Referencefinal

#include <PlugFrame.h>

Inheritance diagram for internal::x11::PlugFrame:
[legend]
Collaboration diagram for internal::x11::PlugFrame:
[legend]

Public Member Functions

 PlugFrame (Steinberg::Linux::IRunLoop *runLoop, wxWindow *window)
 
virtual ~PlugFrame ()
 
void init (Steinberg::IPlugView *view, Steinberg::ViewRect *size)
 
Steinberg::tresult PLUGIN_API resizeView (Steinberg::IPlugView *view, Steinberg::ViewRect *newSize) override
 

Private Attributes

wxWeakRef< wxWindow > mWindow
 
bool mInitialized {false}
 
Steinberg::IPtr< Steinberg::Linux::IRunLoop > mRunLoop
 

Detailed Description

Definition at line 24 of file x11/PlugFrame.h.

Constructor & Destructor Documentation

◆ PlugFrame()

PlugFrame::PlugFrame ( Steinberg::Linux::IRunLoop *  runLoop,
wxWindow *  window 
)

Definition at line 36 of file x11/PlugFrame.cpp.

37 : mWindow(window), mRunLoop(runLoop)
38{
39 FUNKNOWN_CTOR;
40}
Steinberg::IPtr< Steinberg::Linux::IRunLoop > mRunLoop
Definition: x11/PlugFrame.h:29
wxWeakRef< wxWindow > mWindow
Definition: x11/PlugFrame.h:26

◆ ~PlugFrame()

PlugFrame::~PlugFrame ( )
virtual

Definition at line 41 of file x11/PlugFrame.cpp.

42{
43 FUNKNOWN_DTOR;
44}

Member Function Documentation

◆ init()

void PlugFrame::init ( Steinberg::IPlugView *  view,
Steinberg::ViewRect *  size 
)

Definition at line 46 of file x11/PlugFrame.cpp.

47{
48 if(!mInitialized)
49 resizeView(view, size);
50}
Steinberg::tresult PLUGIN_API resizeView(Steinberg::IPlugView *view, Steinberg::ViewRect *newSize) override

References mInitialized, resizeView(), and size.

Here is the call graph for this function:

◆ resizeView()

Steinberg::tresult PlugFrame::resizeView ( Steinberg::IPlugView *  view,
Steinberg::ViewRect *  newSize 
)
override

Definition at line 52 of file x11/PlugFrame.cpp.

53{
54 if(auto window = mWindow.get())
55 {
56 auto size = wxSize(viewRect->getWidth(), viewRect->getHeight());
57
58 auto topWindow = wxGetTopLevelParent(window);
59 wxWindowUpdateLocker windowUpdateLocker(topWindow);
60
61 window->SetInitialSize(size);
62 //Wrapper (x11::SocketWindow) geometry needs to be updated too
63 window->GetChildren()[0]->SetInitialSize(size);
64
65 topWindow->SetMinSize(wxDefaultSize);
66 topWindow->Fit();
67 topWindow->SetMinSize(topWindow->GetSize());
68
69 if(!mInitialized)
70 {
71 topWindow->Center();
72 mInitialized = true;
73 }
74
75 return view->onSize(viewRect);
76 }
77 return Steinberg::kResultFalse;
78}

References mInitialized, mWindow, and size.

Referenced by init().

Here is the caller graph for this function:

Member Data Documentation

◆ mInitialized

bool internal::x11::PlugFrame::mInitialized {false}
private

Definition at line 27 of file x11/PlugFrame.h.

Referenced by init(), and resizeView().

◆ mRunLoop

Steinberg::IPtr<Steinberg::Linux::IRunLoop> internal::x11::PlugFrame::mRunLoop
private

Definition at line 29 of file x11/PlugFrame.h.

◆ mWindow

wxWeakRef<wxWindow> internal::x11::PlugFrame::mWindow
private

Definition at line 26 of file x11/PlugFrame.h.

Referenced by resizeView().


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