2019-02-14 08:37:02 -08:00
|
|
|
class @beta Efl.Ui.Pan extends Efl.Canvas.Group implements Efl.Content
|
2017-12-18 04:08:25 -08:00
|
|
|
{
|
2019-07-30 03:09:53 -07:00
|
|
|
[[Pan widget class.
|
|
|
|
|
|
|
|
This widget positions its contents (set using @Efl.Content.content) relative to the widget itself.
|
|
|
|
This is particularly useful for large content which does not fit inside its container. In this case
|
|
|
|
only a portion is shown.
|
|
|
|
|
|
|
|
The position of this "window" into the content can be changed using @Efl.Ui.Pan.pan_position.
|
|
|
|
This widget does not provide means for a user to change the content's position (like scroll bars).
|
2019-09-02 07:24:26 -07:00
|
|
|
This widget is meant to be used internally by other classes like @Efl.Ui.Scroll.Manager.
|
2019-07-30 03:09:53 -07:00
|
|
|
]]
|
2017-12-18 04:08:25 -08:00
|
|
|
methods {
|
|
|
|
@property pan_position {
|
2019-07-30 03:09:53 -07:00
|
|
|
[[Position of the content inside the Pan widget.
|
|
|
|
|
|
|
|
Setting the position to @Efl.Ui.Pan.pan_position_min makes the upper left corner of the content visible.
|
|
|
|
Setting the position to @Efl.Ui.Pan.pan_position_max makes the lower right corner of the content visible.
|
|
|
|
Values outside this range are valid and make the background show.
|
|
|
|
]]
|
2017-12-18 04:08:25 -08:00
|
|
|
values {
|
2019-07-30 03:09:53 -07:00
|
|
|
position: Eina.Position2D; [[Content position.]]
|
2017-12-18 04:08:25 -08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
@property content_size {
|
2019-07-30 03:09:53 -07:00
|
|
|
[[Size of the content currently set through @Efl.Content.content.
|
|
|
|
This is a convenience proxy.
|
|
|
|
]]
|
2017-12-18 04:08:25 -08:00
|
|
|
get {
|
|
|
|
}
|
|
|
|
values {
|
2019-07-30 03:09:53 -07:00
|
|
|
size: Eina.Size2D; [[The size of the content.]]
|
2017-12-18 04:08:25 -08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
@property pan_position_min {
|
2019-07-30 03:09:53 -07:00
|
|
|
[[Position you can set to @Efl.Ui.Pan.pan_position so that the content's upper left corner is visible.
|
|
|
|
Always (0, 0).
|
|
|
|
]]
|
2017-12-18 04:08:25 -08:00
|
|
|
get {
|
|
|
|
}
|
|
|
|
values {
|
2019-07-30 03:09:53 -07:00
|
|
|
pos: Eina.Position2D; [[Content's upper left corner position.]]
|
2017-12-18 04:08:25 -08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
@property pan_position_max {
|
2019-07-30 03:09:53 -07:00
|
|
|
[[Position you can set to @Efl.Ui.Pan.pan_position so that the content's lower right corner is visible.
|
|
|
|
It depends both on the content's size and this widget's size.
|
|
|
|
]]
|
2017-12-18 04:08:25 -08:00
|
|
|
get {
|
|
|
|
}
|
|
|
|
values {
|
2019-07-30 03:09:53 -07:00
|
|
|
pos: Eina.Position2D; [[Content's lower right corner position.]]
|
2017-12-18 04:08:25 -08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
implements {
|
|
|
|
Efl.Object.constructor;
|
|
|
|
Efl.Object.destructor;
|
2018-04-05 01:47:26 -07:00
|
|
|
Efl.Gfx.Entity.visible { set; }
|
|
|
|
Efl.Gfx.Entity.position { set; }
|
|
|
|
Efl.Gfx.Entity.size { set; }
|
2019-01-24 05:09:42 -08:00
|
|
|
Efl.Content.content { set; get; }
|
|
|
|
Efl.Content.content_unset;
|
2017-12-18 04:08:25 -08:00
|
|
|
Efl.Canvas.Group.group_calculate;
|
|
|
|
}
|
|
|
|
events {
|
2019-09-02 07:24:26 -07:00
|
|
|
pan,content_position,changed: Eina.Position2D; [[The content's position has changed, its position in the event
|
|
|
|
is the new position.]]
|
|
|
|
pan,content_size,changed: Eina.Size2D; [[The content's size has changed, its size in the event is the new size.]]
|
2017-12-18 04:08:25 -08:00
|
|
|
}
|
|
|
|
}
|