16 #define GETTEXT_DOMAIN "wesnoth-lib"
25 #define LOG_SCOPE_HEADER get_control_type() + " [" + id() + "] " + __func__
26 #define LOG_HEADER LOG_SCOPE_HEADER + ':'
38 , pixels_per_step_(0.0)
40 , positioner_offset_(0)
41 , positioner_length_(0)
43 connect_signal<event::MOUSE_ENTER>(std::bind(
45 connect_signal<event::MOUSE_MOTION>(std::bind(
47 connect_signal<event::SDL_TOUCH_MOTION>(std::bind(
49 connect_signal<event::MOUSE_LEAVE>(std::bind(
51 connect_signal<event::LEFT_BUTTON_DOWN>(std::bind(
53 connect_signal<event::LEFT_BUTTON_UP>(std::bind(
209 assert(available_length > 0);
232 <<
" Can't recalculate size, force a window layout phase.";
247 /
static_cast<float>(steps + 1);
251 PLAIN_LOG <<
"Scrollbar recalculate overview:\n"
255 <<
" steps " << steps
263 <<
"available_length " << available_length
274 if(minimum == maximum) {
317 PLAIN_LOG <<
"Scrollbar move overview:\n"
419 const int bar =
on_bar(mouse);
424 }
else if(bar == 1) {
bool fire(const ui_event event, widget &target)
Fires an event which has no extra parameters.
base class of top level items, the only item which needs to store the final canvases to draw on.
void invalidate_layout()
Updates the size of the window.
void mouse_capture(const bool capture=true)
Define the common log macros for the gui toolkit.
ui_event
The event sent to the dispatcher.
point get_mouse_position()
Returns the current mouse position.
map_location coordinate
Contains an x and y coordinate used for starting positions in maps.
std::size_t size(const std::string &str)
Length in characters of a UTF-8 string.