forked from enlightenment/efl
parent
e576216222
commit
6a1768ead2
|
@ -26,6 +26,7 @@ WGT_PREVIEW = \
|
|||
colorselector:preview-00.png:widget_preview_colorselector:160:200 \
|
||||
layout:preview-00.png:widget_preview_layout:200:160 \
|
||||
conformant:preview-00.png:widget_preview_conformant:200:400 \
|
||||
list:preview-00.png:widget_preview_list:200:200 \
|
||||
index:preview-00.png:widget_preview_index:200:160 \
|
||||
frame:preview-00.png:widget_preview_frame:100:50 \
|
||||
label:preview-00.png:widget_preview_label:70:30 \
|
||||
|
|
|
@ -37,6 +37,12 @@
|
|||
*
|
||||
* @ref diskselector_example_02
|
||||
*
|
||||
* @ref list_example_01
|
||||
*
|
||||
* @ref list_example_02
|
||||
*
|
||||
* @ref list_example_03
|
||||
*
|
||||
* @ref flipselector_example
|
||||
*
|
||||
* @ref fileselector_example
|
||||
|
@ -1654,6 +1660,258 @@
|
|||
* @example diskselector_example_02.c
|
||||
*/
|
||||
|
||||
/**
|
||||
* @page list_example_01 List widget example
|
||||
*
|
||||
* This code places a single Elementary list widgets on a window, just
|
||||
* to exemplify the more simple and common use case: a list will be created
|
||||
* and populated with a few items.
|
||||
*
|
||||
* To keep it simple, we won't show how to customize the list, for this check
|
||||
* @ref list_example_02. Also, we won't focus
|
||||
* on items management on this example. For an example about this subject,
|
||||
* check @ref list_example_03.
|
||||
*
|
||||
* To add a list widget.
|
||||
* @dontinclude list_example_01.c
|
||||
* @skipline elm_list_add
|
||||
*
|
||||
* We are just adding the list, so as you can see, defaults for it are:
|
||||
* @li Items are displayed vertically.
|
||||
* @li Only one item can be selected.
|
||||
* @li The list doesn't bouce.
|
||||
*
|
||||
* To add items, we are just appending it on a loop, using function
|
||||
* elm_list_item_append(), that will be better exaplained on
|
||||
* items management example.
|
||||
* @dontinclude list_example_01.c
|
||||
* @skipline lbl[]
|
||||
* @until };
|
||||
* @skipline for
|
||||
* @skipline elm_list_item_append
|
||||
*
|
||||
* After we just want to show the list. But first we need to start the widget.
|
||||
* It was done this way to improve widget's performance. So, always remember
|
||||
* that:
|
||||
* @warning Call elm_list_go before showing the object
|
||||
* @skipline elm_list_go
|
||||
* @skipline show
|
||||
*
|
||||
* See the full @ref list_example_01.c "list_example_01.c"
|
||||
* code, whose window should look like this picture:
|
||||
*
|
||||
* @image html screenshots/list_example_01.png
|
||||
* @image latex screenshots/list_example_01.eps width=\textwidth
|
||||
*
|
||||
* @example list_example_01.c
|
||||
*/
|
||||
|
||||
/**
|
||||
* @page list_example_02 List widget example
|
||||
*
|
||||
* This code places a single Elementary list widgets on a window,
|
||||
* exemplifying a part of the widget's API.
|
||||
*
|
||||
* First, we will just create a simple list, as done on @ref list_example_01 :
|
||||
* @dontinclude list_example_02.c
|
||||
* @skipline lbl
|
||||
* @until }
|
||||
* @skipline elm_list_add
|
||||
* @until elm_list_item_append
|
||||
*
|
||||
* Now, let's customize this list a bit. First we will display items
|
||||
* horizontally:
|
||||
* @skipline horizontal_set
|
||||
*
|
||||
* Then we will choose another list mode. There are four of them, and
|
||||
* the default #Elm_List_Mode is #ELM_LIST_SCROLL. Let's set compress mode:
|
||||
* @skipline mode_set
|
||||
*
|
||||
* To enable multiple items selection, we need to enable it, since only one
|
||||
* selected item is allowed by default:
|
||||
* @skipline elm_list_multi_select_set
|
||||
*
|
||||
* We are not adding items with callback functions here,
|
||||
* since we'll explain it better on @ref list_example_03. But if the callback
|
||||
* need to be called everytime user clicks an item, even if already selected,
|
||||
* it's required to enable this behavior:
|
||||
* @skipline elm_list_always_select_mode_set
|
||||
*
|
||||
* Finally, if a bounce effect is required, or you would like to see
|
||||
* scrollbars, it is possible. But, for default theme, list
|
||||
* scrollbars will be invisible anyway.
|
||||
* @skipline bounce_set
|
||||
* @until SCROLLER_POLICY_ON
|
||||
*
|
||||
* See the full @ref list_example_02.c "list_example_02.c"
|
||||
* code, whose window should look like this picture:
|
||||
*
|
||||
* @image html screenshots/list_example_02.png
|
||||
* @image latex screenshots/list_example_02.eps width=\textwidth
|
||||
*
|
||||
* @example list_example_02.c
|
||||
*/
|
||||
|
||||
/**
|
||||
* @page list_example_03 List - Items management
|
||||
*
|
||||
* This code places a Elementary list widgets on a window,
|
||||
* along with some buttons trigerring actions on it (though its API).
|
||||
* It covers most of Elm_List_Item functions.
|
||||
*
|
||||
* On our @c main function, we are adding a default list with
|
||||
* 3 items. We are only setting their labels (second parameter of function
|
||||
* elm_list_item_append):
|
||||
* @dontinclude list_example_03.c
|
||||
* @skipline elm_list_add
|
||||
* @until Item 2
|
||||
*
|
||||
* Next we are adding lots of buttons, each one for a callback function
|
||||
* that will realize a task covering part of list items API.
|
||||
* Lets check the first one:
|
||||
* @skipline elm_button_add
|
||||
* @until evas_object_show
|
||||
*
|
||||
* We are labeling the button with a task description with
|
||||
* elm_object_text_set() and setting a callback
|
||||
* function evas_object_smart_callback_add().
|
||||
* Each callback function will have the signature:
|
||||
* <tt> static void _task_cb(void *data, Evas_Object *obj,
|
||||
* void *event_info)</tt> with the function name varying for each task.
|
||||
*
|
||||
* Now let's cover all of them.
|
||||
*
|
||||
* <b> Prepending an item: </b>
|
||||
* @dontinclude list_example_03.c
|
||||
* @skipline _prepend_cb
|
||||
* @until }
|
||||
*
|
||||
* The item will be placed on the begining of the list,
|
||||
* i.e. it will be the first one.
|
||||
*
|
||||
* The first parameter of elm_list_item_prepend() is the list
|
||||
* object, that we are receiving as data on our callback function.
|
||||
* The second one is a label, the string that will be placed in the center
|
||||
* of our item. As we don't wan't icons or callback functions, we can
|
||||
* send NULL as third, fourth, fifth and sixth parameters.
|
||||
*
|
||||
* <b> Appending an item: </b>
|
||||
* @dontinclude list_example_03.c
|
||||
* @skipline _add_cb
|
||||
* @until }
|
||||
*
|
||||
* Items included with append will be inserted inserted after the last one.
|
||||
*
|
||||
* <b> Appending an item with icon: </b>
|
||||
* @dontinclude list_example_03.c
|
||||
* @skipline _add_ic_cb
|
||||
* @until }
|
||||
*
|
||||
* If an icon is required, you can pass it as third paramenter on our
|
||||
* elm_list_item_append() function. It will be place on the
|
||||
* left side of item's label. If an icon is wanted on the right side,
|
||||
* it should be passed as fourth parameter.
|
||||
*
|
||||
* For more details about how to create icons, look for elm_icon examples
|
||||
* @ref tutorial_icon.
|
||||
*
|
||||
* <b> Appending an item with callback function for selected: </b>
|
||||
* @dontinclude list_example_03.c
|
||||
* @skipline _sel_cb
|
||||
* @until }
|
||||
* @until }
|
||||
*
|
||||
* To set a callback function that will be called every time an item is
|
||||
* selected, i.e., everytime the list stops with this item in
|
||||
* center position, just pass the function as fifth paramenter.
|
||||
*
|
||||
* <b> Appending an item with callback function for selected with data: </b>
|
||||
* @dontinclude list_example_03.c
|
||||
* @skipline _sel_data_cb
|
||||
* @until }
|
||||
* @until }
|
||||
* @until }
|
||||
* @until }
|
||||
*
|
||||
* If the callback function request an extra data, it can be attached to our
|
||||
* item passing a pointer for data as sixth parameter.
|
||||
* Our function _sel_data_cb will receive it as <tt> void *data </tt>.
|
||||
*
|
||||
* If you want to free this data, or handle that the way you need when the
|
||||
* item is deleted, set a callback function for that, with
|
||||
* elm_list_item_del_cb_set().
|
||||
*
|
||||
* As you can see we check if @c it is not @c NULL after appending it.
|
||||
* If an error happens, we won't try to set a function for it.
|
||||
*
|
||||
* <b> Deleting an item: </b>
|
||||
* @dontinclude list_example_03.c
|
||||
* @skipline _del_cb(
|
||||
* @until }
|
||||
*
|
||||
* To delete an item we simple need to call elm_list_item_del() with
|
||||
* a pointer for such item.
|
||||
*
|
||||
* If you need, you can get selected item with
|
||||
* elm_list_selected_item_get(), that will return a pointer for it.
|
||||
*
|
||||
* <b> Unselecting an item: </b>
|
||||
* @dontinclude list_example_03.c
|
||||
* @skipline _unselect_cb
|
||||
* @until }
|
||||
*
|
||||
* To select an item, you should call elm_list_item_selected_set()
|
||||
* passing @c EINA_TRUE, and to unselect it, @c EINA_FALSE.
|
||||
*
|
||||
* <b> Printing all items: </b>
|
||||
* @dontinclude list_example_03.c
|
||||
* @skipline _print_cb
|
||||
* @until }
|
||||
*
|
||||
* <b> Clearing the list: </b>
|
||||
* @dontinclude list_example_03.c
|
||||
* @skipline _clear_cb
|
||||
* @until }
|
||||
*
|
||||
* <b> Selecting the next item: </b>
|
||||
* @dontinclude list_example_03.c
|
||||
* @skipline _select_next_cb
|
||||
* @until }
|
||||
*
|
||||
* <b> Inserting after an item: </b>
|
||||
* @dontinclude list_example_03.c
|
||||
* @skipline _insert_after_cb
|
||||
* @until }
|
||||
*
|
||||
* <b> Selecting the previous item: </b>
|
||||
* @dontinclude list_example_03.c
|
||||
* @skipline _select_prev_cb
|
||||
* @until }
|
||||
*
|
||||
* <b> Inserting before an item: </b>
|
||||
* @dontinclude list_example_03.c
|
||||
* @skipline _insert_before_cb
|
||||
* @until }
|
||||
*
|
||||
* If a separator is required, just set an item as such:
|
||||
* @dontinclude list_example_03.c
|
||||
* @skipline _set_separator_cb
|
||||
* @until }
|
||||
*
|
||||
* Also an item can be disabled, and the user won't be allowed to (un)select it:
|
||||
* @dontinclude list_example_03.c
|
||||
* @skipline _disable_cb
|
||||
* @until }
|
||||
*
|
||||
* See the full @ref list_example_03.c "list_example_03.c"
|
||||
* code, whose window should look like this picture:
|
||||
*
|
||||
* @image html screenshots/list_example_03.png
|
||||
* @image latex screenshots/list_example_03.eps width=\textwidth
|
||||
*
|
||||
* @example list_example_03.c
|
||||
*/
|
||||
|
||||
/**
|
||||
* @page flipselector_example Flip selector widget example
|
||||
*
|
||||
|
|
File diff suppressed because it is too large
Load Diff
Binary file not shown.
After Width: | Height: | Size: 13 KiB |
|
@ -197,5 +197,10 @@
|
|||
* @image html img/layout-predefined.png
|
||||
* @image latex img/layout-predefined.eps
|
||||
* @li @ref List
|
||||
*
|
||||
* @image html img/widget/list/preview-00.png
|
||||
* @image latex img/widget/list/preview-00.eps
|
||||
* @image html img/list.png
|
||||
* @image latex img/list.eps
|
||||
* @li @ref Table
|
||||
*/
|
||||
|
|
|
@ -39,6 +39,7 @@ widget_preview_fileselector_button2 \
|
|||
widget_preview_fileselector_button3 \
|
||||
widget_preview_colorselector \
|
||||
widget_preview_layout \
|
||||
widget_preview_list \
|
||||
widget_preview_conformant \
|
||||
widget_preview_index \
|
||||
widget_preview_clock \
|
||||
|
@ -113,6 +114,7 @@ EXTRA_DIST = \
|
|||
widget_preview_index.c \
|
||||
widget_preview_label.c \
|
||||
widget_preview_layout.c \
|
||||
widget_preview_list.c \
|
||||
widget_preview_pager.c \
|
||||
widget_preview_separator.c \
|
||||
widget_preview_radio.c \
|
||||
|
|
|
@ -0,0 +1,46 @@
|
|||
#include "widget_preview_tmpl_head.c"
|
||||
|
||||
static const char *dict[] = \
|
||||
{
|
||||
"awkward",
|
||||
"businessman",
|
||||
"cylinder",
|
||||
"dying",
|
||||
"extremophile",
|
||||
"futhark",
|
||||
"guttural",
|
||||
"hypocrites",
|
||||
"issuing",
|
||||
"just",
|
||||
"knows",
|
||||
"lying",
|
||||
"mystery",
|
||||
"nutrients",
|
||||
"oxymoron",
|
||||
"putting",
|
||||
"quizzes",
|
||||
"running",
|
||||
"systematically",
|
||||
"tyranny",
|
||||
"usually",
|
||||
"vacuum",
|
||||
"want",
|
||||
"xenophobia",
|
||||
"yacht",
|
||||
"zebra"
|
||||
};
|
||||
|
||||
Evas_Object *o = elm_list_add(win);
|
||||
evas_object_size_hint_weight_set(o, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
||||
elm_win_resize_object_add(win, o);
|
||||
evas_object_show(o);
|
||||
|
||||
unsigned int i;
|
||||
for (i = 0; i < (sizeof(dict) / sizeof(dict[0])); i++)
|
||||
{
|
||||
char buf[32];
|
||||
elm_list_item_append(o, dict[i], NULL, NULL, NULL, NULL);
|
||||
snprintf(buf, sizeof(buf), "%c", dict[i][0]);
|
||||
}
|
||||
|
||||
#include "widget_preview_tmpl_foot.c"
|
|
@ -66,6 +66,9 @@ SRCS = \
|
|||
layout_example_01.c \
|
||||
layout_example_02.c \
|
||||
layout_example_03.c \
|
||||
list_example_01.c \
|
||||
list_example_02.c \
|
||||
list_example_03.c \
|
||||
flipselector_example.c \
|
||||
fileselector_example.c \
|
||||
fileselector_button_example.c \
|
||||
|
@ -141,6 +144,9 @@ pkglib_PROGRAMS += \
|
|||
layout_example_01 \
|
||||
layout_example_02 \
|
||||
layout_example_03 \
|
||||
list_example_01 \
|
||||
list_example_02 \
|
||||
list_example_03 \
|
||||
ctxpopup_example_01 \
|
||||
flipselector_example \
|
||||
fileselector_example \
|
||||
|
@ -191,6 +197,9 @@ SCREENSHOTS = \
|
|||
layout_example_01:layout_example_01.png:0.0 \
|
||||
layout_example_02:layout_example_02.png:0.0 \
|
||||
layout_example_03:layout_example_03.png:0.0 \
|
||||
list_example_01:list_example_01.png:0.0 \
|
||||
list_example_02:list_example_02.png:0.0 \
|
||||
list_example_03:list_example_03.png:0.0 \
|
||||
flipselector_example:flipselector_example.png:0.0 \
|
||||
fileselector_example:fileselector_example.png:0.0 \
|
||||
index_example_02:index_example_03.png:0.3 \
|
||||
|
|
|
@ -0,0 +1,74 @@
|
|||
/**
|
||||
* Simple Elementary's <b>list widget</b> example, illustrating its
|
||||
* creation.
|
||||
*
|
||||
* See stdout/stderr for output. Compile with:
|
||||
*
|
||||
* @verbatim
|
||||
* gcc -g `pkg-config --cflags --libs elementary` list_example_01.c -o list_example_01
|
||||
* @endverbatim
|
||||
*/
|
||||
|
||||
#include <Elementary.h>
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include "elementary_config.h"
|
||||
#else
|
||||
# define __UNUSED__
|
||||
#endif
|
||||
|
||||
static void
|
||||
_on_done(void *data __UNUSED__,
|
||||
Evas_Object *obj __UNUSED__,
|
||||
void *event_info __UNUSED__)
|
||||
{
|
||||
elm_exit();
|
||||
}
|
||||
|
||||
EAPI int
|
||||
elm_main(int argc __UNUSED__, char **argv __UNUSED__)
|
||||
{
|
||||
Evas_Object *win, *bg, *bx, *li;
|
||||
unsigned int i;
|
||||
static const char *lbl[] =
|
||||
{
|
||||
"Sunday",
|
||||
"Monday",
|
||||
"Tuesday",
|
||||
"Wednesday",
|
||||
"Thursday",
|
||||
"Friday",
|
||||
"Saturday"
|
||||
};
|
||||
|
||||
win = elm_win_add(NULL, "list", ELM_WIN_BASIC);
|
||||
elm_win_title_set(win, "List Example");
|
||||
evas_object_smart_callback_add(win, "delete,request", _on_done, NULL);
|
||||
|
||||
bg = elm_bg_add(win);
|
||||
elm_win_resize_object_add(win, bg);
|
||||
evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
||||
evas_object_show(bg);
|
||||
|
||||
bx = elm_box_add(win);
|
||||
evas_object_size_hint_weight_set(bx, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
||||
evas_object_size_hint_align_set(bx, EVAS_HINT_FILL, EVAS_HINT_FILL);
|
||||
elm_win_resize_object_add(win, bx);
|
||||
evas_object_show(bx);
|
||||
|
||||
li = elm_list_add(win);
|
||||
evas_object_size_hint_weight_set(li, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
||||
evas_object_size_hint_align_set(li, EVAS_HINT_FILL, EVAS_HINT_FILL);
|
||||
elm_box_pack_end(bx, li);
|
||||
for (i = 0; i < sizeof(lbl) / sizeof(lbl[0]); i++)
|
||||
elm_list_item_append(li, lbl[i], NULL, NULL, NULL, NULL);
|
||||
|
||||
evas_object_show(li);
|
||||
elm_list_go(li);
|
||||
|
||||
evas_object_resize(win, 320, 240);
|
||||
evas_object_show(win);
|
||||
|
||||
elm_run();
|
||||
return 0;
|
||||
}
|
||||
ELM_MAIN()
|
|
@ -0,0 +1,88 @@
|
|||
/**
|
||||
* Elementary's <b>list widget</b> example, illustrating its
|
||||
* usage and API.
|
||||
*
|
||||
* See stdout/stderr for output. Compile with:
|
||||
*
|
||||
* @verbatim
|
||||
* gcc -g `pkg-config --cflags --libs elementary` list_example_02.c -o list_example_02
|
||||
* @endverbatim
|
||||
*/
|
||||
|
||||
#include <Elementary.h>
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include "elementary_config.h"
|
||||
#else
|
||||
# define __UNUSED__
|
||||
#endif
|
||||
|
||||
static void
|
||||
_on_done(void *data __UNUSED__,
|
||||
Evas_Object *obj __UNUSED__,
|
||||
void *event_info __UNUSED__)
|
||||
{
|
||||
elm_exit();
|
||||
}
|
||||
|
||||
EAPI int
|
||||
elm_main(int argc __UNUSED__, char **argv __UNUSED__)
|
||||
{
|
||||
Evas_Object *win, *bg, *bx, *li;
|
||||
unsigned int i;
|
||||
static const char *lbl[] =
|
||||
{
|
||||
"Sunday",
|
||||
"Monday",
|
||||
"Tuesday",
|
||||
"Wednesday",
|
||||
"Thursday",
|
||||
"Friday",
|
||||
"Saturday"
|
||||
};
|
||||
|
||||
win = elm_win_add(NULL, "list", ELM_WIN_BASIC);
|
||||
elm_win_title_set(win, "List Example");
|
||||
evas_object_smart_callback_add(win, "delete,request", _on_done, NULL);
|
||||
|
||||
bg = elm_bg_add(win);
|
||||
elm_win_resize_object_add(win, bg);
|
||||
evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
||||
evas_object_show(bg);
|
||||
|
||||
bx = elm_box_add(win);
|
||||
evas_object_size_hint_weight_set(bx, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
||||
evas_object_size_hint_align_set(bx, EVAS_HINT_FILL, EVAS_HINT_FILL);
|
||||
elm_win_resize_object_add(win, bx);
|
||||
evas_object_show(bx);
|
||||
|
||||
/* default */
|
||||
li = elm_list_add(win);
|
||||
evas_object_size_hint_weight_set(li, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
||||
evas_object_size_hint_align_set(li, EVAS_HINT_FILL, EVAS_HINT_FILL);
|
||||
elm_box_pack_end(bx, li);
|
||||
for (i = 0; i < sizeof(lbl) / sizeof(lbl[0]); i++)
|
||||
elm_list_item_append(li, lbl[i], NULL, NULL, NULL, NULL);
|
||||
|
||||
/* display horizontally and set compress mode */
|
||||
elm_list_horizontal_set(li, EINA_TRUE);
|
||||
elm_list_mode_set(li, ELM_LIST_COMPRESS);
|
||||
|
||||
/* enable multiple selection and always select */
|
||||
elm_list_multi_select_set(li, EINA_TRUE);
|
||||
elm_list_always_select_mode_set(li, EINA_TRUE);
|
||||
|
||||
/* set bounce and scroller policy */
|
||||
elm_list_bounce_set(li, EINA_TRUE, EINA_TRUE);
|
||||
elm_list_scroller_policy_set(li, ELM_SCROLLER_POLICY_AUTO,
|
||||
ELM_SCROLLER_POLICY_ON);
|
||||
|
||||
elm_list_go(li);
|
||||
evas_object_show(li);
|
||||
|
||||
evas_object_resize(win, 320, 120);
|
||||
evas_object_show(win);
|
||||
|
||||
elm_run();
|
||||
return 0;
|
||||
}
|
||||
ELM_MAIN()
|
|
@ -0,0 +1,444 @@
|
|||
/**
|
||||
* Elementary's <b>list widget</b> example, illustrating its API,
|
||||
* covering most of item functions.
|
||||
*
|
||||
* See stdout/stderr for output. Compile with:
|
||||
*
|
||||
* @verbatim
|
||||
* gcc -g `pkg-config --cflags --libs elementary` list_example_03.c -o list_example_03
|
||||
* @endverbatim
|
||||
*/
|
||||
|
||||
#include <Elementary.h>
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include "elementary_config.h"
|
||||
#else
|
||||
# define __UNUSED__
|
||||
#endif
|
||||
|
||||
static int counter = 3;
|
||||
|
||||
static void
|
||||
_on_done(void *data __UNUSED__,
|
||||
Evas_Object *obj __UNUSED__,
|
||||
void *event_info __UNUSED__)
|
||||
{
|
||||
elm_exit();
|
||||
}
|
||||
|
||||
static void
|
||||
_prepend_cb(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
|
||||
{
|
||||
Elm_List_Item *it;
|
||||
Evas_Object *li = data;
|
||||
char label[32];
|
||||
|
||||
snprintf(label, sizeof(label), "Item %i", counter++);
|
||||
it = elm_list_item_prepend(li, label, NULL, NULL, NULL, NULL);
|
||||
if (!it)
|
||||
printf("Error adding item\n");
|
||||
}
|
||||
|
||||
static void
|
||||
_add_cb(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
|
||||
{
|
||||
Elm_List_Item *it;
|
||||
Evas_Object *li = data;
|
||||
char label[32];
|
||||
|
||||
snprintf(label, sizeof(label), "Item %i", counter++);
|
||||
it = elm_list_item_append(li, label, NULL, NULL, NULL, NULL);
|
||||
if (!it)
|
||||
printf("Error adding item\n");
|
||||
}
|
||||
|
||||
static void
|
||||
_add_ic_cb(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
|
||||
{
|
||||
Elm_List_Item *it;
|
||||
Evas_Object *ic, *li = data;
|
||||
char label[32];
|
||||
|
||||
snprintf(label, sizeof(label), "Item %i", counter++);
|
||||
ic = elm_icon_add(li);
|
||||
elm_icon_standard_set(ic, "home");
|
||||
elm_icon_scale_set(ic, EINA_FALSE, EINA_FALSE);
|
||||
|
||||
it = elm_list_item_append(li, label, ic, NULL, NULL, NULL);
|
||||
if (!it)
|
||||
printf("Error adding item with icon\n");
|
||||
}
|
||||
|
||||
static void
|
||||
_sel_cb(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info)
|
||||
{
|
||||
Elm_List_Item *it = event_info;
|
||||
printf("Selected label: %s\n", elm_list_item_label_get(it));
|
||||
}
|
||||
|
||||
static void
|
||||
_add_func_cb(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
|
||||
{
|
||||
Elm_List_Item *it;
|
||||
Evas_Object *li = data;
|
||||
char label[32];
|
||||
|
||||
snprintf(label, sizeof(label), "Item %i", counter++);
|
||||
it = elm_list_item_append(li, label, NULL, NULL, _sel_cb, NULL);
|
||||
if (!it)
|
||||
printf("Error adding item\n");
|
||||
}
|
||||
|
||||
static void
|
||||
_sel_data_cb(void *data, Evas_Object *obj __UNUSED__, void *event_info)
|
||||
{
|
||||
char *content = data;
|
||||
Elm_List_Item *it = event_info;
|
||||
printf("Selected label: %s with data: %s\n",
|
||||
elm_list_item_label_get(it), content);
|
||||
}
|
||||
|
||||
static void
|
||||
_free_data(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
|
||||
{
|
||||
free(data);
|
||||
}
|
||||
|
||||
static void
|
||||
_add_data_cb(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
|
||||
{
|
||||
Elm_List_Item *it;
|
||||
Evas_Object *li = data;
|
||||
char label[32];
|
||||
char *content = malloc(sizeof(char) * 32);
|
||||
|
||||
snprintf(content, 32, "Item content %i", counter);
|
||||
snprintf(label, sizeof(label), "Item %i", counter++);
|
||||
it = elm_list_item_append(li, label, NULL, NULL, _sel_data_cb, content);
|
||||
if (!it) {
|
||||
printf("Error adding item\n");
|
||||
return;
|
||||
}
|
||||
elm_list_item_del_cb_set(it, _free_data);
|
||||
}
|
||||
|
||||
static void
|
||||
_del_cb(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
|
||||
{
|
||||
Elm_List_Item *selected_item;
|
||||
Evas_Object *li = data;
|
||||
|
||||
selected_item = elm_list_selected_item_get(li);
|
||||
elm_list_item_del(selected_item);
|
||||
}
|
||||
|
||||
static void
|
||||
_unselect_cb(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
|
||||
{
|
||||
Elm_List_Item *selected_item;
|
||||
Evas_Object *li = data;
|
||||
|
||||
selected_item = elm_list_selected_item_get(li);
|
||||
elm_list_item_selected_set(selected_item, EINA_FALSE);
|
||||
}
|
||||
|
||||
static void
|
||||
_print_cb(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
|
||||
{
|
||||
const Eina_List *l, *items;
|
||||
Elm_List_Item *it;
|
||||
Evas_Object *li = data;
|
||||
|
||||
items = elm_list_items_get(li);
|
||||
EINA_LIST_FOREACH(items, l, it)
|
||||
printf("%s\n", elm_list_item_label_get(it));
|
||||
}
|
||||
|
||||
static void
|
||||
_clear_cb(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
|
||||
{
|
||||
Evas_Object *li = data;
|
||||
elm_list_clear(li);
|
||||
}
|
||||
|
||||
static void
|
||||
_select_next_cb(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
|
||||
{
|
||||
Elm_List_Item *selected_item, *next_item;
|
||||
Evas_Object *li = data;
|
||||
|
||||
selected_item = elm_list_selected_item_get(li);
|
||||
if (!selected_item) return;
|
||||
|
||||
next_item = elm_list_item_next(selected_item);
|
||||
if (next_item)
|
||||
elm_list_item_selected_set(next_item, EINA_TRUE);
|
||||
}
|
||||
|
||||
static void
|
||||
_insert_after_cb(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
|
||||
{
|
||||
Elm_List_Item *selected_item, *it;
|
||||
Evas_Object *li = data;
|
||||
char label[32];
|
||||
|
||||
selected_item = elm_list_selected_item_get(li);
|
||||
if (!selected_item) return;
|
||||
|
||||
snprintf(label, sizeof(label), "Item %i", counter++);
|
||||
it = elm_list_item_insert_after(li, selected_item, label, NULL, NULL, NULL,
|
||||
NULL);
|
||||
if (!it)
|
||||
printf("Error adding item\n");
|
||||
}
|
||||
|
||||
static void
|
||||
_select_prev_cb(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
|
||||
{
|
||||
Elm_List_Item *selected_item, *prev_item;
|
||||
Evas_Object *li = data;
|
||||
|
||||
selected_item = elm_list_selected_item_get(li);
|
||||
if (!selected_item) return;
|
||||
|
||||
prev_item = elm_list_item_prev(selected_item);
|
||||
if (prev_item)
|
||||
elm_list_item_selected_set(prev_item, EINA_TRUE);
|
||||
}
|
||||
|
||||
static void
|
||||
_insert_before_cb(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
|
||||
{
|
||||
Elm_List_Item *selected_item, *it;
|
||||
Evas_Object *li = data;
|
||||
char label[32];
|
||||
|
||||
selected_item = elm_list_selected_item_get(li);
|
||||
if (!selected_item) return;
|
||||
|
||||
snprintf(label, sizeof(label), "Item %i", counter++);
|
||||
it = elm_list_item_insert_before(li, selected_item, label, NULL, NULL,
|
||||
NULL, NULL);
|
||||
if (!it)
|
||||
printf("Error adding item\n");
|
||||
}
|
||||
|
||||
static void
|
||||
_set_separator_cb(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
|
||||
{
|
||||
Elm_List_Item *selected_item;
|
||||
Evas_Object *li = data;
|
||||
|
||||
selected_item = elm_list_selected_item_get(li);
|
||||
if (!selected_item) return;
|
||||
elm_list_item_separator_set(selected_item, EINA_TRUE);
|
||||
}
|
||||
|
||||
static void
|
||||
_disable_cb(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
|
||||
{
|
||||
Elm_List_Item *selected_item;
|
||||
Evas_Object *li = data;
|
||||
|
||||
selected_item = elm_list_selected_item_get(li);
|
||||
if (!selected_item) return;
|
||||
elm_list_item_disabled_set(selected_item, EINA_TRUE);
|
||||
}
|
||||
|
||||
EAPI int
|
||||
elm_main(int argc __UNUSED__, char **argv __UNUSED__)
|
||||
{
|
||||
Evas_Object *win, *bg, *bx, *hbx, *li, *bt;
|
||||
|
||||
win = elm_win_add(NULL, "list", ELM_WIN_BASIC);
|
||||
elm_win_title_set(win, "List Items Example");
|
||||
evas_object_smart_callback_add(win, "delete,request", _on_done, NULL);
|
||||
|
||||
bg = elm_bg_add(win);
|
||||
elm_win_resize_object_add(win, bg);
|
||||
evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
||||
evas_object_show(bg);
|
||||
|
||||
bx = elm_box_add(win);
|
||||
evas_object_size_hint_weight_set(bx, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
||||
elm_win_resize_object_add(win, bx);
|
||||
evas_object_show(bx);
|
||||
|
||||
li = elm_list_add(win);
|
||||
evas_object_size_hint_weight_set(li, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
||||
evas_object_size_hint_align_set(li, EVAS_HINT_FILL, EVAS_HINT_FILL);
|
||||
elm_box_pack_end(bx, li);
|
||||
|
||||
elm_list_item_append(li, "Item 0", NULL, NULL, NULL, NULL);
|
||||
elm_list_item_append(li, "Item 1", NULL, NULL, NULL, NULL);
|
||||
elm_list_item_append(li, "Item 2", NULL, NULL, NULL, NULL);
|
||||
|
||||
hbx = elm_box_add(win);
|
||||
elm_box_horizontal_set(hbx, EINA_TRUE);
|
||||
evas_object_size_hint_weight_set(hbx, EVAS_HINT_EXPAND, 0);
|
||||
evas_object_size_hint_align_set(hbx, EVAS_HINT_FILL, 0);
|
||||
elm_box_pack_end(bx, hbx);
|
||||
evas_object_show(hbx);
|
||||
|
||||
bt = elm_button_add(win);
|
||||
elm_object_text_set(bt, "Prepend item");
|
||||
evas_object_smart_callback_add(bt, "clicked", _prepend_cb, li);
|
||||
elm_box_pack_end(hbx, bt);
|
||||
evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND, 0);
|
||||
evas_object_size_hint_align_set(bt, EVAS_HINT_FILL, 0);
|
||||
evas_object_show(bt);
|
||||
|
||||
bt = elm_button_add(win);
|
||||
elm_object_text_set(bt, "Append item");
|
||||
evas_object_smart_callback_add(bt, "clicked", _add_cb, li);
|
||||
elm_box_pack_end(hbx, bt);
|
||||
evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND, 0);
|
||||
evas_object_size_hint_align_set(bt, EVAS_HINT_FILL, 0);
|
||||
evas_object_show(bt);
|
||||
|
||||
hbx = elm_box_add(win);
|
||||
elm_box_horizontal_set(hbx, EINA_TRUE);
|
||||
evas_object_size_hint_weight_set(hbx, EVAS_HINT_EXPAND, 0);
|
||||
evas_object_size_hint_align_set(hbx, EVAS_HINT_FILL, 0);
|
||||
elm_box_pack_end(bx, hbx);
|
||||
evas_object_show(hbx);
|
||||
|
||||
bt = elm_button_add(win);
|
||||
elm_object_text_set(bt, "Append with icon");
|
||||
evas_object_smart_callback_add(bt, "clicked", _add_ic_cb, li);
|
||||
elm_box_pack_end(hbx, bt);
|
||||
evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND, 0);
|
||||
evas_object_size_hint_align_set(bt, EVAS_HINT_FILL, 0);
|
||||
evas_object_show(bt);
|
||||
|
||||
bt = elm_button_add(win);
|
||||
elm_object_text_set(bt, "Append with selected function");
|
||||
evas_object_smart_callback_add(bt, "clicked", _add_func_cb, li);
|
||||
elm_box_pack_end(hbx, bt);
|
||||
evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND, 0);
|
||||
evas_object_size_hint_align_set(bt, EVAS_HINT_FILL, 0);
|
||||
evas_object_show(bt);
|
||||
|
||||
bt = elm_button_add(win);
|
||||
elm_object_text_set(bt, "Append with data");
|
||||
evas_object_smart_callback_add(bt, "clicked", _add_data_cb, li);
|
||||
elm_box_pack_end(hbx, bt);
|
||||
evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND, 0);
|
||||
evas_object_size_hint_align_set(bt, EVAS_HINT_FILL, 0);
|
||||
evas_object_show(bt);
|
||||
|
||||
hbx = elm_box_add(win);
|
||||
elm_box_horizontal_set(hbx, EINA_TRUE);
|
||||
evas_object_size_hint_weight_set(hbx, EVAS_HINT_EXPAND, 0);
|
||||
evas_object_size_hint_align_set(hbx, EVAS_HINT_FILL, 0);
|
||||
elm_box_pack_end(bx, hbx);
|
||||
evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND, 0);
|
||||
evas_object_size_hint_align_set(bt, EVAS_HINT_FILL, 0);
|
||||
evas_object_show(hbx);
|
||||
|
||||
bt = elm_button_add(win);
|
||||
elm_object_text_set(bt, "Delete item");
|
||||
evas_object_smart_callback_add(bt, "clicked", _del_cb, li);
|
||||
elm_box_pack_end(hbx, bt);
|
||||
evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND, 0);
|
||||
evas_object_size_hint_align_set(bt, EVAS_HINT_FILL, 0);
|
||||
evas_object_show(bt);
|
||||
|
||||
bt = elm_button_add(win);
|
||||
elm_object_text_set(bt, "Unselect item");
|
||||
evas_object_smart_callback_add(bt, "clicked", _unselect_cb, li);
|
||||
elm_box_pack_end(hbx, bt);
|
||||
evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND, 0);
|
||||
evas_object_size_hint_align_set(bt, EVAS_HINT_FILL, 0);
|
||||
evas_object_show(bt);
|
||||
|
||||
bt = elm_button_add(win);
|
||||
elm_object_text_set(bt, "Print items");
|
||||
evas_object_smart_callback_add(bt, "clicked", _print_cb, li);
|
||||
elm_box_pack_end(hbx, bt);
|
||||
evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND, 0);
|
||||
evas_object_size_hint_align_set(bt, EVAS_HINT_FILL, 0);
|
||||
evas_object_show(bt);
|
||||
|
||||
bt = elm_button_add(win);
|
||||
elm_object_text_set(bt, "Clear");
|
||||
evas_object_smart_callback_add(bt, "clicked", _clear_cb, li);
|
||||
elm_box_pack_end(hbx, bt);
|
||||
evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND, 0);
|
||||
evas_object_size_hint_align_set(bt, EVAS_HINT_FILL, 0);
|
||||
evas_object_show(bt);
|
||||
|
||||
hbx = elm_box_add(win);
|
||||
elm_box_horizontal_set(hbx, EINA_TRUE);
|
||||
evas_object_size_hint_weight_set(hbx, EVAS_HINT_EXPAND, 0);
|
||||
evas_object_size_hint_align_set(hbx, EVAS_HINT_FILL, 0);
|
||||
elm_box_pack_end(bx, hbx);
|
||||
evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND, 0);
|
||||
evas_object_size_hint_align_set(bt, EVAS_HINT_FILL, 0);
|
||||
evas_object_show(hbx);
|
||||
|
||||
bt = elm_button_add(win);
|
||||
elm_object_text_set(bt, "Select next item");
|
||||
evas_object_smart_callback_add(bt, "clicked", _select_next_cb, li);
|
||||
elm_box_pack_end(hbx, bt);
|
||||
evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND, 0);
|
||||
evas_object_size_hint_align_set(bt, EVAS_HINT_FILL, 0);
|
||||
evas_object_show(bt);
|
||||
|
||||
bt = elm_button_add(win);
|
||||
elm_object_text_set(bt, "Insert after item");
|
||||
evas_object_smart_callback_add(bt, "clicked", _insert_after_cb, li);
|
||||
elm_box_pack_end(hbx, bt);
|
||||
evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND, 0);
|
||||
evas_object_size_hint_align_set(bt, EVAS_HINT_FILL, 0);
|
||||
evas_object_show(bt);
|
||||
|
||||
bt = elm_button_add(win);
|
||||
elm_object_text_set(bt, "Select previous item");
|
||||
evas_object_smart_callback_add(bt, "clicked", _select_prev_cb, li);
|
||||
elm_box_pack_end(hbx, bt);
|
||||
evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND, 0);
|
||||
evas_object_size_hint_align_set(bt, EVAS_HINT_FILL, 0);
|
||||
evas_object_show(bt);
|
||||
|
||||
bt = elm_button_add(win);
|
||||
elm_object_text_set(bt, "Insert before item");
|
||||
evas_object_smart_callback_add(bt, "clicked", _insert_before_cb, li);
|
||||
elm_box_pack_end(hbx, bt);
|
||||
evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND, 0);
|
||||
evas_object_size_hint_align_set(bt, EVAS_HINT_FILL, 0);
|
||||
evas_object_show(bt);
|
||||
|
||||
hbx = elm_box_add(win);
|
||||
elm_box_horizontal_set(hbx, EINA_TRUE);
|
||||
evas_object_size_hint_weight_set(hbx, EVAS_HINT_EXPAND, 0);
|
||||
evas_object_size_hint_align_set(hbx, EVAS_HINT_FILL, 0);
|
||||
elm_box_pack_end(bx, hbx);
|
||||
evas_object_show(hbx);
|
||||
|
||||
bt = elm_button_add(win);
|
||||
elm_object_text_set(bt, "Set as separator");
|
||||
evas_object_smart_callback_add(bt, "clicked", _set_separator_cb, li);
|
||||
elm_box_pack_end(hbx, bt);
|
||||
evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND, 0);
|
||||
evas_object_size_hint_align_set(bt, EVAS_HINT_FILL, 0);
|
||||
evas_object_show(bt);
|
||||
|
||||
bt = elm_button_add(win);
|
||||
elm_object_text_set(bt, "Disable item");
|
||||
evas_object_smart_callback_add(bt, "clicked", _disable_cb, li);
|
||||
elm_box_pack_end(hbx, bt);
|
||||
evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND, 0);
|
||||
evas_object_size_hint_align_set(bt, EVAS_HINT_FILL, 0);
|
||||
evas_object_show(bt);
|
||||
|
||||
elm_list_go(li);
|
||||
evas_object_show(li);
|
||||
|
||||
evas_object_resize(win, 320, 600);
|
||||
evas_object_show(win);
|
||||
|
||||
elm_run();
|
||||
return 0;
|
||||
}
|
||||
ELM_MAIN()
|
File diff suppressed because it is too large
Load Diff
|
@ -3,24 +3,6 @@
|
|||
|
||||
#define SWIPE_MOVES 12
|
||||
|
||||
/**
|
||||
* @defgroup List List
|
||||
*
|
||||
* A list is a very simple type of list widget. For more robust
|
||||
* lists, @ref Genlist should probably be used.
|
||||
*
|
||||
* Signals that you can add callbacks for are:
|
||||
*
|
||||
* "clicked,double" - when the user double-clicked an item
|
||||
* "selected" - when the user selected an item
|
||||
* "unselected" - when the user selected an item
|
||||
* "longpressed" - an item in the hoversel list is long-pressed
|
||||
* "scroll,edge,top" - the list is scrolled until the top edge
|
||||
* "scroll,edge,bottom" - the list is scrolled until the bottom edge
|
||||
* "scroll,edge,left" - the list is scrolled until the left edge
|
||||
* "scroll,edge,right" - the list is scrolled until the right edge
|
||||
*/
|
||||
|
||||
typedef struct _Widget_Data Widget_Data;
|
||||
|
||||
struct _Widget_Data
|
||||
|
@ -1299,14 +1281,6 @@ _resize(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__, void *event
|
|||
_sizing_eval(data);
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds a list object.
|
||||
*
|
||||
* @param parent The parent object
|
||||
* @return The created object or NULL upon failure
|
||||
*
|
||||
* @ingroup List
|
||||
*/
|
||||
EAPI Evas_Object *
|
||||
elm_list_add(Evas_Object *parent)
|
||||
{
|
||||
|
@ -1379,20 +1353,6 @@ elm_list_add(Evas_Object *parent)
|
|||
return obj;
|
||||
}
|
||||
|
||||
/**
|
||||
* Appends an item to the list object.
|
||||
*
|
||||
* @param obj The list object
|
||||
* @param label The label of the list item
|
||||
* @param icon The icon object to use for the left side of the item
|
||||
* @param end The icon object to use for the right side of the item
|
||||
* @param func The function to call when the item is clicked
|
||||
* @param data The data to associate with the item for related callbacks
|
||||
*
|
||||
* @return The created item or NULL upon failure
|
||||
*
|
||||
* @ingroup List
|
||||
*/
|
||||
EAPI Elm_List_Item *
|
||||
elm_list_item_append(Evas_Object *obj, const char *label, Evas_Object *icon, Evas_Object *end, Evas_Smart_Cb func, const void *data)
|
||||
{
|
||||
|
@ -1406,20 +1366,6 @@ elm_list_item_append(Evas_Object *obj, const char *label, Evas_Object *icon, Eva
|
|||
return it;
|
||||
}
|
||||
|
||||
/**
|
||||
* Prepends an item to the list object.
|
||||
*
|
||||
* @param obj The list object
|
||||
* @param label The label of the list item
|
||||
* @param icon The icon object to use for the left side of the item
|
||||
* @param end The icon object to use for the right side of the item
|
||||
* @param func The function to call when the item is clicked
|
||||
* @param data The data to associate with the item for related callbacks
|
||||
*
|
||||
* @return The created item or NULL upon failure
|
||||
*
|
||||
* @ingroup List
|
||||
*/
|
||||
EAPI Elm_List_Item *
|
||||
elm_list_item_prepend(Evas_Object *obj, const char *label, Evas_Object *icon, Evas_Object *end, Evas_Smart_Cb func, const void *data)
|
||||
{
|
||||
|
@ -1433,21 +1379,6 @@ elm_list_item_prepend(Evas_Object *obj, const char *label, Evas_Object *icon, Ev
|
|||
return it;
|
||||
}
|
||||
|
||||
/**
|
||||
* Inserts an item into the list object before @p before.
|
||||
*
|
||||
* @param obj The list object
|
||||
* @param before The list item to insert before
|
||||
* @param label The label of the list item
|
||||
* @param icon The icon object to use for the left side of the item
|
||||
* @param end The icon object to use for the right side of the item
|
||||
* @param func The function to call when the item is clicked
|
||||
* @param data The data to associate with the item for related callbacks
|
||||
*
|
||||
* @return The created item or NULL upon failure
|
||||
*
|
||||
* @ingroup List
|
||||
*/
|
||||
EAPI Elm_List_Item *
|
||||
elm_list_item_insert_before(Evas_Object *obj, Elm_List_Item *before, const char *label, Evas_Object *icon, Evas_Object *end, Evas_Smart_Cb func, const void *data)
|
||||
{
|
||||
|
@ -1468,21 +1399,6 @@ elm_list_item_insert_before(Evas_Object *obj, Elm_List_Item *before, const char
|
|||
return it;
|
||||
}
|
||||
|
||||
/**
|
||||
* Inserts an item into the list object after @p after.
|
||||
*
|
||||
* @param obj The list object
|
||||
* @param after The list item to insert after
|
||||
* @param label The label of the list item
|
||||
* @param icon The icon object to use for the left side of the item
|
||||
* @param end The icon object to use for the right side of the item
|
||||
* @param func The function to call when the item is clicked
|
||||
* @param data The data to associate with the item for related callbacks
|
||||
*
|
||||
* @return The created item or NULL upon failure
|
||||
*
|
||||
* @ingroup List
|
||||
*/
|
||||
EAPI Elm_List_Item *
|
||||
elm_list_item_insert_after(Evas_Object *obj, Elm_List_Item *after, const char *label, Evas_Object *icon, Evas_Object *end, Evas_Smart_Cb func, const void *data)
|
||||
{
|
||||
|
@ -1503,21 +1419,6 @@ elm_list_item_insert_after(Evas_Object *obj, Elm_List_Item *after, const char *l
|
|||
return it;
|
||||
}
|
||||
|
||||
/**
|
||||
* Insert a new item into the sorted list object.
|
||||
*
|
||||
* @param obj The list object
|
||||
* @param label The label of the list item
|
||||
* @param icon The icon object to use for the left side of the item
|
||||
* @param end The icon object to use for the right side of the item
|
||||
* @param func The function to call when the item is clicked
|
||||
* @param data The data to associate with the item for related callbacks
|
||||
* @param cmp_func The function called for the sort.
|
||||
*
|
||||
* @return The created item or NULL upon failure
|
||||
*
|
||||
* @ingroup List
|
||||
*/
|
||||
EAPI Elm_List_Item *
|
||||
elm_list_item_sorted_insert(Evas_Object *obj, const char *label, Evas_Object *icon, Evas_Object *end, Evas_Smart_Cb func, const void *data, Eina_Compare_Cb cmp_func)
|
||||
{
|
||||
|
@ -1543,13 +1444,6 @@ elm_list_item_sorted_insert(Evas_Object *obj, const char *label, Evas_Object *ic
|
|||
return it;
|
||||
}
|
||||
|
||||
/**
|
||||
* Clears a list of all items.
|
||||
*
|
||||
* @param obj The list object
|
||||
*
|
||||
* @ingroup List
|
||||
*/
|
||||
EAPI void
|
||||
elm_list_clear(Evas_Object *obj)
|
||||
{
|
||||
|
@ -1592,13 +1486,6 @@ elm_list_clear(Evas_Object *obj)
|
|||
evas_object_unref(obj);
|
||||
}
|
||||
|
||||
/**
|
||||
* Starts the list. Call before running show() on the list object.
|
||||
*
|
||||
* @param obj The list object
|
||||
*
|
||||
* @ingroup List
|
||||
*/
|
||||
EAPI void
|
||||
elm_list_go(Evas_Object *obj)
|
||||
{
|
||||
|
@ -1608,14 +1495,6 @@ elm_list_go(Evas_Object *obj)
|
|||
_fix_items(obj);
|
||||
}
|
||||
|
||||
/**
|
||||
* Enables/disables the state of multi-select on the list object.
|
||||
*
|
||||
* @param obj The list object
|
||||
* @param multi If true, multi-select is enabled
|
||||
*
|
||||
* @ingroup List
|
||||
*/
|
||||
EAPI void
|
||||
elm_list_multi_select_set(Evas_Object *obj, Eina_Bool multi)
|
||||
{
|
||||
|
@ -1625,14 +1504,6 @@ elm_list_multi_select_set(Evas_Object *obj, Eina_Bool multi)
|
|||
wd->multi = multi;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the state of multi-select on the list object.
|
||||
*
|
||||
* @param obj The list object
|
||||
* @return If true, multi-select is enabled
|
||||
*
|
||||
* @ingroup List
|
||||
*/
|
||||
EAPI Eina_Bool
|
||||
elm_list_multi_select_get(const Evas_Object *obj)
|
||||
{
|
||||
|
@ -1642,35 +1513,6 @@ elm_list_multi_select_get(const Evas_Object *obj)
|
|||
return wd->multi;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set which mode to use for the list with.
|
||||
*
|
||||
* @param obj The list object
|
||||
* @param mode One of @c ELM_LIST_COMPRESS, @c ELM_LIST_SCROLL, @c
|
||||
* ELM_LIST_LIMIT or @c ELM_LIST_EXPAND.
|
||||
*
|
||||
* @note Default value is @c ELM_LIST_SCROLL. At this mode, the list
|
||||
* object won't set any of its size hints to inform how a possible
|
||||
* container should resize it. Then, if it's not created as a "resize
|
||||
* object", it might end with zero dimensions. The list will respect
|
||||
* the container's geometry and, if any of its items won't fit into
|
||||
* its transverse axis, one will be able to scroll it in that
|
||||
* direction. @c ELM_LIST_COMPRESS is the same as the previous, except
|
||||
* that it <b>won't</b> let one scroll in the transverse axis, on
|
||||
* those cases (large items will get cropped). @c ELM_LIST_LIMIT will
|
||||
* actually set a minimun size hint on the list object, so that
|
||||
* containers may respect it (and resize itself to fit the child
|
||||
* properly). More specifically, a minimum size hint will be set for
|
||||
* its transverse axis, so that the <b>largest</b> item in that
|
||||
* direction fits well. @c ELM_LIST_EXPAND, besides setting a minimum
|
||||
* size on the transverse axis, just like the previous mode, will set
|
||||
* a minimum size on the longitudinal axis too, trying to reserve
|
||||
* space to all its children to be visible at a time. The last two
|
||||
* modes can always have effects bounded by setting the list object's
|
||||
* maximum size hints, though.
|
||||
*
|
||||
* @ingroup List
|
||||
*/
|
||||
EAPI void
|
||||
elm_list_mode_set(Evas_Object *obj, Elm_List_Mode mode)
|
||||
{
|
||||
|
@ -1688,17 +1530,6 @@ elm_list_mode_set(Evas_Object *obj, Elm_List_Mode mode)
|
|||
_elm_list_mode_set_internal(wd);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the mode the list is at.
|
||||
*
|
||||
* @param obj The list object
|
||||
* @return mode One of @c ELM_LIST_COMPRESS, @c ELM_LIST_SCROLL or @c
|
||||
* ELM_LIST_LIMIT (@c ELM_LIST_LAST on errors).
|
||||
*
|
||||
* @note see elm_list_mode_set() for more information.
|
||||
*
|
||||
* @ingroup List
|
||||
*/
|
||||
EAPI Elm_List_Mode
|
||||
elm_list_mode_get(const Evas_Object *obj)
|
||||
{
|
||||
|
@ -1708,18 +1539,6 @@ elm_list_mode_get(const Evas_Object *obj)
|
|||
return wd->mode;
|
||||
}
|
||||
|
||||
/**
|
||||
* Enables/disables horizontal mode of the list.
|
||||
*
|
||||
* @param obj The list object
|
||||
* @param mode If true, horizontale mode is enabled
|
||||
*
|
||||
* @note Bounce options for the list will be reset to default values
|
||||
* with this funcion. Re-call elm_list_bounce_set() once more after
|
||||
* this one, if you had custom values.
|
||||
*
|
||||
* @ingroup List
|
||||
*/
|
||||
EAPI void
|
||||
elm_list_horizontal_set(Evas_Object *obj, Eina_Bool horizontal)
|
||||
{
|
||||
|
@ -1754,17 +1573,6 @@ elm_list_horizontal_set(Evas_Object *obj, Eina_Bool horizontal)
|
|||
_elm_list_mode_set_internal(wd);
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieve whether horizontal mode is enabled for a list.
|
||||
*
|
||||
* @param obj The list object
|
||||
* @return @c EINA_TRUE, if horizontal mode is enabled and @c
|
||||
* EINA_FALSE, otherwise.
|
||||
*
|
||||
* @note see elm_list_horizontal_set() for more information.
|
||||
*
|
||||
* @ingroup List
|
||||
*/
|
||||
EAPI Eina_Bool
|
||||
elm_list_horizontal_get(const Evas_Object *obj)
|
||||
{
|
||||
|
@ -1779,15 +1587,6 @@ elm_list_horizontal_get(const Evas_Object *obj)
|
|||
return wd->h_mode;
|
||||
}
|
||||
|
||||
/**
|
||||
* Enables/disables the state of always_select, meaning that
|
||||
* an item will always be selected.
|
||||
*
|
||||
* @param obj The list object
|
||||
* @param always_select If true, always_select is enabled
|
||||
*
|
||||
* @ingroup List
|
||||
*/
|
||||
EAPI void
|
||||
elm_list_always_select_mode_set(Evas_Object *obj, Eina_Bool always_select)
|
||||
{
|
||||
|
@ -1797,15 +1596,6 @@ elm_list_always_select_mode_set(Evas_Object *obj, Eina_Bool always_select)
|
|||
wd->always_select = always_select;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the state of always_select.
|
||||
* See also elm_list_always_select_mode_set()
|
||||
*
|
||||
* @param obj The list object
|
||||
* @return If true, always_select is enabled
|
||||
*
|
||||
* @ingroup List
|
||||
*/
|
||||
EAPI Eina_Bool
|
||||
elm_list_always_select_mode_get(const Evas_Object *obj)
|
||||
{
|
||||
|
@ -1815,14 +1605,6 @@ elm_list_always_select_mode_get(const Evas_Object *obj)
|
|||
return wd->always_select;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a list of all the list items.
|
||||
*
|
||||
* @param obj The list object
|
||||
* @return An Eina_List* of the list items, or NULL on failure
|
||||
*
|
||||
* @ingroup List
|
||||
*/
|
||||
EAPI const Eina_List *
|
||||
elm_list_items_get(const Evas_Object *obj)
|
||||
{
|
||||
|
@ -1832,14 +1614,6 @@ elm_list_items_get(const Evas_Object *obj)
|
|||
return wd->items;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the currently selected list item.
|
||||
*
|
||||
* @param obj The list object
|
||||
* @return The selected list item, or NULL on failure
|
||||
*
|
||||
* @ingroup List
|
||||
*/
|
||||
EAPI Elm_List_Item *
|
||||
elm_list_selected_item_get(const Evas_Object *obj)
|
||||
{
|
||||
|
@ -1850,14 +1624,6 @@ elm_list_selected_item_get(const Evas_Object *obj)
|
|||
return NULL;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a list of the currently selected list items.
|
||||
*
|
||||
* @param obj The list object
|
||||
* @return An Eina_List* of the selected list items, or NULL on failure
|
||||
*
|
||||
* @ingroup List
|
||||
*/
|
||||
EAPI const Eina_List *
|
||||
elm_list_selected_items_get(const Evas_Object *obj)
|
||||
{
|
||||
|
@ -1867,12 +1633,6 @@ elm_list_selected_items_get(const Evas_Object *obj)
|
|||
return wd->selected;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets if item is a separator.
|
||||
*
|
||||
* @param it The list item object
|
||||
* @param setting
|
||||
*/
|
||||
EAPI void
|
||||
elm_list_item_separator_set(Elm_List_Item *it, Eina_Bool setting)
|
||||
{
|
||||
|
@ -1880,11 +1640,6 @@ elm_list_item_separator_set(Elm_List_Item *it, Eina_Bool setting)
|
|||
it->is_separator = !!setting;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns EINA_TRUE if Elm_List_Item is a separator.
|
||||
*
|
||||
* @param it The list item object
|
||||
*/
|
||||
EAPI Eina_Bool
|
||||
elm_list_item_separator_get(const Elm_List_Item *it)
|
||||
{
|
||||
|
@ -1893,14 +1648,6 @@ elm_list_item_separator_get(const Elm_List_Item *it)
|
|||
}
|
||||
|
||||
|
||||
/**
|
||||
* Sets the selected state of @p it.
|
||||
*
|
||||
* @param it The list item
|
||||
* @param selected Enables/disables the selected state
|
||||
*
|
||||
* @ingroup List
|
||||
*/
|
||||
EAPI void
|
||||
elm_list_item_selected_set(Elm_List_Item *it, Eina_Bool selected)
|
||||
{
|
||||
|
@ -1932,14 +1679,6 @@ elm_list_item_selected_set(Elm_List_Item *it, Eina_Bool selected)
|
|||
evas_object_unref(obj);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the selected state of @p it.
|
||||
*
|
||||
* @param it The list item
|
||||
* @return If true, the item is selected
|
||||
*
|
||||
* @ingroup List
|
||||
*/
|
||||
EAPI Eina_Bool
|
||||
elm_list_item_selected_get(const Elm_List_Item *it)
|
||||
{
|
||||
|
@ -1947,13 +1686,6 @@ elm_list_item_selected_get(const Elm_List_Item *it)
|
|||
return it->selected;
|
||||
}
|
||||
|
||||
/**
|
||||
* Brings @p it to the center of the list view.
|
||||
*
|
||||
* @param it The list item
|
||||
*
|
||||
* @ingroup List
|
||||
*/
|
||||
EAPI void
|
||||
elm_list_item_show(Elm_List_Item *it)
|
||||
{
|
||||
|
@ -1970,17 +1702,6 @@ elm_list_item_show(Elm_List_Item *it)
|
|||
elm_smart_scroller_child_region_show(wd->scr, x, y, w, h);
|
||||
}
|
||||
|
||||
/**
|
||||
* Bring in the given item
|
||||
*
|
||||
* This causes list to jump to the given item @p it and show it (by scrolling),
|
||||
* if it is not fully visible. This may use animation to do so and take a
|
||||
* period of time
|
||||
*
|
||||
* @param it The item
|
||||
*
|
||||
* @ingroup List
|
||||
*/
|
||||
EAPI void
|
||||
elm_list_item_bring_in(Elm_List_Item *it)
|
||||
{
|
||||
|
@ -1997,13 +1718,6 @@ elm_list_item_bring_in(Elm_List_Item *it)
|
|||
elm_smart_scroller_region_bring_in(wd->scr, x, y, w, h);
|
||||
}
|
||||
|
||||
/**
|
||||
* Deletes item @p it from the list.
|
||||
*
|
||||
* @param it The list item to delete
|
||||
*
|
||||
* @ingroup List
|
||||
*/
|
||||
EAPI void
|
||||
elm_list_item_del(Elm_List_Item *it)
|
||||
{
|
||||
|
@ -2034,14 +1748,6 @@ elm_list_item_del(Elm_List_Item *it)
|
|||
evas_object_unref(obj);
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the function called when a list item is freed.
|
||||
*
|
||||
* @param it The item to set the callback on
|
||||
* @param func The function called
|
||||
*
|
||||
* @ingroup List
|
||||
*/
|
||||
EAPI void
|
||||
elm_list_item_del_cb_set(Elm_List_Item *it, Evas_Smart_Cb func)
|
||||
{
|
||||
|
@ -2049,14 +1755,6 @@ elm_list_item_del_cb_set(Elm_List_Item *it, Evas_Smart_Cb func)
|
|||
elm_widget_item_del_cb_set(it, func);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the data associated with the item.
|
||||
*
|
||||
* @param it The list item
|
||||
* @return The data associated with @p it
|
||||
*
|
||||
* @ingroup List
|
||||
*/
|
||||
EAPI void *
|
||||
elm_list_item_data_get(const Elm_List_Item *it)
|
||||
{
|
||||
|
@ -2064,14 +1762,6 @@ elm_list_item_data_get(const Elm_List_Item *it)
|
|||
return elm_widget_item_data_get(it);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the left side icon associated with the item.
|
||||
*
|
||||
* @param it The list item
|
||||
* @return The left side icon associated with @p it
|
||||
*
|
||||
* @ingroup List
|
||||
*/
|
||||
EAPI Evas_Object *
|
||||
elm_list_item_icon_get(const Elm_List_Item *it)
|
||||
{
|
||||
|
@ -2080,18 +1770,6 @@ elm_list_item_icon_get(const Elm_List_Item *it)
|
|||
return it->icon;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the left side icon associated with the item.
|
||||
*
|
||||
* Once the icon object is set, a previously set one will be deleted.
|
||||
* You probably don't want, then, to have the <b>same</b> icon object set
|
||||
* for more than one item of the list.
|
||||
*
|
||||
* @param it The list item
|
||||
* @param icon The left side icon object to associate with @p it
|
||||
*
|
||||
* @ingroup List
|
||||
*/
|
||||
EAPI void
|
||||
elm_list_item_icon_set(Elm_List_Item *it, Evas_Object *icon)
|
||||
{
|
||||
|
@ -2119,14 +1797,6 @@ elm_list_item_icon_set(Elm_List_Item *it, Evas_Object *icon)
|
|||
edje_object_part_swallow(it->base.view, "elm.swallow.icon", icon);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the right side icon associated with the item.
|
||||
*
|
||||
* @param it The list item
|
||||
* @return The right side icon object associated with @p it
|
||||
*
|
||||
* @ingroup List
|
||||
*/
|
||||
EAPI Evas_Object *
|
||||
elm_list_item_end_get(const Elm_List_Item *it)
|
||||
{
|
||||
|
@ -2135,18 +1805,6 @@ elm_list_item_end_get(const Elm_List_Item *it)
|
|||
return it->end;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the right side icon associated with the item.
|
||||
*
|
||||
* Once the icon object is set, a previously set one will be deleted.
|
||||
* You probably don't want, then, to have the <b>same</b> icon object set
|
||||
* for more than one item of the list.
|
||||
*
|
||||
* @param it The list item
|
||||
* @param icon The right side icon object to associate with @p it
|
||||
*
|
||||
* @ingroup List
|
||||
*/
|
||||
EAPI void
|
||||
elm_list_item_end_set(Elm_List_Item *it, Evas_Object *end)
|
||||
{
|
||||
|
@ -2174,14 +1832,6 @@ elm_list_item_end_set(Elm_List_Item *it, Evas_Object *end)
|
|||
edje_object_part_swallow(it->base.view, "elm.swallow.end", end);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the base object of the item.
|
||||
*
|
||||
* @param it The list item
|
||||
* @return The base object associated with @p it
|
||||
*
|
||||
* @ingroup List
|
||||
*/
|
||||
EAPI Evas_Object *
|
||||
elm_list_item_base_get(const Elm_List_Item *it)
|
||||
{
|
||||
|
@ -2189,14 +1839,6 @@ elm_list_item_base_get(const Elm_List_Item *it)
|
|||
return it->base.view;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the label of the item.
|
||||
*
|
||||
* @param it The list item
|
||||
* @return The label of @p it
|
||||
*
|
||||
* @ingroup List
|
||||
*/
|
||||
EAPI const char *
|
||||
elm_list_item_label_get(const Elm_List_Item *it)
|
||||
{
|
||||
|
@ -2204,14 +1846,6 @@ elm_list_item_label_get(const Elm_List_Item *it)
|
|||
return it->label;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the label of the item.
|
||||
*
|
||||
* @param it The list item
|
||||
* @param text The label of @p it
|
||||
*
|
||||
* @ingroup List
|
||||
*/
|
||||
EAPI void
|
||||
elm_list_item_label_set(Elm_List_Item *it, const char *text)
|
||||
{
|
||||
|
@ -2221,14 +1855,6 @@ elm_list_item_label_set(Elm_List_Item *it, const char *text)
|
|||
edje_object_part_text_set(it->base.view, "elm.text", it->label);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the item before @p it in the list.
|
||||
*
|
||||
* @param it The list item
|
||||
* @return The item before @p it, or NULL on failure
|
||||
*
|
||||
* @ingroup List
|
||||
*/
|
||||
EAPI Elm_List_Item *
|
||||
elm_list_item_prev(const Elm_List_Item *it)
|
||||
{
|
||||
|
@ -2237,14 +1863,6 @@ elm_list_item_prev(const Elm_List_Item *it)
|
|||
else return NULL;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the item after @p it in the list.
|
||||
*
|
||||
* @param it The list item
|
||||
* @return The item after @p it, or NULL on failure
|
||||
*
|
||||
* @ingroup List
|
||||
*/
|
||||
EAPI Elm_List_Item *
|
||||
elm_list_item_next(const Elm_List_Item *it)
|
||||
{
|
||||
|
@ -2253,17 +1871,6 @@ elm_list_item_next(const Elm_List_Item *it)
|
|||
else return NULL;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the text to be shown in the list item.
|
||||
*
|
||||
* @param item Target item
|
||||
* @param text The text to set in the content
|
||||
*
|
||||
* Setup the text as tooltip to object. The item can have only one tooltip,
|
||||
* so any previous tooltip data is removed.
|
||||
*
|
||||
* @ingroup List
|
||||
*/
|
||||
EAPI void
|
||||
elm_list_item_tooltip_text_set(Elm_List_Item *item, const char *text)
|
||||
{
|
||||
|
@ -2271,26 +1878,6 @@ elm_list_item_tooltip_text_set(Elm_List_Item *item, const char *text)
|
|||
elm_widget_item_tooltip_text_set(item, text);
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the content to be shown in the tooltip item
|
||||
*
|
||||
* Setup the tooltip to item. The item can have only one tooltip,
|
||||
* so any previous tooltip data is removed. @p func(with @p data) will
|
||||
* be called every time that need show the tooltip and it should
|
||||
* return a valid Evas_Object. This object is then managed fully by
|
||||
* tooltip system and is deleted when the tooltip is gone.
|
||||
*
|
||||
* @param item the list item being attached a tooltip.
|
||||
* @param func the function used to create the tooltip contents.
|
||||
* @param data what to provide to @a func as callback data/context.
|
||||
* @param del_cb called when data is not needed anymore, either when
|
||||
* another callback replaces @func, the tooltip is unset with
|
||||
* elm_list_item_tooltip_unset() or the owner @a item
|
||||
* dies. This callback receives as the first parameter the
|
||||
* given @a data, and @c event_info is the item.
|
||||
*
|
||||
* @ingroup List
|
||||
*/
|
||||
EAPI void
|
||||
elm_list_item_tooltip_content_cb_set(Elm_List_Item *item, Elm_Tooltip_Item_Content_Cb func, const void *data, Evas_Smart_Cb del_cb)
|
||||
{
|
||||
|
@ -2298,19 +1885,6 @@ elm_list_item_tooltip_content_cb_set(Elm_List_Item *item, Elm_Tooltip_Item_Conte
|
|||
elm_widget_item_tooltip_content_cb_set(item, func, data, del_cb);
|
||||
}
|
||||
|
||||
/**
|
||||
* Unset tooltip from item
|
||||
*
|
||||
* @param item list item to remove previously set tooltip.
|
||||
*
|
||||
* Remove tooltip from item. The callback provided as del_cb to
|
||||
* elm_list_item_tooltip_content_cb_set() will be called to notify
|
||||
* it is not used anymore.
|
||||
*
|
||||
* @see elm_list_item_tooltip_content_cb_set()
|
||||
*
|
||||
* @ingroup List
|
||||
*/
|
||||
EAPI void
|
||||
elm_list_item_tooltip_unset(Elm_List_Item *item)
|
||||
{
|
||||
|
@ -2318,18 +1892,6 @@ elm_list_item_tooltip_unset(Elm_List_Item *item)
|
|||
elm_widget_item_tooltip_unset(item);
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets a different style for this item tooltip.
|
||||
*
|
||||
* @note before you set a style you should define a tooltip with
|
||||
* elm_list_item_tooltip_content_cb_set() or
|
||||
* elm_list_item_tooltip_text_set()
|
||||
*
|
||||
* @param item list item with tooltip already set.
|
||||
* @param style the theme style to use (default, transparent, ...)
|
||||
*
|
||||
* @ingroup List
|
||||
*/
|
||||
EAPI void
|
||||
elm_list_item_tooltip_style_set(Elm_List_Item *item, const char *style)
|
||||
{
|
||||
|
@ -2337,15 +1899,6 @@ elm_list_item_tooltip_style_set(Elm_List_Item *item, const char *style)
|
|||
elm_widget_item_tooltip_style_set(item, style);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the style for this item tooltip.
|
||||
*
|
||||
* @param item list item with tooltip already set.
|
||||
* @return style the theme style in use, defaults to "default". If the
|
||||
* object does not have a tooltip set, then NULL is returned.
|
||||
*
|
||||
* @ingroup List
|
||||
*/
|
||||
EAPI const char *
|
||||
elm_list_item_tooltip_style_get(const Elm_List_Item *item)
|
||||
{
|
||||
|
@ -2353,15 +1906,6 @@ elm_list_item_tooltip_style_get(const Elm_List_Item *item)
|
|||
return elm_widget_item_tooltip_style_get(item);
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the cursor to be shown when mouse is over the list item
|
||||
*
|
||||
* @param item Target item
|
||||
* @param cursor the cursor name to be used.
|
||||
*
|
||||
* @see elm_object_cursor_set()
|
||||
* @ingroup List
|
||||
*/
|
||||
EAPI void
|
||||
elm_list_item_cursor_set(Elm_List_Item *item, const char *cursor)
|
||||
{
|
||||
|
@ -2369,14 +1913,6 @@ elm_list_item_cursor_set(Elm_List_Item *item, const char *cursor)
|
|||
elm_widget_item_cursor_set(item, cursor);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the cursor to be shown when mouse is over the list item
|
||||
*
|
||||
* @param item list item with cursor already set.
|
||||
* @return the cursor name.
|
||||
*
|
||||
* @ingroup List
|
||||
*/
|
||||
EAPI const char *
|
||||
elm_list_item_cursor_get(const Elm_List_Item *item)
|
||||
{
|
||||
|
@ -2384,14 +1920,6 @@ elm_list_item_cursor_get(const Elm_List_Item *item)
|
|||
return elm_widget_item_cursor_get(item);
|
||||
}
|
||||
|
||||
/**
|
||||
* Unset the cursor to be shown when mouse is over the list item
|
||||
*
|
||||
* @param item Target item
|
||||
*
|
||||
* @see elm_object_cursor_unset()
|
||||
* @ingroup List
|
||||
*/
|
||||
EAPI void
|
||||
elm_list_item_cursor_unset(Elm_List_Item *item)
|
||||
{
|
||||
|
@ -2399,17 +1927,6 @@ elm_list_item_cursor_unset(Elm_List_Item *item)
|
|||
elm_widget_item_cursor_unset(item);
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets a different style for this item cursor.
|
||||
*
|
||||
* @note before you set a style you should define a cursor with
|
||||
* elm_list_item_cursor_set()
|
||||
*
|
||||
* @param item list item with cursor already set.
|
||||
* @param style the theme style to use (default, transparent, ...)
|
||||
*
|
||||
* @ingroup List
|
||||
*/
|
||||
EAPI void
|
||||
elm_list_item_cursor_style_set(Elm_List_Item *item, const char *style)
|
||||
{
|
||||
|
@ -2417,15 +1934,6 @@ elm_list_item_cursor_style_set(Elm_List_Item *item, const char *style)
|
|||
elm_widget_item_cursor_style_set(item, style);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the style for this item cursor.
|
||||
*
|
||||
* @param item list item with cursor already set.
|
||||
* @return style the theme style in use, defaults to "default". If the
|
||||
* object does not have a cursor set, then NULL is returned.
|
||||
*
|
||||
* @ingroup List
|
||||
*/
|
||||
EAPI const char *
|
||||
elm_list_item_cursor_style_get(const Elm_List_Item *item)
|
||||
{
|
||||
|
@ -2433,20 +1941,6 @@ elm_list_item_cursor_style_get(const Elm_List_Item *item)
|
|||
return elm_widget_item_cursor_style_get(item);
|
||||
}
|
||||
|
||||
/**
|
||||
* Set if the cursor set should be searched on the theme or should use
|
||||
* the provided by the engine, only.
|
||||
*
|
||||
* @note before you set if should look on theme you should define a cursor
|
||||
* with elm_object_cursor_set(). By default it will only look for cursors
|
||||
* provided by the engine.
|
||||
*
|
||||
* @param item widget item with cursor already set.
|
||||
* @param engine_only boolean to define it cursors should be looked only
|
||||
* between the provided by the engine or searched on widget's theme as well.
|
||||
*
|
||||
* @ingroup List
|
||||
*/
|
||||
EAPI void
|
||||
elm_list_item_cursor_engine_only_set(Elm_List_Item *item, Eina_Bool engine_only)
|
||||
{
|
||||
|
@ -2454,16 +1948,6 @@ elm_list_item_cursor_engine_only_set(Elm_List_Item *item, Eina_Bool engine_only)
|
|||
elm_widget_item_cursor_engine_only_set(item, engine_only);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the cursor engine only usage for this item cursor.
|
||||
*
|
||||
* @param item widget item with cursor already set.
|
||||
* @return engine_only boolean to define it cursors should be looked only
|
||||
* between the provided by the engine or searched on widget's theme as well. If
|
||||
* the object does not have a cursor set, then EINA_FALSE is returned.
|
||||
*
|
||||
* @ingroup List
|
||||
*/
|
||||
EAPI Eina_Bool
|
||||
elm_list_item_cursor_engine_only_get(const Elm_List_Item *item)
|
||||
{
|
||||
|
@ -2471,18 +1955,6 @@ elm_list_item_cursor_engine_only_get(const Elm_List_Item *item)
|
|||
return elm_widget_item_cursor_engine_only_get(item);
|
||||
}
|
||||
|
||||
/**
|
||||
* Set bounce mode
|
||||
*
|
||||
* This will enable or disable the scroller bounce mode for the list. See
|
||||
* elm_scroller_bounce_set() for details
|
||||
*
|
||||
* @param obj The list object
|
||||
* @param h_bounce Allow bounce horizontally
|
||||
* @param v_bounce Allow bounce vertically
|
||||
*
|
||||
* @ingroup List
|
||||
*/
|
||||
EAPI void
|
||||
elm_list_bounce_set(Evas_Object *obj, Eina_Bool h_bounce, Eina_Bool v_bounce)
|
||||
{
|
||||
|
@ -2493,15 +1965,6 @@ elm_list_bounce_set(Evas_Object *obj, Eina_Bool h_bounce, Eina_Bool v_bounce)
|
|||
elm_smart_scroller_bounce_allow_set(wd->scr, h_bounce, v_bounce);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the bounce mode
|
||||
*
|
||||
* @param obj The List object
|
||||
* @param h_bounce Allow bounce horizontally
|
||||
* @param v_bounce Allow bounce vertically
|
||||
*
|
||||
* @ingroup List
|
||||
*/
|
||||
EAPI void
|
||||
elm_list_bounce_get(const Evas_Object *obj, Eina_Bool *h_bounce, Eina_Bool *v_bounce)
|
||||
{
|
||||
|
@ -2511,21 +1974,6 @@ elm_list_bounce_get(const Evas_Object *obj, Eina_Bool *h_bounce, Eina_Bool *v_bo
|
|||
elm_smart_scroller_bounce_allow_get(wd->scr, h_bounce, v_bounce);
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the scrollbar policy
|
||||
*
|
||||
* This sets the scrollbar visibility policy for the given list scroller.
|
||||
* ELM_SMART_SCROLLER_POLICY_AUTO means the scrollber is made visible if it
|
||||
* is needed, and otherwise kept hidden. ELM_SMART_SCROLLER_POLICY_ON turns
|
||||
* it on all the time, and ELM_SMART_SCROLLER_POLICY_OFF always keeps it off.
|
||||
* This applies respectively for the horizontal and vertical scrollbars.
|
||||
*
|
||||
* @param obj The list object
|
||||
* @param policy_h Horizontal scrollbar policy
|
||||
* @param policy_v Vertical scrollbar policy
|
||||
*
|
||||
* @ingroup List
|
||||
*/
|
||||
EAPI void
|
||||
elm_list_scroller_policy_set(Evas_Object *obj, Elm_Scroller_Policy policy_h, Elm_Scroller_Policy policy_v)
|
||||
{
|
||||
|
@ -2550,19 +1998,6 @@ elm_list_scroller_policy_get(const Evas_Object *obj, Elm_Scroller_Policy *policy
|
|||
if (policy_v) *policy_v = (Elm_Scroller_Policy) s_policy_v;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the disabled/enabled state of a list item.
|
||||
*
|
||||
* A disabled item cannot be selected or unselected. It will also
|
||||
* change its appearance (generally greyed out). This sets the
|
||||
* disabled state (@c EINA_TRUE for disabled, @c EINA_FALSE for
|
||||
* enabled).
|
||||
*
|
||||
* @param it The item
|
||||
* @param disabled The disabled state
|
||||
*
|
||||
* @ingroup List
|
||||
*/
|
||||
EAPI void
|
||||
elm_list_item_disabled_set(Elm_List_Item *it, Eina_Bool disabled)
|
||||
{
|
||||
|
@ -2579,16 +2014,6 @@ elm_list_item_disabled_set(Elm_List_Item *it, Eina_Bool disabled)
|
|||
edje_object_signal_emit(it->base.view, "elm,state,enabled", "elm");
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the disabled/enabled state of a list item
|
||||
*
|
||||
* @param it The item
|
||||
* @return The disabled state
|
||||
*
|
||||
* See elm_list_item_disabled_set().
|
||||
*
|
||||
* @ingroup List
|
||||
*/
|
||||
EAPI Eina_Bool
|
||||
elm_list_item_disabled_get(const Elm_List_Item *it)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue