You.i Engine
CYISceneView Class Reference

Detailed Description

The base class for all view types. Views are containers of renderable elements that often define interaction behaviours through APIs and user-driven events.

Extends the CYISceneNode to add layouts, focus, and timelines. Subclasses of CYISceneView differentiate themselves by defining behaviours or interaction models. Views usually contain timelines which animate the properties of their children, the view will play these timelines as part of its visual presentation. Focus may enter or leave a view, or the view may explicitly receive focus, in response to the user-driven navigation events: CYIKeyEvent::YI_KEY_ARROW_UP, CYIKeyEvent::YI_KEY_ARROW_DOWN, CYIKeyEvent::YI_KEY_ARROW_LEFT, CYIKeyEvent::YI_KEY_ARROW_RIGHT, or CYIKeyEvent::YI_KEY_TAB. A CYISceneView may have a CYILayout added to it in order to dictate how its children will move and resize in response to the view changing position and size.

View Template Specification

Type Labels Property Description
Marker FocusIn Optional The animation played when a view receives focus.
Marker FocusOut Optional The animation played when a view loses focus. If not defined, the reverse of FocusIn is used.
Marker In Optional Multi-purpose: 1) the animation played when a view is a list item that is inserted in the list. 2) the animation played when a view is part of a CYIStackView, and the view is brought to front.
Marker Out Optional Multi-purpose: 1) the animation played when a view is a list item that is removed from the list. 2) the animation played when a view is part of a CYIStackView, and the view is removed from the front.
Comment clip Optional If present and set to 'true', the view will be clipped to its size.
Marker Comment recursive Optional If present and set to 'true' on a marker, indicates that timelines created from this marker should be recursive. Such timelines are timeline groups that contains all other timelines of the same name. Defaults to 'false'.
Marker Comment stop-recursion Optional If present and set to 'true' on a marker, indicates that timeline groups of parent views should not include this view's timelines. Defaults to 'false'.
Marker Comment tracks Optional If present, this marker indicates how timelines should be created for a given marker. Can be 'keyframes', which indicates that only tracks with keyframes are used, or 'all', which indicates that all tracks should be used. Defaults to 'keyframes'.

#include <view/YiSceneView.h>

Inheritance diagram for CYISceneView:

Classes

struct  AssetRequirement
 
struct  YI_ANCHOR_DATA
 Anchors are used to apply scaling rules. More...
 

Public Types

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

 CYISceneView ()
 
virtual ~CYISceneView ()
 
bool BuildFromTemplate (CYISceneManager *pSceneManager, const std::shared_ptr< CYIAssetViewTemplate > &pAssetViewTemplate, CYISceneManager::MISSING_CLASS_HANDLING_MODE eMissingHandlingMode=CYISceneManager::ABORT)
 
virtual bool Init () override
 
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
 
virtual bool HandlesFocusInDescendants () const
 
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())
 
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
 
virtual CYISceneViewFindNextFocusInDescendants (const CYISceneView *pCurrentFocusView, 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 ()
 
virtual void Measure (const MeasureSpec &widthSpec, const MeasureSpec &heightSpec, const MeasureSpec &depthSpec) override
 
virtual void ApplyMeasurements () override
 
virtual void BuildDrawList (std::vector< IYIRenderer::Command > &children, CYIAbstractCameraSceneNode *pCameraToDrawWith=nullptr) override
 
- 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)
 
virtual bool BroadcastEvent (const std::shared_ptr< CYIEventDispatcher > &pDispatcher, CYIEvent *pEvent)
 
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 FocusGainedInDescendants ()
 
virtual void OnFocusLostInDescendants ()
 
virtual void FocusLostInDescendants ()
 
virtual void OnFocusChangedInDescendants ()
 
virtual void FocusChangedInDescendants ()
 
virtual bool ContainsFocusableDescendant (const CYIFocusSearchOptions &options=CYIFocusSearchOptions()) const
 
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)
 

Static Public Member Functions

static void RegisterAllViews ()
 
- Static Public Member Functions inherited from CYISceneNode
static void RegisterAllSceneNodes ()
 

Public Attributes

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 Member Functions

void UpdateClipping ()
 
virtual void WorldScaleUpdated () override
 
virtual void WorldBoundingBoxUpdated () override
 
virtual void OnViewReflowed (const glm::vec3 &worldScale)
 
virtual void ViewReflowed (const glm::vec3 &worldScale)
 
virtual bool HandleEvent (const std::shared_ptr< CYIEventDispatcher > &pDispatcher, CYIEvent *pEvent) override
 
virtual bool ProcessEvent (const std::shared_ptr< CYIEventDispatcher > &pDispatcher, CYIEvent *pEvent) override
 
void UpdateResponsiveLayoutAnchors ()
 
virtual void SizeChanged () override
 
virtual void ChildNeedsLayout () override
 
virtual void LayoutDirtied () override
 
virtual void ChildAdded (CYISceneNode *pChild) override
 
virtual void ChildRemoved (CYISceneNode *pChild) 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 UpdateEnd ()
 
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
 

Protected Attributes

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
 

Friends

class CYISceneViewPriv
 

Additional Inherited Members

- Static Public Attributes inherited from CYISceneNode
static const float OPACITY_NOT_VISIBLE_EPSILON
 

Member Enumeration Documentation

Used internally to declare the requirements for a view template, for use with the You.i Engine After Effects Plug-in. A view may require nodes or timelines to be present in the template for it to be functional. The absence of these results in a failure to initialize in Init().

Enumerator
REQUIRES_NODE 

Marks that the requirement is for a node.

REQUIRES_TIMELINE 

Marks that the requirement is for a timeline.

The various modes with which timelines can be obtained from CYISceneView.

Enumerator
GET_DEFAULT 

Automatically picks between the other modes depending on how the given timeline marker is configured.

GET_TIMELINE 

Always returns a CYITimeline instance (e.g. never returns a timeline group). Returns null if the given timeline marker does not exist.

GET_TIMELINE_GROUP 

Always returns a timeline group (which will recursively be created). Never returns null.

GET_COMPONENT_OF_TIMELINE_GROUP 

Returns a timeline group component. This is used internally when generating timeline groups. Returns null if the given timeline marker is configured as 'stop recursing'.

Constructor & Destructor Documentation

CYISceneView::CYISceneView ( )
virtual CYISceneView::~CYISceneView ( )
virtual

Member Function Documentation

void CYISceneView::AddAnchor ( YI_ANCHOR_TYPE  anchorType)

Adds the anchorType responsive layout anchor to the view.

virtual void CYISceneView::ApplyMeasurements ( )
overridevirtual

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

Reimplemented in CYIScrollingView, CYIImageView, and CYIListView.

void CYISceneView::BuildAnchorList ( )

Used during view construction to initialize the list of responsive layout anchors present in this view.

virtual void CYISceneView::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 CYISceneNode.

Reimplemented in CYIScrollingView.

bool CYISceneView::BuildFromTemplate ( CYISceneManager pSceneManager,
const std::shared_ptr< CYIAssetViewTemplate > &  pAssetViewTemplate,
CYISceneManager::MISSING_CLASS_HANDLING_MODE  eMissingHandlingMode = CYISceneManager::ABORT 
)

Builds the view using pAssetViewTemplate. This must be called prior to CYISceneView::Init().

Note
This method will assert if called twice.
std::unique_ptr<CYITimelineGroup> CYISceneView::BuildTimelineGroup ( const CYIString markerName)
Deprecated:
This function has been deprecated and may be removed in a future release. GetTimelineGroup(const CYIString&) should be used instead.

Constructs a timeline group from this view and all of the views within it which contain a timeline called markerName. Returns null if this view does not contain markerName even if subviews contain the marker name.

Note
The returned timeline is owned by the caller. It must not be used if this view or any views whose timelines are in the group are deleted.
Warning
Unlike the GetTimelineGroup(const CYIString&) function, the timeline group returned by this function is not automatically updated as descendant views are added or removed.
See also
GetTimeline
GetTimelineGroup(const CYIString&)
bool CYISceneView::CanBeFocused ( ) const
virtual void CYISceneView::ChildAdded ( CYISceneNode pChild)
overrideprotectedvirtual

Called when a scene node is added to this node's children list.

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

Reimplemented from CYISceneNode.

Reimplemented in CYIScrollingView.

virtual void CYISceneView::ChildNeedsLayout ( )
overrideprotectedvirtual

Called when a child in this scene node's children hierarchy needs to be laid out.

Warning
Overrides must call the base class implementation.

Reimplemented from CYISceneNode.

virtual void CYISceneView::ChildRemoved ( CYISceneNode pChild)
overrideprotectedvirtual

Called when a scene node is removed from this node's children list.

Note
The scene node might be deleted immediately after this function is called (e.g. if a user called CYISceneNode::DestroyChildren )
Warning
Overrides must call the base class implementation.
See also
OnChildRemoved()

Reimplemented from CYISceneNode.

Reimplemented in CYIScrollingView.

virtual void CYISceneView::ChildVisibilityChanged ( CYISceneNode pChild)
overrideprotectedvirtual

Called when the visibility of a child of this scene node has been modified.

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

Reimplemented from CYISceneNode.

void CYISceneView::DisableResponsiveLayout ( )

Disables responsive layout on this view. Responsive layout is enabled by default.

See also
IsResponsiveLayoutEnabled
void CYISceneView::EnableDefaultHitZone ( )

Creates and assigns a CYIMesh to this view which is the same size as the view. This mesh is necessary for the view to become a target for events of type CYIActionEvent. A view may still receive events during the YI_EVENT_PHASE_CAPTURE and YI_EVENT_PHASE_BUBBLE phases if it has no mesh, but for it to be the target of an event, corresponding to YI_EVENT_PHASE_AT_TARGET, it must have a mesh.

See also
GetSize()
YI_EVENT_PHASE
void CYISceneView::EnableResponsiveLayout ( )

Enables responsive layout on this view. Responsive layout is enabled by default.

See also
IsResponsiveLayoutEnabled
CYISceneView* CYISceneView::FindNextFocus ( CYIFocus::FOCUS_DIRECTION  eDirection,
const CYIFocusSearchOptions options = CYIFocusSearchOptions() 
) const

Returns the next focusable view in the requested direction.

If GetNextFocus() returns this view, null will be returned, indicating focus cannot change in eDirection.

If GetNextFocus() returns a view that is not this view, that will be returned.

Otherwise returns the closest view in eDirection that can take focus, using this view as a starting point.

Will return null if no possible focus candidate is found.

options can be used to further restrict the set of valid focus candidates.

See also
SetNextFocus
CYISceneView* CYISceneView::FindNextFocus ( CYIFocus::FOCUS_DIRECTION  eDirection,
CYIAABB screenSpaceFocusRegion,
const CYIFocusSearchOptions options = CYIFocusSearchOptions() 
) const

Returns the next focusable view in the requested direction within the specfied screen space region. screenSpaceFocusRegion is an in and out parameter. It will usually correspond to CYIFocus::GetScreenSpaceFocusRegion(pCurrentFocusView) but implementations may modify screenSpaceFocusRegion in order to hint that future focus searches should be performed with that modified bounding box.

See also
FindNextFocus
virtual CYISceneView* CYISceneView::FindNextFocusInDescendants ( const CYISceneView pCurrentFocusView,
CYIFocus::FOCUS_DIRECTION  eDirection,
CYIAABB screenSpaceFocusRegion,
const CYIFocusSearchOptions options = CYIFocusSearchOptions() 
) const
virtual

Focus handlers must override this function to perform focus searches in their descendants. Returns the next view to recieve focus or null if there are none in eDirection. screenSpaceFocusRegion will usually correspond to CYIFocus::GetScreenSpaceFocusRegion(pCurrentFocusView) but implementations may modify screenSpaceBoundingBox in order to hint that future focus searches should be performed with that modified bounding box.

options can be used to further restrict the set of valid focus candidates.

See also
HandlesFocusInDescendants

Reimplemented in CYIScrollingView, yi::deprecated::CYIListView, and CYIFocusZoneView.

bool CYISceneView::FindTimeline ( CYIAbstractTimeline *&  pTimeline,
const CYIString markerName,
FETCH_TYPE  eType,
const CYIString tag = "",
TIMELINE_GET_MODE  eMode = GET_DEFAULT 
)

If a timeline with markerName exists in this view, pTimeline will point to that timeline. The view will retain ownership of the timeline, it must not be deleted or cached by the user. If eType is CYISceneNode::FETCH_MANDATORY, an error message using the optional tag will be logged if markerName is not found.

Returns false if markerName is not found.

Note
If unsuccessful the value of pTimeline is set to nullptr.
virtual void CYISceneView::FocusGained ( )
virtual
See also
OnFocusGained
Note
The base implementation must be called.
virtual void CYISceneView::FocusLost ( )
virtual
See also
OnFocusLost
Note
The base implementation must be called.

Reimplemented in CYIScrollBarView.

YI_ANCHOR_DATA CYISceneView::GetAnchor ( YI_ANCHOR_TYPE  anchorType) const

Returns the YI_ANCHOR_DATA for the anchorType on this view, or a default YI_ANCHOR_DATA object if the anchor was not present in the view's template and has not been added using AddAnchor().

virtual const CYISceneView::AssetRequirement* CYISceneView::GetAssetRequirements ( uint32_t *  pRequirementCount)
virtual

Returns the asset requirements for the view; implemented in each subclass to return the nodes and timelines which must be present in the view. Used internally by the You.i Engine After Effects Plug-in.

Reimplemented in CYITextEditView, CYIScrollBarView, and CYIProgressBarView.

const std::vector<CYIString>& CYISceneView::GetChildTemplateNames ( )
CYISceneView* CYISceneView::GetFocusHandler ( ) const

Returns the focus handler for this view. The view's focus handler is the closest ancestor which is a focus handler.

See also
HandlesFocusInDescendants
CYIAbstractTimeline* CYISceneView::GetFocusInTimeline ( ) const

Returns the 'FocusIn' CYIAbstractTimeline, or null if the view does not supply one. The view's 'FocusIn' CYIAbstractTimeline is set in Init().

CYIAbstractTimeline* CYISceneView::GetFocusOutTimeline ( ) const

Returns the 'FocusOut' CYIAbstractTimeline, or null if the view does not supply one. The view's 'FocusOut' CYIAbstractTimeline is set in Init().

const CYISceneNode* CYISceneView::GetFocusRoot ( ) const

Returns the focus root for this view. The view's focus root is the closest ancestor which is a focus root.

See also
CYISceneNode::IsFocusRoot
CYISceneView* CYISceneView::GetInitiallyFocusedView ( ) const

Returns the view that will receive initial focus when focus enters this containing view. Will return nullptr if the initially focused view has been deleted.

See also
SetInitiallyFocusedView
TryRequestFocusOnInitiallyFocusedView
CYIAbstractTimeline* CYISceneView::GetInTimeline ( ) const

Returns the 'In' CYIAbstractTimeline, or null if the view does not supply one. The view's 'In' CYIAbstractTimeline is set in Init(). Subclasses can overwrite this timeline using SetInTimeline().

const CYILayout* CYISceneView::GetLayout ( ) const

Returns the layout currently assigned to this view, or null if there is no layout.

CYILayout* CYISceneView::GetLayout ( )

Returns the layout currently assigned to this view, or null if there is no layout.

CYISceneView* CYISceneView::GetNextFocus ( CYIFocus::FOCUS_DIRECTION  eDirection) const

Returns the next view in the specified direction if it has been set by SetNextFocus. Otherwise, null is returned.

If the view is not a focus candidate returns null.

See also
SetNextFocus
SetFocusable
CYIAbstractTimeline* CYISceneView::GetOutTimeline ( ) const

Returns the 'Out' CYIAbstractTimeline, or null if the view does not supply one. The view's 'Out' CYIAbstractTimeline is set in Init(). Subclasses can overwrite this timeline using SetOutTimeline().

virtual bool CYISceneView::GetProperty ( const CYIString propertyName,
CYIString pValue 
) const
overridevirtual

Returns pValue of a property given propertyName. If no such property exists, the property is fetched from the view's view template instead. Returns false if the property cannot be found in either of the two locations.

See also
IYIPropertiesSource::GetProperty

Reimplemented from CYISceneNode.

virtual CYIAbstractTimeline* CYISceneView::GetTimeline ( const CYIString rMarkerName,
TIMELINE_GET_MODE  eMode = GET_DEFAULT 
)
virtual

Returns the timeline with rMarkerName. If no such timeline exists, null is returned. The view will retain ownership of the returned timeline, it must not be deleted or cached by the user.

The eMode parameter can be used to control the type of timeline being returned. If set to GET_TIMELINE_GROUP, a CYIParallelTimelineGroup is returned (built recursively throughout the children of this view). If set to GET_TIMELINE, a CYITimeline is returned. If set to GET_DEFAULT, the type of timeline returned depends on the configuration of the marker from which the timeline is being created.

CYIAbstractTimeline* CYISceneView::GetTimeline ( CYIMarkerData::MARKER_ID  eID,
TIMELINE_GET_MODE  eMode = GET_DEFAULT 
)

Returns the timeline defined by eID. If no such timeline exists, null is returned. The view will retain ownership of the returned timeline, it must not be deleted or cached by the user.

The eMode parameter can be used to control the type of timeline being returned. If set to GET_TIMELINE_GROUP, a CYIParallelTimelineGroup is returned (built recursively throughout the children of this view). If set to GET_TIMELINE, a CYITimeline is returned. If set to GET_DEFAULT, the type of timeline returned depends on the configuration of the marker from which the timeline is being created.

CYITimelineGroup* CYISceneView::GetTimelineGroup ( const CYIString markerName)

Returns a timeline group constructed from this view and all descendant views which contain a timeline called markerName.

Note
This function never returns null. If this scene view doesn't contain a marker matching markerName, the returned group may be empty or may contain timelines from descendant views.
If a descendant view's markerName marker is configured as 'stop recursion', its timelines will not be included in the returned timeline group.
The returned group is updated automatically if descendant views are added or removed.
This view retains ownership of the returned timeline group.
See also
GetTimeline
std::map<CYIString, CYITimeline *> CYISceneView::GetTimelines ( ) const

Returns a map of all currently-instantiated non-group timelines held by this scene view. The key of the map is the timeline's marker name, and the value is the timeline itself.

Note
A timeline for a given marker name is added to the returned map only when GetTimeline() is called for that particular marker name.
The returned map does not contain timeline groups managed by this CYISceneView.
const std::shared_ptr<CYIAssetViewTemplate>& CYISceneView::GetViewTemplate ( ) const

Returns the view template asset for this view.

See also
BuildFromTemplate
GetTimeline
GetTimelineGroup
virtual bool CYISceneView::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.

Implements CYIEventHandler.

Reimplemented in CYIScrollingView, yi::deprecated::CYIListView, CYITextEditView, CYIToggleButtonView, CYIAbstractButtonView, CYIScrollBarView, CYIPasswordTextEditView, CYIDrawerView, and CYIScrollingTextView.

virtual bool CYISceneView::HandlesFocusInDescendants ( ) const
virtual

By default a CYISceneView is not a focus handler, but they can become one if an initial focus view is set. Override this to return true if this view handles focus in its descendants, meaning it will receive focus requests instead of its contents and must choose which view will receive focus in response to RequestFocus().

If this is overridden to return true, RequestFocus() and FindNextFocusInDescendants() must also be overridden. Overriding views may also want to override CYISceneNode::ContainsFocusableDescendant(const CYIFocusSearchOptions&).

See also
RequestFocus
FindNextFocusInDescendants
CYISceneNode::ContainsFocusableDescendant(const CYIFocusSearchOptions&)
SetInitiallyFocusedView

Reimplemented in CYIScrollingView, yi::deprecated::CYIListView, CYIScrollingTextView, and CYIFocusZoneView.

bool CYISceneView::HasFocus ( ) const

Returns true if this view currently has focus.

bool CYISceneView::IsFocusable ( ) const

Returns true if this view can receive focus.

See also
SetFocusable
bool CYISceneView::IsInitialized ( ) const

Returns true if BuildFromTemplate() has been called.

bool CYISceneView::IsResponsiveLayoutEnabled ( ) const

Returns true if responsive layout is enabled on the view. CYISceneView has responsive layout enabled by default, but responsive layout does not take effect unless the view also has anchors.

See also
CYISceneManager::LoadScene
AddAnchor
Note
Unless explicitly disabled by DisableResponsiveLayout(), responsive layout is enabled, even if passing scaling rules other than CYISceneManager::SCALE_RESPONSIVE_LAYOUT to CYISceneManager::LoadScene
virtual void CYISceneView::LayoutDirtied ( )
overrideprotectedvirtual

Called when the layout dirty flag of this scene node has been set to LayoutDirty.

Warning
Overrides must call the base class implementation.

Reimplemented from CYISceneNode.

virtual void CYISceneView::Measure ( const MeasureSpec widthSpec,
const MeasureSpec heightSpec,
const MeasureSpec depthSpec 
)
overridevirtual

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

Reimplemented in CYIScrollingView, and CYIImageView.

virtual void CYISceneView::OnFocusGained ( )
virtual

Called when focus has entered this view.

See also
GainedFocus
virtual void CYISceneView::OnFocusLost ( )
virtual

Called when focus has left this view.

See also
LostFocus
virtual void CYISceneView::OnInit ( )
protectedvirtual

This function is deprecated and no longer called. Override Init() to achieve the same functionality.

void CYISceneView::OnViewIsGoingOutOfAnimatedPosition ( )
protected
void CYISceneView::OnViewIsInAnimatedPosition ( )
protected

Called when a view is in its animated position. Used with CYIAnimatingLayout when animating views that are in layouts. When a view is in its animated position its position may be modified directly. When it is animating to its animated position, its destination must be modified instead.

virtual void CYISceneView::OnViewReflowed ( const glm::vec3 &  worldScale)
protectedvirtual

Called when the view has been reflowed by responsive layout.

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

Notifies this event target of an incoming event. Calls all the relevant listeners based on event type and phase. Returns true if any of the listeners' handleEvent() function returned true.

Reimplemented from CYISceneNode.

static void CYISceneView::RegisterAllViews ( )
static

Registers the You.i Engine views with the linker to prevent symbols for views which are used in the You.i Engine After Effects Plug-in, but might not be referenced explicitly in code, from being removed during linking.

virtual bool CYISceneView::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() 
)
virtual

By default, assigns focus to this view if it is focusable. If it is not focusable, performs a focus search within this view.

eFocusRootRule dictates whether the focus system will allow the focus request to a view outside of the current focus root.

This function can be overridden to change focus traversal. A custom search may be performed as long as the function returns true if a view has been found, and RequestFocus() has been called on the found view. options can be used to further restrict the set of valid focus candidates. When overriding this function make sure to call TryRequestFocusOnInitiallyFocusedView() to preserve the SetInitiallyFocusedView() functionality.

See also
CYISceneManager::StageScene
HandlesFocusInDescendants
TryRequestFocusOnInitiallyFocusedView
SetFocusable()

Reimplemented in CYIScrollingView, yi::deprecated::CYIListView, CYIScrollingTextView, and CYIFocusZoneView.

virtual void CYISceneView::Reset ( )
inlinevirtual

Called from CYIViewPool::ReleaseView to reset the view to an initial state. Default implementation does nothing. Subclasses must implement this function if used in conjunction with CYIViewPool to restore their views to the initial state defined by the template.

See also
CYIViewPool

Reimplemented in CYIImageView.

void CYISceneView::SetClippingAreaNode ( CYISceneNode pClippingNode)

Defines the clipping area of this view using pClippingNode. Any contents of this view which fall outside of the clipping area will not be visible. The clipping area is based on the mesh of pClippingNode.

void CYISceneView::SetFocusable ( bool  bFocusable)

Sets whether this view can receive focus.

Note
For a view to be a focus candidate it must meet the following requirements: it is visible, is part of a staged scene, is focusable, and does not already have focus.
void CYISceneView::SetInitiallyFocusedView ( CYISceneView pView)

Sets view that will receive initial focus when focus enters this containing view. Setting an initial focus view causes this view to become a focus handler.

See also
GetInitiallyFocusedView
void CYISceneView::SetInTimeline ( CYIAbstractTimeline pTimeline)
protected

Sets the In timeline for this view to pTimeline. This view will not take ownership of pTimeline – the user is responsible for deleting pTimeline when the view is deleted.

See also
GetInTimeline
void CYISceneView::SetLayout ( std::unique_ptr< CYILayout pLayout)

Assigns layout pLayout to this view. If a layout already existed for this view, it will be deleted. This view will take ownership of pLayout. Call with null to remove the currently assigned layout without assigning a new one.

If assigning a non-null layout, the layout will be configured with this view. This involves extracting configuration parameters from this view's properties, and creating layout config and layout state objects as needed in this view's children.

void CYISceneView::SetNextFocus ( CYISceneView pView,
CYIFocus::FOCUS_DIRECTION  eDirection 
)

Sets the next focus in eDirection to be pView, overriding the default focus search algorithm.

A value of null indicates that focus changes in eDirection should use the default search algorithm.

Setting pView to be this view prevents focus changes in eDirection.

If set on a focus handler, this override will be used when focus should leave the handler, with the same rules as above.

If eDirection is one of the relative focus directions: CYISceneView::FOCUS_FORWARD and CYISceneView::FOCUS_REVERSE, the reverse focus link will also be set up, as long as pView does not point to this view.

Warning
Preventing focus changes in a relative direction breaks the tab-order focus ring and is not recommended.
void CYISceneView::SetOutTimeline ( CYIAbstractTimeline pTimeline)
protected

Sets the Out timeline for this view to pTimeline. This view will not take ownership of pTimeline – the user is responsible for deleting pTimeline when the view is deleted.

See also
GetOutTimeline
virtual void CYISceneView::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 CYISceneNode.

Reimplemented in CYIScrollingView.

bool CYISceneView::TryRequestFocusOnInitiallyFocusedView ( )
protected

Attempts to focus the initial focus view. Returns true if the initial focus view is successfully focused.

If RequestFocus() is overridden, this function should be called in order to respect the initially focused view setting.

See also
RequestFocus
SetInitiallyFocusedView
void CYISceneView::UpdateClipping ( )
protected

Updates the clipping box which is computed form this view's clipping node, or if it has none, the view's mesh.

void CYISceneView::UpdateResponsiveLayoutAnchors ( )
protected

Updates the position of the responsive layout anchors of this view. This will be called when the size of the view has changed.

See also
SizeChanged
virtual void CYISceneView::ViewReflowed ( const glm::vec3 &  worldScale)
protectedvirtual

Called when the view has been reflowed by responsive layout.

Warning
Overrides must call the base class implementation.

Reimplemented in yi::deprecated::CYIListView.

virtual void CYISceneView::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 CYISceneNode.

Reimplemented in CYIScrollingView, and CYIListView.

virtual void CYISceneView::WorldScaleUpdated ( )
overrideprotectedvirtual

Called by Update() when the transform update process is complete and only when the world scale has changed. 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().
See also
GetWorldScale
Warning
Overrides must call the base class implementation.
See also
Update()
OnWorldScaleUpdated()

Reimplemented from CYISceneNode.

Friends And Related Function Documentation

friend class CYISceneViewPriv
friend

Member Data Documentation

CYISignal<CYISceneView *> CYISceneView::GainedFocus

Emitted when focus has entered this view.

See also
CYISceneNode::DescendantGainedFocus
CYISignal<CYISceneView *> CYISceneView::LostFocus

Emitted when focus has left this view.

See also
CYISceneNode::DescendantLostFocus
std::multimap<YI_ANCHOR_TYPE, YI_ANCHOR_DATA> CYISceneView::m_anchors
protected
bool CYISceneView::m_bInAnimatedPosition
protected
bool CYISceneView::m_bResponsiveLayoutEnabled
protected
bool CYISceneView::m_bSceneTreeBuilt
protected
bool CYISceneView::m_bStopEventPropagation
protected
std::shared_ptr<CYIAssetViewTemplate> CYISceneView::m_pAssetViewTemplate
protected
CYISceneNode* CYISceneView::m_pClippingNode
protected
CYIAbstractTimeline* CYISceneView::m_pFocusInTimeline
protected
CYIAbstractTimeline* CYISceneView::m_pFocusOutTimeline
protected
std::shared_ptr<CYISceneNodeProxy> CYISceneView::m_pInitiallyFocusedView
protected
std::unique_ptr<CYILayout> CYISceneView::m_pLayout
protected
std::map<CYIString, std::unique_ptr<CYIParallelTimelineGroup> > CYISceneView::m_timelineGroups
protected
std::map<CYIString, std::unique_ptr<CYITimeline> > CYISceneView::m_timelines
protected

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