Tizen Native API
5.5
|
Actor is the primary object with which Dali applications interact. More...
Classes | |
struct | Property |
Enumeration for the instance of properties belonging to the Actor class. More... | |
Public Types | |
typedef Signal< bool(Actor, const TouchEvent &) > | TouchSignalType |
Touch signal type. | |
typedef Signal< bool(Actor, const TouchData &) > | TouchDataSignalType |
Touch signal type. | |
typedef Signal< bool(Actor, const HoverEvent &) > | HoverSignalType |
Hover signal type. | |
typedef Signal< bool(Actor, const WheelEvent &) > | WheelEventSignalType |
Wheel signal type. | |
typedef Signal< void(Actor) > | OnStageSignalType |
Stage connection signal type. | |
typedef Signal< void(Actor) > | OffStageSignalType |
Stage disconnection signal type. | |
typedef Signal< void(Actor) > | OnRelayoutSignalType |
Called when the actor is relaid out. | |
typedef Signal< void(Actor, LayoutDirection::Type) > | LayoutDirectionChangedSignalType |
Layout direction changes signal type. | |
Public Member Functions | |
Actor () | |
Creates an uninitialized Actor; this can be initialized with Actor::New(). | |
~Actor () | |
Dali::Actor is intended as a base class. | |
Actor (const Actor ©) | |
Copy constructor. | |
Actor & | operator= (const Actor &rhs) |
Assignment operator. | |
const std::string & | GetName () const |
Retrieves the Actor's name. | |
void | SetName (const std::string &name) |
Sets the Actor's name. | |
uint32_t | GetId () const |
Retrieves the unique ID of the actor. | |
bool | IsRoot () const |
Queries whether an actor is the root actor, which is owned by the Stage. | |
bool | OnStage () const |
Queries whether the actor is connected to the Stage. | |
bool | IsLayer () const |
Queries whether the actor is of class Dali::Layer. | |
Layer | GetLayer () |
Gets the layer in which the actor is present. | |
void | Add (Actor child) |
Adds a child Actor to this Actor. | |
void | Remove (Actor child) |
Removes a child Actor from this Actor. | |
void | Unparent () |
Removes an actor from its parent. | |
uint32_t | GetChildCount () const |
Retrieves the number of children held by the actor. | |
Actor | GetChildAt (uint32_t index) const |
Retrieve and child actor by index. | |
Actor | FindChildByName (const std::string &actorName) |
Search through this actor's hierarchy for an actor with the given name. | |
Actor | FindChildById (const uint32_t id) |
Search through this actor's hierarchy for an actor with the given unique ID. | |
Actor | GetParent () const |
Retrieves the actor's parent. | |
void | SetParentOrigin (const Vector3 &origin) |
Sets the origin of an actor, within its parent's area. | |
Vector3 | GetCurrentParentOrigin () const |
Retrieves the parent-origin of an actor. | |
void | SetAnchorPoint (const Vector3 &anchorPoint) |
Sets the anchor-point of an actor. | |
Vector3 | GetCurrentAnchorPoint () const |
Retrieves the anchor-point of an actor. | |
void | SetSize (float width, float height) |
Sets the size of an actor. | |
void | SetSize (float width, float height, float depth) |
Sets the size of an actor. | |
void | SetSize (const Vector2 &size) |
Sets the size of an actor. | |
void | SetSize (const Vector3 &size) |
Sets the size of an actor. | |
Vector3 | GetTargetSize () const |
Retrieves the actor's size. | |
Vector3 | GetCurrentSize () const |
Retrieves the actor's size. | |
Vector3 | GetNaturalSize () const |
Returns the natural size of the actor. | |
void | SetPosition (float x, float y) |
Sets the position of the Actor. | |
void | SetPosition (float x, float y, float z) |
Sets the position of the Actor. | |
void | SetPosition (const Vector3 &position) |
Sets the position of the Actor. | |
void | SetX (float x) |
Sets the position of an actor along the X-axis. | |
void | SetY (float y) |
Sets the position of an actor along the Y-axis. | |
void | SetZ (float z) |
Sets the position of an actor along the Z-axis. | |
void | TranslateBy (const Vector3 &distance) |
Translates an actor relative to its existing position. | |
Vector3 | GetCurrentPosition () const |
Retrieves the position of the Actor. | |
Vector3 | GetCurrentWorldPosition () const |
Retrieves the world-position of the Actor. | |
void | SetInheritPosition (bool inherit) |
Sets whether a child actor inherits it's parent's position. | |
bool | IsPositionInherited () const |
Returns whether the actor inherits its parent's position. | |
void | SetOrientation (const Degree &angle, const Vector3 &axis) |
Sets the orientation of the Actor. | |
void | SetOrientation (const Radian &angle, const Vector3 &axis) |
Sets the orientation of the Actor. | |
void | SetOrientation (const Quaternion &orientation) |
Sets the orientation of the Actor. | |
void | RotateBy (const Degree &angle, const Vector3 &axis) |
Applies a relative rotation to an actor. | |
void | RotateBy (const Radian &angle, const Vector3 &axis) |
Applies a relative rotation to an actor. | |
void | RotateBy (const Quaternion &relativeRotation) |
Applies a relative rotation to an actor. | |
Quaternion | GetCurrentOrientation () const |
Retrieves the Actor's orientation. | |
void | SetInheritOrientation (bool inherit) |
Sets whether a child actor inherits it's parent's orientation. | |
bool | IsOrientationInherited () const |
Returns whether the actor inherits its parent's orientation. | |
Quaternion | GetCurrentWorldOrientation () const |
Retrieves the world-orientation of the Actor. | |
void | SetScale (float scale) |
Sets the scale factor applied to an actor. | |
void | SetScale (float scaleX, float scaleY, float scaleZ) |
Sets the scale factor applied to an actor. | |
void | SetScale (const Vector3 &scale) |
Sets the scale factor applied to an actor. | |
void | ScaleBy (const Vector3 &relativeScale) |
Applies a relative scale to an actor. | |
Vector3 | GetCurrentScale () const |
Retrieves the scale factor applied to an actor. | |
Vector3 | GetCurrentWorldScale () const |
Retrieves the world-scale of the Actor. | |
void | SetInheritScale (bool inherit) |
Sets whether a child actor inherits it's parent's scale. | |
bool | IsScaleInherited () const |
Returns whether the actor inherits its parent's scale. | |
Matrix | GetCurrentWorldMatrix () const |
Retrieves the world-matrix of the actor. | |
void | SetVisible (bool visible) |
Sets the visibility flag of an actor. | |
bool | IsVisible () const |
Retrieves the visibility flag of an actor. | |
void | SetOpacity (float opacity) |
Sets the opacity of an actor. | |
float | GetCurrentOpacity () const |
Retrieves the actor's opacity. | |
void | SetColor (const Vector4 &color) |
Sets the actor's color; this is an RGBA value. | |
Vector4 | GetCurrentColor () const |
Retrieves the actor's color. | |
void | SetColorMode (ColorMode colorMode) |
Sets the actor's color mode. | |
ColorMode | GetColorMode () const |
Returns the actor's color mode. | |
Vector4 | GetCurrentWorldColor () const |
Retrieves the world-color of the Actor, where each component is clamped within the 0->1 range. | |
void | SetDrawMode (DrawMode::Type drawMode) |
Sets how the actor and its children should be drawn. | |
DrawMode::Type | GetDrawMode () const |
Queries how the actor and its children will be drawn. | |
void | SetSensitive (bool sensitive) |
Sets whether an actor should emit touch or hover signals. | |
bool | IsSensitive () const |
Queries whether an actor emits touch or hover event signals. | |
bool | ScreenToLocal (float &localX, float &localY, float screenX, float screenY) const |
Converts screen coordinates into the actor's coordinate system using the default camera. | |
void | SetLeaveRequired (bool required) |
Sets whether the actor should receive a notification when touch or hover motion events leave the boundary of the actor. | |
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. | |
void | SetKeyboardFocusable (bool focusable) |
Sets whether the actor should be focusable by keyboard navigation. | |
bool | IsKeyboardFocusable () const |
Returns whether the actor is focusable by keyboard navigation. | |
void | Raise () |
Raise actor above the next sibling actor. | |
void | Lower () |
Lower the actor below the previous sibling actor. | |
void | RaiseToTop () |
Raise actor above all other sibling actors. | |
void | LowerToBottom () |
Lower actor to the bottom of all other sibling actors. | |
void | RaiseAbove (Actor target) |
Raises the actor above the target actor. | |
void | LowerBelow (Actor target) |
Lower the actor to below the target actor. | |
void | SetResizePolicy (ResizePolicy::Type policy, Dimension::Type dimension) |
Sets the resize policy to be used for the given dimension(s). | |
ResizePolicy::Type | GetResizePolicy (Dimension::Type dimension) const |
Returns the resize policy used for a single dimension. | |
void | SetSizeScalePolicy (SizeScalePolicy::Type policy) |
Sets the policy to use when setting size with size negotiation. Defaults to SizeScalePolicy::USE_SIZE_SET. | |
SizeScalePolicy::Type | GetSizeScalePolicy () const |
Returns the size scale policy in use. | |
void | SetSizeModeFactor (const Vector3 &factor) |
Sets the relative to parent size factor of the actor. | |
Vector3 | GetSizeModeFactor () const |
Retrieves the relative to parent size factor of the actor. | |
float | GetHeightForWidth (float width) |
Calculates the height of the actor given a width. | |
float | GetWidthForHeight (float height) |
Calculates the width of the actor given a height. | |
float | GetRelayoutSize (Dimension::Type dimension) const |
Returns the value of negotiated dimension for the given dimension. | |
void | SetPadding (const Padding &padding) |
Sets the padding for use in layout. | |
void | GetPadding (Padding &paddingOut) const |
Returns the value of the padding. | |
void | SetMinimumSize (const Vector2 &size) |
Sets the minimum size an actor can be assigned in size negotiation. | |
Vector2 | GetMinimumSize () |
Returns the minimum relayout size. | |
void | SetMaximumSize (const Vector2 &size) |
Sets the maximum size an actor can be assigned in size negotiation. | |
Vector2 | GetMaximumSize () |
Returns the maximum relayout size. | |
int32_t | GetHierarchyDepth () |
Gets depth in the hierarchy for the actor. | |
uint32_t | AddRenderer (Renderer &renderer) |
Adds a renderer to this actor. | |
uint32_t | GetRendererCount () const |
Gets the number of renderers on this actor. | |
Renderer | GetRendererAt (uint32_t index) |
Gets a Renderer by index. | |
void | RemoveRenderer (Renderer &renderer) |
Removes a renderer from the actor. | |
void | RemoveRenderer (uint32_t index) |
Removes a renderer from the actor by index. | |
TouchSignalType & | TouchedSignal () DALI_DEPRECATED_API |
This signal is emitted when touch input is received. | |
TouchDataSignalType & | TouchSignal () |
This signal is emitted when touch input is received. | |
HoverSignalType & | HoveredSignal () |
This signal is emitted when hover input is received. | |
WheelEventSignalType & | WheelEventSignal () |
This signal is emitted when wheel event is received. | |
OnStageSignalType & | OnStageSignal () |
This signal is emitted after the actor has been connected to the stage. | |
OffStageSignalType & | OffStageSignal () |
This signal is emitted after the actor has been disconnected from the stage. | |
OnRelayoutSignalType & | OnRelayoutSignal () |
This signal is emitted after the size has been set on the actor during relayout. | |
LayoutDirectionChangedSignalType & | LayoutDirectionChangedSignal () |
This signal is emitted when the layout direction property of this or a parent actor is changed. | |
Static Public Member Functions | |
static Actor | New () |
Creates an initialized Actor. | |
static Actor | DownCast (BaseHandle handle) |
Downcasts a handle to Actor handle. |
Actor is the primary object with which Dali applications interact.
UI controls can be built by combining multiple actors.
Touch or hover events are received via signals; see Actor::TouchedSignal() and Actor::HoveredSignal() for more details.
Hit Testing Rules Summary:
Hit Test Algorithm:
HIT-TEST-WITHIN-LAYER( ACTOR ) { // Only hit-test the actor and its children if it is sensitive and visible IF ( ACTOR-IS-SENSITIVE && ACTOR-IS-VISIBLE && ACTOR-IS-ON-STAGE ) { // Depth-first traversal within current layer, visiting parent first // Check whether current actor should be hit-tested. IF ( ( TOUCH-SIGNAL-NOT-EMPTY || HOVER-SIGNAL-NOT-EMPTY ) && ACTOR-HAS-NON-ZERO-SIZE && ACTOR-WORLD-COLOR-IS-NOT-TRANSPARENT ) { // Hit-test current actor IF ( ACTOR-HIT ) { IF ( ACTOR-IS-OVERLAY || ( DISTANCE-TO-ACTOR < DISTANCE-TO-LAST-HIT-ACTOR ) ) { // The current actor is the closest actor that was underneath the touch. LAST-HIT-ACTOR = CURRENT-ACTOR } } } // Keep checking children, in case we hit something closer. FOR-EACH CHILD (in order) { IF ( CHILD-IS-NOT-A-LAYER ) { // Continue traversal for this child's sub-tree HIT-TEST-WITHIN-LAYER ( CHILD ) } // else we skip hit-testing the child's sub-tree altogether. } } }
1 / \ / \ 2 5 / \ \ / \ \ 3 4 6 Hit Priority of above Actor tree (all overlays): 1 - Lowest. 6 - Highest.
Touch or hover Event Delivery:
EMIT-TOUCH-SIGNAL( ACTOR ) { IF ( TOUCH-SIGNAL-NOT-EMPTY ) { // Only do the emission if touch signal of actor has connections. CONSUMED = TOUCHED-SIGNAL( TOUCH-EVENT ) } IF ( NOT-CONSUMED ) { // If event is not consumed then deliver it to the parent unless we reach the root actor IF ( ACTOR-PARENT ) { EMIT-TOUCH-SIGNAL( ACTOR-PARENT ) } } } EMIT-HOVER-SIGNAL( ACTOR ) { IF ( HOVER-SIGNAL-NOT-EMPTY ) { // Only do the emission if hover signal of actor has connections. CONSUMED = HOVERED-SIGNAL( HOVER-EVENT ) } IF ( NOT-CONSUMED ) { // If event is not consumed then deliver it to the parent unless we reach the root actor. IF ( ACTOR-PARENT ) { EMIT-HOVER-SIGNAL( ACTOR-PARENT ) } } }
Key events are received by an actor once set to grab key events, only one actor can be set as focused.
Signals | Signal Name | Method | |-------------------|------------------------------| | touched | TouchedSignal() | | hovered | HoveredSignal() | | wheelEvent | WheelEventSignal() | | onStage | OnStageSignal() | | offStage | OffStageSignal() | | onRelayout | OnRelayoutSignal() |
Actions | Action Name | Actor method called | |-------------------|------------------------------| | show | SetVisible( true ) | | hide | SetVisible( false ) |
typedef Signal< bool (Actor, const HoverEvent&) > Dali::Actor::HoverSignalType |
Hover signal type.
typedef Signal< void ( Actor, LayoutDirection::Type ) > Dali::Actor::LayoutDirectionChangedSignalType |
Layout direction changes signal type.
typedef Signal< void (Actor) > Dali::Actor::OffStageSignalType |
Stage disconnection signal type.
typedef Signal< void (Actor) > Dali::Actor::OnRelayoutSignalType |
Called when the actor is relaid out.
typedef Signal< void (Actor) > Dali::Actor::OnStageSignalType |
Stage connection signal type.
typedef Signal< bool (Actor, const TouchData&) > Dali::Actor::TouchDataSignalType |
Touch signal type.
typedef Signal< bool (Actor, const TouchEvent&) > Dali::Actor::TouchSignalType |
Touch signal type.
typedef Signal< bool (Actor, const WheelEvent&) > Dali::Actor::WheelEventSignalType |
Wheel signal type.
Creates an uninitialized Actor; this can be initialized with Actor::New().
Calling member functions with an uninitialized Actor handle is not allowed.
Dali::Actor is intended as a base class.
This is non-virtual since derived Handle types must not contain data or virtual methods.
Dali::Actor::Actor | ( | const Actor & | copy | ) |
Copy constructor.
[in] | copy | The actor to copy |
void Dali::Actor::Add | ( | Actor | child | ) |
Adds a child Actor to this Actor.
[in] | child | The child |
uint32_t Dali::Actor::AddRenderer | ( | Renderer & | renderer | ) |
static Actor Dali::Actor::DownCast | ( | BaseHandle | handle | ) | [static] |
Downcasts a handle to Actor handle.
If handle points to an Actor object, the downcast produces valid handle. If not, the returned handle is left uninitialized.
[in] | handle | to An object |
Reimplemented from Dali::Handle.
Reimplemented in Dali::Toolkit::ScrollView, Dali::Toolkit::TextField, Dali::Toolkit::TextEditor, Dali::Toolkit::Control, Dali::Toolkit::TextLabel, Dali::Toolkit::FlexContainer, Dali::Toolkit::VideoView, Dali::Toolkit::Button, Dali::Toolkit::ItemView, Dali::Toolkit::TableView, Dali::Toolkit::Control, Dali::Toolkit::ScrollBar, Dali::Toolkit::ImageView, Dali::Layer, Dali::Toolkit::Slider, Dali::Toolkit::ProgressBar, Dali::WidgetView::WidgetView, Dali::Toolkit::PushButton, Dali::CameraActor, Dali::Toolkit::Alignment, Dali::Toolkit::Model3dView, Dali::Toolkit::Scrollable, Dali::Toolkit::RadioButton, Dali::Toolkit::CheckBoxButton, and Dali::CustomActor.
Actor Dali::Actor::FindChildById | ( | const uint32_t | id | ) |
Search through this actor's hierarchy for an actor with the given unique ID.
The actor itself is also considered in the search.
[in] | id | The ID of the actor to find |
Actor Dali::Actor::FindChildByName | ( | const std::string & | actorName | ) |
Search through this actor's hierarchy for an actor with the given name.
The actor itself is also considered in the search.
[in] | actorName | The name of the actor to find |
Actor Dali::Actor::GetChildAt | ( | uint32_t | index | ) | const |
Retrieve and child actor by index.
[in] | index | The index of the child to retrieve |
uint32_t Dali::Actor::GetChildCount | ( | ) | const |
Retrieves the number of children held by the actor.
ColorMode Dali::Actor::GetColorMode | ( | ) | const |
Returns the actor's color mode.
Vector3 Dali::Actor::GetCurrentAnchorPoint | ( | ) | const |
Retrieves the anchor-point of an actor.
Vector4 Dali::Actor::GetCurrentColor | ( | ) | const |
Retrieves the actor's color.
Actor's own color is not clamped.
float Dali::Actor::GetCurrentOpacity | ( | ) | const |
Retrieves the actor's opacity.
Quaternion Dali::Actor::GetCurrentOrientation | ( | ) | const |
Retrieves the Actor's orientation.
Vector3 Dali::Actor::GetCurrentParentOrigin | ( | ) | const |
Retrieves the parent-origin of an actor.
Vector3 Dali::Actor::GetCurrentPosition | ( | ) | const |
Retrieves the position of the Actor.
Vector3 Dali::Actor::GetCurrentScale | ( | ) | const |
Retrieves the scale factor applied to an actor.
Vector3 Dali::Actor::GetCurrentSize | ( | ) | const |
Retrieves the actor's size.
Vector4 Dali::Actor::GetCurrentWorldColor | ( | ) | const |
Retrieves the world-color of the Actor, where each component is clamped within the 0->1 range.
Matrix Dali::Actor::GetCurrentWorldMatrix | ( | ) | const |
Vector3 Dali::Actor::GetCurrentWorldPosition | ( | ) | const |
Vector3 Dali::Actor::GetCurrentWorldScale | ( | ) | const |
DrawMode::Type Dali::Actor::GetDrawMode | ( | ) | const |
Queries how the actor and its children will be drawn.
float Dali::Actor::GetHeightForWidth | ( | float | width | ) |
Calculates the height of the actor given a width.
The natural size is used for default calculation. size 0 is treated as aspect ratio 1:1.
[in] | width | Width to use |
int32_t Dali::Actor::GetHierarchyDepth | ( | ) |
Gets depth in the hierarchy for the actor.
-1
if actor is not in the hierarchy uint32_t Dali::Actor::GetId | ( | ) | const |
Retrieves the unique ID of the actor.
Gets the layer in which the actor is present.
bool Dali::Actor::GetLeaveRequired | ( | ) | const |
This returns whether the actor requires touch or hover events whenever touch or hover motion events leave the boundary of the actor.
true
if a Leave event is required, false
otherwise Returns the maximum relayout size.
Returns the minimum relayout size.
const std::string& Dali::Actor::GetName | ( | ) | const |
Vector3 Dali::Actor::GetNaturalSize | ( | ) | const |
Returns the natural size of the actor.
Deriving classes stipulate the natural size and by default an actor has a ZERO natural size.
void Dali::Actor::GetPadding | ( | Padding & | paddingOut | ) | const |
Returns the value of the padding.
[in] | paddingOut | The returned padding data |
Actor Dali::Actor::GetParent | ( | ) | const |
Retrieves the actor's parent.
float Dali::Actor::GetRelayoutSize | ( | Dimension::Type | dimension | ) | const |
Returns the value of negotiated dimension for the given dimension.
[in] | dimension | The dimension to retrieve |
Renderer Dali::Actor::GetRendererAt | ( | uint32_t | index | ) |
Gets a Renderer by index.
[in] | index | The index of the renderer to fetch |
uint32_t Dali::Actor::GetRendererCount | ( | ) | const |
Gets the number of renderers on this actor.
ResizePolicy::Type Dali::Actor::GetResizePolicy | ( | Dimension::Type | dimension | ) | const |
Returns the resize policy used for a single dimension.
[in] | dimension | The dimension to get policy for |
Vector3 Dali::Actor::GetSizeModeFactor | ( | ) | const |
Returns the size scale policy in use.
Vector3 Dali::Actor::GetTargetSize | ( | ) | const |
Retrieves the actor's size.
float Dali::Actor::GetWidthForHeight | ( | float | height | ) |
Calculates the width of the actor given a height.
The natural size is used for default calculation. size 0 is treated as aspect ratio 1:1.
[in] | height | Height to use |
This signal is emitted when hover input is received.
A callback of the following type may be connected:
bool YourCallbackName(Actor actor, const HoverEvent& event);
The return value of True, indicates that the hover event should be consumed. Otherwise the signal will be emitted on the next sensitive parent of the actor.
bool Dali::Actor::IsKeyboardFocusable | ( | ) | const |
Returns whether the actor is focusable by keyboard navigation.
true
if the actor is focusable by keyboard navigation, false
if not bool Dali::Actor::IsLayer | ( | ) | const |
Queries whether the actor is of class Dali::Layer.
bool Dali::Actor::IsOrientationInherited | ( | ) | const |
Returns whether the actor inherits its parent's orientation.
true
if the actor inherits its parent orientation, false
if it uses world orientation bool Dali::Actor::IsPositionInherited | ( | ) | const |
Returns whether the actor inherits its parent's position.
true
if the actor inherits its parent position, false
if it uses world position bool Dali::Actor::IsRoot | ( | ) | const |
bool Dali::Actor::IsScaleInherited | ( | ) | const |
Returns whether the actor inherits its parent's scale.
true
if the actor inherits its parent scale, false
if it uses world scale bool Dali::Actor::IsSensitive | ( | ) | const |
Queries whether an actor emits touch or hover event signals.
true
, if emission of touch or hover event signals is enabled, false
otherwise bool Dali::Actor::IsVisible | ( | ) | const |
Retrieves the visibility flag of an actor.
This signal is emitted when the layout direction property of this or a parent actor is changed.
A callback of the following type may be connected:
void YourCallbackName( Actor actor, LayoutDirection::Type type );
actor: The actor, or child of actor, whose layout direction has changed type: Whether the actor's layout direction property has changed or a parent's.
void Dali::Actor::Lower | ( | ) |
Lower the actor below the previous sibling actor.
Reimplemented in Dali::Layer.
void Dali::Actor::LowerBelow | ( | Actor | target | ) |
void Dali::Actor::LowerToBottom | ( | ) |
Lower actor to the bottom of all other sibling actors.
Reimplemented in Dali::Layer.
static Actor Dali::Actor::New | ( | ) | [static] |
Creates an initialized Actor.
Reimplemented from Dali::Handle.
Reimplemented in Dali::Toolkit::ScrollView, Dali::Toolkit::TextField, Dali::Toolkit::TextEditor, Dali::Toolkit::TextLabel, Dali::Toolkit::FlexContainer, Dali::Layer, Dali::Toolkit::VideoView, Dali::Toolkit::Control, Dali::Toolkit::Slider, Dali::Toolkit::ProgressBar, Dali::Toolkit::PushButton, Dali::Toolkit::ImageView, Dali::CameraActor, Dali::Toolkit::RadioButton, Dali::Toolkit::CheckBoxButton, and Dali::Toolkit::Model3dView.
This signal is emitted after the actor has been disconnected from the stage.
If an actor is disconnected it either has no parent, or is parented to a disconnected actor.
A (parent) / \ B C / \ \ D E F
This signal is emitted after the size has been set on the actor during relayout.
bool Dali::Actor::OnStage | ( | ) | const |
Queries whether the actor is connected to the Stage.
When an actor is connected, it will be directly or indirectly parented to the root Actor.
This signal is emitted 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.
A (parent) / \ B C / \ \ D E F
Assignment operator.
[in] | rhs | The actor to copy |
void Dali::Actor::Raise | ( | ) |
Raise actor above the next sibling actor.
Reimplemented in Dali::Layer.
void Dali::Actor::RaiseAbove | ( | Actor | target | ) |
void Dali::Actor::RaiseToTop | ( | ) |
Raise actor above all other sibling actors.
Reimplemented in Dali::Layer.
void Dali::Actor::Remove | ( | Actor | child | ) |
void Dali::Actor::RemoveRenderer | ( | Renderer & | renderer | ) |
Removes a renderer from the actor.
[in] | renderer | Handle to the renderer that is to be removed |
void Dali::Actor::RemoveRenderer | ( | uint32_t | index | ) |
Removes a renderer from the actor by index.
[in] | index | Index of the renderer that is to be removed |
void Dali::Actor::RotateBy | ( | const Degree & | angle, |
const Vector3 & | axis | ||
) |
Applies a relative rotation to an actor.
[in] | angle | The angle to the rotation to combine with the existing orientation |
[in] | axis | The axis of the rotation to combine with the existing orientation |
void Dali::Actor::RotateBy | ( | const Radian & | angle, |
const Vector3 & | axis | ||
) |
Applies a relative rotation to an actor.
[in] | angle | The angle to the rotation to combine with the existing orientation |
[in] | axis | The axis of the rotation to combine with the existing orientation |
void Dali::Actor::RotateBy | ( | const Quaternion & | relativeRotation | ) |
Applies a relative rotation to an actor.
[in] | relativeRotation | The rotation to combine with the existing orientation |
void Dali::Actor::ScaleBy | ( | const Vector3 & | relativeScale | ) |
Applies a relative scale to an actor.
[in] | relativeScale | The scale to combine with the actor's existing scale |
bool Dali::Actor::ScreenToLocal | ( | float & | localX, |
float & | localY, | ||
float | screenX, | ||
float | screenY | ||
) | const |
Converts screen coordinates into the actor's coordinate system using the default camera.
[out] | localX | On return, the X-coordinate relative to the actor |
[out] | localY | On return, the Y-coordinate relative to the actor |
[in] | screenX | The screen X-coordinate |
[in] | screenY | The screen Y-coordinate |
void Dali::Actor::SetAnchorPoint | ( | const Vector3 & | anchorPoint | ) |
Sets the anchor-point of an actor.
This is expressed in unit coordinates, such that (0.0, 0.0, 0.5) is the top-left corner of the actor, and (1.0, 1.0, 0.5) is the bottom-right corner. The default anchor point is Dali::AnchorPoint::CENTER (0.5, 0.5, 0.5). An actor position is the distance between its parent-origin and this anchor-point. An actor's orientation is the rotation from its default orientation, the rotation is centered around its anchor-point.
[in] | anchorPoint | The new anchor-point |
void Dali::Actor::SetColor | ( | const Vector4 & | color | ) |
Sets the actor's color; this is an RGBA value.
The final color of the actor depends on its color mode.
[in] | color | The new color |
void Dali::Actor::SetColorMode | ( | ColorMode | colorMode | ) |
void Dali::Actor::SetDrawMode | ( | DrawMode::Type | drawMode | ) |
Sets how the actor and its children should be drawn.
Not all actors are renderable, but DrawMode can be inherited from any actor. If an object is in a 3D layer, it will be depth-tested against other objects in the world i.e. it may be obscured if other objects are in front.
If DrawMode::OVERLAY_2D is used, the actor and its children will be drawn as a 2D overlay. Overlay actors are drawn in a separate pass, after all non-overlay actors within the Layer. For overlay actors, the drawing order is with respect to tree levels of Actors, and depth-testing will not be used.
[in] | drawMode | The new draw-mode to use |
void Dali::Actor::SetInheritOrientation | ( | bool | inherit | ) |
Sets whether a child actor inherits it's parent's orientation.
Default is to inherit. Switching this off means that using SetOrientation() sets the actor's world orientation.
[in] | inherit | - true if the actor should inherit orientation, false otherwise |
void Dali::Actor::SetInheritPosition | ( | bool | inherit | ) |
Sets whether a child actor inherits it's parent's position.
Default is to inherit. Switching this off means that using SetPosition() sets the actor's world position, i.e. translates from the world origin (0,0,0) to the anchor point of the actor.
[in] | inherit | - true if the actor should inherit position, false otherwise |
void Dali::Actor::SetInheritScale | ( | bool | inherit | ) |
Sets whether a child actor inherits it's parent's scale.
Default is to inherit. Switching this off means that using SetScale() sets the actor's world scale.
[in] | inherit | - true if the actor should inherit scale, false otherwise |
void Dali::Actor::SetKeyboardFocusable | ( | bool | focusable | ) |
Sets whether the actor should be focusable by keyboard navigation.
The default is false.
[in] | focusable | - true if the actor should be focusable by keyboard navigation, false otherwise |
void Dali::Actor::SetLeaveRequired | ( | bool | required | ) |
Sets whether the actor should receive a notification when touch or hover motion events leave the boundary of the actor.
[in] | required | Should be set to true if a Leave event is required |
void Dali::Actor::SetMaximumSize | ( | const Vector2 & | size | ) |
Sets the maximum size an actor can be assigned in size negotiation.
[in] | size | The maximum size |
void Dali::Actor::SetMinimumSize | ( | const Vector2 & | size | ) |
Sets the minimum size an actor can be assigned in size negotiation.
[in] | size | The minimum size |
void Dali::Actor::SetName | ( | const std::string & | name | ) |
void Dali::Actor::SetOpacity | ( | float | opacity | ) |
Sets the opacity of an actor.
[in] | opacity | The new opacity |
void Dali::Actor::SetOrientation | ( | const Degree & | angle, |
const Vector3 & | axis | ||
) |
Sets the orientation of the Actor.
An actor's orientation is the rotation from its default orientation, and the rotation is centered around its anchor-point.
[in] | angle | The new orientation angle in degrees |
[in] | axis | The new axis of orientation |
void Dali::Actor::SetOrientation | ( | const Radian & | angle, |
const Vector3 & | axis | ||
) |
Sets the orientation of the Actor.
An actor's orientation is the rotation from its default orientation, and the rotation is centered around its anchor-point.
[in] | angle | The new orientation angle in radians |
[in] | axis | The new axis of orientation |
void Dali::Actor::SetOrientation | ( | const Quaternion & | orientation | ) |
Sets the orientation of the Actor.
An actor's orientation is the rotation from its default orientation, and the rotation is centered around its anchor-point.
[in] | orientation | The new orientation |
void Dali::Actor::SetPadding | ( | const Padding & | padding | ) |
Sets the padding for use in layout.
[in] | padding | Padding for the actor |
void Dali::Actor::SetParentOrigin | ( | const Vector3 & | origin | ) |
Sets the origin of an actor, within its parent's area.
This is expressed in unit coordinates, such that (0.0, 0.0, 0.5) is the top-left corner of the parent, and (1.0, 1.0, 0.5) is the bottom-right corner. The default parent-origin is Dali::ParentOrigin::TOP_LEFT (0.0, 0.0, 0.5). An actor's position is the distance between this origin, and the actor's anchor-point.
[in] | origin | The new parent-origin |
void Dali::Actor::SetPosition | ( | float | x, |
float | y | ||
) |
Sets the position of the Actor.
By default, sets the position vector between the parent origin and anchor point (default).
If Position inheritance if disabled, sets the world position.
The Actor's z position will be set to 0.0f.
[in] | x | The new x position |
[in] | y | The new y position |
void Dali::Actor::SetPosition | ( | float | x, |
float | y, | ||
float | z | ||
) |
Sets the position of the Actor.
By default, sets the position vector between the parent origin and anchor point (default).
If Position inheritance if disabled, sets the world position.
[in] | x | The new x position |
[in] | y | The new y position |
[in] | z | The new z position |
void Dali::Actor::SetPosition | ( | const Vector3 & | position | ) |
Sets the position of the Actor.
By default, sets the position vector between the parent origin and anchor point (default).
If Position inheritance if disabled, sets the world position.
[in] | position | The new position |
void Dali::Actor::SetResizePolicy | ( | ResizePolicy::Type | policy, |
Dimension::Type | dimension | ||
) |
Sets the resize policy to be used for the given dimension(s).
[in] | policy | The resize policy to use |
[in] | dimension | The dimension(s) to set policy for. Can be a bitfield of multiple dimensions |
void Dali::Actor::SetScale | ( | float | scale | ) |
Sets the scale factor applied to an actor.
[in] | scale | The scale factor applied on all axes |
void Dali::Actor::SetScale | ( | float | scaleX, |
float | scaleY, | ||
float | scaleZ | ||
) |
Sets the scale factor applied to an actor.
[in] | scaleX | The scale factor applied along the x-axis |
[in] | scaleY | The scale factor applied along the y-axis |
[in] | scaleZ | The scale factor applied along the z-axis |
void Dali::Actor::SetScale | ( | const Vector3 & | scale | ) |
Sets the scale factor applied to an actor.
[in] | scale | A vector representing the scale factor for each axis |
void Dali::Actor::SetSensitive | ( | bool | sensitive | ) |
Sets whether an actor should emit touch or hover signals.
An actor is sensitive by default, which means that as soon as an application connects to the SignalTouch(), the touch event signal will be emitted, and as soon as an application connects to the SignalHover(), the hover event signal will be emitted.
If the application wishes to temporarily disable the touch or hover event signal emission, then they can do so by calling:
actor.SetSensitive(false);
Then, to re-enable the touch or hover event signal emission, the application should call:
actor.SetSensitive(true);
[in] | sensitive | true to enable emission of the touch or hover event signals, false otherwise |
void Dali::Actor::SetSize | ( | float | width, |
float | height | ||
) |
Sets the size of an actor.
Geometry can be scaled to fit within this area. This does not interfere with the actors scale factor. The actors default depth is the minimum of width & height.
[in] | width | The new width |
[in] | height | The new height |
void Dali::Actor::SetSize | ( | float | width, |
float | height, | ||
float | depth | ||
) |
Sets the size of an actor.
Geometry can be scaled to fit within this area. This does not interfere with the actors scale factor.
[in] | width | The size of the actor along the x-axis |
[in] | height | The size of the actor along the y-axis |
[in] | depth | The size of the actor along the z-axis |
void Dali::Actor::SetSize | ( | const Vector2 & | size | ) |
Sets the size of an actor.
Geometry can be scaled to fit within this area. This does not interfere with the actors scale factor. The actors default depth is the minimum of width & height.
[in] | size | The new size |
void Dali::Actor::SetSize | ( | const Vector3 & | size | ) |
Sets the size of an actor.
Geometry can be scaled to fit within this area. This does not interfere with the actors scale factor.
[in] | size | The new size |
void Dali::Actor::SetSizeModeFactor | ( | const Vector3 & | factor | ) |
Sets the relative to parent size factor of the actor.
This factor is only used when ResizePolicy is set to either: ResizePolicy::SIZE_RELATIVE_TO_PARENT or ResizePolicy::SIZE_FIXED_OFFSET_FROM_PARENT. This actor's size is set to the actor's size multiplied by or added to this factor, depending on ResizePolicy ( See SetResizePolicy() ).
[in] | factor | A Vector3 representing the relative factor to be applied to each axis |
void Dali::Actor::SetSizeScalePolicy | ( | SizeScalePolicy::Type | policy | ) |
Sets the policy to use when setting size with size negotiation. Defaults to SizeScalePolicy::USE_SIZE_SET.
[in] | policy | The policy to use for when the size is set |
void Dali::Actor::SetVisible | ( | bool | visible | ) |
Sets the visibility flag of an actor.
[in] | visible | The new visibility flag |
void Dali::Actor::SetX | ( | float | x | ) |
Sets the position of an actor along the X-axis.
[in] | x | The new x position |
void Dali::Actor::SetY | ( | float | y | ) |
Sets the position of an actor along the Y-axis.
[in] | y | The new y position |
void Dali::Actor::SetZ | ( | float | z | ) |
Sets the position of an actor along the Z-axis.
[in] | z | The new z position |
This signal is emitted when touch input is received.
A callback of the following type may be connected:
bool YourCallbackName(Actor actor, const TouchEvent& event);
The return value of True, indicates that the touch event should be consumed. Otherwise the signal will be emitted on the next sensitive parent of the actor.
This signal is emitted when touch input is received.
A callback of the following type may be connected:
bool YourCallbackName( Actor actor, TouchData& touch );
The return value of True, indicates that the touch event has been consumed. Otherwise the signal will be emitted on the next sensitive parent of the actor.
void Dali::Actor::TranslateBy | ( | const Vector3 & | distance | ) |
Translates an actor relative to its existing position.
[in] | distance | The actor will move by this distance |
void Dali::Actor::Unparent | ( | ) |
Removes an actor from its parent.
If the actor has no parent, this method does nothing.
This signal is emitted when wheel event is received.
A callback of the following type may be connected:
bool YourCallbackName(Actor actor, const WheelEvent& event);
The return value of True, indicates that the wheel event should be consumed. Otherwise the signal will be emitted on the next sensitive parent of the actor.