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);
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();
358 Part m_mouseHoverOverPart = Part::Thumb;
361 bool m_mouseDownOnThumb =
false;
362 Vector2f m_mouseDownOnThumbPos;
364 unsigned int m_maximum = 10;
365 unsigned int m_value = 0;
368 unsigned int m_viewportSize = 1;
371 bool m_verticalScroll =
true;
374 bool m_verticalImage =
true;
377 unsigned int m_scrollAmount = 1;
380 bool m_autoHide =
true;
383 bool m_mouseDownOnArrow =
false;
385 bool m_sizeSet =
false;
390 FloatRect m_arrowDown;
392 Sprite m_spriteTrack;
393 Sprite m_spriteTrackHover;
394 Sprite m_spriteThumb;
395 Sprite m_spriteThumbHover;
396 Sprite m_spriteArrowUp;
397 Sprite m_spriteArrowUpHover;
398 Sprite m_spriteArrowDown;
399 Sprite m_spriteArrowDownHover;
402 Color m_thumbColorCached;
403 Color m_thumbColorHoverCached;
404 Color m_trackColorCached;
405 Color m_trackColorHoverCached;
406 Color m_arrowColorCached;
407 Color m_arrowColorHoverCached;
408 Color m_arrowBackgroundColorCached;
409 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:284
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