Allows users to scroll and pan through content inside.
A scrolling view can be thought of as a 'window' through which items are viewed. In the following documentation, the 'scrolling view' represents that window. The extent by which the window can be scrolled is referred to as the 'scrolling area'. When using a touch or cursor interface, users can scroll across the content by pressing and holding on the content and moving the cursor in the opposite direction they want to scroll. When using focus to navigate within the scrolling area, the scrolling view will scroll until the item is completely visible or, if the item is larger than the scrolling view, until its top or left edge is aligned with the top or left edge of the scrolling view.
View Template Specification
| Type | Labels | Property | Description |
|---|---|---|---|
| Comment | overpull | Optional | A decimal amount representing the overpull in local units. Will set both horizontal and vertical overpull. Applied before horizontal-overpull and vertical-overpull, has least priority. Default is 0.0 |
| Comment | overpull-rule | Optional | Values can be always, and if-overflowing. Default is if-overflowing. if-overflowing will overpull when there is enough content to scroll in both directions Applied before horizontal-overpull-rule and vertical-overpull-rule, has least priority. |
| Comment | horizontal-overpull | Optional | A decimal amount representing the overpull in local units. Default is 0.0. Will override overpull for the horizontal direction. |
| Comment | horizontal-overpull-rule | Optional | Values can be always, or if-overflowing. Default is if-overflowing. 'if-overflowing will overpull when there is enough content to scroll in the horizontal direction. Will override overpull-rule for the horizontal direction |
| Comment | vertical-overpull | Optional | A decimal amount representing the overpull in composition units. Default is 0.0. Will override overpull for the vertical direction. |
| Comment | vertical-overpull-rule | Optional | Values can be always, or if-overflowing. Default is if-overflowing. if-overflowing will overpull when there is enough content to scroll in the vertical direction. Will override overpull-rule for the vertical direction |
| Comment | scroll | Optional | Values can be true or false. Default is true. Scrolling will occur if there is content available outside of the view in the scroll direction. Applied before horizontal-scroll and vertical-scroll, has least priority. |
| Comment | horizontal-scroll | Optional | Values can be true or false. Default is true. Scrolling will occur if there is content available outside of the view in the scroll direction. Will override scroll in the horizontal direction. |
| Comment | vertical-scroll | Optional | Values can be true or false. Default is true. Scrolling will occur if there is content available outside of the view in the scroll direction. Will override scroll in the vertical direction. |
| Comment | horizontal-carousel | Optional | Values can be never, always, or if-overflowing. Default is never. Represents the carousel mode in the horizontal direction. |
| Comment | vertical-carousel | Optional | Values can be never, always, or if-overflowing. Default is never. Represents the carousel mode in the vertical direction. |
| Comment | horizontal-layout-mode | Optional | A hint for the layout system indicating how the content should be laid out in the horizontal direction. Acceptable values are fit-content, fit-content-if-overflowing and fill-view. Defaults to fit-content-if-overflowing. See the Layout section for details. |
| Comment | vertical-layout-mode | Optional | A hint for the layout system indicating how the content should be laid out in the vertical direction. Acceptable values are fit-content, fit-content-if-overflowing and fill-view. Defaults to fit-content-if-overflowing. See the Layout section for details. |
| Comment | cascade-delay | Optional | A delay, in milliseconds, inserted between timelines within the cascade timeline groups. Defaults to 50 ms. See the 'Cascade Timelines' section for details. |
| Comment | left-magnet-offset | Optional | The offset of the left magnet from the left edge of the view. Takes precedence over horizontal-center-magnet-offset, horizontal-begin-magnet-offset and horizontal-end-magnet-offset. See the Magnets section for details. |
| Comment | right-magnet-offset | Optional | The offset of the right magnet from the right edge of the view. Takes precedence over horizontal-center-magnet-offset, horizontal-begin-magnet-offset and horizontal-end-magnet-offset. See the Magnets section for details. |
| Comment | horizontal-center-magnet-offset | Optional | The offset of the horizontal center magnet from the center of the view. Takes precedence over horizontal-begin-magnet-offset and horizontal-end-magnet-offset. See the Magnets section for details. |
| Comment | horizontal-begin-magnet-offset | Optional | The offset of the horizontal begin magnet from the left edge of the view. Takes precedence over horizontal-end-magnet-offset. See the Magnets section for details. |
| Comment | horizontal-end-magnet-offset | Optional | The offset of the horizontal end magnet from the right edge of the view. See the Magnets section for details. |
| Comment | up-magnet-offset | Optional | The offset of the up magnet from the top edge of the view. Takes precedence over vertical-center-magnet-offset, vertical-begin-magnet-offset and vertical-end-magnet-offset. See the Magnets section for details. |
| Comment | down-magnet-offset | Optional | The offset of the down magnet from the bottom edge of the view. Takes precedence over vertical-center-magnet-offset, vertical-begin-magnet-offset and vertical-end-magnet-offset. See the Magnets section for details. |
| Comment | vertical-center-magnet-offset | Optional | The offset of the vertical center magnet from the center of the view. Takes precedence over vertical-begin-magnet-offset and vertical-end-magnet-offset. See the Magnets section for details. |
| Comment | vertical-begin-magnet-offset | Optional | The offset of the vertical begin magnet from the top edge of the view. Takes precedence over vertical-end-magnet-offset. See the Magnets section for details. |
| Comment | vertical-end-magnet-offset | Optional | The offset of the vertical end magnet from the bottom edge of the view. See the Magnets section for details. |
Child View Template Specification
The following markers or comments, if present within a child of the scrolling view, are used by the scrolling view itself.
| Type | Labels | Property | Description |
|---|---|---|---|
| Marker | Move | Optional | A timeline that is seeked through as the child moves across the scrolling view's visible region. See the 'Move Timelines' section for details. |
| Marker | MoveHorizontal | Optional | A timeline that is seeked through as the child moves horizontally across the scrolling view's visible region. See the 'Move Timelines' section for details. |
| Marker | MoveVertical | Optional | A timeline that is seeked through as the child moves vertically across the scrolling view's visible region. See the 'Move Timelines' section for details. |
| Marker | CascadeIn | Optional | A timeline that is used to generate an 'in' cascade timeline group. See the 'Cascade Timelines' section for details. |
| Marker | CascadeOut | Optional | A timeline that is used to generate an 'out' cascade timeline group. See the 'Cascade Timelines' section for details. |
| Comment | magnetic | Optional | Used on platforms with touch or cursor interfaces. Values can be true or false. By default backgrounds are not magnetic, but all other nodes are. When the scrolling view has at least one magnet configured it will align a magnet with the closest magnetic child. See the 'Magnets' section for more details. |
Layout By default, the placement of the children within the scrolling view defines how large the scrolling area is. However, when a layout is applied to the scrolling view, this behaviour changes: the scrolling area is then defined by the measured size of the scrolling view's content.
The layout applied on the scrolling view is used to calculate the size of the scrolling area. This is equivalent to using the 'fit content' property on a non-scrolling view. Because the size of the scrolling area depends on the size of its content, children of the scrolling view typically cannot be set to 'fill parent'.
In some cases, it is desirable for the content of the scrolling view to be laid out such that it fills the width or the height of the scrolling view. For example, a user may want to use a row layout to align children horizontally while centering them vertically within the scrolling view. This is done by setting the 'layout mode' property. By default, no fill is performed and the scrolling view can scroll in both directions. If the 'layout mode' property is set to 'fill view vertically' or 'fill view horizontally', then the content is allowed to grow up to the dimension of the scrolling view itself. A side effect of doing this is that scrolling in the 'fill' direction is disabled, as the size of the scrolling view in that dimension equals that of the scrolling area. The 'layout mode' can also be set to 'fit content if overflowing'. When in this mode, the scrolling view behaves as if the 'fit content' mode is selected, but the scrolling area does not get smaller than the scrolling view itself.
When a layout is applied to a scrolling view, it affects the placement of the children within the scrollable area, but it does not affect the size of the scrolling view itself. If the scrolling view is itself placed within a view that has a layout, then the layout configuration of the scrolling view may affect the size of the scrolling view (but not of its content). For example, a scrolling view may be placed within a parent container and be set as 'fill parent'. This changes the size of the scrolling view to fill its parent container, thus expanding the size of the 'window'.
When a node is marked as 'background' of a scrolling view, that node's size is set to that of the scrolling area. This means that the node will be expanded to fill the full scrolling area (and likely would be clipped by the scrolling view). This also means that the 'background' would be scrolling within the scrolling view along with the rest of the scrolling view content. If this is undesirable and the background should not be scrolling, then the background should be held outside of the scrolling view within a parent container.
Move Timelines
As children of the scrolling view move across the scrolling view's visisble region, the OnChildMovedInVisibleRegion() function is called along with a normalized position for that child. The normalized position is calculated such that 0.0 represents the child coming into the visible range, and 1.0 represents the child completely exiting the visible range.
For example, consider the following example with children A, B, C and D within scrolling view E. Child A would be considered as having a normalized position of 0.0, child B would have a normalized position of 0.5, child C would have a normalized position of 1.0, and child D would have a larger-than-1.0 normalized position.
+----------------+
| |
+---+ +---+ +---+ +---+
| A | | B | | C | | D |
+---+ +---+ +---+ +---+
| E |
+----------------+
The OnChildMovedInVisibleRegion() function is called only for children that are within the scrolling view's visible range. Thus, child D would not have its normalized position reported as part of a OnChildMovedInVisibleRegion() callback, and A and C would not have their normalized position reported unless they are at least partly in the visible region.
If the children of this scrolling view are scene views and have one of the recognised move timeline markers ('Move', 'MoveHorizontal' or 'MoveVertical'), then those timelines are automatically seeked to the percentage equal to the child's normalized position.
'MoveHorizontal' timelines are seeked to the child's horizontal normalized position. 'MoveVertical' timelines are seeked to the child's vertical normalized position. 'Move' timelines are a convenience timeline whose behaviour depends on the configuration of the scrolling view. If the scrolling view is configured to scroll vertically or horizontall only, then the normalized position in that direction is used to seek the 'Move' timeline. Otherwise, the vertical and horizontal normalized positions are combined to determine the seek position. The effect of the combination is that only the first 'half' of the 'Move' timeline is used, with the first half being played in reverse to handle normalized positions between 0.5 and 1.0.
If the scrolling view is configured to be a carousel and the content is sufficiently small, the same child may be visible in multiple positions within the scrolling view's visible region. Since the child cannot have two visual states, the normalized position that is closest to the center of the scrolling view is chosen. This may result in undesirable visuals.
Magnets can be added to the scrolling view so that items snap to a position as the view is scrolled. A scrolling view scrolled left will have content entering on the left side. If the view is configured with two horizontal magnets the scrolled view will move to align the left magnet and the closest left edge of a magnetic child. Similarly when content enters from the right, top, or bottom while scrolling, the view will align the right, up, and down magnets to the right, top and bottom edge of the closest magnetic child. When the view has a single horizontal center/begin/end magnet the view will snap to the closest center/left/right of a magnetic child. The same is true for a single vertical magnet.
Both horizontal and vertical center magnets will be positioned at the center of the view when the magnet is positoned at 0. For horizontal center magnets, a positive value will move the magnet towards the right edge of the view and a negative value will move the magnet towards the left edge of the view. For vertical center magnets, a positive value will move the magnet towards the bottom edge of the view and a negative value will move the magnet towards the top edge of the view.
Horizontal/vertical begin magnets will be positioned at the left/top of the view when the magnet is positoned at 0. Begin magnets with a positive value will move the magnet towards the center of the view and a negative value will move the magnet away from the center of the view.
Horizontal/vertical end magnets will be positioned at the right/top of the view when the magnet is positoned at 0. Begin magnets with a positive value will move the magnet towards the center of the view and a negative value will move the magnet away from the center of the view.
The 'magnetic' property of each node can be queried using IsMagnetic() and overwritten using EnableMagnetism() and DisableMagnetism().
Cascade Timelines
The scrolling view builds and maintains a pair of timelines known as the cascade timeline groups. The first timeline group is called the 'In' cascade timeline group, and is typically used to animate items into view. The second timeline group is called the 'Out' cascade timeline group, and is typically used to animate items out of view.
These timelines are built using the views that are currently in the visible region of the scrolling view at a given time. Only the visible views with the appropriate timeline markers are considered. For 'in' cascade timeline groups, the 'CascadeIn' timelines are used. For 'out' cascade timeline groups, the 'CascadeOut' timelines are used. These timeline markers are expected to be within the views contained in this scrolling view.
After the cascade timelines for the visible items are obtained, they are combined in the cascade timeline groups. Each timeline is offset from the previous timeline such that the first timeline is played, then the second timeline is played x ms later, then the third timeline is played x ms later and so on. The delay between the starting of the various timelines is configurable using the SetCascadeTimelineGroupDelay() function. Alternatively, subclasses of this class can override the GetTotalCascadeDelayFor() function to provide custom delays.
Because the set of visible items may change over time, the cascade timeline groups are 'refreshed' each time the GetCascadeTimelineGroup() function is called. Thus, it is not advisable to cache the cascade timeline groups. Instead, they should be fetched using the GetCascadeTimelineGroup() function immediately before being played.
If this view has an assigned 'In' timeline, calling CYIAbstractTimeline::StartForward() on it automatically 'plays' the 'In' cascade timeline group. If this view has an assigned 'Out' timeline, calling CYIAbstractTimeline::StartForward() on it automatically 'plays' the 'Out' cascade timeline group.
Limitations in 3D Undesirable visual effects can occur when CYIScrollingView is populated with 3-dimensional content, or is placed into a 3-dimensional scene, under the following conditions:
Clipping should not be disabled when the scrolling view is configured to carousel. In carousel mode, the content of the view is rendered as if it is endlessly repeating in the direction of carousel, however this effect is only guaranteed to work within the confines of the view. If the clipping box does not entirely align with the edges of the view as it appears on screen, the view will overdraw and appear to "pop" its contents in.
The size and position of CYIScrollingView's content (its immediate children) are assumed to be relative to position Z = 0. If the content is moved forward (-Z) or backward (+Z) the calculation of the content size, and the scrolling view's overflow state, may be affected. Only content which logically, through size or scale, overflows the view will be detected as overflowing. For instance moving an image which does not fill the view at Z = 0 forward, until it visually encompasses the view, will not cause the scrolling view to detect that it is now visually overflowing.
Items may be placed visually forward (-Z) or backward (+Z) inside of the CYIScrollingView's content so long as the immediate children of the scrolling view are not offset. When using carousel content which is pushed backward (+Z) may appear to "pop" in at the seams of the repeating content.
#include <view/YiScrollingView.h>

Classes | |
| struct | Magnets |
| struct | ViewAndDistance |
Public Member Functions | |
| CYIScrollingView () | |
| virtual | ~CYIScrollingView () |
| virtual bool | Init () override |
| void | ScrollToHorizontalPosition (float fNormalizedPosition, uint32_t uDurationMs, CYITimeInterpolator *pInterpolator=nullptr) |
| void | ScrollToHorizontalPosition (float fNormalizedPosition) |
| void | ScrollToVerticalPosition (float fNormalizedPosition, uint32_t uDurationMs, CYITimeInterpolator *pInterpolator=nullptr) |
| void | ScrollToVerticalPosition (float fNormalizedPosition) |
| void | ScrollToPosition (const glm::vec2 &fNormalizedPositions, uint32_t uDurationMs=0, CYITimeInterpolator *pInterpolator=nullptr) |
| float | GetHorizontalPosition () const |
| float | GetVerticalPosition () const |
| void | Reveal (CYISceneNode *pNode, uint32_t uDurationMs, CYITimeInterpolator *pInterpolator=nullptr) |
| void | DisableHorizontalScrolling () |
| void | EnableHorizontalScrolling () |
| void | SetHorizontalScrollingEnabled (bool bEnabled) |
| bool | IsHorizontalScrollingEnabled () const |
| void | DisableVerticalScrolling () |
| void | EnableVerticalScrolling () |
| void | SetVerticalScrollingEnabled (bool bEnabled) |
| bool | IsVerticalScrollingEnabled () const |
| void | SetHorizontalOverpullDistance (float fDistance) |
| float | GetHorizontalOverpullDistance () const |
| void | SetVerticalOverpullDistance (float fDistance) |
| float | GetVerticalOverpullDistance () const |
| void | SetHorizontalOverpullRule (OVERPULL_RULE eRule) |
| void | SetVerticalOverpullRule (OVERPULL_RULE eRule) |
| OVERPULL_RULE | GetHorizontalOverpullRule () const |
| OVERPULL_RULE | GetVerticalOverpullRule () const |
| void | SetHorizontalScrollingAreaLayoutMode (LAYOUT_MODE eMode) |
| void | SetVerticalScrollingAreaLayoutMode (LAYOUT_MODE eMode) |
| LAYOUT_MODE | GetHorizontalScrollingAreaLayoutMode () const |
| LAYOUT_MODE | GetVerticalScrollingAreaLayoutMode () const |
| bool | HasHorizontalOverflow () const |
| bool | HasVerticalOverflow () const |
| const CYIAABB & | GetScrollableRegion () const |
| void | StopScrolling () |
| void | StopHorizontalScrolling () |
| void | StopVerticalScrolling () |
| void | SetHorizontalCarouselRule (CAROUSEL_RULE eCarouselRule) |
| void | SetVerticalCarouselRule (CAROUSEL_RULE eCarouselRule) |
| CAROUSEL_RULE | GetHorizontalCarouselRule () const |
| CAROUSEL_RULE | GetVerticalCarouselRule () const |
| void | SetCascadeTimelineGroupDelay (uint32_t uDelayMs) |
| uint32_t | GetCascadeTimelineGroupDelay () const |
| CYITimelineGroup * | GetCascadeTimelineGroup (TIMELINE_TYPE eType=TIMELINE_IN) |
| bool | IsInVisibleRegion (CYISceneNode *pCandidate) const |
| void | SetHorizontalMagnets (const Magnets &magnets) |
| void | RemoveHorizontalMagnets () |
| Magnets | GetHorizontalMagnets () const |
| void | SetHorizontalSwipeOneItemEnabled (bool bSwipeOneItem) |
| bool | IsHorizontalSwipeOneItemEnabled () const |
| void | SetVerticalMagnets (const Magnets &magnets) |
| void | RemoveVerticalMagnets () |
| Magnets | GetVerticalMagnets () const |
| void | SetVerticalSwipeOneItemEnabled (bool bSwipeOneItem) |
| bool | IsVerticalSwipeOneItemEnabled () const |
| void | EnableMagnetism (CYISceneNode *pNode) |
| void | DisableMagnetism (CYISceneNode *pChild) |
| bool | IsMagnetic (const CYISceneNode *pNode) const |
| bool | IsScrollingHorizontally () const |
| bool | IsScrollingVertically () const |
| float | GetHorizontalTrackpadLeaveFriction () const |
| void | SetHorizontalTrackpadLeaveFriction (float fFriction) |
| float | GetVerticalTrackpadLeaveFriction () const |
| void | SetVerticalTrackpadLeaveFriction (float fFriction) |
| virtual void | BuildDrawList (std::vector< IYIRenderer::Command > &children, CYIAbstractCameraSceneNode *pCameraToDrawWith=nullptr) override |
| virtual bool | HandlesFocusInDescendants () const override |
| virtual bool | ContainsFocusableDescendant (const CYIFocusSearchOptions &options=CYIFocusSearchOptions()) const override |
| virtual bool | RequestFocus (CYIFocus::FOCUS_DIRECTION eDirection=CYIFocus::FOCUS_FORWARD, CYIFocus::FOCUS_ROOT_RULE eFocusRootRule=CYIFocus::FOCUS_ROOT_DESCENDANTS_UPDATE_CONTEXT, const CYIAABB &previousFocusRect=CYIAABB(), const CYIFocusSearchOptions &options=CYIFocusSearchOptions()) override |
| virtual CYISceneView * | FindNextFocusInDescendants (const CYISceneView *pCurrentFocusView, CYIFocus::FOCUS_DIRECTION eDirection, CYIAABB &screenSpaceFocusRegion, const CYIFocusSearchOptions &options=CYIFocusSearchOptions()) const override |
| virtual void | FocusChangedInDescendants () override |
| virtual void | FocusGainedInDescendants () override |
Public Member Functions inherited from CYISceneView | |
| CYISceneView () | |
| virtual | ~CYISceneView () |
| bool | BuildFromTemplate (CYISceneManager *pSceneManager, const std::shared_ptr< CYIAssetViewTemplate > &pAssetViewTemplate, CYISceneManager::MISSING_CLASS_HANDLING_MODE eMissingHandlingMode=CYISceneManager::ABORT) |
| bool | IsInitialized () const |
| void | SetClippingAreaNode (CYISceneNode *pClippingNode) |
| virtual bool | GetProperty (const CYIString &propertyName, CYIString *pValue) const override |
| void | EnableDefaultHitZone () |
| bool | IsResponsiveLayoutEnabled () const |
| void | EnableResponsiveLayout () |
| void | DisableResponsiveLayout () |
| void | AddAnchor (YI_ANCHOR_TYPE anchorType) |
| YI_ANCHOR_DATA | GetAnchor (YI_ANCHOR_TYPE anchorType) const |
| virtual const CYISceneView::AssetRequirement * | GetAssetRequirements (uint32_t *pRequirementCount) |
| CYIAbstractTimeline * | GetInTimeline () const |
| CYIAbstractTimeline * | GetOutTimeline () const |
| CYIAbstractTimeline * | GetFocusInTimeline () const |
| CYIAbstractTimeline * | GetFocusOutTimeline () const |
| bool | HasFocus () const |
| void | SetFocusable (bool bFocusable) |
| bool | IsFocusable () const |
| bool | CanBeFocused () const |
| void | SetNextFocus (CYISceneView *pView, CYIFocus::FOCUS_DIRECTION eDirection) |
| CYISceneView * | GetNextFocus (CYIFocus::FOCUS_DIRECTION eDirection) const |
| void | SetInitiallyFocusedView (CYISceneView *pView) |
| CYISceneView * | GetInitiallyFocusedView () const |
| CYISceneView * | FindNextFocus (CYIFocus::FOCUS_DIRECTION eDirection, const CYIFocusSearchOptions &options=CYIFocusSearchOptions()) const |
| CYISceneView * | FindNextFocus (CYIFocus::FOCUS_DIRECTION eDirection, CYIAABB &screenSpaceFocusRegion, const CYIFocusSearchOptions &options=CYIFocusSearchOptions()) const |
| const CYISceneNode * | GetFocusRoot () const |
| CYISceneView * | GetFocusHandler () const |
| virtual void | OnFocusGained () |
| virtual void | FocusGained () |
| virtual void | OnFocusLost () |
| virtual void | FocusLost () |
| const std::shared_ptr< CYIAssetViewTemplate > & | GetViewTemplate () const |
| const std::vector< CYIString > & | GetChildTemplateNames () |
| virtual CYIAbstractTimeline * | GetTimeline (const CYIString &rMarkerName, TIMELINE_GET_MODE eMode=GET_DEFAULT) |
| CYIAbstractTimeline * | GetTimeline (CYIMarkerData::MARKER_ID eID, TIMELINE_GET_MODE eMode=GET_DEFAULT) |
| std::map< CYIString, CYITimeline * > | GetTimelines () const |
| bool | FindTimeline (CYIAbstractTimeline *&pTimeline, const CYIString &markerName, FETCH_TYPE eType, const CYIString &tag="", TIMELINE_GET_MODE eMode=GET_DEFAULT) |
| CYITimelineGroup * | GetTimelineGroup (const CYIString &markerName) |
| std::unique_ptr< CYITimelineGroup > | BuildTimelineGroup (const CYIString &markerName) |
| void | BuildAnchorList () |
| virtual void | Reset () |
| void | SetLayout (std::unique_ptr< CYILayout > pLayout) |
| const CYILayout * | GetLayout () const |
| CYILayout * | GetLayout () |
Public Member Functions inherited from CYISceneNode | |
| CYISceneNode () | |
| virtual | ~CYISceneNode () |
| void | ForceDirty () |
| void | ClearDirtyFlag () |
| void | SetDirtyFlag (DirtyFlag eDirtyFlag) |
| DirtyFlag | GetDirtyFlag () const |
| DirtyFlag | GetPreviousDirtyFlag () const |
| const CYIString & | GetName () const |
| CYIString | GetUniqueName () const |
| void | SetSceneManager (CYISceneManager *pSceneManager) |
| void | SetName (const CYIString &name) |
| int32_t | GetID () const |
| void | SetID (int32_t nID) |
| uint64_t | GetUniqueID () const |
| bool | AddChild (std::unique_ptr< CYISceneNode > pSceneNode) |
| bool | AddChild (std::unique_ptr< CYISceneNode >, int32_t nIndex) |
| bool | InsertChildAfter (CYISceneNode *pRefNode, std::unique_ptr< CYISceneNode > pSceneNode) |
| std::unique_ptr< CYISceneNode > | RemoveChild (CYISceneNode *pSceneNode) |
| bool | ReorderChild (uint32_t uFromIndex, uint32_t uToIndex) |
| CYISceneNode * | GetParent () const |
| bool | ChangeParent (CYISceneNode *pParent) |
| CYISceneNode * | GetDrawParent () const |
| bool | IsAncestorOf (const CYISceneNode *pNode) const |
| CYISceneManager * | GetSceneManager () const |
| uint32_t | GetChildCount () const |
| uint32_t | GetChildCountRecursive () const |
| CYISceneNode * | GetChild (uint32_t nIndex) const |
| Iterator | begin (Iterator::ITERATION_MODE eMode=Iterator::IMMEDIATE_CHILDREN) const |
| Iterator | end (Iterator::ITERATION_MODE eMode=Iterator::IMMEDIATE_CHILDREN) const |
| ReverseIterator | rbegin (Iterator::ITERATION_MODE eMode=Iterator::IMMEDIATE_CHILDREN) const |
| ReverseIterator | rend (Iterator::ITERATION_MODE eMode=Iterator::IMMEDIATE_CHILDREN) const |
| CYISceneNode * | GetChild (const CYIString &sName) const |
| uint32_t | GetDrawChildCount () const |
| CYISceneNode * | GetDrawChild (uint32_t uIndex) const |
| CYISceneNode * | GetDrawChildByID (int32_t nID) const |
| template<class YI_SCENE_NODE_SUBCLASS > | |
| YI_SCENE_NODE_SUBCLASS * | GetChild (uint32_t uTargetMatchedNodeCount=1) const |
| template<class YI_SCENE_NODE_SUBCLASS > | |
| std::list< YI_SCENE_NODE_SUBCLASS * > | GetChildren () const |
| int32_t | GetIndexOfChild (const CYISceneNode *pSceneNode) const |
| void | Show () |
| void | Hide () |
| void | SetVisibility (bool bVisible) |
| void | SetOpacity (float fOpacity) |
| float | GetCompositeOpacity () const |
| float | GetLocalOpacity () const |
| bool | IsVisible () const |
| bool | IsTrulyVisible () const |
| CYISceneNode * | GetNode (const CYIString &name) |
| CYISceneNode * | GetNode (const CYIString &name, const CYIRuntimeTypeInfo &enforceClassType) |
| CYISceneNode * | GetNode (const CYIRuntimeTypeInfo &enforceClassType) |
| CYISceneNode * | GetNodeAfterTarget (const CYIRuntimeTypeInfo &enforceClassType, CYISceneNode *pStartAfterTarget) |
| template<class YI_SCENE_NODE_SUBCLASS > | |
| YI_SCENE_NODE_SUBCLASS * | GetNode (const CYIString &name) |
| CYISceneNode * | GetNode (const int32_t nID) |
| CYISceneNode * | GetNode (const int32_t nID, const CYIRuntimeTypeInfo &enforceClassType) |
| template<class YI_SCENE_NODE_SUBCLASS > | |
| bool | FindNode (YI_SCENE_NODE_SUBCLASS *&pNode, const CYIString &nodeName, FETCH_TYPE eType, const CYIString &tag) |
| std::list< CYISceneNode * > | GetNodes (const CYIString &name) |
| std::list< CYISceneNode * > | GetNodes (int32_t nID) |
| std::list< CYISceneNode * > | GetNodes (const CYIRuntimeTypeInfo &enforceClassType) |
| template<class YI_SCENE_NODE_SUBCLASS > | |
| const YI_SCENE_NODE_SUBCLASS * | GetNode (uint32_t uTargetMatchedNodeCount=1) const |
| template<class YI_SCENE_NODE_SUBCLASS > | |
| YI_SCENE_NODE_SUBCLASS * | GetNode (uint32_t uTargetMatchedNodeCount=1) |
| void | SetMesh (const std::shared_ptr< CYIMesh > &pMesh) |
| void | SetMaterial (const std::shared_ptr< CYIMaterial > &pMaterial, uint32_t nIndex=0) |
| void | AddEffect (const std::shared_ptr< CYIEffect > &pEffect) |
| void | RemoveEffect (const std::shared_ptr< CYIEffect > &pEffect) |
| uint32_t | GetEffectCount () const |
| std::shared_ptr< CYIEffect > | GetEffect (uint32_t uIndex) const |
| void | ConnectEffectsToTimelines (const CYITimelineTrack *pTrack) |
| void | AddMask (std::unique_ptr< CYIMask > pMask) |
| std::unique_ptr< CYIMask > | RemoveMask (const CYIMask *pMask) |
| uint32_t | GetMaskCount () const |
| const CYIMask * | GetMask (uint32_t uIndex) const |
| CYIMask * | GetMask (uint32_t uIndex) |
| const std::shared_ptr< CYIMesh > & | GetMesh () const |
| uint32_t | GetMaterialCount () const |
| const std::shared_ptr< CYIMaterial > | GetMaterial (uint32_t nIndex=0) const |
| const std::shared_ptr< IYIUniformBufferObject > & | GetShaderUniforms () const |
| void | SetMeshTransform (const glm::mat4 &rTransform) |
| void | DestroyChildren () |
| const glm::mat4 & | GetLocalTransform () const |
| const glm::mat4 & | GetEffectTransform () const |
| const glm::mat4 & | GetWorldTransform () const |
| bool | Intersects (const CYISceneNode *pNode) const |
| void | SetRenderTarget (const std::shared_ptr< CYIRenderTarget > &pRenderTarget) |
| const std::shared_ptr< CYIRenderTarget > | GetRenderTarget () const |
| const CYIAABB & | GetWorldAABB () const |
| const CYIAABB & | GetLocalAABB () const |
| void | SetAnchorPoint (const glm::vec3 &ref) |
| void | SetAnchorPoint (float fX, float fY, float fZ) |
| void | SetAnchorPointX (float fX) |
| void | SetAnchorPointY (float fY) |
| void | SetAnchorPointZ (float fZ) |
| void | SetPosition (const glm::vec3 &ref) |
| void | SetPosition (float fX, float fY, float fZ) |
| void | SetPositionX (float fX) |
| void | SetPositionY (float fY) |
| void | SetPositionZ (float fZ) |
| void | SetRotation (const glm::vec3 &fEulerDegrees) |
| void | SetRotation (float fPitchDegrees, float fYawDegrees, float fRollDegrees) |
| void | SetRotationX (float fPitchDegrees) |
| void | SetRotationY (float fYawDegrees) |
| void | SetRotationZ (float fRollDegrees) |
| void | SetOrientation (float fPitchDegrees, float fYawDegrees, float fRollDegrees) |
| void | SetOrientation (const glm::quat &orient) |
| void | SetScale (const glm::vec3 &fScaleFactors) |
| void | SetScale (float fFactorX, float fFactorY, float fFactorZ) |
| void | SetScaleX (float fFactor) |
| void | SetScaleY (float fFactor) |
| void | SetScaleZ (float fFactor) |
| const glm::vec3 & | GetPosition () const |
| const glm::vec3 & | GetScale () const |
| const glm::vec3 & | GetWorldScale () const |
| const glm::vec3 & | GetWorldSurfaceScale () const |
| const glm::vec3 & | GetRotation () const |
| const glm::quat & | GetOrientation () const |
| const glm::vec3 & | GetAnchorPoint () const |
| virtual void | SetSize (const glm::vec3 &vSize, bool bDirtyLayout=true) |
| const glm::vec3 & | GetSize () const |
| const glm::vec3 & | GetInitialSize () const |
| void | SetMeasuredSize (const glm::vec3 &vMeasuredSize) |
| const glm::vec3 & | GetMeasuredSize () const |
| void | SetInternalCustomTimelineValue (uint32_t nTrackID, const CYIVariant &value) |
| virtual void | SetCustomTimelineValue (uint32_t nTrackID, const CYIVariant &value) |
| void | SetClippingOn () |
| void | SetClippingOff () |
| bool | GetClipping () const |
| void | SetClippingBox (const CYIAABB &rWorldBox) |
| const CYIAABB & | GetClippingBox () const |
| void | StartPropertyAnimation (YI_NODE_PROPERTY_TYPE ePropType, float fFrom, float fTo, uint32_t nDurMs, CYITimeInterpolator *pTimeInterpolator=nullptr, bool bDirtyLayout=true) |
| void | StopPropertyAnimation (YI_NODE_PROPERTY_TYPE ePropType) |
| void | UpdateLocalSpaceCollision (CYIActionEvent *pActionEvent) |
| void | UpdateEventForLocalSpace (CYIActionEvent *pActionEvent, glm::vec3 &rayOrigin, glm::vec3 &rayNonOriginPoint) const |
| bool | IsBoundingBoxHit (const CYIRay &rWorldSpaceRay) const |
| bool | IsMeshHit (const CYIRay &rWorldSpaceRay) const |
| void | DumpTree () const |
| void | StartCaptureKeyboardEvents () |
| void | StopCaptureKeyboardEvents () |
| void | StartCaptureTrackpadEvents () |
| void | StopCaptureTrackpadEvents () |
| void | StartCapturePointerEvents (uint8_t uPointerID) |
| void | StopCapturePointerEvents (uint8_t uPointerID) |
| bool | DrawBehindChildren (CYISceneNode *pSceneNode) |
| bool | DrawInFrontOfChildren (CYISceneNode *pSceneNode) |
| bool | DrawBehind (CYISceneNode *pSceneNode) |
| bool | DrawInFront (CYISceneNode *pSceneNode) |
| bool | IsFocusRoot () const |
| void | SetIsFocusRoot (bool bIsFocusRoot) |
| virtual void | OnFocusGainedInDescendants () |
| virtual void | OnFocusLostInDescendants () |
| virtual void | FocusLostInDescendants () |
| virtual void | OnFocusChangedInDescendants () |
| void | ShowPointerDebugNode (CYIActionEvent *pActionEvent) |
| void | SetUseLocalTransformAndAlpha (bool bUse) |
| virtual const std::map< CYIString, CYIString > & | GetProperties () const override |
| void | SetProperty (const CYIString &rPropertyName, const CYIString &rPropertyValue) |
| const std::shared_ptr< CYISceneNodeProxy > & | GetSceneNodeProxy () const |
| void | SetLayoutConfig (std::unique_ptr< CYILayoutConfig > pLayoutConfig) |
| const CYILayoutConfig * | GetLayoutConfig (LayoutConfigFetchMode eFetchMode=LAYOUT_CONFIG_LAZY_INSTANTIATE) const |
| CYILayoutConfig * | GetLayoutConfig (LayoutConfigFetchMode eFetchMode=LAYOUT_CONFIG_LAZY_INSTANTIATE) |
| void | SetLayoutState (std::unique_ptr< CYILayoutState > pLayoutState) |
| const CYILayoutState * | GetLayoutState () const |
| CYILayoutState * | GetLayoutState () |
| void | RequestLayout () |
| LayoutDirtyFlag | GetLayoutDirtyFlag () const |
| virtual void | SetLayoutDirtyFlag (LayoutDirtyFlag eFlag) |
| CYIAbstractCameraSceneNode * | FindActiveCamera () const |
| template<typename T > | |
| bool | CanCastTo () const |
Public Member Functions inherited from CYIEventTarget | |
| CYIEventTarget () | |
| virtual | ~CYIEventTarget () |
| bool | AddEventListener (YI_EVENT_TYPE eEventType, CYIEventHandler *pListener, EVENT_PHASE ePhase=BUBBLE) |
| bool | RemoveEventListener (YI_EVENT_TYPE eEventType, CYIEventHandler *pListener, EVENT_PHASE ePhase=BUBBLE) |
| void | SetSpecialTypeFlag (YI_SPECIAL_EVENT_TARGET_TYPE eType) |
| void | ClearSpecialTypeFlag (YI_SPECIAL_EVENT_TARGET_TYPE eType) |
| YI_SPECIAL_EVENT_TARGET_TYPE | GetSpecialTypes () const |
Public Member Functions inherited from CYIScriptableRTTIObject | |
| CYIScriptableRTTIObject () | |
| virtual | ~CYIScriptableRTTIObject () |
| virtual const CYIRuntimeTypeInfo * | GetRuntimeTypeInfoForScriptObject () const override |
Public Member Functions inherited from CYIScriptableObject | |
| CYIScriptableObject () | |
| CYIScriptableObject (const CYIScriptableObject &other) | |
| CYIScriptableObject & | operator= (const CYIScriptableObject &other) |
| virtual | ~CYIScriptableObject () |
| CYIBindingImplementation * | GetBindingImplementation () const |
| void | SetBindingImplementation (CYIBindingImplementation *pBindingImplementation) |
Public Member Functions inherited from CYISignalHandler | |
| CYISignalHandler () | |
| CYISignalHandler (const CYISignalHandler &rSignalHandler) | |
| virtual | ~CYISignalHandler () |
| CYISignalHandler & | operator= (const CYISignalHandler &rSignalHandler) |
| void | MoveToThread (CYIThread *pThread) |
| This function allows the user to override the default thread affinity to any CYIThread that may or may not be running. More... | |
| CYIThreadHandle | GetThreadAffinity () const |
| void | SetThreadAffinity (const CYIThreadHandle &rThreadAffinity) |
| virtual bool | IsConnected () const |
| virtual bool | IsConnected (const CYISignalBase &rSignal) const |
| void | Disconnect (CYISignalBase &rSignal) |
| void | DisconnectFromAllSignals () |
Public Member Functions inherited from CYIThread::Listener | |
| Listener () | |
| virtual | ~Listener () |
| virtual void | OnThreadStarted (CYIThread *) |
| virtual void | OnThreadTerminated (CYIThread *) |
| virtual void | OnThreadFinished (CYIThread *) |
Public Member Functions inherited from IYIPropertiesSource | |
| virtual | ~IYIPropertiesSource () |
Public Member Functions inherited from CYIEventHandler | |
| CYIEventHandler () | |
| CYIEventHandler (const CYIEventHandler &) | |
| virtual | ~CYIEventHandler () |
| CYIEventHandler & | operator= (const CYIEventHandler &) |
| bool | RegisterEventFilter (CYIEventFilter *pFilter) |
| bool | UnregisterEventFilter (CYIEventFilter *pFilter) |
| bool | PreFilter (const std::shared_ptr< CYIEventDispatcher > &pDispatcher, CYIEvent *pEvent) |
| bool | PostFilter (const std::shared_ptr< CYIEventDispatcher > &pDispatcher, CYIEvent *pEvent) |
| bool | AreEventsEnabled () const |
| void | EnableEvents (bool bEnable) |
Public Member Functions inherited from CYIScrollController::ScrollListener | |
| virtual | ~ScrollListener () |
Protected Types | |
| enum | DIRECTION { HORIZONTAL, VERTICAL, DIRECTION_MAX } |
| enum | SCROLL_DIRECTION { SCROLL_CLOSEST, SCROLL_FORWARD, SCROLL_REVERSE } |
Protected Member Functions | |
| CYIScrollController * | GetScrollController (DIRECTION eDirection) const |
| void | ConfigureScrollControllers () |
| virtual bool | BroadcastEvent (const std::shared_ptr< CYIEventDispatcher > &pDispatcher, CYIEvent *pEvent) override |
| void | ConfigureScrollingRange (DIRECTION eDirection, float fContentSize) |
| void | ConfigureOverpull (DIRECTION eDirection, float fViewSize) |
| void | ConfigureMagnets (DIRECTION eDirection, float fViewSize, float fOldViewSize) |
| virtual void | ParseProperties () |
| virtual bool | HandleEvent (const std::shared_ptr< CYIEventDispatcher > &pEventDispatcher, CYIEvent *pEvent) override |
| virtual void | Measure (const MeasureSpec &widthSpec, const MeasureSpec &heightSpec, const MeasureSpec &depthSpec) override |
| virtual void | ApplyMeasurements () override |
| virtual void | SizeChanged () override |
| virtual void | WorldBoundingBoxUpdated () override |
| virtual void | ChildAdded (CYISceneNode *pChild) override |
| virtual void | ChildRemoved (CYISceneNode *pChild) override |
| virtual void | Reveal (CYISceneNode *pNode, uint32_t uDurationMs, SCROLL_DIRECTION eHorizontalDirection, SCROLL_DIRECTION eVerticalDirection, CYITimeInterpolator *pInterpolator=nullptr) |
| virtual CYIAABB | CalculateScrollableRegion () const |
| CYIAABB | CalculateContentSize () const |
| bool | IsInExpandedVisibleRegion (CYISceneNode *pCandidate, float fVisibleRegionMultiplier) const |
| void | CheckAndNotifyVisibilityInVisibilityRegion (CYISceneNode *pChild) |
| virtual void | ChildVisibilityInVisibleRegionChanged (CYISceneNode *pChild, bool bIsInVisibleRegion) |
| virtual void | OnChildVisibilityInVisibleRegionChanged (CYISceneNode *pChild, bool bIsInVisibleRegion) |
| virtual void | ChildMovedInVisibleRegion (CYISceneNode *pChild, const glm::vec2 &normalizedPosition) |
| virtual void | OnChildMovedInVisibleRegion (CYISceneNode *pChild, const glm::vec2 &normalizedPosition) |
| virtual void | OnScrollAuto (CYIScrollController *pController) override |
| virtual void | OnScrollStarted (CYIScrollController *pController) override |
| virtual void | OnScrolled (CYIScrollController *pController, YI_SCROLLED_INFO scrolledInfo) override |
| virtual void | OnScrollEnded (CYIScrollController *pController) override |
| virtual void | UpdateEnd () override |
| bool | IsCarouseling (DIRECTION eDirection) const |
| CYITimelineGroup * | GetCascadeTimelineGroup (TIMELINE_TYPE eType, bool bUpdateTimeline) |
| virtual CYIAbstractTimeline * | GetCascadeTimelineFor (TIMELINE_TYPE eType, CYISceneView *pView) |
| virtual std::map< CYISceneView *, uint64_t > | GetTotalCascadeDelayFor (TIMELINE_TYPE eType, const std::vector< ViewAndDistance > &visibleViews) |
Protected Member Functions inherited from CYISceneView | |
| void | UpdateClipping () |
| virtual void | WorldScaleUpdated () override |
| virtual void | OnViewReflowed (const glm::vec3 &worldScale) |
| virtual void | ViewReflowed (const glm::vec3 &worldScale) |
| virtual bool | ProcessEvent (const std::shared_ptr< CYIEventDispatcher > &pDispatcher, CYIEvent *pEvent) override |
| void | UpdateResponsiveLayoutAnchors () |
| virtual void | ChildNeedsLayout () override |
| virtual void | LayoutDirtied () override |
| virtual void | ChildVisibilityChanged (CYISceneNode *pChild) override |
| void | OnViewIsInAnimatedPosition () |
| void | OnViewIsGoingOutOfAnimatedPosition () |
| void | SetInTimeline (CYIAbstractTimeline *pTimeline) |
| void | SetOutTimeline (CYIAbstractTimeline *pTimeline) |
| virtual void | OnInit () |
| bool | TryRequestFocusOnInitiallyFocusedView () |
Protected Member Functions inherited from CYISceneNode | |
| void | Update (bool bForceDirty=false) |
| virtual void | OnUpdateBegin () |
| virtual void | UpdateBegin () |
| virtual void | OnUpdateEnd () |
| virtual void | OnDirtyFlagChanged () |
| virtual void | DirtyFlagChanged () |
| virtual void | OnTransformUpdated () |
| virtual void | TransformUpdated () |
| virtual void | OnWorldScaleUpdated () |
| virtual void | OnWorldSurfaceScaleUpdated () |
| virtual void | WorldSurfaceScaleUpdated () |
| virtual void | OnVisibilityUpdated () |
| virtual void | VisibilityUpdated () |
| virtual void | OnCompositeOpacityUpdated () |
| virtual void | CompositeOpacityUpdated () |
| virtual void | OnWorldBoundingBoxUpdated () |
| virtual void | OnLocalBoundingBoxUpdated () |
| virtual void | LocalBoundingBoxUpdated () |
| virtual void | OnChildAdded (CYISceneNode *pChild) |
| virtual void | OnChildRemoved (CYISceneNode *pChild) |
| virtual void | OnSizeChanged () |
| virtual void | CalculateLocalTransform (glm::mat4 *pTransform) const |
| virtual void | OnChildVisibilityChanged (CYISceneNode *pChild) |
| LayoutDirtyFlag | GetCurrentLayoutDirtyFlag () const |
| virtual CYIString | GetDumpTreeString () const |
| void | DumpTree (int32_t nIndentLevel) const |
| void | SetShaderUniforms () |
| virtual void | SetCustomUniforms () |
| template<class T > | |
| void | SetNodeType () |
| virtual CYISceneNode * | GetNodeFromChildren (const CYIString &name) |
| virtual CYISceneNode * | GetNodeFromChildren (const int32_t nID) |
| virtual CYISceneNode * | GetNodeFromChildren (const CYIRuntimeTypeInfo &enforceClassType) |
| CYISceneNode * | GetNodeFromChildrenAfterTarget (const CYIRuntimeTypeInfo &enforceClassType, bool *pbTargetReached, CYISceneNode *pStartAfterTarget) |
Protected Member Functions inherited from CYIScriptableRTTIObject | |
| virtual std::pair< const CYIRuntimeTypeInfo *, const void * > | GetRuntimeTypeInfoWithObject () const =0 |
Static Protected Member Functions | |
| static const CYIString & | DirectionToString (DIRECTION eDirection) |
Additional Inherited Members | |
Static Public Member Functions inherited from CYISceneView | |
| static void | RegisterAllViews () |
Static Public Member Functions inherited from CYISceneNode | |
| static void | RegisterAllSceneNodes () |
Static Public Attributes inherited from CYISceneNode | |
| static const float | OPACITY_NOT_VISIBLE_EPSILON |
|
protected |
|
protected |
| Enumerator | |
|---|---|
| SCROLL_CLOSEST |
When revealing an item using CYIScrollingView::Reveal or scrolling to an item using CYIScrollingView::ScrollToHorizontalPosition or CYIScrollingView::ScrollToVerticalPosition, indicates that the view should take the shortest path to the item. |
| SCROLL_FORWARD |
When revealing an item using CYIScrollingView::Reveal or scrolling to an item using CYIScrollingView::ScrollToHorizontalPosition or CYIScrollingView::ScrollToVerticalPosition, indicates that the view should take the forward direction (right, down) even if that means wrapping through the content in a carousel. |
| SCROLL_REVERSE |
When revealing an item using CYIScrollingView::Reveal or scrolling to an item using CYIScrollingView::ScrollToHorizontalPosition or CYIScrollingView::ScrollToVerticalPosition, indicates that the view should take the reverse direction (left, up) even if that means wrapping through the content in a carousel. |
| CYIScrollingView::CYIScrollingView | ( | ) |
|
virtual |
|
overrideprotectedvirtual |
Applies the measured sizes of this node's children.
Reimplemented from CYISceneView.
Reimplemented in CYIListView.
|
overrideprotectedvirtual |
Recursively broadcasts an event to the node's children, then offers it to the node itself.
Reimplemented from CYISceneNode.
|
overridevirtual |
Interal use only, this function will construct the list of render actions required to render the data contained in the subtree rooted at this node. Specify the camera used to draw with pCameraToDrawWith. The camera must be a draw-child of the node and be visible.
Reimplemented from CYISceneView.
|
protected |
Calculates the region (in terms of size) encompassed by the children of this scrolling view.
Hidden nodes are excluded. This view's camera is also excluded. If all children are hidden, or no viable children exist, a 0-sized AABB at (0,0) will be returned. If there are visible children, the bounding box may not necessarily contain the point (0,0).
|
protectedvirtual |
The default implementation returns the bounding box encompassing the entirety of the "size" our immediate content (children) and ourselves. This differs from the world bounding box in that children of children are not included.
Subclasses may override this function to provide a custom scrollable region calculation.
|
protected |
Checks if pChild is within the visible region and emits the ChildEnteredVisibleRegion and ChildLeftVisibleRegion signals if required. This function has no effect if pChild is not a direct child of this scrolling view.
|
overrideprotectedvirtual |
Called when a child is added. If pChild is in the visible area the CYIScrollingView::ChildEnteredVisibleRegion signal will be emmited on the next update.
Reimplemented from CYISceneView.
|
protectedvirtual |
Reimplemented in CYIListView.
|
overrideprotectedvirtual |
Called when a child is removed. If pChild is in the visible area the CYIScrollingView::ChildLeftVisibleRegion signal will be emmited.
Reimplemented from CYISceneView.
|
protectedvirtual |
A function called when the visibility of a child within the visible region changes.
Reimplemented in CYIListView.
|
protected |
|
protected |
|
protected |
Calls ConfigureScrollingRange and ConfigureOverpull for each DIRECTION.
|
protected |
|
overridevirtual |
Returns true if this view contains any descendants which can receive focus.
This override only considers descendants which are within the screen space for the view.
Reimplemented from CYISceneNode.
Returns the string representation of the provided enum value eDirection.
| void CYIScrollingView::DisableHorizontalScrolling | ( | ) |
Disables scrolling on the horizontal axis. Scrolling is enabled by default.
| void CYIScrollingView::DisableMagnetism | ( | CYISceneNode * | pChild | ) |
| void CYIScrollingView::DisableVerticalScrolling | ( | ) |
Disables scrolling on the vertical axis. Scrolling is enabled by default.
| void CYIScrollingView::EnableHorizontalScrolling | ( | ) |
Enables scrolling on the horizontal axis. Scrolling is enabled by default.
| void CYIScrollingView::EnableMagnetism | ( | CYISceneNode * | pNode | ) |
Enable pNode to be snapped to when the scrolling view is configured with at least one magnet. Every CYISceneNode is magnetic by default.
| void CYIScrollingView::EnableVerticalScrolling | ( | ) |
Enables scrolling on the vertical axis. Scrolling is enabled by default.
|
overridevirtual |
Handle focus changes within this view. This will initiate a focus search within this view, considering all descendants. Scrolling will override screenSpaceFocusRegion, this box should be used for future focus searches.
Reimplemented from CYISceneView.
|
overridevirtual |
Scrolls to reveal the newly focused item if necessary.
Reimplemented from CYISceneNode.
|
overridevirtual |
Scrolls to reveal the newly focused item if necessary.
Reimplemented from CYISceneNode.
|
protectedvirtual |
Returns the cascade timeline of type eType for view pView. When eType is TIMELINE_IN, the timeline with marker name 'CascadeIn' is returned. When eType is TIMELINE_OUT, the timeline with marker name 'CascadeOut' is returned. This function returns nullptr if the relevant timeline could not be located in pView.
Reimplemented in CYIListView.
| CYITimelineGroup* CYIScrollingView::GetCascadeTimelineGroup | ( | TIMELINE_TYPE | eType = TIMELINE_IN | ) |
Returns the cascade timeline group of type eType. This timeline is built from the timelines of the visible children of this view, and is updated each time this function is called.
|
protected |
Returns the cascade timeline group of type eType. If bUpdateTimeline is false, the existing cascade timeline group is returned without being updated. This may be useful when manually removing timelines from cascade timeline groups. This function may return nullptr.
| uint32_t CYIScrollingView::GetCascadeTimelineGroupDelay | ( | ) | const |
| CAROUSEL_RULE CYIScrollingView::GetHorizontalCarouselRule | ( | ) | const |
| Magnets CYIScrollingView::GetHorizontalMagnets | ( | ) | const |
Returns an object containing the current configuration of the horizontal magnets. The CYIScrollingView::Magnets::eType field must be read to see which other fields are valid.
| float CYIScrollingView::GetHorizontalOverpullDistance | ( | ) | const |
| OVERPULL_RULE CYIScrollingView::GetHorizontalOverpullRule | ( | ) | const |
| float CYIScrollingView::GetHorizontalPosition | ( | ) | const |
| LAYOUT_MODE CYIScrollingView::GetHorizontalScrollingAreaLayoutMode | ( | ) | const |
| float CYIScrollingView::GetHorizontalTrackpadLeaveFriction | ( | ) | const |
Returns the friction necessary to have focus leave the scrolling view when using a trackpad and swiping horizontally.
| const CYIAABB& CYIScrollingView::GetScrollableRegion | ( | ) | const |
Returns the current scrollable region bounds. The default bounds returns the bounding box encompassing the entirety of our immediate children and ourselves. This differs from the world bounding box in that children of children are not included. Subclasses may provide a custom scrollable region calculation by overriding CalculateScrollableRegion() to provide their own required implementation for calculating the scrollable region.
|
protected |
|
protectedvirtual |
Returns the total cascade timeline delays for a cascade timeline group of type eType. These delays represent how long the cascade timeline group will wait before starting the cascade timeline of a particular view.
The visibleViews vector contains the list of visible views (that have the appropriate cascade timeline) for which a delay must be calculated. The vector also contains the distance from the top-left corner of the visible region to the center of each view. For each view in visibleViews, an entry must be added to the returned std::map.
The default implementation of this function uses the return value of GetCascadeTimelineGroupDelay() and applies that value between each child cascade timeline. The timeline of the view closest to the top-left corner of the visible area is played first, followed by the second closest, and so on.
| CAROUSEL_RULE CYIScrollingView::GetVerticalCarouselRule | ( | ) | const |
| Magnets CYIScrollingView::GetVerticalMagnets | ( | ) | const |
Returns an object containing the current configuration of the vertical magnets. The CYIScrollingView::Magnets::eType field must be read to see which other fields are valid.
| float CYIScrollingView::GetVerticalOverpullDistance | ( | ) | const |
| OVERPULL_RULE CYIScrollingView::GetVerticalOverpullRule | ( | ) | const |
| float CYIScrollingView::GetVerticalPosition | ( | ) | const |
| LAYOUT_MODE CYIScrollingView::GetVerticalScrollingAreaLayoutMode | ( | ) | const |
| float CYIScrollingView::GetVerticalTrackpadLeaveFriction | ( | ) | const |
Returns the friction necessary to have focus leave the scrolling view when using a trackpad and swiping vertically.
|
overrideprotectedvirtual |
Pure virtual for the child to implement according to how they wish the events to be handled.
The method is to return true if the event was processed and false otherwise.
Reimplemented from CYISceneView.
|
overridevirtual |
Returns true to indicate that this view handles focus in its descendants.
Reimplemented from CYISceneView.
| bool CYIScrollingView::HasHorizontalOverflow | ( | ) | const |
Returns true if the content of the view overflows its horizontal bounds.
| bool CYIScrollingView::HasVerticalOverflow | ( | ) | const |
Returns true if the content of the view overflows its vertical bounds.
|
overridevirtual |
Initializes the view and all of its content. Subclasses must call CYISceneView::Init().
Reimplemented from CYISceneView.
Reimplemented in CYIListView.
|
protected |
Returns true if this view is currently carouseling.
| bool CYIScrollingView::IsHorizontalScrollingEnabled | ( | ) | const |
Returns true if scrolling is enabled on the horizontal axis.
| bool CYIScrollingView::IsHorizontalSwipeOneItemEnabled | ( | ) | const |
Gets whether horizontal magnets should be constrained to only scroll as far as the next magnetic point per swipe.
|
protected |
Returns true if pCandidate is within the bounds of this view, defined by its size (scaled by fVisibleRegionMultiplier). The fVisibleRegionMultiplier parameter can be used to expand or contract the visible region by a factor, while keeping the test region centered. For example, a value of 2.0f indicates that the test region should be 50% larger than the visible region on each side.
| bool CYIScrollingView::IsInVisibleRegion | ( | CYISceneNode * | pCandidate | ) | const |
Returns true if pCandidate is within the bounds of this view, defined by its size.
| bool CYIScrollingView::IsMagnetic | ( | const CYISceneNode * | pNode | ) | const |
| bool CYIScrollingView::IsScrollingHorizontally | ( | ) | const |
Returns true if the view is currently scrolling in the horizontal direction.
| bool CYIScrollingView::IsScrollingVertically | ( | ) | const |
Returns true if the view is currently scrolling in the vertical direction.
| bool CYIScrollingView::IsVerticalScrollingEnabled | ( | ) | const |
Returns true if scrolling is enabled on the vertical axis.
| bool CYIScrollingView::IsVerticalSwipeOneItemEnabled | ( | ) | const |
Gets whether vertical magnets should be constrained to only scroll as far as the next magnetic point per swipe.
|
overrideprotectedvirtual |
Measures this scene node, considering the layout configuration constraints (if available) and the provided measure specifications. The Measure function is used by the layout system to determine the 'desired' size of elements in a container. The result of calls to this function can be accessed through the GetMeasuredSize() function.
Reimplemented from CYISceneView.
|
protectedvirtual |
|
protectedvirtual |
A function called when the visibility of a child within the visible region changes.
|
overrideprotectedvirtual |
Called when a scroll is generated by animation.
Reimplemented from CYIScrollController::ScrollListener.
|
overrideprotectedvirtual |
Called when a scroll gesture updates. This is called after CYIScrollController::GestureUpdate and every frame when the scroll controller is animating to a new position.
Reimplemented from CYIScrollController::ScrollListener.
|
overrideprotectedvirtual |
Called when a scroll gesture ends.
Reimplemented from CYIScrollController::ScrollListener.
|
overrideprotectedvirtual |
Called when a scroll gesture starts.
Reimplemented from CYIScrollController::ScrollListener.
|
protectedvirtual |
The properties outlined in the table at the top are parsed and applied here.
Reimplemented in CYIListView.
| void CYIScrollingView::RemoveHorizontalMagnets | ( | ) |
Removes all horizontal magnets. The scrolling view will no longer snap to horizontal magnetic points. This is equivalent to calling SetHorizontalMagnets(CYIScrollingView::Magnets()).
| void CYIScrollingView::RemoveVerticalMagnets | ( | ) |
Removes all vertical magnets. The scrolling view will no longer snap to vertical magnetic points. This is equivalent to calling SetVerticalMagnets(CYIScrollingView::Magnets()).
|
overridevirtual |
Assign initial focus within the view. This will initiate a focus search within this view, using the focus region of this view to filter results.
Reimplemented from CYISceneView.
| void CYIScrollingView::Reveal | ( | CYISceneNode * | pNode, |
| uint32_t | uDurationMs, | ||
| CYITimeInterpolator * | pInterpolator = nullptr |
||
| ) |
Reveals pNode with an animation duration of uDurationMs.
This function is called in response to focus changes within this view.
When uDurationMs is non-0, pInterpolator can be used to specify an interpolator to use for the animation. If an interpolator is not provided, CYIInterpolateSigmoid is used.
Takes the nearest path to the node.
|
protectedvirtual |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
The default implementation will bring the draw child containing pNode into the bounds of this view, defined by its size, if it is currently outside this region. It will move the minimum amount to bring the item into view. If the node is larger than the view, it will reveal the top/left side of the node preferentially.
The default implementation respects the "scroll enabled" settings provided by the user.
Subclasses may provide custom behaviour.
By default, if the provided eHorizontalDirection or eVerticalDirection do not make sense given the position of the node and the carousel state of this view, the algorithm will fall back to the closest direction.
| void CYIScrollingView::ScrollToHorizontalPosition | ( | float | fNormalizedPosition, |
| uint32_t | uDurationMs, | ||
| CYITimeInterpolator * | pInterpolator = nullptr |
||
| ) |
Scrolls the view to fNormalizedPosition on the horizontal axis.
A value of 0.0 aligns the beginning of the content with the left edge of the view.
If the scrolling view is not set to carousel on the horizontal axis a value of 1.0 aligns the end of the content with the right edge of the view.
If the scrolling view is set to carousel on the horizontal axis a value of 1.0 represents a full loop through the content and is equivalent to 0.0.
A non-zero uDurationMs will trigger an animated position change. Animated position changes with carousel enabled will take the shortest distance even if this means wrapping around the content.
If the view can not scroll in the horizontal direction due to lack of content, the call will have no effect.
The range of acceptable values for fNormalizedPosition is [0..1]. Values outside of this range will be clamped.
When uDurationMs is non-zero, pInterpolator can be used to specify an interpolator to use for the animation. If an interpolator is not provided, CYIInterpolateSigmoid is used.
| CYIScrollingView::ScrollToHorizontalPosition | ( | float | fNormalizedPosition | ) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Immediately scrolls to to fNormalizedPosition.
| void CYIScrollingView::ScrollToPosition | ( | const glm::vec2 & | fNormalizedPositions, |
| uint32_t | uDurationMs = 0, |
||
| CYITimeInterpolator * | pInterpolator = nullptr |
||
| ) |
| void CYIScrollingView::ScrollToVerticalPosition | ( | float | fNormalizedPosition, |
| uint32_t | uDurationMs, | ||
| CYITimeInterpolator * | pInterpolator = nullptr |
||
| ) |
Scrolls the view to fNormalizedPosition on the vertical axis.
A value of 0.0 aligns the beginning of the content with the top edge of the view.
If the scrolling view is not set to carousel on the vertical axis a value of 1.0 aligns the end of the content with the bottom edge of the view.
If the scrolling view is set to carousel on the vertical axis a value of 1.0 represents a full loop through the content and is equivalent to 0.0.
A non-zero uDurationMs will trigger an animated position change.
If the view can not scroll in the vertical direction either due to lack of content, the call will have no effect.
The range of acceptable values for fNormalizedPosition is [0..1]. Values outside of this range will be clamped.
When uDurationMs is non-zero, pInterpolator can be used to specify an interpolator to use for the animation. If an interpolator is not provided, CYIInterpolateSigmoid is used.
| CYIScrollingView::ScrollToVerticalPosition | ( | float | fNormalizedPosition | ) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Immediately scrolls to fNormalizedPosition.
| void CYIScrollingView::SetCascadeTimelineGroupDelay | ( | uint32_t | uDelayMs | ) |
Sets the cascade timeline group delay to uDelayMs milliseconds. This delay is used when building cascade timeline groups and represents an offset in time between each component of the cascade timeline groups.
For example, given a cascade group containing 3 timelines and a delay value of 50ms, the first timeline in the group would be played when the timeline group is started. The second timeline in the group would be played 50 ms later, and the third timeline in the group would be played 50 ms after that (i.e. 100 ms after the first timeline has started).
| void CYIScrollingView::SetHorizontalCarouselRule | ( | CAROUSEL_RULE | eCarouselRule | ) |
Sets carousel rule on the horizontal axis. Default value is CAROUSEL_NEVER.
| void CYIScrollingView::SetHorizontalMagnets | ( | const Magnets & | magnets | ) |
Sets the magnets to use for the horizontal direction to the data contained in magnets.
This will remove any other horizontal magnets.
| void CYIScrollingView::SetHorizontalOverpullDistance | ( | float | fDistance | ) |
Set the overpull fDistance (i.e. distance past the extents) that users may scroll horizontally in local units.
Negative values will be clamped to zero.
| void CYIScrollingView::SetHorizontalOverpullRule | ( | OVERPULL_RULE | eRule | ) |
| void CYIScrollingView::SetHorizontalScrollingAreaLayoutMode | ( | LAYOUT_MODE | eMode | ) |
| void CYIScrollingView::SetHorizontalScrollingEnabled | ( | bool | bEnabled | ) |
| void CYIScrollingView::SetHorizontalSwipeOneItemEnabled | ( | bool | bSwipeOneItem | ) |
Sets whether horizontal magnets should be constrained to only scroll as far as the next magnetic point per swipe. The default value is false.
| void CYIScrollingView::SetHorizontalTrackpadLeaveFriction | ( | float | fFriction | ) |
Sets the friction necessary to have focus leave the scrolling view when using a trackpad and swiping horizontally. fFriction should be a value between 0 and 1, where 0 is no friction and 1 is focus never leaving the scrolling view.
| void CYIScrollingView::SetVerticalCarouselRule | ( | CAROUSEL_RULE | eCarouselRule | ) |
Sets carousel rule on the vertical axis. Default value is CAROUSEL_NEVER.
| void CYIScrollingView::SetVerticalMagnets | ( | const Magnets & | magnets | ) |
Sets the magnets to use for the vertical direction to the data contained in magnets.
This will remove any other vertical magnets.
| void CYIScrollingView::SetVerticalOverpullDistance | ( | float | fDistance | ) |
Set the overpull fDistance (i.e. distance past the extents) that users may scroll vertically in local units.
Negative values will be clamped to zero.
| void CYIScrollingView::SetVerticalOverpullRule | ( | OVERPULL_RULE | eRule | ) |
| void CYIScrollingView::SetVerticalScrollingAreaLayoutMode | ( | LAYOUT_MODE | eMode | ) |
| void CYIScrollingView::SetVerticalScrollingEnabled | ( | bool | bEnabled | ) |
| void CYIScrollingView::SetVerticalSwipeOneItemEnabled | ( | bool | bSwipeOneItem | ) |
Sets whether vertical magnets should be constrained to only scroll as far as the next magnetic point per swipe. The default value is false.
| void CYIScrollingView::SetVerticalTrackpadLeaveFriction | ( | float | fFriction | ) |
Sets the friction necessary to have focus leave the scrolling view when using a trackpad and swiping vertically. fFriction should be a value between 0 and 1, where 0 is no friction and 1 is focus never leaving the scrolling view.
|
overrideprotectedvirtual |
Called when the size of this scene node has been changed.
Reimplemented from CYISceneView.
| void CYIScrollingView::StopHorizontalScrolling | ( | ) |
Stops the current scroll in the horizontally direction.
| void CYIScrollingView::StopScrolling | ( | ) |
Stops the current scroll in all directions.
| void CYIScrollingView::StopVerticalScrolling | ( | ) |
Stops the current scroll in the vertically direction.
|
overrideprotectedvirtual |
This hook provides subclasses a means to do operations subsequent to update. This hook is called after all children of the current node have been updated.
Reimplemented from CYISceneNode.
|
overrideprotectedvirtual |
Called by Update() when the world bounding box update process is complete. Subclasses may overload this function to do post-processing.
Reimplemented from CYISceneView.
Reimplemented in CYIListView.
| CYISignal<CYISceneNode*> CYIScrollingView::ChildEnteredVisibleRegion |
Emitted when a child of the CYIScrollingView has entered the visible region.
| CYISignal<CYISceneNode*> CYIScrollingView::ChildLeftVisibleRegion |
Emitted when a child of the CYIScrollingView has left the visible region.
| CYISignal<bool> CYIScrollingView::HorizontalOverflowChanged |
Emitted with true when the horizontal overflow has changed such that the content size exceeds the view size. false means the content has shrunk below the view size.
| CYISignal<float> CYIScrollingView::HorizontalPositionChanged |
Emitted a normalized value [0..1] representing the percentage scrolled in the horizontal direction. May be emitted without an 'InteractionBegan' if the view contents change size.
| CYISignal CYIScrollingView::HorizontalScrollingBegan |
Emitted when scrolling begins in the horizontal direction.
| CYISignal CYIScrollingView::HorizontalScrollingEnded |
Emitted when scrolling has ended in the horizontal direction. View contents will be at rest in the horizontal direction when this signal is emitted.
| CYISignal CYIScrollingView::InteractionBegan |
Emitted when user begins interacting with the scrolling view.
| CYISignal CYIScrollingView::InteractionEnded |
Emitted when user interaction with the scrolling view has ended. A gesture may cause the list to continue scrolling after this signal is emitted.
|
protected |
| CYISignal<bool> CYIScrollingView::VerticalOverflowChanged |
Emitted with true when the vertical overflow has changed such that the content size exceeds the view size. false means the content has shrunk below the view size.
| CYISignal<float> CYIScrollingView::VerticalPositionChanged |
Emitted a normalized value [0..1] representing the percentage scrolled in the vertical direction. May be emitted without an 'InteractionBegan' if the view contents change size.
| CYISignal CYIScrollingView::VerticalScrollingBegan |
Emitted when scrolling begins in the vertical direction.
| CYISignal CYIScrollingView::VerticalScrollingEnded |
Emitted when scrolling has ended in the vertical direction. View contents will be at rest in the vertical direction when this signal is emitted.