GInputBox.h 593 B

12345678910111213141516171819202122232425
  1. #pragma once
  2. #include <LibGUI/GDialog.h>
  3. class GButton;
  4. class GTextEditor;
  5. class GInputBox : public GDialog {
  6. public:
  7. explicit GInputBox(const StringView& prompt, const StringView& title, CObject* parent = nullptr);
  8. virtual ~GInputBox() override;
  9. String text_value() const { return m_text_value; }
  10. virtual const char* class_name() const override { return "GInputBox"; }
  11. private:
  12. void build();
  13. String m_prompt;
  14. String m_text_value;
  15. GButton* m_ok_button { nullptr };
  16. GButton* m_cancel_button { nullptr };
  17. GTextEditor* m_text_editor { nullptr };
  18. };