mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 21:07:35 +00:00
LibGUI: Allow more programmatic control over GUI::InputBox
This will be needed for WebDriver, which will require constructing and controlling dialogs manually. Currently, InputBox will only set its text value when the OK button is pressed. This changes InputBox to update its text when done(ExecResult::OK) is invoked in any way. This also makes the text_value() method public, allows for setting the text value, and allows for moving-in the initial text value.
This commit is contained in:
parent
db4fa36b58
commit
5b31a3dbc7
4 changed files with 23 additions and 6 deletions
|
@ -115,6 +115,8 @@ void Dialog::done(ExecResult result)
|
|||
if (!m_event_loop)
|
||||
return;
|
||||
m_result = result;
|
||||
on_done(m_result);
|
||||
|
||||
dbgln("{}: Quit event loop with result {}", *this, to_underlying(result));
|
||||
m_event_loop->quit(to_underlying(result));
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue