forked from enlightenment/efl
elementary/genlist - Adding previews to index and docs.
SVN revision: 61871
This commit is contained in:
parent
5d6c4f8a1f
commit
62017b8695
|
@ -58,6 +58,11 @@ WGT_PREVIEW = \
|
|||
toggle:preview-00.png:widget_preview_toggle:150:30 \
|
||||
panel:preview-00.png:widget_preview_panel:150:50 \
|
||||
gengrid:preview-00.png:widget_preview_gengrid:200:160 \
|
||||
genlist:preview-00.png:widget_preview_genlist1:200:160 \
|
||||
genlist:preview-01.png:widget_preview_genlist2:200:160 \
|
||||
genlist:preview-02.png:widget_preview_genlist3:200:160 \
|
||||
genlist:preview-03.png:widget_preview_genlist4:200:160 \
|
||||
genlist:preview-04.png:widget_preview_genlist5:200:160 \
|
||||
progressbar:preview-00.png:widget_preview_progressbar:150:50 \
|
||||
box:preview-00.png:widget_preview_box:200:160 \
|
||||
notify:preview-00.png:widget_preview_notify:60:30 \
|
||||
|
|
|
@ -213,6 +213,9 @@
|
|||
* @image html img/widget/gengrid/preview-00.png
|
||||
* @image latex img/widget/gengrid/preview-00.eps
|
||||
* @li @ref Genlist
|
||||
*
|
||||
* @image html img/widget/genlist/preview-00.png
|
||||
* @image latex img/widget/genlist/preview-00.eps
|
||||
* @li @ref Grid
|
||||
* @li @ref Layout
|
||||
*
|
||||
|
|
|
@ -74,6 +74,11 @@ widget_preview_radio \
|
|||
widget_preview_toggle \
|
||||
widget_preview_panel \
|
||||
widget_preview_gengrid \
|
||||
widget_preview_genlist1 \
|
||||
widget_preview_genlist2 \
|
||||
widget_preview_genlist3 \
|
||||
widget_preview_genlist4 \
|
||||
widget_preview_genlist5 \
|
||||
widget_preview_progressbar \
|
||||
widget_preview_box \
|
||||
widget_preview_notify \
|
||||
|
@ -138,6 +143,11 @@ EXTRA_DIST = \
|
|||
widget_preview_toggle.c \
|
||||
widget_preview_panel.c \
|
||||
widget_preview_gengrid.c \
|
||||
widget_preview_genlist1.c \
|
||||
widget_preview_genlist2.c \
|
||||
widget_preview_genlist3.c \
|
||||
widget_preview_genlist4.c \
|
||||
widget_preview_genlist5.c \
|
||||
widget_preview_progressbar.c \
|
||||
widget_preview_box.c \
|
||||
widget_preview_notify.c \
|
||||
|
|
|
@ -0,0 +1,47 @@
|
|||
#include <Elementary.h>
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include "elementary_config.h"
|
||||
#else
|
||||
# define __UNUSED__
|
||||
#endif
|
||||
|
||||
static char *
|
||||
_label_get(void *data __UNUSED__,
|
||||
Evas_Object *obj __UNUSED__,
|
||||
const char *part __UNUSED__)
|
||||
{
|
||||
return strdup("label");
|
||||
}
|
||||
|
||||
static Evas_Object *
|
||||
_icon_get(void *data __UNUSED__,
|
||||
Evas_Object *obj,
|
||||
const char *part __UNUSED__)
|
||||
{
|
||||
Evas_Object *icon = elm_icon_add(obj);
|
||||
elm_icon_standard_set(icon, "home");
|
||||
evas_object_size_hint_aspect_set(icon, EVAS_ASPECT_CONTROL_VERTICAL, 1,
|
||||
1);
|
||||
evas_object_show(icon);
|
||||
return icon;
|
||||
}
|
||||
|
||||
#include "widget_preview_tmpl_head.c"
|
||||
|
||||
Evas_Object *genlist = elm_genlist_add(win);
|
||||
evas_object_size_hint_weight_set(genlist, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
||||
elm_win_resize_object_add(win, genlist);
|
||||
evas_object_show(genlist);
|
||||
|
||||
Elm_Genlist_Item_Class gic;
|
||||
gic.item_style = "default";
|
||||
gic.func.label_get = _label_get;
|
||||
gic.func.icon_get = _icon_get;
|
||||
gic.func.state_get = NULL;
|
||||
gic.func.del = NULL;
|
||||
|
||||
elm_genlist_item_append(genlist, &gic, NULL, NULL, ELM_GENLIST_ITEM_NONE, NULL, NULL);
|
||||
elm_genlist_item_append(genlist, &gic, NULL, NULL, ELM_GENLIST_ITEM_NONE, NULL, NULL);
|
||||
elm_genlist_item_append(genlist, &gic, NULL, NULL, ELM_GENLIST_ITEM_NONE, NULL, NULL);
|
||||
|
||||
#include "widget_preview_tmpl_foot.c"
|
|
@ -0,0 +1,47 @@
|
|||
#include <Elementary.h>
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include "elementary_config.h"
|
||||
#else
|
||||
# define __UNUSED__
|
||||
#endif
|
||||
|
||||
static char *
|
||||
_label_get(void *data __UNUSED__,
|
||||
Evas_Object *obj __UNUSED__,
|
||||
const char *part)
|
||||
{
|
||||
return strdup(part);
|
||||
}
|
||||
|
||||
static Evas_Object *
|
||||
_icon_get(void *data __UNUSED__,
|
||||
Evas_Object *obj,
|
||||
const char *part __UNUSED__)
|
||||
{
|
||||
Evas_Object *icon = elm_icon_add(obj);
|
||||
elm_icon_standard_set(icon, "home");
|
||||
evas_object_size_hint_aspect_set(icon, EVAS_ASPECT_CONTROL_VERTICAL, 1,
|
||||
1);
|
||||
evas_object_show(icon);
|
||||
return icon;
|
||||
}
|
||||
|
||||
#include "widget_preview_tmpl_head.c"
|
||||
|
||||
Evas_Object *genlist = elm_genlist_add(win);
|
||||
evas_object_size_hint_weight_set(genlist, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
||||
elm_win_resize_object_add(win, genlist);
|
||||
evas_object_show(genlist);
|
||||
|
||||
Elm_Genlist_Item_Class gic;
|
||||
gic.item_style = "double_label";
|
||||
gic.func.label_get = _label_get;
|
||||
gic.func.icon_get = _icon_get;
|
||||
gic.func.state_get = NULL;
|
||||
gic.func.del = NULL;
|
||||
|
||||
elm_genlist_item_append(genlist, &gic, NULL, NULL, ELM_GENLIST_ITEM_NONE, NULL, NULL);
|
||||
elm_genlist_item_append(genlist, &gic, NULL, NULL, ELM_GENLIST_ITEM_NONE, NULL, NULL);
|
||||
elm_genlist_item_append(genlist, &gic, NULL, NULL, ELM_GENLIST_ITEM_NONE, NULL, NULL);
|
||||
|
||||
#include "widget_preview_tmpl_foot.c"
|
|
@ -0,0 +1,47 @@
|
|||
#include <Elementary.h>
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include "elementary_config.h"
|
||||
#else
|
||||
# define __UNUSED__
|
||||
#endif
|
||||
|
||||
static char *
|
||||
_label_get(void *data __UNUSED__,
|
||||
Evas_Object *obj __UNUSED__,
|
||||
const char *part)
|
||||
{
|
||||
return strdup(part);
|
||||
}
|
||||
|
||||
static Evas_Object *
|
||||
_icon_get(void *data __UNUSED__,
|
||||
Evas_Object *obj,
|
||||
const char *part __UNUSED__)
|
||||
{
|
||||
Evas_Object *icon = elm_icon_add(obj);
|
||||
elm_icon_standard_set(icon, "home");
|
||||
evas_object_size_hint_aspect_set(icon, EVAS_ASPECT_CONTROL_VERTICAL, 1,
|
||||
1);
|
||||
evas_object_show(icon);
|
||||
return icon;
|
||||
}
|
||||
|
||||
#include "widget_preview_tmpl_head.c"
|
||||
|
||||
Evas_Object *genlist = elm_genlist_add(win);
|
||||
evas_object_size_hint_weight_set(genlist, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
||||
elm_win_resize_object_add(win, genlist);
|
||||
evas_object_show(genlist);
|
||||
|
||||
Elm_Genlist_Item_Class gic;
|
||||
gic.item_style = "icon_top_text_bottom";
|
||||
gic.func.label_get = _label_get;
|
||||
gic.func.icon_get = _icon_get;
|
||||
gic.func.state_get = NULL;
|
||||
gic.func.del = NULL;
|
||||
|
||||
elm_genlist_item_append(genlist, &gic, NULL, NULL, ELM_GENLIST_ITEM_NONE, NULL, NULL);
|
||||
elm_genlist_item_append(genlist, &gic, NULL, NULL, ELM_GENLIST_ITEM_NONE, NULL, NULL);
|
||||
elm_genlist_item_append(genlist, &gic, NULL, NULL, ELM_GENLIST_ITEM_NONE, NULL, NULL);
|
||||
|
||||
#include "widget_preview_tmpl_foot.c"
|
|
@ -0,0 +1,47 @@
|
|||
#include <Elementary.h>
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include "elementary_config.h"
|
||||
#else
|
||||
# define __UNUSED__
|
||||
#endif
|
||||
|
||||
static char *
|
||||
_label_get(void *data __UNUSED__,
|
||||
Evas_Object *obj __UNUSED__,
|
||||
const char *part)
|
||||
{
|
||||
return strdup(part);
|
||||
}
|
||||
|
||||
static Evas_Object *
|
||||
_icon_get(void *data __UNUSED__,
|
||||
Evas_Object *obj,
|
||||
const char *part __UNUSED__)
|
||||
{
|
||||
Evas_Object *icon = elm_icon_add(obj);
|
||||
elm_icon_standard_set(icon, "home");
|
||||
evas_object_size_hint_aspect_set(icon, EVAS_ASPECT_CONTROL_VERTICAL, 1,
|
||||
1);
|
||||
evas_object_show(icon);
|
||||
return icon;
|
||||
}
|
||||
|
||||
#include "widget_preview_tmpl_head.c"
|
||||
|
||||
Evas_Object *genlist = elm_genlist_add(win);
|
||||
evas_object_size_hint_weight_set(genlist, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
||||
elm_win_resize_object_add(win, genlist);
|
||||
evas_object_show(genlist);
|
||||
|
||||
Elm_Genlist_Item_Class gic;
|
||||
gic.item_style = "group_index";
|
||||
gic.func.label_get = _label_get;
|
||||
gic.func.icon_get = _icon_get;
|
||||
gic.func.state_get = NULL;
|
||||
gic.func.del = NULL;
|
||||
|
||||
elm_genlist_item_append(genlist, &gic, NULL, NULL, ELM_GENLIST_ITEM_NONE, NULL, NULL);
|
||||
elm_genlist_item_append(genlist, &gic, NULL, NULL, ELM_GENLIST_ITEM_NONE, NULL, NULL);
|
||||
elm_genlist_item_append(genlist, &gic, NULL, NULL, ELM_GENLIST_ITEM_NONE, NULL, NULL);
|
||||
|
||||
#include "widget_preview_tmpl_foot.c"
|
|
@ -0,0 +1,47 @@
|
|||
#include <Elementary.h>
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include "elementary_config.h"
|
||||
#else
|
||||
# define __UNUSED__
|
||||
#endif
|
||||
|
||||
static char *
|
||||
_label_get(void *data __UNUSED__,
|
||||
Evas_Object *obj __UNUSED__,
|
||||
const char *part)
|
||||
{
|
||||
return strdup(part);
|
||||
}
|
||||
|
||||
static Evas_Object *
|
||||
_icon_get(void *data __UNUSED__,
|
||||
Evas_Object *obj,
|
||||
const char *part __UNUSED__)
|
||||
{
|
||||
Evas_Object *icon = elm_icon_add(obj);
|
||||
elm_icon_standard_set(icon, "home");
|
||||
evas_object_size_hint_aspect_set(icon, EVAS_ASPECT_CONTROL_VERTICAL, 1,
|
||||
1);
|
||||
evas_object_show(icon);
|
||||
return icon;
|
||||
}
|
||||
|
||||
#include "widget_preview_tmpl_head.c"
|
||||
|
||||
Evas_Object *genlist = elm_genlist_add(win);
|
||||
evas_object_size_hint_weight_set(genlist, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
||||
elm_win_resize_object_add(win, genlist);
|
||||
evas_object_show(genlist);
|
||||
|
||||
Elm_Genlist_Item_Class gic;
|
||||
gic.item_style = "default";
|
||||
gic.func.label_get = _label_get;
|
||||
gic.func.icon_get = _icon_get;
|
||||
gic.func.state_get = NULL;
|
||||
gic.func.del = NULL;
|
||||
|
||||
elm_genlist_item_append(genlist, &gic, NULL, NULL, ELM_GENLIST_ITEM_NONE, NULL, NULL);
|
||||
elm_genlist_item_append(genlist, &gic, NULL, NULL, ELM_GENLIST_ITEM_NONE, NULL, NULL);
|
||||
elm_genlist_item_append(genlist, &gic, NULL, NULL, ELM_GENLIST_ITEM_NONE, NULL, NULL);
|
||||
|
||||
#include "widget_preview_tmpl_foot.c"
|
|
@ -11684,6 +11684,9 @@ extern "C" {
|
|||
/**
|
||||
* @defgroup Genlist Genlist
|
||||
*
|
||||
* @image html img/widget/genlist/preview-00.png
|
||||
* @image latex img/widget/genlist/preview-00.eps
|
||||
*
|
||||
* This widget aims to have more expansive list than the simple list in
|
||||
* Elementary that could have more flexible items and allow many more entries
|
||||
* while still being fast and low on memory usage. At the same time it was
|
||||
|
@ -11744,9 +11747,25 @@ extern "C" {
|
|||
* available item styles:
|
||||
* - default
|
||||
* - default_style - The text part is a textblock
|
||||
*
|
||||
* @image html img/widget/genlist/preview-04.png
|
||||
* @image latex img/widget/genlist/preview-04.eps
|
||||
*
|
||||
* - double_label
|
||||
*
|
||||
* @image html img/widget/genlist/preview-01.png
|
||||
* @image latex img/widget/genlist/preview-01.eps
|
||||
*
|
||||
* - icon_top_text_bottom
|
||||
*
|
||||
* @image html img/widget/genlist/preview-02.png
|
||||
* @image latex img/widget/genlist/preview-02.eps
|
||||
*
|
||||
* - group_index
|
||||
*
|
||||
* @image html img/widget/genlist/preview-03.png
|
||||
* @image latex img/widget/genlist/preview-03.eps
|
||||
*
|
||||
* @section Genlist_Items Structure of items
|
||||
*
|
||||
* An item in a genlist can have 0 or more text labels (they can be regular
|
||||
|
|
Loading…
Reference in New Issue