summaryrefslogtreecommitdiff
path: root/LibGUI/GDialog.h
diff options
context:
space:
mode:
authorAndreas Kling <awesomekling@gmail.com>2019-03-19 02:20:00 +0100
committerAndreas Kling <awesomekling@gmail.com>2019-03-19 02:22:49 +0100
commitf88e550998440fb2b4b130aade6c7efe2614ca13 (patch)
treee2312ce8d9da72e7d80fb20dabeee1dbf1c6cc0c /LibGUI/GDialog.h
parenta6538feed1c3b26c75f9751522b703fd219ea860 (diff)
downloadserenity-f88e550998440fb2b4b130aade6c7efe2614ca13.zip
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.
Diffstat (limited to 'LibGUI/GDialog.h')
-rw-r--r--LibGUI/GDialog.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/LibGUI/GDialog.h b/LibGUI/GDialog.h
index 9dcf88a772..e6cefbce98 100644
--- a/LibGUI/GDialog.h
+++ b/LibGUI/GDialog.h
@@ -1,9 +1,12 @@
#pragma once
#include <LibGUI/GWindow.h>
+#include <LibGUI/GEventLoop.h>
class GDialog : public GWindow {
public:
+ enum ExecResult { ExecOK = 0, ExecCancel = 1, ExecAborted = 2 };
+
virtual ~GDialog() override;
int exec();
@@ -15,5 +18,6 @@ protected:
explicit GDialog(GObject* parent);
private:
- int m_result { 0 };
+ OwnPtr<GEventLoop> m_event_loop;
+ int m_result { ExecAborted };
};