The Battle for Wesnoth  1.13.4+dev
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
lua_interpreter.hpp
Go to the documentation of this file.
1 /*
2  Copyright (C) 2014 - 2016 by Chris Beck <[email protected]>
3  Part of the Battle for Wesnoth Project http://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 #ifndef GUI_DIALOGS_LUA_INT_HPP_INCLUDED
16 #define GUI_DIALOGS_LUA_INT_HPP_INCLUDED
17 
18 #include "gui/dialogs/dialog.hpp"
19 
20 #include <boost/scoped_ptr.hpp>
21 
22 class lua_kernel_base;
23 
24 namespace gui2
25 {
26 
27 class tlua_interpreter : public tdialog
28 {
29 public:
30  class lua_model;
31  class input_model;
32  class view;
33  class controller;
34 
36 
37  /** Inherited from tdialog. */
38  twindow* build_window(CVideo& video);
39 
40  /** Inherited from tdialog. */
41  void pre_show(twindow& window);
42 
43  enum WHICH_KERNEL { APP, GAME };
44  static void display(CVideo& video, lua_kernel_base * lk);
45  static void display(CVideo& video, WHICH_KERNEL which);
46 private:
47  boost::scoped_ptr<controller> controller_;
48 
49  /** Inherited from tdialog, implemented by REGISTER_DIALOG. */
50  virtual const std::string& window_id() const;
51 };
52 
53 }
54 
55 #endif /* ! GUI_DIALOGS_LUA_INT_HPP_INCLUDED */
static void display(CVideo &video, lua_kernel_base *lk)
Display a new console, using given video and lua kernel.
The input_model keeps track of what commands were executed before, and figures out what should be dis...
Definition: video.hpp:58
virtual const std::string & window_id() const
Inherited from tdialog, implemented by REGISTER_DIALOG.
base class of top level items, the only item which needs to store the final canvases to draw on ...
Definition: window.hpp:62
A class inherited from ttext_box that displays its input as stars.
Definition: field-fwd.hpp:23
void pre_show(twindow &window)
Inherited from tdialog.
Abstract base class for all dialogs.
Definition: dialog.hpp:121
tlua_interpreter(lua_kernel_base &lk)
The lua model is responsible to interact with the lua kernel base and keep track of what should be di...
twindow * build_window(CVideo &video)
Inherited from tdialog.
The controller is responsible to hold all the input widgets, and a pointer to the model and view...
GLsizei const GLcharARB ** string
Definition: glew.h:4503
boost::scoped_ptr< controller > controller_