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