The Battle for Wesnoth  1.19.5+dev
retval.hpp
Go to the documentation of this file.
1 /*
2  Copyright (C) 2007 - 2024
3  by Mark de Wever <koraq@xs4all.nl>
4  Part of the Battle for Wesnoth Project https://www.wesnoth.org/
5 
6  This program is free software; you can redistribute it and/or modify
7  it under the terms of the GNU General Public License as published by
8  the Free Software Foundation; either version 2 of the License, or
9  (at your option) any later version.
10  This program is distributed in the hope that it will be useful,
11  but WITHOUT ANY WARRANTY.
12 
13  See the COPYING file for more details.
14 */
15 
16 #pragma once
17 
18 namespace gui2
19 {
20 /**
21  * Default window/dialog return values.
22  *
23  * These values are named return values and most are assigned to a widget
24  * automatically when using a certain id for that widget (ie, a widget with
25  * the id "ok" will be assigned the OK return value.
26  *
27  * The automatic return values are always a negative number.
28  */
29 enum retval : int
30 {
31  /** Default, unset return value. */
32  NONE = 0,
33 
34  /** Dialog was closed with the OK button. */
35  OK = -1,
36 
37  /** Dialog was closed with the CANCEL button. */
38  CANCEL = -2,
39 
40  /** The dialog was closed automatically as its timeout had been reached. */
41  AUTO_CLOSE = -3,
42 };
43 
44 } // namespace gui2
Generic file dialog.
retval
Default window/dialog return values.
Definition: retval.hpp:30
@ OK
Dialog was closed with the OK button.
Definition: retval.hpp:35
@ AUTO_CLOSE
The dialog was closed automatically as its timeout had been reached.
Definition: retval.hpp:41
@ CANCEL
Dialog was closed with the CANCEL button.
Definition: retval.hpp:38
@ NONE
Default, unset return value.
Definition: retval.hpp:32