aboutsummaryrefslogtreecommitdiffstats
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
parentefl_ui_popup: cover the corner case of popup sizing evaluation (diff)
downloadefl-f22d40b1e66d76dc5c1b38bcd3829d1ec5fe9948.tar.gz
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 'src/bin/elementary/test_popup.c')
-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
efl_event_callback_add(efl_ui_popup, EFL_UI_POPUP_ALERT_EVENT_CLICKED, efl_ui_popup_alert_clicked_cb, NULL);
}
+
+void
+test_efl_ui_popup_alert_scroll(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
+{
+ Evas_Object *win;
+ char buf[PATH_MAX];
+
+ win = elm_win_util_standard_add("Efl UI Popup Alert Scroll", "Efl UI Popup Alert Scroll");
+ elm_win_autodel_set(win, EINA_TRUE);
+
+ evas_object_resize(win, 320, 320);
+ evas_object_show(win);
+
+ Evas_Object *efl_ui_popup= efl_add(EFL_UI_POPUP_ALERT_SCROLL_CLASS, win);
+
+ efl_ui_popup_alert_title_set(efl_ui_popup, "title");
+
+ evas_object_resize(efl_ui_popup, 160, 160);
+ evas_object_show(efl_ui_popup);
+
+ Evas_Object *layout = elm_layout_add(efl_ui_popup);
+ snprintf(buf, sizeof(buf), "%s/objects/test.edj", elm_app_data_dir_get());
+ elm_layout_file_set(layout, buf, "efl_ui_popup_scroll_content");
+ evas_object_show(layout);
+
+ efl_content_set(efl_ui_popup, layout);
+
+ efl_ui_popup_alert_button_set(efl_ui_popup, EFL_UI_POPUP_ALERT_BUTTON_POSITIVE, "Yes");
+ efl_ui_popup_alert_button_set(efl_ui_popup, EFL_UI_POPUP_ALERT_BUTTON_NEGATIVE, "No");
+ efl_ui_popup_alert_button_set(efl_ui_popup, EFL_UI_POPUP_ALERT_BUTTON_USER, "Cancel");
+
+ efl_ui_popup_alert_scroll_expandable_set(efl_ui_popup, EINA_TRUE, EINA_TRUE);
+ efl_gfx_size_hint_max_set(efl_ui_popup, EINA_SIZE2D(300, 180));
+
+ efl_event_callback_add(efl_ui_popup, EFL_UI_POPUP_ALERT_EVENT_CLICKED, efl_ui_popup_alert_clicked_cb, NULL);
+}