summaryrefslogtreecommitdiff
path: root/LibGUI/GInputBox.h
blob: 76672b9a80642c3ed91957227f6423d1f27edf50 (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
25
#pragma once

#include <LibGUI/GDialog.h>

class GButton;
class GTextEditor;

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

    String text_value() const { return m_text_value; }

    virtual const char* class_name() const override { return "GInputBox"; }

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

    GButton* m_ok_button { nullptr };
    GButton* m_cancel_button { nullptr };
    GTextEditor* m_text_editor { nullptr };
};