2018-11-16 01:45:05 -08:00
class Elm.Segment_Control (Efl.Ui.Layout, Efl.Ui.Focus.Composition, Efl.Ui.Legacy)
2014-03-26 02:04:37 -07:00
{
2016-11-24 05:57:29 -08:00
[[Elementary segment control class]]
2016-05-12 09:06:04 -07:00
legacy_prefix: elm_segment_control;
2014-03-26 02:04:37 -07:00
eo_prefix: elm_obj_segment_control;
2016-05-17 09:14:47 -07:00
event_prefix: elm_segment_control;
2015-05-07 09:32:53 -07:00
methods {
@property item_count {
2014-03-26 02:04:37 -07:00
get {
2015-08-07 07:36:47 -07:00
[[Get the Segment items count from segment control.
2014-03-26 02:04:37 -07:00
2015-08-07 07:36:47 -07:00
It will just return the number of items added to segment control $obj.]]
return: int; [[Segment items count.]]
2014-03-26 02:04:37 -07:00
}
}
2015-05-07 09:32:53 -07:00
@property item_selected {
2014-03-26 02:04:37 -07:00
get {
2015-08-07 07:36:47 -07:00
[[Get the selected item.
2014-03-26 02:04:37 -07:00
2015-08-07 07:36:47 -07:00
The selected item can be unselected with function
elm_segment_control_item_selected_set().
2014-03-26 02:04:37 -07:00
2015-08-07 07:36:47 -07:00
The selected item always will be highlighted on segment control.]]
2014-03-26 02:04:37 -07:00
2016-05-23 07:41:28 -07:00
return: Elm.Widget.Item; [[The selected item or $NULL if none of segment items is selected.]]
2014-03-26 02:04:37 -07:00
}
}
2014-07-22 09:13:52 -07:00
item_label_get @const {
2015-08-07 07:36:47 -07:00
[[Get the label of item.
2014-03-26 02:04:37 -07:00
2015-08-07 07:36:47 -07:00
The return value is a pointer to the label associated to the item when
it was created, with function elm_segment_control_item_add(), or later
with function elm_object_item_text_set. If no label
was passed as argument, it will return $NULL.]]
2014-03-26 02:04:37 -07:00
2016-05-31 08:02:26 -07:00
return: string; [[The label of the item at $index.]]
2014-03-26 02:04:37 -07:00
params {
2015-08-07 07:36:47 -07:00
@in idx: int; [[The index of the segment item.]]
2014-03-26 02:04:37 -07:00
}
}
item_insert_at {
2015-08-07 07:36:47 -07:00
[[Insert a new item to the segment control object at specified position.
2014-03-26 02:04:37 -07:00
2015-08-07 07:36:47 -07:00
Index values must be between $0, when item will be prepended to
segment control, and items count, that can be get with
elm_segment_control_item_count_get(), case when item will be appended
to segment control, just like elm_segment_control_item_add().
2014-03-26 02:04:37 -07:00
2015-08-07 07:36:47 -07:00
Items created with this function can be deleted with function
elm_object_item_del() or elm_segment_control_item_del_at().
2014-03-26 02:04:37 -07:00
2015-08-07 07:36:47 -07:00
Note: $label set to $NULL is different from empty string "".
If an item
only has icon, it will be displayed bigger and centered. If it has
icon and label, even that an empty string, icon will be smaller and
positioned at left.]]
2014-03-26 02:04:37 -07:00
2016-05-23 07:41:28 -07:00
return: Elm.Widget.Item; [[The created item or $NULL upon failure.]]
2014-03-26 02:04:37 -07:00
params {
2016-06-20 21:26:15 -07:00
@in icon: Efl.Canvas.Object @optional; [[The icon object to use for the left side of the item. An icon can be any Evas object, but usually it is an icon created with elm_icon_add().]]
2016-05-31 08:02:26 -07:00
@in label: string @optional; [[The label of the item.]]
2015-08-07 07:36:47 -07:00
@in idx: int; [[Item position. Value should be between 0 and items count.]]
2014-03-26 02:04:37 -07:00
}
}
2014-07-22 09:13:52 -07:00
item_get @const {
2015-08-07 07:36:47 -07:00
[[Get the item placed at specified index.
2014-03-26 02:04:37 -07:00
2015-08-07 07:36:47 -07:00
Index is the position of an item in segment control widget. Its
range is from $0 to <tt> count - 1 </tt>.
Count is the number of items, that can be get with
elm_segment_control_item_count_get().]]
2014-03-26 02:04:37 -07:00
2016-05-23 07:41:28 -07:00
return: Elm.Widget.Item; [[The segment control item or $NULL on failure.]]
2014-03-26 02:04:37 -07:00
params {
2015-08-07 07:36:47 -07:00
@in idx: int; [[The index of the segment item.]]
2014-03-26 02:04:37 -07:00
}
}
item_del_at {
2015-08-07 07:36:47 -07:00
[[Remove a segment control item at given index from its parent, deleting it.
2014-03-26 02:04:37 -07:00
2015-08-07 07:36:47 -07:00
Items can be added with elm_segment_control_item_add() or elm_segment_control_item_insert_at().]]
2014-03-26 02:04:37 -07:00
params {
2015-08-07 07:36:47 -07:00
@in idx: int; [[The position of the segment control item to be deleted.]]
2014-03-26 02:04:37 -07:00
}
}
item_add {
2015-08-07 07:36:47 -07:00
[[Append a new item to the segment control object.
2014-03-26 02:04:37 -07:00
2015-08-07 07:36:47 -07:00
A new item will be created and appended to the segment control, i.e., will
be set as last item.
2014-03-26 02:04:37 -07:00
2015-08-07 07:36:47 -07:00
If it should be inserted at another position,
elm_segment_control_item_insert_at() should be used instead.
2014-03-26 02:04:37 -07:00
2015-08-07 07:36:47 -07:00
Items created with this function can be deleted with function
elm_object_item_del() or elm_object_item_del_at().
2014-03-26 02:04:37 -07:00
2015-08-07 07:36:47 -07:00
Note: $label set to $NULL is different from empty string "".
If an item
only has icon, it will be displayed bigger and centered. If it has
icon and label, even that an empty string, icon will be smaller and
positioned at left.]]
2014-03-26 02:04:37 -07:00
2015-08-07 07:36:47 -07:00
/* FIXME-doc
2014-03-26 02:04:37 -07:00
Simple example:
@code
sc = elm_segment_control_add(win);
ic = elm_icon_add(win);
elm_image_file_set(ic, "path/to/image", NULL);
2015-08-06 07:11:22 -07:00
elm_icon_resizable_set(ic, true, true);
2014-03-26 02:04:37 -07:00
elm_segment_control_item_add(sc, ic, "label");
evas_object_show(sc);
2015-08-07 07:36:47 -07:00
@endcode */
2014-03-26 02:04:37 -07:00
2016-05-23 07:41:28 -07:00
return: Elm.Widget.Item; [[The created item or $NULL upon failure.]]
2014-03-26 02:04:37 -07:00
params {
2016-06-20 21:26:15 -07:00
@in icon: Efl.Canvas.Object @optional; [[The icon object to use for the left side of the item. An icon can be any Evas object, but usually it is an icon created with elm_icon_add().]]
2016-05-31 08:02:26 -07:00
@in label: string @optional; [[The label of the item. Note that, NULL is different from empty string "".]]
2014-03-26 02:04:37 -07:00
}
}
2014-07-22 09:13:52 -07:00
item_icon_get @const {
2015-08-07 07:36:47 -07:00
[[Get the icon associated to the item.
2014-03-26 02:04:37 -07:00
2015-08-07 07:36:47 -07:00
The return value is a pointer to the icon associated to the item when
it was created, with function elm_segment_control_item_add(), or later
with function elm_object_item_part_content_set(). If no icon
was passed as argument, it will return $NULL.]]
2016-06-20 21:26:15 -07:00
return: Efl.Canvas.Object; [[The left side icon associated to the item at $index.]]
2014-03-26 02:04:37 -07:00
params {
2015-08-07 07:36:47 -07:00
@in idx: int; [[The index of the segment item.]]
2014-03-26 02:04:37 -07:00
}
}
}
implements {
2014-06-20 02:47:39 -07:00
class.constructor;
2016-08-10 07:23:04 -07:00
Efl.Object.constructor;
2018-01-07 20:55:35 -08:00
Efl.Ui.Widget.theme_apply;
Efl.Ui.Widget.on_access_update;
Efl.Ui.Widget.on_disabled_update;
2018-12-21 14:46:10 -08:00
Efl.Ui.L10n.translation_update;
2014-03-26 02:04:37 -07:00
}
events {
efl: Add missing event types
Summary:
All events must have a type now, otherwise bindings don't know how to handle
the event_info field.
Most of the missing event types were actually "void" (no event_info present).
Some struct definitions had to be moved to eo instead of h files, so they
are available to bindings. Some have not, and are marked with FIXME.
Some namespaces have been fixed (like Efl_Event_Cb -> Efl.Event_Cb).
In general, there are hundreds of changed files, but mostly to add a type which
was not present before, so there's no harm done.
Also, A lot of FIXMEs have been added which should be, like, fixed.
For example, some events can send different types of event_info, which is
very inconvenient (and error prone).
Test Plan: make with c# bindings works, make check and make examples work too.
Reviewers: cedric, q66, lauromoura
Subscribers: zmike
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D6169
2018-05-11 08:20:40 -07:00
changed: Efl.Object; [[Called when segment control changed]]
2014-03-26 02:04:37 -07:00
}
}