ladybird/LibGUI/GInputBox.h
Andreas Kling f88e550998 LibGUI: More work on GInputBox.
- If the GInputBox has a parent and the parent is a GWindow, center the
  input box window within the parent window. This looks quite nice.

- Stop processing events in a nested event loop immediately after it's
  been asked to quit.

- Fix GWidget::parent_widget() behavior for non-widget parents.
2019-03-19 02:22:49 +01:00

24 lines
508 B
C++

#pragma once
#include <LibGUI/GDialog.h>
class GButton;
class GTextEditor;
class GInputBox : public GDialog {
public:
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;
GButton* m_ok_button { nullptr };
GButton* m_cancel_button { nullptr };
GTextEditor* m_text_editor { nullptr };
};