TGUI  1.6.1
Loading...
Searching...
No Matches
tgui::DualScrollbarChildInterface Class Reference

Base class for widgets with both a vertical and horizontal scrollbar. More...

#include <TGUI/Widgets/Scrollbar.hpp>

Inheritance diagram for tgui::DualScrollbarChildInterface:
tgui::ListView tgui::ScrollablePanel tgui::TextArea tgui::TreeView tgui::PanelListBox

Public Member Functions

 DualScrollbarChildInterface ()
 Default constructor.
 
 DualScrollbarChildInterface (const DualScrollbarChildInterface &)
 Copy constructor.
 
 DualScrollbarChildInterface (DualScrollbarChildInterface &&) noexcept
 Move constructor.
 
virtual ~DualScrollbarChildInterface ()=default
 Destructor.
 
DualScrollbarChildInterfaceoperator= (const DualScrollbarChildInterface &)
 Overload of copy assignment operator.
 
DualScrollbarChildInterfaceoperator= (DualScrollbarChildInterface &&) noexcept
 Move assignment.
 
ScrollbarAccessorgetVerticalScrollbar ()
 Returns an object that provides access to the widget's vertical scrollbar.
 
const ScrollbarAccessorgetVerticalScrollbar () const
 Returns an object that provides access to the widget's vertical scrollbar.
 
ScrollbarAccessorgetHorizontalScrollbar ()
 Returns an object that provides access to the widget's horizontal scrollbar.
 
const ScrollbarAccessorgetHorizontalScrollbar () const
 Returns an object that provides access to the widget's horizontal scrollbar.
 

Protected Member Functions

virtual void scrollbarValueChanged (Orientation orientation)
 Called when the value of one of the scrollbars has been changed by calling either getVerticalScrollbar()->setValue(...) or getHorizontalScrollbar()->setValue(...)
 
virtual void scrollbarPolicyChanged (Orientation orientation)
 Called when the policy of one of the scrollbars has been changed calling either getVerticalScrollbar()->setPolicy(...) or getHorizontalScrollbar()->setPolicy(...)
 
virtual void scrollbarScrollAmountChanged (Orientation orientation)
 Called when the scroll amount of one of the scrollbars has been changed calling either getVerticalScrollbar()->setScrollAmount(...) or getHorizontalScrollbar()->setScrollAmount(...)
 
void saveScrollbarPolicies (std::unique_ptr< DataIO::Node > &node) const
 This function should be called inside the save function in order to save the configured scrollbar policies.
 
void loadScrollbarPolicies (const std::unique_ptr< DataIO::Node > &node)
 This function should be called inside the load function in order to load the wanted scrollbar policies.
 

Protected Attributes

CopiedSharedPtr< ScrollbarChildWidgetm_verticalScrollbar
 
CopiedSharedPtr< ScrollbarChildWidgetm_horizontalScrollbar
 
ScrollbarAccessor m_verticalScrollbarAccessor
 
ScrollbarAccessor m_horizontalScrollbarAccessor
 

Detailed Description

Base class for widgets with both a vertical and horizontal scrollbar.

This class exists so that these widgets wouldn't need to define their own copy constructor and assignment operators.

Since
TGUI 1.5

Member Function Documentation

◆ getHorizontalScrollbar() [1/2]

ScrollbarAccessor * tgui::DualScrollbarChildInterface::getHorizontalScrollbar ( )
nodiscard

Returns an object that provides access to the widget's horizontal scrollbar.

Returns
Pointer to object that allows reading scrollbar properties and allows setting some of them

◆ getHorizontalScrollbar() [2/2]

const ScrollbarAccessor * tgui::DualScrollbarChildInterface::getHorizontalScrollbar ( ) const
nodiscard

Returns an object that provides access to the widget's horizontal scrollbar.

Returns
Pointer to object that allows reading scrollbar properties (there is also a non-const function for setting)

◆ getVerticalScrollbar() [1/2]

ScrollbarAccessor * tgui::DualScrollbarChildInterface::getVerticalScrollbar ( )
nodiscard

Returns an object that provides access to the widget's vertical scrollbar.

Returns
Pointer to object that allows reading scrollbar properties and allows setting some of them

◆ getVerticalScrollbar() [2/2]

const ScrollbarAccessor * tgui::DualScrollbarChildInterface::getVerticalScrollbar ( ) const
nodiscard

Returns an object that provides access to the widget's vertical scrollbar.

Returns
Pointer to object that allows reading scrollbar properties (there is also a non-const function for setting)

◆ scrollbarPolicyChanged()

virtual void tgui::DualScrollbarChildInterface::scrollbarPolicyChanged ( Orientation orientation)
protectedvirtual

Called when the policy of one of the scrollbars has been changed calling either getVerticalScrollbar()->setPolicy(...) or getHorizontalScrollbar()->setPolicy(...)

Parameters
orientationVertical or Horizontal depending on which scrollbar triggered the callback

Reimplemented in tgui::ListView, tgui::ScrollablePanel, tgui::TextArea, and tgui::TreeView.

◆ scrollbarScrollAmountChanged()

virtual void tgui::DualScrollbarChildInterface::scrollbarScrollAmountChanged ( Orientation orientation)
protectedvirtual

Called when the scroll amount of one of the scrollbars has been changed calling either getVerticalScrollbar()->setScrollAmount(...) or getHorizontalScrollbar()->setScrollAmount(...)

Parameters
orientationVertical or Horizontal depending on which scrollbar triggered the callback

Reimplemented in tgui::ScrollablePanel.

◆ scrollbarValueChanged()

virtual void tgui::DualScrollbarChildInterface::scrollbarValueChanged ( Orientation orientation)
protectedvirtual

Called when the value of one of the scrollbars has been changed by calling either getVerticalScrollbar()->setValue(...) or getHorizontalScrollbar()->setValue(...)

Parameters
orientationVertical or Horizontal depending on which scrollbar triggered the callback

The documentation for this class was generated from the following file: