47 using Ptr = std::shared_ptr<ScrollablePanel>;
48 using ConstPtr = std::shared_ptr<const ScrollablePanel>;
50 static constexpr const char StaticWidgetType[] =
"ScrollablePanel";
59 ScrollablePanel(
const char* typeName = StaticWidgetType,
bool initRenderer =
true);
122 using Widget::setSize;
194 TGUI_DEPRECATED(
"Use getVerticalScrollbar()->getWidth() or getHorizontalScrollbar()->getWidth() instead") TGUI_NODISCARD
float getScrollbarWidth() const;
200 TGUI_DEPRECATED("Use getVerticalScrollbar()->setPolicy(policy) instead")
void setVerticalScrollbarPolicy(
Scrollbar::Policy policy);
206 TGUI_DEPRECATED("Use getVerticalScrollbar()->getPolicy() instead") TGUI_NODISCARD
Scrollbar::Policy getVerticalScrollbarPolicy() const;
212 TGUI_DEPRECATED("Use getHorizontalScrollbar()->setPolicy(policy) instead")
void setHorizontalScrollbarPolicy(
Scrollbar::Policy policy);
218 TGUI_DEPRECATED("Use getHorizontalScrollbar()->getPolicy() instead") TGUI_NODISCARD
Scrollbar::Policy getHorizontalScrollbarPolicy() const;
225 TGUI_DEPRECATED("Use getVerticalScrollbar()->setScrollAmount(scrollAmount) instead")
void setVerticalScrollAmount(
unsigned int scrollAmount);
232 TGUI_DEPRECATED("Use getVerticalScrollbar()->getScrollAmount() instead") TGUI_NODISCARD
unsigned int getVerticalScrollAmount() const;
239 TGUI_DEPRECATED("Use getHorizontalScrollbar()->setScrollAmount(scrollAmount) instead")
void setHorizontalScrollAmount(
unsigned int scrollAmount);
246 TGUI_DEPRECATED("Use getHorizontalScrollbar()->getScrollAmount() instead") TGUI_NODISCARD
unsigned int getHorizontalScrollAmount() const;
253 TGUI_DEPRECATED("Use getVerticalScrollbar()->setValue(value) instead")
void setVerticalScrollbarValue(
unsigned int value);
260 TGUI_DEPRECATED("Use getVerticalScrollbar()->getValue() instead") TGUI_NODISCARD
unsigned int getVerticalScrollbarValue() const;
269 TGUI_DEPRECATED("Use getVerticalScrollbar()->getMaxValue() instead") TGUI_NODISCARD
unsigned int getVerticalScrollbarMaxValue() const;
276 TGUI_DEPRECATED("Use getHorizontalScrollbar()->setValue(value) instead")
void setHorizontalScrollbarValue(
unsigned int value);
283 TGUI_DEPRECATED("Use getHorizontalScrollbar()->getValue() instead") TGUI_NODISCARD
unsigned int getHorizontalScrollbarValue() const;
292 TGUI_DEPRECATED("Use getHorizontalScrollbar()->getMaxValue() instead") TGUI_NODISCARD
unsigned int getHorizontalScrollbarMaxValue() const;
299 TGUI_DEPRECATED("Use getVerticalScrollbar()->isShown() instead") TGUI_NODISCARD
bool isVerticalScrollbarShown() const;
306 TGUI_DEPRECATED("Use getHorizontalScrollbar()->isShown() instead") TGUI_NODISCARD
bool isHorizontalScrollbarShown() const;
330 void leftMouseReleased(
Vector2f pos) override;
335 void mouseMoved(
Vector2f pos) override;
340 bool scrolled(
float delta,
Vector2f pos,
bool touch) override;
345 void mouseNoLongerOnWidget() override;
350 void leftMouseButtonNoLongerDown() override;
376 void rendererChanged(const
String& property) override;
381 TGUI_NODISCARD std::unique_ptr<DataIO::Node> save(SavingRenderersMap& renderers) const override;
386 void load(const std::unique_ptr<DataIO::Node>& node, const LoadingRenderersMap& renderers) override;
402 void scrollbarScrollAmountChanged(
Orientation orientation) override;
415 void updateScrollbars();
420 void recalculateMostBottomRightPosition();
425 void connectPositionAndSize(const
Widget::
Ptr& widget);
430 void disconnectAllChildWidgets();
438 std::chrono::steady_clock::time_point m_lastSuccessfulScrollTime;
441 unsigned int m_verticalScrollAmount = 0;
442 unsigned int m_horizontalScrollAmount = 0;
444 bool m_verticalScrollbarWasVisibleOnSizeUpdate = false;
445 bool m_horizontalScrollbarWasVisibleOnSizeUpdate = false;
446 bool m_recalculatingSizeDuringUpdateScrollbars = false;
447 bool m_stuckInUpdateScrollbars = false;
449 std::unordered_map<
Widget::
Ptr,
unsigned int> m_connectedPositionCallbacks;
450 std::unordered_map<
Widget::
Ptr,
unsigned int> m_connectedSizeCallbacks;