Robot Devastation
MockScreen.hpp
1 // Authors: see AUTHORS.md at project root.
2 // CopyPolicy: released under the terms of the LGPLv2.1, see LICENSE at project root.
3 // URL: https://github.com/asrob-uc3m/robotDevastation
4 
5 #ifndef __RD_MOCK_SCREEN_HPP__
6 #define __RD_MOCK_SCREEN_HPP__
7 
8 #include <string>
9 
10 #include <SDL.h>
11 #include <SDL_ttf.h>
12 
13 #include "Screen.hpp"
14 
15 namespace rd {
16 
22 class MockScreen : public Screen
23 {
24  public:
25  MockScreen();
26  virtual bool init();
27  virtual bool cleanup();
28  virtual bool show();
29  virtual bool drawScreen(void *screen);
30  virtual ~MockScreen();
31  virtual bool update(const std::string & parameter, const std::string & value);
32 
33  //-- Available parameters:
34  static const std::string PARAM_MESSAGE;
35 
36  protected:
37  static const std::string IMAGE_PATH;
38  static const std::string FONT_PATH;
39 
40  private:
41  SDL_Window * window;
42  SDL_Surface * screen;
43  TTF_Font * font;
44  SDL_Surface * text_surface;
45  SDL_Surface * background;
46  static const SDL_Color TEXT_COLOR;
47 
48  std::string remaining_time;
49 };
50 
51 }
52 
53 #endif // __RD_MOCK_SCREEN_HPP__
rd::MockScreen
A User Interface for testing purposes.
Definition: MockScreen.hpp:22
rd
The main, catch-all namespace for Robot Devastation.
Definition: groups.dox:4
rd::Screen
A User Interface.
Definition: Screen.hpp:24