summaryrefslogtreecommitdiff
path: root/doc/elementary/diskselector.rst
blob: 76ec557bb8830df089f8d91657423ab92c2a7353 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
.. currentmodule:: efl.elementary

Diskselector
############

.. image:: /images/diskselector-preview.png


Widget description
==================

A diskselector is a kind of list widget. It scrolls horizontally,
and can contain label and icon objects. Three items are displayed
with the selected one in the middle.

It can act like a circular list with round mode and labels can be
reduced for a defined length for side items.


Emitted signals
===============

- ``selected`` - when item is selected, i.e. scroller stops.
- ``clicked`` - This is called when a user clicks an item
- ``scroll,anim,start`` - scrolling animation has started
- ``scroll,anim,stop`` - scrolling animation has stopped
- ``scroll,drag,start`` - dragging the diskselector has started
- ``scroll,drag,stop`` - dragging the diskselector has stopped
- ``focused`` - When the diskselector has received focus. (since 1.8)
- ``unfocused`` - When the diskselector has lost focus. (since 1.8)

.. note:: The ``scroll,anim,*`` and ``scroll,drag,*`` signals are only emitted
          by user intervention.

Layout content parts
====================

- ``icon`` - An icon in the diskselector item


Layout text parts
=================

- ``default`` - Label of the diskselector item


Scrollable Interface
====================

This widget supports the scrollable interface.

If you wish to control the scrolling behaviour using these functions,
inherit both the widget class and the
:py:class:`~efl.elementary.scroller.Scrollable` class
using multiple inheritance, for example::

    class ScrollableGenlist(Genlist, Scrollable):
        def __init__(self, canvas, *args, **kwargs):
            Genlist.__init__(self, canvas)


Inheritance diagram
===================

.. inheritance-diagram::
    Diskselector
    DiskselectorItem
    :parts: 2


.. autoclass:: Diskselector
.. autoclass:: DiskselectorItem