Dali 3D User Interface Engine
List of all members | Public Member Functions | Public Attributes
Impl::TestCustomActor Struct Reference
Inheritance diagram for Impl::TestCustomActor:
Inheritance graph
[legend]
Collaboration diagram for Impl::TestCustomActor:
Collaboration graph
[legend]

Public Member Functions

 TestCustomActor ()
 Constructor. More...
 
 TestCustomActor (bool nego)
 
virtual ~TestCustomActor ()
 Destructor. More...
 
void Initialize (const char *name=NULL)
 
virtual void OnInitialize (const char *name)
 
void ResetCallStack ()
 Resets the call stack. More...
 
void AddToCallStacks (const char *method)
 
virtual void OnStageConnection (int depth)
 Called after the actor has been connected to the stage. More...
 
virtual void OnStageDisconnection ()
 Called after the actor has been disconnected from Stage. More...
 
virtual void OnChildAdd (Actor &child)
 Called after a child has been added to the owning actor. More...
 
virtual void OnChildRemove (Actor &child)
 Called after a child has been removed from the owning actor. More...
 
virtual void OnPropertySet (Property::Index index, Property::Value propertyValue)
 Called when the owning actor property is set. More...
 
virtual void OnSizeSet (const Vector3 &targetSize)
 Called when the owning actor's size is set e.g. More...
 
virtual void OnSizeAnimation (Animation &animation, const Vector3 &targetSize)
 Called when the owning actor's size is animated e.g. More...
 
virtual bool OnTouchEvent (const TouchEvent &event)
 Called after a touch-event is received by the owning actor. More...
 
virtual bool OnHoverEvent (const HoverEvent &event)
 Called after a hover-event is received by the owning actor. More...
 
virtual bool OnWheelEvent (const WheelEvent &event)
 Called after a wheel-event is received by the owning actor. More...
 
virtual bool OnKeyEvent (const KeyEvent &event)
 Called after a key-event is received by the actor that has had its focus set. More...
 
virtual void OnKeyInputFocusGained ()
 
virtual void OnKeyInputFocusLost ()
 
virtual Vector3 GetNaturalSize ()
 Return the natural size of the actor. More...
 
virtual float GetHeightForWidth (float width)
 This method is called during size negotiation when a height is required for a given width. More...
 
virtual float GetWidthForHeight (float height)
 This method is called during size negotiation when a width is required for a given height. More...
 
virtual void OnRelayout (const Vector2 &size, RelayoutContainer &container)
 Called after the size negotiation has been finished for this control. More...
 
virtual void OnSetResizePolicy (ResizePolicy::Type policy, Dimension::Type dimension)
 Notification for deriving classes. More...
 
virtual void OnCalculateRelayoutSize (Dimension::Type dimension)
 Virtual method to notify deriving classes that relayout dependencies have been met and the size for this object is about to be calculated for the given dimension. More...
 
virtual float CalculateChildSize (const Dali::Actor &child, Dimension::Type dimension)
 Calculate the size for a child. More...
 
virtual void OnLayoutNegotiated (float size, Dimension::Type dimension)
 Virtual method to notify deriving classes that the size for a dimension has just been negotiated. More...
 
virtual bool RelayoutDependentOnChildren (Dimension::Type dimension=Dimension::ALL_DIMENSIONS)
 Determine if this actor is dependent on it's children for relayout. More...
 
void SetDaliProperty (std::string s)
 
void TestRelayoutRequest ()
 
float TestGetHeightForWidthBase (float width)
 
float TestGetWidthForHeightBase (float height)
 
float TestCalculateChildSizeBase (const Dali::Actor &child, Dimension::Type dimension)
 
bool TestRelayoutDependentOnChildrenBase (Dimension::Type dimension)
 
- Public Member Functions inherited from Dali::CustomActorImpl
virtual ~CustomActorImpl ()
 Forward declare future extension interface. More...
 
CustomActor Self () const
 Used by derived CustomActorImpl instances, to access the public Actor interface. More...
 
virtual Extension * GetExtension ()
 Retrieve the extension for this control. More...
 
void Initialize (Internal::CustomActor &owner)
 Initialize a CustomActor. More...
 
Internal::CustomActorGetOwner () const
 Get the owner. More...
 
bool RequiresTouchEvents () const
 Returns whether the OnTouchEvent() callback is required. More...
 
bool RequiresHoverEvents () const
 Returns whether the OnHoverEvent() callback is required. More...
 
bool RequiresWheelEvents () const
 Returns whether the OnWheelEvent() callback is required. More...
 
bool IsRelayoutEnabled () const
 Returns whether relayout is enabled. More...
 
- Public Member Functions inherited from Dali::RefObject
void Reference ()
 Increment the object's reference count. More...
 
void Unreference ()
 Decrement the object's reference count. More...
 
int ReferenceCount ()
 Retrieve the object's reference count. More...
 

Public Attributes

Property::Index mDaliProperty
 
std::vector< std::string > mMethodsCalled
 
Vector3 mSizeSet
 
Vector3 mTargetSize
 
bool mNego
 
unsigned int mDepth
 

Additional Inherited Members

- Protected Types inherited from Dali::CustomActorImpl
enum  ActorFlags {
  ACTOR_BEHAVIOUR_NONE = 0, DISABLE_SIZE_NEGOTIATION = 1 << 0, REQUIRES_TOUCH_EVENTS = 1 << 1, REQUIRES_HOVER_EVENTS = 1 << 2,
  REQUIRES_WHEEL_EVENTS = 1 << 3, LAST_ACTOR_FLAG
}
 
- Protected Member Functions inherited from Dali::CustomActorImpl
 CustomActorImpl (ActorFlags flags)
 Create a CustomActorImpl. More...
 
void RelayoutRequest ()
 Request a relayout, which means performing a size negotiation on this actor, its parent and children (and potentially whole scene). More...
 
float GetHeightForWidthBase (float width)
 Provides the Actor implementation of GetHeightForWidth. More...
 
float GetWidthForHeightBase (float height)
 Provides the Actor implementation of GetWidthForHeight. More...
 
float CalculateChildSizeBase (const Dali::Actor &child, Dimension::Type dimension)
 Calculate the size for a child using the base actor object. More...
 
bool RelayoutDependentOnChildrenBase (Dimension::Type dimension=Dimension::ALL_DIMENSIONS)
 Determine if this actor is dependent on it's children for relayout from the base class. More...
 
- Static Protected Attributes inherited from Dali::CustomActorImpl
static const int ACTOR_FLAG_COUNT = Log< LAST_ACTOR_FLAG - 1 >::value + 1
 Value for deriving classes to continue on the flag enum. More...
 

Detailed Description

Definition at line 54 of file utc-Dali-CustomActor.cpp.

Constructor & Destructor Documentation

Impl::TestCustomActor::TestCustomActor ( )
inline

Constructor.

Definition at line 59 of file utc-Dali-CustomActor.cpp.

Impl::TestCustomActor::TestCustomActor ( bool  nego)
inline

Definition at line 69 of file utc-Dali-CustomActor.cpp.

virtual Impl::TestCustomActor::~TestCustomActor ( )
inlinevirtual

Destructor.

Definition at line 80 of file utc-Dali-CustomActor.cpp.

Member Function Documentation

void Impl::TestCustomActor::AddToCallStacks ( const char *  method)
inline

Definition at line 103 of file utc-Dali-CustomActor.cpp.

References GetName(), and anonymous_namespace{utc-Dali-CustomActor.cpp}::MasterCallStack.

Here is the call graph for this function:

virtual float Impl::TestCustomActor::CalculateChildSize ( const Dali::Actor child,
Dimension::Type  dimension 
)
inlinevirtual

Calculate the size for a child.

.0

Parameters
[in]childThe child actor to calculate the size for
[in]dimensionThe dimension to calculate the size for. E.g. width or height.
Returns
Return the calculated size for the given dimension.

Implements Dali::CustomActorImpl.

Definition at line 210 of file utc-Dali-CustomActor.cpp.

virtual float Impl::TestCustomActor::GetHeightForWidth ( float  width)
inlinevirtual

This method is called during size negotiation when a height is required for a given width.

Derived classes should override this if they wish to customize the height returned.

.0

Parameters
widthWidth to use.
Returns
The height based on the width.

Implements Dali::CustomActorImpl.

Definition at line 187 of file utc-Dali-CustomActor.cpp.

virtual Vector3 Impl::TestCustomActor::GetNaturalSize ( )
inlinevirtual

Return the natural size of the actor.

.0

Returns
The actor's natural size

Implements Dali::CustomActorImpl.

Definition at line 182 of file utc-Dali-CustomActor.cpp.

virtual float Impl::TestCustomActor::GetWidthForHeight ( float  height)
inlinevirtual

This method is called during size negotiation when a width is required for a given height.

Derived classes should override this if they wish to customize the width returned.

.0

Parameters
heightHeight to use.
Returns
The width based on the width.

Implements Dali::CustomActorImpl.

Definition at line 192 of file utc-Dali-CustomActor.cpp.

void Impl::TestCustomActor::Initialize ( const char *  name = NULL)
inline
virtual void Impl::TestCustomActor::OnCalculateRelayoutSize ( Dimension::Type  dimension)
inlinevirtual

Virtual method to notify deriving classes that relayout dependencies have been met and the size for this object is about to be calculated for the given dimension.

.0

Parameters
dimensionThe dimension that is about to be calculated

Implements Dali::CustomActorImpl.

Definition at line 206 of file utc-Dali-CustomActor.cpp.

virtual void Impl::TestCustomActor::OnChildAdd ( Actor child)
inlinevirtual

Called after a child has been added to the owning actor.

.0

Parameters
[in]childThe child which has been added

Implements Dali::CustomActorImpl.

Reimplemented in Impl::TestCustomActorVariant7.

Definition at line 132 of file utc-Dali-CustomActor.cpp.

virtual void Impl::TestCustomActor::OnChildRemove ( Actor child)
inlinevirtual

Called after a child has been removed from the owning actor.

.0

Parameters
[in]childThe child being removed

Implements Dali::CustomActorImpl.

Reimplemented in Impl::TestCustomActorVariant8.

Definition at line 136 of file utc-Dali-CustomActor.cpp.

virtual bool Impl::TestCustomActor::OnHoverEvent ( const HoverEvent event)
inlinevirtual

Called after a hover-event is received by the owning actor.

.0

Parameters
[in]eventThe hover event
Returns
True if the event should be consumed.
Note
CustomActorImpl::REQUIRES_HOVER_EVENTS must be enabled during construction. See CustomActorImpl::CustomActorImpl( ActorFlags flags ).

Implements Dali::CustomActorImpl.

Definition at line 159 of file utc-Dali-CustomActor.cpp.

virtual void Impl::TestCustomActor::OnInitialize ( const char *  name)
inlinevirtual

Reimplemented in Impl::TestCustomActorVariant7.

Definition at line 91 of file utc-Dali-CustomActor.cpp.

virtual bool Impl::TestCustomActor::OnKeyEvent ( const KeyEvent event)
inlinevirtual

Called after a key-event is received by the actor that has had its focus set.

.0

Parameters
[in]eventthe Key Event
Returns
True if the event should be consumed.

Implements Dali::CustomActorImpl.

Definition at line 169 of file utc-Dali-CustomActor.cpp.

virtual void Impl::TestCustomActor::OnKeyInputFocusGained ( )
inlinevirtual

Definition at line 174 of file utc-Dali-CustomActor.cpp.

virtual void Impl::TestCustomActor::OnKeyInputFocusLost ( )
inlinevirtual

Definition at line 178 of file utc-Dali-CustomActor.cpp.

virtual void Impl::TestCustomActor::OnLayoutNegotiated ( float  size,
Dimension::Type  dimension 
)
inlinevirtual

Virtual method to notify deriving classes that the size for a dimension has just been negotiated.

.0

Parameters
[in]sizeThe new size for the given dimension
[in]dimensionThe dimension that was just negotiated

Implements Dali::CustomActorImpl.

Definition at line 215 of file utc-Dali-CustomActor.cpp.

virtual void Impl::TestCustomActor::OnPropertySet ( Property::Index  index,
Property::Value  propertyValue 
)
inlinevirtual

Called when the owning actor property is set.

.0

Parameters
[in]indexThe Property index that was set
[in]propertyValueThe value to set

Reimplemented from Dali::CustomActorImpl.

Definition at line 140 of file utc-Dali-CustomActor.cpp.

virtual void Impl::TestCustomActor::OnRelayout ( const Vector2 size,
RelayoutContainer container 
)
inlinevirtual

Called after the size negotiation has been finished for this control.

The control is expected to assign this given size to itself/its children.

Should be overridden by derived classes if they need to layout actors differently after certain operations like add or remove actors, resize or after changing specific properties.

.0

Parameters
[in]sizeThe allocated size.
[in,out]containerThe control should add actors to this container that it is not able to allocate a size for.
Note
As this function is called from inside the size negotiation algorithm, you cannot call RequestRelayout (the call would just be ignored).

Implements Dali::CustomActorImpl.

Definition at line 197 of file utc-Dali-CustomActor.cpp.

References anonymous_namespace{utc-Dali-CustomActor.cpp}::gOnRelayout.

virtual void Impl::TestCustomActor::OnSetResizePolicy ( ResizePolicy::Type  policy,
Dimension::Type  dimension 
)
inlinevirtual

Notification for deriving classes.

.0

Parameters
[in]policyThe policy being set
[in]dimensionThe dimension the policy is being set for

Implements Dali::CustomActorImpl.

Definition at line 202 of file utc-Dali-CustomActor.cpp.

virtual void Impl::TestCustomActor::OnSizeAnimation ( Animation animation,
const Vector3 targetSize 
)
inlinevirtual

Called when the owning actor's size is animated e.g.

using Animation::AnimateTo( Property( actor, Actor::Property::SIZE ), ... ).

.0

Parameters
[in]animationThe object which is animating the owning actor.
[in]targetSizeThe target size. Note that this target size may not match the size returned via Actor::GetTargetSize.

Implements Dali::CustomActorImpl.

Definition at line 149 of file utc-Dali-CustomActor.cpp.

virtual void Impl::TestCustomActor::OnSizeSet ( const Vector3 targetSize)
inlinevirtual

Called when the owning actor's size is set e.g.

using Actor::SetSize().

.0

Parameters
[in]targetSizeThe target size. Note that this target size may not match the size returned via Actor::GetTargetSize.

Implements Dali::CustomActorImpl.

Definition at line 144 of file utc-Dali-CustomActor.cpp.

virtual void Impl::TestCustomActor::OnStageConnection ( int  depth)
inlinevirtual

Called after the actor has been connected to the stage.

When an actor is connected, it will be directly or indirectly parented to the root Actor. .0

Parameters
[in]depthThe depth in the hierarchy for the actor
Note
The root Actor is provided automatically by Dali::Stage, and is always considered to be connected. When the parent of a set of actors is connected to the stage, then all of the children will received this callback. For the following actor tree, the callback order will be A, B, D, E, C, and finally F.
A (parent)
/ \
B C
/ \ \
D E F
Parameters
[in]depthThe depth in the hierarchy for the actor

Implements Dali::CustomActorImpl.

Reimplemented in Impl::TestCustomActorVariant5, Impl::TestCustomActorVariant2, and Impl::TestCustomActorVariant1.

Definition at line 123 of file utc-Dali-CustomActor.cpp.

virtual void Impl::TestCustomActor::OnStageDisconnection ( )
inlinevirtual

Called after the actor has been disconnected from Stage.

If an actor is disconnected it either has no parent, or is parented to a disconnected actor.

.0

Note
When the parent of a set of actors is disconnected to the stage, then all of the children will received this callback, starting with the leaf actors. For the following actor tree, the callback order will be D, E, B, F, C, and finally A.
A (parent)
/ \
B C
/ \ \
D E F

Implements Dali::CustomActorImpl.

Reimplemented in Impl::TestCustomActorVariant6, Impl::TestCustomActorVariant4, and Impl::TestCustomActorVariant3.

Definition at line 128 of file utc-Dali-CustomActor.cpp.

virtual bool Impl::TestCustomActor::OnTouchEvent ( const TouchEvent event)
inlinevirtual

Called after a touch-event is received by the owning actor.

.0

Parameters
[in]eventThe touch event
Returns
True if the event should be consumed.
Note
CustomActorImpl::REQUIRES_TOUCH_EVENTS must be enabled during construction. See CustomActorImpl::CustomActorImpl( ActorFlags flags ).

Implements Dali::CustomActorImpl.

Definition at line 154 of file utc-Dali-CustomActor.cpp.

virtual bool Impl::TestCustomActor::OnWheelEvent ( const WheelEvent event)
inlinevirtual

Called after a wheel-event is received by the owning actor.

.0

Parameters
[in]eventThe wheel event
Returns
True if the event should be consumed.
Note
CustomActorImpl::REQUIRES_WHEEL_EVENTS must be enabled during construction. See CustomActorImpl::CustomActorImpl( ActorFlags flags ).

Implements Dali::CustomActorImpl.

Definition at line 164 of file utc-Dali-CustomActor.cpp.

virtual bool Impl::TestCustomActor::RelayoutDependentOnChildren ( Dimension::Type  dimension = Dimension::ALL_DIMENSIONS)
inlinevirtual

Determine if this actor is dependent on it's children for relayout.

.0

Parameters
dimensionThe dimension(s) to check for
Returns
Return if the actor is dependent on it's children.

Implements Dali::CustomActorImpl.

Definition at line 219 of file utc-Dali-CustomActor.cpp.

void Impl::TestCustomActor::ResetCallStack ( )
inline

Resets the call stack.

Definition at line 96 of file utc-Dali-CustomActor.cpp.

void Impl::TestCustomActor::SetDaliProperty ( std::string  s)
inline

Definition at line 224 of file utc-Dali-CustomActor.cpp.

float Impl::TestCustomActor::TestCalculateChildSizeBase ( const Dali::Actor child,
Dimension::Type  dimension 
)
inline

Definition at line 243 of file utc-Dali-CustomActor.cpp.

float Impl::TestCustomActor::TestGetHeightForWidthBase ( float  width)
inline

Definition at line 233 of file utc-Dali-CustomActor.cpp.

float Impl::TestCustomActor::TestGetWidthForHeightBase ( float  height)
inline

Definition at line 238 of file utc-Dali-CustomActor.cpp.

bool Impl::TestCustomActor::TestRelayoutDependentOnChildrenBase ( Dimension::Type  dimension)
inline

Definition at line 248 of file utc-Dali-CustomActor.cpp.

void Impl::TestCustomActor::TestRelayoutRequest ( )
inline

Definition at line 228 of file utc-Dali-CustomActor.cpp.

Member Data Documentation

Property::Index Impl::TestCustomActor::mDaliProperty

Definition at line 253 of file utc-Dali-CustomActor.cpp.

unsigned int Impl::TestCustomActor::mDepth

Definition at line 258 of file utc-Dali-CustomActor.cpp.

std::vector< std::string > Impl::TestCustomActor::mMethodsCalled

Definition at line 254 of file utc-Dali-CustomActor.cpp.

bool Impl::TestCustomActor::mNego

Definition at line 257 of file utc-Dali-CustomActor.cpp.

Vector3 Impl::TestCustomActor::mSizeSet

Definition at line 255 of file utc-Dali-CustomActor.cpp.

Vector3 Impl::TestCustomActor::mTargetSize

Definition at line 256 of file utc-Dali-CustomActor.cpp.


The documentation for this struct was generated from the following file:
Dali Docs Home
Read more about Dali