Tizen Native API  5.5
Button

button_inheritance_tree.png
preview-00.png
preview-01.png
preview-02.png

This is a push-button. Press it and run some function. It can contain a simple label and icon object and it also has an autorepeat feature.

This widget inherits from the Layout one, so that all the functions acting on it also work for button objects.

This widget emits the following signals, besides the ones sent from Layout :

Also, defined in the default theme, the button has the following styles available:

Default content parts of the button widget that you can use for are:

Default text parts of the button widget that you can use for are:

Supported elm_object common APIs.

Here is some sample code using it:

Functions

Evas_Objectelm_button_add (Evas_Object *parent)
void elm_button_autorepeat_initial_timeout_set (Evas_Object *obj, double t)
 The initial timeout before the autorepeat event is generated.
double elm_button_autorepeat_initial_timeout_get (const Evas_Object *obj)
 The initial timeout before the autorepeat event is generated.
void elm_button_autorepeat_gap_timeout_set (Evas_Object *obj, double t)
 The interval between each generated autorepeat event.
double elm_button_autorepeat_gap_timeout_get (const Evas_Object *obj)
 The interval between each generated autorepeat event.
void elm_button_autorepeat_set (Evas_Object *obj, Eina_Bool on)
 Turn on/off the autorepeat event generated when the button is kept pressed.
Eina_Bool elm_button_autorepeat_get (const Evas_Object *obj)
 Turn on/off the autorepeat event generated when the button is kept pressed.

Function Documentation

The interval between each generated autorepeat event.

After the first repeated event is fired, all subsequent ones will follow after a delay of t seconds for each.

See also elm_button_autorepeat_initial_timeout_set.

Returns:
Interval in seconds
Since :
2.3
void elm_button_autorepeat_gap_timeout_set ( Evas_Object obj,
double  t 
)

The interval between each generated autorepeat event.

After the first repeated event is fired, all subsequent ones will follow after a delay of t seconds for each.

See also elm_button_autorepeat_initial_timeout_set.

Parameters:
[in]tInterval in seconds
Since :
2.3
Examples:
button_example_01.c.

Turn on/off the autorepeat event generated when the button is kept pressed.

When off, no autorepeat is performed and buttons emit a normal clicked signal when they are clicked.

When on, keeping a button pressed will continuously emit a repeated signal until the button is released. The time it takes until it starts emitting the signal is given by elm_button_autorepeat_initial_timeout_set, and the time between each new emission by elm_button_autorepeat_gap_timeout_set.

Returns:
A bool to turn on/off the event
Since :
2.3

The initial timeout before the autorepeat event is generated.

Sets the timeout, in seconds, since the button is pressed until the first repeated signal is emitted. If t is 0.0 or less, there won't be any delay and the event will be fired the moment the button is pressed.

See also elm_button_autorepeat_set, elm_button_autorepeat_gap_timeout_set.

Returns:
Timeout in seconds
Since :
2.3

The initial timeout before the autorepeat event is generated.

Sets the timeout, in seconds, since the button is pressed until the first repeated signal is emitted. If t is 0.0 or less, there won't be any delay and the event will be fired the moment the button is pressed.

See also elm_button_autorepeat_set, elm_button_autorepeat_gap_timeout_set.

Parameters:
[in]tTimeout in seconds
Since :
2.3
Examples:
button_example_01.c.

Turn on/off the autorepeat event generated when the button is kept pressed.

When off, no autorepeat is performed and buttons emit a normal clicked signal when they are clicked.

When on, keeping a button pressed will continuously emit a repeated signal until the button is released. The time it takes until it starts emitting the signal is given by elm_button_autorepeat_initial_timeout_set, and the time between each new emission by elm_button_autorepeat_gap_timeout_set.

Parameters:
[in]onA bool to turn on/off the event
Since :
2.3
Examples:
button_example_01.c.