Handling of system events.
More...
Detailed Description
Handling of system events.
System events include mouse and key events, and other events which are not domain specific. The program maintains a stack of event_context objects, the top of the stack being the active event_context.
When an object of a type inheriting from handler is instantiated, it will be associated with the active event_context (unless auto_join has been set false, in which case it can manually be instructed to join a later context). As long as its event_context remains active, and only then, it will receive all system events.
- Note:
- Multiple handler objects will receive the same events, including key events.
Function Documentation
| static bool events::command_active |
( |
|
) |
[static] |
| void events::cycle_focus |
( |
|
) |
|
| int events::discard |
( |
Uint32 |
event_mask |
) |
|
| void events::focus_handler |
( |
const handler * |
ptr |
) |
|
| bool events::has_focus |
( |
const handler * |
hand, |
|
|
const SDL_Event * |
event | |
|
) |
| | |
Referenced by play_controller::finish_side_turn(), storyscreen::part_ui::handle_interface(), dialogs::network_data_dialog(), controller_base::play_slice(), run_lobby_loop(), display::scroll_to_xy(), gui2::twindow::show(), gui::dialog::show(), teleport_unit_between(), the_end_old(), default_map_generator::user_config(), and test_utils::fake_event_source::~fake_event_source().
| void events::raise_draw_event |
( |
|
) |
|
Referenced by gui::dialog::draw_contents(), editor::editor_controller::editor_controller(), storyscreen::part_ui::handle_interface(), playsingle_controller::init_gui(), dialogs::network_data_dialog(), playsingle_controller::play_scenario(), controller_base::play_slice(), replay_controller::play_turn(), playsingle_controller::play_turn(), gui::dialog::process(), storyscreen::part_ui::render_floating_images(), run_lobby_loop(), the_end_old(), replay_controller::update_gui(), and default_map_generator::user_config().
| void events::raise_help_string_event |
( |
int |
mousex, |
|
|
int |
mousey | |
|
) |
| | |
| void events::raise_process_event |
( |
|
) |
|
| void events::raise_volatile_draw_event |
( |
|
) |
|
| void events::raise_volatile_undraw_event |
( |
|
) |
|
Variable Documentation
Definition at line 40 of file mouse_handler_base.cpp.
Referenced by events::mouse_handler::attack_enemy_(), playsingle_controller::can_execute_command(), play_controller::can_execute_command(), events::command_disabler::command_disabler(), wb::manager::contextual_delete(), events::console_handler::do_unit(), events::mouse_handler::left_click(), events::mouse_handler::perform_attack(), test_utils::fake_event_source::process(), events::mouse_handler::select_hex(), play_controller::show_menu(), and events::command_disabler::~command_disabler().