summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Hacohen <tom@stosb.com>2015-07-31 15:19:33 +0100
committerTom Hacohen <tom@stosb.com>2015-07-31 15:38:18 +0100
commite851249db79d8c3a88876ba7e7824c34ade1e640 (patch)
treea0238ee2ef6dc6de1e681e668cdc0e72d200808a
parenta4ab05aadd17d988a214956aab4487ca8201a4aa (diff)
Evas table: Migrate docs to new Eolian format.
-rw-r--r--src/lib/evas/canvas/evas_table.eo231
1 files changed, 96 insertions, 135 deletions
diff --git a/src/lib/evas/canvas/evas_table.eo b/src/lib/evas/canvas/evas_table.eo
index d9f9142e3e..a4019705b1 100644
--- a/src/lib/evas/canvas/evas_table.eo
+++ b/src/lib/evas/canvas/evas_table.eo
@@ -1,12 +1,8 @@
1/* XXX: Remove the Object_ part once the relevant Eolian bugs are fixed. */ 1/* XXX: Remove the Object_ part once the relevant Eolian bugs are fixed. */
2enum Evas.Object_Table.Homogeneous_Mode { 2enum Evas.Object_Table.Homogeneous_Mode {
3 /** 3 [[How to pack items into cells in a table.
4 * How to pack items into cells in a table. 4
5 * @ingroup Evas_Object_Table 5 See @Evas.Table.homogeneous for an explanation of the function of each one.]]
6 *
7 * @see evas_object_table_homogeneous_set() for an explanation of the function of
8 * each one.
9 */
10 legacy: Evas_Object_Table_Homogeneous; 6 legacy: Evas_Object_Table_Homogeneous;
11 none = 0, 7 none = 0,
12 table = 1, 8 table = 1,
@@ -19,67 +15,59 @@ class Evas.Table (Evas.Smart_Clipped)
19 eo_prefix: evas_obj_table; 15 eo_prefix: evas_obj_table;
20 methods { 16 methods {
21 @property homogeneous { 17 @property homogeneous {
18 [[Set how this table should layout children.
19
20 Todo: consider aspect hint and respect it.
21
22 @Evas.Object_Table.Homogeneous_Mode.none
23 If table does not use homogeneous mode then columns and rows will
24 be calculated based on hints of individual cells. This operation
25 mode is more flexible, but more complex and heavy to calculate as
26 well. Weight properties are handled as a boolean expand. Negative
27 alignment will be considered as 0.5. This is the default.
28
29 Todo: @Evas.Object_Table.Homogeneous_Mode.none should balance weight.
30
31 @Evas.Object_Table.Homogeneous_Mode.table
32 When homogeneous is relative to table the own table size is divided
33 equally among children, filling the whole table area. That is, if
34 table has $WIDTH and $COLUMNS, each cell will get _WIDTH /
35 COLUMNS_ pixels. If children have minimum size that is larger
36 than this amount (including padding), then it will overflow and be
37 aligned respecting the alignment hint, possible overlapping sibling
38 cells. Weight hint is used as a boolean, if greater than zero it
39 will make the child expand in that axis, taking as much space as
40 possible (bounded to maximum size hint). Negative alignment will be
41 considered as 0.5.
42
43 @Evas.Object_Table.Homogeneous_Mode.item
44 When homogeneous is relative to item it means the greatest minimum
45 cell size will be used. That is, if no element is set to expand,
46 the table will have its contents to a minimum size, the bounding
47 box of all these children will be aligned relatively to the table
48 object using evas_object_table_align_get(). If the table area is
49 too small to hold this minimum bounding box, then the objects will
50 keep their size and the bounding box will overflow the box area,
51 still respecting the alignment. Weight hint is used as a
52 boolean, if greater than zero it will make that cell expand in that
53 axis, toggling the *expand mode*, which makes the table behave
54 much like @Evas.Object_Table.Homogeneous_Mode.table, except that the
55 bounding box will overflow and items will not overlap siblings. If
56 no minimum size is provided at all then the table will fallback to
57 expand mode as well.]]
22 set { 58 set {
23 /*@
24 @brief Set how this table should layout children.
25
26 @todo consider aspect hint and respect it.
27
28 @par EVAS_OBJECT_TABLE_HOMOGENEOUS_NONE
29 If table does not use homogeneous mode then columns and rows will
30 be calculated based on hints of individual cells. This operation
31 mode is more flexible, but more complex and heavy to calculate as
32 well. @b Weight properties are handled as a boolean expand. Negative
33 alignment will be considered as 0.5. This is the default.
34
35 @todo @c EVAS_OBJECT_TABLE_HOMOGENEOUS_NONE should balance weight.
36
37 @par EVAS_OBJECT_TABLE_HOMOGENEOUS_TABLE
38 When homogeneous is relative to table the own table size is divided
39 equally among children, filling the whole table area. That is, if
40 table has @c WIDTH and @c COLUMNS, each cell will get <tt>WIDTH /
41 COLUMNS</tt> pixels. If children have minimum size that is larger
42 than this amount (including padding), then it will overflow and be
43 aligned respecting the alignment hint, possible overlapping sibling
44 cells. @b Weight hint is used as a boolean, if greater than zero it
45 will make the child expand in that axis, taking as much space as
46 possible (bounded to maximum size hint). Negative alignment will be
47 considered as 0.5.
48
49 @par EVAS_OBJECT_TABLE_HOMOGENEOUS_ITEM
50 When homogeneous is relative to item it means the greatest minimum
51 cell size will be used. That is, if no element is set to expand,
52 the table will have its contents to a minimum size, the bounding
53 box of all these children will be aligned relatively to the table
54 object using evas_object_table_align_get(). If the table area is
55 too small to hold this minimum bounding box, then the objects will
56 keep their size and the bounding box will overflow the box area,
57 still respecting the alignment. @b Weight hint is used as a
58 boolean, if greater than zero it will make that cell expand in that
59 axis, toggling the <b>expand mode</b>, which makes the table behave
60 much like @b EVAS_OBJECT_TABLE_HOMOGENEOUS_TABLE, except that the
61 bounding box will overflow and items will not overlap siblings. If
62 no minimum size is provided at all then the table will fallback to
63 expand mode as well. */
64 } 59 }
65 get { 60 get {
66 /*@
67 Get the current layout homogeneous mode.
68
69 @see evas_object_table_homogeneous_set() */
70 } 61 }
71 values { 62 values {
72 homogeneous: Evas.Object_Table.Homogeneous_Mode; 63 homogeneous: Evas.Object_Table.Homogeneous_Mode;
73 } 64 }
74 } 65 }
75 @property align { 66 @property align {
67 [[Control the alignment of the whole bounding box of contents.]]
76 set { 68 set {
77 /*@
78 Set the alignment of the whole bounding box of contents. */
79 } 69 }
80 get { 70 get {
81 /*@
82 Get alignment of the whole bounding box of contents. */
83 } 71 }
84 values { 72 values {
85 horizontal: double; 73 horizontal: double;
@@ -87,13 +75,10 @@ class Evas.Table (Evas.Smart_Clipped)
87 } 75 }
88 } 76 }
89 @property padding { 77 @property padding {
78 [[Control the padding between cells.]]
90 set { 79 set {
91 /*@
92 Set padding between cells. */
93 } 80 }
94 get { 81 get {
95 /*@
96 Get padding between cells. */
97 } 82 }
98 values { 83 values {
99 horizontal: Evas.Coord; 84 horizontal: Evas.Coord;
@@ -101,35 +86,27 @@ class Evas.Table (Evas.Smart_Clipped)
101 } 86 }
102 } 87 }
103 @property mirrored { 88 @property mirrored {
104 set { 89 [[Control the mirrored mode of the table. In mirrored mode, the table items go
105 /*@ 90 from right to left instead of left to right. That is, 1,1 is top right, not
106 Sets the mirrored mode of the table. In mirrored mode the table items go 91 top left.
107 from right to left instead of left to right. That is, 1,1 is top right, not
108 top left.
109 92
110 @since 1.1 */ 93 @since 1.1]]
94 set {
111 } 95 }
112 get { 96 get {
113 /*@
114 Gets the mirrored mode of the table.
115
116 @return @c EINA_TRUE if it's a mirrored table, @c EINA_FALSE otherwise.
117 @since 1.1
118 @see evas_object_table_mirrored_set() */
119 } 97 }
120 values { 98 values {
121 mirrored: bool; /*@ the mirrored mode to set */ 99 mirrored: bool; [[$true if mirrored, $false otherwise]]
122 } 100 }
123 } 101 }
124 @property col_row_size { 102 @property col_row_size {
125 get { 103 get {
126 /*@ 104 [[Get the number of columns and rows this table takes.
127 Get the number of columns and rows this table takes.
128 105
129 @note columns and rows are virtual entities, one can specify a table 106 Note: columns and rows are virtual entities, one can specify a table
130 with a single object that takes 4 columns and 5 rows. The only 107 with a single object that takes 4 columns and 5 rows. The only
131 difference for a single cell table is that paddings will be 108 difference for a single cell table is that paddings will be
132 accounted proportionally. */ 109 accounted proportionally.]]
133 } 110 }
134 values { 111 values {
135 cols: int; 112 cols: int;
@@ -138,22 +115,20 @@ class Evas.Table (Evas.Smart_Clipped)
138 } 115 }
139 @property children { 116 @property children {
140 get { 117 get {
141 /*@ 118 [[Get the list of children for the table.
142 Get the list of children for the table.
143 119
144 @note This is a duplicate of the list kept by the table internally. 120 Note: This is a duplicate of the list kept by the table internally.
145 It's up to the user to destroy it when it no longer needs it. 121 It's up to the user to destroy it when it no longer needs it.
146 It's possible to remove objects from the table when walking this 122 It's possible to remove objects from the table when walking this
147 list, but these removals won't be reflected on it. */ 123 list, but these removals won't be reflected on it.]]
148 return: free(own(list<Evas.Object *> *), eina_list_free) @warn_unused; 124 return: free(own(list<Evas.Object *> *), eina_list_free) @warn_unused;
149 } 125 }
150 } 126 }
151 @property child { 127 @property child {
152 get { 128 get {
153 /*@ 129 [[Get the child of the table at the given coordinates
154 Get the child of the table at the given coordinates
155 130
156 @note This does not take into account col/row spanning*/ 131 Note: This does not take into account col/row spanning]]
157 } 132 }
158 keys { 133 keys {
159 col: ushort; 134 col: ushort;
@@ -164,91 +139,77 @@ class Evas.Table (Evas.Smart_Clipped)
164 } 139 }
165 } 140 }
166 clear { 141 clear {
167 /*@ 142 [[Faster way to remove all child objects from a table object.]]
168 Faster way to remove all child objects from a table object. */
169 143
170 params { 144 params {
171 @in clear: bool; /*@ if true, it will delete just removed children. */ 145 @in clear: bool; [[If $true, it will delete just removed children.]]
172 } 146 }
173 } 147 }
174 accessor_new @const { 148 accessor_new @const {
175 /*@ 149 [[Get an accessor to get random access to the list of children for the table.
176 Get an accessor to get random access to the list of children for the table.
177 150
178 @note Do not remove or delete objects while walking the list. */ 151 Note: Do not remove or delete objects while walking the list.]]
179 return: free(own(accessor<Evas.Object *> *), eina_accessor_free) 152 return: free(own(accessor<Evas.Object *> *), eina_accessor_free)
180 @warn_unused; 153 @warn_unused;
181 } 154 }
182 iterator_new @const { 155 iterator_new @const {
183 /*@ 156 [[Get an iterator to walk the list of children for the table.
184 Get an iterator to walk the list of children for the table.
185 157
186 @note Do not remove or delete objects while walking the list. */ 158 Note: Do not remove or delete objects while walking the list.]]
187 return: free(own(iterator<Evas.Object *> *), eina_iterator_free) 159 return: free(own(iterator<Evas.Object *> *), eina_iterator_free)
188 @warn_unused; 160 @warn_unused;
189 } 161 }
190 add_to { 162 add_to {
191 /*@ 163 [[Create a table that is child of a given element $parent.]]
192 @brief Create a table that is child of a given element @a parent.
193
194 @see evas_object_table_add() */
195 164
196 return: Evas.Object * @warn_unused; 165 return: Evas.Object * @warn_unused;
197 } 166 }
198 pack_get @const { 167 pack_get @const {
199 /*@ 168 [[Get packing location of a child of table
200 Get packing location of a child of table
201 169
202 @return 1 on success, 0 on failure. 170 @since 1.1]]
203 @since 1.1 */ 171 return: bool; [[$true on success, $false on failure.]]
204 return: bool;
205 params { 172 params {
206 @in child: Evas.Object *; /*@ The child object to add. */ 173 @in child: Evas.Object *; [[The child object to add.]]
207 @out col: ushort; /*@ pointer to store relative-horizontal position to place child. */ 174 @out col: ushort; [[pointer to store relative-horizontal position to place child.]]
208 @out row: ushort; /*@ pointer to store relative-vertical position to place child. */ 175 @out row: ushort; [[pointer to store relative-vertical position to place child.]]
209 @out colspan: ushort; /*@ pointer to store how many relative-horizontal position to use for this child. */ 176 @out colspan: ushort; [[pointer to store how many relative-horizontal position to use for this child.]]
210 @out rowspan: ushort; /*@ pointer to store how many relative-vertical position to use for this child. */ 177 @out rowspan: ushort; [[pointer to store how many relative-vertical position to use for this child.]]
211 } 178 }
212 } 179 }
213 pack { 180 pack {
214 /*@ 181 [[Add a new child to a table object or set its current packing.
215 Add a new child to a table object or set its current packing.
216
217 Note that columns and rows only guarantee 16bit unsigned values at best.
218 That means that col + colspan AND row + rowspan must fit inside 16bit
219 unsigned values cleanly. You will be warned once values exceed 15bit
220 storage, and attempting to use values not able to fit in 16bits will
221 result in failure.
222 182
223 @return 1 on success, 0 on failure. */ 183 Note that columns and rows only guarantee 16bit unsigned values at best.
184 That means that col + colspan AND row + rowspan must fit inside 16bit
185 unsigned values cleanly. You will be warned once values exceed 15bit
186 storage, and attempting to use values not able to fit in 16bits will
187 result in failure.]]
224 188
225 return: bool; 189 return: bool; [[$true on success, $false on failure.]]
226 params { 190 params {
227 @in child: Evas.Object * @nonull; /*@ The child object to add. */ 191 @in child: Evas.Object * @nonull; [[The child object to add.]]
228 @in col: ushort; /*@ relative-horizontal position to place child. */ 192 @in col: ushort; [[relative-horizontal position to place child.]]
229 @in row: ushort; /*@ relative-vertical position to place child. */ 193 @in row: ushort; [[relative-vertical position to place child.]]
230 @in colspan: ushort; /*@ how many relative-horizontal position to use for this child. */ 194 @in colspan: ushort; [[how many relative-horizontal position to use for this child.]]
231 @in rowspan: ushort; /*@ how many relative-vertical position to use for this child. */ 195 @in rowspan: ushort; [[how many relative-vertical position to use for this child.]]
232 } 196 }
233 } 197 }
234 unpack { 198 unpack {
235 /*@ 199 [[Remove child from table.
236 Remove child from table.
237
238 @note removing a child will immediately call a walk over children in order
239 to recalculate numbers of columns and rows. If you plan to remove
240 all children, use evas_object_table_clear() instead.
241 200
242 @return 1 on success, 0 on failure. */ 201 Note: removing a child will immediately call a walk over children in order
202 to recalculate numbers of columns and rows. If you plan to remove
203 all children, use @Evas.Table.clear instead.]]
243 204
244 return: bool; 205 return: bool; [[$true on success, $false on failure.]]
245 params { 206 params {
246 @in child: Evas.Object * @nonull; 207 @in child: Evas.Object * @nonull;
247 } 208 }
248 } 209 }
249 } 210 }
250 implements { 211 implements {
251 class.constructor; 212 class.constructor;
252 Eo.Base.constructor; 213 Eo.Base.constructor;
253 Evas.Object_Smart.add; 214 Evas.Object_Smart.add;
254 Evas.Object_Smart.del; 215 Evas.Object_Smart.del;