The Battle for Wesnoth  1.15.12+dev
formula_debugger.hpp
Go to the documentation of this file.
1 /*
2  Copyright (C) 2009 - 2018 by Yurii Chernyi <terraninfo@terraninfo.net>
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 
18 
19 namespace wfl
20 {
21 class formula_debugger;
22 }
23 
24 namespace gui2::dialogs
25 {
26 
27 /**
28  * @ingroup GUIWindowDefinitionWML
29  *
30  * This shows the debugger for the formulas.
31  * Key |Type |Mandatory|Description
32  * ------------------|--------------|---------|-----------
33  * stack | control |yes |A stack.
34  * execution | control |yes |Execution trace label.
35  * state | control |yes |The state.
36  * step | @ref button |yes |Button to step into the execution.
37  * stepout | @ref button |yes |Button to step out of the execution.
38  * next | @ref button |yes |Button to execute the next statement.
39  * continue | @ref button |yes |Button to continue the execution.
40  */
42 {
43 public:
44  explicit formula_debugger(wfl::formula_debugger& fdb) : fdb_(fdb)
45  {
46  }
47 
49 
50 private:
51  virtual void pre_show(window& window) override;
52 
53  virtual const std::string& window_id() const override;
54 
55  /***** ***** button callbacks ***** *****/
56  void callback_continue_button();
57 
58  void callback_next_button();
59 
60  void callback_step_button();
61 
62  void callback_stepout_button();
63 
65 };
66 
67 } // namespace dialogs
This shows the debugger for the formulas.
formula_debugger(wfl::formula_debugger &fdb)
Definition: contexts.hpp:43
wfl::formula_debugger & fdb_
Abstract base class for all modal dialogs.
base class of top level items, the only item which needs to store the final canvases to draw on...
Definition: window.hpp:64