26#ifndef TGUI_SPIN_BUTTON_HPP
27#define TGUI_SPIN_BUTTON_HPP
30#include <TGUI/Renderers/SpinButtonRenderer.hpp>
31#include <TGUI/Widgets/ClickableWidget.hpp>
32#include <TGUI/Timer.hpp>
45 typedef std::shared_ptr<SpinButton>
Ptr;
46 typedef std::shared_ptr<const SpinButton>
ConstPtr;
56 SpinButton(
const char* typeName =
"SpinButton",
bool initRenderer =
true);
106 using Widget::setSize;
213 void leftMousePressed(
Vector2f pos)
override;
218 void leftMouseReleased(
Vector2f pos)
override;
223 void mouseMoved(
Vector2f pos)
override;
263 std::unique_ptr<DataIO::Node>
save(SavingRenderersMap& renderers)
const override;
269 void load(
const std::unique_ptr<DataIO::Node>& node,
const LoadingRenderersMap& renderers)
override;
283 return std::make_shared<SpinButton>(*
this);
293 void callMousePressPeriodically(std::chrono::time_point<std::chrono::steady_clock> clicked);
306 bool m_verticalScroll =
true;
307 std::chrono::time_point<std::chrono::steady_clock> m_PressedAt;
310 float m_maximum = 10;
315 bool m_mouseHoverOnTopArrow =
false;
316 bool m_mouseDownOnTopArrow =
false;
319 Sprite m_spriteArrowUpHover;
321 Sprite m_spriteArrowDownHover;
325 Color m_borderColorCached;
326 Color m_backgroundColorCached;
327 Color m_backgroundColorHoverCached;
328 Color m_arrowColorCached;
329 Color m_arrowColorHoverCached;
330 float m_borderBetweenArrowsCached = 0;
Base class for render targets.
Definition BackendRenderTarget.hpp:48
Wrapper for colors.
Definition Color.hpp:63
Class to store the position or size of a widget.
Definition Layout.hpp:262
Definition Outline.hpp:39
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