2016-06-10 01:29:40 -07:00
|
|
|
class Elm.Button (Elm.Layout, Efl.Ui.Clickable,
|
2016-05-12 03:37:43 -07:00
|
|
|
Elm.Interface.Atspi_Widget_Action)
|
2014-03-19 23:40:43 -07:00
|
|
|
{
|
2016-04-27 08:34:31 -07:00
|
|
|
[[Push-button widget
|
|
|
|
|
|
|
|
Press it and run some function. It can contain a simple label and icon object
|
|
|
|
and it also has an autorepeat feature.
|
|
|
|
]]
|
2016-05-12 09:06:04 -07:00
|
|
|
legacy_prefix: elm_button;
|
2014-03-19 23:40:43 -07:00
|
|
|
eo_prefix: elm_obj_button;
|
2015-05-07 09:32:53 -07:00
|
|
|
methods {
|
|
|
|
@property autorepeat_initial_timeout {
|
2016-04-27 08:34:31 -07:00
|
|
|
[[The initial timeout before the autorepeat event is generated
|
2014-03-19 23:40:43 -07:00
|
|
|
|
2016-04-27 08:34:31 -07:00
|
|
|
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.
|
2014-03-19 23:40:43 -07:00
|
|
|
|
2016-04-27 08:34:31 -07:00
|
|
|
See also @.autorepeat.set, @.autorepeat_gap_timeout.set.
|
|
|
|
]]
|
|
|
|
set {
|
2014-03-19 23:40:43 -07:00
|
|
|
}
|
|
|
|
get {
|
|
|
|
}
|
|
|
|
values {
|
2015-07-16 07:13:27 -07:00
|
|
|
t: double; [[Timeout in seconds]]
|
2014-03-19 23:40:43 -07:00
|
|
|
}
|
|
|
|
}
|
2015-05-07 09:32:53 -07:00
|
|
|
@property autorepeat_gap_timeout {
|
2016-04-27 08:34:31 -07:00
|
|
|
[[The interval between each generated autorepeat event
|
2014-03-19 23:40:43 -07:00
|
|
|
|
2016-04-27 08:34:31 -07:00
|
|
|
After the first $repeated event is fired, all subsequent ones will
|
|
|
|
follow after a delay of $t seconds for each.
|
2014-03-19 23:40:43 -07:00
|
|
|
|
2016-04-27 08:34:31 -07:00
|
|
|
See also @.autorepeat_initial_timeout.set.
|
|
|
|
]]
|
|
|
|
set {
|
2014-03-19 23:40:43 -07:00
|
|
|
}
|
|
|
|
get {
|
|
|
|
}
|
|
|
|
values {
|
2015-07-16 07:13:27 -07:00
|
|
|
t: double; [[Interval in seconds]]
|
2014-03-19 23:40:43 -07:00
|
|
|
}
|
|
|
|
}
|
2015-05-07 09:32:53 -07:00
|
|
|
@property autorepeat {
|
2016-04-27 08:34:31 -07:00
|
|
|
[[Turn on/off the autorepeat event generated when the button is kept pressed
|
2014-03-19 23:40:43 -07:00
|
|
|
|
2016-04-27 08:34:31 -07:00
|
|
|
When off, no autorepeat is performed and buttons emit a normal $clicked
|
|
|
|
signal when they are clicked.
|
2014-03-19 23:40:43 -07:00
|
|
|
|
2016-04-27 08:34:31 -07:00
|
|
|
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 @.autorepeat_initial_timeout.set, and the
|
|
|
|
time between each new emission by @.autorepeat_gap_timeout.set.
|
|
|
|
]]
|
|
|
|
set {
|
2014-03-19 23:40:43 -07:00
|
|
|
}
|
|
|
|
get {
|
|
|
|
}
|
|
|
|
values {
|
2015-07-16 07:13:27 -07:00
|
|
|
on: bool; [[A bool to turn on/off the event]]
|
2014-03-19 23:40:43 -07:00
|
|
|
}
|
|
|
|
}
|
2015-05-07 09:32:53 -07:00
|
|
|
@property admits_autorepeat {
|
2016-04-27 08:34:31 -07:00
|
|
|
[[Whether the button supports autorepeat.]]
|
2014-03-19 23:40:43 -07:00
|
|
|
get {
|
2014-08-11 07:46:11 -07:00
|
|
|
legacy: null;
|
2014-03-19 23:40:43 -07:00
|
|
|
}
|
|
|
|
values {
|
2016-04-27 08:34:31 -07:00
|
|
|
ret: bool; [[$true if autorepeat is supported, $false otherwise]]
|
2014-03-19 23:40:43 -07:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
implements {
|
2014-06-20 02:47:39 -07:00
|
|
|
class.constructor;
|
2014-06-27 15:36:05 -07:00
|
|
|
Eo.Base.constructor;
|
2016-06-17 01:26:08 -07:00
|
|
|
Efl.Canvas.Group.group_add;
|
2015-04-22 04:33:10 -07:00
|
|
|
Elm.Widget.activate;
|
|
|
|
Elm.Widget.focus_next_manager_is;
|
|
|
|
Elm.Widget.focus_direction_manager_is;
|
|
|
|
Elm.Widget.theme_apply;
|
|
|
|
Elm.Widget.sub_object_del;
|
|
|
|
Elm.Widget.event;
|
2015-04-22 04:37:40 -07:00
|
|
|
Elm.Layout.text_aliases.get;
|
|
|
|
Elm.Layout.content_aliases.get;
|
|
|
|
Elm.Layout.sizing_eval;
|
2016-05-12 03:37:43 -07:00
|
|
|
Elm.Interface.Atspi_Widget_Action.elm_actions.get;
|
2016-05-24 04:40:18 -07:00
|
|
|
Efl.Part.part;
|
2014-03-19 23:40:43 -07:00
|
|
|
}
|
|
|
|
}
|