summaryrefslogtreecommitdiff
path: root/src/lib/elm_index.eo
blob: 9f6ac7dc2503b7b45287a3492632b4e8ab2186cd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
class Elm_Index (Elm_Layout, Evas_Selectable_Interface)
{
   eo_prefix: elm_obj_index;
   properties {
      autohide_disabled {
         set {
            /*@
            Enable or disable auto hiding feature for a given index widget.

            @see elm_index_autohide_disabled_get()

            @ingroup Index */
         }
         get {
            /*@
            Get whether auto hiding feature is enabled or not for a given index widget.

            @return @c EINA_TRUE, if auto hiding is disabled, @c EINA_FALSE otherwise

            @see elm_index_autohide_disabled_set() for more details

            @ingroup Index */
         }
         values {
            Eina_Bool disabled; /*@ @c EINA_TRUE to disable auto hiding, @c EINA_FALSE to enable */
         }
      }
      omit_enabled {
         set {
            /*@
            Enable or disable omit feature for a given index widget.

            @see elm_index_omit_enabled_get()

            @since 1.8

            @ingroup Index */
         }
         get {
            /*@
            Get whether omit feature is enabled or not for a given index widget.

            @return @c EINA_TRUE, if omit feature is enabled, @c EINA_FALSE otherwise

            @see elm_index_omit_enabled_set()

            @since 1.8

            @ingroup Index */
         }
         values {
            Eina_Bool enabled; /*@ @c EINA_TRUE to enable omit feature, @c EINA_FALSE to disable */
         }
      }
      horizontal {
         set {
            /*@
            Enable or disable horizontal mode on the index object

            @note Vertical mode is set by default.

            On horizontal mode items are displayed on index from left to right,
            instead of from top to bottom. Also, the index will scroll horizontally.

            @see elm_index_horizontal_get()

            @ingroup Index */
         }
         get {
            /*@
            Get a value whether horizontal mode is enabled or not.

            @return @c EINA_TRUE means horizontal mode selection is enabled.
            @c EINA_FALSE indicates it's disabled. If @p obj is @c NULL,
            @c EINA_FALSE is returned.

            @see elm_index_horizontal_set() for details.

            @ingroup Index */
         }
         values {
            Eina_Bool horizontal; /*@ @c EINA_TRUE to enable horizontal or @c EINA_FALSE to
            disable it, i.e., to enable vertical mode. it's an area one @ref Fingers
            "finger" wide on the bottom side of the index widget's container. */
         }
      }
      delay_change_time {
         set {
            /*@
            Set a delay change time for index object.

            @note delay time is 0.2 sec by default.

            @see elm_index_delay_change_time_get

            @ingroup Index */
         }
         get {
            /*@
            Get a delay change time for index object.

            @return delay change time in seconds

            @see elm_index_delay_change_time_set

            @ingroup Index */
         }
         values {
            double dtime; /*@ The delay change time to set. */
         }
      }
      indicator_disabled {
         set {
            /*@
            Set the indicator as to be disabled.

            In Index widget, Indicator notes popup text, which shows a letter has been selecting.

            @see elm_index_indicator_disabled_get()

            @ingroup Index */
         }
         get {
            /*@
            Get the value of indicator's disabled status.

            @return EINA_TRUE if the indicator is disabled.

            @see elm_index_indicator_disabled_set()

            @ingroup Index */
         }
         values {
            Eina_Bool disabled; /*@ @c EINA_TRUE to disable it, @c EINA_FALSE to enable it */
         }
      }
      item_level {
         set {
            /*@
            Set the items level for a given index widget.

            @see elm_index_item_level_get()

            @ingroup Index */
         }
         get {
            /*@
            Get the items level set for a given index widget.

            @return @c 0 or @c 1, which are the levels @p obj might be at.

            @see elm_index_item_level_set() for more information

            @ingroup Index */
         }
         values {
            int level; /*@ @c 0 or @c 1, the currently implemented levels. */
         }
      }
   }
   methods {
      level_go {
         /*@
         Flush the changes made to the index items so they work correctly

         This flushes any changes made to items indicating the object is ready to
         go. You should call this before any changes you expect to work. This
         is similar to elm_list_go().

         @warning If not called, it won't display the index properly.

         @ingroup Index */

         params {
            @in int level; /*@ The index level (one of @c 0 or @c 1) where changes were made */
         }
      }
      item_prepend {
         /*@
         Prepend a new item on a given index widget.

         @return A handle to the item added or @c NULL, on errors

         Despite the most common usage of the @p letter argument is for
         single char strings, one could use arbitrary strings as index
         entries.

         @c item will be the pointer returned back on @c "changed", @c
         "delay,changed" and @c "selected" smart events.

         @ingroup Index */

         return Elm_Object_Item *;
         params {
            @in const char *letter; /*@ Letter under which the item should be indexed */
            @in Evas_Smart_Cb func; /*@ The function to call when the item is selected. */
            @in const void *data; /*@ The item data to set for the index's item */
         }
      }
      item_clear {
         /*@
         Removes @b all items from a given index widget.

         If deletion callbacks are set, via elm_object_item_del_cb_set(),
         that callback function will be called for each item in @p obj.

         @ingroup Index */

      }
      item_insert_after {
         /*@
         Insert a new item into the index object after item @p after.

         @return A handle to the item added or @c NULL, on errors

         Despite the most common usage of the @p letter argument is for
         single char strings, one could use arbitrary strings as index
         entries.

         @c item will be the pointer returned back on @c "changed", @c
         "delay,changed" and @c "selected" smart events.

         @note If @p relative is @c NULL this function will behave as
         elm_index_item_append().

         @ingroup Index */

         return Elm_Object_Item *;
         params {
            @in Elm_Object_Item *after; /*@ The index item to insert after. */
            @in const char *letter; /*@ Letter under which the item should be indexed */
            @in Evas_Smart_Cb func; /*@ The function to call when the item is clicked. */
            @in const void *data; /*@ The item data to set for the index's item */
         }
      }
      item_find {
         /*@
         Find a given index widget's item, <b>using item data</b>.

         @return The index item handle, if found, or @c NULL otherwise

         @ingroup Index */

         return Elm_Object_Item *;
         params {
            @in const void *data; /*@ The item data pointed to by the desired index item */
         }
      }
      item_insert_before {
         /*@
         Insert a new item into the index object before item @p before.

         @return A handle to the item added or @c NULL, on errors

         Despite the most common usage of the @p letter argument is for
         single char strings, one could use arbitrary strings as index
         entries.

         @c item will be the pointer returned back on @c "changed", @c
         "delay,changed" and @c "selected" smart events.

         @note If @p relative is @c NULL this function will behave as
         elm_index_item_prepend().

         @ingroup Index */

         return Elm_Object_Item *;
         params {
            @in Elm_Object_Item *before; /*@ The index item to insert after. */
            @in const char *letter; /*@ Letter under which the item should be indexed */
            @in Evas_Smart_Cb func; /*@ The function to call when the item is clicked. */
            @in const void *data; /*@ The item data to set for the index's item */
         }
      }
      item_append {
         /*@
         Append a new item on a given index widget.

         @return A handle to the item added or @c NULL, on errors

         Despite the most common usage of the @p letter argument is for
         single char strings, one could use arbitrary strings as index
         entries.

         @c item will be the pointer returned back on @c "changed", @c
         "delay,changed" and @c "selected" smart events.

         @ingroup Index */

         return Elm_Object_Item *;
         params {
            @in const char *letter; /*@ Letter under which the item should be indexed */
            @in Evas_Smart_Cb func; /*@ The function to call when the item is selected. */
            @in const void *data; /*@ The item data to set for the index's item */
         }
      }
      selected_item_get {
         /*@
         Returns the last selected item, for a given index widget.

         @return The last item @b selected on @p obj (or @c NULL, on errors).

         @ingroup Index */

         const;
         return Elm_Object_Item *;
         params {
            @in int level; /*@ @c 0 or @c 1, the currently implemented levels. */
         }
      }
      item_sorted_insert {
         /*@
         Insert a new item into the given index widget, using @p cmp_func
         function to sort items (by item handles).

         @return A handle to the item added or @c NULL, on errors

         Despite the most common usage of the @p letter argument is for
         single char strings, one could use arbitrary strings as index
         entries.

         @c item will be the pointer returned back on @c "changed", @c
         "delay,changed" and @c "selected" smart events.

         @ingroup Index */

         return Elm_Object_Item *;
         params {
            @in const char *letter; /*@ Letter under which the item should be indexed */
            @in Evas_Smart_Cb func; /*@ The function to call when the item is clicked. */
            @in const void *data; /*@ The item data to set for the index's item */
            @in Eina_Compare_Cb cmp_func; /*@ The comparing function to be used to sort index
            items <b>by index item handles</b> */
            @in Eina_Compare_Cb cmp_data_func; /*@ A @b fallback function to be called for the
            sorting of index items <b>by item data</b>). It will be used
            when @p cmp_func returns @c 0 (equality), which means an index
            item with provided item data already exists. To decide which
            data item should be pointed to by the index item in question, @p
            cmp_data_func will be used. If @p cmp_data_func returns a
            non-negative value, the previous index item data will be
            replaced by the given @p item pointer. If the previous data need
            to be freed, it should be done by the @p cmp_data_func function,
            because all references to it will be lost. If this function is
            not provided (@c NULL is given), index items will be @b
            duplicated, if @p cmp_func returns @c 0. */
         }
      }
   }
   implements {
      class::constructor;
      Eo_Base::constructor;
      Evas_Smart::add;
      Evas_Smart::del;
      Elm_Widget::theme_apply;
      Elm_Widget::focus_next_manager_is;
      Elm_Widget::focus_direction_manager_is;
      Elm_Widget::access;
      Elm_Widget::focus_next;
      Elm_Layout::sizing_eval;
   }
   events {
      changed;
      delay,changed;
      level,up;
      level,down;
   }

}