MCPcopy Create free account
hub / github.com/TypesettingTools/Aegisub / TransferFromWindow

Method TransferFromWindow

src/validators.cpp:146–154  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

144}
145
146bool DoubleValidator::TransferFromWindow() {
147 auto ctrl = static_cast<wxTextCtrl *>(GetWindow());
148 if (!Validate(ctrl)) return false;
149 auto str = from_wx(ctrl->GetValue());
150 if (decimal_sep != '.')
151 replace(begin(str), end(str), (char)decimal_sep, '.');
152 agi::util::try_parse(str, value);
153 return true;
154}
155
156bool DoubleSpinValidator::TransferToWindow() {
157 static_cast<wxSpinCtrlDouble*>(GetWindow())->SetValue(*value);

Callers 1

DialogStyleEditorMethod · 0.45

Calls 6

from_wxFunction · 0.85
beginFunction · 0.85
try_parseFunction · 0.85
ValidateFunction · 0.50
endFunction · 0.50
GetValueMethod · 0.45

Tested by

no test coverage detected