Tizen 2.1 base
[framework/uifw/elementary.git] / src / bin / test_separator.c
1 #ifdef HAVE_CONFIG_H
2 # include "elementary_config.h"
3 #endif
4 #include <Elementary.h>
5 #ifndef ELM_LIB_QUICKLAUNCH
6 void
7 test_separator(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
8 {
9    Evas_Object *win, *bx0, *bx, *bt, *sp;
10
11    win = elm_win_util_standard_add("separators", "Separators");
12    elm_win_autodel_set(win, EINA_TRUE);
13
14    bx0 = elm_box_add(win);
15    evas_object_size_hint_weight_set(bx0, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
16    elm_box_horizontal_set(bx0, EINA_TRUE);
17    elm_win_resize_object_add(win, bx0);
18    evas_object_show(bx0);
19
20    bx = elm_box_add(win);
21    evas_object_size_hint_weight_set(bx, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
22    elm_box_pack_end(bx0, bx);
23    evas_object_show(bx);
24
25    bt = elm_button_add(win);
26    elm_object_text_set(bt, "Left upper corner");
27    elm_box_pack_end(bx, bt);
28    evas_object_show(bt);
29
30    sp = elm_separator_add(win);
31    elm_separator_horizontal_set(sp, EINA_TRUE); // by default, separator is vertical, we must set it horizontal
32    elm_box_pack_end(bx, sp);
33    evas_object_show(sp);
34
35    bt = elm_button_add(win);
36    elm_object_text_set(bt, "Left lower corner");
37    elm_object_disabled_set(bt, EINA_TRUE);
38    elm_box_pack_end(bx, bt);
39    evas_object_show(bt);
40
41    sp = elm_separator_add(win); // now we need vertical separator
42    elm_box_pack_end(bx0, sp);
43    evas_object_show(sp);
44
45    bx = elm_box_add(win);
46    evas_object_size_hint_weight_set(bx, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
47    elm_box_pack_end(bx0, bx);
48    evas_object_show(bx);
49
50    bt = elm_button_add(win);
51    elm_object_text_set(bt, "Right upper corner");
52    elm_object_disabled_set(bt, EINA_TRUE);
53    elm_box_pack_end(bx, bt);
54    evas_object_show(bt);
55
56    sp = elm_separator_add(win);
57    elm_separator_horizontal_set(sp, EINA_TRUE);
58    elm_box_pack_end(bx, sp);
59    evas_object_show(sp);
60
61    bt = elm_button_add(win);
62    elm_object_text_set(bt, "Right lower corner");
63    elm_box_pack_end(bx, bt);
64    evas_object_show(bt);
65
66    evas_object_show(win);
67 }
68 #endif