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>

Classes | |
| struct | AssetRequirement |
| struct | YI_ANCHOR_DATA |
| Anchors are used to apply scaling rules. More... | |
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::AssetRequirement * | GetAssetRequirements (uint32_t *pRequirementCount) |
| CYIAbstractTimeline * | GetInTimeline () const |
| CYIAbstractTimeline * | GetOutTimeline () const |
| CYIAbstractTimeline * | GetFocusInTimeline () const |
| CYIAbstractTimeline * | GetFocusOutTimeline () 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) |
| CYISceneView * | GetNextFocus (CYIFocus::FOCUS_DIRECTION eDirection) const |
| void | SetInitiallyFocusedView (CYISceneView *pView) |
| CYISceneView * | GetInitiallyFocusedView () const |
| CYISceneView * | FindNextFocus (CYIFocus::FOCUS_DIRECTION eDirection, const CYIFocusSearchOptions &options=CYIFocusSearchOptions()) const |
| CYISceneView * | FindNextFocus (CYIFocus::FOCUS_DIRECTION eDirection, CYIAABB &screenSpaceFocusRegion, const CYIFocusSearchOptions &options=CYIFocusSearchOptions()) const |
| virtual CYISceneView * | FindNextFocusInDescendants (const CYISceneView *pCurrentFocusView, CYIFocus::FOCUS_DIRECTION eDirection, CYIAABB &screenSpaceFocusRegion, const CYIFocusSearchOptions &options=CYIFocusSearchOptions()) const |
| const CYISceneNode * | GetFocusRoot () const |
| CYISceneView * | GetFocusHandler () const |
| virtual void | OnFocusGained () |
| virtual void | FocusGained () |
| virtual void | OnFocusLost () |
| virtual void | FocusLost () |
| const std::shared_ptr< CYIAssetViewTemplate > & | GetViewTemplate () const |
| const std::vector< CYIString > & | GetChildTemplateNames () |
| virtual CYIAbstractTimeline * | GetTimeline (const CYIString &rMarkerName, TIMELINE_GET_MODE eMode=GET_DEFAULT) |
| CYIAbstractTimeline * | GetTimeline (CYIMarkerData::MARKER_ID eID, TIMELINE_GET_MODE eMode=GET_DEFAULT) |
| std::map< CYIString, CYITimeline * > | GetTimelines () const |
| bool | FindTimeline (CYIAbstractTimeline *&pTimeline, const CYIString &markerName, FETCH_TYPE eType, const CYIString &tag="", TIMELINE_GET_MODE eMode=GET_DEFAULT) |
| CYITimelineGroup * | GetTimelineGroup (const CYIString &markerName) |
| std::unique_ptr< CYITimelineGroup > | BuildTimelineGroup (const CYIString &markerName) |
| void | BuildAnchorList () |
| virtual void | Reset () |
| void | SetLayout (std::unique_ptr< CYILayout > pLayout) |
| const CYILayout * | GetLayout () const |
| CYILayout * | GetLayout () |
| 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 CYIString & | GetName () const |
| CYIString | GetUniqueName () const |
| void | SetSceneManager (CYISceneManager *pSceneManager) |
| void | SetName (const CYIString &name) |
| int32_t | GetID () const |
| void | SetID (int32_t nID) |
| uint64_t | GetUniqueID () const |
| bool | AddChild (std::unique_ptr< CYISceneNode > pSceneNode) |
| bool | AddChild (std::unique_ptr< CYISceneNode >, int32_t nIndex) |
| bool | InsertChildAfter (CYISceneNode *pRefNode, std::unique_ptr< CYISceneNode > pSceneNode) |
| std::unique_ptr< CYISceneNode > | RemoveChild (CYISceneNode *pSceneNode) |
| bool | ReorderChild (uint32_t uFromIndex, uint32_t uToIndex) |
| CYISceneNode * | GetParent () const |
| bool | ChangeParent (CYISceneNode *pParent) |
| CYISceneNode * | GetDrawParent () const |
| bool | IsAncestorOf (const CYISceneNode *pNode) const |
| CYISceneManager * | GetSceneManager () const |
| uint32_t | GetChildCount () const |
| uint32_t | GetChildCountRecursive () const |
| CYISceneNode * | GetChild (uint32_t nIndex) const |
| Iterator | begin (Iterator::ITERATION_MODE eMode=Iterator::IMMEDIATE_CHILDREN) const |
| Iterator | end (Iterator::ITERATION_MODE eMode=Iterator::IMMEDIATE_CHILDREN) const |
| ReverseIterator | rbegin (Iterator::ITERATION_MODE eMode=Iterator::IMMEDIATE_CHILDREN) const |
| ReverseIterator | rend (Iterator::ITERATION_MODE eMode=Iterator::IMMEDIATE_CHILDREN) const |
| CYISceneNode * | GetChild (const CYIString &sName) const |
| uint32_t | GetDrawChildCount () const |
| CYISceneNode * | GetDrawChild (uint32_t uIndex) const |
| CYISceneNode * | GetDrawChildByID (int32_t nID) const |
| template<class YI_SCENE_NODE_SUBCLASS > | |
| YI_SCENE_NODE_SUBCLASS * | GetChild (uint32_t uTargetMatchedNodeCount=1) const |
| template<class YI_SCENE_NODE_SUBCLASS > | |
| std::list< YI_SCENE_NODE_SUBCLASS * > | GetChildren () const |
| int32_t | GetIndexOfChild (const CYISceneNode *pSceneNode) const |
| void | Show () |
| void | Hide () |
| void | SetVisibility (bool bVisible) |
| void | SetOpacity (float fOpacity) |
| float | GetCompositeOpacity () const |
| float | GetLocalOpacity () const |
| bool | IsVisible () const |
| bool | IsTrulyVisible () const |
| CYISceneNode * | GetNode (const CYIString &name) |
| CYISceneNode * | GetNode (const CYIString &name, const CYIRuntimeTypeInfo &enforceClassType) |
| CYISceneNode * | GetNode (const CYIRuntimeTypeInfo &enforceClassType) |
| CYISceneNode * | GetNodeAfterTarget (const CYIRuntimeTypeInfo &enforceClassType, CYISceneNode *pStartAfterTarget) |
| template<class YI_SCENE_NODE_SUBCLASS > | |
| YI_SCENE_NODE_SUBCLASS * | GetNode (const CYIString &name) |
| CYISceneNode * | GetNode (const int32_t nID) |
| CYISceneNode * | GetNode (const int32_t nID, const CYIRuntimeTypeInfo &enforceClassType) |
| template<class YI_SCENE_NODE_SUBCLASS > | |
| bool | FindNode (YI_SCENE_NODE_SUBCLASS *&pNode, const CYIString &nodeName, FETCH_TYPE eType, const CYIString &tag) |
| std::list< CYISceneNode * > | GetNodes (const CYIString &name) |
| std::list< CYISceneNode * > | GetNodes (int32_t nID) |
| std::list< CYISceneNode * > | GetNodes (const CYIRuntimeTypeInfo &enforceClassType) |
| template<class YI_SCENE_NODE_SUBCLASS > | |
| const YI_SCENE_NODE_SUBCLASS * | GetNode (uint32_t uTargetMatchedNodeCount=1) const |
| template<class YI_SCENE_NODE_SUBCLASS > | |
| YI_SCENE_NODE_SUBCLASS * | GetNode (uint32_t uTargetMatchedNodeCount=1) |
| void | SetMesh (const std::shared_ptr< CYIMesh > &pMesh) |
| void | SetMaterial (const std::shared_ptr< CYIMaterial > &pMaterial, uint32_t nIndex=0) |
| void | AddEffect (const std::shared_ptr< CYIEffect > &pEffect) |
| void | RemoveEffect (const std::shared_ptr< CYIEffect > &pEffect) |
| uint32_t | GetEffectCount () const |
| std::shared_ptr< CYIEffect > | GetEffect (uint32_t uIndex) const |
| void | ConnectEffectsToTimelines (const CYITimelineTrack *pTrack) |
| void | AddMask (std::unique_ptr< CYIMask > pMask) |
| std::unique_ptr< CYIMask > | RemoveMask (const CYIMask *pMask) |
| uint32_t | GetMaskCount () const |
| const CYIMask * | GetMask (uint32_t uIndex) const |
| CYIMask * | GetMask (uint32_t uIndex) |
| const std::shared_ptr< CYIMesh > & | GetMesh () const |
| uint32_t | GetMaterialCount () const |
| const std::shared_ptr< CYIMaterial > | GetMaterial (uint32_t nIndex=0) const |
| const std::shared_ptr< IYIUniformBufferObject > & | GetShaderUniforms () const |
| void | SetMeshTransform (const glm::mat4 &rTransform) |
| void | DestroyChildren () |
| const glm::mat4 & | GetLocalTransform () const |
| const glm::mat4 & | GetEffectTransform () const |
| const glm::mat4 & | GetWorldTransform () const |
| bool | Intersects (const CYISceneNode *pNode) const |
| void | SetRenderTarget (const std::shared_ptr< CYIRenderTarget > &pRenderTarget) |
| const std::shared_ptr< CYIRenderTarget > | GetRenderTarget () const |
| const CYIAABB & | GetWorldAABB () const |
| const CYIAABB & | GetLocalAABB () const |
| void | SetAnchorPoint (const glm::vec3 &ref) |
| void | SetAnchorPoint (float fX, float fY, float fZ) |
| void | SetAnchorPointX (float fX) |
| void | SetAnchorPointY (float fY) |
| void | SetAnchorPointZ (float fZ) |
| void | SetPosition (const glm::vec3 &ref) |
| void | SetPosition (float fX, float fY, float fZ) |
| void | SetPositionX (float fX) |
| void | SetPositionY (float fY) |
| void | SetPositionZ (float fZ) |
| void | SetRotation (const glm::vec3 &fEulerDegrees) |
| void | SetRotation (float fPitchDegrees, float fYawDegrees, float fRollDegrees) |
| void | SetRotationX (float fPitchDegrees) |
| void | SetRotationY (float fYawDegrees) |
| void | SetRotationZ (float fRollDegrees) |
| void | SetOrientation (float fPitchDegrees, float fYawDegrees, float fRollDegrees) |
| void | SetOrientation (const glm::quat &orient) |
| void | SetScale (const glm::vec3 &fScaleFactors) |
| void | SetScale (float fFactorX, float fFactorY, float fFactorZ) |
| void | SetScaleX (float fFactor) |
| void | SetScaleY (float fFactor) |
| void | SetScaleZ (float fFactor) |
| const glm::vec3 & | GetPosition () const |
| const glm::vec3 & | GetScale () const |
| const glm::vec3 & | GetWorldScale () const |
| const glm::vec3 & | GetWorldSurfaceScale () const |
| const glm::vec3 & | GetRotation () const |
| const glm::quat & | GetOrientation () const |
| const glm::vec3 & | GetAnchorPoint () const |
| virtual void | SetSize (const glm::vec3 &vSize, bool bDirtyLayout=true) |
| const glm::vec3 & | GetSize () const |
| const glm::vec3 & | GetInitialSize () const |
| void | SetMeasuredSize (const glm::vec3 &vMeasuredSize) |
| const glm::vec3 & | GetMeasuredSize () const |
| void | SetInternalCustomTimelineValue (uint32_t nTrackID, const CYIVariant &value) |
| virtual void | SetCustomTimelineValue (uint32_t nTrackID, const CYIVariant &value) |
| void | SetClippingOn () |
| void | SetClippingOff () |
| bool | GetClipping () const |
| void | SetClippingBox (const CYIAABB &rWorldBox) |
| const CYIAABB & | GetClippingBox () const |
| void | StartPropertyAnimation (YI_NODE_PROPERTY_TYPE ePropType, float fFrom, float fTo, uint32_t nDurMs, CYITimeInterpolator *pTimeInterpolator=nullptr, bool bDirtyLayout=true) |
| void | StopPropertyAnimation (YI_NODE_PROPERTY_TYPE ePropType) |
| void | UpdateLocalSpaceCollision (CYIActionEvent *pActionEvent) |
| 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 CYILayoutConfig * | GetLayoutConfig (LayoutConfigFetchMode eFetchMode=LAYOUT_CONFIG_LAZY_INSTANTIATE) const |
| CYILayoutConfig * | GetLayoutConfig (LayoutConfigFetchMode eFetchMode=LAYOUT_CONFIG_LAZY_INSTANTIATE) |
| void | SetLayoutState (std::unique_ptr< CYILayoutState > pLayoutState) |
| const CYILayoutState * | GetLayoutState () const |
| CYILayoutState * | GetLayoutState () |
| void | RequestLayout () |
| LayoutDirtyFlag | GetLayoutDirtyFlag () const |
| virtual void | SetLayoutDirtyFlag (LayoutDirtyFlag eFlag) |
| CYIAbstractCameraSceneNode * | FindActiveCamera () const |
| template<typename T > | |
| bool | CanCastTo () const |
Public Member Functions inherited from CYIEventTarget | |
| CYIEventTarget () | |
| virtual | ~CYIEventTarget () |
| bool | AddEventListener (YI_EVENT_TYPE eEventType, CYIEventHandler *pListener, EVENT_PHASE ePhase=BUBBLE) |
| bool | RemoveEventListener (YI_EVENT_TYPE eEventType, CYIEventHandler *pListener, EVENT_PHASE ePhase=BUBBLE) |
| void | SetSpecialTypeFlag (YI_SPECIAL_EVENT_TARGET_TYPE eType) |
| void | ClearSpecialTypeFlag (YI_SPECIAL_EVENT_TARGET_TYPE eType) |
| YI_SPECIAL_EVENT_TARGET_TYPE | GetSpecialTypes () const |
Public Member Functions inherited from CYIScriptableRTTIObject | |
| CYIScriptableRTTIObject () | |
| virtual | ~CYIScriptableRTTIObject () |
| virtual const CYIRuntimeTypeInfo * | GetRuntimeTypeInfoForScriptObject () const override |
Public Member Functions inherited from CYIScriptableObject | |
| CYIScriptableObject () | |
| CYIScriptableObject (const CYIScriptableObject &other) | |
| CYIScriptableObject & | operator= (const CYIScriptableObject &other) |
| virtual | ~CYIScriptableObject () |
| CYIBindingImplementation * | GetBindingImplementation () const |
| void | SetBindingImplementation (CYIBindingImplementation *pBindingImplementation) |
Public Member Functions inherited from CYISignalHandler | |
| CYISignalHandler () | |
| CYISignalHandler (const CYISignalHandler &rSignalHandler) | |
| virtual | ~CYISignalHandler () |
| CYISignalHandler & | operator= (const CYISignalHandler &rSignalHandler) |
| void | MoveToThread (CYIThread *pThread) |
| This function allows the user to override the default thread affinity to any CYIThread that may or may not be running. More... | |
| CYIThreadHandle | GetThreadAffinity () const |
| void | SetThreadAffinity (const CYIThreadHandle &rThreadAffinity) |
| virtual bool | IsConnected () const |
| virtual bool | IsConnected (const CYISignalBase &rSignal) const |
| void | Disconnect (CYISignalBase &rSignal) |
| void | DisconnectFromAllSignals () |
Public Member Functions inherited from CYIThread::Listener | |
| Listener () | |
| virtual | ~Listener () |
| virtual void | OnThreadStarted (CYIThread *) |
| virtual void | OnThreadTerminated (CYIThread *) |
| virtual void | OnThreadFinished (CYIThread *) |
Public Member Functions inherited from IYIPropertiesSource | |
| virtual | ~IYIPropertiesSource () |
Public Member Functions inherited from CYIEventHandler | |
| CYIEventHandler () | |
| CYIEventHandler (const CYIEventHandler &) | |
| virtual | ~CYIEventHandler () |
| CYIEventHandler & | operator= (const CYIEventHandler &) |
| bool | RegisterEventFilter (CYIEventFilter *pFilter) |
| bool | UnregisterEventFilter (CYIEventFilter *pFilter) |
| bool | PreFilter (const std::shared_ptr< CYIEventDispatcher > &pDispatcher, CYIEvent *pEvent) |
| bool | PostFilter (const std::shared_ptr< CYIEventDispatcher > &pDispatcher, CYIEvent *pEvent) |
| bool | AreEventsEnabled () const |
| void | EnableEvents (bool bEnable) |
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_TYPE > | PropertyAnimationComplete |
| 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 CYISceneNode * | GetNodeFromChildren (const CYIString &name) |
| virtual CYISceneNode * | GetNodeFromChildren (const int32_t nID) |
| virtual CYISceneNode * | GetNodeFromChildren (const CYIRuntimeTypeInfo &enforceClassType) |
| CYISceneNode * | GetNodeFromChildrenAfterTarget (const CYIRuntimeTypeInfo &enforceClassType, bool *pbTargetReached, CYISceneNode *pStartAfterTarget) |
Protected Member Functions inherited from CYIScriptableRTTIObject | |
| virtual std::pair< const CYIRuntimeTypeInfo *, const void * > | GetRuntimeTypeInfoWithObject () const =0 |
Friends | |
| class | CYISceneViewPriv |
Additional Inherited Members | |
Static Public Attributes inherited from CYISceneNode | |
| static const float | OPACITY_NOT_VISIBLE_EPSILON |
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'. |
| CYISceneView::CYISceneView | ( | ) |
|
virtual |
| void CYISceneView::AddAnchor | ( | YI_ANCHOR_TYPE | anchorType | ) |
Adds the anchorType responsive layout anchor to the view.
|
overridevirtual |
Applies the measured sizes of this node's children.
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.
|
overridevirtual |
Interal use only, this function will construct the list of render actions required to render the data contained in the subtree rooted at this node. Specify the camera used to draw with pCameraToDrawWith. The camera must be a draw-child of the node and be visible.
Reimplemented from 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().
| std::unique_ptr<CYITimelineGroup> CYISceneView::BuildTimelineGroup | ( | const CYIString & | markerName | ) |
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.
| bool CYISceneView::CanBeFocused | ( | ) | const |
|
overrideprotectedvirtual |
Called when a scene node is added to this node's children list.
Reimplemented from CYISceneNode.
Reimplemented in CYIScrollingView.
|
overrideprotectedvirtual |
Called when a child in this scene node's children hierarchy needs to be laid out.
Reimplemented from CYISceneNode.
|
overrideprotectedvirtual |
Called when a scene node is removed from this node's children list.
Reimplemented from CYISceneNode.
Reimplemented in CYIScrollingView.
|
overrideprotectedvirtual |
Called when the visibility of a child of this scene node has been modified.
Reimplemented from CYISceneNode.
| void CYISceneView::DisableResponsiveLayout | ( | ) |
Disables responsive layout on this view. Responsive layout is enabled by default.
| 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.
| void CYISceneView::EnableResponsiveLayout | ( | ) |
Enables responsive layout on this view. Responsive layout is enabled by default.
| 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.
| 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.
|
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.
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.
|
virtual |
|
virtual |
| 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 |
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.
| 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.
| 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.
| 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.
| 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().
|
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.
Reimplemented from CYISceneNode.
|
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.
| 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.
| const std::shared_ptr<CYIAssetViewTemplate>& CYISceneView::GetViewTemplate | ( | ) | const |
Returns the view template asset for this view.
|
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 |
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&).
Reimplemented in CYIScrollingView, yi::deprecated::CYIListView, CYIScrollingTextView, and CYIFocusZoneView.
| bool CYISceneView::HasFocus | ( | ) | const |
Returns true if this view currently has focus.
|
overridevirtual |
Initializes the view and all of its content. Subclasses must call CYISceneView::Init().
Reimplemented from CYISceneNode.
Reimplemented in CYIScrollingView, yi::deprecated::CYIListView, CYIImageView, CYIDrawerView, CYIPasswordTextEditView, CYIScrollBarView, CYIAbstractButtonView, CYIToggleButtonView, CYITextEditView, yi::deprecated::CYIGridLayoutView, yi::deprecated::CYIPopupView, CYIDecoratedView, CYIScrollingTextView, CYIVideoSurfaceView, CYIWebView, CYIPushButtonView, CYIPlayerPreviewThumbnailView, CYIActivityIndicatorView, CYIPlatformView, CYIListView, CYIPageIndicatorView, CYIPlayerTimePopupView, CYIProgressBarView, CYIStackView, and CYIRadioGroupView.
| bool CYISceneView::IsFocusable | ( | ) | const |
Returns true if this view can receive focus.
| 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.
|
overrideprotectedvirtual |
Called when the layout dirty flag of this scene node has been set to LayoutDirty.
Reimplemented from CYISceneNode.
|
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.
Reimplemented from CYISceneNode.
Reimplemented in CYIScrollingView, and CYIImageView.
|
virtual |
Called when focus has entered this view.
|
virtual |
Called when focus has left this view.
|
protectedvirtual |
This function is deprecated and no longer called. Override Init() to achieve the same functionality.
|
protected |
|
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.
|
protectedvirtual |
Called when the view has been reflowed by responsive layout.
|
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 |
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 |
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.
Reimplemented in CYIScrollingView, yi::deprecated::CYIListView, CYIScrollingTextView, and CYIFocusZoneView.
|
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.
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.
| 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.
|
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.
| 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.
|
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.
|
overrideprotectedvirtual |
Called when the size of this scene node has been changed.
Reimplemented from CYISceneNode.
Reimplemented in CYIScrollingView.
|
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.
|
protected |
Updates the clipping box which is computed form this view's clipping node, or if it has none, the view's mesh.
|
protected |
Updates the position of the responsive layout anchors of this view. This will be called when the size of the view has changed.
|
protectedvirtual |
Called when the view has been reflowed by responsive layout.
Reimplemented in yi::deprecated::CYIListView.
|
overrideprotectedvirtual |
Called by Update() when the world bounding box update process is complete. Subclasses may overload this function to do post-processing.
Reimplemented from CYISceneNode.
Reimplemented in CYIScrollingView, and CYIListView.
|
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.
Reimplemented from CYISceneNode.
|
friend |
| CYISignal<CYISceneView *> CYISceneView::GainedFocus |
Emitted when focus has entered this view.
| CYISignal<CYISceneView *> CYISceneView::LostFocus |
Emitted when focus has left this view.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |