Table Of Contents

Previous topic

bubble Module

Next topic

calendar_elm Module

button Module

Widget description

../_images/button-preview.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 emits the following signals, besides the ones sent from LayoutClass:

  • clicked: the user clicked the button (press/release).
  • repeated: the user pressed the button without releasing it.
  • pressed: button was pressed.
  • unpressed: button was released after being pressed.
  • focused : When the button has received focus. (since 1.8)
  • unfocused : When the button has lost focus. (since 1.8)

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

  • default: a normal button.

  • anchor: Like default, but the button fades away when the mouse is not

    over it, leaving only the text or icon.

  • hoversel_vertical: Internally used by

    Hoversel to give a continuous look across its options.

  • hoversel_vertical_entry: Another internal for

    Hoversel.

  • naviframe: Internally used by

    Naviframe for its back button.

  • colorselector: Internally used by

    Colorselector for its left and right buttons.

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

  • “icon” - An icon of the button

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

  • “default” - Label of the button
class efl.elementary.button.Button

Bases: efl.elementary.layout_class.LayoutClass

This is the class that actually implements the widget.

autorepeat

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 autorepeat_initial_timeout, and the time between each new emission by autorepeat_gap_timeout.

Type :bool
autorepeat_gap_timeout

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.

Type :float
autorepeat_initial_timeout

The initial timeout before the autorepeat event is generated

Reflects 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.

Type :float
callback_clicked_add()

The user clicked the button (press/release).

callback_focused_add()

When the button has received focus.

New in version 1.8.

callback_pressed_add()

The button was pressed.

callback_repeated_add()

The user pressed the button without releasing it.

callback_unfocused_add()

When the button has lost focus.

New in version 1.8.

callback_unpressed_add()

The button was released after being pressed.