From: raster Date: Thu, 26 May 2011 08:45:20 +0000 (+0000) Subject: add test4 for table X-Git-Tag: REL_F_I9500_20120323_1~17^2~2686 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=2cc22bac3bbb6140bf367e325e455d4d7b2ae6f9;p=framework%2Fuifw%2Felementary.git add test4 for table git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/elementary@59696 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33 --- diff --git a/src/bin/test.c b/src/bin/test.c index a352cba..5bc470c 100644 --- a/src/bin/test.c +++ b/src/bin/test.c @@ -71,6 +71,7 @@ void test_genlist10(void *data, Evas_Object *obj, void *event_info); void test_table(void *data, Evas_Object *obj, void *event_info); void test_table2(void *data, Evas_Object *obj, void *event_info); void test_table3(void *data, Evas_Object *obj, void *event_info); +void test_table4(void *data, Evas_Object *obj, void *event_info); void test_gengrid(void *data, Evas_Object *obj, void *event_info); void test_gengrid2(void *data, Evas_Object *obj, void *event_info); void test_pager(void *data, Evas_Object *obj, void *event_info); @@ -292,6 +293,7 @@ my_win_main(char *autorun) ADD_TEST("Table", test_table); ADD_TEST("Table Homogeneous", test_table2); ADD_TEST("Table 3", test_table3); + ADD_TEST("Table 4", test_table4); ADD_TEST("Clock", test_clock); ADD_TEST("Clock 2", test_clock2); ADD_TEST("Layout", test_layout); diff --git a/src/bin/test_table.c b/src/bin/test_table.c index 81e9227..a5f86c2 100644 --- a/src/bin/test_table.c +++ b/src/bin/test_table.c @@ -193,4 +193,54 @@ test_table3(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info evas_object_show(win); } +void +test_table4(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__) +{ + Evas_Object *win, *bg, *tb, *bt; + + win = elm_win_add(NULL, "table4", ELM_WIN_BASIC); + elm_win_title_set(win, "Table 4"); + elm_win_autodel_set(win, 1); + + bg = elm_bg_add(win); + evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); + elm_win_resize_object_add(win, bg); + evas_object_show(bg); + + tb = elm_table_add(win); + elm_win_resize_object_add(win, tb); + evas_object_size_hint_weight_set(tb, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); + evas_object_data_set(win, "tb", tb); + evas_object_show(tb); + + bt = elm_button_add(win); + elm_button_label_set(bt, "Button 1"); + evas_object_size_hint_weight_set(bt, 0.25, 0.25); + evas_object_size_hint_align_set(bt, EVAS_HINT_FILL, EVAS_HINT_FILL); + elm_table_pack(tb, bt, 0, 0, 1, 1); + evas_object_data_set(win, "b1", bt); + evas_object_smart_callback_add(bt, "clicked", my_tb_ch, win); + evas_object_show(bt); + + bt = elm_button_add(win); + elm_button_label_set(bt, "Button 2"); + evas_object_size_hint_weight_set(bt, 0.75, 0.25); + evas_object_size_hint_align_set(bt, EVAS_HINT_FILL, EVAS_HINT_FILL); + elm_table_pack(tb, bt, 1, 0, 1, 1); + evas_object_data_set(win, "b2", bt); + evas_object_smart_callback_add(bt, "clicked", my_tb_ch, win); + evas_object_show(bt); + + bt = elm_button_add(win); + elm_button_label_set(bt, "Button 3"); + evas_object_size_hint_weight_set(bt, 0.25, 0.75); + evas_object_size_hint_align_set(bt, EVAS_HINT_FILL, EVAS_HINT_FILL); + elm_table_pack(tb, bt, 0, 1, 1, 1); + evas_object_data_set(win, "b3", bt); + evas_object_smart_callback_add(bt, "clicked", my_tb_ch, win); + evas_object_show(bt); + + evas_object_show(win); +} + #endif