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

Class AsyncOkButton

src/AsyncDialog.cpp:249–257  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

247 buttonLayout->addChild(cancelButton);
248
249 struct AsyncOkButton : Button {
250 AsyncTextInput* dialog;
251 TextField* textField;
252 std::function<void(char*)> action;
253 void onAction(const ActionEvent& e) override {
254 action(strdup(textField->text.c_str()));
255 dialog->getParent()->requestDelete();
256 }
257 };
258 AsyncOkButton* const okButton = new AsyncOkButton;
259 okButton->box.size.x = buttonWidth;
260 okButton->text = "Ok";

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected