q66 pushed a commit to branch master. http://git.enlightenment.org/core/elementary.git/commit/?id=217971caccb381dc7de01fe4f3cca83f1885ff87
commit 217971caccb381dc7de01fe4f3cca83f1885ff87 Author: Vivek Ellur <[email protected]> Date: Mon Jul 27 10:18:43 2015 +0100 elm_diskselector: convert eo docs of diskselector to new format Summary: Converted docs of elm_diskselector.eo and elm_diskselector_item.eo to the new format Signed-off-by: Vivek Ellur <[email protected]> Reviewers: cedric, q66 Reviewed By: q66 Differential Revision: https://phab.enlightenment.org/D2864 --- src/lib/elm_diskselector.eo | 281 +++++++++++++++++---------------------- src/lib/elm_diskselector_item.eo | 74 +++++------ 2 files changed, 151 insertions(+), 204 deletions(-) diff --git a/src/lib/elm_diskselector.eo b/src/lib/elm_diskselector.eo index 9c1a55f..d0d4d51 100644 --- a/src/lib/elm_diskselector.eo +++ b/src/lib/elm_diskselector.eo @@ -7,230 +7,189 @@ class Elm.Diskselector (Elm.Widget, Elm_Interface_Scrollable, methods { @property side_text_max_length { set { - /*@ - Set the side labels max length. + [[Set the side labels max length. - Length is the number of characters of items' label that will be - visible when it's set on side positions. It will just crop - the string after defined size. E.g.: + Length is the number of characters of items' label that will be + visible when it's set on side positions. It will just crop + the string after defined size. E.g.: - An item with label "January" would be displayed on side position as - "Jan" if max length is set to 3, or "Janu", if this property - is set to 4. + An item with label "January" would be displayed on side position as + "Jan" if max length is set to 3, or "Janu", if this property + is set to 4. - When it's selected, the entire label will be displayed, except for - width restrictions. In this case label will be cropped and "..." - will be concatenated. + When it's selected, the entire label will be displayed, except for + width restrictions. In this case label will be cropped and "..." + will be concatenated. - Default side label max length is 3. + Default side label max length is 3. - This property will be applied over all items, included before or - later this function call. - - @ingroup Diskselector */ + This property will be applied over all items, included before or + later this function call. + ]] } get { - /*@ - Get the side labels max length. - - @see elm_diskselector_side_text_max_length_set() for details. + [[Get the side labels max length. - @return The max length defined for side labels, or 0 if not a valid - diskselector. - - @ingroup Diskselector */ + See also @.side_text_max_length.set for details. + ]] } values { - len: int; /*@ The max length defined for side labels. */ + len: int; [[The max length defined for side labels.]] } } @property round_enabled { set { - /*@ - Enable or disable round mode. - - Disabled by default. If round mode is enabled the items list will - work like a circular list, so when the user reaches the last item, - the first one will popup. + [[Enable or disable round mode. - @see elm_diskselector_round_enabled_get() + Disabled by default. If round mode is enabled the items list will + work like a circular list, so when the user reaches the last item, + the first one will popup. - @ingroup Diskselector */ + See also @.round_enabled.get. + ]] } get { - /*@ - Get a value whether round mode is enabled or not. + [[Get a value whether round mode is enabled or not. - @see elm_diskselector_round_enabled_set() for details. - - @return @c EINA_TRUE means round mode is enabled. @c EINA_FALSE indicates - it's disabled. If @p obj is @c NULL, @c EINA_FALSE is returned. - - @ingroup Diskselector */ + See also @.round_enabled.set for details. + ]] } values { - enabled: bool; /*@ @c EINA_TRUE to enable round mode or @c EINA_FALSE to - disable it. */ + enabled: bool; [[$true to enable round mode or $false to + disable it.]] } } @property display_item_num { set { - /*@ - Set the number of items to be displayed. - - Default value is 3, and also it's the minimum. If @p num is less - than 3, it will be set to 3. - - Also, it can be set on theme, using data item @c display_item_num - on group "elm/diskselector/item/X", where X is style set. - E.g.: - - group { name: "elm/diskselector/item/X"; - data { - item: "display_item_num" "5"; - } - - @ingroup Diskselector */ + [[Set the number of items to be displayed. + + Default value is 3, and also it's the minimum. If $num is less + than 3, it will be set to 3. + + Also, it can be set on theme, using data item $display_item_num + on group "elm/diskselector/item/X", where X is style set. + ]] + /* FIXME-doc + * E.g.: + * group { name: "elm/diskselector/item/X"; + * data { + * item: "display_item_num" "5"; + * } + */ } get { - /*@ - Get the number of items in the diskselector object. - - @ingroup Diskselector */ + [[Get the number of items in the diskselector object.]] } values { - num: int; /*@ The number of items the diskselector will display. */ + num: int; [[The number of items the diskselector will display.]] } } @property first_item { get { - /*@ - Get the first item of the diskselector. - - @return The first item, or @c NULL if none. + [[Get the first item of the diskselector. - The list of items follows append order. So it will return the first - item appended to the widget that wasn't deleted. + The list of items follows append order. So it will return the first + item appended to the widget that wasn't deleted. - @see elm_diskselector_item_append() - @see elm_diskselector_items_get() - - @ingroup Diskselector */ - return: Elm_Object_Item *; + See also @.item_append, + @.items.get. + ]] + return: Elm_Object_Item *; [[The first item, or $null if none.]] } } @property items { get { - /*@ - Get a list of all the diskselector items. - - @return A @c list of diskselector items, #Elm_Object_Item, - or @c NULL on failure. - - @see elm_diskselector_item_append() - @see elm_object_item_del() - @see elm_diskselector_clear() + [[Get a list of all the diskselector items. - @ingroup Diskselector */ - return: const(list<Elm.Object.Item*>)*; + See also @.item_append, + \@ref elm_object_item_del, + @.clear. + ]] + return: const(list<Elm.Object.Item*>)*; [[A $list of diskselector items, or $ull on failure.]] } } @property last_item { get { - /*@ - Get the last item of the diskselector. + [[Get the last item of the diskselector. - @return The last item, or @c NULL if none. + The list of items follows append order. So it will return last first + item appended to the widget that wasn't deleted. - The list of items follows append order. So it will return last first - item appended to the widget that wasn't deleted. - - @see elm_diskselector_item_append() - @see elm_diskselector_items_get() - - @ingroup Diskselector */ - return: Elm_Object_Item *; + See also @.item_append, + @.items.get. + ]] + return: Elm_Object_Item *; [[The last item, or $null if none.]] } } @property selected_item { get { - /*@ - Get the selected item. + [[Get the selected item. - @return The selected diskselector item. - The selected item can be unselected with function - elm_diskselector_item_selected_set(), and the first item of - diskselector will be selected. + The selected item can be unselected with function + @.selected_item.set, and the first item of + diskselector will be selected. - The selected item always will be centered on diskselector, with - full label displayed, i.e., max length set to side labels won't - apply on the selected item. More details on - elm_diskselector_side_text_max_length_set(). - - @ingroup Diskselector */ - return: Elm_Object_Item *; + The selected item always will be centered on diskselector, with + full label displayed, i.e., max length set to side labels won't + apply on the selected item. More details on + @.side_text_max_length.set. + ]] + return: Elm_Object_Item *; [[The selected diskselector item.]] } } item_append { - /*@ - Appends a new item to the diskselector object. - - @return The created item or @c NULL upon failure. - - A new item will be created and appended to the diskselector, i.e., will - be set as last item. Also, if there is no selected item, it will - be selected. This will always happens for the first appended item. - - If no icon is set, label will be centered on item position, otherwise - the icon will be placed at left of the label, that will be shifted - to the right. - - Items created with this method can be deleted with - elm_object_item_del(). - - Associated @p 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 stops the diskselector with this - item on center position. If such function isn't needed, just passing - @c NULL as @p func is enough. The same should be done for @p data. - - Simple example (with no function callback or data associated): - @code - disk = elm_diskselector_add(win); - ic = elm_icon_add(win); - elm_image_file_set(ic, "path/to/image", NULL); - elm_icon_resizable_set(ic, EINA_TRUE, EINA_TRUE); - elm_diskselector_item_append(disk, "label", ic, NULL, NULL); - @endcode - - @see elm_object_item_del() - @see elm_diskselector_clear() - @see elm_icon_add() - - @ingroup Diskselector */ - + [[Appends a new item to the diskselector object. + + A new item will be created and appended to the diskselector, i.e., will + be set as last item. Also, if there is no selected item, it will + be selected. This will always happens for the first appended item. + + If no icon is set, label will be centered on item position, otherwise + the icon will be placed at left of the label, that will be shifted + to the right. + + Items created with this method can be deleted with + \@ref elm_object_item_del. + + Associated $data can be properly freed when item is deleted if a + callback function is set with \@ref 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 stops the diskselector with this + item on center position. If such function isn't needed, just passing + $null as $func is enough. The same should be done for $data. + + See also \@ref elm_object_item_del, + @.clear, + \@ref elm_icon_add. + ]] + /* FIXME-doc + * Simple example (with no function callback or data associated): + * @code + * disk = elm_diskselector_add(win); + * ic = elm_icon_add(win); + * elm_image_file_set(ic, "path/to/image", NULL); + * elm_icon_resizable_set(ic, EINA_TRUE, EINA_TRUE); + * elm_diskselector_item_append(disk, "label", ic, NULL, NULL); + * @endcode + */ return: Elm_Object_Item *; params { - @in label: const(char)*; /*@ The label of the diskselector item. */ - @in icon: Evas.Object * @optional; /*@ The icon object to use at left side of the item. An + @in label: const(char)*; [[The label of the diskselector item.]] + @in icon: Evas.Object * @optional; [[The icon object to use at left side of the item. An icon can be any Evas object, but usually it is an icon created - with elm_icon_add(). */ - @in func: Evas_Smart_Cb @optional; /*@ The function to call when the item is selected. */ - @in data: const(void)* @optional; /*@ The data to associate with the item for related callbacks. */ + with elm_icon_add(). ]] + @in func: Evas_Smart_Cb @optional; [[The function to call when the item is selected.]] + @in data: const(void)* @optional; [[The data to associate with the item for related callbacks.]] } } clear { - /*@ - Remove all diskselector's items. - - @see elm_object_item_del() - @see elm_diskselector_item_append() - - @ingroup Diskselector */ + [[Remove all diskselector's items. + See also \@ref elm_object_item_del, + @.item_append. + ]] } } implements { diff --git a/src/lib/elm_diskselector_item.eo b/src/lib/elm_diskselector_item.eo index 1e76d3d..eedcfb0 100644 --- a/src/lib/elm_diskselector_item.eo +++ b/src/lib/elm_diskselector_item.eo @@ -4,69 +4,59 @@ class Elm.Diskselector_Item(Elm.Widget_Item) methods { @property prev { get { - /*@ - Get the item before @p item in diskselector. + [[Get the item before $item in diskselector. - The list of items follows append order. So it will return item appended - just before @p item and that wasn't deleted. + The list of items follows append order. So it will return item appended + just before $item and that wasn't deleted. - If it is the first item, @c NULL will be returned. - First item can be get by elm_diskselector_first_item_get(). + If it is the first item, $null will be returned. + First item can be get by \@ref elm_diskselector_first_item_get. - @see elm_diskselector_item_append() - @see elm_diskselector_items_get() - - @ingroup Diskselector - */ + See also \@ref elm_diskselector_item_append, + \@ref elm_diskselector_items_get. + ]] } values { - item: Elm_Object_Item *; /*@ The item before @p item, or @c NULL if none or on failure. */ + item: Elm_Object_Item *; [[The item before $item, or $null if none or on failure.]] } } @property next { get { - /*@ - Get the item after @p item in diskselector. - - The list of items follows append order. So it will return item appended - just after @p item and that wasn't deleted. + [[Get the item after $item in diskselector. - If it is the last item, @c NULL will be returned. - Last item can be get by elm_diskselector_last_item_get(). + The list of items follows append order. So it will return item appended + just after $item and that wasn't deleted. - @see elm_diskselector_item_append() - @see elm_diskselector_items_get() + If it is the last item, $null will be returned. + Last item can be get by \@ref elm_diskselector_last_item_get. - @ingroup Diskselector - */ + See also \@ref elm_diskselector_item_append, + \@ref elm_diskselector_items_get. + ]] } values { - item: Elm_Object_Item *; /*@ The item after @p item, or @c NULL if none or on failure. */ + item: Elm_Object_Item *; [[The item after $item, or $null if none or on failure.]] } } @property selected { get { - /*@ - Get whether the @p item is selected or not. + [[Get whether the $item is selected or not. - @see elm_diskselector_selected_item_set() for details. - @see elm_diskselector_item_selected_get() - - @ingroup Diskselector - */ + See also \@ref elm_diskselector_selected_item_set for details, + \@ref elm_diskselector_item_selected_get. + ]] } set { - /*@ - Set the selected state of an item. + [[Set the selected state of an item. - This sets the selected state of the given item @p it. - @c EINA_TRUE for selected, @c EINA_FALSE for not selected. + This sets the selected state of the given $item as $true, + for selected and $false for not selected. If a new item is selected the previously selected will be unselected. Previously selected item can be get with function - elm_diskselector_selected_item_get(). + \@ref elm_diskselector_selected_item_get. - If the item @p it is unselected, the first item of diskselector will + If the $item is unselected, the first item of diskselector will be selected. Selected items will be visible on center position of diskselector. @@ -74,14 +64,12 @@ class Elm.Diskselector_Item(Elm.Widget_Item) diskselector will animate items until the selected item reaches center position. - @see elm_diskselector_item_selected_get() - @see elm_diskselector_selected_item_get() - - @ingroup Diskselector - */ + See also \@ref elm_diskselector_item_selected_get, + \@ref elm_diskselector_selected_item_get. + ]] } values { - selected: bool; /*@ The selected state */ + selected: bool; [[The selected state]] } } /* init { FIXME --
