From 0bb49676580dc52afbede79c60f85350f4be8432 Mon Sep 17 00:00:00 2001 From: JinYong Park Date: Fri, 9 Dec 2016 14:16:30 +0900 Subject: [PATCH] Revert "ctxpopup: add auto hide feature more, and add example for rotate callback since Tizen 3.0" This reverts commit 9fbf1018cd3e401fedfee5370613eefbd0e77707. Change-Id: I71f570d0dfb1cc1ff388eca5abeb82dfd5ceb111 Signed-off-by: Jinyong Park --- .../html/native/ui/efl/component_ctxpopup_mn.htm | 46 ---------------------- 1 file changed, 46 deletions(-) diff --git a/org.tizen.guides/html/native/ui/efl/component_ctxpopup_mn.htm b/org.tizen.guides/html/native/ui/efl/component_ctxpopup_mn.htm index 1bb52c8..9086372 100644 --- a/org.tizen.guides/html/native/ui/efl/component_ctxpopup_mn.htm +++ b/org.tizen.guides/html/native/ui/efl/component_ctxpopup_mn.htm @@ -102,12 +102,6 @@ elm_box_pack_end(box, btn); evas_object_show(btn); static void -_ctxpopup_dismissed_cb(void *data, Evas_Object *obj, void *event_info) -{ -    evas_object_del(obj); -} - -static void _btn_clicked_cb(void *data, Evas_Object *obj, void *event_info) {     Evas_Object *nf = data; @@ -120,9 +114,6 @@ _btn_clicked_cb(void *data, Evas_Object *obj, void *event_info)     elm_ctxpopup_item_append(ctxpopup, "Item 3", NULL, ctxpopup_item_select_cb, NULL);     elm_ctxpopup_item_append(ctxpopup, "Item 4", NULL, ctxpopup_item_select_cb, NULL); -    eext_object_event_callback_add(ctxpopup, EEXT_CALLBACK_BACK, eext_ctxpopup_back_cb, NULL); -    evas_object_smart_callback_add(ctxpopup, "dismissed", _ctxpopup_dismissed_cb, NULL); -     evas_object_geometry_get(obj, &x, &y, &w, &h);     evas_object_move(ctxpopup, x + (w / 2), y + (h / 2));     evas_object_show(ctxpopup); @@ -147,48 +138,12 @@ _btn_clicked_cb(void *data, Evas_Object *obj, void *event_info) elm_ctxpopup_horizontal_set(ctxpopup, EINA_TRUE); -
  • Disable auto hiding.

    The ctxpopup can be hidden automatically when its parent is resized. The auto hide functionality is enabled by default. You can disable auto hiding by calling the elm_ctxpopup_auto_hide_disabled_set() function with EINA_TRUE:

     elm_ctxpopup_auto_hide_disabled_set(ctxpopup, EINA_TRUE);
     
  • -
  • Set auto hide when rotating the display (since Tizen 3.0). -

    The ctxpopup is closed when you touch outside of the ctxpopup component, or rotate the display.

    -

    Since Tizen 3.0, the auto hide feature is disabled when rotating a display. When the display is rotated, the ctxpopup component position must be reset.

    -

    The following example shows how to set the ctxpopup component position when rotating the display:

    -
    -/* Ctxpopup position is determined with the button's position */
    -
    -Evas_Object *win;
    -Evas_Object *button;
    -Evas_Object *ctxpopup;
    -
    -ctxpopup = elm_ctxpopup_add(win);
    -
    -elm_object_signal_callback_add(ctxpopup, "elm,state,orient,*", "elm", _ctxpopup_orient_changed_cb, button);
    -
    -move_ctxpopup(ctxpopup, button);
    -
    -static void
    -move_ctxpopup(Evas_Object *ctxpopup, Evas_Object *obj)
    -{
    -    /* Move the ctxpopup component to the button component */
    -}
    -
    -static void
    -_ctxpopup_orient_changed_cb(void *data, Evas_Object *obj, const char *emission, const char *source)
    -{
    -    /*
    -       The ctxpopup component emits one of the following signals:
    -       "elm,state,orient,0", "elm,state,orient,90", "elm,state,orient,180", "elm,state,orient,270"
    -    */
    -
    -    move_ctxpopup(obj, data);
    -}
    -
    -
  • Set the priority of the direction where the ctxpopup appears from with the elm_ctxpopup_direction_priority_set() function:

    @@ -205,7 +160,6 @@ elm_ctxpopup_dismiss(ctxpopup);
  • -

    Items

    The ctxpopup can contain a small number of items. Each item can have a label, an icon, or both.

    -- 2.7.4