Dali 3D User Interface Engine
List of all members | Classes | Public Types | Public Member Functions | Static Public Member Functions
Dali::Layer Class Reference

Layers provide a mechanism for overlaying groups of actors on top of each other. More...

#include <layer.h>

Inheritance diagram for Dali::Layer:
Inheritance graph
[legend]
Collaboration diagram for Dali::Layer:
Collaboration graph
[legend]

Classes

struct  Property
 An enumeration of properties belonging to the Layer class. More...
 

Public Types

enum  Behavior { LAYER_2D, LAYER_3D }
 Enumeration for the behavior of the layer. More...
 
enum  TreeDepthMultiplier { TREE_DEPTH_MULTIPLIER = 10000 }
 TREE_DEPTH_MULTIPLIER is used by the rendering sorting algorithm to decide which actors to render first. More...
 
typedef float(* SortFunctionType )(const Vector3 &position)
 The sort function type. More...
 
- Public Types inherited from Dali::Actor
typedef Signal< bool(Actor,
const TouchEvent &)> 
TouchSignalType
 Touch signal type .0. More...
 
typedef Signal< bool(Actor,
const HoverEvent &)> 
HoverSignalType
 Hover signal type .0. More...
 
typedef Signal< bool(Actor,
const WheelEvent &) > 
WheelEventSignalType
 Wheel signal type .0. More...
 
typedef Signal< void(Actor) > OnStageSignalType
 Stage connection signal type .0. More...
 
typedef Signal< void(Actor) > OffStageSignalType
 Stage disconnection signal type .0. More...
 
typedef Signal< void(Actor) > OnRelayoutSignalType
 Called when the actor is relaid out .0. More...
 
- Public Types inherited from Dali::Handle
enum  Capability { DYNAMIC_PROPERTIES = 0x01 }
 An Handle's capabilities can be queried using Handle::Supports() .0. More...
 
- Public Types inherited from Dali::BaseHandle
typedef void(BaseHandle::* BooleanType )() const
 Pointer-to-member type. More...
 

Public Member Functions

 Layer ()
 Create an empty Layer handle. More...
 
 ~Layer ()
 Destructor. More...
 
 Layer (const Layer &copy)
 Copy constructor. More...
 
Layeroperator= (const Layer &rhs)
 Assignment operator. More...
 
unsigned int GetDepth () const
 Query the depth of the layer. More...
 
void Raise ()
 Increment the depth of the layer. More...
 
void Lower ()
 Decrement the depth of the layer. More...
 
void RaiseAbove (Layer target)
 Ensures the layers depth is greater than the target layer. More...
 
void LowerBelow (Layer target)
 Ensures the layers depth is less than the target layer. More...
 
void RaiseToTop ()
 Raises the layer to the top. More...
 
void LowerToBottom ()
 Lowers the layer to the bottom. More...
 
void MoveAbove (Layer target)
 Moves the layer directly above the given layer. More...
 
void MoveBelow (Layer target)
 Moves the layer directly below the given layer. More...
 
void SetBehavior (Behavior behavior)
 Set the behavior of the layer. More...
 
Behavior GetBehavior () const
 Get the behavior of the layer. More...
 
void SetClipping (bool enabled)
 Sets whether clipping is enabled for a layer. More...
 
bool IsClipping () const
 Query whether clipping is enabled for a layer. More...
 
void SetClippingBox (int x, int y, int width, int height)
 Sets the clipping box of a layer, in window coordinates. More...
 
void SetClippingBox (ClippingBox box)
 Sets the clipping box of a layer, in window coordinates. More...
 
ClippingBox GetClippingBox () const
 Retrieves the clipping box of a layer, in window coordinates. More...
 
void SetDepthTestDisabled (bool disable)
 Whether to disable the depth test. More...
 
bool IsDepthTestDisabled () const
 Retrieves whether depth test is disabled. More...
 
void SetSortFunction (SortFunctionType function)
 This allows the user to specify the sort function that the layer should use. More...
 
void SetTouchConsumed (bool consume)
 This allows the user to specify whether this layer should consume touch (including gestures). More...
 
bool IsTouchConsumed () const
 Retrieves whether the layer consumes touch (including gestures). More...
 
void SetHoverConsumed (bool consume)
 This allows the user to specify whether this layer should consume hover. More...
 
bool IsHoverConsumed () const
 Retrieves whether the layer consumes hover. More...
 
DALI_INTERNAL Layer (Internal::Layer *Layer)
 This constructor is used by Layer::New() methods. More...
 
- Public Member Functions inherited from Dali::Actor
 Actor ()
 Create an uninitialized Actor; this can be initialized with Actor::New(). More...
 
 ~Actor ()
 Dali::Actor is intended as a base class. More...
 
 Actor (const Actor &copy)
 Copy constructor. More...
 
Actoroperator= (const Actor &rhs)
 Assignment operator. More...
 
const std::string & GetName () const
 Retrieve the Actor's name. More...
 
void SetName (const std::string &name)
 Sets the Actor's name. More...
 
unsigned int GetId () const
 Retrieve the unique ID of the actor. More...
 
bool IsRoot () const
 Query whether an actor is the root actor, which is owned by the Stage. More...
 
bool OnStage () const
 Query whether the actor is connected to the Stage. More...
 
bool IsLayer () const
 Query whether the actor is of class Dali::Layer. More...
 
Layer GetLayer ()
 Gets the layer in which the actor is present. More...
 
void Add (Actor child)
 Adds a child Actor to this Actor. More...
 
void Remove (Actor child)
 Removes a child Actor from this Actor. More...
 
void Unparent ()
 Removes an actor from its parent. More...
 
unsigned int GetChildCount () const
 Retrieve the number of children held by the actor. More...
 
Actor GetChildAt (unsigned int index) const
 Retrieve and child actor by index. More...
 
Actor FindChildByName (const std::string &actorName)
 Search through this actor's hierarchy for an actor with the given name. More...
 
Actor FindChildById (const unsigned int id)
 Search through this actor's hierarchy for an actor with the given unique ID. More...
 
Actor GetParent () const
 Retrieve the actor's parent. More...
 
void SetParentOrigin (const Vector3 &origin)
 Set the origin of an actor, within its parent's area. More...
 
Vector3 GetCurrentParentOrigin () const
 Retrieve the parent-origin of an actor. More...
 
void SetAnchorPoint (const Vector3 &anchorPoint)
 Set the anchor-point of an actor. More...
 
Vector3 GetCurrentAnchorPoint () const
 Retrieve the anchor-point of an actor. More...
 
void SetSize (float width, float height)
 Sets the size of an actor. More...
 
void SetSize (float width, float height, float depth)
 Sets the size of an actor. More...
 
void SetSize (const Vector2 &size)
 Sets the size of an actor. More...
 
void SetSize (const Vector3 &size)
 Sets the size of an actor. More...
 
Vector3 GetTargetSize () const
 Retrieve the actor's size. More...
 
Vector3 GetCurrentSize () const
 Retrieve the actor's size. More...
 
Vector3 GetNaturalSize () const
 Return the natural size of the actor. More...
 
void SetPosition (float x, float y)
 Sets the position of the actor. More...
 
void SetPosition (float x, float y, float z)
 Sets the position of the Actor. More...
 
void SetPosition (const Vector3 &position)
 Sets the position of the Actor. More...
 
void SetX (float x)
 Set the position of an actor along the X-axis. More...
 
void SetY (float y)
 Set the position of an actor along the Y-axis. More...
 
void SetZ (float z)
 Set the position of an actor along the Z-axis. More...
 
void TranslateBy (const Vector3 &distance)
 Translate an actor relative to its existing position. More...
 
Vector3 GetCurrentPosition () const
 Retrieve the position of the Actor. More...
 
Vector3 GetCurrentWorldPosition () const
 Retrieve the world-position of the Actor. More...
 
void SetPositionInheritanceMode (PositionInheritanceMode mode)
 Set the actors position inheritance mode. More...
 
PositionInheritanceMode GetPositionInheritanceMode () const
 Returns the actors position inheritance mode. More...
 
void SetOrientation (const Degree &angle, const Vector3 &axis)
 Sets the orientation of the Actor. More...
 
void SetOrientation (const Radian &angle, const Vector3 &axis)
 Sets the orientation of the Actor. More...
 
void SetOrientation (const Quaternion &orientation)
 Sets the orientation of the Actor. More...
 
void RotateBy (const Degree &angle, const Vector3 &axis)
 Apply a relative rotation to an actor. More...
 
void RotateBy (const Radian &angle, const Vector3 &axis)
 Apply a relative rotation to an actor. More...
 
void RotateBy (const Quaternion &relativeRotation)
 Apply a relative rotation to an actor. More...
 
Quaternion GetCurrentOrientation () const
 Retreive the Actor's orientation. More...
 
void SetInheritOrientation (bool inherit)
 Set whether a child actor inherits it's parent's orientation. More...
 
bool IsOrientationInherited () const
 Returns whether the actor inherits its parent's orientation. More...
 
Quaternion GetCurrentWorldOrientation () const
 Retrieve the world-orientation of the Actor. More...
 
void SetScale (float scale)
 Set the scale factor applied to an actor. More...
 
void SetScale (float scaleX, float scaleY, float scaleZ)
 Set the scale factor applied to an actor. More...
 
void SetScale (const Vector3 &scale)
 Set the scale factor applied to an actor. More...
 
void ScaleBy (const Vector3 &relativeScale)
 Apply a relative scale to an actor. More...
 
Vector3 GetCurrentScale () const
 Retrieve the scale factor applied to an actor. More...
 
Vector3 GetCurrentWorldScale () const
 Retrieve the world-scale of the Actor. More...
 
void SetInheritScale (bool inherit)
 Set whether a child actor inherits it's parent's scale. More...
 
bool IsScaleInherited () const
 Returns whether the actor inherits its parent's scale. More...
 
Matrix GetCurrentWorldMatrix () const
 Retrieves the world-matrix of the actor. More...
 
void SetVisible (bool visible)
 Sets the visibility flag of an actor. More...
 
bool IsVisible () const
 Retrieve the visibility flag of an actor. More...
 
void SetOpacity (float opacity)
 Sets the opacity of an actor. More...
 
float GetCurrentOpacity () const
 Retrieve the actor's opacity. More...
 
void SetColor (const Vector4 &color)
 Sets the actor's color; this is an RGBA value. More...
 
Vector4 GetCurrentColor () const
 Retrieve the actor's color. More...
 
void SetColorMode (ColorMode colorMode)
 Sets the actor's color mode. More...
 
ColorMode GetColorMode () const
 Returns the actor's color mode. More...
 
Vector4 GetCurrentWorldColor () const
 Retrieve the world-color of the Actor, where each component is clamped within the 0->1 range. More...
 
void SetDrawMode (DrawMode::Type drawMode)
 Set how the actor and its children should be drawn. More...
 
DrawMode::Type GetDrawMode () const
 Query how the actor and its children will be drawn. More...
 
void SetSensitive (bool sensitive)
 Sets whether an actor should emit touch or hover signals; see SignalTouch() and SignalHover(). More...
 
bool IsSensitive () const
 Query whether an actor emits touch or hover event signals. More...
 
bool ScreenToLocal (float &localX, float &localY, float screenX, float screenY) const
 Converts screen coordinates into the actor's coordinate system using the default camera. More...
 
void SetLeaveRequired (bool required)
 Sets whether the actor should receive a notification when touch or hover motion events leave the boundary of the actor. More...
 
bool GetLeaveRequired () const
 This returns whether the actor requires touch or hover events whenever touch or hover motion events leave the boundary of the actor. More...
 
void SetKeyboardFocusable (bool focusable)
 Sets whether the actor should be focusable by keyboard navigation. More...
 
bool IsKeyboardFocusable () const
 Returns whether the actor is focusable by keyboard navigation. More...
 
void SetResizePolicy (ResizePolicy::Type policy, Dimension::Type dimension)
 Set the resize policy to be used for the given dimension(s). More...
 
ResizePolicy::Type GetResizePolicy (Dimension::Type dimension) const
 Return the resize policy used for a single dimension. More...
 
void SetSizeScalePolicy (SizeScalePolicy::Type policy)
 Set the policy to use when setting size with size negotiation. More...
 
SizeScalePolicy::Type GetSizeScalePolicy () const
 Return the size scale policy in use. More...
 
void SetSizeModeFactor (const Vector3 &factor)
 Sets the relative to parent size factor of the actor. More...
 
Vector3 GetSizeModeFactor () const
 Retrieve the relative to parent size factor of the actor. More...
 
float GetHeightForWidth (float width)
 Calculate the height of the actor given a width. More...
 
float GetWidthForHeight (float height)
 Calculate the width of the actor given a height. More...
 
float GetRelayoutSize (Dimension::Type dimension) const
 Return the value of negotiated dimension for the given dimension. More...
 
void SetPadding (const Padding &padding)
 Set the padding for use in layout. More...
 
void GetPadding (Padding &paddingOut) const
 Return the value of the padding. More...
 
void SetMinimumSize (const Vector2 &size)
 Set the minimum size an actor can be assigned in size negotiation. More...
 
Vector2 GetMinimumSize ()
 Return the minimum relayout size. More...
 
void SetMaximumSize (const Vector2 &size)
 Set the maximum size an actor can be assigned in size negotiation. More...
 
Vector2 GetMaximumSize ()
 Return the maximum relayout size. More...
 
int GetHierarchyDepth ()
 Get depth in the hierarchy for the actor. More...
 
unsigned int AddRenderer (Renderer &renderer)
 Add a renderer to this actor. More...
 
unsigned int GetRendererCount () const
 Get the number of renderers on this actor. More...
 
Renderer GetRendererAt (unsigned int index)
 Get a Renderer by index. More...
 
void RemoveRenderer (Renderer &renderer)
 Remove an renderer from the actor. More...
 
void RemoveRenderer (unsigned int index)
 Remove an renderer from the actor by index. More...
 
TouchSignalTypeTouchedSignal ()
 This signal is emitted when touch input is received. More...
 
HoverSignalTypeHoveredSignal ()
 This signal is emitted when hover input is received. More...
 
WheelEventSignalTypeWheelEventSignal ()
 This signal is emitted when wheel event is received. More...
 
OnStageSignalTypeOnStageSignal ()
 This signal is emitted after the actor has been connected to the stage. More...
 
OffStageSignalTypeOffStageSignal ()
 This signal is emitted after the actor has been disconnected from the stage. More...
 
OnRelayoutSignalTypeOnRelayoutSignal ()
 This signal is emitted after the size has been set on the actor during relayout. More...
 
DALI_INTERNAL Actor (Internal::Actor *actor)
 This constructor is used by Actor::New() methods. More...
 
- Public Member Functions inherited from Dali::Handle
 Handle (Dali::Internal::Object *handle)
 This constructor is used by Dali New() methods. More...
 
 Handle ()
 This constructor provides an uninitialized Dali::Handle. More...
 
 ~Handle ()
 Dali::Handle is intended as a base class. More...
 
 Handle (const Handle &handle)
 This copy constructor is required for (smart) pointer semantics. More...
 
Handleoperator= (const Handle &rhs)
 This assignment operator is required for (smart) pointer semantics. More...
 
bool Supports (Capability capability) const
 Query whether an handle supports a given capability. More...
 
unsigned int GetPropertyCount () const
 Query how many properties are provided by an handle. More...
 
std::string GetPropertyName (Property::Index index) const
 Query the name of a property. More...
 
Property::Index GetPropertyIndex (const std::string &name) const
 Query the index of a property. More...
 
bool IsPropertyWritable (Property::Index index) const
 Query whether a property can be set using SetProperty(). More...
 
bool IsPropertyAnimatable (Property::Index index) const
 Query whether a writable property can be the target of an animation or constraint. More...
 
bool IsPropertyAConstraintInput (Property::Index index) const
 Query whether a property can be used as in input to a constraint. More...
 
Property::Type GetPropertyType (Property::Index index) const
 Query the type of a property. More...
 
void SetProperty (Property::Index index, const Property::Value &propertyValue)
 Set the value of an existing property. More...
 
Property::Index RegisterProperty (const std::string &name, const Property::Value &propertyValue)
 Register a new animatable property. More...
 
Property::Index RegisterProperty (const std::string &name, const Property::Value &propertyValue, Property::AccessMode accessMode)
 Register a new property. More...
 
Property::Value GetProperty (Property::Index index) const
 Retrieve a property value. More...
 
template<typename T >
GetProperty (Property::Index index) const
 Convenience function for obtaining a property of a known type. More...
 
void GetPropertyIndices (Property::IndexContainer &indices) const
 Retrieve all the property indices for this object (including custom properties). More...
 
PropertyNotification AddPropertyNotification (Property::Index index, const PropertyCondition &condition)
 Add a property notification to this object. More...
 
PropertyNotification AddPropertyNotification (Property::Index index, int componentIndex, const PropertyCondition &condition)
 Add a property notification to this object. More...
 
void RemovePropertyNotification (Dali::PropertyNotification propertyNotification)
 Remove a property notification from this object. More...
 
void RemovePropertyNotifications ()
 Remove all property notifications from this object. More...
 
void RemoveConstraints ()
 Remove all constraints from an Object. More...
 
void RemoveConstraints (unsigned int tag)
 Remove all the constraint from the Object with a matching tag. More...
 
- Public Member Functions inherited from Dali::BaseHandle
 BaseHandle (Dali::BaseObject *handle)
 This constructor is used by Dali New() methods. More...
 
 BaseHandle ()
 This constructor provides an uninitialized Dali::BaseHandle. More...
 
 ~BaseHandle ()
 Dali::BaseHandle is intended as a base class. More...
 
 BaseHandle (const BaseHandle &handle)
 This copy constructor is required for (smart) pointer semantics. More...
 
BaseHandleoperator= (const BaseHandle &rhs)
 This assignment operator is required for (smart) pointer semantics. More...
 
template<class T >
bool ConnectSignal (ConnectionTrackerInterface *connectionTracker, const std::string &signalName, const T &functor)
 Connects a void() functor to a specified signal. More...
 
bool DoAction (const std::string &actionName, const Property::Map &attributes)
 Perform action on this object with the given action name and attributes. More...
 
const std::string & GetTypeName () const
 Returns the type name for the Handle. More...
 
bool GetTypeInfo (Dali::TypeInfo &info) const
 Returns the type info for the Handle. More...
 
BaseObjectGetBaseObject ()
 Retrieve the internal Dali resource. More...
 
const BaseObjectGetBaseObject () const
 Retrieve the internal Dali resource. More...
 
void Reset ()
 Resets the handle. More...
 
 operator BooleanType () const
 Converts an handle to a BooleanType. More...
 
bool operator== (const BaseHandle &rhs) const
 Equality operator overload. More...
 
bool operator!= (const BaseHandle &rhs) const
 Inequality operator overload. More...
 
Dali::RefObjectGetObjectPtr () const
 Get the reference counted object pointer. More...
 

Static Public Member Functions

static Layer New ()
 Create a Layer object. More...
 
static Layer DownCast (BaseHandle handle)
 Downcast a handle to Layer handle. More...
 
- Static Public Member Functions inherited from Dali::Actor
static Actor New ()
 Create an initialized Actor. More...
 
static Actor DownCast (BaseHandle handle)
 Downcast a handle to Actor handle. More...
 
- Static Public Member Functions inherited from Dali::Handle
static Handle New ()
 Create a new object. More...
 
static Handle DownCast (BaseHandle handle)
 Downcast to a handle. More...
 

Additional Inherited Members

- Protected Member Functions inherited from Dali::BaseHandle
void ThisIsSaferThanReturningVoidStar () const
 Used by the safe bool idiom. More...
 

Detailed Description

Layers provide a mechanism for overlaying groups of actors on top of each other.

When added to the stage, a layer can be ordered relative to other layers. The bottom layer is at depth zero. The stage provides a default layer for it's children (see Stage::GetRootLayer()).

Layered actors inherit position etc. as normal, but are drawn in an order determined by the layers. In case of LAYER_3D, the depth buffer is cleared before each layer is rendered unless depth test is disabled or there's no need for it based on the layers contents; actors in lower layers cannot obscure actors in higher layers.

A layer has either LAYER_2D or LAYER_3D mode. LAYER_2D has better performance, the depth test is disabled, and a child actor hides its parent actor. LAYER_3D uses the depth test, thus a close actor hides a farther one. LAYER_2D is the default mode and recommended for general cases. See Layer::Behavior and SetBehavior() for more information.

Layer is a type of Actor, thus can have parent or children actors. A layer influences rendering of its all descendant actors, until another layer appears in the actor tree and manages its own subtree.

If depth test is disabled, there is no performance overhead from clearing the depth buffer.

Actions

Action Name Layer method called
raise Raise()
lower Lower()
raiseToTop RaiseToTop()
lowerToBottom LowerToBottom()

.0

Definition at line 80 of file layer.h.

Member Typedef Documentation

typedef float(* Dali::Layer::SortFunctionType)(const Vector3 &position)

The sort function type.

.0

Parameters
[in]positionThis is the actor translation from camera.

Definition at line 177 of file layer.h.

Member Enumeration Documentation

Enumeration for the behavior of the layer.

Check each value to see how it affects the layer. .0

Enumerator
LAYER_2D 

Layer doesn't make use of the depth test (default mode).

This mode is expected to have better performance than the 3D mode. When using this mode any ordering would be with respect to tree level of each Actor.

For the following actor tree of the Layer1 object, D and E hide B, B and C hides A, and F hides C, regardless of their Z positions. Rendering order between siblings, such as D & E or B & C, is not determined. If you have two overlapped actors, just make them parent-child, not siblings.

Layer1 (parent)
|
A
/ \
B C
/ \ \
D E F

.0

LAYER_3D 

Layer will use depth test.

When using this mode depth test will be used. A depth clear will happen for each layer, which means actors in a layer "above" other layers will be rendered in front of actors in those layers regardless of their Z positions (see Layer::Raise() and Layer::Lower()). Opaque renderers are drawn first and write to the depth buffer. Then transparent renderers are drawn with depth test enabled but depth write switched off. Transparent renderers are drawn based on their distance from the camera (painter's algorithm). A renderers DEPTH_INDEX property is used to offset the distance to the camera when ordering transparent renderers. This is useful if you want to define the draw order of two or more transparent renderers that are equal distance from the camera. Unlike LAYER_2D, parent-child relationship does not affect rendering order at all.

.0

Remarks
This is an experimental feature. Using 2D UI components of DALi Toolkit in LAYER_3D mode has not been enoughly tested yet because they are orginally designed for 2D use cases. Simple controls such as Toolkit::Control or Toolkit::ImageView might not have any problem with LAYER_3D, but more complex one like Toolkit::PushButton, you might get unexpected rendered order in LAYER_3D. Although we'll support 2D controls in LAYER_3D soon, we recommend to use 2D controls with LAYER_2D only at this moment. Of course, controls rendered in 3D space, such as SpiralLayout of Toolkit::ItemView (see Toolkit::DefaultItemLayout::New), should be used with LAYER_3D.

Definition at line 107 of file layer.h.

TREE_DEPTH_MULTIPLIER is used by the rendering sorting algorithm to decide which actors to render first.

.0

Enumerator
TREE_DEPTH_MULTIPLIER 

Definition at line 167 of file layer.h.

Constructor & Destructor Documentation

Layer::Layer ( )

Create an empty Layer handle.

This can be initialised with Layer::New(...). .0

Definition at line 30 of file layer.cpp.

Referenced by DownCast(), Dali::Internal::Layer::New(), New(), and Dali::Internal::Layer::NewRoot().

Here is the caller graph for this function:

Layer::~Layer ( )

Destructor.

This is non-virtual since derived Handle types must not contain data or virtual methods. .0

Definition at line 46 of file layer.cpp.

Layer::Layer ( const Layer copy)

Copy constructor.

.0

Parameters
[in]copyThe actor to copy

Definition at line 50 of file layer.cpp.

Layer::Layer ( Internal::Layer Layer)
explicit

This constructor is used by Layer::New() methods.

.0

Parameters
[in]LayerA pointer to a newly allocated Dali resource

Definition at line 176 of file layer.cpp.

Member Function Documentation

Layer Layer::DownCast ( BaseHandle  handle)
static

Downcast a handle to Layer handle.

If handle points to a Layer the downcast produces valid handle. If not the returned handle is left uninitialized. .0

Parameters
[in]handleHandle to An object
Returns
Handle to a Layer or an uninitialized handle

Definition at line 41 of file layer.cpp.

References Dali::BaseHandle::GetObjectPtr(), and Layer().

Referenced by anonymous_namespace{utc-Dali-ObjectRegistry.cpp}::TestLayerCallback::operator()(), and UtcDaliLayerDownCast2().

Here is the call graph for this function:

Here is the caller graph for this function:

Layer::Behavior Layer::GetBehavior ( ) const

Get the behavior of the layer.

.0

Returns
The behavior of the layer

Definition at line 111 of file layer.cpp.

References Dali::GetImplementation().

Referenced by UtcDaliLayerBehaviour().

Here is the call graph for this function:

Here is the caller graph for this function:

ClippingBox Layer::GetClippingBox ( ) const

Retrieves the clipping box of a layer, in window coordinates.

.0

Returns
The clipping box

Definition at line 136 of file layer.cpp.

References Dali::GetImplementation().

Referenced by UtcDaliLayerDefaultProperties(), UtcDaliLayerGetClippingBox(), and UtcDaliLayerSetClippingBox().

Here is the call graph for this function:

Here is the caller graph for this function:

unsigned int Layer::GetDepth ( ) const

Query the depth of the layer.

0 is bottom most layer, higher number is on top. .0

Returns
The current depth of the layer
Precondition
Layer is on the stage. If layer is not added to the stage, returns 0.

Definition at line 61 of file layer.cpp.

References Dali::GetImplementation().

Referenced by UtcDaliLayerGetDepth(), UtcDaliLayerLower(), UtcDaliLayerLowerToBottom(), UtcDaliLayerMoveAbove(), UtcDaliLayerMoveBelow(), UtcDaliLayerRaise(), UtcDaliLayerRaiseAbove(), UtcDaliLayerRaiseBelow(), and UtcDaliLayerRaiseToTop().

Here is the call graph for this function:

Here is the caller graph for this function:

bool Layer::IsClipping ( ) const

Query whether clipping is enabled for a layer.

.0

Returns
True if clipping is enabled.

Definition at line 121 of file layer.cpp.

References Dali::GetImplementation().

Referenced by UtcDaliLayerIsClipping(), and UtcDaliLayerSetClipping().

Here is the call graph for this function:

Here is the caller graph for this function:

bool Layer::IsDepthTestDisabled ( ) const

Retrieves whether depth test is disabled.

.0

Returns
True if depth test is disabled.

Definition at line 146 of file layer.cpp.

References Dali::GetImplementation().

Referenced by UtcDaliLayerSetDepthTestDisabled().

Here is the call graph for this function:

Here is the caller graph for this function:

bool Layer::IsHoverConsumed ( ) const

Retrieves whether the layer consumes hover.

.0

Returns
True if consuming hover, false otherwise.

Definition at line 171 of file layer.cpp.

References Dali::GetImplementation().

Referenced by UtcDaliLayerHoverConsumed().

Here is the call graph for this function:

Here is the caller graph for this function:

bool Layer::IsTouchConsumed ( ) const

Retrieves whether the layer consumes touch (including gestures).

.0

Returns
True if consuming touch, false otherwise.

Definition at line 161 of file layer.cpp.

References Dali::GetImplementation().

Referenced by UtcDaliLayerTouchConsumed().

Here is the call graph for this function:

Here is the caller graph for this function:

void Layer::Lower ( )

Decrement the depth of the layer.

.0

Precondition
Layer is on the stage.

Definition at line 71 of file layer.cpp.

References Dali::GetImplementation().

Referenced by UtcDaliLayerLower().

Here is the call graph for this function:

Here is the caller graph for this function:

void Layer::LowerBelow ( Layer  target)

Ensures the layers depth is less than the target layer.

If the layer already is below the target layer its depth is not changed. If the layer was above target, its new depth will be immediately below target. .0

Parameters
targetLayer to get below of
Precondition
Layer is on the stage.
Target layer is on the stage.
Note
All layers between this layer and target get new depth values.

Definition at line 81 of file layer.cpp.

References Dali::GetImplementation().

Referenced by UtcDaliLayerRaiseBelow().

Here is the call graph for this function:

Here is the caller graph for this function:

void Layer::LowerToBottom ( )

Lowers the layer to the bottom.

.0

Precondition
layer is on the stage.

Definition at line 91 of file layer.cpp.

References Dali::GetImplementation().

Referenced by UtcDaliLayerLowerToBottom(), and UtcDaliRenderTaskSetExclusive().

Here is the call graph for this function:

Here is the caller graph for this function:

void Layer::MoveAbove ( Layer  target)

Moves the layer directly above the given layer.

After the call this layers depth will be immediately above target. .0

Parameters
targetLayer to get on top of
Precondition
Layer is on the stage.
Target layer is on the stage.
Note
All layers between this layer and target get new depth values.

Definition at line 96 of file layer.cpp.

References Dali::GetImplementation().

Referenced by UtcDaliLayerMoveAbove().

Here is the call graph for this function:

Here is the caller graph for this function:

void Layer::MoveBelow ( Layer  target)

Moves the layer directly below the given layer.

After the call this layers depth will be immediately below target. .0

Parameters
targetLayer to get below of
Precondition
Layer is on the stage.
Target layer is on the stage.
Note
All layers between this layer and target get new depth values.

Definition at line 101 of file layer.cpp.

References Dali::GetImplementation().

Referenced by UtcDaliLayerMoveBelow().

Here is the call graph for this function:

Here is the caller graph for this function:

Layer Layer::New ( )
static

Create a Layer object.

.0

Returns
A handle to a newly allocated Layer

Definition at line 34 of file layer.cpp.

References Dali::PropertyTypes::Get(), Layer(), and Dali::Internal::Layer::New().

Referenced by Dali::Internal::anonymous_namespace{layer-impl.cpp}::Create(), Dali::Toolkit::Text::Decorator::Impl::CreateActiveLayer(), Dali::Toolkit::Text::Clipper::Initialize(), Dali::Toolkit::Internal::PageTurnView::OnInitialize(), Dali::Toolkit::Internal::Popup::OnInitialize(), Dali::Toolkit::Internal::TextSelectionToolbar::SetUp(), UtcDaliHitTestAlgorithmStencil(), UtcDaliHoverMultipleLayers(), UtcDaliHoverMultipleRenderTasksWithChildLayer(), UtcDaliLayerBehaviour(), UtcDaliLayerDefaultProperties(), UtcDaliLayerDownCast(), UtcDaliLayerGetClippingBox(), UtcDaliLayerGetDepth(), UtcDaliLayerHoverConsumed(), UtcDaliLayerIsClipping(), UtcDaliLayerLower(), UtcDaliLayerLowerToBottom(), UtcDaliLayerMoveAbove(), UtcDaliLayerMoveBelow(), UtcDaliLayerNew(), UtcDaliLayerPropertyIndices(), UtcDaliLayerRaise(), UtcDaliLayerRaiseAbove(), UtcDaliLayerRaiseBelow(), UtcDaliLayerRaiseToTop(), UtcDaliLayerSetClipping(), UtcDaliLayerSetClippingBox(), UtcDaliLayerSetDepthTestDisabled(), UtcDaliLayerTouchConsumed(), UtcDaliLongPressGestureLayerConsumesTouch(), UtcDaliObjectRegistrySignalLayerCreated(), UtcDaliPanGestureLayerConsumesTouch(), UtcDaliPinchGestureLayerConsumesTouch(), UtcDaliRenderTaskSetExclusive(), UtcDaliStageGetLayerCountN(), UtcDaliStageGetLayerCountP(), UtcDaliStageGetLayerP(), UtcDaliStageGetRootLayerN(), UtcDaliTapGestureLayerConsumesTouch(), UtcDaliTouchLayerConsumesTouch(), UtcDaliTouchMultipleLayers(), and UtcDaliTouchMultipleRenderTasksWithChildLayer().

Here is the call graph for this function:

Here is the caller graph for this function:

Layer & Layer::operator= ( const Layer rhs)

Assignment operator.

.0

Parameters
[in]rhsThe actor to copy
Returns
A reference to this

Definition at line 55 of file layer.cpp.

References Dali::BaseHandle::operator=().

Here is the call graph for this function:

void Layer::Raise ( )

Increment the depth of the layer.

.0

Precondition
Layer is on the stage.

Definition at line 66 of file layer.cpp.

References Dali::GetImplementation().

Referenced by UtcDaliLayerRaise().

Here is the call graph for this function:

Here is the caller graph for this function:

void Layer::RaiseAbove ( Layer  target)

Ensures the layers depth is greater than the target layer.

If the layer already is above the target layer its depth is not changed. If the layer was below target, its new depth will be immediately above target. .0

Parameters
targetLayer to get above of
Precondition
Layer is on the stage.
Target layer is on the stage.
Note
All layers between this layer and target get new depth values.

Definition at line 76 of file layer.cpp.

References Dali::GetImplementation().

Referenced by Dali::Toolkit::Internal::TextSelectionToolbar::RaiseAbove(), and UtcDaliLayerRaiseAbove().

Here is the call graph for this function:

Here is the caller graph for this function:

void Layer::RaiseToTop ( )
void Layer::SetBehavior ( Behavior  behavior)

Set the behavior of the layer.

.0

Parameters
[in]behaviorThe desired behavior

Definition at line 106 of file layer.cpp.

References Dali::GetImplementation().

Referenced by UtcDaliLayerBehaviour(), and UtcDaliLayerSetDepthTestDisabled().

Here is the call graph for this function:

Here is the caller graph for this function:

void Layer::SetClipping ( bool  enabled)

Sets whether clipping is enabled for a layer.

Clipping is initially disabled; see also SetClippingBox(). .0

Parameters
[in]enabledTrue if clipping is enabled.
Note
When clipping is enabled, the default clipping box is empty (0,0,0,0) which means everything is clipped.

Definition at line 116 of file layer.cpp.

References Dali::GetImplementation().

Referenced by UtcDaliLayerClippingGLCalls(), and UtcDaliLayerSetClipping().

Here is the call graph for this function:

Here is the caller graph for this function:

void Layer::SetClippingBox ( int  x,
int  y,
int  width,
int  height 
)

Sets the clipping box of a layer, in window coordinates.

The contents of the layer will not be visible outside this box, when clipping is enabled. The default clipping box is empty (0,0,0,0) which means everything is clipped. You can only do rectangular clipping using this API in window coordinates. For other kinds of clipping, see Dali::Actor::SetDrawMode(). .0

Parameters
[in]xThe X-coordinate of the top-left corner of the box
[in]yThe Y-coordinate of the top-left corner of the box
[in]widthThe width of the box
[in]heightThe height of the box

Definition at line 126 of file layer.cpp.

References Dali::GetImplementation().

Referenced by UtcDaliLayerClippingGLCalls(), UtcDaliLayerDefaultProperties(), and UtcDaliLayerSetClippingBox().

Here is the call graph for this function:

Here is the caller graph for this function:

void Layer::SetClippingBox ( ClippingBox  box)

Sets the clipping box of a layer, in window coordinates.

The contents of the layer will not be visible outside this box, when clipping is enabled. The default clipping box is empty (0,0,0,0). .0

Parameters
[in]boxThe clipping box

Definition at line 131 of file layer.cpp.

References Dali::GetImplementation(), Dali::Rect< T >::height, Dali::Rect< T >::width, Dali::Rect< T >::x, and Dali::Rect< T >::y.

Here is the call graph for this function:

void Layer::SetDepthTestDisabled ( bool  disable)

Whether to disable the depth test.

By default a layer enables depth test if there is more than one opaque actor or if there is one opaque actor and one, or more, transparent actors in LAYER_3D mode. However, it's possible to disable the depth test by calling this method.

.0

Parameters
[in]disableTrue disables depth test. false sets the default behavior.

Definition at line 141 of file layer.cpp.

References Dali::GetImplementation().

Referenced by Dali::Toolkit::Text::Clipper::Initialize(), and UtcDaliLayerSetDepthTestDisabled().

Here is the call graph for this function:

Here is the caller graph for this function:

void Layer::SetHoverConsumed ( bool  consume)

This allows the user to specify whether this layer should consume hover.

If set, any layers behind this layer will not be hit-test.

.0

Parameters
[in]consumeWhether the layer should consume hover.

Definition at line 166 of file layer.cpp.

References Dali::GetImplementation().

Referenced by UtcDaliLayerHoverConsumed().

Here is the call graph for this function:

Here is the caller graph for this function:

void Layer::SetSortFunction ( SortFunctionType  function)

This allows the user to specify the sort function that the layer should use.

The sort function is used to determine the order in which the actors are drawn and input is processed on the actors in the layer.

A function of the following type should be used:

float YourSortFunction(const Vector3& position);

.0

Parameters
[in]functionThe sort function pointer
Note
If the sort function returns a low number, the actor with the data will be drawn in front of an actor whose data yields a high value from the sort function.
All child layers use the same sort function. If a child layer is added to this layer then the sort function used by the child layer will also be the same.

Definition at line 151 of file layer.cpp.

References Dali::GetImplementation().

Referenced by UtcDaliLayerSetSortFunction().

Here is the call graph for this function:

Here is the caller graph for this function:

void Layer::SetTouchConsumed ( bool  consume)

This allows the user to specify whether this layer should consume touch (including gestures).

If set, any layers behind this layer will not be hit-test.

.0

Parameters
[in]consumeWhether the layer should consume touch (including gestures).

Definition at line 156 of file layer.cpp.

References Dali::GetImplementation().

Referenced by Dali::Toolkit::Internal::Popup::OnBackingTouched(), Dali::Toolkit::Internal::Popup::OnBackingWheelEvent(), Dali::Toolkit::Internal::Popup::OnDialogTouched(), UtcDaliLayerTouchConsumed(), UtcDaliLongPressGestureLayerConsumesTouch(), UtcDaliPanGestureLayerConsumesTouch(), UtcDaliPinchGestureLayerConsumesTouch(), UtcDaliTapGestureLayerConsumesTouch(), and UtcDaliTouchLayerConsumesTouch().

Here is the call graph for this function:

Here is the caller graph for this function:


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