summaryrefslogtreecommitdiff
path: root/src/bin/elementary/test_popup.c
diff options
context:
space:
mode:
authorTaehyub Kim <taehyub.kim@samsung.com>2017-08-31 13:18:45 +0900
committerJaehyun Cho <jae_hyun.cho@samsung.com>2017-11-28 17:15:42 +0900
commitf22d40b1e66d76dc5c1b38bcd3829d1ec5fe9948 (patch)
tree5e15d85b2f2f256a71a721c1b61efcf3d437cf1c /src/bin/elementary/test_popup.c
parentb1eac4c46ba00528ae28a8b41c490dff95c66140 (diff)
efl_ui_popup_alert_scroll: add Efl.Ui.Popup.Alert.Scroll class
Summary: Add initial code for Efl.Ui.Popup.Alert.Scroll Class. It supports scrolling content. Test Plan: 1. run elementary_test -to efluipopupalertscroll Reviewers: Jaehyun_Cho, jpeg, thiepha, cedric, Blackmole, woohyun Reviewed By: Jaehyun_Cho Differential Revision: https://phab.enlightenment.org/D5123
Diffstat (limited to '')
-rw-r--r--src/bin/elementary/test_popup.c36
1 files changed, 36 insertions, 0 deletions
diff --git a/src/bin/elementary/test_popup.c b/src/bin/elementary/test_popup.c
index 4074862175..299644f17d 100644
--- a/src/bin/elementary/test_popup.c
+++ b/src/bin/elementary/test_popup.c
@@ -1136,3 +1136,39 @@ test_efl_ui_popup_alert(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, vo
1136 1136
1137 efl_event_callback_add(efl_ui_popup, EFL_UI_POPUP_ALERT_EVENT_CLICKED, efl_ui_popup_alert_clicked_cb, NULL); 1137 efl_event_callback_add(efl_ui_popup, EFL_UI_POPUP_ALERT_EVENT_CLICKED, efl_ui_popup_alert_clicked_cb, NULL);
1138} 1138}
1139
1140void
1141test_efl_ui_popup_alert_scroll(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
1142{
1143 Evas_Object *win;
1144 char buf[PATH_MAX];
1145
1146 win = elm_win_util_standard_add("Efl UI Popup Alert Scroll", "Efl UI Popup Alert Scroll");
1147 elm_win_autodel_set(win, EINA_TRUE);
1148
1149 evas_object_resize(win, 320, 320);
1150 evas_object_show(win);
1151
1152 Evas_Object *efl_ui_popup= efl_add(EFL_UI_POPUP_ALERT_SCROLL_CLASS, win);
1153
1154 efl_ui_popup_alert_title_set(efl_ui_popup, "title");
1155
1156 evas_object_resize(efl_ui_popup, 160, 160);
1157 evas_object_show(efl_ui_popup);
1158
1159 Evas_Object *layout = elm_layout_add(efl_ui_popup);
1160 snprintf(buf, sizeof(buf), "%s/objects/test.edj", elm_app_data_dir_get());
1161 elm_layout_file_set(layout, buf, "efl_ui_popup_scroll_content");
1162 evas_object_show(layout);
1163
1164 efl_content_set(efl_ui_popup, layout);
1165
1166 efl_ui_popup_alert_button_set(efl_ui_popup, EFL_UI_POPUP_ALERT_BUTTON_POSITIVE, "Yes");
1167 efl_ui_popup_alert_button_set(efl_ui_popup, EFL_UI_POPUP_ALERT_BUTTON_NEGATIVE, "No");
1168 efl_ui_popup_alert_button_set(efl_ui_popup, EFL_UI_POPUP_ALERT_BUTTON_USER, "Cancel");
1169
1170 efl_ui_popup_alert_scroll_expandable_set(efl_ui_popup, EINA_TRUE, EINA_TRUE);
1171 efl_gfx_size_hint_max_set(efl_ui_popup, EINA_SIZE2D(300, 180));
1172
1173 efl_event_callback_add(efl_ui_popup, EFL_UI_POPUP_ALERT_EVENT_CLICKED, efl_ui_popup_alert_clicked_cb, NULL);
1174}