MCPcopy Create free account
hub / github.com/DISTRHO/Cardinal / onContextCreate

Method onContextCreate

plugins/Cardinal/src/MPV.cpp:109–124  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

107 }
108
109 void onContextCreate(const ContextCreateEvent& e) override
110 {
111 ModuleWidget::onContextCreate(e);
112
113 if (module == nullptr)
114 return;
115
116 DISTRHO_SAFE_ASSERT_RETURN(module != nullptr,);
117 DISTRHO_SAFE_ASSERT_RETURN(pcontext != nullptr,);
118 DISTRHO_SAFE_ASSERT_RETURN(pcontext->nativeWindowId != 0,);
119 DISTRHO_SAFE_ASSERT_RETURN(!isEmbed,);
120
121 isEmbed = true;
122 embedWidget->embedIntoRack(pcontext->nativeWindowId);
123 embedWidget->show();
124 }
125
126 void onContextDestroy(const ContextDestroyEvent& e) override
127 {

Callers

nothing calls this directly

Calls 2

embedIntoRackMethod · 0.45
showMethod · 0.45

Tested by

no test coverage detected