1 #include <Elementary.h>
3 # include "elementary_config.h"
5 #ifndef ELM_LIB_QUICKLAUNCH
7 static double size = 0.0;
10 _press(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
16 _unpress(void *data __UNUSED__, Evas_Object *obj, void *event_info __UNUSED__)
18 printf("unpress, size : %f\n", elm_panes_content_left_size_get(obj));
22 _clicked(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
29 _clicked_double(void *data __UNUSED__, Evas_Object *obj, void *event_info __UNUSED__)
31 printf("clicked double\n");
32 if(elm_panes_content_left_size_get(obj) > 0)
34 size = elm_panes_content_left_size_get(obj);
35 elm_panes_content_left_size_set(obj, 0.0);
38 elm_panes_content_left_size_set(obj, size);
43 test_panes(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
45 Evas_Object *win, *bg, *panes, *panes_h, *bt;
47 win = elm_win_add(NULL, "panes", ELM_WIN_BASIC);
48 elm_win_title_set(win, "Panes");
49 elm_win_autodel_set(win, 1);
52 elm_win_resize_object_add(win, bg);
53 evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
54 elm_win_focus_highlight_enabled_set(win, EINA_TRUE);
57 panes = elm_panes_add(win);
58 elm_win_resize_object_add(win, panes);
59 evas_object_size_hint_weight_set(panes, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
60 evas_object_size_hint_align_set(panes, EVAS_HINT_FILL, EVAS_HINT_FILL);
61 evas_object_show(panes);
63 evas_object_smart_callback_add(panes, "clicked", _clicked, panes);
64 evas_object_smart_callback_add(panes, "clicked,double", _clicked_double, panes);
66 evas_object_smart_callback_add(panes, "press", _press, panes);
67 evas_object_smart_callback_add(panes, "unpress", _unpress, panes);
71 bt = elm_button_add(win);
72 elm_object_text_set(bt, "Left");
73 evas_object_size_hint_weight_set(bt, 1.0, 1.0);
74 evas_object_size_hint_align_set(bt, -1.0, -1.0);
76 elm_panes_content_left_set(panes, bt);
80 panes_h = elm_panes_add(win);
81 elm_panes_horizontal_set(panes_h, EINA_TRUE);
82 evas_object_size_hint_weight_set(panes_h, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
83 evas_object_size_hint_align_set(panes_h, EVAS_HINT_FILL, EVAS_HINT_FILL);
84 evas_object_show(panes_h);
86 evas_object_smart_callback_add(panes_h, "clicked", _clicked, panes_h);
87 evas_object_smart_callback_add(panes_h, "clicked,double", _clicked_double, panes_h);
89 evas_object_smart_callback_add(panes_h, "press", _press, panes_h);
90 evas_object_smart_callback_add(panes_h, "unpress", _unpress, panes_h);
91 elm_panes_content_right_set(panes, panes_h);
95 bt = elm_button_add(win);
96 elm_object_text_set(bt, "Up");
97 evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
98 evas_object_size_hint_align_set(bt, EVAS_HINT_FILL, EVAS_HINT_FILL);
100 elm_panes_content_left_set(panes_h, bt);
104 bt = elm_button_add(win);
105 elm_object_text_set(bt, "Down");
106 evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
107 evas_object_size_hint_align_set(bt, EVAS_HINT_FILL, EVAS_HINT_FILL);
108 evas_object_show(bt);
109 elm_panes_content_right_set(panes_h, bt);
113 evas_object_resize(win, 320, 400);
114 evas_object_show(win);