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

Button is a base class for different kind of buttons. More...

#include <button.h>

Inheritance diagram for Dali::Toolkit::Button:
Inheritance graph
[legend]
Collaboration diagram for Dali::Toolkit::Button:
Collaboration graph
[legend]

Classes

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

Public Types

enum  PropertyRange { PROPERTY_START_INDEX = Control::CONTROL_PROPERTY_END_INDEX + 1, PROPERTY_END_INDEX = PROPERTY_START_INDEX + 1000 }
 The start and end property ranges for this control. More...
 
typedef Signal< bool(Button) > ButtonSignalType
 Button signal type .0. More...
 
- Public Types inherited from Dali::Toolkit::Control
enum  PropertyRange { PROPERTY_START_INDEX = PROPERTY_REGISTRATION_START_INDEX, CONTROL_PROPERTY_START_INDEX = PROPERTY_START_INDEX, CONTROL_PROPERTY_END_INDEX = CONTROL_PROPERTY_START_INDEX + 1000 }
 The start and end property ranges for control. More...
 
typedef Signal< bool(Control,
const KeyEvent &) > 
KeyEventSignalType
 Key Event signal type;. More...
 
typedef Signal< void(Control) > KeyInputFocusSignalType
 Key InputFocusType signal type;. More...
 

Public Member Functions

 Button ()
 Create an uninitialized Button. More...
 
 Button (const Button &button)
 Copy constructor. More...
 
Buttonoperator= (const Button &button)
 Assignment operator. More...
 
 ~Button ()
 Destructor. More...
 
void SetDisabled (bool disabled)
 Sets the button as disabled. More...
 
bool IsDisabled () const
 Returns if the button is disabled. More...
 
void SetAutoRepeating (bool autoRepeating)
 Sets the autorepeating property. More...
 
bool IsAutoRepeating () const
 Returns if the autorepeating property is set. More...
 
void SetInitialAutoRepeatingDelay (float initialAutoRepeatingDelay)
 Sets the initial autorepeating delay. More...
 
float GetInitialAutoRepeatingDelay () const
 Gets the initial autorepeating delay in seconds. More...
 
void SetNextAutoRepeatingDelay (float nextAutoRepeatingDelay)
 Sets the next autorepeating delay. More...
 
float GetNextAutoRepeatingDelay () const
 Gets the next autorepeating delay in seconds. More...
 
void SetTogglableButton (bool togglable)
 Sets the togglable property. More...
 
bool IsTogglableButton () const
 Returns if the togglable property is set. More...
 
void SetSelected (bool selected)
 Sets the button as selected or unselected. More...
 
bool IsSelected () const
 Returns if the selected property is set and the button is togglable. More...
 
void SetAnimationTime (float animationTime)
 Sets the animation time. More...
 
float GetAnimationTime () const
 Retrieves button's animation time. More...
 
void SetLabelText (const std::string &label)
 Sets the button's label. More...
 
std::string GetLabelText () const
 Gets the label. More...
 
void SetUnselectedImage (const std::string &filename)
 Sets the unselected button image. More...
 
void SetBackgroundImage (const std::string &filename)
 Sets the background image. More...
 
void SetSelectedImage (const std::string &filename)
 Sets the selected image. More...
 
void SetSelectedBackgroundImage (const std::string &filename)
 Sets the selected background image. More...
 
void SetDisabledBackgroundImage (const std::string &filename)
 Sets the disabled background image. More...
 
void SetDisabledImage (const std::string &filename)
 Sets the disabled button image. More...
 
void SetDisabledSelectedImage (const std::string &filename)
 Sets the disabled selected button image. More...
 
void SetLabel (Actor label)
 .50. More...
 
void SetButtonImage (Image image)
 .50. More...
 
void SetSelectedImage (Image image)
 .50. More...
 
Actor GetButtonImage () const
 .50 More...
 
Actor GetSelectedImage () const
 .50 More...
 
ButtonSignalTypePressedSignal ()
 This signal is emitted when the button is touched. More...
 
ButtonSignalTypeReleasedSignal ()
 This signal is emitted when the button is touched and the touch point leaves the boundary of the button. More...
 
ButtonSignalTypeClickedSignal ()
 This signal is emitted when the button is touched and the touch point doesn't leave the boundary of the button. More...
 
ButtonSignalTypeStateChangedSignal ()
 This signal is emitted when the button's state is changed. More...
 
DALI_INTERNAL Button (Internal::Button &implementation)
 Creates a handle using the Toolkit::Internal implementation. More...
 
DALI_INTERNAL Button (Dali::Internal::CustomActor *internal)
 Allows the creation of this Control from an Internal::CustomActor pointer. More...
 
- Public Member Functions inherited from Dali::Toolkit::Control
 Control ()
 Create an uninitialized Control handle. More...
 
 Control (const Control &uiControl)
 Copy constructor. More...
 
 ~Control ()
 Dali::Control is intended as a base class. More...
 
Controloperator= (const Control &handle)
 Assignment operator. More...
 
void SetKeyInputFocus ()
 This sets the control to receive key events. More...
 
bool HasKeyInputFocus ()
 Quries whether the control has key input focus. More...
 
void ClearKeyInputFocus ()
 Once an actor is Set to receive key input focus this function is called to stop it receiving key events. More...
 
PinchGestureDetector GetPinchGestureDetector () const
 Retrieves the pinch gesture detector of the control. More...
 
PanGestureDetector GetPanGestureDetector () const
 Retrieves the pan gesture detector of the control. More...
 
TapGestureDetector GetTapGestureDetector () const
 Retrieves the tap gesture detector of the control. More...
 
LongPressGestureDetector GetLongPressGestureDetector () const
 Retrieves the long press gesture detector of the control. More...
 
void SetStyleName (const std::string &styleName)
 Sets the name of the style to be applied to the control. More...
 
const std::string & GetStyleName () const
 Retrieves the name of the style to be applied to the control (if any). More...
 
void SetBackgroundColor (const Vector4 &color)
 Sets the background color of the control. More...
 
Vector4 GetBackgroundColor () const
 .3 More...
 
void SetBackgroundImage (Image image)
 Sets an image as the background of the control. More...
 
void ClearBackground ()
 Clears the background. More...
 
KeyEventSignalTypeKeyEventSignal ()
 This signal is emitted when key event is received. More...
 
KeyInputFocusSignalTypeKeyInputFocusGainedSignal ()
 This signal is emitted when the control gets Key Input Focus. More...
 
KeyInputFocusSignalTypeKeyInputFocusLostSignal ()
 This signal is emitted when the control loses Key Input Focus which could be due to it being gained by another Control or Actor or just cleared from this control as no longer required. More...
 
 Control (Internal::Control &implementation)
 Create an initialised Control. More...
 
 Control (Dali::Internal::CustomActor *internal)
 This constructor is used by CustomActor within Dali core to create additional Control handles using an Internal CustomActor pointer. More...
 
template<typename I >
DALI_INTERNAL void VerifyCustomActorPointer (Dali::Internal::CustomActor *internal)
 Template to allow deriving controls to verify whether the Internal::CustomActor* is actually an implementation of their class. More...
 
- Public Member Functions inherited from Dali::CustomActor
 CustomActor ()
 Create an uninitialized CustomActor handle. More...
 
 ~CustomActor ()
 Destructor. More...
 
CustomActorImplGetImplementation ()
 Retrieve the custom actor implementation. More...
 
const CustomActorImplGetImplementation () const
 Retrieve the custom actor implementation. More...
 
 CustomActor (CustomActorImpl &implementation)
 Create an initialised CustomActor. More...
 
 CustomActor (const CustomActor &copy)
 Copy constructor. More...
 
CustomActoroperator= (const CustomActor &rhs)
 Assignment operator. More...
 
 CustomActor (Internal::CustomActor *actor)
 This constructor is used internally to create additional CustomActor handles. 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 Button DownCast (BaseHandle handle)
 Downcast a handle to Button handle. More...
 
- Static Public Member Functions inherited from Dali::Toolkit::Control
static Control New ()
 Create a new instance of a Control. More...
 
static Control DownCast (BaseHandle handle)
 Downcast a handle to Control handle. More...
 
template<typename T , typename I >
static DALI_INTERNALDownCast (BaseHandle handle)
 Template to allow deriving controls to DownCast handles to deriving handle classes. More...
 
- Static Public Member Functions inherited from Dali::CustomActor
static CustomActor DownCast (BaseHandle handle)
 Downcast a handle to CustomActor 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

Button is a base class for different kind of buttons.

This class provides the disabled property and the clicked signal.

A ClickedSignal() is emitted when the button is touched and the touch point doesn't leave the boundary of the button.

When the disabled property is set to true, no signal is emitted.

Button provides the following properties which modify the signals emitted:

The button's appearance can be modified by setting properties for the various image filenames.

The background is always shown and doesn't change if the button is pressed or released. The button image is shown over the background image when the button is not pressed and is replaced by the selected image when the button is pressed. The text label is placed always on the top of all images.

When the button is disabled, background, button and selected images are replaced by their disabled images.

Is not mandatory set all images. A button could be defined only by setting its background image or by setting its background and selected images.

Signals

Signal Name Method
pressed PressedSignal()
released ReleasedSignal()
clicked ClickedSignal()
stateChanged StateChangedSignal()

Actions

Action Name Button method called
buttonClick DoClickAction()

.0

Definition at line 85 of file button.h.

Member Typedef Documentation

Button signal type .0.

Definition at line 423 of file button.h.

Member Enumeration Documentation

The start and end property ranges for this control.

.0

Enumerator
PROPERTY_START_INDEX 

.0

PROPERTY_END_INDEX 

Reserve property indices .0.

Definition at line 93 of file button.h.

Constructor & Destructor Documentation

Dali::Toolkit::Button::Button ( )

Create an uninitialized Button.

Only derived versions can be instantiated. Calling member functions with an uninitialized Dali::Object is not allowed. .0

Definition at line 35 of file button.cpp.

Dali::Toolkit::Button::Button ( const Button button)

Copy constructor.

.0

Definition at line 38 of file button.cpp.

Dali::Toolkit::Button::~Button ( )

Destructor.

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

Definition at line 52 of file button.cpp.

Dali::Toolkit::Button::Button ( Internal::Button implementation)

Creates a handle using the Toolkit::Internal implementation.

.0

Parameters
[in]implementationThe Control implementation.

Definition at line 228 of file button.cpp.

Dali::Toolkit::Button::Button ( Dali::Internal::CustomActor internal)

Allows the creation of this Control from an Internal::CustomActor pointer.

.0

Parameters
[in]internalA pointer to the internal CustomActor.

Definition at line 233 of file button.cpp.

Member Function Documentation

Button::ButtonSignalType & Dali::Toolkit::Button::ClickedSignal ( )

This signal is emitted when the button is touched and the touch point doesn't leave the boundary of the button.

A callback of the following type may be connected:

bool YourCallbackName( Button button );

.0

Returns
The signal to connect to.

Definition at line 186 of file button.cpp.

References Dali::Toolkit::GetImplementation().

Referenced by Dali::Toolkit::Internal::TextSelectionPopup::AddOption(), Dali::Toolkit::Internal::Button::DoConnectSignal(), UtcDaliButtonClickedSignalP(), and UtcDaliPopupPropertyTouchTransparent().

Here is the call graph for this function:

Here is the caller graph for this function:

Button Dali::Toolkit::Button::DownCast ( BaseHandle  handle)
static

Downcast a handle to Button handle.

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

.0

Parameters
[in]handleHandle to an object
Returns
A handle to a Button or an uninitialized handle

Definition at line 56 of file button.cpp.

Referenced by Dali::Toolkit::Internal::Button::DoAction(), Dali::Toolkit::Internal::Button::DoConnectSignal(), Dali::Toolkit::Internal::Button::GetProperty(), Dali::Toolkit::Internal::Button::SetProperty(), UtcDaliButtonDownCastN(), and UtcDaliButtonDownCastP().

Here is the caller graph for this function:

float Dali::Toolkit::Button::GetAnimationTime ( ) const

Retrieves button's animation time.

.0

Returns
The animation time in seconds.

Definition at line 126 of file button.cpp.

References Dali::Toolkit::GetImplementation().

Referenced by UtcDaliButtonSetAnimationTimeP().

Here is the call graph for this function:

Here is the caller graph for this function:

Actor Dali::Toolkit::Button::GetButtonImage ( ) const

.50

Gets the button image.

.0

Remarks
Avoid using this method as it's a legacy code.
Returns
An actor with the button image.

Definition at line 217 of file button.cpp.

References Dali::Toolkit::GetImplementation().

Here is the call graph for this function:

float Dali::Toolkit::Button::GetInitialAutoRepeatingDelay ( ) const

Gets the initial autorepeating delay in seconds.

.0

Returns
the initial autorepeating delay in seconds.

Definition at line 86 of file button.cpp.

References Dali::Toolkit::GetImplementation().

Referenced by UtcDaliButtonSetInitialAutoRepeatingDelayP(), UtcDaliPushButtonProperties(), and UtcDaliPushButtonSetGetAutorepeatingDelayValues01().

Here is the call graph for this function:

Here is the caller graph for this function:

std::string Dali::Toolkit::Button::GetLabelText ( ) const

Gets the label.

.0

Returns
The label text.

Definition at line 136 of file button.cpp.

References Dali::Toolkit::GetImplementation().

Referenced by UtcDaliButtonSetLabelActorP(), UtcDaliButtonSetLabelStringP(), UtcDaliPushButtonSetLabelText(), and UtcDaliRadioButtonLabelActor().

Here is the call graph for this function:

Here is the caller graph for this function:

float Dali::Toolkit::Button::GetNextAutoRepeatingDelay ( ) const

Gets the next autorepeating delay in seconds.

.0

Returns
the next autorepeating delay in seconds.

Definition at line 96 of file button.cpp.

References Dali::Toolkit::GetImplementation().

Referenced by UtcDaliButtonSetNextAutoRepeatingDelayP(), UtcDaliPushButtonProperties(), and UtcDaliPushButtonSetGetAutorepeatingDelayValues01().

Here is the call graph for this function:

Here is the caller graph for this function:

Actor Dali::Toolkit::Button::GetSelectedImage ( ) const

.50

Gets the selected image.

.0

Remarks
Avoid using this method as it's a legacy code.
Returns
An actor with the selected image.

Definition at line 222 of file button.cpp.

References Dali::Toolkit::GetImplementation().

Here is the call graph for this function:

bool Dali::Toolkit::Button::IsAutoRepeating ( ) const

Returns if the autorepeating property is set.

.0

Returns
true if the autorepeating property is set.

Definition at line 76 of file button.cpp.

References Dali::Toolkit::GetImplementation().

Referenced by UtcDaliButtonIsAutoRepeatingP(), UtcDaliButtonSetAutoRepeatingP(), UtcDaliPushButtonProperties(), UtcDaliPushButtonSetGetAutoRepeating(), and UtcDaliPushButtonSetGetAutoRepeatingAndTogglableButton().

Here is the call graph for this function:

Here is the caller graph for this function:

bool Dali::Toolkit::Button::IsDisabled ( ) const

Returns if the button is disabled.

.0

Returns
true if the button is disabled.

Definition at line 66 of file button.cpp.

References Dali::Toolkit::GetImplementation().

Referenced by UtcDaliButtonIsDisabledP(), UtcDaliButtonSetDisabledP(), and UtcDaliButtonSetProperty().

Here is the call graph for this function:

Here is the caller graph for this function:

bool Dali::Toolkit::Button::IsSelected ( ) const

Returns if the selected property is set and the button is togglable.

.0

Returns
true if the button is selected.

Definition at line 116 of file button.cpp.

References Dali::Toolkit::GetImplementation().

Referenced by anonymous_namespace{utc-Dali-CheckBoxButton.cpp}::CheckBoxButtonClicked(), anonymous_namespace{utc-Dali-PushButton.cpp}::PushButtonSelected(), UtcDaliButtonSetSelectedP(), UtcDaliCheckBoxButtonSetGetSelected(), UtcDaliPushButtonProperties(), UtcDaliPushButtonSetGetSelected01(), UtcDaliPushButtonSetGetSelected02(), and UtcDaliRadioButtonSelected().

Here is the call graph for this function:

Here is the caller graph for this function:

bool Dali::Toolkit::Button::IsTogglableButton ( ) const

Returns if the togglable property is set.

.0

Returns
true if the togglable property is set.

Definition at line 106 of file button.cpp.

References Dali::Toolkit::GetImplementation().

Referenced by UtcDaliButtonSetTogglableButtonP(), UtcDaliPushButtonProperties(), UtcDaliPushButtonSetGetAutoRepeatingAndTogglableButton(), and UtcDaliPushButtonSetGetTogglableButton().

Here is the call graph for this function:

Here is the caller graph for this function:

Button & Dali::Toolkit::Button::operator= ( const Button button)

Assignment operator.

.0

Definition at line 43 of file button.cpp.

References Dali::Toolkit::Control::operator=().

Referenced by Dali::Toolkit::CheckBoxButton::operator=(), Dali::Toolkit::PushButton::operator=(), and Dali::Toolkit::RadioButton::operator=().

Here is the call graph for this function:

Here is the caller graph for this function:

Button::ButtonSignalType & Dali::Toolkit::Button::PressedSignal ( )

This signal is emitted when the button is touched.

A callback of the following type may be connected:

bool YourCallbackName( Button button );

.0

Returns
The signal to connect to.

Definition at line 176 of file button.cpp.

References Dali::Toolkit::GetImplementation().

Referenced by Dali::Toolkit::Internal::Button::DoConnectSignal(), UtcDaliButtonPressedSignalP(), and UtcDaliPushButtonPressed().

Here is the call graph for this function:

Here is the caller graph for this function:

Button::ButtonSignalType & Dali::Toolkit::Button::ReleasedSignal ( )

This signal is emitted when the button is touched and the touch point leaves the boundary of the button.

A callback of the following type may be connected:

bool YourCallbackName( Button button );

.0

Returns
The signal to connect to.

Definition at line 181 of file button.cpp.

References Dali::Toolkit::GetImplementation().

Referenced by Dali::Toolkit::Internal::Button::DoConnectSignal(), UtcDaliButtonPressedSignalP(), and UtcDaliPushButtonReleased().

Here is the call graph for this function:

Here is the caller graph for this function:

void Dali::Toolkit::Button::SetAnimationTime ( float  animationTime)

Sets the animation time.

.0

Parameters
[in]animationTimeThe animation time in seconds.

Definition at line 121 of file button.cpp.

References Dali::Toolkit::GetImplementation().

Referenced by Dali::Toolkit::Internal::TextSelectionPopup::AddOption(), and UtcDaliButtonSetAnimationTimeP().

Here is the call graph for this function:

Here is the caller graph for this function:

void Dali::Toolkit::Button::SetAutoRepeating ( bool  autoRepeating)

Sets the autorepeating property.

If the autorepeating property is set to true, then the togglable property is set to false but no signal is emitted.

.0

Parameters
[in]autoRepeatingautorepeating property.

Definition at line 71 of file button.cpp.

References Dali::Toolkit::GetImplementation().

Referenced by UtcDaliButtonIsAutoRepeatingP(), UtcDaliButtonSetAutoRepeatingP(), UtcDaliPushButtonProperties(), UtcDaliPushButtonSetGetAutoRepeating(), UtcDaliPushButtonSetGetAutoRepeatingAndTogglableButton(), UtcDaliPushButtonSetGetAutorepeatingDelayValues01(), and UtcDaliPushButtonSetGetAutorepeatingDelayValues02().

Here is the call graph for this function:

Here is the caller graph for this function:

void Dali::Toolkit::Button::SetBackgroundImage ( const std::string &  filename)

Sets the background image.

.0

Parameters
[in]filenameThe background image.

Definition at line 146 of file button.cpp.

References Dali::Toolkit::GetImplementation().

Here is the call graph for this function:

void Dali::Toolkit::Button::SetButtonImage ( Image  image)

.50.

Instead, use SetUnselectedImage.

Sets the button image.

.0

Parameters
[in]imageThe button image.

Definition at line 203 of file button.cpp.

References Dali::Dimension::ALL_DIMENSIONS, Dali::Toolkit::GetImplementation(), Dali::ImageActor::New(), Dali::Actor::SetResizePolicy(), and Dali::ResizePolicy::USE_NATURAL_SIZE.

Here is the call graph for this function:

void Dali::Toolkit::Button::SetDisabled ( bool  disabled)

Sets the button as disabled.

No signals are emitted when the disabled property is set.

.0

Parameters
[in]disabledproperty.

Definition at line 61 of file button.cpp.

References Dali::Toolkit::GetImplementation().

Referenced by UtcDaliButtonIsDisabledP(), and UtcDaliButtonSetDisabledP().

Here is the call graph for this function:

Here is the caller graph for this function:

void Dali::Toolkit::Button::SetDisabledBackgroundImage ( const std::string &  filename)

Sets the disabled background image.

.0

Parameters
[in]filenameThe disabled background image.

Definition at line 161 of file button.cpp.

References Dali::Toolkit::GetImplementation().

Here is the call graph for this function:

void Dali::Toolkit::Button::SetDisabledImage ( const std::string &  filename)

Sets the disabled button image.

.0

Parameters
[in]filenameThe disabled button image.

Definition at line 166 of file button.cpp.

References Dali::Toolkit::GetImplementation().

Here is the call graph for this function:

void Dali::Toolkit::Button::SetDisabledSelectedImage ( const std::string &  filename)

Sets the disabled selected button image.

.0

Parameters
[in]filenameThe disabled selected button image.

Definition at line 171 of file button.cpp.

References Dali::Toolkit::GetImplementation().

Here is the call graph for this function:

void Dali::Toolkit::Button::SetInitialAutoRepeatingDelay ( float  initialAutoRepeatingDelay)

Sets the initial autorepeating delay.

By default this value is set to 0.15 seconds.

.0

Parameters
[in]initialAutoRepeatingDelayin seconds.
Precondition
initialAutoRepeatingDelay must be greater than zero.

Definition at line 81 of file button.cpp.

References Dali::Toolkit::GetImplementation().

Referenced by UtcDaliButtonSetInitialAutoRepeatingDelayP(), UtcDaliPushButtonProperties(), UtcDaliPushButtonSetGetAutorepeatingDelayValues01(), and UtcDaliPushButtonSetGetAutorepeatingDelayValues02().

Here is the call graph for this function:

Here is the caller graph for this function:

void Dali::Toolkit::Button::SetLabel ( Actor  label)

.50.

Instead, use SetLabelText.

Sets the label with an actor.

.0

Parameters
[in]labelThe actor to use as a label

Definition at line 198 of file button.cpp.

References Dali::Toolkit::GetImplementation().

Here is the call graph for this function:

void Dali::Toolkit::Button::SetLabelText ( const std::string &  label)

Sets the button's label.

.0

Parameters
[in]labelThe label text.

Definition at line 131 of file button.cpp.

References Dali::Toolkit::GetImplementation().

Referenced by Dali::Toolkit::RadioButton::New(), UtcDaliButtonSetLabelActorP(), UtcDaliButtonSetLabelStringP(), UtcDaliPushButtonAlignmentLayout(), UtcDaliPushButtonPaddingLayout(), UtcDaliPushButtonSetLabelText(), and UtcDaliRadioButtonLabelActor().

Here is the call graph for this function:

Here is the caller graph for this function:

void Dali::Toolkit::Button::SetNextAutoRepeatingDelay ( float  nextAutoRepeatingDelay)

Sets the next autorepeating delay.

By default this value is set to 0.05 seconds.

.0

Parameters
[in]nextAutoRepeatingDelayin seconds.
Precondition
nextAutoRepeatingDelay must be greater than zero.

Definition at line 91 of file button.cpp.

References Dali::Toolkit::GetImplementation().

Referenced by UtcDaliButtonSetNextAutoRepeatingDelayP(), UtcDaliPushButtonProperties(), UtcDaliPushButtonSetGetAutorepeatingDelayValues01(), and UtcDaliPushButtonSetGetAutorepeatingDelayValues02().

Here is the call graph for this function:

Here is the caller graph for this function:

void Dali::Toolkit::Button::SetSelected ( bool  selected)

Sets the button as selected or unselected.

togglable property must be set to true.

Emits a Button::StateChangedSignal() signal.

.0

Parameters
[in]selectedproperty.

Definition at line 111 of file button.cpp.

References Dali::Toolkit::GetImplementation().

Referenced by Dali::Toolkit::Internal::RadioButton::OnSelected(), UtcDaliButtonSetSelectedP(), UtcDaliButtonStateChangedSignalP(), UtcDaliCheckBoxButtonSetGetSelected(), UtcDaliPushButtonProperties(), UtcDaliPushButtonSetGetSelected01(), UtcDaliPushButtonSetGetSelected02(), and UtcDaliRadioButtonSelected().

Here is the call graph for this function:

Here is the caller graph for this function:

void Dali::Toolkit::Button::SetSelectedBackgroundImage ( const std::string &  filename)

Sets the selected background image.

.0

Parameters
[in]filenameThe selected background image.

Definition at line 156 of file button.cpp.

References Dali::Toolkit::GetImplementation().

Here is the call graph for this function:

void Dali::Toolkit::Button::SetSelectedImage ( const std::string &  filename)

Sets the selected image.

.0

Parameters
[in]filenameThe selected image.

Definition at line 151 of file button.cpp.

References Dali::Toolkit::GetImplementation().

Here is the call graph for this function:

void Dali::Toolkit::Button::SetSelectedImage ( Image  image)

.50.

Instead, use SetSelectedImage( const std::string& filename ).

Sets the selected image.

.0

Parameters
[in]imageThe selected image.

Definition at line 210 of file button.cpp.

References Dali::Dimension::ALL_DIMENSIONS, Dali::Toolkit::GetImplementation(), Dali::ImageActor::New(), Dali::Actor::SetResizePolicy(), and Dali::ResizePolicy::USE_NATURAL_SIZE.

Here is the call graph for this function:

void Dali::Toolkit::Button::SetTogglableButton ( bool  togglable)

Sets the togglable property.

If the togglable property is set to true, then the autorepeating property is set to false.

.0

Parameters
[in]togglableproperty.

Definition at line 101 of file button.cpp.

References Dali::Toolkit::GetImplementation().

Referenced by UtcDaliButtonSetSelectedP(), UtcDaliButtonSetTogglableButtonP(), UtcDaliButtonStateChangedSignalP(), UtcDaliPushButtonProperties(), UtcDaliPushButtonSelected(), UtcDaliPushButtonSetGetAutoRepeatingAndTogglableButton(), UtcDaliPushButtonSetGetSelected01(), UtcDaliPushButtonSetGetSelected02(), and UtcDaliPushButtonSetGetTogglableButton().

Here is the call graph for this function:

Here is the caller graph for this function:

void Dali::Toolkit::Button::SetUnselectedImage ( const std::string &  filename)

Sets the unselected button image.

.0

Parameters
[in]filenameThe button image.

Definition at line 141 of file button.cpp.

References Dali::Toolkit::GetImplementation().

Referenced by Dali::Toolkit::Internal::TextSelectionPopup::AddOption(), and UtcDaliButtonSetUnselectedImageP().

Here is the call graph for this function:

Here is the caller graph for this function:

Button::ButtonSignalType & Dali::Toolkit::Button::StateChangedSignal ( )

This signal is emitted when the button's state is changed.

The application can get the state by calling IsSelected().

A callback of the following type may be connected:

bool YourCallbackName( Button button );

.0

Returns
The signal to connect to.

Definition at line 191 of file button.cpp.

References Dali::Toolkit::GetImplementation().

Referenced by Dali::Toolkit::Internal::Button::DoConnectSignal(), UtcDaliButtonStateChangedSignalP(), UtcDaliCheckBoxButtonSetGetSelected(), UtcDaliPushButtonSelected(), UtcDaliPushButtonSetGetSelected01(), and UtcDaliPushButtonSetGetSelected02().

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