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

#include <events.hpp>

Inheritance diagram for events::sdl_handler:
Inheritance graph

Public Member Functions

virtual void handle_event (const SDL_Event &event)=0
 
virtual void handle_window_event (const SDL_Event &event)=0
 
virtual void process_event ()
 
virtual void draw ()
 
virtual void volatile_draw ()
 
virtual void volatile_undraw ()
 
virtual bool requires_event_focus (const SDL_Event *=nullptr) const
 
virtual void process_help_string (int, int)
 
virtual void process_tooltip_string (int, int)
 
virtual void join ()
 
virtual void join (context &c)
 
virtual void join_same (sdl_handler *parent)
 
virtual void leave ()
 
virtual void join_global ()
 
virtual void leave_global ()
 

Protected Member Functions

 sdl_handler (const bool auto_join=true)
 
virtual ~sdl_handler ()
 
virtual std::vector
< sdl_handler * > 
handler_members ()
 

Private Attributes

bool has_joined_
 
bool has_joined_global_
 

Detailed Description

Definition at line 62 of file events.hpp.

Constructor & Destructor Documentation

events::sdl_handler::sdl_handler ( const bool  auto_join = true)
protected

Definition at line 151 of file events.cpp.

References has_joined_.

events::sdl_handler::~sdl_handler ( )
protectedvirtual

Definition at line 163 of file events.cpp.

References has_joined_, has_joined_global_, leave(), and leave_global().

Member Function Documentation

virtual void events::sdl_handler::draw ( )
inlinevirtual
virtual void events::sdl_handler::handle_event ( const SDL_Event &  event)
pure virtual
virtual void events::sdl_handler::handle_window_event ( const SDL_Event &  event)
pure virtual
virtual std::vector<sdl_handler*> events::sdl_handler::handler_members ( )
inlineprotectedvirtual
void events::sdl_handler::join ( )
virtual
void events::sdl_handler::join ( context c)
virtual

Definition at line 177 of file events.cpp.

References events::context::add_handler(), handler_members(), has_joined_, i, and leave().

void events::sdl_handler::join_global ( )
virtual
void events::sdl_handler::join_same ( sdl_handler parent)
virtual

Definition at line 195 of file events.cpp.

References gui2::event::find(), has_joined_, i, join(), and leave().

void events::sdl_handler::leave ( )
virtual
void events::sdl_handler::leave_global ( )
virtual

Definition at line 248 of file events.cpp.

References handler_members(), has_joined_global_, i, and events::context::remove_handler().

Referenced by join_global(), and ~sdl_handler().

virtual void events::sdl_handler::process_event ( )
inlinevirtual
virtual void events::sdl_handler::process_help_string ( int  ,
int   
)
inlinevirtual

Reimplemented in gui::menu, and gui::widget.

Definition at line 75 of file events.hpp.

virtual void events::sdl_handler::process_tooltip_string ( int  ,
int   
)
inlinevirtual

Reimplemented in gui::widget.

Definition at line 76 of file events.hpp.

virtual bool events::sdl_handler::requires_event_focus ( const SDL_Event *  = nullptr) const
inlinevirtual

Reimplemented in gui::menu, gui::textbox, and gui::slider.

Definition at line 73 of file events.hpp.

Referenced by events::has_focus().

virtual void events::sdl_handler::volatile_draw ( )
inlinevirtual

Reimplemented in gui::widget.

Definition at line 70 of file events.hpp.

virtual void events::sdl_handler::volatile_undraw ( )
inlinevirtual

Reimplemented in gui::widget.

Definition at line 71 of file events.hpp.

Member Data Documentation

bool events::sdl_handler::has_joined_
private

Definition at line 95 of file events.hpp.

Referenced by join(), join_same(), leave(), sdl_handler(), and ~sdl_handler().

bool events::sdl_handler::has_joined_global_
private

Definition at line 96 of file events.hpp.

Referenced by join_global(), leave_global(), and ~sdl_handler().


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