docs: Update Efl.Ui.Scrollbar docs

Summary: Ref T7884

Reviewers: zmike, eagleeye

Reviewed By: zmike

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T7884

Differential Revision: https://phab.enlightenment.org/D10041
This commit is contained in:
Xavi Artigas 2019-09-24 14:51:01 -04:00 committed by Mike Blumenkrantz
parent 653cf9b788
commit 036e01579c
1 changed files with 30 additions and 21 deletions

View File

@ -11,42 +11,51 @@ enum Efl.Ui.Scrollbar_Mode
interface Efl.Ui.Scrollbar interface Efl.Ui.Scrollbar
{ {
[[Interface used by widgets which can display scrollbars, enabling them to contain more content [[Interface used by widgets which can display scrollbars, enabling them to hold more content
than actually fits inside them.]] than actually visible through the viewport.
A scrollbar contains a draggable part (thumb) which allows the user to move the viewport
around the content. The size of the thumb relates to the size of the viewport compared to
the whole content.
]]
methods { methods {
@property bar_mode { @property bar_mode {
[[Scrollbar visibility policy]] [[Scrollbar visibility mode, for each of the scrollbars.]]
set { set {
} }
get { get {
} }
values { values {
hbar: Efl.Ui.Scrollbar_Mode; [[Horizontal scrollbar.]] hbar: Efl.Ui.Scrollbar_Mode(Efl.Ui.Scrollbar_Mode.auto); [[Horizontal scrollbar mode.]]
vbar: Efl.Ui.Scrollbar_Mode; [[Vertical scrollbar.]] vbar: Efl.Ui.Scrollbar_Mode(Efl.Ui.Scrollbar_Mode.auto); [[Vertical scrollbar mode.]]
} }
} }
@property bar_size { @property bar_size {
[[Scrollbar size. [[This returns the relative size the thumb should have, given the current size of the viewport and
It is calculated based on viewport size-content sizes. the content.
]] // TODO: This needs more details. What does 1.0 mean? $[0.0] means the viewport is much smaller than the content: the thumb will have its minimum size.
$[1.0] means the viewport has the same size as the content (or bigger): the thumb will have the same
size as the scrollbar and cannot move.
]]
get { get {
} }
values { values {
width: double; [[Value between 0.0 and 1.0.]] width: double; [[Value between $[0.0] and $[1.0].]]
height: double; [[Value between 0.0 and 1.0.]] height: double; [[Value between $[0.0] and $[1.0].]]
} }
} }
@property bar_position { @property bar_position {
[[Scrollbar position. [[Position of the thumb (the draggable zone) inside the scrollbar.
It is calculated based on current position-maximum positions. It is calculated based on current position of the viewport inside the total content.
]] ]]
set { set {
} }
get { get {
} }
values { values {
posx: double; [[Value between 0.0 and 1.0.]] posx: double; [[Value between $[0.0] (the left side of the thumb is touching the left edge of the widget)
posy: double; [[Value between 0.0 and 1.0.]] and $[1.0] (the right side of the thumb is touching the right edge of the widget).]]
posy: double; [[Value between $[0.0] (the top side of the thumb is touching the top edge of the widget)
and $[1.0] (the bottom side of the thumb is touching the bottom edge of the widget).]]
} }
} }
bar_visibility_update @protected @beta{ bar_visibility_update @protected @beta{
@ -58,12 +67,12 @@ interface Efl.Ui.Scrollbar
} }
} }
events { events {
bar,pressed: Efl.Ui.Layout_Orientation; [[Called when bar is pressed.]] bar,pressed: Efl.Ui.Layout_Orientation; [[Emitted when thumb is pressed.]]
bar,unpressed: Efl.Ui.Layout_Orientation; [[Called when bar is unpressed.]] bar,unpressed: Efl.Ui.Layout_Orientation; [[Emitted when thumb is unpressed.]]
bar,dragged: Efl.Ui.Layout_Orientation; [[Called when bar is dragged.]] bar,dragged: Efl.Ui.Layout_Orientation; [[Emitted when thumb is dragged.]]
bar,size,changed: void; [[Called when bar size is changed.]] bar,size,changed: void; [[Emitted when thumb size has changed.]]
bar,pos,changed: void; [[Called when bar position is changed.]] bar,pos,changed: void; [[Emitted when thumb position has changed.]]
bar,show: Efl.Ui.Layout_Orientation; [[Callend when bar is shown.]] bar,show: Efl.Ui.Layout_Orientation; [[Emitted when scrollbar is shown.]]
bar,hide: Efl.Ui.Layout_Orientation; [[Called when bar is hidden.]] bar,hide: Efl.Ui.Layout_Orientation; [[Emitted when scrollbar is hidden.]]
} }
} }