summaryrefslogtreecommitdiff
path: root/src/bin/elementary
diff options
context:
space:
mode:
authorTaehyub Kim <taehyub.kim@samsung.com>2017-08-31 13:20:05 +0900
committerJaehyun Cho <jae_hyun.cho@samsung.com>2017-11-28 17:15:42 +0900
commit3dccf133bbfa3869217578219870e65687f4092c (patch)
tree18cb12e9c6be6d2dd630a66c308dd043421205a9 /src/bin/elementary
parentf22d40b1e66d76dc5c1b38bcd3829d1ec5fe9948 (diff)
efl_ui_popup_alert_text: add Efl.Ui.Popup.Alert.Text Class
Summary: Add initial code for Efl.Ui.Popup.Alert.Text Class. It supports setting texts on the content area. Test Plan: 1. run elementary_text -to efluipopupalerttext Reviewers: Jaehyun_Cho, jpeg, thiepha, cedric, woohyun, Blackmole Reviewed By: Jaehyun_Cho Differential Revision: https://phab.enlightenment.org/D5124
Diffstat (limited to 'src/bin/elementary')
-rw-r--r--src/bin/elementary/test.c2
-rw-r--r--src/bin/elementary/test_popup.c33
2 files changed, 35 insertions, 0 deletions
diff --git a/src/bin/elementary/test.c b/src/bin/elementary/test.c
index f5450f2a15..f5666e52ff 100644
--- a/src/bin/elementary/test.c
+++ b/src/bin/elementary/test.c
@@ -277,6 +277,7 @@ void test_popup(void *data, Evas_Object *obj, void *event_info);
277void test_efl_ui_popup(void *data, Evas_Object *obj, void *event_info); 277void test_efl_ui_popup(void *data, Evas_Object *obj, void *event_info);
278void test_efl_ui_popup_alert(void *data, Evas_Object *obj, void *event_info); 278void test_efl_ui_popup_alert(void *data, Evas_Object *obj, void *event_info);
279void test_efl_ui_popup_alert_scroll(void *data, Evas_Object *obj, void *event_info); 279void test_efl_ui_popup_alert_scroll(void *data, Evas_Object *obj, void *event_info);
280void test_efl_ui_popup_alert_text(void *data, Evas_Object *obj, void *event_info);
280void test_dayselector(void *data, Evas_Object *obj, void *event_info); 281void test_dayselector(void *data, Evas_Object *obj, void *event_info);
281void test_image(void *data, Evas_Object *obj, void *event_info); 282void test_image(void *data, Evas_Object *obj, void *event_info);
282void test_image_scale_type(void *data, Evas_Object *obj, void *event_info); 283void test_image_scale_type(void *data, Evas_Object *obj, void *event_info);
@@ -1048,6 +1049,7 @@ add_tests:
1048 ADD_TEST(NULL, "Popups", "Efl UI Popup", test_efl_ui_popup); 1049 ADD_TEST(NULL, "Popups", "Efl UI Popup", test_efl_ui_popup);
1049 ADD_TEST(NULL, "Popups", "Efl UI Popup Alert", test_efl_ui_popup_alert); 1050 ADD_TEST(NULL, "Popups", "Efl UI Popup Alert", test_efl_ui_popup_alert);
1050 ADD_TEST(NULL, "Popups", "Efl UI Popup Alert Scroll", test_efl_ui_popup_alert_scroll); 1051 ADD_TEST(NULL, "Popups", "Efl UI Popup Alert Scroll", test_efl_ui_popup_alert_scroll);
1052 ADD_TEST(NULL, "Popups", "Efl UI Popup Alert Text", test_efl_ui_popup_alert_text);
1051 1053
1052 //------------------------------// 1054 //------------------------------//
1053 ADD_TEST(NULL, "Times & Dates", "Calendar", test_calendar); 1055 ADD_TEST(NULL, "Times & Dates", "Calendar", test_calendar);
diff --git a/src/bin/elementary/test_popup.c b/src/bin/elementary/test_popup.c
index 299644f17d..afc29a5858 100644
--- a/src/bin/elementary/test_popup.c
+++ b/src/bin/elementary/test_popup.c
@@ -1172,3 +1172,36 @@ test_efl_ui_popup_alert_scroll(void *data EINA_UNUSED, Evas_Object *obj EINA_UNU
1172 1172
1173 efl_event_callback_add(efl_ui_popup, EFL_UI_POPUP_ALERT_EVENT_CLICKED, efl_ui_popup_alert_clicked_cb, NULL); 1173 efl_event_callback_add(efl_ui_popup, EFL_UI_POPUP_ALERT_EVENT_CLICKED, efl_ui_popup_alert_clicked_cb, NULL);
1174} 1174}
1175
1176void
1177test_efl_ui_popup_alert_text(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
1178{
1179 Evas_Object *win;
1180
1181 win = elm_win_util_standard_add("Efl UI Popup Alert Text", "Efl UI Popup Alert Text");
1182 elm_win_autodel_set(win, EINA_TRUE);
1183
1184 evas_object_resize(win, 320, 320);
1185 evas_object_show(win);
1186
1187 Evas_Object *efl_ui_popup= efl_add(EFL_UI_POPUP_ALERT_TEXT_CLASS, win);
1188
1189 efl_ui_popup_alert_title_set(efl_ui_popup, "title");
1190
1191 evas_object_resize(efl_ui_popup, 160, 160);
1192 evas_object_show(efl_ui_popup);
1193
1194 efl_text_set(efl_ui_popup,
1195 "This is Text Popup This is Text Popup This is Text Popup This is Text Popup This is Text Popup This is Text Popup This is Text Popup"
1196 "This is Text Popup This is Text Popup This is Text Popup This is Text Popup This is Text Popup This is Text Popup This is Text Popup"
1197 "This is Text Popup This is Text Popup This is Text Popup This is Text Popup This is Text Popup This is Text Popup This is Text Popup");
1198
1199 efl_ui_popup_alert_button_set(efl_ui_popup, EFL_UI_POPUP_ALERT_BUTTON_POSITIVE, "Yes");
1200 efl_ui_popup_alert_button_set(efl_ui_popup, EFL_UI_POPUP_ALERT_BUTTON_NEGATIVE, "No");
1201 efl_ui_popup_alert_button_set(efl_ui_popup, EFL_UI_POPUP_ALERT_BUTTON_USER, "Cancel");
1202
1203 efl_ui_popup_alert_text_expandable_set(efl_ui_popup, EINA_TRUE);
1204 efl_gfx_size_hint_max_set(efl_ui_popup, EINA_SIZE2D(100, 180));
1205
1206 efl_event_callback_add(efl_ui_popup, EFL_UI_POPUP_ALERT_EVENT_CLICKED, efl_ui_popup_alert_clicked_cb, NULL);
1207}