The Battle for Wesnoth  1.15.2+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:
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 ()
 
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 234 of file events.cpp.

References 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 288 of file events.cpp.

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

Member Function Documentation

◆ draw()

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

◆ 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 &  event)
pure virtual

◆ 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 98 of file events.hpp.

◆ has_joined_global()

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

Definition at line 99 of file events.hpp.

◆ join() [1/2]

void events::sdl_handler::join ( )
virtual

◆ join() [2/2]

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

◆ join_global()

void events::sdl_handler::join_global ( )
virtual

◆ join_same()

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

Definition at line 328 of file events.cpp.

References events::context::has_handler(), has_joined_, join(), leave(), and reverse().

◆ leave()

void events::sdl_handler::leave ( )
virtual

◆ leave_global()

void events::sdl_handler::leave_global ( )
virtual

◆ operator=() [1/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.

◆ operator=() [2/2]

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

◆ process_event()

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

Reimplemented in gui::scrollbar, help::help_browser, and gui::scrollarea.

Definition at line 79 of file events.hpp.

◆ process_help_string()

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

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

Definition at line 87 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 88 of file events.hpp.

References c, and utils::join().

◆ requires_event_focus()

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

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

Definition at line 85 of file events.hpp.

Referenced by events::has_focus().

◆ volatile_draw()

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

Reimplemented in gui::widget.

Definition at line 82 of file events.hpp.

◆ volatile_undraw()

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

Reimplemented in gui::widget.

Definition at line 83 of file events.hpp.

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

Definition at line 120 of file events.hpp.

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

◆ has_joined_global_

bool events::sdl_handler::has_joined_global_
private

Definition at line 121 of file events.hpp.

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


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