summaryrefslogtreecommitdiff
path: root/doc/elementary/slideshow.rst
blob: 39b9a02389261f49c47dc0d9cd834f6823fab0d5 (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
73
74
75
76
.. currentmodule:: efl.elementary

Slideshow
#########

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


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

This widget, as the name indicates, is a pre-made image
slideshow panel, with API functions acting on (child) image
items presentation. Between those actions, are:

- advance to next/previous image
- select the style of image transition animation
- set the exhibition time for each image
- start/stop the slideshow

The transition animations are defined in the widget's theme,
consequently new animations can be added without having to
update the widget's code.

Slideshow items
===============

For slideshow items, just like for :py:class:`~efl.elementary.genlist.Genlist`
ones, the user defines a **classes**, specifying functions that will be called
on the item's creation and deletion times.

The :py:class:`SlideshowItemClass` class contains the following
members:

- ``get`` - When an item is displayed, this function is
  called, and it's where one should create the item object, de
  facto. For example, the object can be a pure Evas image object
  or a :py:class:`~efl.elementary.photocam.Photocam` widget.

- ``delete`` - When an item is no more displayed, this function
  is called, where the user must delete any data associated to
  the item.

Slideshow caching
=================

The slideshow provides facilities to have items adjacent to the
one being displayed **already "realized"** (i.e. loaded) for
you, so that the system does not have to decode image data
anymore at the time it has to actually switch images on its
viewport. The user is able to set the numbers of items to be
cached **before** and **after** the current item, in the widget's
item list.


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

- ``changed`` - when the slideshow switches its view to a new item.
  event_info parameter in callback contains the current visible item
- ``transition,end`` - when a slide transition ends. event_info
  parameter in callback contains the current visible item
- ``focused`` - When the slideshow has received focus. (since 1.8)
- ``unfocused`` - When the slideshow has lost focus. (since 1.8)


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

.. inheritance-diagram:: Slideshow
    :parts: 2


.. autoclass:: Slideshow
.. autoclass:: SlideshowItem
.. autoclass:: SlideshowItemClass