mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 04:07:44 +00:00
LibGUI+Userland: Make Dialog::ExecResult an enum class
This commit is contained in:
parent
1f82beded3
commit
cdffe556c8
90 changed files with 232 additions and 232 deletions
|
@ -15,12 +15,12 @@ namespace GUI {
|
|||
class Dialog : public Window {
|
||||
C_OBJECT(Dialog)
|
||||
public:
|
||||
enum ExecResult {
|
||||
ExecOK = 0,
|
||||
ExecCancel = 1,
|
||||
ExecAborted = 2,
|
||||
ExecYes = 3,
|
||||
ExecNo = 4,
|
||||
enum class ExecResult {
|
||||
OK = 0,
|
||||
Cancel = 1,
|
||||
Aborted = 2,
|
||||
Yes = 3,
|
||||
No = 4,
|
||||
};
|
||||
enum ScreenPosition {
|
||||
CenterWithinParent = 0,
|
||||
|
@ -40,10 +40,10 @@ public:
|
|||
|
||||
virtual ~Dialog() override = default;
|
||||
|
||||
int exec();
|
||||
ExecResult exec();
|
||||
|
||||
int result() const { return m_result; }
|
||||
void done(int result);
|
||||
ExecResult result() const { return m_result; }
|
||||
void done(ExecResult);
|
||||
|
||||
virtual void event(Core::Event&) override;
|
||||
|
||||
|
@ -54,7 +54,7 @@ protected:
|
|||
|
||||
private:
|
||||
OwnPtr<Core::EventLoop> m_event_loop;
|
||||
int m_result { ExecAborted };
|
||||
ExecResult m_result { ExecResult::Aborted };
|
||||
int m_screen_position { CenterWithinParent };
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue