summaryrefslogtreecommitdiff
path: root/src/bin/elementary
diff options
context:
space:
mode:
authorAmitesh Singh <amitesh.sh@samsung.com>2017-12-13 16:44:50 +0900
committerAmitesh Singh <amitesh.sh@samsung.com>2017-12-13 16:50:45 +0900
commit57a92a26c9abead38c1dbe1c0b87c869870ab831 (patch)
tree7b426bed0a5474c2069716dd779e3b39827afab7 /src/bin/elementary
parent2bc583e3e7d0ea7da6d7921f816b5fc05b4370fb (diff)
elm test: add efl.ui.panes test code in separate file.
Diffstat (limited to 'src/bin/elementary')
-rw-r--r--src/bin/elementary/Makefile.am1
-rw-r--r--src/bin/elementary/test_panes.c45
-rw-r--r--src/bin/elementary/test_ui_panes.c47
3 files changed, 49 insertions, 44 deletions
diff --git a/src/bin/elementary/Makefile.am b/src/bin/elementary/Makefile.am
index 8ce36a7a8d..43c72f412d 100644
--- a/src/bin/elementary/Makefile.am
+++ b/src/bin/elementary/Makefile.am
@@ -113,6 +113,7 @@ test_notify.c \
113test_nstate.c \ 113test_nstate.c \
114test_panel.c \ 114test_panel.c \
115test_panes.c \ 115test_panes.c \
116test_ui_panes.c \
116test_part_bg.c \ 117test_part_bg.c \
117test_photo.c \ 118test_photo.c \
118test_photocam.c \ 119test_photocam.c \
diff --git a/src/bin/elementary/test_panes.c b/src/bin/elementary/test_panes.c
index a4d6894b0f..21eb3dcf5b 100644
--- a/src/bin/elementary/test_panes.c
+++ b/src/bin/elementary/test_panes.c
@@ -102,47 +102,4 @@ test_panes(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_inf
102 102
103 evas_object_resize(win, 320, 400); 103 evas_object_resize(win, 320, 400);
104 evas_object_show(win); 104 evas_object_show(win);
105} 105} \ No newline at end of file
106
107void
108test_panes_minsize(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
109{
110 Eo *win, *panes, *panes_h;
111
112 win = efl_add(EFL_UI_WIN_CLASS, NULL,
113 efl_ui_win_type_set(efl_added, EFL_UI_WIN_BASIC),
114 efl_text_set(efl_added, "Efl.Ui.Panes"),
115 efl_ui_win_autodel_set(efl_added, EINA_TRUE)
116 );
117
118 panes = efl_add(EFL_UI_PANES_CLASS, win,
119 efl_content_set(win, efl_added),
120 efl_ui_panes_split_ratio_set(efl_added, 0.7)
121 );
122
123 efl_add(EFL_UI_BUTTON_CLASS, win,
124 efl_text_set(efl_added, "Left - user set min size(110,110)"),
125 efl_gfx_size_hint_min_set(efl_added, EINA_SIZE2D(110, 110)),
126 efl_content_set(efl_part(panes, "first"), efl_added)
127 );
128
129 panes_h = efl_add(EFL_UI_PANES_CLASS, win,
130 efl_ui_direction_set(efl_added, EFL_UI_DIR_HORIZONTAL),
131 efl_content_set(efl_part(panes, "second"), efl_added)
132 );
133 efl_add(EFL_UI_BUTTON_CLASS, win,
134 efl_text_set(efl_added, "Up - user set min size(10,0)"),
135 efl_gfx_size_hint_min_set(efl_added, EINA_SIZE2D(10, 0)),
136 efl_content_set(efl_part(panes_h, "first"), efl_added)
137 );
138 efl_ui_panes_part_hint_min_allow_set(efl_part(panes_h, "first"), EINA_TRUE);
139
140 efl_add(EFL_UI_BUTTON_CLASS, win,
141 efl_text_set(efl_added, "Down - min size 50 40"),
142 efl_gfx_size_hint_min_set(efl_added, EINA_SIZE2D(50, 40)),
143 efl_content_set(efl_part(panes_h, "second"), efl_added)
144 );
145
146 efl_gfx_size_set(win, EINA_SIZE2D(320, 400));
147}
148
diff --git a/src/bin/elementary/test_ui_panes.c b/src/bin/elementary/test_ui_panes.c
new file mode 100644
index 0000000000..58a70f3c33
--- /dev/null
+++ b/src/bin/elementary/test_ui_panes.c
@@ -0,0 +1,47 @@
1#ifdef HAVE_CONFIG_H
2# include "elementary_config.h"
3#endif
4#include <Elementary.h>
5
6void
7test_panes_minsize(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
8{
9 Eo *win, *panes, *panes_h;
10
11 win = efl_add(EFL_UI_WIN_CLASS, NULL,
12 efl_ui_win_type_set(efl_added, EFL_UI_WIN_BASIC),
13 efl_text_set(efl_added, "Efl.Ui.Panes"),
14 efl_ui_win_autodel_set(efl_added, EINA_TRUE)
15 );
16
17 panes = efl_add(EFL_UI_PANES_CLASS, win,
18 efl_content_set(win, efl_added),
19 efl_ui_panes_split_ratio_set(efl_added, 0.7)
20 );
21
22 efl_add(EFL_UI_BUTTON_CLASS, win,
23 efl_text_set(efl_added, "Left - user set min size(110,110)"),
24 efl_gfx_size_hint_min_set(efl_added, EINA_SIZE2D(110, 110)),
25 efl_content_set(efl_part(panes, "first"), efl_added)
26 );
27
28 panes_h = efl_add(EFL_UI_PANES_CLASS, win,
29 efl_ui_direction_set(efl_added, EFL_UI_DIR_HORIZONTAL),
30 efl_content_set(efl_part(panes, "second"), efl_added)
31 );
32 efl_add(EFL_UI_BUTTON_CLASS, win,
33 efl_text_set(efl_added, "Up - user set min size(10,0)"),
34 efl_gfx_size_hint_min_set(efl_added, EINA_SIZE2D(10, 0)),
35 efl_content_set(efl_part(panes_h, "first"), efl_added)
36 );
37 efl_ui_panes_part_hint_min_allow_set(efl_part(panes_h, "first"), EINA_TRUE);
38
39 efl_add(EFL_UI_BUTTON_CLASS, win,
40 efl_text_set(efl_added, "Down - min size 50 40"),
41 efl_gfx_size_hint_min_set(efl_added, EINA_SIZE2D(50, 40)),
42 efl_content_set(efl_part(panes_h, "second"), efl_added)
43 );
44
45 efl_gfx_size_set(win, EINA_SIZE2D(320, 400));
46}
47