15 #define GETTEXT_DOMAIN "wesnoth-lib"
24 #define LOG_SCOPE_HEADER get_control_type() + " [" + id() + "] " + __func__
25 #define LOG_HEADER LOG_SCOPE_HEADER + ':'
37 , pixels_per_step_(0.0)
39 , positioner_offset_(0)
40 , positioner_length_(0)
42 connect_signal<event::MOUSE_ENTER>(std::bind(
44 connect_signal<event::MOUSE_MOTION>(std::bind(
46 connect_signal<event::MOUSE_LEAVE>(std::bind(
48 connect_signal<event::LEFT_BUTTON_DOWN>(std::bind(
50 connect_signal<event::LEFT_BUTTON_UP>(std::bind(
152 for(
auto & tmp :
canvas())
180 assert(available_length > 0);
203 <<
" Can't recalculate size, force a window layout phase.\n";
218 / static_cast<float>(steps + 1);
222 std::cerr <<
"Scrollbar recalculate overview:\n"
225 <<
" step_size_ " << step_size_
226 <<
" steps " << steps
234 <<
"available_length " << available_length
245 if(minimum == maximum) {
288 std::cerr <<
"Scrollbar move overview:\n"
309 for(
auto & tmp :
canvas())
333 tpoint mouse = coordinate;
406 }
else if(bar == 1) {
Define the common log macros for the gui toolkit.
base class of top level items, the only item which needs to store the final canvases to draw on ...
GLuint GLsizei GLsizei * length
A class inherited from ttext_box that displays its input as stars.
bool fire(const tevent event, twidget &target)
Fires an event which has no extra parameters.
tpoint get_mouse_position()
Returns the current mouse position.
Send by a widget to notify others its contents or state are modified.
virtual void place(const tpoint &origin, const tpoint &size) override
See twidget::place.
tevent
The event send to the dispatcher.
std::vector< tcanvas > & canvas()
Base class for all visible items.
void mouse_capture(const bool capture=true)
void invalidate_layout()
Updates the size of the window.