Classes | Functions | Variables

events Namespace Reference

Handling of system events. More...

Classes

class  chat_handler
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  menu_handler
class  mouse_handler
struct  command_disabler
class  mouse_handler_base

Functions

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 ()
void raise_help_string_event (int mousex, int mousey)
int discard (Uint32 event_mask)
void cycle_focus ()
static bool command_active ()

Variables

int commands_disabled = 0

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]

Definition at line 42 of file mouse_handler_base.cpp.

Referenced by events::mouse_handler_base::is_left_click(), and events::mouse_handler_base::is_right_click().

Here is the caller graph for this function:

void events::cycle_focus (  ) 
int events::discard ( Uint32  event_mask  ) 

Referenced by luaW_getglobal(), game_controller::play_multiplayer(), and gui2::tdialog::show().

Here is the caller graph for this function:

void events::focus_handler ( const handler *  ptr  ) 

Referenced by gui::textbox::handle_event(), and gui::widget::set_focus().

Here is the caller graph for this function:

bool events::has_focus ( const handler *  hand,
const SDL_Event *  event 
)

Referenced by gui::widget::focus().

Here is the caller graph for this function:

void events::pump (  ) 
void events::raise_draw_event (  ) 
void events::raise_help_string_event ( int  mousex,
int  mousey 
)
void events::raise_process_event (  ) 
void events::raise_volatile_draw_event (  ) 

Referenced by display::flip().

Here is the caller graph for this function:

void events::raise_volatile_undraw_event (  ) 

Referenced by display::flip().

Here is the caller graph for this function:


Variable Documentation

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated by doxygen 1.7.1 on Fri May 25 2012 01:18:49 for The Battle for Wesnoth
Gna! | Forum | Wiki | CIA | devdocs