You.i Engine
CYIScrollingView Class Reference

Detailed Description

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'.

Note
If the 'scrolling area layout mode' is set to 'fill view' (either vertically or horizontally), then the scrolling view itself cannot be set to 'fit content' in that direction. Doing so would result in the size of the scrolling view in that direction to shrink to 0.

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.

Note
If the background should also be visible in the 'overpull' region, a negative margin equal to the size of the overpull can be applied to the background node. Alternatively, the background can 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

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().

Note
When using focus to navigate the 'magnetic' property is ignored and all focusable items are considered to be magnetic.

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>

Inheritance diagram for CYIScrollingView:

Classes

struct  Magnets
 
struct  ViewAndDistance
 

Public Types

enum  OVERPULL_RULE {
  OVERPULL_ALWAYS,
  OVERPULL_IF_OVERFLOWING
}
 
enum  LAYOUT_MODE {
  LAYOUT_FIT_CONTENT,
  LAYOUT_FIT_CONTENT_IF_OVERFLOWING,
  LAYOUT_FILL_VIEW
}
 
enum  CAROUSEL_RULE {
  CAROUSEL_NEVER,
  CAROUSEL_ALWAYS,
  CAROUSEL_IF_OVERFLOWING
}
 
enum  TIMELINE_TYPE {
  TIMELINE_IN,
  TIMELINE_OUT
}
 
enum  MAGNETS_TYPE {
  MAGNETS_NONE,
  MAGNETS_EDGES,
  MAGNETS_CENTER,
  MAGNETS_BEGIN,
  MAGNETS_END
}
 
- Public Types inherited from CYISceneView
enum  ASSET_REQUIREMENT_TYPE {
  REQUIRES_NODE,
  REQUIRES_TIMELINE
}
 
enum  TIMELINE_GET_MODE {
  GET_DEFAULT,
  GET_TIMELINE,
  GET_TIMELINE_GROUP,
  GET_COMPONENT_OF_TIMELINE_GROUP
}
 
- Public Types inherited from CYISceneNode
enum  DirtyFlag {
  DirtyClean = 0x0000,
  DirtySceneGraph = 0x0001,
  DirtyVisibility = 0x0002,
  DirtyOpacity = 0x0004,
  DirtyLocalTransform = 0x0008,
  DirtyWorldTransform = 0x0010,
  DirtyUniform = 0x0020,
  DirtyWorldBoundingBox = 0x0040,
  DirtyMesh = 0x0080,
  DirtyWorldSurfaceScale = 0x0100,
  DirtyWorldScale = 0x0200,
  DirtyLocalBoundingBox = 0x0400,
  DirtyEverything = (DirtySceneGraph | DirtyVisibility | DirtyOpacity | DirtyLocalTransform | DirtyWorldTransform | DirtyUniform | DirtyWorldBoundingBox | DirtyWorldSurfaceScale | DirtyWorldScale | DirtyLocalBoundingBox)
}
 
enum  LayoutDirtyFlag {
  LayoutClean,
  LayoutChildDirty,
  LayoutDirty
}
 
enum  LayoutConfigFetchMode {
  LAYOUT_CONFIG_DO_NOT_LAZY_INSTANTIATE = 0,
  LAYOUT_CONFIG_LAZY_INSTANTIATE
}
 
enum  MeasureMode {
  MEASURE_UNSPECIFIED,
  MEASURE_UP_TO,
  MEASURE_EXACTLY
}
 
enum  FETCH_TYPE {
  FETCH_OPTIONAL = 0,
  FETCH_MANDATORY
}
 
typedef std::reverse_iterator< IteratorReverseIterator
 
- Public Types inherited from CYIEventTarget
enum  EVENT_PHASE {
  BUBBLE,
  CAPTURE
}
 

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 CYIAABBGetScrollableRegion () 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
 
CYITimelineGroupGetCascadeTimelineGroup (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 CYISceneViewFindNextFocusInDescendants (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::AssetRequirementGetAssetRequirements (uint32_t *pRequirementCount)
 
CYIAbstractTimelineGetInTimeline () const
 
CYIAbstractTimelineGetOutTimeline () const
 
CYIAbstractTimelineGetFocusInTimeline () const
 
CYIAbstractTimelineGetFocusOutTimeline () const
 
bool HasFocus () const
 
void SetFocusable (bool bFocusable)
 
bool IsFocusable () const
 
bool CanBeFocused () const
 
void SetNextFocus (CYISceneView *pView, CYIFocus::FOCUS_DIRECTION eDirection)
 
CYISceneViewGetNextFocus (CYIFocus::FOCUS_DIRECTION eDirection) const
 
void SetInitiallyFocusedView (CYISceneView *pView)
 
CYISceneViewGetInitiallyFocusedView () const
 
CYISceneViewFindNextFocus (CYIFocus::FOCUS_DIRECTION eDirection, const CYIFocusSearchOptions &options=CYIFocusSearchOptions()) const
 
CYISceneViewFindNextFocus (CYIFocus::FOCUS_DIRECTION eDirection, CYIAABB &screenSpaceFocusRegion, const CYIFocusSearchOptions &options=CYIFocusSearchOptions()) const
 
const CYISceneNodeGetFocusRoot () const
 
CYISceneViewGetFocusHandler () 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 CYIAbstractTimelineGetTimeline (const CYIString &rMarkerName, TIMELINE_GET_MODE eMode=GET_DEFAULT)
 
CYIAbstractTimelineGetTimeline (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)
 
CYITimelineGroupGetTimelineGroup (const CYIString &markerName)
 
std::unique_ptr< CYITimelineGroupBuildTimelineGroup (const CYIString &markerName)
 
void BuildAnchorList ()
 
virtual void Reset ()
 
void SetLayout (std::unique_ptr< CYILayout > pLayout)
 
const CYILayoutGetLayout () const
 
CYILayoutGetLayout ()
 
- Public Member Functions inherited from CYISceneNode
 CYISceneNode ()
 
virtual ~CYISceneNode ()
 
void ForceDirty ()
 
void ClearDirtyFlag ()
 
void SetDirtyFlag (DirtyFlag eDirtyFlag)
 
DirtyFlag GetDirtyFlag () const
 
DirtyFlag GetPreviousDirtyFlag () const
 
const CYIStringGetName () 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< CYISceneNodeRemoveChild (CYISceneNode *pSceneNode)
 
bool ReorderChild (uint32_t uFromIndex, uint32_t uToIndex)
 
CYISceneNodeGetParent () const
 
bool ChangeParent (CYISceneNode *pParent)
 
CYISceneNodeGetDrawParent () const
 
bool IsAncestorOf (const CYISceneNode *pNode) const
 
CYISceneManagerGetSceneManager () const
 
uint32_t GetChildCount () const
 
uint32_t GetChildCountRecursive () const
 
CYISceneNodeGetChild (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
 
CYISceneNodeGetChild (const CYIString &sName) const
 
uint32_t GetDrawChildCount () const
 
CYISceneNodeGetDrawChild (uint32_t uIndex) const
 
CYISceneNodeGetDrawChildByID (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
 
CYISceneNodeGetNode (const CYIString &name)
 
CYISceneNodeGetNode (const CYIString &name, const CYIRuntimeTypeInfo &enforceClassType)
 
CYISceneNodeGetNode (const CYIRuntimeTypeInfo &enforceClassType)
 
CYISceneNodeGetNodeAfterTarget (const CYIRuntimeTypeInfo &enforceClassType, CYISceneNode *pStartAfterTarget)
 
template<class YI_SCENE_NODE_SUBCLASS >
YI_SCENE_NODE_SUBCLASS * GetNode (const CYIString &name)
 
CYISceneNodeGetNode (const int32_t nID)
 
CYISceneNodeGetNode (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< CYIEffectGetEffect (uint32_t uIndex) const
 
void ConnectEffectsToTimelines (const CYITimelineTrack *pTrack)
 
void AddMask (std::unique_ptr< CYIMask > pMask)
 
std::unique_ptr< CYIMaskRemoveMask (const CYIMask *pMask)
 
uint32_t GetMaskCount () const
 
const CYIMaskGetMask (uint32_t uIndex) const
 
CYIMaskGetMask (uint32_t uIndex)
 
const std::shared_ptr< CYIMesh > & GetMesh () const
 
uint32_t GetMaterialCount () const
 
const std::shared_ptr< CYIMaterialGetMaterial (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< CYIRenderTargetGetRenderTarget () const
 
const CYIAABBGetWorldAABB () const
 
const CYIAABBGetLocalAABB () 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 CYIAABBGetClippingBox () 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 CYILayoutConfigGetLayoutConfig (LayoutConfigFetchMode eFetchMode=LAYOUT_CONFIG_LAZY_INSTANTIATE) const
 
CYILayoutConfigGetLayoutConfig (LayoutConfigFetchMode eFetchMode=LAYOUT_CONFIG_LAZY_INSTANTIATE)
 
void SetLayoutState (std::unique_ptr< CYILayoutState > pLayoutState)
 
const CYILayoutStateGetLayoutState () const
 
CYILayoutStateGetLayoutState ()
 
void RequestLayout ()
 
LayoutDirtyFlag GetLayoutDirtyFlag () const
 
virtual void SetLayoutDirtyFlag (LayoutDirtyFlag eFlag)
 
CYIAbstractCameraSceneNodeFindActiveCamera () 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 CYIRuntimeTypeInfoGetRuntimeTypeInfoForScriptObject () const override
 
- Public Member Functions inherited from CYIScriptableObject
 CYIScriptableObject ()
 
 CYIScriptableObject (const CYIScriptableObject &other)
 
CYIScriptableObjectoperator= (const CYIScriptableObject &other)
 
virtual ~CYIScriptableObject ()
 
CYIBindingImplementationGetBindingImplementation () const
 
void SetBindingImplementation (CYIBindingImplementation *pBindingImplementation)
 
- Public Member Functions inherited from CYISignalHandler
 CYISignalHandler ()
 
 CYISignalHandler (const CYISignalHandler &rSignalHandler)
 
virtual ~CYISignalHandler ()
 
CYISignalHandleroperator= (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 ()
 
CYIEventHandleroperator= (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 ()
 

Public Attributes

CYISignal InteractionBegan
 
CYISignal HorizontalScrollingBegan
 
CYISignal VerticalScrollingBegan
 
CYISignal< float > HorizontalPositionChanged
 
CYISignal< float > VerticalPositionChanged
 
CYISignal InteractionEnded
 
CYISignal HorizontalScrollingEnded
 
CYISignal VerticalScrollingEnded
 
CYISignal< bool > HorizontalOverflowChanged
 
CYISignal< bool > VerticalOverflowChanged
 
CYISignal< CYISceneNode * > ChildEnteredVisibleRegion
 
CYISignal< CYISceneNode * > ChildLeftVisibleRegion
 
- Public Attributes inherited from CYISceneView
CYISignal< CYISceneView * > GainedFocus
 Emitted when focus has entered this view. More...
 
CYISignal< CYISceneView * > LostFocus
 Emitted when focus has left this view. More...
 
- Public Attributes inherited from CYISceneNode
CYISignal< CYISceneNode *, YI_NODE_PROPERTY_TYPEPropertyAnimationComplete
 
CYISignal DescendantGainedFocus
 Emitted when focus has entered this tree. More...
 
CYISignal DescendantLostFocus
 Emitted when focus has left this tree. More...
 
CYISignal DescendantsChangedFocus
 Emitted when focus has changed within this tree. More...
 

Protected Types

enum  DIRECTION {
  HORIZONTAL,
  VERTICAL,
  DIRECTION_MAX
}
 
enum  SCROLL_DIRECTION {
  SCROLL_CLOSEST,
  SCROLL_FORWARD,
  SCROLL_REVERSE
}
 

Protected Member Functions

CYIScrollControllerGetScrollController (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
 
CYITimelineGroupGetCascadeTimelineGroup (TIMELINE_TYPE eType, bool bUpdateTimeline)
 
virtual CYIAbstractTimelineGetCascadeTimelineFor (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 CYISceneNodeGetNodeFromChildren (const CYIString &name)
 
virtual CYISceneNodeGetNodeFromChildren (const int32_t nID)
 
virtual CYISceneNodeGetNodeFromChildren (const CYIRuntimeTypeInfo &enforceClassType)
 
CYISceneNodeGetNodeFromChildrenAfterTarget (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 CYIStringDirectionToString (DIRECTION eDirection)
 

Protected Attributes

uint32_t m_uFocusScrollDuration
 
- Protected Attributes inherited from CYISceneView
bool m_bStopEventPropagation
 
bool m_bResponsiveLayoutEnabled
 
bool m_bSceneTreeBuilt
 
bool m_bInAnimatedPosition
 
CYISceneNodem_pClippingNode
 
CYIAbstractTimelinem_pFocusInTimeline
 
CYIAbstractTimelinem_pFocusOutTimeline
 
std::unique_ptr< CYILayoutm_pLayout
 
std::shared_ptr< CYIAssetViewTemplatem_pAssetViewTemplate
 
std::shared_ptr< CYISceneNodeProxym_pInitiallyFocusedView
 
std::multimap< YI_ANCHOR_TYPE, YI_ANCHOR_DATAm_anchors
 
std::map< CYIString, std::unique_ptr< CYITimeline > > m_timelines
 
std::map< CYIString, std::unique_ptr< CYIParallelTimelineGroup > > m_timelineGroups
 
- Protected Attributes inherited from CYISceneNode
CYIString m_name
 
CYISceneNodem_pParent
 
CYISceneNodem_pDrawParent
 
CYISceneManagerm_pSceneManager
 
std::vector< std::unique_ptr< CYISceneNode > > m_children
 
std::vector< CYISceneNode * > m_drawChildren
 
std::map< CYIString, CYIStringm_Properties
 
std::vector< std::shared_ptr< CYIMaterial > > m_pMaterials
 
std::vector< std::unique_ptr< CYIMask > > m_Masks
 
std::vector< std::shared_ptr< CYIEffect > > m_Effects
 
std::vector< PropertyAnimation * > m_propertyAnimations
 
float m_fLocalOpacity
 
CYIAABB m_WSClipBox
 
glm::mat4 m_EffectTransform
 
glm::quat m_Orientation
 
glm::vec3 m_Rotate
 
glm::vec3 m_AnchorPoint
 
glm::vec3 m_Position
 
glm::vec3 m_Scale
 
glm::vec3 m_vSize
 
glm::vec3 m_vInitialSize
 
glm::vec3 m_vMeasuredSize
 
glm::vec3 m_vlsLastCollision
 
bool m_bClip
 
bool m_bIsRotated
 
bool m_bIsOriented
 
bool m_bLocalVisibility
 
int32_t m_nID
 
uint64_t m_uGUID
 
std::shared_ptr< CYIRenderTargetm_pRenderTarget
 
std::shared_ptr< CYIMeshm_pMesh
 
std::shared_ptr< IYIUniformBufferObjectm_pShaderUniforms
 
- Protected Attributes inherited from CYIEventTarget
YI_SPECIAL_EVENT_TARGET_TYPE m_eSpecialTypes
 
std::vector< EventListenerEntry > m_listeners
 
- Protected Attributes inherited from CYIEventHandler
bool m_bEnableEvents
 

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
 

Member Enumeration Documentation

Enumerator
CAROUSEL_NEVER 

The view is bounded to the content, it will not carousel.

CAROUSEL_ALWAYS 

The view will carousel regardless of whether the content is greater than the view. If there is not enough content to fill the view, there will be gaps between iterations.

CAROUSEL_IF_OVERFLOWING 

The view will carousel only when the amount of content surpasses the size of the view.

Enumerator
HORIZONTAL 
VERTICAL 
DIRECTION_MAX 
Enumerator
LAYOUT_FIT_CONTENT 

The content is laid out as within a container with 'fit-content' set on it.

LAYOUT_FIT_CONTENT_IF_OVERFLOWING 

The content is laid out as within a container with 'fit-content' set on it, with a minimum size equal to that of the scrolling view itself.

LAYOUT_FILL_VIEW 

The content is laid out as within a container of fixed size whose size equals that of the scrolling view. As a consequence, scrolling appears disabled when this mode is selected.

Enumerator
MAGNETS_NONE 

No magnet is used.

MAGNETS_EDGES 

Two magnets are used (i.e. left and right, or up and down).

MAGNETS_CENTER 

A single center magnet is used.

MAGNETS_BEGIN 

A single begin magnet is used (i.e left or up).

MAGNETS_END 

A single end magnet is used (i.e right or down).

Enumerator
OVERPULL_ALWAYS 

Overpull occurs whether or not there is enough content in the view to make it scrollable.

OVERPULL_IF_OVERFLOWING 

Overpull occurs only if the amount of content surpasses the size of the view.

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.

Enumerator
TIMELINE_IN 

An 'in' timeline. Users typically play these timelines when a scene is staged.

TIMELINE_OUT 

An 'out' timeline. Users typically play these timelines when a scene is unstaged.

Constructor & Destructor Documentation

CYIScrollingView::CYIScrollingView ( )
virtual CYIScrollingView::~CYIScrollingView ( )
virtual

Member Function Documentation

virtual void CYIScrollingView::ApplyMeasurements ( )
overrideprotectedvirtual

Applies the measured sizes of this node's children.

Note
Typically, if ApplyMeasurements is overridden then Measure must also be overridden.
Measurements should be applied before calculating position for layout.
Warning
Subclasses that override this function must ensure that the ApplyMeasurements function of ALL children of this scene node is called.
Note
Subclasses that override this function should make use of the GetCurrentLayoutDirtyFlag() function (rather than GetLayoutDirtyFlag() ).

Reimplemented from CYISceneView.

Reimplemented in CYIListView.

virtual bool CYIScrollingView::BroadcastEvent ( const std::shared_ptr< CYIEventDispatcher > &  pDispatcher,
CYIEvent pEvent 
)
overrideprotectedvirtual

Recursively broadcasts an event to the node's children, then offers it to the node itself.

Reimplemented from CYISceneNode.

virtual void CYIScrollingView::BuildDrawList ( std::vector< IYIRenderer::Command > &  drawList,
CYIAbstractCameraSceneNode pCameraToDrawWith = nullptr 
)
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.

Warning
Override at your own risk; no guarantee of consistent behaviour.

Reimplemented from CYISceneView.

CYIAABB CYIScrollingView::CalculateContentSize ( ) const
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).

Note
When a layout is assigned to this view, the layout's measured size is used as content size and this function is not used.
virtual CYIAABB CYIScrollingView::CalculateScrollableRegion ( ) const
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.

Note
When a layout is assigned to this view, the layout's measured size is used as scrollable region and the return value of this function is ignored.
void CYIScrollingView::CheckAndNotifyVisibilityInVisibilityRegion ( CYISceneNode pChild)
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.

virtual void CYIScrollingView::ChildAdded ( CYISceneNode pChild)
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.

virtual void CYIScrollingView::ChildMovedInVisibleRegion ( CYISceneNode pChild,
const glm::vec2 &  normalizedPosition 
)
protectedvirtual

Reimplemented in CYIListView.

virtual void CYIScrollingView::ChildRemoved ( CYISceneNode pChild)
overrideprotectedvirtual

Called when a child is removed. If pChild is in the visible area the CYIScrollingView::ChildLeftVisibleRegion signal will be emmited.

Reimplemented from CYISceneView.

virtual void CYIScrollingView::ChildVisibilityInVisibleRegionChanged ( CYISceneNode pChild,
bool  bIsInVisibleRegion 
)
protectedvirtual

A function called when the visibility of a child within the visible region changes.

Warning
Overrides must call the base class implementation.
See also
OnChildVisibilityInVisibleRegionChanged()

Reimplemented in CYIListView.

void CYIScrollingView::ConfigureMagnets ( DIRECTION  eDirection,
float  fViewSize,
float  fOldViewSize 
)
protected
void CYIScrollingView::ConfigureOverpull ( DIRECTION  eDirection,
float  fViewSize 
)
protected
void CYIScrollingView::ConfigureScrollControllers ( )
protected

Calls ConfigureScrollingRange and ConfigureOverpull for each DIRECTION.

See also
ConfigureScrollingRange(DIRECTION, float)
ConfigureOverpull(DIRECTION, float)
ConfigureMagnets(DIRECTION, float)
void CYIScrollingView::ConfigureScrollingRange ( DIRECTION  eDirection,
float  fContentSize 
)
protected
virtual bool CYIScrollingView::ContainsFocusableDescendant ( const CYIFocusSearchOptions options = CYIFocusSearchOptions()) const
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.

See also
CYIFocus::GetScreenSpaceFocusRegion

Reimplemented from CYISceneNode.

static const CYIString& CYIScrollingView::DirectionToString ( DIRECTION  eDirection)
staticprotected

Returns the string representation of the provided enum value eDirection.

void CYIScrollingView::DisableHorizontalScrolling ( )

Disables scrolling on the horizontal axis. Scrolling is enabled by default.

See also
ScrollToHorizontalPosition(float, uint32_t, CYITimeInterpolator*)
void CYIScrollingView::DisableMagnetism ( CYISceneNode pChild)
void CYIScrollingView::DisableVerticalScrolling ( )

Disables scrolling on the vertical axis. Scrolling is enabled by default.

See also
ScrollToVerticalPosition(float, uint32_t, CYITimeInterpolator*)
void CYIScrollingView::EnableHorizontalScrolling ( )

Enables scrolling on the horizontal axis. Scrolling is enabled by default.

See also
ScrollToHorizontalPosition(float, uint32_t, CYITimeInterpolator*)
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.

Note
When using 10ft focus nagivation, the 'magnetism' property is ignored. All focusable items are assumed to be magnetic, and all non-focusable items are assumed to be non-magnetic.
See also
SetHorizontalMagnet()
SetVerticalMagnet()
void CYIScrollingView::EnableVerticalScrolling ( )

Enables scrolling on the vertical axis. Scrolling is enabled by default.

See also
ScrollToVerticalPosition(float, uint32_t, CYITimeInterpolator*)
virtual CYISceneView* CYIScrollingView::FindNextFocusInDescendants ( const CYISceneView pCurrentFocusView,
CYIFocus::FOCUS_DIRECTION  eDirection,
CYIAABB screenSpaceFocusRegion,
const CYIFocusSearchOptions options = CYIFocusSearchOptions() 
) const
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.

virtual void CYIScrollingView::FocusChangedInDescendants ( )
overridevirtual

Scrolls to reveal the newly focused item if necessary.

Reimplemented from CYISceneNode.

virtual void CYIScrollingView::FocusGainedInDescendants ( )
overridevirtual

Scrolls to reveal the newly focused item if necessary.

Reimplemented from CYISceneNode.

virtual CYIAbstractTimeline* CYIScrollingView::GetCascadeTimelineFor ( TIMELINE_TYPE  eType,
CYISceneView pView 
)
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.

Note
Because cascade timeline groups are updated only when this function is called, it is not advisable to cache the returned pointer.
Warning
The returned timeline is owned by this scrolling view and must not be deleted.
CYITimelineGroup* CYIScrollingView::GetCascadeTimelineGroup ( TIMELINE_TYPE  eType,
bool  bUpdateTimeline 
)
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.

See also
GetCascadeTimelineGroup(TIMELINE_TYPE)
uint32_t CYIScrollingView::GetCascadeTimelineGroupDelay ( ) const
See also
SetCarouselTimelineDelay
CAROUSEL_RULE CYIScrollingView::GetHorizontalCarouselRule ( ) const
See also
CAROUSEL_RULE
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
See also
OVERPULL_RULE
float CYIScrollingView::GetHorizontalPosition ( ) const
LAYOUT_MODE CYIScrollingView::GetHorizontalScrollingAreaLayoutMode ( ) const
See also
LAYOUT_MODE
float CYIScrollingView::GetHorizontalTrackpadLeaveFriction ( ) const

Returns the friction necessary to have focus leave the scrolling view when using a trackpad and swiping horizontally.

See also
SetHorizontalTrackpadLeaveFriction
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.

Note
When a layout is assigned to this view, the layout's measured size is used as the scrollable region.
CYIScrollController* CYIScrollingView::GetScrollController ( DIRECTION  eDirection) const
protected
virtual std::map<CYISceneView *, uint64_t> CYIScrollingView::GetTotalCascadeDelayFor ( TIMELINE_TYPE  eType,
const std::vector< ViewAndDistance > &  visibleViews 
)
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.

Note
If any of the views present in visibleViews are not present in the returned map, a value of 0 will be assumed.

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
See also
CAROUSEL_RULE
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
See also
OVERPULL_RULE
float CYIScrollingView::GetVerticalPosition ( ) const
LAYOUT_MODE CYIScrollingView::GetVerticalScrollingAreaLayoutMode ( ) const
See also
LAYOUT_MODE
float CYIScrollingView::GetVerticalTrackpadLeaveFriction ( ) const

Returns the friction necessary to have focus leave the scrolling view when using a trackpad and swiping vertically.

See also
SetVerticalTrackpadLeaveFriction
virtual bool CYIScrollingView::HandleEvent ( const std::shared_ptr< CYIEventDispatcher > &  pDispatcher,
CYIEvent pEvent 
)
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.

virtual bool CYIScrollingView::HandlesFocusInDescendants ( ) const
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.

virtual bool CYIScrollingView::Init ( )
overridevirtual

Initializes the view and all of its content. Subclasses must call CYISceneView::Init().

Note
This must be called after CYISceneView::BuildFromTemplate()

Reimplemented from CYISceneView.

Reimplemented in CYIListView.

bool CYIScrollingView::IsCarouseling ( DIRECTION  eDirection) const
protected

Returns true if this view is currently carouseling.

Note
This differs from the current carousel rule, since it takes into account content size when CAROUSEL_IF_OVERFLOWING is specified.
See also
CAROUSEL_RULE
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.

bool CYIScrollingView::IsInExpandedVisibleRegion ( CYISceneNode pCandidate,
float  fVisibleRegionMultiplier 
) const
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.

Note
pCandidate must be a direct child of this scrolling view. A runtime assertion will occur otherwise.
See also
IsInVisibleRegion(CYISceneNode *)
bool CYIScrollingView::IsInVisibleRegion ( CYISceneNode pCandidate) const

Returns true if pCandidate is within the bounds of this view, defined by its size.

Note
pCandidate must be a direct child of this scrolling view. A runtime assertion will occur otherwise.
See also
CYIScrollingView::ChildEnteredVisibleRegion
CYIScrollingView::ChildLeftVisibleRegion
bool CYIScrollingView::IsMagnetic ( const CYISceneNode pNode) const
bool CYIScrollingView::IsScrollingHorizontally ( ) const

Returns true if the view is currently scrolling in the horizontal direction.

See also
HorizontalScrollingEnded()
HorizontalScrollingBegan()
bool CYIScrollingView::IsScrollingVertically ( ) const

Returns true if the view is currently scrolling in the vertical direction.

See also
VerticalScrollingEnded()
VerticalScrollingBegan()
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.

virtual void CYIScrollingView::Measure ( const MeasureSpec widthSpec,
const MeasureSpec heightSpec,
const MeasureSpec depthSpec 
)
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.

Note
The Measure function may be called multiple times on a single scene node during a layout pass.
The measure specs passed in must take in consideration the node's scale. For example, if a node is calling the Measure function on one of its children and that child has a scale of glm::vec3(1, 3, 1), then the fSize of heightSpec must be divided by 3.
The measured values may exceed the provided measure specifications if the specifications cannot be met given the constraints placed on this scene node. In other words, the constraints placed on this node have a higher priority than the provided measure specifications.
Warning
Subclasses that override this function must ensure that the Measure function of ALL children of this scene node is called at least once, even if those children are hidden.
Note
Typically, if Measure is overridden then ApplyMeasurements must also be overridden.
Subclasses that override this function should make use of the GetCurrentLayoutDirtyFlag() function (rather than GetLayoutDirtyFlag() ).

Reimplemented from CYISceneView.

virtual void CYIScrollingView::OnChildMovedInVisibleRegion ( CYISceneNode pChild,
const glm::vec2 &  normalizedPosition 
)
protectedvirtual
virtual void CYIScrollingView::OnChildVisibilityInVisibleRegionChanged ( CYISceneNode pChild,
bool  bIsInVisibleRegion 
)
protectedvirtual

A function called when the visibility of a child within the visible region changes.

See also
ChildEnteredVisibleRegion
ChildLeftVisibleRegion
virtual void CYIScrollingView::OnScrollAuto ( CYIScrollController )
overrideprotectedvirtual

Called when a scroll is generated by animation.

See also
CYIScrollController::MoveByAnimate

Reimplemented from CYIScrollController::ScrollListener.

virtual void CYIScrollingView::OnScrolled ( CYIScrollController ,
YI_SCROLLED_INFO   
)
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.

virtual void CYIScrollingView::OnScrollEnded ( CYIScrollController )
overrideprotectedvirtual

Called when a scroll gesture ends.

Reimplemented from CYIScrollController::ScrollListener.

virtual void CYIScrollingView::OnScrollStarted ( CYIScrollController )
overrideprotectedvirtual

Called when a scroll gesture starts.

Reimplemented from CYIScrollController::ScrollListener.

virtual void CYIScrollingView::ParseProperties ( )
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()).

See also
SetHorizontalMagnets()
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()).

See also
SetVerticalMagnets()
virtual bool CYIScrollingView::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() 
)
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.

See also
SCROLL_DIRECTION
virtual void CYIScrollingView::Reveal ( CYISceneNode pNode,
uint32_t  uDurationMs,
SCROLL_DIRECTION  eHorizontalDirection,
SCROLL_DIRECTION  eVerticalDirection,
CYITimeInterpolator pInterpolator = nullptr 
)
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.

See also
SCROLL_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.

Note
This will have effect even if horizontal scrolling has been disabled.
See also
IsHorizontalCarouselEnabled
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.

Note
This will have effect even if vertical scrolling has been disabled.
See also
IsVerticalCarouselEnabled
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).

See also
GetCascadeTimelineGroup
void CYIScrollingView::SetHorizontalCarouselRule ( CAROUSEL_RULE  eCarouselRule)

Sets carousel rule on the horizontal axis. Default value is CAROUSEL_NEVER.

Note
With carousel enabled the meaning of the scrolling view's horizontal position changes from 0..1 representing the start and end of the content, to 0..1 representing a full loop through the content. Calling this API will emit HorizontalPositionChanged
Warning
Turning clipping off or enlarging the clipping box beyond the view size with carousel enabled will result in undesirable visuals.
See also
CAROUSEL_RULE
ScrollToHorizontalPosition(float, uint32_t, CYITimeInterpolator*)
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.

See also
GetHorizontalMagnets()
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)
See also
OVERPULL_RULE
void CYIScrollingView::SetHorizontalScrollingAreaLayoutMode ( LAYOUT_MODE  eMode)
See also
LAYOUT_MODE
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.

Note
If bSwipeOneItem is true and magnets are disabled horizontally, one item is considered to be the width of the scrolling view.
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.

Note
The default is 0.3.
void CYIScrollingView::SetVerticalCarouselRule ( CAROUSEL_RULE  eCarouselRule)

Sets carousel rule on the vertical axis. Default value is CAROUSEL_NEVER.

Note
With carousel enabled the meaning of the scrolling view's vertical position changes from 0..1 representing the start and end of the content, to 0..1 representing a full loop through the content. Calling this API will emit VerticalPositionChanged
Warning
Turning clipping off or enlarging the clipping box beyond the view size with carousel enabled will result in undesirable visuals.
See also
CAROUSEL_RULE
ScrollToVerticalPosition(float, uint32_t, CYITimeInterpolator*)
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.

See also
GetVerticalMagnets()
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)
See also
OVERPULL_RULE
void CYIScrollingView::SetVerticalScrollingAreaLayoutMode ( LAYOUT_MODE  eMode)
See also
LAYOUT_MODE
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.

Note
If bSwipeOneItem is true and magnets are disabled vertically, one item is considered to be the height of the scrolling view.
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.

Note
The default is 0.3.
virtual void CYIScrollingView::SizeChanged ( )
overrideprotectedvirtual

Called when the size of this scene node has been changed.

Warning
Overrides must call the base class implementation.
See also
OnSizeChanged()

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.

virtual void CYIScrollingView::UpdateEnd ( )
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.

Warning
The dirty flag will be cleared prior to calling this function to allow new dirty state to be recorded from this function. If querying information about the dirty state of the node, use GetPreviousDirtyFlag().
Overrides must call the base class implementation.
See also
Update()
OnUpdateEnd()

Reimplemented from CYISceneNode.

virtual void CYIScrollingView::WorldBoundingBoxUpdated ( )
overrideprotectedvirtual

Called by Update() when the world bounding box update process is complete. Subclasses may overload this function to do post-processing.

Warning
The dirty flag will be cleared prior to calling this function to allow new dirty state to be recorded from this function. If querying information about the dirty state of the node, use GetPreviousDirtyFlag().
Overrides must call the base class implementation.
See also
Update()
OnWorldBoundingBoxUpdated()

Reimplemented from CYISceneView.

Reimplemented in CYIListView.

Member Data Documentation

CYISignal<CYISceneNode*> CYIScrollingView::ChildEnteredVisibleRegion

Emitted when a child of the CYIScrollingView has entered the visible region.

See also
IsInVisibleRegion()
CYISignal<CYISceneNode*> CYIScrollingView::ChildLeftVisibleRegion

Emitted when a child of the CYIScrollingView has left the visible region.

See also
IsInVisibleRegion()
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.

See also
InteractionBegan
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.

See also
InteractionEnded
CYISignal CYIScrollingView::InteractionBegan

Emitted when user begins interacting with the scrolling view.

See also
HorizontalScrollingBegan
VerticalScrollingBegan
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.

See also
HorizontalScrollingEnded
VerticalScrollingEnded
uint32_t CYIScrollingView::m_uFocusScrollDuration
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.

See also
InteractionBegan
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.

See also
InteractionEnded

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