The Battle for Wesnoth  1.15.0-dev
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
playsingle_controller::hotkey_handler Class Reference

#include <hotkey_handler_sp.hpp>

Inheritance diagram for playsingle_controller::hotkey_handler:
Inheritance graph

Public Member Functions

 hotkey_handler (playsingle_controller &, saved_game &)
 
 ~hotkey_handler ()
 
virtual void recruit () override
 
virtual void repeat_recruit () override
 
virtual void recall () override
 
virtual bool can_execute_command (const hotkey::hotkey_command &command, int index=-1) const override
 Check if a command can be executed. More...
 
virtual void toggle_shroud_updates () override
 
virtual void update_shroud_now () override
 
virtual void end_turn () override
 
virtual void rename_unit () override
 
virtual void create_unit () override
 
virtual void change_side () override
 
virtual void kill_unit () override
 
virtual void label_terrain (bool) override
 
virtual void clear_labels () override
 
virtual void label_settings () override
 
virtual void continue_move () override
 
virtual void unit_hold_position () override
 
virtual void end_unit_turn () override
 
virtual void user_command () override
 
virtual void custom_command () override
 
virtual void ai_formula () override
 
virtual void clear_messages () override
 
virtual void whiteboard_toggle () override
 
virtual void whiteboard_execute_action () override
 
virtual void whiteboard_execute_all_actions () override
 
virtual void whiteboard_delete_action () override
 
virtual void whiteboard_bump_up_action () override
 
virtual void whiteboard_bump_down_action () override
 
virtual void whiteboard_suppose_dead () override
 
replay_controllerget_replay_controller ()
 
virtual void stop_replay () override
 
virtual void play_replay () override
 
virtual void replay_next_turn () override
 
virtual void replay_next_side () override
 
virtual void replay_next_move () override
 
virtual void replay_show_everything () override
 
virtual void replay_show_each () override
 
virtual void replay_show_team1 () override
 
virtual void reset_replay () override
 
virtual void replay_exit () override
 
virtual void load_autosave (const std::string &filename) override
 
virtual hotkey::ACTION_STATE get_action_state (hotkey::HOTKEY_COMMAND command, int index) const override
 
- Public Member Functions inherited from play_controller::hotkey_handler
 hotkey_handler (play_controller &, saved_game &)
 
 ~hotkey_handler ()
 
virtual void objectives () override
 
virtual void show_statistics () override
 
virtual void unit_list () override
 
virtual void left_mouse_click () override
 
virtual void move_action () override
 
virtual void select_and_action () override
 
virtual void select_hex () override
 
virtual void deselect_hex () override
 
virtual void right_mouse_click () override
 
virtual void status_table () override
 
virtual void save_game () override
 
virtual void save_replay () override
 
virtual void save_map () override
 
virtual void load_game () override
 
virtual void preferences () override
 
virtual void show_chat_log () override
 
virtual void show_help () override
 
virtual void cycle_units () override
 
virtual void cycle_back_units () override
 
virtual void undo () override
 
virtual void redo () override
 
virtual void show_enemy_moves (bool ignore_units) override
 
virtual void goto_leader () override
 
virtual void unit_description () override
 
virtual void terrain_description () override
 
virtual void toggle_ellipses () override
 
virtual void toggle_grid () override
 
virtual void search () override
 
virtual void toggle_accelerated_speed () override
 
virtual void scroll_up (bool on) override
 
virtual void scroll_down (bool on) override
 
virtual void scroll_left (bool on) override
 
virtual void scroll_right (bool on) override
 
virtual void replay_skip_animation () override
 
virtual std::string get_action_image (hotkey::HOTKEY_COMMAND, int index) const override
 
virtual bool do_execute_command (const hotkey::hotkey_command &command, int index=-1, bool press=true, bool release=false) override
 
void show_menu (const std::vector< config > &items_arg, int xloc, int yloc, bool context_menu, display &disp) override
 
bool in_context_menu (hotkey::HOTKEY_COMMAND command) const
 Determines whether the command should be in the context menu or not. More...
 
- Public Member Functions inherited from hotkey::command_executor_default
void recalculate_minimap ()
 
void lua_console ()
 
void zoom_in ()
 
void zoom_out ()
 
void zoom_default ()
 
void map_screenshot ()
 
void quit_to_main_menu ()
 
- Public Member Functions inherited from hotkey::command_executor
virtual void speak ()
 
virtual void whisper ()
 
virtual void shout ()
 
virtual void stop_network ()
 
virtual void start_network ()
 
virtual void change_language ()
 
virtual void surrender_quit_game ()
 
std::string get_menu_image (display &disp, const std::string &command, int index=-1) const
 
void get_menu_images (display &, std::vector< config > &items)
 
void surrender_game ()
 
void execute_action (const std::vector< std::string > &items_arg, int xloc, int yloc, bool context_menu, display &gui)
 
void queue_command (const SDL_Event &event, int index=-1)
 
void run_queued_commands ()
 
void execute_quit_command ()
 
void handle_keyup ()
 

Protected Member Functions

bool is_observer () const
 
- Protected Member Functions inherited from play_controller::hotkey_handler
displayget_display () override
 
game_displaygui () const
 
game_stategamestate ()
 
const game_stategamestate () const
 
bool browse () const
 
bool linger () const
 
const teamviewing_team () const
 
bool viewing_team_is_playing () const
 
- Protected Member Functions inherited from hotkey::command_executor
virtual ~command_executor ()
 

Protected Attributes

playsingle_controllerplaysingle_controller_
 
std::shared_ptr< wb::managerwhiteboard_manager_
 
- Protected Attributes inherited from play_controller::hotkey_handler
play_controllerplay_controller_
 References to parent object / constituents. More...
 
events::menu_handlermenu_handler_
 
events::mouse_handlermouse_handler_
 
saved_gamesaved_game_
 

Additional Inherited Members

- Static Public Attributes inherited from play_controller::hotkey_handler
static const std::string wml_menu_hotkey_prefix = "wml_menu:"
 

Detailed Description

Definition at line 27 of file hotkey_handler_sp.hpp.

Constructor & Destructor Documentation

◆ hotkey_handler()

playsingle_controller::hotkey_handler::hotkey_handler ( playsingle_controller pc,
saved_game sg 
)

Definition at line 35 of file hotkey_handler_sp.cpp.

◆ ~hotkey_handler()

playsingle_controller::hotkey_handler::~hotkey_handler ( )

Definition at line 41 of file hotkey_handler_sp.cpp.

Member Function Documentation

◆ ai_formula()

void playsingle_controller::hotkey_handler::ai_formula ( )
overridevirtual

◆ can_execute_command()

bool playsingle_controller::hotkey_handler::can_execute_command ( const hotkey::hotkey_command command,
int  index = -1 
) const
overridevirtual

Check if a command can be executed.

Reimplemented from play_controller::hotkey_handler.

Reimplemented in playmp_controller::hotkey_handler.

Definition at line 195 of file hotkey_handler_sp.cpp.

References replay::at_end(), team::auto_shroud_updates(), play_controller::hotkey_handler::browse(), replay_controller::can_execute_command(), play_controller::hotkey_handler::can_execute_command(), play_controller::can_use_synced_wml_menu(), hotkey::hotkey_command::command, events::commands_disabled, play_controller::current_team(), events::menu_handler::current_unit(), game_config::debug, unit_map::find(), play_controller::hotkey_handler::gamestate(), game_events::wmi_manager::get_item(), map_labels::get_label(), events::mouse_handler::get_last_hex(), play_controller::get_map_const(), playsingle_controller::get_replay_controller(), events::mouse_handler::get_selected_hex(), play_controller::get_units_const(), game_state::get_wml_menu_items(), play_controller::hotkey_handler::gui(), hotkey::HOTKEY_CHANGE_SIDE, hotkey::HOTKEY_CLEAR_LABELS, hotkey::HOTKEY_CONTINUE_MOVE, hotkey::HOTKEY_CREATE_UNIT, hotkey::HOTKEY_DELAY_SHROUD, hotkey::HOTKEY_END_UNIT_TURN, hotkey::HOTKEY_ENDTURN, hotkey::HOTKEY_KILL_UNIT, hotkey::HOTKEY_LABEL_TEAM_TERRAIN, hotkey::HOTKEY_LABEL_TERRAIN, hotkey::HOTKEY_RECALL, hotkey::HOTKEY_RECRUIT, hotkey::HOTKEY_REPEAT_RECRUIT, hotkey::HOTKEY_REPLAY_EXIT, hotkey::HOTKEY_REPLAY_NEXT_MOVE, hotkey::HOTKEY_REPLAY_NEXT_SIDE, hotkey::HOTKEY_REPLAY_NEXT_TURN, hotkey::HOTKEY_REPLAY_PLAY, hotkey::HOTKEY_REPLAY_RESET, hotkey::HOTKEY_REPLAY_SHOW_EACH, hotkey::HOTKEY_REPLAY_SHOW_EVERYTHING, hotkey::HOTKEY_REPLAY_SHOW_TEAM1, hotkey::HOTKEY_REPLAY_SKIP_ANIMATION, hotkey::HOTKEY_REPLAY_STOP, hotkey::HOTKEY_SAVE_GAME, hotkey::HOTKEY_UNIT_HOLD_POSITION, hotkey::HOTKEY_UPDATE_SHROUD, hotkey::HOTKEY_WB_BUMP_DOWN_ACTION, hotkey::HOTKEY_WB_BUMP_UP_ACTION, hotkey::HOTKEY_WB_DELETE_ACTION, hotkey::HOTKEY_WB_EXECUTE_ACTION, hotkey::HOTKEY_WB_EXECUTE_ALL_ACTIONS, hotkey::HOTKEY_WB_SUPPOSE_DEAD, hotkey::HOTKEY_WB_TOGGLE, hotkey::HOTKEY_WML, i, hotkey::hotkey_command::id, terrain_label::immutable(), team::is_local(), team::is_local_human(), play_controller::is_networked_mp(), is_observer(), playsingle_controller::is_replay(), display::labels(), play_controller::hotkey_handler::linger(), play_controller::hotkey_handler::menu_handler_, play_controller::hotkey_handler::mouse_handler_, gamemap::on_board(), play_controller::hotkey_handler::play_controller_, playsingle_controller_, resources::recorder, display::shrouded(), team::uses_fog(), team::uses_shroud(), unit_map::iterator_base< iter_types >::valid(), play_controller::hotkey_handler::viewing_team(), play_controller::hotkey_handler::viewing_team_is_playing(), whiteboard_manager_, and play_controller::hotkey_handler::wml_menu_hotkey_prefix.

Referenced by playmp_controller::hotkey_handler::can_execute_command().

◆ change_side()

void playsingle_controller::hotkey_handler::change_side ( )
overridevirtual

◆ clear_labels()

void playsingle_controller::hotkey_handler::clear_labels ( )
overridevirtual

◆ clear_messages()

void playsingle_controller::hotkey_handler::clear_messages ( )
overridevirtual

◆ continue_move()

void playsingle_controller::hotkey_handler::continue_move ( )
overridevirtual

◆ create_unit()

void playsingle_controller::hotkey_handler::create_unit ( )
overridevirtual

◆ custom_command()

void playsingle_controller::hotkey_handler::custom_command ( )
overridevirtual

◆ end_turn()

void playsingle_controller::hotkey_handler::end_turn ( )
overridevirtual

Reimplemented from hotkey::command_executor.

Definition at line 74 of file hotkey_handler_sp.cpp.

References playsingle_controller::end_turn(), and playsingle_controller_.

◆ end_unit_turn()

void playsingle_controller::hotkey_handler::end_unit_turn ( )
overridevirtual

◆ get_action_state()

hotkey::ACTION_STATE playsingle_controller::hotkey_handler::get_action_state ( hotkey::HOTKEY_COMMAND  command,
int  index 
) const
overridevirtual

◆ get_replay_controller()

replay_controller& playsingle_controller::hotkey_handler::get_replay_controller ( )
inline

◆ is_observer()

bool playsingle_controller::hotkey_handler::is_observer ( ) const
protected

◆ kill_unit()

void playsingle_controller::hotkey_handler::kill_unit ( )
overridevirtual

◆ label_settings()

void playsingle_controller::hotkey_handler::label_settings ( )
overridevirtual

◆ label_terrain()

void playsingle_controller::hotkey_handler::label_terrain ( bool  team_only)
overridevirtual

◆ load_autosave()

void playsingle_controller::hotkey_handler::load_autosave ( const std::string &  filename)
overridevirtual

◆ play_replay()

virtual void playsingle_controller::hotkey_handler::play_replay ( )
inlineoverridevirtual

Reimplemented from hotkey::command_executor.

Definition at line 78 of file hotkey_handler_sp.hpp.

References get_replay_controller(), and replay_controller::play_replay().

◆ recall()

void playsingle_controller::hotkey_handler::recall ( )
overridevirtual

◆ recruit()

void playsingle_controller::hotkey_handler::recruit ( )
overridevirtual

◆ rename_unit()

void playsingle_controller::hotkey_handler::rename_unit ( )
overridevirtual

◆ repeat_recruit()

void playsingle_controller::hotkey_handler::repeat_recruit ( )
overridevirtual

◆ replay_exit()

void playsingle_controller::hotkey_handler::replay_exit ( )
overridevirtual

◆ replay_next_move()

virtual void playsingle_controller::hotkey_handler::replay_next_move ( )
inlineoverridevirtual

◆ replay_next_side()

virtual void playsingle_controller::hotkey_handler::replay_next_side ( )
inlineoverridevirtual

◆ replay_next_turn()

virtual void playsingle_controller::hotkey_handler::replay_next_turn ( )
inlineoverridevirtual

◆ replay_show_each()

virtual void playsingle_controller::hotkey_handler::replay_show_each ( )
inlineoverridevirtual

◆ replay_show_everything()

virtual void playsingle_controller::hotkey_handler::replay_show_everything ( )
inlineoverridevirtual

◆ replay_show_team1()

virtual void playsingle_controller::hotkey_handler::replay_show_team1 ( )
inlineoverridevirtual

◆ reset_replay()

virtual void playsingle_controller::hotkey_handler::reset_replay ( )
inlineoverridevirtual

◆ stop_replay()

virtual void playsingle_controller::hotkey_handler::stop_replay ( )
inlineoverridevirtual

Reimplemented from hotkey::command_executor.

Definition at line 76 of file hotkey_handler_sp.hpp.

References get_replay_controller(), and replay_controller::stop_replay().

◆ toggle_shroud_updates()

void playsingle_controller::hotkey_handler::toggle_shroud_updates ( )
overridevirtual

◆ unit_hold_position()

void playsingle_controller::hotkey_handler::unit_hold_position ( )
overridevirtual

◆ update_shroud_now()

void playsingle_controller::hotkey_handler::update_shroud_now ( )
overridevirtual

◆ user_command()

void playsingle_controller::hotkey_handler::user_command ( )
overridevirtual

◆ whiteboard_bump_down_action()

void playsingle_controller::hotkey_handler::whiteboard_bump_down_action ( )
overridevirtual

Reimplemented from hotkey::command_executor.

Definition at line 169 of file hotkey_handler_sp.cpp.

References whiteboard_manager_.

◆ whiteboard_bump_up_action()

void playsingle_controller::hotkey_handler::whiteboard_bump_up_action ( )
overridevirtual

Reimplemented from hotkey::command_executor.

Definition at line 164 of file hotkey_handler_sp.cpp.

References whiteboard_manager_.

◆ whiteboard_delete_action()

void playsingle_controller::hotkey_handler::whiteboard_delete_action ( )
overridevirtual

Reimplemented from hotkey::command_executor.

Definition at line 160 of file hotkey_handler_sp.cpp.

References whiteboard_manager_.

◆ whiteboard_execute_action()

void playsingle_controller::hotkey_handler::whiteboard_execute_action ( )
overridevirtual

Reimplemented from hotkey::command_executor.

Definition at line 152 of file hotkey_handler_sp.cpp.

References whiteboard_manager_.

◆ whiteboard_execute_all_actions()

void playsingle_controller::hotkey_handler::whiteboard_execute_all_actions ( )
overridevirtual

Reimplemented from hotkey::command_executor.

Definition at line 156 of file hotkey_handler_sp.cpp.

References whiteboard_manager_.

◆ whiteboard_suppose_dead()

void playsingle_controller::hotkey_handler::whiteboard_suppose_dead ( )
overridevirtual

◆ whiteboard_toggle()

void playsingle_controller::hotkey_handler::whiteboard_toggle ( )
overridevirtual

Member Data Documentation

◆ playsingle_controller_

playsingle_controller& playsingle_controller::hotkey_handler::playsingle_controller_
protected

◆ whiteboard_manager_

std::shared_ptr<wb::manager> playsingle_controller::hotkey_handler::whiteboard_manager_
protected

The documentation for this class was generated from the following files: