1class @beta Efl.Ui.Tags extends Efl.Ui.Layout_Base
2   implements Efl.Ui.Format
3   composites Efl.Text
4{
5   [[A widget displaying a list of tags. The user can remove tags by clicking
6     on each tag "close" button and add new tags by typing text in the text
7     entry at the end of the list.]]
8   methods {
9      @property editable {
10         [[Control if the tag list is to be editable by the user or not.]]
11         set {
12         }
13         get {
14         }
15         values {
16            editable: bool; [[If $true, the user can add/delete tags to the tag list,
17                              if not, the tag list is non-editable.]]
18         }
19      }
20      @property expanded {
21         [[Control whether the tag list is expanded or not.
22
23           In the expanded state, all tags will be displayed.
24           Otherwise, only a single line of tags will be displayed with a marker to
25           indicate that there is more content.]]
26         set {
27         }
28         get {
29         }
30         values {
31            expanded: bool; [[The expanded state. Set this to $true to allow multiple
32                              lines of tags. Set to $false for a single line.]]
33         }
34      }
35      @property items {
36         [[List of tags in the tag list. Tags can be added and removed by the user
37           using the UI, and by the program by modifying this property.]]
38         set {
39         }
40         get {
41         }
42         values {
43            items: const(array<string>); [[The array of items, or $NULL if none.]]
44         }
45      }
46   }
47   implements {
48      Efl.Object.constructor;
49      Efl.Object.destructor;
50      Efl.Ui.Widget.widget_input_event_handler;
51      Efl.Text.text { get; set; }
52      Efl.Ui.Format.apply_formatted_value;
53   }
54   events {
55      /* FIXME: Returning a basic type is not future-proof, better return a struct */
56      item,selected: string; [[Called when item was selected]]
57      item,added: string; [[Called when item was added]]
58      item,deleted: string; [[Called when item was deleted]]
59      item,clicked: string; [[Called when item was clicked]]
60      item,longpressed: string; [[Called when item got a longpress]]
61      expanded: void; [[Called when expanded]]
62      contracted: void; [[Called when contracted]]
63      /* FIXME: Not future-proof */
64      expand,state,changed: int; [[Called when expanded state changed]]
65   }
66}
67