MCPcopy Create free account
hub / github.com/VCVRack/Rack / setText

Method setText

src/ui/TextField.cpp:327–335  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

325}
326
327void TextField::setText(std::string text) {
328 if (this->text != text) {
329 this->text = text;
330 // ChangeEvent
331 ChangeEvent eChange;
332 onChange(eChange);
333 }
334 selection = cursor = text.size();
335}
336
337void TextField::selectAll() {
338 cursor = text.size();

Callers 1

clearMethod · 0.80

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected