2019-07-04 16:02:43 -07:00
|
|
|
abstract @beta Efl.Ui.Spotlight.Manager extends Efl.Object {
|
2019-09-02 07:24:26 -07:00
|
|
|
[[Manager object used by @Efl.Ui.Spotlight.Container to handle rendering and animation of its sub-widgets,
|
|
|
|
and user interaction.
|
2019-04-28 03:28:55 -07:00
|
|
|
|
efl_ui_spotlight: migrate from active_index to active_element
after playing arround with the widget, we found out that it feels quite
weird to have a index, where most of the time you work with widgets.
We might want to add syntax suger in the future to make it easier to
just jump to the next element, or to the previous, but that still is to
be decided.
The event and the communication to the spotlight manager are still left
to be used with the index, reason for this is, that we might need to
fill there an invalid pointer, if a deletion is triggering an animation,
which seems quite weird. That needs further discussing.
Docx have been updated, the sitemarks about the shifting of the
active_index can be removed, as the element is not subject of change
during content adds/deletes.
ref T7991
Reviewed-by: Jaehyun Cho <jae_hyun.cho@samsung.com>
Differential Revision: https://phab.enlightenment.org/D9813
2019-09-02 01:26:40 -07:00
|
|
|
For instance, changes to the current sub-widget in the spotlight (@Efl.Ui.Spotlight.Container.active_element) can be
|
2019-09-02 07:24:26 -07:00
|
|
|
animated with a transition.
|
|
|
|
This object can also handle user interaction. For example, dragging the sub-widget to one side to get to a
|
|
|
|
different sub-widget (like an smartphone home screen).
|
efl_ui_spotlight: migrate from active_index to active_element
after playing arround with the widget, we found out that it feels quite
weird to have a index, where most of the time you work with widgets.
We might want to add syntax suger in the future to make it easier to
just jump to the next element, or to the previous, but that still is to
be decided.
The event and the communication to the spotlight manager are still left
to be used with the index, reason for this is, that we might need to
fill there an invalid pointer, if a deletion is triggering an animation,
which seems quite weird. That needs further discussing.
Docx have been updated, the sitemarks about the shifting of the
active_index can be removed, as the element is not subject of change
during content adds/deletes.
ref T7991
Reviewed-by: Jaehyun Cho <jae_hyun.cho@samsung.com>
Differential Revision: https://phab.enlightenment.org/D9813
2019-09-02 01:26:40 -07:00
|
|
|
Such user interactions should end up setting a new @Efl.Ui.Spotlight.Container.active_element.
|
2019-05-29 08:35:19 -07:00
|
|
|
During a transition, the evolution of the current position should be exposed by emitting $pos_update events.
|
2019-04-28 03:28:55 -07:00
|
|
|
]]
|
|
|
|
methods {
|
|
|
|
bind @pure_virtual {
|
2019-09-02 07:24:26 -07:00
|
|
|
[[This method is called the first time an @Efl.Ui.Spotlight.Manager is assigned to an
|
|
|
|
@Efl.Ui.Spotlight.Container, binding them together.
|
|
|
|
The manager can read the current content of the container, subscribe to events, or do any initialization it
|
|
|
|
requires.
|
2019-05-29 08:35:19 -07:00
|
|
|
]]
|
2019-04-28 03:28:55 -07:00
|
|
|
params {
|
2019-07-04 16:02:43 -07:00
|
|
|
spotlight : Efl.Ui.Spotlight.Container; [[The container to bind the manager to.]]
|
2019-09-02 07:24:26 -07:00
|
|
|
group : Efl.Canvas.Group; [[The graphical group where the views should be added with
|
|
|
|
@Efl.Canvas.Group.group_member_add and removed with
|
|
|
|
@Efl.Canvas.Group.group_member_remove.]]
|
2019-04-28 03:28:55 -07:00
|
|
|
}
|
|
|
|
}
|
|
|
|
content_add @pure_virtual {
|
efl_ui_spotlight: migrate from active_index to active_element
after playing arround with the widget, we found out that it feels quite
weird to have a index, where most of the time you work with widgets.
We might want to add syntax suger in the future to make it easier to
just jump to the next element, or to the previous, but that still is to
be decided.
The event and the communication to the spotlight manager are still left
to be used with the index, reason for this is, that we might need to
fill there an invalid pointer, if a deletion is triggering an animation,
which seems quite weird. That needs further discussing.
Docx have been updated, the sitemarks about the shifting of the
active_index can be removed, as the element is not subject of change
during content adds/deletes.
ref T7991
Reviewed-by: Jaehyun Cho <jae_hyun.cho@samsung.com>
Differential Revision: https://phab.enlightenment.org/D9813
2019-09-02 01:26:40 -07:00
|
|
|
[[A $subobj has been added at position $index in the bound container.]]
|
2019-04-28 03:28:55 -07:00
|
|
|
params {
|
2019-05-29 08:35:19 -07:00
|
|
|
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.]]
|
2019-04-28 03:28:55 -07:00
|
|
|
}
|
|
|
|
}
|
|
|
|
content_del @pure_virtual {
|
efl_ui_spotlight: migrate from active_index to active_element
after playing arround with the widget, we found out that it feels quite
weird to have a index, where most of the time you work with widgets.
We might want to add syntax suger in the future to make it easier to
just jump to the next element, or to the previous, but that still is to
be decided.
The event and the communication to the spotlight manager are still left
to be used with the index, reason for this is, that we might need to
fill there an invalid pointer, if a deletion is triggering an animation,
which seems quite weird. That needs further discussing.
Docx have been updated, the sitemarks about the shifting of the
active_index can be removed, as the element is not subject of change
during content adds/deletes.
ref T7991
Reviewed-by: Jaehyun Cho <jae_hyun.cho@samsung.com>
Differential Revision: https://phab.enlightenment.org/D9813
2019-09-02 01:26:40 -07:00
|
|
|
[[The $subobj at position $index in the bound container has been removed.]]
|
2019-04-28 03:28:55 -07:00
|
|
|
params {
|
2019-05-29 08:35:19 -07:00
|
|
|
subobj : Efl.Gfx.Entity; [[The object being removed from the container.]]
|
|
|
|
index : int; [[The index this object had in the container's list.]]
|
2019-04-28 03:28:55 -07:00
|
|
|
}
|
|
|
|
}
|
|
|
|
switch_to @pure_virtual {
|
2019-07-04 16:02:43 -07:00
|
|
|
[[Switch from one sub-widget to another. If there was no previous sub-widget, $from might be -1.
|
|
|
|
This function should display an animation if the @Efl.Ui.Spotlight.Manager supports them.
|
2019-04-28 03:28:55 -07:00
|
|
|
]]
|
|
|
|
params {
|
2019-07-04 16:02:43 -07:00
|
|
|
from : int; [[Index of the starting sub-widget in the container's list. Might be -1 if unknown.]]
|
|
|
|
to : int; [[Index of the target sub-widget in the container's list.]]
|
2019-04-28 03:28:55 -07:00
|
|
|
}
|
|
|
|
}
|
2019-07-04 16:02:43 -07:00
|
|
|
@property size @pure_virtual {
|
2019-09-02 07:24:26 -07:00
|
|
|
[[Will be called whenever the @Efl.Ui.Spotlight.Container.spotlight_size changes so the
|
|
|
|
@Efl.Ui.Spotlight.Manager can update itself.]]
|
2019-04-28 03:28:55 -07:00
|
|
|
set {
|
|
|
|
}
|
|
|
|
values {
|
2019-07-04 16:02:43 -07:00
|
|
|
size : Eina.Size2D; [[The new size of the sub-widgets.]]
|
2019-04-28 03:28:55 -07:00
|
|
|
}
|
|
|
|
}
|
|
|
|
@property animation_enabled @pure_virtual {
|
2019-05-29 08:35:19 -07:00
|
|
|
[[This flag can be used to disable animations.]]
|
2019-04-28 03:28:55 -07:00
|
|
|
values {
|
2019-05-29 08:35:19 -07:00
|
|
|
enable : bool; [[$true if you want animations to happen, $false otherwise.]]
|
2019-04-28 03:28:55 -07:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
events {
|
2019-09-02 07:24:26 -07:00
|
|
|
pos_update : double; [[Index of the sub-widget currently being displayed. Fractional values indicate a position
|
|
|
|
in-between sub-widgets. For instance, when transitioning from sub-widget 2 to sub-widget 3,
|
|
|
|
this event should be emitted with monotonically increasing values ranging from 2.0 to 3.0.
|
|
|
|
Animations can perform any movement they want, but the reported $pos_update must move in
|
|
|
|
the same direction.]]
|
2019-04-28 03:28:55 -07:00
|
|
|
}
|
|
|
|
}
|