summaryrefslogtreecommitdiff
path: root/src/lib/elementary/efl_ui_active_view_indicator.eo
blob: 687595106b8d2e6956799f294328b9a548da84e8 (plain)
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
abstract @beta Efl.Ui.Active_View.Indicator extends Efl.Object {
  [[Object used by @Efl.Ui.Active_View.Container to render an indication of the active view's position among
    the rest of the container's views.
    
    An example would be Android's little dots in the home screen.
  ]]
  methods {
    bind @pure_virtual {
      [[This method is called the first time an @Efl.Ui.Active_View.Indicator is assigned to an @Efl.Ui.Active_View.Container, binding them together.

        This call can be used to setup the indicator part of the $active_view.

        The Active View of the container (if there is any) will be informed to the indicator by a later call to @.position_update.
      ]]
      params {
        active_view : Efl.Ui.Active_View.Container; [[The container to bind this indicator to.]]
      }
    }
    content_add @pure_virtual  {
      [[A $subobj has been added at position $index in the bound container.

        The manager should check the container's @Efl.Ui.Active_View.Container.active_index since indices might have
        shifted due to the insertion of the new object.
      ]]
      params {
        subobj : Efl.Gfx.Entity; [[The new object that has been added to the container.]]
        index : int; [[The index of the new object in the container's list.]]
      }
    }
    content_del @pure_virtual  {
      [[The $subobj at position $index in the bound container has been removed.

        The manager should check the container's @Efl.Ui.Active_View.Container.active_index since indices might have
        shifted due to the removal of the object.
      ]]
      params {
        subobj : Efl.Gfx.Entity; [[The object being removed from the container.]]
        index : int; [[The index this object had in the container's list.]]
      }
    }
    position_update @pure_virtual {
      [[This method tells the indicator that @Efl.Ui.Active_View.Container.active_index has changed in the bound container.

        $position ranges from -1 to the number of views in the bound container (@Efl.Container.content_count).
        Notice this allows moving to a position before the first view or past the last view, which might happen if the view
        is thumb-scrolled out-of-bounds. Indicators can choose to render these out-of-bounds positions or not.

        Fractional values indicate positions in-between two views and should be respected to obtain a smooth transition.
      ]]
      params {
        position : double; [[The index of the active view, or a value in-between views if a transition is currently playing.]]
      }
    }
  }
}