Implementation class for ScrollViewConcept. More...
#include <kanzi/ui/node/concept/scroll_view.hpp>
Public Types | |
typedef ScrollViewConceptImpl< TBaseClass, TDerivedClass > | TScrollView |
Public Types inherited from kanzi::ScrollViewConcept | |
enum | AllowedScrollAxis { XAxis , YAxis , AllAxes } |
Enumeration for AllowedScrollAxisProperty which sets the axis on which you want to allow a Scroll View node to scroll. More... | |
enum | PanState { PanInitial , PanStarted , PanCancelling , PanCanceled } |
Enumeration for the state of pan. More... | |
enum | ScrollDirection { ScrollUp , ScrollDown , ScrollLeft , ScrollRight } |
Enumeration for the available directions when scrolling by step. More... | |
enum | ScrollEdge { ScrollHome , ScrollEnd } |
Enumeration for the available directions when scrolling to the edge of a Scroll View. More... | |
enum | ScrollPage { ScrollPageUp , ScrollPageDown } |
Enumeration for the available directions when scrolling a Scroll View node by page. More... | |
Static Public Member Functions | |
static PropertyTypeEditorInfoSharedPtr | makeEditorInfo () |
Static Public Member Functions inherited from kanzi::ScrollViewConcept | |
static PropertyTypeEditorInfoSharedPtr | makeEditorInfo () |
Protected Member Functions | |
TDerivedClass * | getThisObject () |
Internal accessor for the Curiously Recurring Template Pattern. | |
const TDerivedClass * | getThisObject () const |
Internal accessor for the Curiously Recurring Template Pattern. | |
void | initialize () |
Assigns the message handlers for the pan manipulator and scroll messages. | |
void | onNodePropertyChanged (AbstractPropertyType propertyType, PropertyNotificationReason reason) override |
Node::onNodePropertyChanged() implementation. | |
void | refreshMaximumNumberOfTouches () |
Kanzi internally updates the maximum number of touch points of the pan manipulator to the value of the MaximumNumberOfTouchesProperty value. | |
void | refreshMinimumNumberOfTouches () |
Kanzi internally uses this helper function to update the minimum number of touch points of the pan manipulator to the value of the MinimumNumberOfTouchesProperty value. | |
void | refreshScrollConfiguration () |
Kanzi internally uses this helper function to update smooth interpolation coefficients between starting and stopping the interpolator timer, depending on whether a finger is still on a Scroll View node. | |
ScrollViewConceptImpl (Domain *domain, string_view name) | |
Additional Inherited Members | |
Static Public Attributes inherited from kanzi::ScrollViewConcept | |
static MessageType< ScrollDirectionMessageArguments > | ScrollDirectionMessage |
Send this message to a Scroll View node to scroll one step in a given direction. | |
static MessageType< ScrollDownMessageArguments > | ScrollDownMessage |
Send this message to a Scroll View node to scroll down the distance that you set using the StepMultiplierProperty. | |
static MessageType< ScrollEdgeMessageArguments > | ScrollEdgeMessage |
Send this message to a Scroll View node to scroll to the top or bottom of that Scroll View node. | |
static MessageType< ScrolledMessageArguments > | ScrolledMessage |
Scroll View sends this message whenever the Scroll View node scrolls. | |
static MessageType< ScrollEndMessageArguments > | ScrollEndMessage |
Send this message to a Scroll View node to scroll to the end of that Scroll View node. | |
static MessageType< ScrollFinishedMessageArguments > | ScrollFinishedMessage |
Scroll View sends this message when scrolling ends, regardless of how the scrolling ended. | |
static MessageType< ScrollHomeMessageArguments > | ScrollHomeMessage |
Send this message to a Scroll View node to scroll to the beginning of that Scroll View node. | |
static MessageType< ScrollLeftMessageArguments > | ScrollLeftMessage |
Send this message to a Scroll View node to scroll left the distance that you set using the StepMultiplierProperty. | |
static MessageType< ScrollPageDownMessageArguments > | ScrollPageDownMessage |
Send this message to a Scroll View node to scroll down the distance of the layout height of that Scroll View node. | |
static MessageType< ScrollPageMessageArguments > | ScrollPageMessage |
Send this message to a Scroll View node to scroll the distance of the layout height of that Scroll View node. | |
static MessageType< ScrollPageUpMessageArguments > | ScrollPageUpMessage |
Send this message to a Scroll View node to scroll up the distance of the layout height of that Scroll View node. | |
static MessageType< ScrollRightMessageArguments > | ScrollRightMessage |
Send this message to a Scroll View node to scroll right the distance that you set using the StepMultiplierProperty. | |
static MessageType< ScrollStartedMessageArguments > | ScrollStartedMessage |
Scroll View sends this message when scrolling starts, regardless of how the scrolling started. | |
static MessageType< ScrollUpMessageArguments > | ScrollUpMessage |
Send this message to a Scroll View node to scroll up the distance that you set using the StepMultiplierProperty. | |
static MessageType< SetScrollMessageArguments > | SetScrollMessage |
Send this message to a Scroll View to go a scroll position immediately without scrolling. | |
static MessageType< SetScrollTargetMessageArguments > | SetScrollTargetMessage |
Send this message to a Scroll View to scroll to a specific position in that Scroll View node. | |
static MessageType< SnapRequestMessageArguments > | SnapRequestMessage |
Scroll View sends this message when scrolling stops, but the Scroll View node needs to snap to the nearest item. | |
static MessageType< UserScrollFinishedMessageArguments > | UserScrollFinishedMessage |
Scroll View sends this message when user interaction causes the scrolling to end. | |
static MessageType< UserScrollStartedMessageArguments > | UserScrollStartedMessage |
Scroll View sends this message when user interaction causes the scrolling to start. | |
static MessageType< ZoomedMessageArguments > | ZoomedMessage |
Scroll View sends this message when zoom in or zoom out occurs. | |
static PropertyType< float > | MessageArgumentScrollViewScrollPositionXProperty |
Use the MessageArgumentScrollViewScrollPositionX argument to set the x axis coordinate for the new scroll position of a Scroll View node. | |
static PropertyType< float > | MessageArgumentScrollViewScrollPositionYProperty |
Use the MessageArgumentScrollViewScrollPositionY argument to set the y axis coordinate for the new scroll position of a Scroll View node. | |
static PropertyType< Vector2 > | MessageArgumentScrollViewScrollPositionProperty |
Use the MessageArgumentScrollViewScrollPosition argument to set the x and y axis coordinates for the new scroll position of a Scroll View node. | |
static PropertyType< Vector2 > | MessageArgumentScrollViewScrollSpeedProperty |
Use the MessageArgumentScrollViewScrollSpeed argument to set the scrolling speed of a Scroll View node. | |
static PropertyType< Vector2 > | MessageArgumentScrollViewScrollTargetProperty |
Use the MessageArgumentScrollViewScrollTarget argument to set the scroll target for a Scroll View node. | |
static PropertyType< int > | MessageArgumentScrollViewScrollDirectionProperty |
Use the MessageArgumentScrollViewScrollDirection argument to set the scrolling direction for a Scroll View node. | |
static PropertyType< int > | MessageArgumentScrollViewScrollPageProperty |
Use the MessageArgumentScrollViewScrollPage argument to set the direction in which a Scroll View node scrolls when you instruct it to scroll by the layout height of that Scroll View node. | |
static PropertyType< int > | MessageArgumentScrollViewScrollEdgeProperty |
Use the MessageArgumentScrollViewScrollEdge argument to set the direction in which a Scroll View node scrolls when you instruct it to scroll to either of the edges. | |
static PropertyType< float > | MessageArgumentScrollViewZoomProperty |
Use the MessageArgumentScrollViewZoom argument to set the zoom level for a Scroll View node. | |
static PropertyType< Vector2 > | MessageArgumentScrollViewSnapPositionProperty |
Use the MessageArgumentScrollViewSnapPosition argument to set the target of a snap request. | |
static PropertyType< Vector2 > | MessageArgumentScrollViewSnapDirectionProperty |
Use the MessageArgumentScrollViewSnapDirection argument to set the direction of a snap request. | |
static PropertyType< float > | RecognitionThresholdProperty |
Use the Recognition Threshold property to set the amount a pointing device must move for the scrolling to start on a Scroll View node. | |
static PropertyType< int > | MinimumNumberOfTouchesProperty |
Use the Minimum Number Of Touches property to set the required number of touch points pressed for a Scroll View node pan to start. | |
static PropertyType< int > | MaximumNumberOfTouchesProperty |
Use the Maximum Number Of Touches property to set the maximum number of touch points allowed for a Scroll View to pan. | |
static PropertyType< float > | SensitivityProperty |
Use the Sensitivity property to set the amount the position changes relative to the movement of the pointer that starts the swiping. | |
static PropertyType< float > | SlidingAccelerationCoefficientProperty |
Use the Sliding Acceleration Coefficient property to set the acceleration of the node controlled by a Scroll View node after you release the pointer with which you swipe. | |
static PropertyType< float > | SlidingDragCoefficientProperty |
Use the Sliding Drag Coefficient property to set the amount that drag affects the movement of the node controlled by a Scroll View node after you release the pointer with which you swipe. | |
static PropertyType< float > | DraggingAccelerationCoefficientProperty |
Use the Dragging Acceleration Coefficient property to set the acceleration of the node controlled by a Scroll View node while you drag that Scroll View node. | |
static PropertyType< float > | DraggingDragCoefficientProperty |
Use the Dragging Drag Coefficient property to set the amount that drag affects the movement of the node controlled by a Scroll View node while you drag that Scroll View node. | |
static PropertyType< float > | DraggingImpulseFactorProperty |
Use the Dragging Impulse Factor property to set the amount of impulse generated from the pointing device movement when dragging a Scroll View node. | |
static PropertyType< float > | SwipeDistanceProperty |
Use the Swipe Distance property to set the distance that a swipe sends the scroll value, relative to the pointing device speed. | |
static PropertyType< Vector2 > | ScrollPositionProperty |
Reports the scroll position of the Scroll View node along the x and y axes as a relative position within the Scroll View area. | |
static PropertyType< Vector2 > | ScrollTargetPositionProperty |
Use the Scroll Target Position property to set the value for the current scroll target. | |
static PropertyType< Vector2 > | ScrollSpeedProperty |
Use the Scroll Speed property to set the current scroll speed. | |
static PropertyType< bool > | ScrollingProperty |
Use the Scrolling property to find out whether a Scroll View node is currently scrolling. | |
static PropertyType< bool > | ZoomAffectsScrollingProperty |
Use the Zoom Affects Scrolling property to set whether the scroll position is scaled according to the zoom level. | |
static PropertyType< Vector2 > | ScrollBoundsMinimumProperty |
Use the Scroll Bounds Minimum property to set the coordinates of the top-left corner of the scroll bounds rectangle. | |
static PropertyType< Vector2 > | ScrollBoundsMaximumProperty |
Use the Scroll Bounds Maximum property to set the coordinates of the bottom-right corner of the scroll bounds rectangle. | |
static PropertyType< bool > | LoopingXEnabledProperty |
Use the Looping X Enabled property to set the node controlled by a Scroll View node to start scrolling from the beginning when the scroll reaches the scroll bounds on the x axis. | |
static PropertyType< bool > | LoopingYEnabledProperty |
Use the Looping Y Enabled property to set the node controlled by a Scroll View node to start scrolling from the beginning when the scroll reaches the scroll bounds on the y axis. | |
static PropertyType< bool > | ZoomEnabledProperty |
Use the Zoom Enabled property to set whether to install a pinch manipulator that generates zoom messages. | |
static PropertyType< float > | ZoomProperty |
Use the Zoom property to set the current zoom level. | |
static PropertyType< float > | ZoomMinimumProperty |
Use the Zoom Minimum property to set the minimum zoom level. | |
static PropertyType< float > | ZoomMaximumProperty |
Use the Zoom Maximum property to set the maximum zoom level. | |
static PropertyType< float > | StepMultiplierProperty |
Use the Step Multiplier property to set the smallest distance that a Scroll View scrolls. | |
static PropertyType< AllowedScrollAxis > | AllowedScrollAxisProperty |
Sets the axis on which you want to allow a Scroll View node to scroll. | |
static PropertyType< bool > | ReversedXAxisScrollProperty |
Indicates whether the direction of touch scrolling is reversed on the x axis. | |
static PropertyType< bool > | ReversedYAxisScrollProperty |
Indicates whether the direction of touch scrolling is reversed on the y axis. | |
Implementation class for ScrollViewConcept.
typedef ScrollViewConceptImpl<TBaseClass, TDerivedClass> kanzi::ScrollViewConceptImpl< TBaseClass, TDerivedClass >::TScrollView |
|
override |
Destructor.
|
explicitprotected |
|
static |
PanManipulatorSharedPtr kanzi::ScrollViewConceptImpl< TBaseClass, TDerivedClass >::getPanManipulator | ( | ) | const |
Returns the pan manipulator.
|
inline |
Gets the value of the RecognitionThresholdProperty.
|
inline |
Sets the value of the RecognitionThresholdProperty.
|
inline |
Gets the value of the MinimumNumberOfTouchesProperty.
|
inline |
Sets the value of the MinimumNumberOfTouchesProperty.
Scroll views with minimum number of touches greater than one will precede the descendants in touch event processing.
|
inline |
Gets the value of the MaximumNumberOfTouchesProperty.
|
inline |
Sets the value of the MaximumNumberOfTouchesProperty.
|
inline |
Gets the value of the SensitivityProperty.
|
inline |
Sets the value of the SensitivityProperty.
|
inline |
Gets the value of the SlidingAccelerationCoefficientProperty.
|
inline |
Sets the value of the SlidingAccelerationCoefficientProperty.
|
inline |
Gets the value of the SlidingDragCoefficientProperty.
|
inline |
Sets the value of the SlidingDragCoefficientProperty.
|
inline |
Gets the value of the DraggingAccelerationCoefficientProperty.
|
inline |
Sets the value of the DraggingAccelerationCoefficientProperty.
|
inline |
Gets the value of the DraggingDragCoefficientProperty.
|
inline |
Sets the value of the DraggingDragCoefficientProperty.
|
inline |
Gets the value of the DraggingImpulseFactorProperty.
|
inline |
Sets the value of the DraggingImpulseFactorProperty.
|
inline |
Gets the value of the SwipeDistanceProperty.
|
inline |
Sets the value of the SwipeDistanceProperty.
|
inline |
Gets the value of the ScrollPositionProperty.
|
inline |
Sets the value of the ScrollPositionProperty.
|
inline |
Gets the value of the ScrollTargetPositionProperty.
|
inline |
Sets the value of the ScrollTargetPositionProperty.
|
inline |
Gets the value of the ScrollSpeedProperty.
|
inline |
Sets the value of the ScrollSpeedProperty.
|
inline |
Gets the value of the ScrollingProperty.
|
inline |
Sets the value of the ScrollingProperty.
bool kanzi::ScrollViewConceptImpl< TBaseClass, TDerivedClass >::isDragging | ( | ) | const |
Checks whether a finger is on the surface.
|
inline |
Gets the value of the ZoomAffectsScrollingProperty.
|
inline |
Sets the value of the ZoomAffectsScrollingProperty.
|
inline |
Gets the value of the ScrollBoundsMinimumProperty.
|
inline |
Sets the value of the ScrollBoundsMinimumProperty.
|
inline |
Gets the value of the ScrollBoundsMaximumProperty.
|
inline |
Sets the value of the ScrollBoundsMaximumProperty.
|
inline |
Sets the value of the LoopingXEnabledProperty.
|
inline |
Sets the value of the LoopingYEnabledProperty.
|
inline |
Gets the value of the LoopingXEnabledProperty.
|
inline |
Gets the value of the LoopingYEnabledProperty.
void kanzi::ScrollViewConceptImpl< TBaseClass, TDerivedClass >::setScrollBoundsX | ( | float | minimum, |
float | maximum ) |
Sets the bounds on the x axis.
When scrolling outside of the bounds, after the scrolling ends, the scroll position converges to the nearest bound value.
minimum | Represents the right edge of a Scroll View. |
maximum | Represents the left edge of a Scroll View. |
void kanzi::ScrollViewConceptImpl< TBaseClass, TDerivedClass >::setScrollBoundsY | ( | float | minimum, |
float | maximum ) |
Sets the bounds on the y axis.
When scrolling outside of the bounds, after the scrolling ends, the scroll position converges to the nearest bound value.
minimum | Represents the bottom edge of a Scroll View. |
maximum | Represents the top edge of a Scroll View. |
void kanzi::ScrollViewConceptImpl< TBaseClass, TDerivedClass >::scrollToPosition | ( | Vector2 | scrollPosition | ) |
Sets the value for the scroll position within a Scroll View and starts scrolling to that value.
Use this function when you have the exact scroll position in a Scroll View and want to scroll to that position. If you enabled the looping for the scroll view, the target value can be out of bounds to indicate direction and repetition.
scrollPosition | The position of the scroll view to which you want to set the scroll view to start scrolling. |
void kanzi::ScrollViewConceptImpl< TBaseClass, TDerivedClass >::scrollToPositionLooping | ( | Vector2 | scrollPosition | ) |
If you enabled the axis looping for a Scroll View, Kanzi uses the shortest path to the target value.
scrollPosition | The position of a Scroll View to which you want to set the Scroll View to start scrolling. |
void kanzi::ScrollViewConceptImpl< TBaseClass, TDerivedClass >::jumpToPosition | ( | Vector2 | scrollPosition | ) |
Sets the value for a scroll position within a Scroll View and goes to that position immediately without scrolling.
scrollPosition | The scroll position to which you want the Scroll View to go without scrolling. |
Vector2 kanzi::ScrollViewConceptImpl< TBaseClass, TDerivedClass >::getScroll | ( | ) | const |
Gets the values of the current scroll position of a Scroll View.
If you enable looping for that Scroll View, the value of the position this function returns is normalized so that it is within the bound interval.
Vector2 kanzi::ScrollViewConceptImpl< TBaseClass, TDerivedClass >::getScrollTarget | ( | ) | const |
Gets the values of the scroll position of a Scroll View to which the Scroll View is scrolling.
Use this function when you want to find out the scrolling position towards which the Scroll View is scrolling. If you enable looping for a Scroll View, the value of the position this function returns can be out of bounds of the Scroll View.
Vector2 kanzi::ScrollViewConceptImpl< TBaseClass, TDerivedClass >::getScrollTargetLooping | ( | ) | const |
When you enable looping, returns the scroll position value normalized to the allowed range of a Scroll View.
Kanzi uses the returned value to set the value of the ScrollTargetPositionProperty.
Vector2 kanzi::ScrollViewConceptImpl< TBaseClass, TDerivedClass >::getSpeed | ( | ) | const |
Queries the interpolator for the current speed.
Kanzi internally uses the returned value to calculate the target scroll position.
void kanzi::ScrollViewConceptImpl< TBaseClass, TDerivedClass >::scroll | ( | ScrollDirection | direction | ) |
Sets the scroll delta to one step and starts scrolling in that direction.
direction | Scroll direction. |
void kanzi::ScrollViewConceptImpl< TBaseClass, TDerivedClass >::scroll | ( | ScrollPage | direction | ) |
Sets the scroll delta to one distance of the layout height of a Scroll View and starts scrolling in that direction.
direction | Scroll direction. |
void kanzi::ScrollViewConceptImpl< TBaseClass, TDerivedClass >::scroll | ( | ScrollEdge | direction | ) |
Sets the scroll target to the edge defined by the scroll bounds and starts scrolling in that direction.
direction | Scroll direction. |
|
inline |
Gets the value of the ZoomEnabledProperty.
|
inline |
Sets the value of the ZoomEnabledProperty.
|
inline |
|
inline |
Sets the value of the ZoomProperty.
value | The new value of the zoom property. |
|
inline |
Gets the value of the ZoomMinimumProperty.
|
inline |
Sets the value of the ZoomMinimumProperty.
|
inline |
Gets the value of the ZoomMaximumProperty.
|
inline |
Sets the value of the ZoomMaximumProperty.
|
inline |
Gets the value of the StepMultiplierProperty.
|
inline |
Sets the value of the StepMultiplierProperty.
|
inline |
Returns the value of the AllowedScrollAxisProperty.
|
inline |
Sets the value of the AllowedScrollAxisProperty.
axis | The axis on which you want to allow scrolling. |
|
inline |
Returns the value of the ReversedXAxisScrollProperty.
|
inline |
Sets the value of the ReversedXAxisScrollProperty.
enable | To reverse the direction of scrolling on the x axis, pass true, otherwise false. |
|
inline |
Returns the value of the ReversedYAxisScrollProperty.
|
inline |
Sets the value of the ReversedYAxisScrollProperty.
enable | To reverse the direction of scrolling on the y axis, pass true, otherwise false. |
void kanzi::ScrollViewConceptImpl< TBaseClass, TDerivedClass >::refreshThreshold | ( | ) |
Updates the recognition threshold of the pan manipulator to the value of the RecognitionThresholdProperty value.
void kanzi::ScrollViewConceptImpl< TBaseClass, TDerivedClass >::enableKeyNavigation | ( | bool | enabled | ) |
Enables directional key navigation on the Scroll View.
enabled | To enable key navigation, pass true. To disable key navigation, pass false. |
|
inlineprotected |
Internal accessor for the Curiously Recurring Template Pattern.
|
inlineprotected |
Internal accessor for the Curiously Recurring Template Pattern.
|
protected |
Assigns the message handlers for the pan manipulator and scroll messages.
|
overrideprotected |
Node::onNodePropertyChanged() implementation.
|
protected |
Kanzi internally uses this helper function to update smooth interpolation coefficients between starting and stopping the interpolator timer, depending on whether a finger is still on a Scroll View node.
|
protected |
Kanzi internally uses this helper function to update the minimum number of touch points of the pan manipulator to the value of the MinimumNumberOfTouchesProperty value.
|
protected |
Kanzi internally updates the maximum number of touch points of the pan manipulator to the value of the MaximumNumberOfTouchesProperty value.