The Battle for Wesnoth  1.13.4+dev
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
hotkey_handler_sp.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 /**
16  * @file
17  * An extension of play_controller::hotkey_handler, which has support for
18  * SP wesnoth features like whiteboard, end turn, etc.
19  */
20 
21 #ifndef HOTKEY_HANDLER_SP_HPP_INCL_
22 #define HOTKEY_HANDLER_SP_HPP_INCL_
23 
25 
27 
28 #include <boost/scoped_ptr.hpp>
29 #include <boost/shared_ptr.hpp>
30 
32 
33 protected:
35 
37 
38  bool is_observer() const;
39 
40 public:
43 
44  virtual void recruit();
45  virtual void repeat_recruit();
46  virtual void recall();
47  virtual bool can_execute_command(const hotkey::hotkey_command& command, int index=-1) const;
48  virtual void toggle_shroud_updates();
49  virtual void update_shroud_now();
50  virtual void end_turn();
51  virtual void rename_unit();
52  virtual void create_unit();
53  virtual void change_side();
54  virtual void kill_unit();
55  virtual void label_terrain(bool);
56  virtual void clear_labels();
57  virtual void label_settings();
58  virtual void continue_move();
59  virtual void unit_hold_position();
60  virtual void end_unit_turn();
61  virtual void user_command();
62  virtual void custom_command();
63  virtual void ai_formula();
64  virtual void clear_messages();
65  // Whiteboard hotkeys
66  virtual void whiteboard_toggle();
67  virtual void whiteboard_execute_action();
68  virtual void whiteboard_execute_all_actions();
69  virtual void whiteboard_delete_action();
70  virtual void whiteboard_bump_up_action();
71  virtual void whiteboard_bump_down_action();
72  virtual void whiteboard_suppose_dead();
73 
74  //replay
76  {
77  assert(playsingle_controller_.get_replay_controller());
78  return *playsingle_controller_.get_replay_controller();
79  }
80  virtual void stop_replay() override
81  { return get_replay_controller().stop_replay(); }
82  virtual void play_replay() override
83  { return get_replay_controller().play_replay(); }
84  virtual void replay_next_turn() override
86  virtual void replay_next_side() override
88  virtual void replay_next_move() override
90  virtual void replay_show_everything() override
92  virtual void replay_show_each() override
94  virtual void replay_show_team1() override
96  virtual void reset_replay() override
97  { return playsingle_controller_.reset_replay(); }
98  virtual void replay_exit() override;
99  virtual void load_autosave(const std::string& filename);
101 };
102 
103 #endif
virtual void replay_show_everything() override
virtual void load_autosave(const std::string &filename)
boost::shared_ptr< wb::manager > whiteboard_manager_
Stores all information related to functions that can be bound to hotkeys.
This file implements all the hotkey handling and menu details for play controller.
replay_controller * get_replay_controller()
virtual hotkey::ACTION_STATE get_action_state(hotkey::HOTKEY_COMMAND command, int index) const
virtual bool can_execute_command(const hotkey::hotkey_command &command, int index=-1) const
Check if a command can be executed.
GLuint index
Definition: glew.h:1782
hotkey_handler(playsingle_controller &, saved_game &)
playsingle_controller & playsingle_controller_
GLsizei const GLcharARB ** string
Definition: glew.h:4503