forked from enlightenment/efl
Elm pager: remove all references from elm's tree.
SVN revision: 68016
This commit is contained in:
parent
4787995f4b
commit
11f6738a6c
|
@ -3924,51 +3924,6 @@
|
||||||
* @example ctxpopup_example_01.c
|
* @example ctxpopup_example_01.c
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
|
||||||
* @page tutorial_pager
|
|
||||||
* @dontinclude pager_example_01.c
|
|
||||||
*
|
|
||||||
* In this example we'll have a pager with 3 rectangles on it, one blue, one
|
|
||||||
* green and one blue, we'll also have 1 button for each rectangle. Pressing a
|
|
||||||
* button will bring the associated rectangle to the front of the pager(promote
|
|
||||||
* it).
|
|
||||||
*
|
|
||||||
* We start our example with some run of the mill code that you've seen in other
|
|
||||||
* examples:
|
|
||||||
* @until show
|
|
||||||
*
|
|
||||||
* And then we get right to creating our pager, setting a style and some basic
|
|
||||||
* properties to it:
|
|
||||||
* @until show
|
|
||||||
*
|
|
||||||
* Well a pager without any content is not of much use, so let's create the
|
|
||||||
* first of our rectangles, add it to the pager and create the button for it:
|
|
||||||
* @until smart_callback
|
|
||||||
* @note The only line of above code that directly relates to our pager is the
|
|
||||||
* call to elm_pager_content_push().
|
|
||||||
*
|
|
||||||
* And now we will do the same thing again twice for our next two rectangles:
|
|
||||||
* @until smart_callback
|
|
||||||
* @until smart_callback
|
|
||||||
*
|
|
||||||
* Now that we haver our widgets create we can get to running the main loop:
|
|
||||||
* @until ELM_MAIN
|
|
||||||
*
|
|
||||||
* We also have the callback that is called when any of the buttons is pressed,
|
|
||||||
* this callback is receiving the rectangle in it's @p data argument, so we
|
|
||||||
* check if it's already on top and if not move it there:
|
|
||||||
* @until }
|
|
||||||
*
|
|
||||||
* Our example will look like this:
|
|
||||||
*
|
|
||||||
* @image html screenshots/pager_example_01.png
|
|
||||||
* @image latex screenshots/pager_example_01.eps width=\textwidth
|
|
||||||
* @note Like all examples that involve animations the screenshot doesn't do it
|
|
||||||
* justice, seeing it in action is a must.
|
|
||||||
*
|
|
||||||
* @example pager_example_01.c
|
|
||||||
*/
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @page tutorial_separator Separator example
|
* @page tutorial_separator Separator example
|
||||||
* @dontinclude separator_example_01.c
|
* @dontinclude separator_example_01.c
|
||||||
|
@ -4492,7 +4447,7 @@
|
||||||
* and the entry itself doesn't, yet, support all the needed capabilities to
|
* and the entry itself doesn't, yet, support all the needed capabilities to
|
||||||
* make this simpler. We begin by getting the format we are using in our
|
* make this simpler. We begin by getting the format we are using in our
|
||||||
* function from the button pressed.
|
* function from the button pressed.
|
||||||
* @skip aid->pager = pager;
|
* @skip aid->naviframe = naviframe;
|
||||||
* @until sizeof(fmt_close)
|
* @until sizeof(fmt_close)
|
||||||
*
|
*
|
||||||
* Next we need to find out if we need to insert an opening or a closing tag.
|
* Next we need to find out if we need to insert an opening or a closing tag.
|
||||||
|
@ -5987,7 +5942,7 @@
|
||||||
* accordingly and the URL bar needs to show the right address.
|
* accordingly and the URL bar needs to show the right address.
|
||||||
*
|
*
|
||||||
* @skip static void
|
* @skip static void
|
||||||
* @until pager_content_promote
|
* @until naviframe_item_simple_promote
|
||||||
* @until }
|
* @until }
|
||||||
*
|
*
|
||||||
* Other updates happen based on events from the web object, like title change
|
* Other updates happen based on events from the web object, like title change
|
||||||
|
|
|
@ -68,7 +68,6 @@ widget_preview_hover \
|
||||||
widget_preview_anchorview \
|
widget_preview_anchorview \
|
||||||
widget_preview_anchorblock \
|
widget_preview_anchorblock \
|
||||||
widget_preview_flip \
|
widget_preview_flip \
|
||||||
widget_preview_pager \
|
|
||||||
widget_preview_separator \
|
widget_preview_separator \
|
||||||
widget_preview_radio \
|
widget_preview_radio \
|
||||||
widget_preview_toggle \
|
widget_preview_toggle \
|
||||||
|
@ -145,7 +144,6 @@ EXTRA_DIST = \
|
||||||
widget_preview_layout.c \
|
widget_preview_layout.c \
|
||||||
widget_preview_list.c \
|
widget_preview_list.c \
|
||||||
widget_preview_segment_control.c \
|
widget_preview_segment_control.c \
|
||||||
widget_preview_pager.c \
|
|
||||||
widget_preview_separator.c \
|
widget_preview_separator.c \
|
||||||
widget_preview_radio.c \
|
widget_preview_radio.c \
|
||||||
widget_preview_toggle.c \
|
widget_preview_toggle.c \
|
||||||
|
|
|
@ -1,30 +0,0 @@
|
||||||
unsigned char _func(void *data);
|
|
||||||
void *o;
|
|
||||||
|
|
||||||
#include "widget_preview_tmpl_head.c"
|
|
||||||
|
|
||||||
o = elm_pager_add(win);
|
|
||||||
evas_object_size_hint_weight_set(o, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
|
||||||
elm_win_resize_object_add(win, o);
|
|
||||||
|
|
||||||
Evas_Object *o2 = elm_label_add(win);
|
|
||||||
elm_object_text_set(o2, "back page");
|
|
||||||
evas_object_show(o2);
|
|
||||||
elm_pager_content_push(o, o2);
|
|
||||||
|
|
||||||
ecore_timer_add(0.3, _func, o2);
|
|
||||||
|
|
||||||
o2 = elm_label_add(win);
|
|
||||||
elm_object_text_set(o2, "front page");
|
|
||||||
evas_object_show(o2);
|
|
||||||
elm_pager_content_push(o, o2);
|
|
||||||
|
|
||||||
evas_object_show(o);
|
|
||||||
|
|
||||||
#include "widget_preview_tmpl_foot.c"
|
|
||||||
|
|
||||||
unsigned char _func(void *data)
|
|
||||||
{
|
|
||||||
elm_pager_content_promote(o, data);
|
|
||||||
return 0;
|
|
||||||
}
|
|
|
@ -674,10 +674,10 @@ static void
|
||||||
_flip_to(Evas_Object *win,
|
_flip_to(Evas_Object *win,
|
||||||
const char *name)
|
const char *name)
|
||||||
{
|
{
|
||||||
Evas_Object *wid, *pager;
|
Evas_Object *wid, *naviframe;
|
||||||
wid = evas_object_data_get(win, name);
|
wid = evas_object_data_get(win, name);
|
||||||
pager = evas_object_data_get(win, "pager");
|
naviframe = evas_object_data_get(win, "naviframe");
|
||||||
elm_pager_content_promote(pager, wid);
|
elm_naviframe_item_simple_promote(naviframe, wid);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -1159,7 +1159,7 @@ _theme_sel(void *data __UNUSED__,
|
||||||
|
|
||||||
static void
|
static void
|
||||||
_status_config_sizing(Evas_Object *win,
|
_status_config_sizing(Evas_Object *win,
|
||||||
Evas_Object *pager)
|
Evas_Object *naviframe)
|
||||||
{
|
{
|
||||||
Evas_Object *lb, *pd, *bx, *sl, *sp;
|
Evas_Object *lb, *pd, *bx, *sl, *sp;
|
||||||
|
|
||||||
|
@ -1210,7 +1210,7 @@ _status_config_sizing(Evas_Object *win,
|
||||||
|
|
||||||
evas_object_data_set(win, "sizing", bx);
|
evas_object_data_set(win, "sizing", bx);
|
||||||
|
|
||||||
elm_pager_content_push(pager, bx);
|
elm_naviframe_item_simple_push(naviframe, bx);
|
||||||
}
|
}
|
||||||
|
|
||||||
static Evas_Object *
|
static Evas_Object *
|
||||||
|
@ -1301,7 +1301,7 @@ _sample_theme_new(Evas_Object *win)
|
||||||
|
|
||||||
static void
|
static void
|
||||||
_status_config_themes(Evas_Object *win,
|
_status_config_themes(Evas_Object *win,
|
||||||
Evas_Object *pager)
|
Evas_Object *naviframe)
|
||||||
{
|
{
|
||||||
Evas_Object *tb, *rc, *sc, *sp, *li, *pd, *fr, *bt, *sample;
|
Evas_Object *tb, *rc, *sc, *sp, *li, *pd, *fr, *bt, *sample;
|
||||||
Eina_List *list, *l;
|
Eina_List *list, *l;
|
||||||
|
@ -1476,7 +1476,7 @@ _status_config_themes(Evas_Object *win,
|
||||||
evas_object_show(bt);
|
evas_object_show(bt);
|
||||||
|
|
||||||
evas_object_data_set(win, "themes", tb);
|
evas_object_data_set(win, "themes", tb);
|
||||||
elm_pager_content_push(pager, tb);
|
elm_naviframe_item_simple_push(naviframe, tb);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -1928,7 +1928,7 @@ _font_names_list_load(Evas_Object *flist)
|
||||||
|
|
||||||
static void
|
static void
|
||||||
_status_config_fonts(Evas_Object *win,
|
_status_config_fonts(Evas_Object *win,
|
||||||
Evas_Object *pager)
|
Evas_Object *naviframe)
|
||||||
{
|
{
|
||||||
Evas_Object *base, *fr, *li, *rc, *preview, *sp, *pd, *bt, *bx;
|
Evas_Object *base, *fr, *li, *rc, *preview, *sp, *pd, *bt, *bx;
|
||||||
char buf[PATH_MAX];
|
char buf[PATH_MAX];
|
||||||
|
@ -2097,7 +2097,7 @@ _status_config_fonts(Evas_Object *win,
|
||||||
|
|
||||||
evas_object_data_set(win, "fonts", base);
|
evas_object_data_set(win, "fonts", base);
|
||||||
|
|
||||||
elm_pager_content_push(pager, base);
|
elm_naviframe_item_simple_push(naviframe, base);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -2281,7 +2281,7 @@ _profiles_list_unselect_cb(void *data __UNUSED__,
|
||||||
|
|
||||||
static void
|
static void
|
||||||
_status_config_profiles(Evas_Object *win,
|
_status_config_profiles(Evas_Object *win,
|
||||||
Evas_Object *pager)
|
Evas_Object *naviframe)
|
||||||
{
|
{
|
||||||
Evas_Object *li, *bx, *fr_bx1, *fr_bx2, *btn_bx, *fr, *lb, *en, *sp, *pd,
|
Evas_Object *li, *bx, *fr_bx1, *fr_bx2, *btn_bx, *fr, *lb, *en, *sp, *pd,
|
||||||
*bt;
|
*bt;
|
||||||
|
@ -2418,12 +2418,12 @@ _status_config_profiles(Evas_Object *win,
|
||||||
evas_event_thaw(evas);
|
evas_event_thaw(evas);
|
||||||
|
|
||||||
evas_object_data_set(win, "profiles", bx);
|
evas_object_data_set(win, "profiles", bx);
|
||||||
elm_pager_content_push(pager, bx);
|
elm_naviframe_item_simple_push(naviframe, bx);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
_status_config_scrolling(Evas_Object *win,
|
_status_config_scrolling(Evas_Object *win,
|
||||||
Evas_Object *pager)
|
Evas_Object *naviframe)
|
||||||
{
|
{
|
||||||
Evas_Object *lb, *pd, *bx, *sl, *sp, *ck, *sc;
|
Evas_Object *lb, *pd, *bx, *sl, *sp, *ck, *sc;
|
||||||
|
|
||||||
|
@ -2665,7 +2665,7 @@ _status_config_scrolling(Evas_Object *win,
|
||||||
|
|
||||||
evas_object_data_set(win, "scrolling", sc);
|
evas_object_data_set(win, "scrolling", sc);
|
||||||
|
|
||||||
elm_pager_content_push(pager, sc);
|
elm_naviframe_item_simple_push(naviframe, sc);
|
||||||
}
|
}
|
||||||
|
|
||||||
static char *
|
static char *
|
||||||
|
@ -2761,7 +2761,7 @@ _engines_list_fill(Evas_Object *l_widget,
|
||||||
|
|
||||||
static void
|
static void
|
||||||
_status_config_rendering(Evas_Object *win,
|
_status_config_rendering(Evas_Object *win,
|
||||||
Evas_Object *pager)
|
Evas_Object *naviframe)
|
||||||
{
|
{
|
||||||
Evas_Object *li, *bx, *fr, *sp, *pd, *bt;
|
Evas_Object *li, *bx, *fr, *sp, *pd, *bt;
|
||||||
Eina_List *engines;
|
Eina_List *engines;
|
||||||
|
@ -2813,12 +2813,12 @@ _status_config_rendering(Evas_Object *win,
|
||||||
evas_object_show(bt);
|
evas_object_show(bt);
|
||||||
|
|
||||||
evas_object_data_set(win, "rendering", bx);
|
evas_object_data_set(win, "rendering", bx);
|
||||||
elm_pager_content_push(pager, bx);
|
elm_naviframe_item_simple_push(naviframe, bx);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
_status_config_caches(Evas_Object *win,
|
_status_config_caches(Evas_Object *win,
|
||||||
Evas_Object *pager)
|
Evas_Object *naviframe)
|
||||||
{
|
{
|
||||||
Evas_Object *lb, *pd, *bx, *sl, *sp, *ck;
|
Evas_Object *lb, *pd, *bx, *sl, *sp, *ck;
|
||||||
|
|
||||||
|
@ -2952,14 +2952,14 @@ _status_config_caches(Evas_Object *win,
|
||||||
|
|
||||||
evas_object_data_set(win, "caches", bx);
|
evas_object_data_set(win, "caches", bx);
|
||||||
|
|
||||||
elm_pager_content_push(pager, bx);
|
elm_naviframe_item_simple_push(naviframe, bx);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
_status_config_full(Evas_Object *win,
|
_status_config_full(Evas_Object *win,
|
||||||
Evas_Object *bx0)
|
Evas_Object *bx0)
|
||||||
{
|
{
|
||||||
Evas_Object *tb, *pager;
|
Evas_Object *tb, *naviframe;
|
||||||
Elm_Object_Item *tb_sizing, *tb_it;
|
Elm_Object_Item *tb_sizing, *tb_it;
|
||||||
|
|
||||||
tb = elm_toolbar_add(win);
|
tb = elm_toolbar_add(win);
|
||||||
|
@ -2991,24 +2991,24 @@ _status_config_full(Evas_Object *win,
|
||||||
elm_box_pack_end(bx0, tb);
|
elm_box_pack_end(bx0, tb);
|
||||||
evas_object_show(tb);
|
evas_object_show(tb);
|
||||||
|
|
||||||
pager = elm_pager_add(win);
|
naviframe = elm_naviframe_add(win);
|
||||||
evas_object_size_hint_align_set(pager, EVAS_HINT_FILL, EVAS_HINT_FILL);
|
evas_object_size_hint_align_set(naviframe, EVAS_HINT_FILL, EVAS_HINT_FILL);
|
||||||
evas_object_size_hint_weight_set(pager, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
evas_object_size_hint_weight_set(naviframe, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
||||||
evas_object_data_set(win, "pager", pager);
|
evas_object_data_set(win, "naviframe", naviframe);
|
||||||
|
|
||||||
_status_config_themes(win, pager);
|
_status_config_themes(win, naviframe);
|
||||||
_status_config_fonts(win, pager);
|
_status_config_fonts(win, naviframe);
|
||||||
_status_config_profiles(win, pager);
|
_status_config_profiles(win, naviframe);
|
||||||
_status_config_rendering(win, pager);
|
_status_config_rendering(win, naviframe);
|
||||||
_status_config_scrolling(win, pager);
|
_status_config_scrolling(win, naviframe);
|
||||||
_status_config_caches(win, pager);
|
_status_config_caches(win, naviframe);
|
||||||
_status_config_sizing(win, pager);
|
_status_config_sizing(win, naviframe);
|
||||||
|
|
||||||
// FIXME uncomment after flip style fix, please
|
// FIXME uncomment after flip style fix, please
|
||||||
//elm_object_style_set(pager, "flip");
|
//elm_object_style_set(naviframe, "flip");
|
||||||
elm_toolbar_item_selected_set(tb_sizing, EINA_TRUE);
|
elm_toolbar_item_selected_set(tb_sizing, EINA_TRUE);
|
||||||
elm_box_pack_end(bx0, pager);
|
elm_box_pack_end(bx0, naviframe);
|
||||||
evas_object_show(pager);
|
evas_object_show(naviframe);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|
|
@ -90,7 +90,7 @@ test_conformant(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event
|
||||||
static void
|
static void
|
||||||
popobj(void *data, Evas_Object *obj __UNUSED__, void *event __UNUSED__)
|
popobj(void *data, Evas_Object *obj __UNUSED__, void *event __UNUSED__)
|
||||||
{
|
{
|
||||||
elm_pager_content_pop(data);
|
elm_naviframe_item_pop(data);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -132,7 +132,7 @@ test_conformant2(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event
|
||||||
elm_box_pack_end(bx, btn);
|
elm_box_pack_end(bx, btn);
|
||||||
evas_object_show(btn);
|
evas_object_show(btn);
|
||||||
|
|
||||||
pg = elm_pager_add(win);
|
pg = elm_naviframe_add(win);
|
||||||
evas_object_size_hint_weight_set(pg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
evas_object_size_hint_weight_set(pg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
||||||
evas_object_size_hint_align_set(pg, EVAS_HINT_FILL, EVAS_HINT_FILL);
|
evas_object_size_hint_align_set(pg, EVAS_HINT_FILL, EVAS_HINT_FILL);
|
||||||
elm_box_pack_end(bx, pg);
|
elm_box_pack_end(bx, pg);
|
||||||
|
@ -143,7 +143,7 @@ test_conformant2(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event
|
||||||
conform = elm_conformant_add(win);
|
conform = elm_conformant_add(win);
|
||||||
evas_object_size_hint_weight_set(conform, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
evas_object_size_hint_weight_set(conform, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
||||||
evas_object_size_hint_align_set(conform, EVAS_HINT_FILL, EVAS_HINT_FILL);
|
evas_object_size_hint_align_set(conform, EVAS_HINT_FILL, EVAS_HINT_FILL);
|
||||||
elm_pager_content_push(pg, conform);
|
elm_naviframe_item_simple_push(pg, conform);
|
||||||
evas_object_show(conform);
|
evas_object_show(conform);
|
||||||
|
|
||||||
bx = elm_box_add(win);
|
bx = elm_box_add(win);
|
||||||
|
@ -175,7 +175,7 @@ test_conformant2(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event
|
||||||
conform = elm_conformant_add(win);
|
conform = elm_conformant_add(win);
|
||||||
evas_object_size_hint_weight_set(conform, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
evas_object_size_hint_weight_set(conform, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
||||||
evas_object_size_hint_align_set(conform, EVAS_HINT_FILL, EVAS_HINT_FILL);
|
evas_object_size_hint_align_set(conform, EVAS_HINT_FILL, EVAS_HINT_FILL);
|
||||||
elm_pager_content_push(pg, conform);
|
elm_naviframe_item_simple_push(pg, conform);
|
||||||
evas_object_show(conform);
|
evas_object_show(conform);
|
||||||
|
|
||||||
bx = elm_box_add(win);
|
bx = elm_box_add(win);
|
||||||
|
|
|
@ -1214,7 +1214,7 @@ test_genlist6(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_in
|
||||||
|
|
||||||
struct genlist7_data
|
struct genlist7_data
|
||||||
{
|
{
|
||||||
Evas_Object *win, *pager;
|
Evas_Object *win, *naviframe;
|
||||||
};
|
};
|
||||||
|
|
||||||
static Elm_Genlist_Item_Class itc7;
|
static Elm_Genlist_Item_Class itc7;
|
||||||
|
@ -1232,7 +1232,7 @@ test_genlist7_back_cb(void *data, Evas_Object *obj __UNUSED__, void *event_info
|
||||||
struct genlist7_data *info = data;
|
struct genlist7_data *info = data;
|
||||||
if (!info) return;
|
if (!info) return;
|
||||||
|
|
||||||
elm_pager_content_pop(info->pager);
|
elm_naviframe_item_pop(info->naviframe);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -1269,13 +1269,13 @@ test_genlist7_swipe(void *data, Evas_Object *obj __UNUSED__, void *event_info)
|
||||||
elm_box_pack_start(box, entry);
|
elm_box_pack_start(box, entry);
|
||||||
elm_box_pack_end(box, button);
|
elm_box_pack_end(box, button);
|
||||||
|
|
||||||
elm_pager_content_push(info->pager, box);
|
elm_naviframe_item_simple_push(info->naviframe, box);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
test_genlist7(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
|
test_genlist7(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
|
||||||
{
|
{
|
||||||
Evas_Object *win, *bg, *gl, *pager;
|
Evas_Object *win, *bg, *gl, *naviframe;
|
||||||
static struct genlist7_data info;
|
static struct genlist7_data info;
|
||||||
static Testitem tit[3];
|
static Testitem tit[3];
|
||||||
|
|
||||||
|
@ -1289,19 +1289,19 @@ test_genlist7(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_in
|
||||||
evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
||||||
evas_object_show(bg);
|
evas_object_show(bg);
|
||||||
|
|
||||||
pager = elm_pager_add(win);
|
naviframe = elm_naviframe_add(win);
|
||||||
elm_win_resize_object_add(win, pager);
|
elm_win_resize_object_add(win, naviframe);
|
||||||
evas_object_size_hint_weight_set(pager, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
evas_object_size_hint_weight_set(naviframe, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
||||||
evas_object_size_hint_align_set(pager, EVAS_HINT_FILL, EVAS_HINT_FILL);
|
evas_object_size_hint_align_set(naviframe, EVAS_HINT_FILL, EVAS_HINT_FILL);
|
||||||
evas_object_show(pager);
|
evas_object_show(naviframe);
|
||||||
info.pager = pager;
|
info.naviframe = naviframe;
|
||||||
|
|
||||||
gl = elm_genlist_add(win);
|
gl = elm_genlist_add(win);
|
||||||
evas_object_size_hint_align_set(gl, EVAS_HINT_FILL, EVAS_HINT_FILL);
|
evas_object_size_hint_align_set(gl, EVAS_HINT_FILL, EVAS_HINT_FILL);
|
||||||
evas_object_size_hint_weight_set(gl, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
evas_object_size_hint_weight_set(gl, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
||||||
evas_object_smart_callback_add(gl, "swipe", test_genlist7_swipe, &info);
|
evas_object_smart_callback_add(gl, "swipe", test_genlist7_swipe, &info);
|
||||||
evas_object_show(gl);
|
evas_object_show(gl);
|
||||||
elm_pager_content_push(pager, gl);
|
elm_naviframe_item_simple_push(naviframe, gl);
|
||||||
|
|
||||||
itc2.item_style = "default";
|
itc2.item_style = "default";
|
||||||
itc2.func.text_get = gl2_text_get;
|
itc2.func.text_get = gl2_text_get;
|
||||||
|
|
|
@ -576,7 +576,7 @@ test_list3(void *data __UNUSED__,
|
||||||
|
|
||||||
struct Pginfo
|
struct Pginfo
|
||||||
{
|
{
|
||||||
Evas_Object *pager, *win;
|
Evas_Object *naviframe, *win;
|
||||||
};
|
};
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -587,7 +587,7 @@ test_list4_back_cb(void *data,
|
||||||
struct Pginfo *info = data;
|
struct Pginfo *info = data;
|
||||||
if (!info) return;
|
if (!info) return;
|
||||||
|
|
||||||
elm_pager_content_pop(info->pager);
|
elm_naviframe_item_pop(info->naviframe);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -627,7 +627,7 @@ test_list4_swipe(void *data,
|
||||||
elm_box_pack_start(box, entry);
|
elm_box_pack_start(box, entry);
|
||||||
elm_box_pack_end(box, button);
|
elm_box_pack_end(box, button);
|
||||||
|
|
||||||
elm_pager_content_push(info->pager, box);
|
elm_naviframe_item_simple_push(info->naviframe, box);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -635,7 +635,7 @@ test_list4(void *data __UNUSED__,
|
||||||
Evas_Object *obj __UNUSED__,
|
Evas_Object *obj __UNUSED__,
|
||||||
void *event_info __UNUSED__)
|
void *event_info __UNUSED__)
|
||||||
{
|
{
|
||||||
Evas_Object *win, *bg, *li, *ic, *ic2, *pager;
|
Evas_Object *win, *bg, *li, *ic, *ic2, *naviframe;
|
||||||
static struct Pginfo info = {NULL, NULL};
|
static struct Pginfo info = {NULL, NULL};
|
||||||
char buf[PATH_MAX];
|
char buf[PATH_MAX];
|
||||||
|
|
||||||
|
@ -649,18 +649,18 @@ test_list4(void *data __UNUSED__,
|
||||||
evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
||||||
evas_object_show(bg);
|
evas_object_show(bg);
|
||||||
|
|
||||||
pager = elm_pager_add(win);
|
naviframe = elm_naviframe_add(win);
|
||||||
elm_win_resize_object_add(win, pager);
|
elm_win_resize_object_add(win, naviframe);
|
||||||
evas_object_size_hint_weight_set(pager, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
evas_object_size_hint_weight_set(naviframe, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
||||||
evas_object_size_hint_align_set(pager, EVAS_HINT_FILL, EVAS_HINT_FILL);
|
evas_object_size_hint_align_set(naviframe, EVAS_HINT_FILL, EVAS_HINT_FILL);
|
||||||
evas_object_show(pager);
|
evas_object_show(naviframe);
|
||||||
info.pager = pager;
|
info.naviframe = naviframe;
|
||||||
|
|
||||||
li = elm_list_add(win);
|
li = elm_list_add(win);
|
||||||
evas_object_size_hint_weight_set(li, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
evas_object_size_hint_weight_set(li, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
||||||
elm_list_mode_set(li, ELM_LIST_COMPRESS);
|
elm_list_mode_set(li, ELM_LIST_COMPRESS);
|
||||||
evas_object_smart_callback_add(li, "swipe", test_list4_swipe, &info);
|
evas_object_smart_callback_add(li, "swipe", test_list4_swipe, &info);
|
||||||
elm_pager_content_push(pager, li);
|
elm_naviframe_item_simple_push(naviframe, li);
|
||||||
|
|
||||||
static char pf_data[] = "Pink Floyd were formed in 1965, and originally consisted of university" \
|
static char pf_data[] = "Pink Floyd were formed in 1965, and originally consisted of university" \
|
||||||
"students Roger Waters, Nick Mason, Richard Wright, and Syd Barrett. The group were a popular" \
|
"students Roger Waters, Nick Mason, Richard Wright, and Syd Barrett. The group were a popular" \
|
||||||
|
|
|
@ -99,7 +99,6 @@ SRCS = \
|
||||||
slider_example.c \
|
slider_example.c \
|
||||||
panes_example.c \
|
panes_example.c \
|
||||||
ctxpopup_example_01.c \
|
ctxpopup_example_01.c \
|
||||||
pager_example_01.c \
|
|
||||||
separator_example_01.c \
|
separator_example_01.c \
|
||||||
radio_example_01.c \
|
radio_example_01.c \
|
||||||
panel_example_01.c \
|
panel_example_01.c \
|
||||||
|
@ -202,7 +201,6 @@ examples_PROGRAMS += \
|
||||||
fileselector_entry_example \
|
fileselector_entry_example \
|
||||||
index_example_01 \
|
index_example_01 \
|
||||||
index_example_02 \
|
index_example_02 \
|
||||||
pager_example_01 \
|
|
||||||
separator_example_01 \
|
separator_example_01 \
|
||||||
radio_example_01 \
|
radio_example_01 \
|
||||||
toggle_example_01 \
|
toggle_example_01 \
|
||||||
|
@ -287,7 +285,6 @@ SCREENSHOTS = \
|
||||||
slider_example:slider_example.png:0.0 \
|
slider_example:slider_example.png:0.0 \
|
||||||
panes_example:panes_example.png:0.0 \
|
panes_example:panes_example.png:0.0 \
|
||||||
ctxpopup_example_01:ctxpopup_example_01.png:0.0 \
|
ctxpopup_example_01:ctxpopup_example_01.png:0.0 \
|
||||||
pager_example_01:pager_example_01.png:0.0 \
|
|
||||||
separator_example_01:separator_example_01.png:0.0 \
|
separator_example_01:separator_example_01.png:0.0 \
|
||||||
radio_example_01:radio_example_01.png:0.0 \
|
radio_example_01:radio_example_01.png:0.0 \
|
||||||
toggle_example_01:toggle_example_01.png:0.0 \
|
toggle_example_01:toggle_example_01.png:0.0 \
|
||||||
|
|
|
@ -17,7 +17,7 @@ typedef struct
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
Evas_Object *inwin;
|
Evas_Object *inwin;
|
||||||
Evas_Object *pager;
|
Evas_Object *naviframe;
|
||||||
Evas_Object *grid;
|
Evas_Object *grid;
|
||||||
Evas_Object *settings;
|
Evas_Object *settings;
|
||||||
|
|
||||||
|
@ -45,7 +45,7 @@ _it_sel_cb(void *data, Evas_Object *obj __UNUSED__, void *event)
|
||||||
|
|
||||||
aid->emo = elm_object_item_data_get(gg_it);
|
aid->emo = elm_object_item_data_get(gg_it);
|
||||||
|
|
||||||
elm_pager_content_promote(aid->pager, aid->settings);
|
elm_naviframe_item_simple_promote(aid->naviframe, aid->settings);
|
||||||
}
|
}
|
||||||
|
|
||||||
static char *
|
static char *
|
||||||
|
@ -313,7 +313,7 @@ _image_insert_cb(void *data, Evas_Object *obj __UNUSED__, void *event __UNUSED__
|
||||||
{
|
{
|
||||||
App_Data *ad = data;
|
App_Data *ad = data;
|
||||||
App_Inwin_Data *aid;
|
App_Inwin_Data *aid;
|
||||||
Evas_Object *inwin, *box, *box2, *pager, *o;
|
Evas_Object *inwin, *box, *box2, *naviframe, *o;
|
||||||
|
|
||||||
aid = calloc(1, sizeof(App_Inwin_Data));
|
aid = calloc(1, sizeof(App_Inwin_Data));
|
||||||
if (!aid) return;
|
if (!aid) return;
|
||||||
|
@ -338,21 +338,21 @@ _image_insert_cb(void *data, Evas_Object *obj __UNUSED__, void *event __UNUSED__
|
||||||
elm_win_inwin_content_set(inwin, box);
|
elm_win_inwin_content_set(inwin, box);
|
||||||
evas_object_show(box);
|
evas_object_show(box);
|
||||||
|
|
||||||
pager = elm_pager_add(ad->win);
|
naviframe = elm_naviframe_add(ad->win);
|
||||||
evas_object_size_hint_weight_set(pager, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
evas_object_size_hint_weight_set(naviframe, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
||||||
evas_object_size_hint_align_set(pager, EVAS_HINT_FILL, EVAS_HINT_FILL);
|
evas_object_size_hint_align_set(naviframe, EVAS_HINT_FILL, EVAS_HINT_FILL);
|
||||||
elm_box_pack_end(box, pager);
|
elm_box_pack_end(box, naviframe);
|
||||||
evas_object_show(pager);
|
evas_object_show(naviframe);
|
||||||
|
|
||||||
o = _page_grid_add(ad->win, aid);
|
o = _page_grid_add(ad->win, aid);
|
||||||
elm_pager_content_push(pager, o);
|
elm_naviframe_item_simple_push(naviframe, o);
|
||||||
aid->grid = o;
|
aid->grid = o;
|
||||||
|
|
||||||
o = _page_settings_add(ad->win, aid);
|
o = _page_settings_add(ad->win, aid);
|
||||||
elm_pager_content_push(pager, o);
|
elm_naviframe_item_simple_push(naviframe, o);
|
||||||
aid->settings = o;
|
aid->settings = o;
|
||||||
|
|
||||||
elm_pager_content_promote(pager, aid->grid);
|
elm_naviframe_item_simple_promote(naviframe, aid->grid);
|
||||||
|
|
||||||
box2 = elm_box_add(ad->win);
|
box2 = elm_box_add(ad->win);
|
||||||
elm_box_horizontal_set(box2, EINA_TRUE);
|
elm_box_horizontal_set(box2, EINA_TRUE);
|
||||||
|
@ -371,7 +371,7 @@ _image_insert_cb(void *data, Evas_Object *obj __UNUSED__, void *event __UNUSED__
|
||||||
evas_object_smart_callback_add(o, "clicked", _insert_cancel_cb, aid);
|
evas_object_smart_callback_add(o, "clicked", _insert_cancel_cb, aid);
|
||||||
|
|
||||||
aid->inwin = inwin;
|
aid->inwin = inwin;
|
||||||
aid->pager = pager;
|
aid->naviframe = naviframe;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|
|
@ -1,82 +0,0 @@
|
||||||
//Compile with:
|
|
||||||
//gcc -g `pkg-config --cflags --libs elementary` pager_example_01.c -o pager_example_01
|
|
||||||
|
|
||||||
#include <Elementary.h>
|
|
||||||
#ifdef HAVE_CONFIG_H
|
|
||||||
# include "elementary_config.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
static void _promote(void *data, Evas_Object *obj, void *event_info);
|
|
||||||
static Evas_Object *pager;
|
|
||||||
|
|
||||||
EAPI_MAIN int
|
|
||||||
elm_main(int argc, char **argv)
|
|
||||||
{
|
|
||||||
Evas_Object *win, *bg, *rect, *bt;
|
|
||||||
|
|
||||||
win = elm_win_add(NULL, "pager", ELM_WIN_BASIC);
|
|
||||||
elm_win_title_set(win, "Pager");
|
|
||||||
elm_win_autodel_set(win, EINA_TRUE);
|
|
||||||
elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED);
|
|
||||||
|
|
||||||
bg = elm_bg_add(win);
|
|
||||||
elm_win_resize_object_add(win, bg);
|
|
||||||
evas_object_show(bg);
|
|
||||||
|
|
||||||
pager = elm_pager_add(win);
|
|
||||||
elm_object_style_set(pager, "fade");
|
|
||||||
evas_object_resize(pager, 180, 160);
|
|
||||||
evas_object_move(pager, 10, 10);
|
|
||||||
evas_object_show(pager);
|
|
||||||
|
|
||||||
rect = evas_object_rectangle_add(evas_object_evas_get(win));
|
|
||||||
evas_object_color_set(rect, 0, 0, 255, 255);
|
|
||||||
evas_object_show(rect);
|
|
||||||
elm_pager_content_push(pager, rect);
|
|
||||||
|
|
||||||
bt = elm_button_add(win);
|
|
||||||
elm_object_text_set(bt, "blue");
|
|
||||||
evas_object_resize(bt, 50, 20);
|
|
||||||
evas_object_move(bt, 10, 170);
|
|
||||||
evas_object_show(bt);
|
|
||||||
evas_object_smart_callback_add(bt, "clicked", _promote, rect);
|
|
||||||
|
|
||||||
rect = evas_object_rectangle_add(evas_object_evas_get(win));
|
|
||||||
evas_object_color_set(rect, 0, 255, 0, 255);
|
|
||||||
evas_object_show(rect);
|
|
||||||
elm_pager_content_push(pager, rect);
|
|
||||||
|
|
||||||
bt = elm_button_add(win);
|
|
||||||
elm_object_text_set(bt, "green");
|
|
||||||
evas_object_resize(bt, 60, 20);
|
|
||||||
evas_object_move(bt, 70, 170);
|
|
||||||
evas_object_show(bt);
|
|
||||||
evas_object_smart_callback_add(bt, "clicked", _promote, rect);
|
|
||||||
|
|
||||||
rect = evas_object_rectangle_add(evas_object_evas_get(win));
|
|
||||||
evas_object_color_set(rect, 255, 0, 0, 255);
|
|
||||||
evas_object_show(rect);
|
|
||||||
elm_pager_content_push(pager, rect);
|
|
||||||
|
|
||||||
bt = elm_button_add(win);
|
|
||||||
elm_object_text_set(bt, "red");
|
|
||||||
evas_object_resize(bt, 50, 20);
|
|
||||||
evas_object_move(bt, 140, 170);
|
|
||||||
evas_object_show(bt);
|
|
||||||
evas_object_smart_callback_add(bt, "clicked", _promote, rect);
|
|
||||||
|
|
||||||
evas_object_resize(win, 200, 200);
|
|
||||||
evas_object_show(win);
|
|
||||||
|
|
||||||
elm_run();
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
ELM_MAIN()
|
|
||||||
|
|
||||||
static void
|
|
||||||
_promote(void *data, Evas_Object *obj, void *event_info)
|
|
||||||
{
|
|
||||||
if(elm_pager_content_top_get(pager) != data)
|
|
||||||
elm_pager_content_promote(pager, data);
|
|
||||||
}
|
|
|
@ -17,7 +17,7 @@ typedef struct
|
||||||
{
|
{
|
||||||
Evas_Object *win;
|
Evas_Object *win;
|
||||||
Evas_Object *main_box;
|
Evas_Object *main_box;
|
||||||
Evas_Object *pager;
|
Evas_Object *naviframe;
|
||||||
Evas_Object *url;
|
Evas_Object *url;
|
||||||
Evas_Object *default_web;
|
Evas_Object *default_web;
|
||||||
Evas_Object *tabs;
|
Evas_Object *tabs;
|
||||||
|
@ -73,7 +73,7 @@ tab_current_set(Tab_Data *td)
|
||||||
nav_button_update(td->app);
|
nav_button_update(td->app);
|
||||||
elm_entry_icon_visible_set(td->app->url, EINA_TRUE);
|
elm_entry_icon_visible_set(td->app->url, EINA_TRUE);
|
||||||
|
|
||||||
elm_pager_content_promote(td->app->pager, td->web);
|
elm_naviframe_item_simple_promote(td->app->naviframe, td->web);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -151,7 +151,7 @@ tab_add(App_Data *ad)
|
||||||
evas_object_size_hint_weight_set(td->web, EVAS_HINT_EXPAND,
|
evas_object_size_hint_weight_set(td->web, EVAS_HINT_EXPAND,
|
||||||
EVAS_HINT_EXPAND);
|
EVAS_HINT_EXPAND);
|
||||||
evas_object_size_hint_align_set(td->web, EVAS_HINT_FILL, EVAS_HINT_FILL);
|
evas_object_size_hint_align_set(td->web, EVAS_HINT_FILL, EVAS_HINT_FILL);
|
||||||
elm_pager_content_push(ad->pager, td->web);
|
elm_naviframe_item_simple_push(ad->naviframe, td->web);
|
||||||
|
|
||||||
td->app = ad;
|
td->app = ad;
|
||||||
td->tab = elm_toolbar_item_append(td->app->tabs, NULL, "New tab",
|
td->tab = elm_toolbar_item_append(td->app->tabs, NULL, "New tab",
|
||||||
|
@ -463,7 +463,7 @@ default_content_set(Evas_Object *web)
|
||||||
int
|
int
|
||||||
elm_main(int argc __UNUSED__, char *argv[] __UNUSED__)
|
elm_main(int argc __UNUSED__, char *argv[] __UNUSED__)
|
||||||
{
|
{
|
||||||
Evas_Object *win, *bg, *box, *box2, *btn, *ic, *url, *pager, *tabs, *web;
|
Evas_Object *win, *bg, *box, *box2, *btn, *ic, *url, *naviframe, *tabs, *web;
|
||||||
Evas *e;
|
Evas *e;
|
||||||
Evas_Modifier_Mask ctrl_mask;
|
Evas_Modifier_Mask ctrl_mask;
|
||||||
App_Data *ad;
|
App_Data *ad;
|
||||||
|
@ -588,26 +588,26 @@ elm_main(int argc __UNUSED__, char *argv[] __UNUSED__)
|
||||||
elm_icon_standard_set(ic, "close");
|
elm_icon_standard_set(ic, "close");
|
||||||
elm_object_part_content_set(btn, "icon", ic);
|
elm_object_part_content_set(btn, "icon", ic);
|
||||||
|
|
||||||
pager = elm_pager_add(win);
|
naviframe = elm_naviframe_add(win);
|
||||||
evas_object_size_hint_weight_set(pager, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
evas_object_size_hint_weight_set(naviframe, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
||||||
evas_object_size_hint_align_set(pager, EVAS_HINT_FILL, EVAS_HINT_FILL);
|
evas_object_size_hint_align_set(naviframe, EVAS_HINT_FILL, EVAS_HINT_FILL);
|
||||||
elm_box_pack_end(box, pager);
|
elm_box_pack_end(box, naviframe);
|
||||||
evas_object_show(pager);
|
evas_object_show(naviframe);
|
||||||
|
|
||||||
elm_toolbar_menu_parent_set(tabs, pager);
|
elm_toolbar_menu_parent_set(tabs, naviframe);
|
||||||
|
|
||||||
web = elm_web_add(win);
|
web = elm_web_add(win);
|
||||||
elm_web_window_create_hook_set(web, _web_create_window_cb, ad);
|
elm_web_window_create_hook_set(web, _web_create_window_cb, ad);
|
||||||
elm_web_history_enable_set(web, EINA_FALSE);
|
elm_web_history_enable_set(web, EINA_FALSE);
|
||||||
evas_object_size_hint_weight_set(web, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
evas_object_size_hint_weight_set(web, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
||||||
evas_object_size_hint_align_set(web, EVAS_HINT_FILL, EVAS_HINT_FILL);
|
evas_object_size_hint_align_set(web, EVAS_HINT_FILL, EVAS_HINT_FILL);
|
||||||
elm_pager_content_push(pager, web);
|
elm_naviframe_item_simple_push(naviframe, web);
|
||||||
|
|
||||||
default_content_set(web);
|
default_content_set(web);
|
||||||
|
|
||||||
ad->win = win;
|
ad->win = win;
|
||||||
ad->main_box = box;
|
ad->main_box = box;
|
||||||
ad->pager = pager;
|
ad->naviframe = naviframe;
|
||||||
ad->url = url;
|
ad->url = url;
|
||||||
ad->default_web = web;
|
ad->default_web = web;
|
||||||
ad->tabs = tabs;
|
ad->tabs = tabs;
|
||||||
|
|
Loading…
Reference in New Issue