16 #define GETTEXT_DOMAIN "wesnoth-lib"
20 #include "widgets/widget.hpp"
28 const SDL_Rect EmptyRect = {-1234,-1234,0,0};
36 :
events::sdl_handler(), focus_(o.focus_), video_(o.video_), restorer_(o.restorer_), rect_(o.rect_),
37 needs_restore_(o.needs_restore_), state_(o.state_), hidden_override_(o.hidden_override_),
38 enabled_(o.enabled_), clip_(o.clip_), clip_rect_(o.clip_rect_), volatile_(o.volatile_),
39 help_text_(o.help_text_), tooltip_text_(o.tooltip_text_), help_string_(o.help_string_),
id_(o.
id_), mouse_lock_local_(o.mouse_lock_local_)
44 :
events::sdl_handler(auto_join), focus_(true), video_(&video), rect_(EmptyRect), needs_restore_(false),
45 state_(UNINIT), hidden_override_(false), enabled_(true), clip_(false),
46 clip_rect_(EmptyRect), volatile_(false), help_string_(0), mouse_lock_local_(false)
89 if(
state_ ==
UNINIT && rect.x != -1234 && rect.y != -1234)
256 for(std::vector< surface_restorer >::const_iterator
i =
restorer_.begin(),
271 for(std::vector< surface_restorer >::const_iterator
i =
restorer_.begin(),
353 if (event.type == SDL_WINDOWEVENT) {
354 switch (event.window.event) {
355 case SDL_WINDOWEVENT_RESIZED:
356 case SDL_WINDOWEVENT_RESTORED:
357 case SDL_WINDOWEVENT_SHOWN:
358 case SDL_WINDOWEVENT_EXPOSED:
bool rects_overlap(const SDL_Rect &rect1, const SDL_Rect &rect2)
Tests whether two rectangles overlap.
GLuint const GLfloat * val
GLint GLint GLint GLint GLint GLint y
void focus_handler(const sdl_handler *ptr)
GLubyte GLubyte GLubyte GLubyte w
GLsizei const GLfloat * value
bool point_in_rect(int x, int y, const SDL_Rect &rect)
Tests whether a point is inside a rectangle.
GLfloat GLfloat GLfloat GLfloat h
GLint GLint GLint GLint GLint x
Handling of system events.
int set_help_string(const std::string &str)
SDL_Rect create_rect(const int x, const int y, const int w, const int h)
Creates an empty SDL_Rect.
Contains the SDL_Rect helper code.
bool has_focus(const sdl_handler *hand, const SDL_Event *event)
void update_rect(const SDL_Rect &)
GLsizei const GLcharARB ** string
void clear_help_string(int handle)