You.i Engine
CYIScrollingTextView Class Reference

Detailed Description

A class that implements a scrolling text block. Each paragraph of text is split into a separate view that is dynamically streamed in and out as needed to improve performance.

Before text can be set in this view, the SetListItemTemplateName() function must be called with a template name. That template will be used to build each paragraph of text, and the template's composition must include a text node named 'Placeholder-Text'.

The scrolling text view supports resizing: when the view is resized, its list item views are also resized such that their width matches the scrolling text view's width. The box width of the text nodes in those list item views is also resized proportionally.

View Template Specification

Type Labels Property Description
Node Placeholder-Text Required must be CYITextSceneNode class


Ideally, the list item should contain a single text scene node layer, aligned to the top-left portion of the composition. The composition should be high enough to accommodate the largest paragraph that could be added to this text view. The text layer should be paragraph text with the same width and height as the composition. Note that if the composition or text layer height is too low, paragraphs may get rendered incorrectly.

This view must be focusable (and have a FocusIn timeline) in order for it to be scrollable using arrow keys or trackpad gestures.

#include <view/YiScrollingTextView.h>

Inheritance diagram for CYIScrollingTextView:

Public Member Functions

 CYIScrollingTextView ()
virtual bool Init () override
bool SetListItemTemplateName (const CYIString &templateName)
void SetText (const CYIString &text)
const CYIStringGetText () const
void SetMarkedUpText (const CYIString &markedUpText, CYITextMarkupParser *pMarkupParser=nullptr, const CYICustomMarkupTagsProvider *pExternalTagsProvider=nullptr)
const CYIStringGetMarkedUpText () const
void Clear ()
void SetCurrentPercentage (float percentageScrolled, uint32_t durationMs=0, CYITimeInterpolator *pInterpolator=nullptr)
float GetCurrentPercentage () const
float GetContentSize () const
void SetXJustify (CYITextSceneNode::Justification xJustify)
CYITextSceneNode::Justification GetXJustify () const
virtual bool HandleEvent (const std::shared_ptr< CYIEventDispatcher > &pDispatcher, CYIEvent *pEvent) override
virtual bool HandlesFocusInDescendants () const override
virtual bool RequestFocus (CYIFocus::Direction direction=CYIFocus::Direction::Forward, CYIFocus::FocusRootRule focusRootRule=CYIFocus::FocusRootRule::DescendantsUpdateContext, const CYIAABB &previousFocusRect=CYIAABB(), const CYIFocusSearchOptions &options=CYIFocusSearchOptions()) override
- Public Member Functions inherited from CYIListView
 CYIListView ()
virtual ~CYIListView ()
void SetAdapter (std::unique_ptr< CYINodeAdapter > pAdapter)
const CYINodeAdapterGetAdapter () const
CYINodeAdapterGetAdapter ()
bool RequestFocusOnItem (size_t index, CYIFocus::Direction direction=CYIFocus::Direction::Forward, CYIFocus::FocusRootRule focusRootRule=CYIFocus::FocusRootRule::DescendantsUpdateContext, const CYIAABB &previousFocusRect=CYIAABB())
bool IsStreamedIn (size_t index) const
CYISceneNodeGetStreamedNode (size_t index) const
size_t GetItemIndex (CYISceneNode *pStreamedItem) const
size_t GetFocusedItemIndex () const
void SetStreamingRegionFactor (float factor)
float GetStreamingRegionFactor () const
void SetItemProperties (const CYIString &viewTemplateName, std::unique_ptr< IYIPropertiesSource > pProperties)
IYIPropertiesSourceGetItemProperties (const CYIString &viewTemplateName) const
virtual void RevealItem (size_t index, uint32_t duration, CYITimeInterpolator *pInterpolator=nullptr)
bool IsInVisibleRegion (size_t index) const
size_t GetChildIndex (size_t itemIndex) const
- Public Member Functions inherited from CYIScrollingView
 CYIScrollingView ()
virtual ~CYIScrollingView ()
void ScrollToHorizontalPosition (float normalizedPosition, uint32_t durationMs, CYITimeInterpolator *pInterpolator=nullptr)
void ScrollToHorizontalPosition (float normalizedPosition)
void ScrollToVerticalPosition (float normalizedPosition, uint32_t durationMs, CYITimeInterpolator *pInterpolator=nullptr)
void ScrollToVerticalPosition (float normalizedPosition)
void ScrollToPosition (const glm::vec2 &normalizedPositions, uint32_t durationMs=0, CYITimeInterpolator *pInterpolator=nullptr)
void ScrollByHorizontalViewSize (ScrollDirection scrollDirection, uint32_t durationMs=0, CYITimeInterpolator *pInterpolator=nullptr)
void ScrollByVerticalViewSize (ScrollDirection scrollDirection, uint32_t durationMs=0, CYITimeInterpolator *pInterpolator=nullptr)
float GetHorizontalPosition () const
float GetVerticalPosition () const
void Reveal (CYISceneNode *pNode, uint32_t durationMs, CYITimeInterpolator *pInterpolator=nullptr)
void DisableHorizontalScrolling ()
void EnableHorizontalScrolling ()
void SetHorizontalScrollingEnabled (bool enabled)
bool IsHorizontalScrollingEnabled () const
void DisableVerticalScrolling ()
void EnableVerticalScrolling ()
void SetVerticalScrollingEnabled (bool enabled)
bool IsVerticalScrollingEnabled () const
void SetHorizontalOverpullDistance (float distance)
float GetHorizontalOverpullDistance () const
void SetVerticalOverpullDistance (float distance)
float GetVerticalOverpullDistance () const
void SetHorizontalOverpullRule (OverpullRule rule)
void SetVerticalOverpullRule (OverpullRule rule)
OverpullRule GetHorizontalOverpullRule () const
OverpullRule GetVerticalOverpullRule () const
void SetHorizontalScrollingAreaLayoutMode (LayoutMode mode)
void SetVerticalScrollingAreaLayoutMode (LayoutMode mode)
LayoutMode GetHorizontalScrollingAreaLayoutMode () const
LayoutMode GetVerticalScrollingAreaLayoutMode () const
bool HasHorizontalOverflow () const
bool HasVerticalOverflow () const
const CYIAABBGetScrollableRegion () const
void StopScrolling ()
void StopHorizontalScrolling ()
void StopVerticalScrolling ()
void SetHorizontalCarouselRule (CarouselRule carouselRule)
void SetVerticalCarouselRule (CarouselRule carouselRule)
CarouselRule GetHorizontalCarouselRule () const
CarouselRule GetVerticalCarouselRule () const
void SetCascadeTimelineGroupDelay (uint32_t delayMs)
uint32_t GetCascadeTimelineGroupDelay () const
CYITimelineGroupGetCascadeTimelineGroup (TimelineType type=TimelineType::In)
bool IsInVisibleRegion (const CYISceneNode *pCandidate) const
void SetHorizontalMagnets (const Magnets &magnets)
void RemoveHorizontalMagnets ()
Magnets GetHorizontalMagnets () const
void SetHorizontalSwipeOneItemEnabled (bool swipeOneItem)
bool IsHorizontalSwipeOneItemEnabled () const
void SetVerticalMagnets (const Magnets &magnets)
void RemoveVerticalMagnets ()
Magnets GetVerticalMagnets () const
void SetVerticalSwipeOneItemEnabled (bool swipeOneItem)
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 friction)
float GetVerticalTrackpadLeaveFriction () const
void SetVerticalTrackpadLeaveFriction (float friction)
size_t GetHorizontalPageCount () const
size_t GetCurrentHorizontalPage () const
size_t GetVerticalPageCount () const
size_t GetCurrentVerticalPage () const
void SetHorizontalPagingStrategy (std::unique_ptr< PagingStrategy > PagingStrategy)
void SetVerticalPagingStrategy (std::unique_ptr< PagingStrategy > PagingStrategy)
const std::set< CYISceneNode * > & GetVisibleChildren () const
virtual void OnPreBuildDrawList (std::vector< IYIRenderer::Command > *pDrawList, std::vector< CYIAbstractCameraSceneNode *> *pDrawWithCameraList) override
CameraType GetCameraType () const
virtual bool ContainsFocusableDescendant (const CYIFocusSearchOptions &options=CYIFocusSearchOptions()) const override
virtual CYISceneViewFindNextFocusInDescendants (const CYISceneView *pCurrentFocusView, CYIFocus::Direction direction, CYIAABB &screenSpaceFocusRegion, const CYIFocusSearchOptions &options=CYIFocusSearchOptions()) const override
virtual void FocusChangedInDescendants (CYISceneNode *pNewNodeWithFocus, CYISceneNode *pPreviousNodeWithFocus) override
virtual void FocusGainedInDescendants (CYISceneNode *pNewNodeWithFocus, CYISceneNode *pPreviousNodeWithFocus) override
- Public Member Functions inherited from CYISceneView
 CYISceneView ()
virtual ~CYISceneView ()
bool BuildFromTemplate (CYISceneManager *pSceneManager, const std::shared_ptr< CYIAssetViewTemplate > &pAssetViewTemplate, CYISceneManager::MissingClassHandlingMode missingHandlingMode=CYISceneManager::MissingClassHandlingMode::Abort)
bool IsInitialized () const
void SetClippingAreaNode (CYISceneNode *pClippingNode)
virtual CYIOptional< CYIStringViewGetProperty (CYIStringView propertyName) const override
bool GetProperty (CYIStringView propertyName, CYIString *pValue) const
virtual std::map< CYIString, CYIStringGetProperties () const override
virtual void ForEachProperty (const std::function< void(const CYIString &, const CYIString &)> &action) const override
virtual bool HasProperties () const override
void EnableDefaultHitZone ()
bool IsResponsiveLayoutEnabled () const
void EnableResponsiveLayout ()
void DisableResponsiveLayout ()
void AddAnchor (EYIAnchorType anchorType)
YI_ANCHOR_DATA GetAnchor (EYIAnchorType anchorType) const
virtual const CYISceneView::AssetRequirementGetAssetRequirements (uint32_t *pRequirementCount)
CYIAbstractTimelineGetInTimeline () const
CYIAbstractTimelineGetOutTimeline () const
CYIAbstractTimelineGetFocusInTimeline () const
CYIAbstractTimelineGetFocusOutTimeline () const
bool HasFocus () const
void SetFocusable (bool focusable)
bool IsFocusable () const
bool CanBeFocused () const
void SetNextFocus (CYISceneView *pView, CYIFocus::Direction direction)
CYISceneViewGetNextFocus (CYIFocus::Direction direction) const
virtual void SetInitiallyFocusedView (CYISceneView *pView, InitialFocusLifetime initialFocusLifetime=InitialFocusLifetime::Persistent)
CYISceneViewGetInitiallyFocusedView () const
CYISceneView::InitialFocusLifetime GetInitialFocusLifetime () const
CYISceneViewFindNextFocus (CYIFocus::Direction direction, const CYIFocusSearchOptions &options=CYIFocusSearchOptions()) const
CYISceneViewFindNextFocus (CYIFocus::Direction direction, 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 ()
template<typename T >
T * BuildTimeline (const CYIString &markerName)
CYITimelineBuildTimeline (const CYIString &markerName, int32_t startOffset, int32_t duration)
CYIAbstractTimelineGetTimeline (CYIMarkerData::ID id)
virtual CYIAbstractTimelineGetTimeline (CYIStringView markerName, TimelineGetMode mode=TimelineGetMode::GetDefault)
std::map< CYIString, CYITimeline * > GetSimpleTimelines () const
std::map< CYIString, CYIAbstractTimeline * > GetTimelines () const
bool FindTimeline (CYIAbstractTimeline *&pTimeline, CYIStringView markerName, FetchType type, const CYIString &tag="", TimelineGetMode mode=TimelineGetMode::GetDefault)
CYITimelineGroupGetTimelineGroup (CYIStringView 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 ()
bool IsInitialized () const
void ForceDirty ()
void SetDirtyFlag (DirtyFlag dirtyFlag)
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 id)
uint64_t GetUniqueID () const
bool AddChild (std::unique_ptr< CYISceneNode > pSceneNode)
bool AddChild (std::unique_ptr< CYISceneNode >, size_t index)
bool InsertChildAfter (CYISceneNode *pRefNode, std::unique_ptr< CYISceneNode > pSceneNode)
std::unique_ptr< CYISceneNodeRemoveChild (CYISceneNode *pSceneNode)
bool ReorderChild (size_t fromIndex, size_t toIndex)
CYITransformGetTransform ()
CYISceneNodeGetParent () const
bool ChangeParent (CYISceneNode *pParent)
CYISceneNodeGetDrawParent () const
bool IsAncestorOf (const CYISceneNode *pNode) const
CYISceneManagerGetSceneManager () const
size_t GetChildCount () const
uint32_t GetChildCountRecursive () const
CYISceneNodeGetChild (size_t index) const
Iterator begin (Iterator::Mode mode=Iterator::Mode::ImmediateChildren) const
Iterator end (Iterator::Mode mode=Iterator::Mode::ImmediateChildren) const
ReverseIterator rbegin (Iterator::Mode mode=Iterator::Mode::ImmediateChildren) const
ReverseIterator rend (Iterator::Mode mode=Iterator::Mode::ImmediateChildren) const
CYISceneNodeGetChild (const CYIString &name) const
size_t GetDrawChildCount () const
CYISceneNodeGetDrawChild (size_t index) const
CYISceneNodeGetDrawChildByID (int32_t id) const
template<class YI_SCENE_NODE_SUBCLASS >
YI_SCENE_NODE_SUBCLASS * GetChild (uint32_t targetMatchedNodeCount=1) const
template<class YI_SCENE_NODE_SUBCLASS >
std::list< YI_SCENE_NODE_SUBCLASS * > GetChildren () const
template<class YI_SCENE_NODE_SUBCLASS >
std::list< YI_SCENE_NODE_SUBCLASS * > GetDrawChildren () const
size_t GetIndexOfChild (const CYISceneNode *pSceneNode) const
size_t GetIndexOfDrawChild (const CYISceneNode *pSceneNode) const
void Show ()
void Hide ()
void SetVisibility (bool visible)
void SetOpacity (float opacity)
float GetCompositeOpacity () const
float GetLocalOpacity () const
bool IsVisible () const
bool IsTrulyVisible () const
bool IsPerceptible () const
CYISceneNodeGetNode (CYIStringView name)
CYISceneNodeGetNode (CYIStringView 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 (CYIStringView name)
CYISceneNodeGetNode (const int32_t id)
CYISceneNodeGetNode (const int32_t id, const CYIRuntimeTypeInfo &enforceClassType)
CYISceneNodeGetNodeWithUniqueID (uint64_t uniqueID)
template<class YI_SCENE_NODE_SUBCLASS >
bool FindNode (YI_SCENE_NODE_SUBCLASS *&pNode, CYIStringView nodeName, FetchType type, const CYIString &tag)
std::list< CYISceneNode * > GetNodes (CYIStringView name)
std::list< CYISceneNode * > GetNodes (int32_t id)
std::list< CYISceneNode * > GetNodes (const CYIRuntimeTypeInfo &enforceClassType)
template<class YI_SCENE_NODE_SUBCLASS >
const YI_SCENE_NODE_SUBCLASS * GetNode (uint32_t targetMatchedNodeCount=1) const
template<class YI_SCENE_NODE_SUBCLASS >
YI_SCENE_NODE_SUBCLASS * GetNode (uint32_t targetMatchedNodeCount=1)
void SetMesh (const std::shared_ptr< CYIMesh > &pMesh)
bool SetNPatchBitmap (const std::shared_ptr< CYIBitmap > &pNPatchBitmap)
void ClearNPatch ()
void SetMaterial (const std::shared_ptr< CYIMaterial > &pMaterial, size_t index=0)
void AddEffect (const std::shared_ptr< CYIEffect > &pEffect)
void RemoveEffect (const std::shared_ptr< CYIEffect > &pEffect)
size_t GetEffectCount () const
const std::shared_ptr< CYIEffect > & GetEffect (size_t index) const
void ConnectEffectsToTimelines (const CYITimelineTrack *pTrack)
void AddMask (std::unique_ptr< CYIMask > pMask)
std::unique_ptr< CYIMaskRemoveMask (const CYIMask *pMask)
size_t GetMaskCount () const
const CYIMaskGetMask (size_t index) const
CYIMaskGetMask (size_t index)
const std::shared_ptr< CYIMesh > & GetMesh () const
const std::shared_ptr< CYIBitmap > & GetNPatchBitmap () const
size_t GetMaterialCount () const
const std::shared_ptr< CYIMaterial > & GetMaterial (size_t index=0) const
const std::shared_ptr< IYIUniformBufferObject > & GetShaderUniforms () const
void SetMeshTransform (const glm::mat4 &transform)
void DestroyChildren ()
glm::mat4 GetLocalTransform () 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
virtual void OnPostBuildDrawList (std::vector< IYIRenderer::Command > *pDrawList)
const CYIAABBGetWorldAABB () const
const CYIAABBGetLocalAABB () const
void SetAnchorPoint (const glm::vec3 &anchorPoint)
void SetAnchorPoint (float x, float y, float z)
void SetAnchorPointX (float x)
void SetAnchorPointY (float y)
void SetAnchorPointZ (float z)
void SetPosition (const glm::vec3 &position)
void SetPosition (float x, float y, float z)
void SetPositionX (float x)
void SetPositionY (float y)
void SetPositionZ (float z)
void SetRotation (const glm::vec3 &rotation)
void SetRotation (float pitchDegrees, float yawDegrees, float rollDegrees)
void SetRotationX (float pitchDegrees)
void SetRotationY (float yawDegrees)
void SetRotationZ (float rollDegrees)
void SetOrientation (float pitchDegrees, float yawDegrees, float rollDegrees)
void SetOrientation (const glm::quat &orientation)
void SetScale (const glm::vec3 &scale)
void SetScale (float factorX, float factorY, float factorZ)
void SetScaleX (float factor)
void SetScaleY (float factor)
void SetScaleZ (float factor)
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 &size, bool dirtyLayout=true)
const glm::vec3 & GetSize () const
const glm::vec3 & GetInitialSize () const
void SetMeasuredSize (const glm::vec3 &measuredSize)
const glm::vec3 & GetMeasuredSize () const
void SetInternalCustomTimelineValue (uint32_t trackID, const CYIVariant &value)
virtual void SetCustomTimelineValue (uint32_t trackID, const CYIVariant &value)
void SetClippingOn ()
void SetClippingOff ()
bool GetClipping () const
void SetClippingBox (const CYIAABB &worldBox)
const CYIAABBGetClippingBox () const
void StartPropertyAnimation (PropertyAnimation::Type propType, float from, float to, uint32_t durMs, CYITimeInterpolator *pTimeInterpolator=nullptr, bool dirtyLayout=true)
void StopPropertyAnimation (PropertyAnimation::Type propType)
void UpdateLocalSpaceCollision (CYIActionEvent *pActionEvent)
void UpdateEventForLocalSpace (CYIActionEvent *pActionEvent, glm::vec3 &rayOrigin, glm::vec3 &rayNonOriginPoint) const
bool IsBoundingBoxHit (const CYIRay &worldSpaceRay) const
bool IsMeshHit (const CYIRay &worldSpaceRay) const
void DumpTree () const
void StartCaptureKeyboardEvents ()
void StopCaptureKeyboardEvents ()
void StartCaptureTrackpadEvents ()
void StopCaptureTrackpadEvents ()
void StartCapturePointerEvents (uint8_t pointerID)
void StopCapturePointerEvents (uint8_t pointerID)
bool DrawBehindChildren (CYISceneNode *pSceneNode, bool *pChanged=nullptr)
bool DrawInFrontOfChildren (CYISceneNode *pSceneNode, bool *pChanged=nullptr)
bool DrawBehind (CYISceneNode *pSceneNode, bool *pChanged=nullptr)
bool DrawInFront (CYISceneNode *pSceneNode, bool *pChanged=nullptr)
bool IsFocusRoot () const
void SetIsFocusRoot (bool isFocusRoot)
virtual void OnFocusGainedInDescendants (CYISceneNode *pNewNodeWithFocus, CYISceneNode *pPreviousNodeWithFocus)
virtual void OnFocusLostInDescendants (CYISceneNode *pNewNodeWithFocus, CYISceneNode *pPreviousNodeWithFocus)
virtual void FocusLostInDescendants (CYISceneNode *pNewNodeWithFocus, CYISceneNode *pPreviousNodeWithFocus)
virtual void OnFocusChangedInDescendants (CYISceneNode *pNewNodeWithFocus, CYISceneNode *pPreviousNodeWithFocus)
void SetUseLocalTransformAndAlpha (bool use)
bool GetProperty (CYIStringView propertyName, CYIString *pValue) const
void SetProperty (const CYIString &propertyName, const CYIString &propertyValue)
std::shared_ptr< CYISceneNodeProxyGetSceneNodeProxy () const
void SetLayoutConfig (std::unique_ptr< CYILayoutConfig > pLayoutConfig)
const CYILayoutConfigGetLayoutConfig (LayoutConfigFetchMode fetchMode=LayoutConfigFetchMode::LazyInstantiate) const
CYILayoutConfigGetLayoutConfig (LayoutConfigFetchMode fetchMode=LayoutConfigFetchMode::LazyInstantiate)
void SetLayoutState (std::unique_ptr< CYILayoutState > pLayoutState)
const CYILayoutStateGetLayoutState () const
CYILayoutStateGetLayoutState ()
void RequestLayout ()
LayoutDirtyFlag GetLayoutDirtyFlag () const
virtual void SetLayoutDirtyFlag (LayoutDirtyFlag flag)
CYIAccessibilityAttributes::Accessible GetAccessible () const
void SetAccessible (CYIAccessibilityAttributes::Accessible accessible)
const CYIAccessibilityAttributesGetAccessibilityAttributes () const
std::unique_ptr< CYIAccessibilityAttributesTakeAccessibilityAttributes ()
void SetAccessibilityAttributes (std::unique_ptr< CYIAccessibilityAttributes > pAttributes)
const CYIRenderableGetRenderable () const
template<typename T >
bool CanCastTo () const
CYIAdjustmentLayerSceneNode * GetLastAdjustmentLayer () const
- Public Member Functions inherited from CYIEventTarget
 CYIEventTarget ()
virtual ~CYIEventTarget ()
bool AddEventListener (CYIEvent::Type eventType, CYIEventHandler *pListener, CYIEventTarget::Phase phase=CYIEventTarget::Phase::Bubble)
bool RemoveEventListener (CYIEvent::Type eventType, CYIEventHandler *pListener, CYIEventTarget::Phase phase=CYIEventTarget::Phase::Bubble)
void SetSpecialTypeFlag (SpecialEventTargetType type)
void ClearSpecialTypeFlag (SpecialEventTargetType type)
SpecialEventTargetType GetSpecialTypes () const
const std::shared_ptr< CYIEventTargetProxy > & GetProxy () const
- Public Member Functions inherited from CYISignalHandler
 CYISignalHandler ()
 CYISignalHandler (const CYISignalHandler &signalHandler)
virtual ~CYISignalHandler ()
CYISignalHandleroperator= (const CYISignalHandler &signalHandler)
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 &threadAffinity)
virtual bool IsConnected () const
virtual bool IsConnected (const CYISignalBase &signal) const
void Disconnect (CYISignalBase &signal)
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 ()=default
bool GetProperty (CYIStringView propertyName, CYIString *pValue) const
- 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 enable)
- Public Member Functions inherited from CYIScrollController::ScrollListener
virtual ~ScrollListener ()
- Public Member Functions inherited from CYITime::UpdateListener
 UpdateListener ()
virtual ~UpdateListener ()
virtual bool GetDisablesInput ()

Additional Inherited Members

- Public Types inherited from CYIScrollingView
enum  OverpullRule {
enum  LayoutMode {
enum  CarouselRule {
enum  TimelineType {
  TimelineType::In = 0,
enum  MagnetsType {
enum  ScrollDirection {
enum  CameraType {
- Public Types inherited from CYISceneView
enum  TimelineGetMode {
enum  InitialFocusLifetime {
- Public Types inherited from CYISceneNode
enum  LayoutDirtyFlag : uint8_t {
enum  LayoutConfigFetchMode {
  LayoutConfigFetchMode::DoNotLazyInstantiate = 0,
enum  MeasureMode {
enum  FetchType {
  FetchType::Optional = 0,
typedef std::reverse_iterator< IteratorReverseIterator
typedef uint16_t DirtyFlag
- Public Types inherited from CYIEventTarget
enum  SpecialEventTargetType : uint8_t {
  SpecialEventTargetType::None = 0x00,
  SpecialEventTargetType::NoPick = 0x20
enum  Phase : uint8_t {
- Static Public Member Functions inherited from CYISceneView
static void RegisterAllViews ()
- Static Public Member Functions inherited from CYISceneNode
static void RegisterAllSceneNodes ()
- Public Attributes inherited from CYIListView
CYISignal< size_t, CYISceneNode * > ItemEnteredVisibleRegion
CYISignal< size_t, CYISceneNode * > ItemLeftVisibleRegion
CYISignal< size_t, CYISceneNode * > ItemGainedFocus
CYISignal< size_t, CYISceneNode * > ItemLostFocus
- Public Attributes inherited from CYIScrollingView
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
CYISignal< size_t, size_tHorizontalPageChanged
CYISignal< size_t, size_tHorizontalPageCountChanged
CYISignal< size_t, size_tVerticalPageChanged
CYISignal< size_t, size_tVerticalPageCountChanged
- Public Attributes inherited from CYISceneView
CYISignal< CYISceneView *, CYISceneView *> GainedFocus
 Emitted when focus has entered this view. The first signal argument is the view that gained focus (e.g. the current view) and the second signal argument is the view that lost focus. More...
CYISignal< CYISceneView *, CYISceneView *> LostFocus
 Emitted when focus has left this view. The first signal argument is the view that lost focus (e.g. the current view) and the second signal argument is the view that gained focus. More...
- Public Attributes inherited from CYISceneNode
CYISignal< CYISceneNode *, PropertyAnimation::TypePropertyAnimationComplete
CYISignal< CYISceneNode *, CYISceneNode *> DescendantGainedFocus
 Emitted when focus has entered this tree. The first signal parameter is the new node with focus, and the second signal parameter is the previous node with focus. More...
CYISignal< CYISceneNode *, CYISceneNode *> DescendantLostFocus
 Emitted when focus has left this tree. The first signal parameter is the new node with focus, and the second signal parameter is the previous node with focus. More...
CYISignal< CYISceneNode *, CYISceneNode *> DescendantsChangedFocus
 Emitted when focus has changed within this tree. This signal is called only if focus was previously within this tree and focus is now on a different node (but still within this tree). The first signal parameter is the new node with focus, and the second signal parameter is the previous node with focus. More...
CYISignal< CYIAccessibilityAttributes::AccessibleAccessibleStateChanged
 Emitted when accessible state changed. More...
- Static Public Attributes inherited from CYISceneNode
static constexpr DirtyFlag DirtyClean = 0x0000
static constexpr DirtyFlag DirtySceneGraph = 0x0001
static constexpr DirtyFlag DirtyVisibility = 0x0002
static constexpr DirtyFlag DirtyOpacity = 0x0004
static constexpr DirtyFlag DirtyLocalTransform = 0x0008
static constexpr DirtyFlag DirtyWorldTransform = 0x0010
static constexpr DirtyFlag DirtyUniform = 0x0020
static constexpr DirtyFlag DirtyWorldBoundingBox = 0x0040
static constexpr DirtyFlag DirtyMesh = 0x0080
static constexpr DirtyFlag DirtyWorldSurfaceScale = 0x0100
static constexpr DirtyFlag DirtyWorldScale = 0x0200
static constexpr DirtyFlag DirtyLocalBoundingBox = 0x0400
static constexpr DirtyFlag DirtyEverything = (DirtySceneGraph | DirtyVisibility | DirtyOpacity | DirtyLocalTransform | DirtyWorldTransform | DirtyUniform | DirtyWorldBoundingBox | DirtyWorldSurfaceScale | DirtyWorldScale | DirtyLocalBoundingBox)
- Static Public Attributes inherited from CYITime::UpdateListener
static const uint32_t DEFAULT_UPDATE_PRIORITY = 0
- Protected Types inherited from CYIScrollingView
enum  Direction {
- Protected Member Functions inherited from CYIListView
virtual std::unique_ptr< CYILayoutCreateDefaultLayoutInstance () const
virtual void OnStreamedIn (size_t index, CYISceneNode *pStreamedItem) override
virtual void OnStreamedOut (size_t index, CYISceneNode *pStreamedItem) override
virtual void FocusGainedForItem (size_t index) override
virtual void OnFocusGainedForItem (size_t index) override
virtual void FocusLostForItem (size_t index) override
virtual void OnFocusLostForItem (size_t index) override
virtual void WorldBoundingBoxUpdated () override
virtual void ApplyMeasurements () override
void UpdateStreamedStateOfAllItems ()
virtual void ParseProperties () override
virtual void ChildVisibilityInVisibleRegionChanged (CYISceneNode *pChild, bool isInVisibleRegion) override
virtual void ChildMovedInVisibleRegion (CYISceneNode *pChild, const glm::vec2 &normalizedPosition) override
virtual CYIAbstractTimelineGetCascadeTimelineFor (TimelineType type, CYISceneView *pView) override
virtual void UpdateHorizontalPagingStrategyImpl () override
virtual void UpdateVerticalPagingStrategyImpl () override
- Protected Member Functions inherited from CYIScrollingView
CYIScrollControllerGetScrollController (Direction direction) const
void ConfigureScrollControllers ()
virtual bool BroadcastEvent (const std::shared_ptr< CYIEventDispatcher > &pDispatcher, CYIEvent *pEvent) override
void ConfigureScrollingRange (Direction direction, float contentSize)
void ConfigureOverpull (Direction direction, float viewSize)
void ConfigureMagnets (Direction direction, float viewSize, float oldViewSize)
virtual void Measure (const MeasureSpec &widthSpec, const MeasureSpec &heightSpec, const MeasureSpec &depthSpec) override
virtual void ChildAdded (CYISceneNode *pChild) override
virtual void ChildRemoved (CYISceneNode *pChild) override
virtual void Reveal (CYISceneNode *pNode, uint32_t durationMs, ScrollDirection horizontalDirection, ScrollDirection verticalDirection, CYITimeInterpolator *pInterpolator=nullptr)
virtual CYIAABB CalculateScrollableRegion () const
CYIAABB CalculateContentSize () const
bool IsInExpandedVisibleRegion (const CYISceneNode *pCandidate, float visibleRegionMultiplier) const
void CheckAndNotifyVisibilityInVisibilityRegion (CYISceneNode *pChild)
virtual void OnChildVisibilityInVisibleRegionChanged (CYISceneNode *pChild, bool isInVisibleRegion)
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 direction) const
CYITimelineGroupGetCascadeTimelineGroup (TimelineType type, bool updateTimeline)
virtual std::map< CYISceneView *, uint64_t > GetTotalCascadeDelayFor (TimelineType type, const std::vector< ViewAndDistance > &visibleViews)
virtual bool OnFrameTimeUpdated (std::chrono::microseconds frameTime) override
virtual CYIAbstractCameraSceneNodeFindActiveCamera (const CYISceneNode *pTargetSceneNode=nullptr) const override
float GetScrollDeltaToNodeInFocusPosition (Direction direction, CYISceneNode *pNode) const
void UpdateHorizontalPagingStrategy ()
void UpdateVerticalPagingStrategy ()
- 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 ()
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 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 OnChildVisibilityChanged (CYISceneNode *pChild)
virtual void OnDrawOrderChanged ()
LayoutDirtyFlag GetCurrentLayoutDirtyFlag () const
virtual CYIString GetDumpTreeString () const
void DumpTree (int32_t indentLevel) const
virtual void SetCustomUniforms ()
template<class T >
void SetNodeType ()
virtual CYISceneNodeGetNodeFromChildren (CYIStringView name)
virtual CYISceneNodeGetNodeFromChildren (const int32_t id)
virtual CYISceneNodeGetNodeFromChildren (const CYIRuntimeTypeInfo &enforceClassType)
CYISceneNodeGetNodeFromChildrenAfterTarget (const CYIRuntimeTypeInfo &enforceClassType, bool *pTargetReached, CYISceneNode *pStartAfterTarget)
- Static Protected Member Functions inherited from CYIScrollingView
static const CYIStringDirectionToString (Direction direction)
- Protected Attributes inherited from CYIScrollingView
uint32_t m_focusScrollDuration
std::unique_ptr< PagingStrategym_horizontalPagingStrategy
std::unique_ptr< PagingStrategym_verticalPagingStrategy
- Protected Attributes inherited from CYISceneView
bool m_stopEventPropagation
bool m_responsiveLayoutEnabled
bool m_sceneTreeBuilt
bool m_inAnimatedPosition
std::unique_ptr< CYILayoutm_pLayout
std::shared_ptr< CYIAssetViewTemplatem_pAssetViewTemplate
std::shared_ptr< CYISceneNodeProxym_pInitiallyFocusedView
InitialFocusLifetime m_initialFocusLifetime
std::multimap< EYIAnchorType, YI_ANCHOR_DATAm_anchors
std::map< CYIString, std::unique_ptr< CYITimeline >, std::less< void > > m_timelines
std::map< CYIString, std::unique_ptr< CYIParallelTimelineGroup >, std::less< void > > m_timelineGroups
std::map< CYIString, std::unique_ptr< CYIAbstractTimeline >, std::less< void > > m_externalTimelines
- Protected Attributes inherited from CYISceneNode
CYIString m_name
std::vector< std::unique_ptr< CYISceneNode > > m_children
std::vector< CYISceneNode * > m_drawChildren
std::map< CYIString, CYIString, std::less< void > > m_Properties
std::vector< std::shared_ptr< CYIEffect > > m_Effects
std::vector< std::unique_ptr< PropertyAnimation > > m_propertyAnimations
float m_localOpacity
std::unique_ptr< CYITransformm_pTransform
glm::vec3 m_size
glm::vec3 m_initialSize
glm::vec3 m_measuredSize
glm::vec3 m_vlsLastCollision
bool m_clip
bool m_localVisibility
int32_t m_id
uint64_t m_guid
std::unique_ptr< CYINPatch > m_pNPatch
std::shared_ptr< CYIBitmapm_pNPatchBitmap
std::shared_ptr< CYIRenderablem_pRenderable
- Protected Attributes inherited from CYIEventTarget
std::vector< EventListenerEntry > m_listeners
SpecialEventTargetType m_specialTypes
std::shared_ptr< CYIEventTargetProxym_pEventTargetProxy
- Protected Attributes inherited from CYIEventHandler
bool m_enableEvents

Constructor & Destructor Documentation

◆ CYIScrollingTextView()

CYIScrollingTextView::CYIScrollingTextView ( )

Member Function Documentation

◆ Clear()

void CYIScrollingTextView::Clear ( )

Removes and deletes all text items in the list. This will also reset the scroll position in the list to its initial value.

◆ GetContentSize()

float CYIScrollingTextView::GetContentSize ( ) const

Returns the current content size of the list. This is the cumulative size of the items in the list

◆ GetCurrentPercentage()

float CYIScrollingTextView::GetCurrentPercentage ( ) const

Gets the scrolling position as a percentage. The returned value is in the range of 0.0f and 1.0f.

◆ GetMarkedUpText()

const CYIString& CYIScrollingTextView::GetMarkedUpText ( ) const

Returns the marked up text. This is the unparsed text that was originally passed to the SetMarkedUpText function. If SetText was used instead of SetMarkedUpText , this function returns the same value as GetText .

◆ GetText()

const CYIString& CYIScrollingTextView::GetText ( ) const

Returns the text displayed in this scrolling view.

If marked up text was assigned using the SetMarkedUpText function, this function will return the text with the markup tags removed.

◆ GetXJustify()

CYITextSceneNode::Justification CYIScrollingTextView::GetXJustify ( ) const

Gets the text alignment.

See also

◆ HandleEvent()

virtual bool CYIScrollingTextView::HandleEvent ( const std::shared_ptr< CYIEventDispatcher > &  pDispatcher,
CYIEvent pEvent 

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

◆ HandlesFocusInDescendants()

virtual bool CYIScrollingTextView::HandlesFocusInDescendants ( ) const

Returns true to indicate that this view handles focus in its descendants.

Reimplemented from CYIScrollingView.

◆ Init()

virtual bool CYIScrollingTextView::Init ( )

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

This must be called after CYISceneView::BuildFromTemplate()

Reimplemented from CYIListView.

◆ RequestFocus()

virtual bool CYIScrollingTextView::RequestFocus ( CYIFocus::Direction  direction = CYIFocus::Direction::Forward,
CYIFocus::FocusRootRule  focusRootRule = CYIFocus::FocusRootRule::DescendantsUpdateContext,
const CYIAABB previousFocusRect = CYIAABB(),
const CYIFocusSearchOptions options = CYIFocusSearchOptions() 

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

◆ SetCurrentPercentage()

void CYIScrollingTextView::SetCurrentPercentage ( float  percentageScrolled,
uint32_t  durationMs = 0,
CYITimeInterpolator pInterpolator = nullptr 

Scrolls the view to percentageScrolled 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 durationMs 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 percentageScrolled is [0..1]. Values outside of this range will be clamped.

When durationMs 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.

◆ SetListItemTemplateName()

bool CYIScrollingTextView::SetListItemTemplateName ( const CYIString templateName)

Sets the name of the template to be used for creating the paragraph list items. The asset template will be loaded, if needed, from templateName. Returns false if the template named templateName cannot be located.

◆ SetMarkedUpText()

void CYIScrollingTextView::SetMarkedUpText ( const CYIString markedUpText,
CYITextMarkupParser pMarkupParser = nullptr,
const CYICustomMarkupTagsProvider pExternalTagsProvider = nullptr 

Sets the text to be displayed in this scrolling view to markedUpText. The text will be parsed for markup. Any existing text is cleared.

If pMarkupParser is null, the default You.i Engine text markup parser is used. An 'external tags' provider can optionally be supplied through the pExternalTagsProvider pointer.

If an external tags provider is supplied, it must be compatible with the provided markup parser (or be compatible with the defualt markup parser if no markup parser is provided).
See also

◆ SetText()

void CYIScrollingTextView::SetText ( const CYIString text)

Sets the text to be displayed in this scrolling text view to text. Any existing text is cleared.

The SetListItemTemplateName function must have been called successfully prior to calling this function.
See also

◆ SetXJustify()

void CYIScrollingTextView::SetXJustify ( CYITextSceneNode::Justification  xJustify)

Sets the text alignment.

See also

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