15 #ifndef EVENTS_HPP_INCLUDED
16 #define EVENTS_HPP_INCLUDED
18 #include <SDL_events.h>
19 #include <SDL_version.h>
23 #define DOUBLE_CLICK_EVENT SDL_USEREVENT
24 #define TIMER_EVENT (SDL_USEREVENT + 1)
25 #define HOVER_REMOVE_POPUP_EVENT (SDL_USEREVENT + 2)
26 #define DRAW_EVENT (SDL_USEREVENT + 3)
27 #define CLOSE_WINDOW_EVENT (SDL_USEREVENT + 4)
28 #define SHOW_HELPTIP_EVENT (SDL_USEREVENT + 5)
29 #define DRAW_ALL_EVENT (SDL_USEREVENT + 6)
91 return std::vector<sdl_handler*>();
128 int ticks(
unsigned *refresh_counter=
nullptr,
unsigned refresh_rate=1);
void raise_resize_event()
void raise_volatile_undraw_event()
virtual void handle_window_event(const SDL_Event &event)=0
void discard_input()
Discards all input events.
static thandler * handler
std::vector< events::sdl_handler * > sdl_handler_vector
virtual void process_help_string(int, int)
virtual void volatile_undraw()
int ticks(unsigned *refresh_counter=nullptr, unsigned refresh_rate=1)
virtual void process(pump_info &info)=0
virtual void leave_global()
virtual void process_event()
virtual void volatile_draw()
virtual void join_same(sdl_handler *parent)
void raise_draw_all_event()
void focus_handler(const sdl_handler *ptr)
virtual void handle_event(const SDL_Event &event)=0
std::vector< sdl_handler * > handlers
void raise_volatile_draw_all_event()
void set_focus(const sdl_handler *ptr)
void delete_handler_index(size_t handler)
void raise_process_event()
bool is_input(const SDL_Event &event)
Is the event an input event?
void raise_help_string_event(int mousex, int mousey)
virtual bool requires_event_focus(const SDL_Event *=nullptr) const
virtual void process_tooltip_string(int, int)
void raise_volatile_draw_event()
virtual std::vector< sdl_handler * > handler_members()
Handling of system events.
sdl_handler(const bool auto_join=true)
void add_handler(sdl_handler *ptr)
bool has_focus(const sdl_handler *hand, const SDL_Event *event)
std::pair< int, int > resize_dimensions
bool remove_handler(sdl_handler *ptr)
virtual void join_global()