1 #include <Elementary.h>
3 # include "elementary_config.h"
5 #ifndef ELM_LIB_QUICKLAUNCH
7 test_separator(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
9 Evas_Object *win, *bg, *bx0, *bx, *bt, *sp;
11 win = elm_win_add(NULL, "separators", ELM_WIN_BASIC);
12 elm_win_title_set(win, "Separators");
13 elm_win_autodel_set(win, 1);
16 elm_win_resize_object_add(win, bg);
17 evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
20 bx0 = elm_box_add(win);
21 evas_object_size_hint_weight_set(bx0, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
22 elm_box_horizontal_set(bx0, 1);
23 elm_win_resize_object_add(win, bx0);
24 evas_object_show(bx0);
26 bx = elm_box_add(win);
27 evas_object_size_hint_weight_set(bx, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
28 elm_box_pack_end(bx0, bx);
31 bt = elm_button_add(win);
32 elm_object_text_set(bt, "Left upper corner");
33 elm_box_pack_end(bx, bt);
36 sp = elm_separator_add(win);
37 elm_separator_horizontal_set(sp, 1); // by default, separator is vertical, we must set it horizontal
38 elm_box_pack_end(bx, sp);
41 bt = elm_button_add(win);
42 elm_object_text_set(bt, "Left lower corner");
43 elm_object_disabled_set(bt, 1);
44 elm_box_pack_end(bx, bt);
47 sp = elm_separator_add(win); // now we need vertical separator
48 elm_box_pack_end(bx0, sp);
51 bx = elm_box_add(win);
52 evas_object_size_hint_weight_set(bx, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
53 elm_box_pack_end(bx0, bx);
56 bt = elm_button_add(win);
57 elm_object_text_set(bt, "Right upper corner");
58 elm_object_disabled_set(bt, 1);
59 elm_box_pack_end(bx, bt);
62 sp = elm_separator_add(win);
63 elm_separator_horizontal_set(sp, 1);
64 elm_box_pack_end(bx, sp);
67 bt = elm_button_add(win);
68 elm_object_text_set(bt, "Right lower corner");
69 elm_box_pack_end(bx, bt);
72 evas_object_show(win);