72 lines
3.7 KiB
Plaintext
72 lines
3.7 KiB
Plaintext
abstract @beta Efl.Ui.Spotlight.Manager extends Efl.Object {
|
|
[[Manager object used by @Efl.Ui.Spotlight.Container to handle rendering and animation of its sub-widgets, and user interaction.
|
|
|
|
For instance, changes to the current sub-widget in the spotlight (@Efl.Ui.Spotlight.Container.active_index) can be 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).
|
|
Such user interactions should end up setting a new @Efl.Ui.Spotlight.Container.active_index.
|
|
During a transition, the evolution of the current position should be exposed by emitting $pos_update events.
|
|
]]
|
|
methods {
|
|
bind @pure_virtual {
|
|
[[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.
|
|
]]
|
|
params {
|
|
spotlight : Efl.Ui.Spotlight.Container; [[The container to bind the manager to.]]
|
|
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.]]
|
|
}
|
|
}
|
|
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.Spotlight.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.Spotlight.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.]]
|
|
}
|
|
}
|
|
switch_to @pure_virtual {
|
|
[[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.
|
|
]]
|
|
params {
|
|
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.]]
|
|
}
|
|
}
|
|
@property size @pure_virtual {
|
|
[[Will be called whenever the @Efl.Ui.Spotlight.Container.spotlight_size changes so the @Efl.Ui.Spotlight.Manager can update itself.]]
|
|
set {
|
|
}
|
|
values {
|
|
size : Eina.Size2D; [[The new size of the sub-widgets.]]
|
|
}
|
|
}
|
|
@property animation_enabled @pure_virtual {
|
|
[[This flag can be used to disable animations.]]
|
|
values {
|
|
enable : bool; [[$true if you want animations to happen, $false otherwise.]]
|
|
}
|
|
}
|
|
}
|
|
events {
|
|
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.]]
|
|
}
|
|
}
|