The Battle for Wesnoth  1.19.5+dev
Public Member Functions | Protected Member Functions | Private Attributes | Friends | List of all members
events::sdl_handler Class Referenceabstract

#include <events.hpp>

Inheritance diagram for events::sdl_handler:

Public Member Functions

virtual void handle_event (const SDL_Event &event)=0
 
virtual void handle_window_event (const SDL_Event &)
 
virtual void process_event ()
 
virtual bool requires_event_focus (const SDL_Event *=nullptr) const
 
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 ()
 
virtual bool has_joined ()
 
virtual bool has_joined_global ()
 
sdl_handleroperator= (sdl_handler &&)=delete
 Moving would require two instances' context membership to be handled, it's simpler to delete these and require the two instances to be separately constructed / destructed. More...
 
 sdl_handler (sdl_handler &&)=delete
 

Protected Member Functions

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

Private Attributes

bool has_joined_
 
bool has_joined_global_
 

Friends

class context
 

Detailed Description

Definition at line 73 of file events.hpp.

Constructor & Destructor Documentation

◆ sdl_handler() [1/3]

events::sdl_handler::sdl_handler ( sdl_handler &&  )
delete

◆ sdl_handler() [2/3]

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

Definition at line 243 of file events.cpp.

References events::event_contexts, and has_joined_.

◆ sdl_handler() [3/3]

events::sdl_handler::sdl_handler ( const sdl_handler that)
protected

◆ ~sdl_handler()

events::sdl_handler::~sdl_handler ( )
protectedvirtual

Definition at line 297 of file events.cpp.

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

Member Function Documentation

◆ handle_event()

virtual void events::sdl_handler::handle_event ( const SDL_Event &  event)
pure virtual

◆ handle_window_event()

virtual void events::sdl_handler::handle_window_event ( const SDL_Event &  )
inlinevirtual

Reimplemented in sound::music_muter, and gui2::event::sdl_event_handler.

Definition at line 78 of file events.hpp.

◆ handler_members()

virtual std::vector<sdl_handler*> events::sdl_handler::handler_members ( )
inlineprotectedvirtual

◆ has_joined()

virtual bool events::sdl_handler::has_joined ( )
inlinevirtual

Definition at line 93 of file events.hpp.

References has_joined_.

◆ has_joined_global()

virtual bool events::sdl_handler::has_joined_global ( )
inlinevirtual

Definition at line 94 of file events.hpp.

References has_joined_global_.

◆ join() [1/2]

void events::sdl_handler::join ( )
virtual

◆ join() [2/2]

void events::sdl_handler::join ( context c)
virtual

Definition at line 317 of file events.cpp.

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

◆ join_global()

void events::sdl_handler::join_global ( )
virtual

◆ join_same()

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

◆ leave()

void events::sdl_handler::leave ( )
virtual

◆ leave_global()

void events::sdl_handler::leave_global ( )
virtual

Definition at line 394 of file events.cpp.

References events::event_contexts, handler_members(), and has_joined_global_.

Referenced by join(), join_global(), operator=(), and ~sdl_handler().

◆ operator=() [1/2]

sdl_handler & events::sdl_handler::operator= ( const sdl_handler that)
protected

◆ operator=() [2/2]

sdl_handler& events::sdl_handler::operator= ( sdl_handler &&  )
delete

Moving would require two instances' context membership to be handled, it's simpler to delete these and require the two instances to be separately constructed / destructed.

◆ process_event()

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

Reimplemented in gui::scrollarea.

Definition at line 79 of file events.hpp.

◆ process_tooltip_string()

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

Reimplemented in gui::widget.

Definition at line 83 of file events.hpp.

◆ requires_event_focus()

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

Reimplemented in gui::textbox.

Definition at line 81 of file events.hpp.

Referenced by events::has_focus().

Friends And Related Function Documentation

◆ context

friend class context
friend

Definition at line 75 of file events.hpp.

Member Data Documentation

◆ has_joined_

bool events::sdl_handler::has_joined_
private

◆ has_joined_global_

bool events::sdl_handler::has_joined_global_
private

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