16 #define GETTEXT_DOMAIN "wesnoth-lib"
20 #include "widgets/widget.hpp"
26 const SDL_Rect EmptyRect {-1234,-1234,0,0};
34 :
events::sdl_handler(auto_join), focus_(true), rect_(EmptyRect),
35 state_(UNINIT), enabled_(true), clip_(false),
36 clip_rect_(EmptyRect), mouse_lock_local_(false)
222 if (
hidden()) {
return false; }
Drawing functions, for drawing things on the screen.
void invalidate_region(const rect ®ion)
Mark a region of the screen as requiring redraw.
clip_setter reduce_clip(const SDL_Rect &clip)
Set the clipping area to the intersection of the current clipping area and the given rectangle.
void rect(const SDL_Rect &rect)
Draw a rectangle.
Handling of system events.
bool has_focus(const sdl_handler *hand, const SDL_Event *event)
void focus_handler(const sdl_handler *ptr)
Contains the SDL_Rect helper code.
An abstract description of a rectangle with integer coordinates.
bool contains(int x, int y) const
Whether the given point lies within the rectangle.
bool overlaps(const SDL_Rect &r) const
Whether the given rectangle and this rectangle overlap.