The Battle for Wesnoth  1.19.5+dev
Public Member Functions | Public Attributes | List of all members
events::context Class Reference

#include <events.hpp>

Public Member Functions

 context ()
 
 ~context ()
 
 context (const context &)=delete
 
void add_handler (sdl_handler *ptr)
 
bool has_handler (const sdl_handler *ptr) const
 Returns true if ptr is found in either the handlers or staging_handlers lists. More...
 
bool remove_handler (sdl_handler *ptr)
 
void cycle_focus ()
 
void set_focus (const sdl_handler *ptr)
 
void add_staging_handlers ()
 

Public Attributes

handler_list handlers
 
handler_list::iterator focused_handler
 
std::vector< sdl_handler * > staging_handlers
 

Detailed Description

Definition at line 39 of file events.hpp.

Constructor & Destructor Documentation

◆ context() [1/2]

events::context::context ( )
inline

Definition at line 42 of file events.hpp.

◆ ~context()

events::context::~context ( )

Definition at line 200 of file events.cpp.

References h, and handlers.

◆ context() [2/2]

events::context::context ( const context )
delete

Member Function Documentation

◆ add_handler()

void events::context::add_handler ( sdl_handler ptr)

Definition at line 89 of file events.cpp.

References staging_handlers.

Referenced by events::sdl_handler::sdl_handler().

◆ add_staging_handlers()

void events::context::add_staging_handlers ( )

Definition at line 194 of file events.cpp.

References handlers, and staging_handlers.

◆ cycle_focus()

void events::context::cycle_focus ( )

Definition at line 153 of file events.cpp.

References focused_handler, and handlers.

Referenced by remove_handler().

◆ has_handler()

bool events::context::has_handler ( const sdl_handler ptr) const

Returns true if ptr is found in either the handlers or staging_handlers lists.

Definition at line 98 of file events.cpp.

References handlers, and staging_handlers.

Referenced by events::sdl_handler::join_same(), events::sdl_handler::operator=(), and events::sdl_handler::sdl_handler().

◆ remove_handler()

bool events::context::remove_handler ( sdl_handler ptr)

Definition at line 106 of file events.cpp.

References cycle_focus(), focused_handler, handlers, i, and staging_handlers.

Referenced by events::sdl_handler::leave().

◆ set_focus()

void events::context::set_focus ( const sdl_handler ptr)

Definition at line 186 of file events.cpp.

References focused_handler, handlers, and i.

Member Data Documentation

◆ focused_handler

handler_list::iterator events::context::focused_handler

Definition at line 62 of file events.hpp.

Referenced by cycle_focus(), remove_handler(), and set_focus().

◆ handlers

handler_list events::context::handlers

◆ staging_handlers

std::vector<sdl_handler*> events::context::staging_handlers

Definition at line 63 of file events.hpp.

Referenced by add_handler(), add_staging_handlers(), has_handler(), and remove_handler().


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