ladybird/Libraries/LibGUI/GInputBox.h
Andreas Kling d6abfbdc5a LibCore: Remove ObjectPtr in favor of RefPtr
Now that CObject is fully ref-counted, just use RefPtr everywhere! :^)
2019-09-22 00:31:54 +02:00

25 lines
525 B
C++

#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;
};