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