summaryrefslogtreecommitdiff
path: root/Libraries/LibGUI/GInputBox.h
blob: c25caaff29fcb44ebf50d21e1ff59a1e194a325b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#pragma once

#include <LibGUI/GDialog.h>

class GButton;
class GTextEditor;

class GInputBox : public GDialog {
    C_OBJECT(GInputBox)
public:
    explicit GInputBox(const StringView& prompt, const StringView& title, CObject* parent = nullptr);
    virtual ~GInputBox() override;

    String text_value() const { return m_text_value; }

private:
    void build();
    String m_prompt;
    String m_text_value;

    RefPtr<GButton> m_ok_button;
    RefPtr<GButton> m_cancel_button;
    RefPtr<GTextEditor> m_text_editor;
};