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::ArrowUp, CYIKeyEvent::ArrowDown, CYIKeyEvent::ArrowLeft, CYIKeyEvent::ArrowRight, or CYIKeyEvent::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 loop Optional If present and set to 'true' on a marker, indicates that timelines created from this marker should infinitely loop when played. Timeline groups may loop, but the loop option will be ignored on child timelines within a timeline group. 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  TimelineGetMode {
  TimelineGetMode::GetDefault,
  TimelineGetMode::GetTimeline,
  TimelineGetMode::GetTimelineGroup,
  TimelineGetMode::GetComponentOfTimelineGroup
}
 
- Public Types inherited from CYISceneNode
enum  LayoutDirtyFlag : uint8_t {
  LayoutDirtyFlag::Clean,
  LayoutDirtyFlag::ChildDirty,
  LayoutDirtyFlag::Dirty
}
 
enum  LayoutConfigFetchMode {
  LayoutConfigFetchMode::DoNotLazyInstantiate = 0,
  LayoutConfigFetchMode::LazyInstantiate
}
 
enum  MeasureMode {
  MeasureMode::Unspecified,
  MeasureMode::UpTo,
  MeasureMode::Exactly
}
 
enum  FetchType {
  FetchType::Optional = 0,
  FetchType::Mandatory
}
 
typedef std::reverse_iterator< IteratorReverseIterator
 
typedef uint16_t DirtyFlag
 
- Public Types inherited from CYIEventTarget
enum  SpecialEventTargetType : uint8_t {
  SpecialEventTargetType::None = 0x00,
  SpecialEventTargetType::LastMove = 0x01,
  SpecialEventTargetType::LastDown = 0x02,
  SpecialEventTargetType::PointerCapture = 0x04,
  SpecialEventTargetType::KeyboardCapture = 0x08,
  SpecialEventTargetType::Root = 0x10,
  SpecialEventTargetType::NoPick = 0x20,
  SpecialEventTargetType::TrackpadCapture = 0x40
}
 
enum  Phase : uint8_t {
  Phase::Bubble,
  Phase::Capture
}
 

Public Member Functions

 CYISceneView ()
 
virtual ~CYISceneView ()
 
bool BuildFromTemplate (CYISceneManager *pSceneManager, const std::shared_ptr< CYIAssetViewTemplate > &pAssetViewTemplate, CYISceneManager::MissingClassHandlingMode missingHandlingMode=CYISceneManager::MissingClassHandlingMode::Abort)
 
virtual bool Init () override
 
bool IsInitialized () const
 
void SetClippingAreaNode (CYISceneNode *pClippingNode)
 
virtual bool GetProperty (const CYIString &propertyName, CYIString *pValue) const override
 
virtual bool HasProperties () const override
 
void EnableDefaultHitZone ()
 
bool IsResponsiveLayoutEnabled () const
 
void EnableResponsiveLayout ()
 
void DisableResponsiveLayout ()
 
void AddAnchor (EYIAnchorType anchorType)
 
YI_ANCHOR_DATA GetAnchor (EYIAnchorType anchorType) const
 
virtual const CYISceneView::AssetRequirementGetAssetRequirements (uint32_t *pRequirementCount)
 
CYIAbstractTimelineGetInTimeline () const
 
CYIAbstractTimelineGetOutTimeline () const
 
CYIAbstractTimelineGetFocusInTimeline () const
 
CYIAbstractTimelineGetFocusOutTimeline () const
 
virtual bool HandlesFocusInDescendants () const
 
virtual bool RequestFocus (CYIFocus::Direction direction=CYIFocus::Direction::Forward, CYIFocus::FocusRootRule focusRootRule=CYIFocus::FocusRootRule::DescendantsUpdateContext, const CYIAABB &previousFocusRect=CYIAABB(), const CYIFocusSearchOptions &options=CYIFocusSearchOptions())
 
bool HasFocus () const
 
void SetFocusable (bool focusable)
 
bool IsFocusable () const
 
bool CanBeFocused () const
 
void SetNextFocus (CYISceneView *pView, CYIFocus::Direction direction)
 
CYISceneViewGetNextFocus (CYIFocus::Direction direction) const
 
void SetInitiallyFocusedView (CYISceneView *pView)
 
CYISceneViewGetInitiallyFocusedView () const
 
CYISceneViewFindNextFocus (CYIFocus::Direction direction, const CYIFocusSearchOptions &options=CYIFocusSearchOptions()) const
 
CYISceneViewFindNextFocus (CYIFocus::Direction direction, CYIAABB &screenSpaceFocusRegion, const CYIFocusSearchOptions &options=CYIFocusSearchOptions()) const
 
virtual CYISceneViewFindNextFocusInDescendants (const CYISceneView *pCurrentFocusView, CYIFocus::Direction direction, CYIAABB &screenSpaceFocusRegion, const CYIFocusSearchOptions &options=CYIFocusSearchOptions()) const
 
const CYISceneNodeGetFocusRoot () const
 
CYISceneViewGetFocusHandler () const
 
virtual void OnFocusGained ()
 
virtual void FocusGained ()
 
virtual void OnFocusLost ()
 
virtual void FocusLost ()
 
const std::shared_ptr< CYIAssetViewTemplate > & GetViewTemplate () const
 
const std::vector< CYIString > & GetChildTemplateNames ()
 
virtual CYIAbstractTimelineGetTimeline (const CYIString &rMarkerName, TimelineGetMode mode=TimelineGetMode::GetDefault)
 
CYIAbstractTimelineGetTimeline (CYIMarkerData::ID id, TimelineGetMode mode=TimelineGetMode::GetDefault)
 
std::map< CYIString, CYITimeline * > GetTimelines () const
 
bool FindTimeline (CYIAbstractTimeline *&pTimeline, const CYIString &markerName, FetchType type, const CYIString &tag="", TimelineGetMode mode=TimelineGetMode::GetDefault)
 
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 SetDirtyFlag (DirtyFlag dirtyFlag)
 
DirtyFlag GetDirtyFlag () const
 
DirtyFlag GetPreviousDirtyFlag () const
 
const CYIStringGetName () const
 
CYIString GetUniqueName () const
 
void SetSceneManager (CYISceneManager *pSceneManager)
 
void SetName (const CYIString &name)
 
int32_t GetID () const
 
void SetID (int32_t id)
 
uint64_t GetUniqueID () const
 
bool AddChild (std::unique_ptr< CYISceneNode > pSceneNode)
 
bool AddChild (std::unique_ptr< CYISceneNode >, size_t index)
 
bool InsertChildAfter (CYISceneNode *pRefNode, std::unique_ptr< CYISceneNode > pSceneNode)
 
std::unique_ptr< CYISceneNodeRemoveChild (CYISceneNode *pSceneNode)
 
bool ReorderChild (size_t fromIndex, size_t toIndex)
 
CYITransformGetTransform ()
 
CYISceneNodeGetParent () const
 
bool ChangeParent (CYISceneNode *pParent)
 
CYISceneNodeGetDrawParent () const
 
bool IsAncestorOf (const CYISceneNode *pNode) const
 
CYISceneManagerGetSceneManager () const
 
size_t GetChildCount () const
 
uint32_t GetChildCountRecursive () const
 
CYISceneNodeGetChild (size_t index) const
 
Iterator begin (Iterator::Mode mode=Iterator::Mode::ImmediateChildren) const
 
Iterator end (Iterator::Mode mode=Iterator::Mode::ImmediateChildren) const
 
ReverseIterator rbegin (Iterator::Mode mode=Iterator::Mode::ImmediateChildren) const
 
ReverseIterator rend (Iterator::Mode mode=Iterator::Mode::ImmediateChildren) const
 
CYISceneNodeGetChild (const CYIString &name) const
 
size_t GetDrawChildCount () const
 
CYISceneNodeGetDrawChild (size_t index) const
 
CYISceneNodeGetDrawChildByID (int32_t id) const
 
template<class YI_SCENE_NODE_SUBCLASS >
YI_SCENE_NODE_SUBCLASS * GetChild (uint32_t targetMatchedNodeCount=1) const
 
template<class YI_SCENE_NODE_SUBCLASS >
std::list< YI_SCENE_NODE_SUBCLASS * > GetChildren () const
 
template<class YI_SCENE_NODE_SUBCLASS >
std::list< YI_SCENE_NODE_SUBCLASS * > GetDrawChildren () const
 
size_t GetIndexOfChild (const CYISceneNode *pSceneNode) const
 
void Show ()
 
void Hide ()
 
void SetVisibility (bool visible)
 
void SetOpacity (float opacity)
 
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 id)
 
CYISceneNodeGetNode (const int32_t id, const CYIRuntimeTypeInfo &enforceClassType)
 
template<class YI_SCENE_NODE_SUBCLASS >
bool FindNode (YI_SCENE_NODE_SUBCLASS *&pNode, const CYIString &nodeName, FetchType type, const CYIString &tag)
 
std::list< CYISceneNode * > GetNodes (const CYIString &name)
 
std::list< CYISceneNode * > GetNodes (int32_t id)
 
std::list< CYISceneNode * > GetNodes (const CYIRuntimeTypeInfo &enforceClassType)
 
template<class YI_SCENE_NODE_SUBCLASS >
const YI_SCENE_NODE_SUBCLASS * GetNode (uint32_t targetMatchedNodeCount=1) const
 
template<class YI_SCENE_NODE_SUBCLASS >
YI_SCENE_NODE_SUBCLASS * GetNode (uint32_t targetMatchedNodeCount=1)
 
void SetMesh (const std::shared_ptr< CYIMesh > &pMesh)
 
bool SetNPatchBitmap (const std::shared_ptr< CYIBitmap > &pNPatchBitmap)
 
void ClearNPatch ()
 
void SetMaterial (const std::shared_ptr< CYIMaterial > &pMaterial, size_t index=0)
 
void AddEffect (const std::shared_ptr< CYIEffect > &pEffect)
 
void RemoveEffect (const std::shared_ptr< CYIEffect > &pEffect)
 
size_t GetEffectCount () const
 
std::shared_ptr< CYIEffectGetEffect (size_t index) const
 
void ConnectEffectsToTimelines (const CYITimelineTrack *pTrack)
 
void AddMask (std::unique_ptr< CYIMask > pMask)
 
std::unique_ptr< CYIMaskRemoveMask (const CYIMask *pMask)
 
size_t GetMaskCount () const
 
const CYIMaskGetMask (size_t index) const
 
CYIMaskGetMask (size_t index)
 
const std::shared_ptr< CYIMesh > & GetMesh () const
 
const std::shared_ptr< CYIBitmap > & GetNPatchBitmap () const
 
size_t GetMaterialCount () const
 
const std::shared_ptr< CYIMaterialGetMaterial (size_t index=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 &anchorPoint)
 
void SetAnchorPoint (float x, float y, float z)
 
void SetAnchorPointX (float x)
 
void SetAnchorPointY (float y)
 
void SetAnchorPointZ (float z)
 
void SetPosition (const glm::vec3 &position)
 
void SetPosition (float x, float y, float z)
 
void SetPositionX (float x)
 
void SetPositionY (float y)
 
void SetPositionZ (float z)
 
void SetRotation (const glm::vec3 &rotation)
 
void SetRotation (float pitchDegrees, float yawDegrees, float rollDegrees)
 
void SetRotationX (float pitchDegrees)
 
void SetRotationY (float yawDegrees)
 
void SetRotationZ (float rollDegrees)
 
void SetOrientation (float pitchDegrees, float yawDegrees, float rollDegrees)
 
void SetOrientation (const glm::quat &orientation)
 
void SetScale (const glm::vec3 &scale)
 
void SetScale (float factorX, float factorY, float factorZ)
 
void SetScaleX (float factor)
 
void SetScaleY (float factor)
 
void SetScaleZ (float factor)
 
const glm::vec3 & GetPosition () const
 
const glm::vec3 & GetScale () const
 
const glm::vec3 & GetWorldScale () const
 
const glm::vec3 & GetWorldSurfaceScale () const
 
const glm::vec3 & GetRotation () const
 
const glm::quat & GetOrientation () const
 
const glm::vec3 & GetAnchorPoint () const
 
virtual void SetSize (const glm::vec3 &size, bool dirtyLayout=true)
 
const glm::vec3 & GetSize () const
 
const glm::vec3 & GetInitialSize () const
 
void SetMeasuredSize (const glm::vec3 &measuredSize)
 
const glm::vec3 & GetMeasuredSize () const
 
void SetInternalCustomTimelineValue (uint32_t trackID, const CYIVariant &value)
 
virtual void SetCustomTimelineValue (uint32_t trackID, const CYIVariant &value)
 
void SetClippingOn ()
 
void SetClippingOff ()
 
bool GetClipping () const
 
void SetClippingBox (const CYIAABB &rWorldBox)
 
const CYIAABBGetClippingBox () const
 
void StartPropertyAnimation (PropertyAnimation::Type propType, float from, float to, uint32_t durMs, CYITimeInterpolator *pTimeInterpolator=nullptr, bool dirtyLayout=true)
 
void StopPropertyAnimation (PropertyAnimation::Type propType)
 
void UpdateLocalSpaceCollision (CYIActionEvent *pActionEvent)
 
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 pointerID)
 
void StopCapturePointerEvents (uint8_t pointerID)
 
bool DrawBehindChildren (CYISceneNode *pSceneNode, bool *pChanged=nullptr)
 
bool DrawInFrontOfChildren (CYISceneNode *pSceneNode, bool *pChanged=nullptr)
 
bool DrawBehind (CYISceneNode *pSceneNode, bool *pChanged=nullptr)
 
bool DrawInFront (CYISceneNode *pSceneNode, bool *pChanged=nullptr)
 
bool IsFocusRoot () const
 
void SetIsFocusRoot (bool isFocusRoot)
 
virtual void OnFocusGainedInDescendants ()
 
virtual void FocusGainedInDescendants ()
 
virtual void OnFocusLostInDescendants ()
 
virtual void FocusLostInDescendants ()
 
virtual void OnFocusChangedInDescendants ()
 
virtual void FocusChangedInDescendants ()
 
virtual bool ContainsFocusableDescendant (const CYIFocusSearchOptions &options=CYIFocusSearchOptions()) const
 
void SetUseLocalTransformAndAlpha (bool use)
 
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 fetchMode=LayoutConfigFetchMode::LazyInstantiate) const
 
CYILayoutConfigGetLayoutConfig (LayoutConfigFetchMode fetchMode=LayoutConfigFetchMode::LazyInstantiate)
 
void SetLayoutState (std::unique_ptr< CYILayoutState > pLayoutState)
 
const CYILayoutStateGetLayoutState () const
 
CYILayoutStateGetLayoutState ()
 
void RequestLayout ()
 
LayoutDirtyFlag GetLayoutDirtyFlag () const
 
virtual void SetLayoutDirtyFlag (LayoutDirtyFlag flag)
 
virtual CYIAbstractCameraSceneNodeFindActiveCamera (const CYISceneNode *pTargetSceneNode=nullptr) const
 
template<typename T >
bool CanCastTo () const
 
- Public Member Functions inherited from CYIEventTarget
 CYIEventTarget ()
 
virtual ~CYIEventTarget ()
 
bool AddEventListener (CYIEvent::Type eventType, CYIEventHandler *pListener, CYIEventTarget::Phase phase=CYIEventTarget::Phase::Bubble)
 
bool RemoveEventListener (CYIEvent::Type eventType, CYIEventHandler *pListener, CYIEventTarget::Phase phase=CYIEventTarget::Phase::Bubble)
 
void SetSpecialTypeFlag (SpecialEventTargetType type)
 
void ClearSpecialTypeFlag (SpecialEventTargetType type)
 
SpecialEventTargetType GetSpecialTypes () const
 
- 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 enable)
 

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 *, PropertyAnimation::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 ()
 
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 OnChildVisibilityChanged (CYISceneNode *pChild)
 
LayoutDirtyFlag GetCurrentLayoutDirtyFlag () const
 
virtual CYIString GetDumpTreeString () const
 
void DumpTree (int32_t indentLevel) const
 
virtual void SetCustomUniforms ()
 
template<class T >
void SetNodeType ()
 
virtual CYISceneNodeGetNodeFromChildren (const CYIString &name)
 
virtual CYISceneNodeGetNodeFromChildren (const int32_t id)
 
virtual CYISceneNodeGetNodeFromChildren (const CYIRuntimeTypeInfo &enforceClassType)
 
CYISceneNodeGetNodeFromChildrenAfterTarget (const CYIRuntimeTypeInfo &enforceClassType, bool *pTargetReached, CYISceneNode *pStartAfterTarget)
 
- Protected Member Functions inherited from CYIScriptableRTTIObject
virtual std::pair< const CYIRuntimeTypeInfo *, const void * > GetRuntimeTypeInfoWithObject () const =0
 

Protected Attributes

bool m_stopEventPropagation
 
bool m_responsiveLayoutEnabled
 
bool m_sceneTreeBuilt
 
bool m_inAnimatedPosition
 
CYISceneNodem_pClippingNode
 
CYIAbstractTimelinem_pFocusInTimeline
 
CYIAbstractTimelinem_pFocusOutTimeline
 
std::unique_ptr< CYILayoutm_pLayout
 
std::shared_ptr< CYIAssetViewTemplatem_pAssetViewTemplate
 
std::shared_ptr< CYISceneNodeProxym_pInitiallyFocusedView
 
std::multimap< EYIAnchorType, 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
 
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_localOpacity
 
CYIAABB m_WSClipBox
 
glm::mat4 m_EffectTransform
 
std::unique_ptr< CYITransformm_pTransform
 
glm::vec3 m_size
 
glm::vec3 m_initialSize
 
glm::vec3 m_measuredSize
 
glm::vec3 m_vlsLastCollision
 
bool m_clip
 
bool m_localVisibility
 
int32_t m_id
 
uint64_t m_guid
 
std::shared_ptr< CYIRenderTargetm_pRenderTarget
 
std::shared_ptr< CYIMeshm_pMesh
 
std::unique_ptr< CYINPatch > m_pNPatch
 
std::shared_ptr< CYIBitmapm_pNPatchBitmap
 
std::shared_ptr< IYIUniformBufferObjectm_pShaderUniforms
 
- Protected Attributes inherited from CYIEventTarget
std::vector< EventListenerEntry > m_listeners
 
SpecialEventTargetType m_specialTypes
 
- Protected Attributes inherited from CYIEventHandler
bool m_enableEvents
 

Friends

class CYISceneViewPriv
 

Additional Inherited Members

- Static Public Attributes inherited from CYISceneNode
static const float OPACITY_NOT_VISIBLE_EPSILON
 
static constexpr DirtyFlag DirtyClean = 0x0000
 
static constexpr DirtyFlag DirtySceneGraph = 0x0001
 
static constexpr DirtyFlag DirtyVisibility = 0x0002
 
static constexpr DirtyFlag DirtyOpacity = 0x0004
 
static constexpr DirtyFlag DirtyLocalTransform = 0x0008
 
static constexpr DirtyFlag DirtyWorldTransform = 0x0010
 
static constexpr DirtyFlag DirtyUniform = 0x0020
 
static constexpr DirtyFlag DirtyWorldBoundingBox = 0x0040
 
static constexpr DirtyFlag DirtyMesh = 0x0080
 
static constexpr DirtyFlag DirtyWorldSurfaceScale = 0x0100
 
static constexpr DirtyFlag DirtyWorldScale = 0x0200
 
static constexpr DirtyFlag DirtyLocalBoundingBox = 0x0400
 
static constexpr DirtyFlag DirtyEverything = (DirtySceneGraph | DirtyVisibility | DirtyOpacity | DirtyLocalTransform | DirtyWorldTransform | DirtyUniform | DirtyWorldBoundingBox | DirtyWorldSurfaceScale | DirtyWorldScale | DirtyLocalBoundingBox)
 

Member Enumeration Documentation

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

Enumerator
GetDefault 

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

GetTimeline 

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

GetTimelineGroup 

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

GetComponentOfTimelineGroup 

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 ( EYIAnchorType  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::MissingClassHandlingMode  missingHandlingMode = CYISceneManager::MissingClassHandlingMode::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 CYIEvent::Phase::Capture and CYIEvent::Phase::Bubble phases if it has no mesh, but for it to be the target of an event, corresponding to CYIEvent::Phase::AtTarget, it must have a mesh.

See also
GetSize()
CYIEvent::Phase
void CYISceneView::EnableResponsiveLayout ( )

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

See also
IsResponsiveLayoutEnabled
CYISceneView* CYISceneView::FindNextFocus ( CYIFocus::Direction  direction,
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 direction.

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

Otherwise returns the closest view in direction 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::Direction  direction,
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::Direction  direction,
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 direction. 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,
FetchType  type,
const CYIString tag = "",
TimelineGetMode  mode = TimelineGetMode::GetDefault 
)

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 type is CYISceneNode::FetchType::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 ( EYIAnchorType  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::Direction  direction) 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,
TimelineGetMode  mode = TimelineGetMode::GetDefault 
)
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 mode parameter can be used to control the type of timeline being returned. If set to CYISceneView::TimelineGetMode::GetTimelineGroup, a CYIParallelTimelineGroup is returned (built recursively throughout the children of this view). If set to CYISceneView::TimelineGetMode::GetTimeline, a CYITimeline is returned. If set to CYISceneView::TimelineGetMode::GetDefault, the type of timeline returned depends on the configuration of the marker from which the timeline is being created.

CYIAbstractTimeline* CYISceneView::GetTimeline ( CYIMarkerData::ID  id,
TimelineGetMode  mode = TimelineGetMode::GetDefault 
)

Returns the timeline defined by id. 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 mode parameter can be used to control the type of timeline being returned. If set to CYISceneView::TimelineGetMode::GetTimelineGroup, a CYIParallelTimelineGroup is returned (built recursively throughout the children of this view). If set to CYISceneView::TimelineGetMode::GetTimeline, a CYITimeline is returned. If set to CYISceneView::TimelineGetMode::GetDefault, 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, CYIScrollingTextView, CYIDrawerView, and CYIPasswordTextEditView.

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.

virtual bool CYISceneView::HasProperties ( ) const
overridevirtual

Returns true if this view or this view's associated view template contains at least one property.

See also
IYIPropertiesSource::HasProperties

Reimplemented from CYISceneNode.

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::ScaleType::ResponsiveLayout to CYISceneManager::LoadScene
virtual void CYISceneView::LayoutDirtied ( )
overrideprotectedvirtual

Called when the layout dirty flag of this scene node has been set to CYISceneNode::LayoutDirtyFlag::Dirty.

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 size 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::Direction  direction = CYIFocus::Direction::Forward,
CYIFocus::FocusRootRule  focusRootRule = CYIFocus::FocusRootRule::DescendantsUpdateContext,
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.

focusRootRule 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  focusable)

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::Direction  direction 
)

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

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

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

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

If direction is one of the relative focus directions: CYISceneView::Direction::Forward and CYISceneView::Direction::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<EYIAnchorType, YI_ANCHOR_DATA> CYISceneView::m_anchors
protected
bool CYISceneView::m_inAnimatedPosition
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
bool CYISceneView::m_responsiveLayoutEnabled
protected
bool CYISceneView::m_sceneTreeBuilt
protected
bool CYISceneView::m_stopEventPropagation
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: