mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-11 18:20:43 +09:00
LibGUI: Add InputBox::show with required parent window argument
Similar to MessageBox::show, this encourages passing in a window.
This commit is contained in:
parent
27bd2eab22
commit
65a11fb5f9
Notes:
sideshowbarker
2024-07-19 04:46:07 +09:00
Author: https://github.com/tomuta
Commit: 65a11fb5f9
Pull-request: https://github.com/SerenityOS/serenity/pull/2820
11 changed files with 99 additions and 94 deletions
|
@ -33,12 +33,15 @@ namespace GUI {
|
|||
class InputBox : public Dialog {
|
||||
C_OBJECT(InputBox)
|
||||
public:
|
||||
explicit InputBox(const StringView& prompt, const StringView& title, Window* parent_window = nullptr);
|
||||
virtual ~InputBox() override;
|
||||
|
||||
static int show(String& text_value, Window* parent_window, const StringView& prompt, const StringView& title);
|
||||
|
||||
private:
|
||||
explicit InputBox(Window* parent_window, const StringView& prompt, const StringView& title);
|
||||
|
||||
String text_value() const { return m_text_value; }
|
||||
|
||||
private:
|
||||
void build();
|
||||
String m_prompt;
|
||||
String m_text_value;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue