110 lines
3.2 KiB
Plaintext
110 lines
3.2 KiB
Plaintext
enum @beta Efl.Ui.Pager_Loop
|
|
{
|
|
[[Efl ui pager loop mode]]
|
|
disabled,
|
|
enabled
|
|
}
|
|
|
|
class @beta Efl.Ui.Pager extends Efl.Ui.Layout_Base implements Efl.Pack_Linear
|
|
{
|
|
[[Pager widget
|
|
|
|
A pager contains many pages in a linear fashion and allows users to scroll
|
|
through pages. Each page is numbered according to linear order and
|
|
one of the pages is marked as 'current page' and displayed in the middle.
|
|
The way each page is displayed is defined by @Efl.Page.Transition object,
|
|
allowing users to adopt different types of transition.
|
|
The most common use case of this widget is the home screen of mobile devices.
|
|
]]
|
|
methods {
|
|
@property transition {
|
|
[[Page transition effect
|
|
|
|
Page transition is in charge of displaying pages in a specific way and
|
|
invoked every time page layout needs to be updated.
|
|
]]
|
|
set {
|
|
[[Set a page transition effect]]
|
|
}
|
|
values {
|
|
transition: Efl.Page.Transition @nullable; [[transition effect]]
|
|
}
|
|
}
|
|
@property indicator {
|
|
[[Page indicator
|
|
|
|
Page indicator, located on the top layer of pager widget, helps users
|
|
to know the number of pages and the current page's index without scrolling.
|
|
]]
|
|
set {
|
|
[[Set a page indicator]]
|
|
}
|
|
values {
|
|
indicator: Efl.Page.Indicator @nullable; [[indicator class]]
|
|
}
|
|
}
|
|
@property current_page {
|
|
[[One page is selected as the current page and mainly displayed.]]
|
|
set {
|
|
[[Set one page as current page]]
|
|
}
|
|
get {
|
|
[[Get the current page]]
|
|
}
|
|
values {
|
|
index: int;
|
|
}
|
|
}
|
|
@property scroll_block {
|
|
[[Pages can be scrolled back and forth by default. This property allows
|
|
limiting the direction of scrolling, or blocking scroll gesture at all.
|
|
]]
|
|
values {
|
|
prev: bool;
|
|
next: bool;
|
|
}
|
|
}
|
|
@property loop_mode {
|
|
[[Pager is not scrolled after it's scrolled to the end by default.
|
|
This property gives the option to make a loop through pages.
|
|
]]
|
|
set {
|
|
return: bool; [[$true on success, $false otherwise]]
|
|
}
|
|
get {
|
|
}
|
|
values {
|
|
loop: Efl.Ui.Pager_Loop;
|
|
}
|
|
}
|
|
@property page_size {
|
|
values {
|
|
size: Eina.Size2D;
|
|
}
|
|
}
|
|
@property padding {
|
|
values {
|
|
padding: int;
|
|
}
|
|
}
|
|
}
|
|
implements {
|
|
Efl.Object.constructor;
|
|
Efl.Object.invalidate;
|
|
Efl.Container.content_count;
|
|
Efl.Container.content_iterate;
|
|
Efl.Pack.pack_clear; //TODO
|
|
Efl.Pack.unpack_all; //TODO
|
|
Efl.Pack.unpack; //TODO
|
|
Efl.Pack.pack;
|
|
Efl.Pack_Linear.pack_begin;
|
|
Efl.Pack_Linear.pack_end;
|
|
Efl.Pack_Linear.pack_before;
|
|
Efl.Pack_Linear.pack_after;
|
|
Efl.Pack_Linear.pack_at;
|
|
Efl.Pack_Linear.pack_content_get;
|
|
Efl.Pack_Linear.pack_index_get;
|
|
Efl.Pack_Linear.pack_unpack_at; //TODO
|
|
}
|
|
}
|