26#ifndef TGUI_SCROLLBAR_HPP
27#define TGUI_SCROLLBAR_HPP
30#include <TGUI/Widget.hpp>
31#include <TGUI/Renderers/ScrollbarRenderer.hpp>
44 typedef std::shared_ptr<Scrollbar>
Ptr;
45 typedef std::shared_ptr<const Scrollbar>
ConstPtr;
64 Scrollbar(
const char* typeName =
"Scrollbar",
bool initRenderer =
true);
111 using Widget::setSize;
252 void leftMousePressed(
Vector2f pos)
override;
257 void leftMouseReleased(
Vector2f pos)
override;
262 void mouseMoved(
Vector2f pos)
override;
267 bool mouseWheelScrolled(
float delta,
Vector2f pos)
override;
272 void leftMouseButtonNoLongerDown()
override;
319 std::unique_ptr<DataIO::Node>
save(SavingRenderersMap& renderers)
const override;
325 void load(
const std::unique_ptr<DataIO::Node>& node,
const LoadingRenderersMap& renderers)
override;
331 void updateThumbPosition();
339 return std::make_shared<Scrollbar>(*
this);
361 Part m_mouseHoverOverPart = Part::Thumb;
364 bool m_mouseDownOnThumb =
false;
365 Vector2f m_mouseDownOnThumbPos;
367 unsigned int m_maximum = 10;
368 unsigned int m_value = 0;
371 unsigned int m_viewportSize = 1;
374 bool m_verticalScroll =
true;
377 bool m_verticalImage =
true;
380 unsigned int m_scrollAmount = 1;
383 bool m_autoHide =
true;
386 bool m_mouseDownOnArrow =
false;
388 bool m_sizeSet =
false;
393 FloatRect m_arrowDown;
395 Sprite m_spriteTrack;
396 Sprite m_spriteTrackHover;
397 Sprite m_spriteThumb;
398 Sprite m_spriteThumbHover;
399 Sprite m_spriteArrowUp;
400 Sprite m_spriteArrowUpHover;
401 Sprite m_spriteArrowDown;
402 Sprite m_spriteArrowDownHover;
405 Color m_thumbColorCached;
406 Color m_thumbColorHoverCached;
407 Color m_trackColorCached;
408 Color m_trackColorHoverCached;
409 Color m_arrowColorCached;
410 Color m_arrowColorHoverCached;
411 Color m_arrowBackgroundColorCached;
412 Color m_arrowBackgroundColorHoverCached;
Base class for render targets.
Definition BackendRenderTarget.hpp:48
Class to store the position or size of a widget.
Definition Layout.hpp:262
Signal to which the user can subscribe to get callbacks from.
Definition Signal.hpp:58
Wrapper class to store strings.
Definition String.hpp:79
Namespace that contains all TGUI functions and classes.
Definition AbsoluteOrRelativeValue.hpp:36
States used for drawing.
Definition RenderStates.hpp:39