mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 06:48:12 +00:00
LibGUI: Add GInputBox for getting a string from a modal dialog.
Use this to implement some of the toolbar actions in IRCClient. :^)
This commit is contained in:
parent
b87c099535
commit
a6538feed1
11 changed files with 158 additions and 17 deletions
18
LibGUI/GInputBox.h
Normal file
18
LibGUI/GInputBox.h
Normal file
|
@ -0,0 +1,18 @@
|
|||
#pragma once
|
||||
|
||||
#include <LibGUI/GDialog.h>
|
||||
|
||||
class GInputBox : public GDialog {
|
||||
public:
|
||||
enum ExecResult { ExecOK = 0, ExecCancel = 1 };
|
||||
|
||||
explicit GInputBox(const String& prompt, const String& title, GObject* parent = nullptr);
|
||||
virtual ~GInputBox() override;
|
||||
|
||||
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