diff options
author | Marcel Hollerbach <mail@marcel-hollerbach.de> | 2019-07-29 13:56:27 +0000 |
---|---|---|
committer | Marcel Hollerbach <mail@marcel-hollerbach.de> | 2019-07-29 16:32:06 +0200 |
commit | 0ab05a82716a8c5ed23e953987c33f57e3655be9 (patch) | |
tree | ea38a89b769ca57a84aed34a8a162160b44edb45 /src/lib | |
parent | 44a45e3acadb61235e5230d2ff38b967b99e7a39 (diff) |
efl_ui_item: try to improve docs
its everything but perfect, but a start ...
Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D9424
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/elementary/efl_ui_item.eo | 43 |
1 files changed, 32 insertions, 11 deletions
diff --git a/src/lib/elementary/efl_ui_item.eo b/src/lib/elementary/efl_ui_item.eo index a97ec30568..aa760046f1 100644 --- a/src/lib/elementary/efl_ui_item.eo +++ b/src/lib/elementary/efl_ui_item.eo | |||
@@ -1,27 +1,50 @@ | |||
1 | abstract @beta Efl.Ui.Item extends Efl.Ui.Layout_Base implements Efl.Ui.Selectable, Efl.Input.Clickable | 1 | abstract @beta Efl.Ui.Item extends Efl.Ui.Layout_Base implements Efl.Ui.Selectable, Efl.Input.Clickable |
2 | { | 2 | { |
3 | [[Item abstract class for pack widget. All item have to be inherited from this class.]] | 3 | [[Selectable Item abstraction. |
4 | |||
5 | This class serves as the basis to create widgets acting as selectable items inside containers | ||
6 | like @Efl.Ui.List or @Efl.Ui.Grid, for example. | ||
7 | @Efl.Ui.Item provides user interaction through the @Efl.Input.Clickable mixin. | ||
8 | Items can be pressed, long-pressed, etc, and appropriate events are generated. | ||
9 | @Efl.Ui.Item also implements the @Efl.Ui.Selectable interface, meaning that "selected" and | ||
10 | "unselected" events are automatically generated. | ||
11 | |||
12 | Classes inheriting from this one only need to deal with the visual representation of the widget. | ||
13 | See for example @Efl.Ui.Grid_Default_Item and @Efl.Ui.List_Default_Item. | ||
14 | |||
15 | Some events are converted to edje signals so the theme can react to them: | ||
16 | @[Efl.Input.Clickable.pressed] -> "efl,state,pressed", | ||
17 | @[Efl.Input.Clickable.unpressed] -> "efl,state,unpressed", | ||
18 | @[Efl.Ui.Selectable.item,selected] -> "efl,state,selected", | ||
19 | @[Efl.Ui.Selectable.item,unselected] -> "efl,state,unselected". | ||
20 | ]] | ||
4 | methods { | 21 | methods { |
5 | @property index { | 22 | @property index { |
6 | [[index number of item from their parent object.]] | 23 | [[The index of this item inside its container. |
24 | |||
25 | The container must be set through the @Efl.Ui.Item.container property.]] | ||
7 | get {} | 26 | get {} |
8 | values { | 27 | values { |
9 | index : int; | 28 | index : int; [[The index where to find this item in its $container.]] |
10 | } | 29 | } |
11 | } | 30 | } |
12 | @property selected { | 31 | @property selected { |
13 | [[Select property for item object. | 32 | [[Item selected state. |
14 | Item can be selected by user mouse/key input also]] | 33 | |
15 | set {} | 34 | The visual representation of the item will be adjusted accordingly to the new state. |
16 | get {} | 35 | This property is also automatically modified in response to user actions. |
36 | ]] | ||
17 | values { | 37 | values { |
18 | select: bool; | 38 | select: bool; [[Whether this item is selected or not.]] |
19 | } | 39 | } |
20 | } | 40 | } |
21 | @property container { | 41 | @property container { |
22 | [[The container this object is part of. | 42 | [[The container this object is part of. |
23 | 43 | ||
24 | You should never use this property yourself, the container will set it. Unsetting this while the item is packed into a container does not have an impact on its state in the container. | 44 | You should never use this property directly, the container will set it when the |
45 | item is added. | ||
46 | Unsetting this while the item is packed inside a container does not remove the item | ||
47 | from the container. | ||
25 | ]] | 48 | ]] |
26 | values { | 49 | values { |
27 | container : Efl.Ui.Widget; [[The container this item is in.]] | 50 | container : Efl.Ui.Widget; [[The container this item is in.]] |
@@ -29,11 +52,9 @@ abstract @beta Efl.Ui.Item extends Efl.Ui.Layout_Base implements Efl.Ui.Selectab | |||
29 | } | 52 | } |
30 | } | 53 | } |
31 | implements { | 54 | implements { |
32 | //Efl.Object | ||
33 | Efl.Object.constructor; | 55 | Efl.Object.constructor; |
34 | Efl.Object.finalize; | 56 | Efl.Object.finalize; |
35 | Efl.Object.destructor; | 57 | Efl.Object.destructor; |
36 | //Efl.Canvas | ||
37 | Efl.Canvas.Group.group_calculate; | 58 | Efl.Canvas.Group.group_calculate; |
38 | } | 59 | } |
39 | } | 60 | } |