Classes | |
class | handler |
struct | event_context |
struct | pump_info |
class | pump_monitor |
class | observer |
class | generic_event |
class | delete_recall_unit |
class | cmd_arg_parser |
class | map_command_handler |
class | chat_command_handler |
class | console_handler |
class | chat_handler |
class | menu_handler |
struct | command_disabler |
class | mouse_handler |
Functions | |
void | raise_help_string_event (int mousex, int mousey) |
void | focus_handler (const handler *ptr) |
bool | has_focus (const handler *hand, const SDL_Event *event) |
void | pump () |
void | raise_process_event () |
void | raise_draw_event () |
void | raise_volatile_draw_event () |
void | raise_volatile_undraw_event () |
int | discard (Uint32 event_mask) |
void | cycle_focus () |
static bool | command_active () |
static void | format_prob (char str_buf[10], const float prob) |
Variables | |
std::deque< context > | event_contexts |
std::vector< pump_monitor * > | pump_monitors |
int | commands_disabled = 0 |
const double | drag_threshold = 14.0 |
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.
static bool events::command_active | ( | ) | [static] |
Definition at line 52 of file mouse_events.cpp.
Referenced by events::mouse_handler::is_left_click(), and events::mouse_handler::is_right_click().
void events::cycle_focus | ( | ) |
int events::discard | ( | Uint32 | event_mask | ) |
Definition at line 455 of file events.cpp.
References ERR_GEN.
Referenced by input_blocker::~input_blocker().
void events::focus_handler | ( | const handler * | ptr | ) |
Definition at line 215 of file events.cpp.
References event_contexts.
Referenced by gui::textbox::handle_event(), has_focus(), and gui::widget::set_focus().
static void events::format_prob | ( | char | str_buf[10], | |
const float | prob | |||
) | [static] |
Definition at line 62 of file mouse_events.cpp.
bool events::has_focus | ( | const handler * | hand, | |
const SDL_Event * | event | |||
) |
Definition at line 222 of file events.cpp.
References event_contexts, focus_handler(), and events::handler::requires_event_focus().
Referenced by gui::widget::focus().
void events::pump | ( | ) |
Definition at line 265 of file events.cpp.
References DOUBLE_CLICK_EVENT, event_contexts, handle_system_event(), lg::info, INPUT_MASK, pump_monitors, raise_help_string_event(), events::pump_info::resize_dimensions, cursor::set_focus(), events::pump_info::ticks(), and update_whole_screen().
Referenced by dialogs::animate_unit_advancement(), fade_logo(), map_editor::main_loop(), dialogs::network_data_dialog(), map_editor::new_map_dialog(), play_controller::play_slice(), map_editor::preferences_dialog(), gui2::tevent_handler::process_events(), map_editor::resize_dialog(), run_lobby_loop(), display::scroll_to_xy(), gui::dialog::show(), about::show_about(), help::show_help(), preferences::show_hotkeys_dialog(), show_intro_part(), show_intro_part_helper(), gui::show_title(), teleport_unit_between(), default_map_generator::user_config(), unit_animator::wait_for_end(), and unit_animator::wait_until().
void events::raise_draw_event | ( | ) |
Definition at line 401 of file events.cpp.
References event_contexts.
Referenced by gui::dialog::draw_contents(), playsingle_controller::init_gui(), map_editor::main_loop(), map_editor::map_editor(), dialogs::network_connect_dialog(), dialogs::network_data_dialog(), map_editor::new_map_dialog(), play_controller::play_slice(), replay_controller::play_turn(), playsingle_controller::play_turn(), map_editor::preferences_dialog(), gui::dialog::process(), replay_controller::reset_replay(), map_editor::resize_dialog(), run_lobby_loop(), about::show_about(), help::show_help(), preferences::show_hotkeys_dialog(), show_intro_part(), show_intro_part_helper(), gui::show_title(), 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 | ( | ) |
Definition at line 387 of file events.cpp.
References event_contexts.
Referenced by map_editor::new_map_dialog(), play_controller::play_slice(), map_editor::preferences_dialog(), gui::dialog::process(), map_editor::resize_dialog(), run_lobby_loop(), about::show_about(), help::show_help(), preferences::show_hotkeys_dialog(), show_intro_part(), show_intro_part_helper(), gui::show_title(), and default_map_generator::user_config().
void events::raise_volatile_draw_event | ( | ) |
Definition at line 415 of file events.cpp.
References event_contexts.
Referenced by display::flip().
void events::raise_volatile_undraw_event | ( | ) |
Definition at line 429 of file events.cpp.
References event_contexts.
Referenced by display::flip().
int events::commands_disabled = 0 |
Definition at line 40 of file mouse_events.cpp.
Referenced by playsingle_controller::can_execute_command(), play_controller::can_execute_command(), events::command_disabler::command_disabler(), events::console_handler::do_unit(), events::mouse_handler::left_click(), events::mouse_handler::mouse_press(), events::mouse_handler::select_hex(), play_controller::show_menu(), and events::command_disabler::~command_disabler().
const double events::drag_threshold = 14.0 [static] |
Definition at line 80 of file mouse_events.cpp.
std::deque<context> events::event_contexts [static] |
Definition at line 137 of file events.cpp.
Referenced by events::event_context::event_context(), focus_handler(), events::handler::handler(), has_focus(), events::handler::join(), events::handler::leave(), pump(), raise_draw_event(), raise_help_string_event(), raise_process_event(), raise_volatile_draw_event(), raise_volatile_undraw_event(), and events::event_context::~event_context().
std::vector<pump_monitor*> events::pump_monitors [static] |
Definition at line 139 of file events.cpp.
Referenced by pump(), events::pump_monitor::pump_monitor(), and events::pump_monitor::~pump_monitor().
Generated by doxygen 1.5.5 on 23 May 2008 for The Battle for Wesnoth | Gna! | Forum | Wiki | CIA | devdocs |