fixed plugin image size problem
[framework/uifw/elementary.git] / src / bin / test.c
index 3682971..57e5788 100644 (file)
@@ -1,8 +1,10 @@
-#include <Elementary.h>
-#include "test.h"
 #ifdef HAVE_CONFIG_H
 # include "elementary_config.h"
 #endif
+
+#include <string.h>
+#include <Elementary.h>
+#include "test.h"
 #ifndef ELM_LIB_QUICKLAUNCH
 
 /* all tests prototypes */
@@ -10,6 +12,7 @@ void test_bg_plain(void *data, Evas_Object *obj, void *event_info);
 void test_bg_image(void *data, Evas_Object *obj, void *event_info);
 void test_bg_options(void *data, Evas_Object *obj, void *event_info);
 void test_icon(void *data, Evas_Object *obj, void *event_info);
+void test_icon_transparent(void *data, Evas_Object *obj, void *event_info);
 void test_box_vert(void *data, Evas_Object *obj, void *event_info);
 void test_box_vert2(void *data, Evas_Object *obj, void *event_info);
 void test_box_pack(void *data, Evas_Object *obj, void *event_info);
@@ -29,13 +32,14 @@ void test_transit8(void *data, Evas_Object *obj, void *event_info);
 void test_transit9(void *data, Evas_Object *obj, void *event_info);
 void test_fileselector_button(void *data, Evas_Object *obj, void *event_info);
 void test_fileselector_entry(void *data, Evas_Object *obj, void *event_info);
-void test_toggle(void *data, Evas_Object *obj, void *event_info);
 void test_clock(void *data, Evas_Object *obj, void *event_info);
 void test_clock2(void *data, Evas_Object *obj, void *event_info);
 void test_clock3(void *data, Evas_Object *obj, void *event_info);
 void test_check(void *data, Evas_Object *obj, void *event_info);
+void test_check_toggle(void *data, Evas_Object *obj, void *event_info);
 void test_radio(void *data, Evas_Object *obj, void *event_info);
 void test_layout(void *data, Evas_Object *obj, void *event_info);
+void test_layout2(void *data, Evas_Object *obj, void *event_info);
 void test_hover(void *data, Evas_Object *obj, void *event_info);
 void test_hover2(void *data, Evas_Object *obj, void *event_info);
 void test_entry(void *data, Evas_Object *obj, void *event_info);
@@ -48,8 +52,8 @@ void test_entry7(void *data, Evas_Object *obj, void *event_info);
 void test_entry8(void *data, Evas_Object *obj, void *event_info);
 void test_entry_notepad(void *data, Evas_Object *obj, void *event_info);
 void test_multibuttonentry(void *data, Evas_Object *obj, void *event_info);
-void test_anchorview(void *data, Evas_Object *obj, void *event_info);
-void test_anchorblock(void *data, Evas_Object *obj, void *event_info);
+void test_entry_anchor2(void *data, Evas_Object *obj, void *event_info);
+void test_entry_anchor(void *data, Evas_Object *obj, void *event_info);
 void test_toolbar(void *data, Evas_Object *obj, void *event_info);
 void test_toolbar2(void *data, Evas_Object *obj, void *event_info);
 void test_toolbar3(void *data, Evas_Object *obj, void *event_info);
@@ -57,6 +61,7 @@ void test_toolbar4(void *data, Evas_Object *obj, void *event_info);
 void test_toolbar5(void *data, Evas_Object *obj, void *event_info);
 void test_toolbar6(void *data, Evas_Object *obj, void *event_info);
 void test_toolbar7(void *data, Evas_Object *obj, void *event_info);
+void test_toolbar8(void *data, Evas_Object *obj, void *event_info);
 void test_hoversel(void *data, Evas_Object *obj, void *event_info);
 void test_list(void *data, Evas_Object *obj, void *event_info);
 void test_list_horizontal(void *data, Evas_Object *obj, void *event_info);
@@ -64,6 +69,7 @@ void test_list2(void *data, Evas_Object *obj, void *event_info);
 void test_list3(void *data, Evas_Object *obj, void *event_info);
 void test_list4(void *data, Evas_Object *obj, void *event_info);
 void test_list5(void *data, Evas_Object *obj, void *event_info);
+void test_list6(void *data, Evas_Object *obj, void *event_info);
 void test_inwin(void *data, Evas_Object *obj, void *event_info);
 void test_inwin2(void *data, Evas_Object *obj, void *event_info);
 void test_scaling(void *data, Evas_Object *obj, void *event_info);
@@ -85,6 +91,8 @@ void test_genlist12(void *data, Evas_Object *obj, void *event_info);
 void test_genlist13(void *data, Evas_Object *obj, void *event_info);
 void test_genlist14(void *data, Evas_Object *obj, void *event_info);
 void test_genlist15(void *data, Evas_Object *obj, void *event_info);
+void test_genlist16(void *data, Evas_Object *obj, void *event_info);
+void test_genlist17(void *data, Evas_Object *obj, void *event_info);
 void test_gesture_layer(void *data, Evas_Object *obj, void *event_info);
 void test_gesture_layer2(void *data, Evas_Object *obj, void *event_info);
 void test_gesture_layer3(void *data, Evas_Object *obj, void *event_info);
@@ -120,6 +128,7 @@ void test_panel(void *data, Evas_Object *obj, void *event_info);
 void test_panes(void *data, Evas_Object *obj, void *event_info);
 void test_calendar(void *data, Evas_Object *obj, void *event_info);
 void test_calendar2(void *data, Evas_Object *obj, void *event_info);
+void test_calendar3(void *data, Evas_Object *obj, void *event_info);
 void test_map(void *data, Evas_Object *obj, void *event_info);
 void test_weather(void *data, Evas_Object *obj, void *event_info);
 void test_flip(void *data, Evas_Object *obj, void *event_info);
@@ -128,6 +137,7 @@ void test_flip3(void *data, Evas_Object *obj, void *event_info);
 void test_flip4(void *data, Evas_Object *obj, void *event_info);
 void test_flip_page(void *data, Evas_Object *obj, void *event_info);
 void test_label(void *data, Evas_Object *obj, void *event_info);
+void test_label2(void *data, Evas_Object *obj, void *event_info);
 void test_conformant(void *data, Evas_Object *obj, void *event_info);
 void test_conformant2(void *data, Evas_Object *obj, void *event_info);
 void test_multi(void *data, Evas_Object *obj, void *event_info);
@@ -161,7 +171,12 @@ void test_glview_simple(void *data, Evas_Object *obj, void *event_info);
 void test_glview(void *data, Evas_Object *obj, void *event_info);
 void test_3d(void *data, Evas_Object *obj, void *event_info);
 void test_naviframe(void *data, Evas_Object *obj, void *event_info);
-void test_factory(void *data, Evas_Object *obj, void *event_info);
+void test_naviframe_complex(void *data, Evas_Object *obj, void *event_info);
+//void test_factory(void *data, Evas_Object *obj, void *event_info);
+void test_datetime(void *data, Evas_Object *obj, void *event_info);
+void test_popup(void *data, Evas_Object *obj, void *event_info);
+void test_dayselector(void *data, Evas_Object *obj, void *event_info);
+void test_config(void *data, Evas_Object *obj, void *event_info);
 #ifdef HAVE_EMOTION
 void test_video(void *data, Evas_Object *obj, void *event_info);
 #endif
@@ -173,6 +188,10 @@ void test_web_normal(void *data, Evas_Object *obj, void *event_info);
 void test_web_mobile(void *data, Evas_Object *obj, void *event_info);
 #endif
 
+Evas_Object *win, *tbx; // TODO: refactoring
+void *tt;
+Eina_List *tests;
+
 struct elm_test
 {
    const char *icon;
@@ -191,7 +210,7 @@ elm_test_sort(const void *pa, const void *pb)
 }
 
 static void
-elm_test_add(Eina_List **p_list, const char *icon, const char *category, const char *name, void (*cb)(void *, Evas_Object *, void *))
+_elm_test_add(Eina_List **p_list, const char *icon, const char *category, const char *name, void (*cb)(void *, Evas_Object *, void *))
 {
    struct elm_test *t = malloc(sizeof(struct elm_test));
    t->icon = icon;
@@ -211,7 +230,7 @@ static void
 _ui_tg_changed(void *data, Evas_Object *obj, void *event_info)
 {
    (void) data; (void) event_info;
-   elm_mirrored_set(elm_check_state_get(obj));
+   elm_config_mirrored_set(elm_check_state_get(obj));
 }
 
 static void
@@ -221,14 +240,81 @@ _frame_clicked(void *data __UNUSED__, Evas_Object *obj, void *event_info __UNUSE
 }
 
 static void
+_menu_create(const char *option_str)
+{
+   struct elm_test *t = NULL;
+   const char *pcat = NULL;
+   Evas_Object *cfr = NULL, *tbx2 = NULL, *bt = NULL, *ic = NULL;
+   char buf[PATH_MAX];
+   Eina_List *l;
+
+   elm_box_clear(tbx);
+   EINA_LIST_FOREACH(tests, l, t)
+     {
+        if (option_str && !strcasestr(t->name, option_str)) continue;
+        if ((!pcat) || (strcmp(pcat, t->category)))
+          {
+             cfr = elm_frame_add(win);
+             // FIXME: add new style of frame for this
+             evas_object_smart_callback_add(cfr, "clicked", _frame_clicked, NULL);
+             elm_frame_autocollapse_set(cfr, EINA_TRUE);
+             elm_object_text_set(cfr, t->category);
+             evas_object_size_hint_weight_set(cfr, EVAS_HINT_EXPAND, 0.0);
+             evas_object_size_hint_fill_set(cfr, EVAS_HINT_FILL, 0.0);
+             elm_box_pack_end(tbx, cfr);
+             evas_object_show(cfr);
+
+             tbx2 = elm_box_add(win);
+             elm_box_layout_set(tbx2, evas_object_box_layout_flow_horizontal, NULL, NULL);
+             evas_object_size_hint_weight_set(tbx2, EVAS_HINT_EXPAND, 0.0);
+             evas_object_size_hint_align_set(tbx2, EVAS_HINT_FILL, 0.0);
+             elm_box_align_set(tbx2, 0.0, 0.5);
+             elm_object_content_set(cfr, tbx2);
+             evas_object_show(tbx2);
+          }
+        bt = elm_button_add(win);
+        // FIXME: add new style of button for this like efm in e17
+        elm_object_text_set(bt, t->name);
+        if (t->icon)
+          {
+             ic = elm_icon_add(win);
+             snprintf(buf, sizeof(buf), "%s/images/%s", elm_app_data_dir_get(), t->icon);
+             elm_icon_file_set(ic, buf, NULL);
+             elm_object_part_content_set(bt, "icon", ic);
+             evas_object_show(ic);
+          }
+        elm_box_pack_end(tbx2, bt);
+        evas_object_show(bt);
+        evas_object_smart_callback_add(bt, "clicked", t->cb, NULL);
+        pcat = t->category;
+        if (t == tt) tt = cfr;
+     }
+}
+
+static void
+_entry_activated_cb(void *data __UNUSED__, Evas_Object *obj, void *event_info __UNUSED__)
+{
+   const char *str = elm_entry_entry_get(obj);
+   if (!str) return;
+   _menu_create(str);
+}
+
+static void
+_btn_clicked_cb(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
+{
+   const char *str = elm_entry_entry_get(data);
+   if (!str) return;
+   _menu_create(str);
+}
+
+static void
 my_win_main(char *autorun, Eina_Bool test_win_only)
 {
-   Evas_Object *win = NULL, *bg = NULL, *bx0 = NULL, *lb = NULL;
-   Evas_Object *fr = NULL, *tg = NULL, *sc = NULL, *ic = NULL;
-   Evas_Object *tbx = NULL, *cfr = NULL, *tbx2 = NULL, *bt = NULL;
-   Eina_List *tests, *l;
+   Evas_Object *bg = NULL, *bx0 = NULL, *bx1 = NULL, *lb = NULL;
+   Evas_Object *fr = NULL, *tg = NULL, *sc = NULL, *en = NULL;
+   Evas_Object *btn = NULL;
+   Eina_List *l;
    struct elm_test *t = NULL;
-   void *tt;
 
    if (test_win_only) goto add_tests;
    /* Create an elm window - It returns an evas object. This is a little
@@ -242,7 +328,11 @@ my_win_main(char *autorun, Eina_Bool test_win_only)
     * is no parent. "main" is the name of the window - used by the window
     * manager for identifying the window uniquely amongst all the windows
     * within this application (and all instances of the application). The
-    * type is a basic window (the final parameter) */
+    * type is a basic window (the final parameter).
+    * You can call elm_win_util_standard_add() instead. This is a convenient API
+    * for window and bg creation. You don't need to create bg object manually.
+    * You can also set the title of the window at the same time. 
+    *   ex) win = elm_win_util_standard_add("main", "Elementary Tests"); */
    win = elm_win_add(NULL, "main", ELM_WIN_BASIC);
    /* Set the title of the window - This is in the titlebar. */
    elm_win_title_set(win, "Elementary Tests");
@@ -291,20 +381,49 @@ my_win_main(char *autorun, Eina_Bool test_win_only)
 
    lb = elm_label_add(win);
    elm_object_text_set(lb,
-                       "Please select a test from the list below<br/>"
-                       "by clicking the test button to show the<br/>"
-                       "test window.");
+                       "Please select a test from the list below by clicking<br/>"
+                       "the test button to show the test window.");
    elm_object_content_set(fr, lb);
    evas_object_show(lb);
 
    tg = elm_check_add(win);
    elm_object_style_set(tg, "toggle");
    elm_object_text_set(tg, "UI-Mirroring:");
-   elm_check_state_set(tg, elm_mirrored_get());
+   elm_check_state_set(tg, elm_config_mirrored_get());
    evas_object_smart_callback_add(tg, "changed", _ui_tg_changed, NULL);
    elm_box_pack_end(bx0, tg);
    evas_object_show(tg);
 
+   bx1 = elm_box_add(win);
+   elm_box_horizontal_set(bx1, EINA_TRUE);
+   evas_object_size_hint_weight_set(bx1, EVAS_HINT_EXPAND, 0.0);
+   evas_object_size_hint_align_set(bx1, EVAS_HINT_FILL, 0.0);
+   elm_box_pack_end(bx0, bx1);
+   evas_object_show(bx1);
+
+   lb = elm_label_add(win);
+   elm_object_text_set(lb, " Search Menu :");
+   evas_object_size_hint_weight_set(lb, 0.0, EVAS_HINT_EXPAND);
+   evas_object_size_hint_align_set(lb, 0.0, EVAS_HINT_FILL);
+   elm_box_pack_end(bx1, lb);
+   evas_object_show(lb);
+
+   en = elm_entry_add(win);
+   elm_entry_single_line_set(en, EINA_TRUE);
+   elm_entry_scrollable_set(en, EINA_TRUE);
+   evas_object_size_hint_weight_set(en, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+   evas_object_size_hint_align_set(en, EVAS_HINT_FILL, EVAS_HINT_FILL);
+   evas_object_smart_callback_add(en, "activated", _entry_activated_cb, NULL);
+   elm_box_pack_end(bx1, en);
+   evas_object_show(en);
+   elm_object_focus_set(en, EINA_TRUE);
+
+   btn = elm_button_add(win);
+   elm_object_text_set(btn, "Go");
+   evas_object_smart_callback_add(btn, "clicked", _btn_clicked_cb, en);
+   elm_box_pack_end(bx1, btn);
+   evas_object_show(btn);
+
    sc = elm_scroller_add(win);
    elm_scroller_bounce_set(sc, EINA_FALSE, EINA_TRUE);
    evas_object_size_hint_weight_set(sc, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
@@ -320,7 +439,7 @@ my_win_main(char *autorun, Eina_Bool test_win_only)
 
 add_tests:
    tests = NULL;
-#define ADD_TEST(icon_, cat_, name_, cb_) elm_test_add(&tests, icon_, cat_, name_, cb_)
+#define ADD_TEST(icon_, cat_, name_, cb_) _elm_test_add(&tests, icon_, cat_, name_, cb_)
 
    //------------------------------//
    ADD_TEST(NULL, "Window / Background", "Bg Plain", test_bg_plain);
@@ -335,7 +454,8 @@ add_tests:
    ADD_TEST(NULL, "Window / Background", "Window Plug", test_win_plug);
 
    //------------------------------//
-   ADD_TEST(NULL, "Images", "Icon Transparent", test_icon);
+   ADD_TEST(NULL, "Images", "Icon", test_icon);
+   ADD_TEST(NULL, "Images", "Icon Transparent", test_icon_transparent);
    ADD_TEST(NULL, "Images", "Icon Animation", test_icon_animated);
    ADD_TEST(NULL, "Images", "Photocam", test_photocam);
    ADD_TEST(NULL, "Images", "Photo", test_photo);
@@ -360,6 +480,7 @@ add_tests:
    ADD_TEST(NULL, "Containers", "Table 6", test_table6);
    ADD_TEST(NULL, "Containers", "Table 7", test_table7);
    ADD_TEST(NULL, "Containers", "Layout", test_layout);
+   ADD_TEST(NULL, "Containers", "Layout 2", test_layout2);
    ADD_TEST(NULL, "Containers", "Grid", test_grid);
 
    //------------------------------//
@@ -373,6 +494,8 @@ add_tests:
    ADD_TEST(NULL, "Entries", "Entry 8", test_entry8);
    ADD_TEST(NULL, "Entries", "Entry Notepad", test_entry_notepad);
    ADD_TEST(NULL, "Entries", "Multibuttonentry", test_multibuttonentry);
+   ADD_TEST(NULL, "Entries", "Entry Anchor", test_entry_anchor);
+   ADD_TEST(NULL, "Entries", "Entry Anchor2", test_entry_anchor2);
 
    //------------------------------//
    ADD_TEST(NULL, "Buttons", "Buttons", test_button);
@@ -402,6 +525,7 @@ add_tests:
    ADD_TEST(NULL, "Toolbars", "Toolbar 5", test_toolbar5);
    ADD_TEST(NULL, "Toolbars", "Toolbar 6", test_toolbar6);
    ADD_TEST(NULL, "Toolbars", "Toolbar 7", test_toolbar7);
+   ADD_TEST(NULL, "Toolbars", "Toolbar 8", test_toolbar8);
 
    //------------------------------//
    ADD_TEST(NULL, "Lists", "List", test_list);
@@ -410,6 +534,7 @@ add_tests:
    ADD_TEST(NULL, "Lists", "List 3", test_list3);
    ADD_TEST(NULL, "Lists", "List 4", test_list4);
    ADD_TEST(NULL, "Lists", "List 5", test_list5);
+   ADD_TEST(NULL, "Lists", "List 6", test_list6);
    ADD_TEST(NULL, "Lists", "Genlist", test_genlist);
    ADD_TEST(NULL, "Lists", "Genlist 2", test_genlist2);
    ADD_TEST(NULL, "Lists", "Genlist 3", test_genlist3);
@@ -419,7 +544,8 @@ add_tests:
    ADD_TEST(NULL, "Lists", "Genlist Tree", test_genlist6);
    ADD_TEST(NULL, "Lists", "Genlist Group", test_genlist8);
    ADD_TEST(NULL, "Lists", "Genlist Group Tree", test_genlist9);
-   ADD_TEST(NULL, "Lists", "Genlist Mode", test_genlist10);
+   ADD_TEST(NULL, "Lists", "Genlist Decorate Item Mode", test_genlist10);
+   ADD_TEST(NULL, "Lists", "Genlist Decorate All Mode", test_genlist15);
    ADD_TEST(NULL, "Lists", "Genlist Reorder Mode", test_genlist11);
 #ifdef HAVE_EIO
    ADD_TEST(NULL, "Lists", "Genlist Eio", test_eio);
@@ -427,7 +553,8 @@ add_tests:
    ADD_TEST(NULL, "Lists", "Genlist Textblock", test_genlist12);
    ADD_TEST(NULL, "Lists", "Genlist Tree, Insert Sorted", test_genlist13);
    ADD_TEST(NULL, "Lists", "Genlist Tree, Insert Relative", test_genlist14);
-   ADD_TEST(NULL, "Lists", "Genlist Edit Mode", test_genlist15);
+   ADD_TEST(NULL, "Lists", "Genlist Flip Mode", test_genlist16);
+   ADD_TEST(NULL, "Lists", "Genlist Tree Effect", test_genlist17);
    ADD_TEST(NULL, "Lists", "GenGrid", test_gengrid);
    ADD_TEST(NULL, "Lists", "GenGrid 2", test_gengrid2);
    ADD_TEST(NULL, "Lists", "GenGrid Group", test_gengrid3);
@@ -467,6 +594,7 @@ add_tests:
    ADD_TEST(NULL, "Selectors", "Hoversel", test_hoversel);
    ADD_TEST(NULL, "Selectors", "Radios", test_radio);
    ADD_TEST(NULL, "Selectors", "Flip Selector", test_flipselector);
+   ADD_TEST(NULL, "Selectors", "Dayselector", test_dayselector);
 
    //------------------------------//
    ADD_TEST(NULL, "Cursors", "Cursor", test_cursor);
@@ -489,8 +617,8 @@ add_tests:
    ADD_TEST(NULL, "Range Values", "Progressbar", test_progressbar);
 
    //------------------------------//
-   ADD_TEST(NULL, "Booleans", "Checks", test_check);
-   ADD_TEST(NULL, "Booleans", "Toggles", test_toggle);
+   ADD_TEST(NULL, "Booleans", "Check", test_check);
+   ADD_TEST(NULL, "Booleans", "Check Toggle", test_check_toggle);
 
    //------------------------------//
    ADD_TEST(NULL, "Popups", "Ctxpopup", test_ctxpopup);
@@ -499,18 +627,20 @@ add_tests:
    ADD_TEST(NULL, "Popups", "Notify", test_notify);
    ADD_TEST(NULL, "Popups", "Tooltip", test_tooltip);
    ADD_TEST(NULL, "Popups", "Tooltip 2", test_tooltip2);
+   ADD_TEST(NULL, "Popups", "Popup", test_popup);
 
    //------------------------------//
    ADD_TEST(NULL, "Times & Dates", "Calendar", test_calendar);
    ADD_TEST(NULL, "Times & Dates", "Calendar 2", test_calendar2);
+   ADD_TEST(NULL, "Times & Dates", "Calendar 3", test_calendar3);
    ADD_TEST(NULL, "Times & Dates", "Clock", test_clock);
    ADD_TEST(NULL, "Times & Dates", "Clock 2", test_clock2);
    ADD_TEST(NULL, "Times & Dates", "Clock 3", test_clock3);
+   ADD_TEST(NULL, "Times & Dates", "Datetime", test_datetime);
 
    //------------------------------//
-   ADD_TEST(NULL, "Text", "Anchorview", test_anchorview);
-   ADD_TEST(NULL, "Text", "Anchorblock", test_anchorblock);
    ADD_TEST(NULL, "Text", "Label", test_label);
+   ADD_TEST(NULL, "Text", "Label2", test_label2);
 
    //------------------------------//
    ADD_TEST(NULL, "Stored Surface Buffer", "Launcher", test_launcher);
@@ -524,7 +654,8 @@ add_tests:
    ADD_TEST(NULL, "Focus", "Focus 4", test_focus4);
 
    //------------------------------//
-   ADD_TEST(NULL, "Storyboard", "Naviframe", test_naviframe);
+   ADD_TEST(NULL, "Naviframe", "Naviframe", test_naviframe);
+   ADD_TEST(NULL, "Naviframe", "Naviframe: Complex", test_naviframe_complex);
 
    //------------------------------//
    ADD_TEST(NULL, "Geographic", "Map", test_map);
@@ -539,13 +670,14 @@ add_tests:
 
    //------------------------------//
    ADD_TEST(NULL, "Helpers", "Store", test_store);
-   ADD_TEST(NULL, "Helpers", "Factory", test_factory);
+//   ADD_TEST(NULL, "Helpers", "Factory", test_factory);
 
    //------------------------------//
    ADD_TEST(NULL, "Micellaneous", "Copy And Paste", test_cnp);
    ADD_TEST(NULL, "Micellaneous", "Weather", test_weather);
    ADD_TEST(NULL, "Micellaneous", "Icon Desktops", test_icon_desktops);
    ADD_TEST(NULL, "Micellaneous", "Floating Objects", test_floating);
+   ADD_TEST(NULL, "Micellaneous", "Configuration", test_config);
 
 #undef ADD_TEST
 
@@ -567,58 +699,13 @@ add_tests:
    if (test_win_only)
      {
         EINA_LIST_FREE(tests, t)
-           free (t);
+          free(t);
 
         return;
      }
 
    if (tests)
-     {
-        const char *pcat = NULL;
-
-        EINA_LIST_FREE(tests, t)
-          {
-             if ((!pcat) || (strcmp(pcat, t->category)))
-               {
-                  cfr = elm_frame_add(win);
-                  // FIXME: add new style of frame for this
-                  evas_object_smart_callback_add(cfr, "clicked", _frame_clicked, NULL);
-                  elm_frame_autocollapse_set(cfr, EINA_TRUE);
-                  elm_object_text_set(cfr, t->category);
-                  evas_object_size_hint_weight_set(cfr, EVAS_HINT_EXPAND, 0.0);
-                  evas_object_size_hint_fill_set(cfr, EVAS_HINT_FILL, 0.0);
-                  elm_box_pack_end(tbx, cfr);
-                  evas_object_show(cfr);
-
-                  tbx2 = elm_box_add(win);
-                  elm_box_layout_set(tbx2, evas_object_box_layout_flow_horizontal, NULL, NULL);
-                  evas_object_size_hint_weight_set(tbx2, EVAS_HINT_EXPAND, 0.0);
-                  evas_object_size_hint_align_set(tbx2, EVAS_HINT_FILL, 0.0);
-                  elm_box_align_set(tbx2, 0.0, 0.5);
-                  elm_object_content_set(cfr, tbx2);
-                  evas_object_show(tbx2);
-               }
-             bt = elm_button_add(win);
-             // FIXME: add new style of button for this like efm in e17
-             elm_object_text_set(bt, t->name);
-             if (t->icon)
-               {
-                  char buf[PATH_MAX];
-
-                  ic = elm_icon_add(win);
-                  snprintf(buf, sizeof(buf), "%s/images/%s", elm_app_data_dir_get(), t->icon);
-                  elm_icon_file_set(ic, buf, NULL);
-                  elm_object_part_content_set(bt, "icon", ic);
-                  evas_object_show(ic);
-               }
-             elm_box_pack_end(tbx2, bt);
-             evas_object_show(bt);
-             evas_object_smart_callback_add(bt, "clicked", t->cb, NULL);
-             pcat = t->category;
-             if (t == tt) tt = cfr;
-             free(t);
-          }
-     }
+     _menu_create(NULL);
 
    /* set an initial window size */
    evas_object_resize(win, 480, 480);