The Battle for Wesnoth  1.13.11+dev
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes | Friends | List of all members
events::menu_handler Class Reference

#include <menu_events.hpp>

Inheritance diagram for events::menu_handler:
Inheritance graph

Public Member Functions

 menu_handler (game_display *gui, play_controller &pc, const config &game_config)
virtual ~menu_handler ()
gui::floating_textboxget_textbox ()
void set_gui (game_display *gui)
void objectives ()
void show_statistics (int side_num)
void unit_list ()
void status_table ()
void save_map ()
void preferences ()
void show_chat_log ()
void show_help ()
void speak ()
void whisper ()
void shout ()
void recruit (int side_num, const map_location &last_hex)
void repeat_recruit (int side_num, const map_location &last_hex)
void recall (int side_num, const map_location &last_hex)
void show_enemy_moves (bool ignore_units, int side_num)
void toggle_shroud_updates (int side_num)
void update_shroud_now (int side_num)
bool end_turn (int side_num)
void goto_leader (int side_num)
void unit_description ()
void terrain_description (mouse_handler &mousehandler)
void rename_unit ()
void create_unit (mouse_handler &mousehandler)
 Creates a unit (in debug mode via hotkey or context menu). More...
void change_side (mouse_handler &mousehandler)
void kill_unit (mouse_handler &mousehandler)
void label_terrain (mouse_handler &mousehandler, bool team_only)
void clear_labels ()
void label_settings ()
void continue_move (mouse_handler &mousehandler, int side_num)
void execute_gotos (mouse_handler &mousehandler, int side_num)
void toggle_ellipses ()
void toggle_grid ()
void unit_hold_position (mouse_handler &mousehandler, int side_num)
void end_unit_turn (mouse_handler &mousehandler, int side_num)
void search ()
void request_control_change (int side_num, const std::string &player)
void user_command ()
void custom_command ()
void ai_formula ()
void clear_messages ()
std::vector< std::string > get_commands_list ()
unit_map::iterator current_unit ()
unit_map::const_iterator current_unit () const
void move_unit_to_loc (const unit_map::iterator &ui, const map_location &target, bool continue_move, int side_num, mouse_handler &mousehandler)
bool do_recruit (const std::string &name, int side_num, const map_location &last_hex)
void do_speak ()
void do_search (const std::string &new_search)
void do_command (const std::string &str)
void do_ai_formula (const std::string &str, int side_num, mouse_handler &mousehandler)
void send_to_server (const config &cfg) override
game_stategamestate () const
game_datagamedata ()
game_boardboard () const
unit_mapunits ()
std::vector< team > & teams () const
const gamemapmap () const

Protected Member Functions

void add_chat_message (const time_t &time, const std::string &speaker, int side, const std::string &message, events::chat_handler::MESSAGE_TYPE type=events::chat_handler::MESSAGE_PRIVATE) override
void send_chat_message (const std::string &message, bool allies_only=false) override

Private Member Functions

bool has_friends () const
- Private Member Functions inherited from events::chat_handler
 chat_handler ()
virtual ~chat_handler ()
void send_command (const std::string &cmd, const std::string &args="")
void do_speak (const std::string &message, bool allies_only=false)
virtual void send_whisper (const std::string &receiver, const std::string &message)
virtual void add_whisper_sent (const std::string &receiver, const std::string &message)
virtual void add_whisper_received (const std::string &sender, const std::string &message)
virtual void send_chat_room_message (const std::string &room, const std::string &message)
virtual void add_chat_room_message_sent (const std::string &room, const std::string &message)
virtual void add_chat_room_message_received (const std::string &room, const std::string &speaker, const std::string &message)
virtual void user_relation_changed (const std::string &name)
 Called when a processed command results in a relation (friend/ignore) change for a user whose name is passed as the 'name' arg. More...
void change_logging (const std::string &data)
 Change the log level of a log domain. More...

Private Attributes

const configgame_config_
gui::floating_textbox textbox_info_
std::string last_search_
map_location last_search_hit_


class console_handler

Additional Inherited Members

- Private Types inherited from events::chat_handler

Detailed Description

Definition at line 45 of file menu_events.hpp.

Constructor & Destructor Documentation

events::menu_handler::menu_handler ( game_display gui,
play_controller pc,
const config game_config 

Definition at line 93 of file menu_events.cpp.

events::menu_handler::~menu_handler ( )

Definition at line 103 of file menu_events.cpp.

Member Function Documentation

void events::menu_handler::add_chat_message ( const time_t &  time,
const std::string &  speaker,
int  side,
const std::string &  message,
events::chat_handler::MESSAGE_TYPE  type = events::chat_handler::MESSAGE_PRIVATE 
void events::menu_handler::ai_formula ( )
game_board & events::menu_handler::board ( ) const
void events::menu_handler::change_side ( mouse_handler mousehandler)
void events::menu_handler::clear_labels ( )
void events::menu_handler::clear_messages ( )
void events::menu_handler::continue_move ( mouse_handler mousehandler,
int  side_num 
void events::menu_handler::create_unit ( mouse_handler mousehandler)

Creates a unit (in debug mode via hotkey or context menu).

Definition at line 721 of file menu_events.cpp.

References events::mouse_handler::get_last_hex(), gui_, map(), and units().

Referenced by playsingle_controller::hotkey_handler::create_unit().

unit_map::iterator events::menu_handler::current_unit ( )
unit_map::const_iterator events::menu_handler::current_unit ( ) const

Definition at line 100 of file menu_events.hpp.

References current_unit().

void events::menu_handler::custom_command ( )
void events::menu_handler::do_ai_formula ( const std::string &  str,
int  side_num,
mouse_handler mousehandler 

Definition at line 1956 of file menu_events.cpp.

References ai::manager::get_singleton().

Referenced by play_controller::enter_textbox().

void events::menu_handler::do_command ( const std::string &  str)
bool events::menu_handler::do_recruit ( const std::string &  name,
int  side_num,
const map_location last_hex 
void events::menu_handler::do_search ( const std::string &  new_search)
void events::menu_handler::do_speak ( )
bool events::menu_handler::end_turn ( int  side_num)
void events::menu_handler::end_unit_turn ( mouse_handler mousehandler,
int  side_num 
void events::menu_handler::execute_gotos ( mouse_handler mousehandler,
int  side_num 
game_data & events::menu_handler::gamedata ( )
game_state & events::menu_handler::gamestate ( ) const
std::vector< std::string > events::menu_handler::get_commands_list ( )
gui::floating_textbox & events::menu_handler::get_textbox ( )
void events::menu_handler::goto_leader ( int  side_num)
bool events::menu_handler::has_friends ( ) const

Definition at line 244 of file menu_events.cpp.

References board(), gui_, n, game_display::observers(), teams(), and display::viewing_team().

Referenced by send_chat_message(), and speak().

void events::menu_handler::kill_unit ( mouse_handler mousehandler)
void events::menu_handler::label_settings ( )
void events::menu_handler::label_terrain ( mouse_handler mousehandler,
bool  team_only 
const gamemap & events::menu_handler::map ( ) const
void events::menu_handler::move_unit_to_loc ( const unit_map::iterator ui,
const map_location target,
bool  continue_move,
int  side_num,
mouse_handler mousehandler 
void events::menu_handler::objectives ( )
void events::menu_handler::preferences ( )
void events::menu_handler::recall ( int  side_num,
const map_location last_hex 
void events::menu_handler::recruit ( int  side_num,
const map_location last_hex 
void events::menu_handler::rename_unit ( )
void events::menu_handler::repeat_recruit ( int  side_num,
const map_location last_hex 
void events::menu_handler::request_control_change ( int  side_num,
const std::string &  player 
void events::menu_handler::save_map ( )
void events::menu_handler::search ( )
void events::menu_handler::send_chat_message ( const std::string &  message,
bool  allies_only = false 
void events::menu_handler::send_to_server ( const config cfg)

Implements events::chat_handler.

Definition at line 2003 of file menu_events.cpp.

void events::menu_handler::set_gui ( game_display gui)

Definition at line 52 of file menu_events.hpp.

References gui_.

Referenced by play_controller::init().

void events::menu_handler::shout ( )
void events::menu_handler::show_chat_log ( )
void events::menu_handler::show_enemy_moves ( bool  ignore_units,
int  side_num 
void events::menu_handler::show_help ( )

Definition at line 218 of file menu_events.cpp.

References help::show_help().

Referenced by play_controller::hotkey_handler::show_help().

void events::menu_handler::show_statistics ( int  side_num)

Definition at line 155 of file menu_events.cpp.

References board().

Referenced by play_controller::hotkey_handler::show_statistics().

void events::menu_handler::speak ( )
void events::menu_handler::status_table ( )
std::vector< team > & events::menu_handler::teams ( ) const
void events::menu_handler::terrain_description ( mouse_handler mousehandler)
void events::menu_handler::toggle_ellipses ( )
void events::menu_handler::toggle_grid ( )
void events::menu_handler::toggle_shroud_updates ( int  side_num)
void events::menu_handler::unit_description ( )
void events::menu_handler::unit_hold_position ( mouse_handler mousehandler,
int  side_num 
void events::menu_handler::unit_list ( )

Definition at line 160 of file menu_events.cpp.

References gui_, and gui2::dialogs::show_unit_list().

Referenced by play_controller::hotkey_handler::unit_list().

unit_map & events::menu_handler::units ( )
void events::menu_handler::update_shroud_now ( int  side_num)
void events::menu_handler::user_command ( )
void events::menu_handler::whisper ( )

Friends And Related Function Documentation

friend class console_handler

Definition at line 137 of file menu_events.hpp.

Member Data Documentation

const config& events::menu_handler::game_config_

Definition at line 146 of file menu_events.hpp.

Referenced by events::console_handler::do_choose_level(), and preferences().

game_display* events::menu_handler::gui_
std::string events::menu_handler::last_search_

Definition at line 149 of file menu_events.hpp.

Referenced by do_search(), and search().

map_location events::menu_handler::last_search_hit_

Definition at line 150 of file menu_events.hpp.

Referenced by do_search(), and search().

play_controller& events::menu_handler::pc_
gui::floating_textbox events::menu_handler::textbox_info_

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