aboutsummaryrefslogtreecommitdiffstats
path: root/legacy/elementary/src/bin/test_table.c
diff options
context:
space:
mode:
authorCarsten Haitzler <raster@rasterman.com>2011-05-25 11:44:10 +0000
committerCarsten Haitzler <raster@rasterman.com>2011-05-25 11:44:10 +0000
commit66b0ee3cd39f85685885e1db0b1b9a20fcb57072 (patch)
tree023b4811938ff252924a72a1680ea69b556986f9 /legacy/elementary/src/bin/test_table.c
parentand... flip now does interactive flipping.. AND page curl flips... (diff)
downloadefl-66b0ee3cd39f85685885e1db0b1b9a20fcb57072.tar.gz
add table test case.
SVN revision: 59664
Diffstat (limited to 'legacy/elementary/src/bin/test_table.c')
-rw-r--r--legacy/elementary/src/bin/test_table.c62
1 files changed, 62 insertions, 0 deletions
diff --git a/legacy/elementary/src/bin/test_table.c b/legacy/elementary/src/bin/test_table.c
index 7f28cd3c81..6f89a110b3 100644
--- a/legacy/elementary/src/bin/test_table.c
+++ b/legacy/elementary/src/bin/test_table.c
@@ -131,4 +131,66 @@ test_table2(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info
evas_object_show(win);
}
+
+static void
+my_tb_ch(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
+{
+ Evas_Object *win = data;
+ Evas_Object *tb = evas_object_data_get(win, "tb");
+ Evas_Object *b2 = evas_object_data_get(win, "b2");
+
+ elm_table_unpack(tb, b2);
+ elm_table_pack(tb, b2, 1, 0, 1, 2);
+}
+
+void
+test_table3(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
+{
+ Evas_Object *win, *bg, *tb, *bt;
+
+ win = elm_win_add(NULL, "table3", ELM_WIN_BASIC);
+ elm_win_title_set(win, "Table 3");
+ 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, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+ 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, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+ 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, EVAS_HINT_EXPAND, 0.0);
+ 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