svn update: 48945 (latest:48959)
[framework/uifw/elementary.git] / src / bin / test_table.c
1 #include <Elementary.h>
2 #ifndef ELM_LIB_QUICKLAUNCH
3 void
4 test_table(void *data, Evas_Object *obj, void *event_info)
5 {
6    Evas_Object *win, *bg, *tb, *bt;
7
8    win = elm_win_add(NULL, "table", ELM_WIN_BASIC);
9    elm_win_title_set(win, "Table");
10    elm_win_autodel_set(win, 1);
11
12    bg = elm_bg_add(win);
13    evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
14    elm_win_resize_object_add(win, bg);
15    evas_object_show(bg);
16
17    tb = elm_table_add(win);
18    elm_win_resize_object_add(win, tb);
19    evas_object_size_hint_weight_set(tb, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
20    evas_object_show(tb);
21
22    bt = elm_button_add(win);
23    elm_button_label_set(bt, "Button 1");
24    evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
25    evas_object_size_hint_align_set(bt, EVAS_HINT_FILL, EVAS_HINT_FILL);
26    elm_table_pack(tb, bt, 0, 0, 1, 1);
27    evas_object_show(bt);
28
29    bt = elm_button_add(win);
30    elm_button_label_set(bt, "Button 2");
31    evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
32    evas_object_size_hint_align_set(bt, EVAS_HINT_FILL, EVAS_HINT_FILL);
33    elm_table_pack(tb, bt, 1, 0, 1, 1);
34    evas_object_show(bt);
35
36    bt = elm_button_add(win);
37    elm_button_label_set(bt, "Button 3");
38    evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
39    evas_object_size_hint_align_set(bt, EVAS_HINT_FILL, EVAS_HINT_FILL);
40    elm_table_pack(tb, bt, 2, 0, 1, 1);
41    evas_object_show(bt);
42
43    bt = elm_button_add(win);
44    elm_button_label_set(bt, "Button 4");
45    evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
46    evas_object_size_hint_align_set(bt, EVAS_HINT_FILL, EVAS_HINT_FILL);
47    elm_table_pack(tb, bt, 0, 1, 2, 1);
48    evas_object_show(bt);
49
50    bt = elm_button_add(win);
51    elm_button_label_set(bt, "Button 5");
52    evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
53    evas_object_size_hint_align_set(bt, EVAS_HINT_FILL, EVAS_HINT_FILL);
54    elm_table_pack(tb, bt, 2, 1, 1, 3);
55    evas_object_show(bt);
56
57    bt = elm_button_add(win);
58    elm_button_label_set(bt, "Button 6");
59    evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
60    evas_object_size_hint_align_set(bt, EVAS_HINT_FILL, EVAS_HINT_FILL);
61    elm_table_pack(tb, bt, 0, 2, 2, 2);
62    evas_object_show(bt);
63
64    evas_object_show(win);
65 }
66 #endif