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

Method onAction

plugins/Cardinal/src/TextEditor.cpp:233–250  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

231 }
232
233 void onAction(const event::Action&) override
234 {
235 TextEditorModule* const module = this->module;;
236 WeakPtr<ImGuiTextEditor> widget = this->widget;
237
238 async_dialog_filebrowser(false, nullptr, nullptr, text.c_str(), [module, widget](char* path)
239 {
240 if (path)
241 {
242 if (module->loadFileFromMenuAction(path))
243 {
244 if (widget)
245 widget->setFileWithKnownText(module->file, module->text);
246 }
247 free(path);
248 }
249 });
250 }
251};
252
253// --------------------------------------------------------------------------------------------------------------------

Callers

nothing calls this directly

Calls 4

c_strMethod · 0.80
setFileWithKnownTextMethod · 0.80
async_dialog_filebrowserFunction · 0.50

Tested by

no test coverage detected