The Battle for Wesnoth  1.13.4+dev
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
controller.hpp
Go to the documentation of this file.
1 /*
2  Copyright (C) 2009 - 2016 by Ignacio R. Morelle <[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 /**
16  * @file
17  * Storyscreen controller (interface).
18  */
19 
20 #ifndef STORYSCREEN_CONTROLLER_HPP_INCLUDED
21 #define STORYSCREEN_CONTROLLER_HPP_INCLUDED
22 
23 #include "events.hpp"
24 #include "interface.hpp"
25 
26 #include <boost/shared_ptr.hpp>
27 
28 class CVideo;
29 class vconfig;
30 
31 namespace storyscreen {
32 
37 };
38 
39 class part;
40 class part_ui;
41 class floating_image;
42 
44 {
45 public:
46  controller(CVideo& video, const vconfig& data, const std::string& scenario_name,
47  int segment_index);
48 
49  /**
50  * Display all story screen parts in a first..last sequence.
51  */
53 
54 private:
57 
58  // Executes WML flow instructions and inserts parts.
59  void resolve_wml(const vconfig& cfg);
60 
63 
66 
67  // The part cache.
68  std::vector< part_pointer_type > parts_;
69 };
70 
71 } // end namespace storyscreen
72 
73 #endif /* ! STORYSCREEN_CONTROLLER_HPP_INCLUDED */
std::vector< part_pointer_type > parts_
Definition: controller.hpp:68
Definition: video.hpp:58
void resolve_wml(const vconfig &cfg)
Definition: controller.cpp:57
GLint GLenum GLsizei GLint GLsizei const GLvoid * data
Definition: glew.h:1347
const events::event_context evt_context_
Definition: controller.hpp:62
controller(CVideo &video, const vconfig &data, const std::string &scenario_name, int segment_index)
Definition: controller.cpp:45
boost::shared_ptr< part_ui > render_pointer_type
Definition: controller.hpp:56
Storyscreen controller (wrapper interface).
boost::shared_ptr< part > part_pointer_type
Definition: controller.hpp:55
A variable-expanding proxy for the config class.
Definition: variable.hpp:36
GLsizei const GLcharARB ** string
Definition: glew.h:4503
std::string scenario_name_
Definition: controller.hpp:64
STORY_RESULT show(START_POSITION startpos=START_BEGINNING)
Display all story screen parts in a first..last sequence.
Definition: controller.cpp:144