summaryrefslogtreecommitdiff
path: root/src/lib/elementary/efl_ui_toolbar.eo
blob: 970d581d8e46e3d9507de43614c71e56273fd140 (plain) (blame)
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
import elm_general;

class Efl.Ui.Toolbar (Efl.Ui.Layout, Efl.Ui.Focus.Composition, Efl.Ui.Direction,
                   Efl.Access.Widget.Action, Efl.Access.Selection,
                   Efl.Ui.Clickable, Efl.Ui.Selectable, Efl.Ui.Menu)
{
   [[Toolbar widget class]]
   methods {
      @property select_mode {
         [[Control the toolbar select mode.

           elm_toolbar_select_mode_set() changes item select mode in the toolbar widget.
           - #ELM_OBJECT_SELECT_MODE_DEFAULT : Items will only call their selection func and
           callback when first becoming selected. Any further clicks will
           do nothing, unless you set always select mode.
           - #ELM_OBJECT_SELECT_MODE_ALWAYS : This means that, even if selected,
           every click will make the selected callbacks be called.
           - #ELM_OBJECT_SELECT_MODE_NONE : This will turn off the ability to select items
           entirely and they will neither appear selected nor call selected
           callback functions.]]
         set {
         }
         get {
         }
         values {
            mode: Elm.Object.Select_Mode(Elm.Object.Select_Mode.max); [[The select mode If getting mode fails, it returns #ELM_OBJECT_SELECT_MODE_MAX]]
         }
      }
      item_insert_before {
         [[Insert a new item into the toolbar object before item $before.

           A new item will be created and added to the toolbar. Its position in
           this toolbar will be just before item $before.

           Items created with this method can be deleted with
           elm_object_item_del().

           Associated $data can be properly freed when item is deleted if a
           callback function is set with elm_object_item_del_cb_set().

           If a function is passed as argument, it will be called every time this item
           is selected, i.e., the user clicks over an unselected item.
           If such function isn't needed, just passing
           $NULL as $func is enough. The same should be done for $data.

           Toolbar will load icon image from fdo or current theme.
           This behavior can be set by elm_toolbar_icon_order_lookup_set() function.
           If an absolute path is provided it will load it direct from a file.

           Note: This function does not accept relative icon path.

           See: elm_toolbar_item_icon_set()]]

         return: Elm.Widget.Item; [[The created item or $NULL upon failure.]]
         params {
            @in before: Elm.Widget.Item; [[The toolbar item to insert before.]]
            @in icon: string @optional; [[A string with icon name or the absolute path of an image file.]]
            @in label: string; [[The label of the item.]]
            @in func: Evas_Smart_Cb @optional; [[The function to call when the item is clicked.]]
            @in data: const(void_ptr) @optional; [[The data to associate with the item for related callbacks.]]
         }
      }
      item_insert_after {
         [[Insert a new item into the toolbar object after item $after.

           A new item will be created and added to the toolbar. Its position in
           this toolbar will be just after item $after.

           Items created with this method can be deleted with
           elm_object_item_del().

           Associated $data can be properly freed when item is deleted if a
           callback function is set with elm_object_item_del_cb_set().

           If a function is passed as argument, it will be called every time this item
           is selected, i.e., the user clicks over an unselected item.
           If such function isn't needed, just passing
           $NULL as $func is enough. The same should be done for $data.

           Toolbar will load icon image from fdo or current theme.
           This behavior can be set by elm_toolbar_icon_order_lookup_set() function.
           If an absolute path is provided it will load it direct from a file.

           Note: This function does not accept relative icon path.

           See: elm_toolbar_item_icon_set()]]

         return: Elm.Widget.Item; [[The created item or $NULL upon failure.]]
         params {
            @in after: Elm.Widget.Item; [[The toolbar item to insert after.]]
            @in icon: string @optional; [[A string with icon name or the absolute path of an image file.]]
            @in label: string; [[The label of the item.]]
            @in func: Evas_Smart_Cb @optional; [[The function to call when the item is clicked.]]
            @in data: const(void_ptr) @optional; [[The data to associate with the item for related callbacks.]]
         }
      }
      item_append {
         [[Append item to the toolbar.

           A new item will be created and appended to the toolbar, i.e., will
           be set as last item.

           Items created with this method can be deleted with
           elm_object_item_del().

           Associated $data can be properly freed when item is deleted if a
           callback function is set with elm_object_item_del_cb_set().

           If a function is passed as argument, it will be called every time this item
           is selected, i.e., the user clicks over an unselected item.
           If such function isn't needed, just passing
           $NULL as $func is enough. The same should be done for $data.

           Toolbar will load icon image from fdo or current theme.
           This behavior can be set by elm_toolbar_icon_order_lookup_set() function.
           If an absolute path is provided it will load it direct from a file.

           Note: This function does not accept relative icon path.

           See: elm_toolbar_item_icon_set()]]

         return: Elm.Widget.Item; [[The created item or $NULL upon failure.]]
         params {
            @in icon: string @optional; [[A string with icon name or the absolute path of an image file.]]
            @in label: string; [[The label of the item.]]
            @in func: Evas_Smart_Cb @optional; [[The function to call when the item is clicked.]]
            @in data: const(void_ptr) @optional; [[The data to associate with the item for related callbacks.]]
         }
      }
      items_count @const {
         [[Get the number of items in a toolbar]]
         return: uint; [[The number of items in $obj toolbar]]
      }
      item_prepend {
         [[Prepend item to the toolbar.

           A new item will be created and prepended to the toolbar, i.e., will
           be set as first item.

           Items created with this method can be deleted with
           elm_object_item_del().

           Associated $data can be properly freed when item is deleted if a
           callback function is set with elm_object_item_del_cb_set().

           If a function is passed as argument, it will be called every time this item
           is selected, i.e., the user clicks over an unselected item.
           If such function isn't needed, just passing
           $NULL as $func is enough. The same should be done for $data.

           Toolbar will load icon image from fdo or current theme.
           This behavior can be set by elm_toolbar_icon_order_lookup_set() function.
           If an absolute path is provided it will load it direct from a file.

           Note: This function does not accept relative icon path.

           See: elm_toolbar_item_icon_set()]]

         return: Elm.Widget.Item; [[The created item or $NULL upon failure.]]
         params {
            @in icon: string @optional; [[A string with icon name or the absolute path of an image file.]]
            @in label: string; [[The label of the item.]]
            @in func: Evas_Smart_Cb @optional; [[The function to call when the item is clicked.]]
            @in data: const(void_ptr) @optional; [[The data to associate with the item for related callbacks.]]
         }
      }
   }
   implements {
      class.constructor;
      Efl.Object.constructor;
      Efl.Object.destructor;
      Efl.Gfx.position { set; }
      Efl.Gfx.size { set; }
      Efl.Canvas.Group.group_calculate;
      Efl.Canvas.Group.group_member_add;
      Elm.Widget.on_access_update;
      Elm.Widget.theme_apply;
      Elm.Widget.on_focus_update;
      Efl.Ui.Translatable.translation_update;
      Elm.Widget.widget_event;
      Elm.Widget.focus_highlight_geometry { get; }
      Elm.Widget.focused_item { get; }
      Efl.Ui.Direction.direction { get; set; [[Only supports $vertical and $horizontal. Default is $horizontal.]] }
      Efl.Access.Widget.Action.elm_actions { get; }
      Efl.Access.children { get; }
      Efl.Access.state_set { get; }
      Efl.Access.Selection.selected_children_count { get; }
      Efl.Access.Selection.selected_child { get; }
      Efl.Access.Selection.selected_child_deselect;
      Efl.Access.Selection.child_select;
      Efl.Access.Selection.child_deselect;
      Efl.Access.Selection.is_child_selected;
      Efl.Access.Selection.all_children_select;
      Efl.Access.Selection.clear;
      Efl.Ui.Menu.selected_item { get; }
      Efl.Ui.Menu.first_item { get; }
      Efl.Ui.Menu.last_item { get; }
      Efl.Ui.Menu.items { get; }
      Efl.Ui.Focus.Composition.prepare;
   }
   events {
      item,focused; [[Called when toolbar item got focus]]
      item,unfocused; [[Called when toolbar item lost focus]]
   }
}