summaryrefslogtreecommitdiff
path: root/src/lib/elementary/elm_toolbar_item.eo
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/elementary/elm_toolbar_item.eo')
-rw-r--r--src/lib/elementary/elm_toolbar_item.eo329
1 files changed, 0 insertions, 329 deletions
diff --git a/src/lib/elementary/elm_toolbar_item.eo b/src/lib/elementary/elm_toolbar_item.eo
deleted file mode 100644
index 6abdc39..0000000
--- a/src/lib/elementary/elm_toolbar_item.eo
+++ /dev/null
@@ -1,329 +0,0 @@
1enum Elm.Toolbar_Item_Scrollto_Type
2{
3 [[Defines where to position the item in the toolbar.]]
4 legacy: elm_toolbar_item_scrollto;
5
6 none = 0, [[no scrollto]]
7 in = (1 << 0), [[to the nearest viewport]]
8 first = (1 << 1), [[to the first of viewport]]
9 middle = (1 << 2), [[to the middle of viewport]]
10 last = (1 << 3) [[to the last of viewport]]
11}
12
13struct Elm.Toolbar_Item_State
14{
15 [[
16 State of a Elm_Toolbar_Item.
17 Can be created with elm_toolbar_item_state_add() and removed with elm_toolbar_item_state_del().
18 ]]
19 label: string; [[Item label]]
20 icon_str: string; [[Item icon string]]
21 icon: Efl.Canvas.Object; [[Item icon]]
22 func: Evas_Smart_Cb ; [[Item callback function]]
23 data: const(void_ptr); [[Item data]]
24}
25
26class Elm.Toolbar_Item extends Elm.Widget.Item implements Efl.Ui.Focus.Object, Efl.Ui.Legacy
27{
28 [[Elementary toolbar item class]]
29 legacy_prefix: elm_toolbar_item;
30 eo_prefix: elm_obj_toolbar_item;
31 methods {
32 @property prev {
33 get {
34 [[Get the item before this one in the widget's list of items.
35
36 See also @.next.
37 ]]
38 }
39 values {
40 item: Elm.Widget.Item; [[The item before the object in its parent's
41 list. If there is no previous item or in case
42 of error, $null is returned.]]
43 }
44 }
45 @property next {
46 get {
47 [[Get the item after this one in the widget's list of items.
48
49 See also @.prev.
50 ]]
51 }
52 values {
53 item: Elm.Widget.Item; [[The item after the object in its parent's
54 list. If there is no next item or in case
55 of error, $null is returned.]]
56 }
57 }
58 @property selected {
59 [[Indicates whether this item is currently selected.]]
60 get {
61 [[Get the selected state of this item.]]
62 }
63 set {
64 [[Set the selected state of $item.
65
66 This sets the selected state of the given item $it.
67 $true for selected, $false for not selected.
68
69 If a new item is selected the previously selected will
70 be unselected. Previously selected item can be retrieved
71 with @Elm.Toolbar.selected_item.get.
72
73 Selected items will be highlighted.
74 ]]
75 }
76 values {
77 selected: bool; [[The selection state.]]
78 }
79 }
80 @property priority {
81 get {
82 [[Get the priority of a toolbar item.]]
83 }
84 set {
85 [[Set the priority of a toolbar item.
86
87 This is used only when the toolbar shrink mode is set
88 to #ELM_TOOLBAR_SHRINK_MENU or #ELM_TOOLBAR_SHRINK_HIDE.
89 When space is less than required, items with low priority
90 will be removed from the toolbar and added to a
91 dynamically-created menu, while items with higher
92 priority will remain on the toolbar, with the same
93 order they were added.
94 ]]
95 }
96 values {
97 priority: int; [[The $item priority. The default is zero
98 for set and 0 is returned on failure.]]
99 }
100 }
101 @property icon {
102 get {
103 [[Get the string used to set the icon of $item.]]
104 }
105 set {
106 [[Set the icon associated with $item.
107
108 Toolbar will load icon image from fdo or current theme.
109 This behavior can be set by
110 elm_toolbar_icon_order_lookup_set function.
111 If an absolute path is provided it will load it direct
112 from a file.
113
114 Note: This function does not accept relative icon path.
115 ]]
116 }
117 values {
118 icon: string; [[A string with icon name or the
119 absolute path of an image file.]]
120 }
121 }
122 @property object {
123 get {
124 [[Get the real Evas(Edje) object created to implement the
125 view of a given toolbar $item.
126 ]]
127 }
128 values {
129 obj: Efl.Canvas.Object; [[The base Edje object associated with $it.]]
130 }
131 }
132 @property icon_object {
133 get {
134 [[Get the icon object of $item.
135
136 See also @.icon.set, @.icon_file_set, @.icon_memfile_set.
137 ]]
138 }
139 values {
140 obj: Efl.Canvas.Object; [[The icon object.]]
141 }
142 }
143 @property separator {
144 get {
145 [[Get a value whether item is a separator or not.]]
146 }
147 set {
148 [[Set or unset item as a separator.
149
150 Items aren't set as separator by default.
151
152 If set as separator it will display separator theme, so
153 won't display icons or label.
154 ]]
155 }
156 values {
157 separator: bool; [[$true if the item is a separator, $false otherwise]]
158 }
159 }
160 @property menu {
161 get {
162 [[Get toolbar item's menu.
163
164 If $item wasn't set as menu item with @.menu_set,
165 this function will set it.
166 ]]
167 }
168 values {
169 menu: Efl.Canvas.Object; [[Item's menu object or $null on failure.]]
170 }
171 }
172 @property state {
173 get {
174 [[Get the current state of $it.]]
175 }
176 set {
177 [[Set $state as the current state of $it.
178
179 If $state is $NULL, it won't select any state and the
180 default item's icon and label will be used. It's the
181 behavior as \@ref elm_toolbar_item_state_unset.
182 ]]
183 return: bool; [[$true on success, $false otherwise]]
184 }
185 values {
186 state: ptr(Elm.Toolbar_Item_State) @nullable; [[Item state]]
187 }
188 }
189 /* init { FIXME
190 params {
191 Evas_Smart_Cb func;
192 const(void_ptr) data;
193 }
194 }*/
195 icon_memfile_set {
196 [[Set the icon associated with $item to an image in a binary buffer.
197
198 Note: The icon image set by this function can be changed by
199 @.icon.set.
200 ]]
201 params {
202 @in img: const(void_ptr); [[The binary data that will be used as an image.]]
203 @in size: size; [[The size of binary data $img.]]
204 @in format: string; [[Optional format of $img to pass to the image loader.]]
205 @in key: string; [[Optional key of $img to pass to the image loader (eg. if $img is an edje file).]]
206 }
207 return: bool; [[$true on success, $false otherwise]]
208 }
209 icon_file_set {
210 [[Set the icon associated with $item to an image in a binary buffer.
211
212 Note: The icon image set by this function can be changed by
213 elm_toolbar_item_icon_set().
214 ]]
215 params {
216 @in file: string; [[The file that contains the image.]]
217 @in key: string; [[Optional key of $img to pass to the image loader (eg. if $img is an edje file).]]
218 }
219 return: bool; [[$true on success, $false otherwise]]
220 }
221 state_add {
222 [[Add a new state to $item.
223
224 Toolbar will load icon image from fdo or current theme.
225 This behavior can be set by elm_toolbar_icon_order_lookup_set
226 function. If an absolute path is provided it will load it
227 direct from a file.
228
229 States created with this function can be removed with
230 @.state_del.
231 ]]
232 params {
233 @in icon: string; [[A string with icon name or the absolute path of an image file.]]
234 @in label: string; [[The label of the new state.]]
235 @in func: Evas_Smart_Cb @optional; [[The function to call when the item is clicked when this state is selected.]]
236 @in data: const(void_ptr) @optional; [[The data to associate with the state.]]
237 }
238 return: ptr(Elm.Toolbar_Item_State); [[The toolbar item state, or $null upon failure.]]
239 }
240 state_del {
241 [[Delete a previously added state to $item.]]
242 params {
243 @in state: ptr(Elm.Toolbar_Item_State); [[The state to be deleted.]]
244 }
245 return: bool; [[$true on success or $false on failure.]]
246 }
247 state_next {
248 [[Get the state after selected state in toolbar's $item.
249
250 If last state is selected, this function will return first
251 state.
252 ]]
253 return: ptr(Elm.Toolbar_Item_State); [[The state after current state, or $null on failure.]]
254 }
255 state_prev {
256 [[Get the state before selected state in toolbar's $item.
257
258 If first state is selected, this function will return last
259 state.
260 ]]
261 return: ptr(Elm.Toolbar_Item_State); [[The state before current state, or $null on failure.]]
262 }
263 show {
264 [[Show a specific item, when the toolbar can be scrolled.
265
266 @since 1.8
267 ]]
268 params {
269 @in scrollto: Elm.Toolbar_Item_Scrollto_Type; [[The position the item should appear at.]]
270 }
271 }
272 bring_in {
273 [[Show a specific item with scroll animation, when the toolbar
274 can be scrolled.
275
276 @since 1.8
277 ]]
278 params {
279 @in scrollto: Elm.Toolbar_Item_Scrollto_Type; [[The position the item should appear at.]]
280 }
281 }
282 menu_set {
283 [[Set whether the toolbar item opens a menu.
284
285 A toolbar item can be set to be a menu, using this function.
286
287 Once it is set to be a menu, it can be manipulated through the
288 menu-like function @Elm.Toolbar.menu_parent.set and the
289 other elm_menu functions, using the Evas_Object $menu returned
290 by @.menu.get.
291
292 So, items to be displayed in this item's menu should be added
293 with \@ref elm_menu_item_add.
294 ]]
295 /* FIXME-doc
296 The following code exemplifies the most basic usage:
297 @code
298 tb = elm_toolbar_add(win)
299 item = elm_toolbar_item_append(tb, "refresh", "Menu", NULL, NULL);
300 elm_toolbar_item_menu_set(item, true);
301 elm_toolbar_menu_parent_set(tb, win);
302 menu = elm_toolbar_item_menu_get(item);
303 elm_menu_item_add(menu, NULL, "edit-cut", "Cut", NULL, NULL);
304 menu_item = elm_menu_item_add(menu, NULL, "edit-copy", "Copy", NULL,
305 NULL);
306 @endcode
307 */
308 params {
309 @in menu: bool; [[If $true, $item will opens a menu when selected.]]
310 }
311 }
312 }
313 implements {
314 Efl.Object.constructor;
315 Efl.Object.invalidate;
316 Elm.Widget.Item.disable;
317 Elm.Widget.Item.disabled { set; }
318 Elm.Widget.Item.item_focus { get; set; }
319 Elm.Widget.Item.signal_emit;
320 Elm.Widget.Item.part_text { get; set; }
321 Elm.Widget.Item.part_content { get; set; }
322 Elm.Widget.Item.part_content_unset;
323 Efl.Ui.Focus.Object.focus_geometry { get; }
324 Efl.Ui.Focus.Object.focus { set; }
325 Efl.Ui.Focus.Object.focus_parent { get; }
326 Efl.Access.Object.i18n_name { get; }
327 Efl.Access.Object.state_set { get; }
328 }
329}