summaryrefslogtreecommitdiff
path: root/legacy
diff options
context:
space:
mode:
authorChunEon Park <hermet@hermet.pe.kr>2011-10-30 15:50:14 +0000
committerChunEon Park <hermet@hermet.pe.kr>2011-10-30 15:50:14 +0000
commit1e3d557d2521c30f44de1c9ac70101dca7c6d79d (patch)
tree9f551da3375d05b415d38c4d2853d16abe37d4ff /legacy
parent0aadefe6b2f694d09b98407bdc5827336ee77541 (diff)
elementary/panes - content_part_set/get/unset
SVN revision: 64524
Diffstat (limited to 'legacy')
-rw-r--r--legacy/elementary/doc/widgets/widget_preview_panes.c4
-rw-r--r--legacy/elementary/src/bin/test_panes.c8
-rw-r--r--legacy/elementary/src/edje_externals/elm_panes.c12
-rw-r--r--legacy/elementary/src/examples/panes_example.c8
-rw-r--r--legacy/elementary/src/lib/Elementary.h.in26
-rw-r--r--legacy/elementary/src/lib/elm_panes.c162
6 files changed, 143 insertions, 77 deletions
diff --git a/legacy/elementary/doc/widgets/widget_preview_panes.c b/legacy/elementary/doc/widgets/widget_preview_panes.c
index b68d938dd6..081c43bc45 100644
--- a/legacy/elementary/doc/widgets/widget_preview_panes.c
+++ b/legacy/elementary/doc/widgets/widget_preview_panes.c
@@ -10,13 +10,13 @@ elm_object_text_set(bt, "Left");
10evas_object_size_hint_weight_set(bt, 1.0, 1.0); 10evas_object_size_hint_weight_set(bt, 1.0, 1.0);
11evas_object_size_hint_align_set(bt, -1.0, -1.0); 11evas_object_size_hint_align_set(bt, -1.0, -1.0);
12evas_object_show(bt); 12evas_object_show(bt);
13elm_panes_content_left_set(panes, bt); 13elm_object_content_part_set(panes, ELM_PANES_CONTENT_LEFT, bt);
14 14
15bt = elm_button_add(win); 15bt = elm_button_add(win);
16elm_object_text_set(bt, "Right"); 16elm_object_text_set(bt, "Right");
17evas_object_size_hint_weight_set(bt, 1.0, 1.0); 17evas_object_size_hint_weight_set(bt, 1.0, 1.0);
18evas_object_size_hint_align_set(bt, -1.0, -1.0); 18evas_object_size_hint_align_set(bt, -1.0, -1.0);
19evas_object_show(bt); 19evas_object_show(bt);
20elm_panes_content_right_set(panes, bt); 20elm_object_content_part_set(panes, ELM_PANES_CONTENT_RIGHT, bt);
21 21
22#include "widget_preview_tmpl_foot.c" 22#include "widget_preview_tmpl_foot.c"
diff --git a/legacy/elementary/src/bin/test_panes.c b/legacy/elementary/src/bin/test_panes.c
index 8160d4ad05..82174901db 100644
--- a/legacy/elementary/src/bin/test_panes.c
+++ b/legacy/elementary/src/bin/test_panes.c
@@ -73,7 +73,7 @@ test_panes(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info
73 evas_object_size_hint_weight_set(bt, 1.0, 1.0); 73 evas_object_size_hint_weight_set(bt, 1.0, 1.0);
74 evas_object_size_hint_align_set(bt, -1.0, -1.0); 74 evas_object_size_hint_align_set(bt, -1.0, -1.0);
75 evas_object_show(bt); 75 evas_object_show(bt);
76 elm_panes_content_left_set(panes, bt); 76 elm_object_content_part_set(panes, ELM_PANES_CONTENT_LEFT, bt);
77 // 77 //
78 78
79 // 79 //
@@ -88,7 +88,7 @@ test_panes(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info
88 88
89 evas_object_smart_callback_add(panes_h, "press", _press, 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); 90 evas_object_smart_callback_add(panes_h, "unpress", _unpress, panes_h);
91 elm_panes_content_right_set(panes, panes_h); 91 elm_object_content_part_set(panes, ELM_PANES_CONTENT_RIGHT, panes_h);
92 // 92 //
93 93
94 // 94 //
@@ -97,7 +97,7 @@ test_panes(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info
97 evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); 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); 98 evas_object_size_hint_align_set(bt, EVAS_HINT_FILL, EVAS_HINT_FILL);
99 evas_object_show(bt); 99 evas_object_show(bt);
100 elm_panes_content_left_set(panes_h, bt); 100 elm_object_content_part_set(panes_h, ELM_PANES_CONTENT_LEFT, bt);
101 // 101 //
102 102
103 // 103 //
@@ -106,7 +106,7 @@ test_panes(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info
106 evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); 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); 107 evas_object_size_hint_align_set(bt, EVAS_HINT_FILL, EVAS_HINT_FILL);
108 evas_object_show(bt); 108 evas_object_show(bt);
109 elm_panes_content_right_set(panes_h, bt); 109 elm_object_content_part_set(panes_h, ELM_PANES_CONTENT_RIGHT, bt);
110 // 110 //
111 111
112 112
diff --git a/legacy/elementary/src/edje_externals/elm_panes.c b/legacy/elementary/src/edje_externals/elm_panes.c
index 9ff569b2ac..1a7a8dfb18 100644
--- a/legacy/elementary/src/edje_externals/elm_panes.c
+++ b/legacy/elementary/src/edje_externals/elm_panes.c
@@ -27,10 +27,10 @@ static void external_panes_state_set(void *data __UNUSED__,
27 else return; 27 else return;
28 28
29 if (p->content_left) 29 if (p->content_left)
30 elm_panes_content_left_set(obj, p->content_left); 30 elm_object_content_part_set(obj, ELM_PANES_CONTENT_LEFT, p->content_left);
31 31
32 if (p->content_right) 32 if (p->content_right)
33 elm_panes_content_right_set(obj, p->content_right); 33 elm_object_content_part_set(obj, ELM_PANES_CONTENT_RIGHT, p->content_right);
34 34
35 if (p->is_left_size) 35 if (p->is_left_size)
36 elm_panes_content_left_size_set(obj, p->left_size); 36 elm_panes_content_left_size_set(obj, p->left_size);
@@ -51,7 +51,7 @@ static Eina_Bool external_panes_param_set(void *data __UNUSED__,
51 Evas_Object *content = external_common_param_edje_object_get(obj, param); 51 Evas_Object *content = external_common_param_edje_object_get(obj, param);
52 if ((strcmp(param->s, "")) && (!content)) 52 if ((strcmp(param->s, "")) && (!content))
53 return EINA_FALSE; 53 return EINA_FALSE;
54 elm_panes_content_left_set(obj, content); 54 elm_object_content_part_set(obj, ELM_PANES_CONTENT_LEFT, content);
55 return EINA_TRUE; 55 return EINA_TRUE;
56 } 56 }
57 else if ((!strcmp(param->name, "content right")) 57 else if ((!strcmp(param->name, "content right"))
@@ -60,7 +60,7 @@ static Eina_Bool external_panes_param_set(void *data __UNUSED__,
60 Evas_Object *content = external_common_param_edje_object_get(obj, param); 60 Evas_Object *content = external_common_param_edje_object_get(obj, param);
61 if ((strcmp(param->s, "")) && (!content)) 61 if ((strcmp(param->s, "")) && (!content))
62 return EINA_FALSE; 62 return EINA_FALSE;
63 elm_panes_content_right_set(obj, content); 63 elm_object_content_part_set(obj, ELM_PANES_CONTENT_RIGHT, content);
64 return EINA_TRUE; 64 return EINA_TRUE;
65 } 65 }
66 else if ((!strcmp(param->name, "horizontal")) 66 else if ((!strcmp(param->name, "horizontal"))
@@ -170,9 +170,9 @@ external_panes_content_get(void *data __UNUSED__, const Evas_Object *obj,
170 const char *content) 170 const char *content)
171{ 171{
172 if (!strcmp(content, "left")) 172 if (!strcmp(content, "left"))
173 return elm_panes_content_left_get(obj); 173 return elm_object_content_part_get(obj, ELM_PANES_CONTENT_LEFT);
174 else if (!strcmp(content, "right")) 174 else if (!strcmp(content, "right"))
175 return elm_panes_content_right_get(obj); 175 return elm_object_content_part_get(obj, ELM_PANES_CONTENT_RIGHT);
176 176
177 ERR("unknown content '%s'", content); 177 ERR("unknown content '%s'", content);
178 178
diff --git a/legacy/elementary/src/examples/panes_example.c b/legacy/elementary/src/examples/panes_example.c
index fe821db9e8..b55432e7e4 100644
--- a/legacy/elementary/src/examples/panes_example.c
+++ b/legacy/elementary/src/examples/panes_example.c
@@ -86,7 +86,7 @@ elm_main(int argc __UNUSED__, char **argv __UNUSED__)
86 evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); 86 evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
87 evas_object_size_hint_align_set(bt, EVAS_HINT_FILL, EVAS_HINT_FILL); 87 evas_object_size_hint_align_set(bt, EVAS_HINT_FILL, EVAS_HINT_FILL);
88 evas_object_show(bt); 88 evas_object_show(bt);
89 elm_panes_content_left_set(panes, bt); 89 elm_object_content_part_set(panes, ELM_PANES_CONTENT_LEFT, bt);
90 90
91 panes_h = elm_panes_add(win); 91 panes_h = elm_panes_add(win);
92 elm_panes_horizontal_set(panes_h, EINA_TRUE); 92 elm_panes_horizontal_set(panes_h, EINA_TRUE);
@@ -94,21 +94,21 @@ elm_main(int argc __UNUSED__, char **argv __UNUSED__)
94 EVAS_HINT_EXPAND); 94 EVAS_HINT_EXPAND);
95 evas_object_size_hint_align_set(panes_h, EVAS_HINT_FILL, EVAS_HINT_FILL); 95 evas_object_size_hint_align_set(panes_h, EVAS_HINT_FILL, EVAS_HINT_FILL);
96 evas_object_show(panes_h); 96 evas_object_show(panes_h);
97 elm_panes_content_right_set(panes, panes_h); 97 elm_object_content_part_set(panes, ELM_PANES_CONTENT_RIGHT, panes_h);
98 98
99 bt = elm_button_add(win); 99 bt = elm_button_add(win);
100 elm_object_text_set(bt, "Up"); 100 elm_object_text_set(bt, "Up");
101 evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); 101 evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
102 evas_object_size_hint_align_set(bt, EVAS_HINT_FILL, EVAS_HINT_FILL); 102 evas_object_size_hint_align_set(bt, EVAS_HINT_FILL, EVAS_HINT_FILL);
103 evas_object_show(bt); 103 evas_object_show(bt);
104 elm_panes_content_left_set(panes_h, bt); 104 elm_object_content_part_set(panes_h, ELM_PANES_CONTENT_LEFT, bt);
105 105
106 bt = elm_button_add(win); 106 bt = elm_button_add(win);
107 elm_object_text_set(bt, "Down"); 107 elm_object_text_set(bt, "Down");
108 evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); 108 evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
109 evas_object_size_hint_align_set(bt, EVAS_HINT_FILL, EVAS_HINT_FILL); 109 evas_object_size_hint_align_set(bt, EVAS_HINT_FILL, EVAS_HINT_FILL);
110 evas_object_show(bt); 110 evas_object_show(bt);
111 elm_panes_content_right_set(panes_h, bt); 111 elm_object_content_part_set(panes_h, ELM_PANES_CONTENT_RIGHT bt);
112 112
113 evas_object_smart_callback_add(panes, "clicked", _clicked, panes); 113 evas_object_smart_callback_add(panes, "clicked", _clicked, panes);
114 evas_object_smart_callback_add(panes, "clicked,double", _clicked_double, 114 evas_object_smart_callback_add(panes, "clicked,double", _clicked_double,
diff --git a/legacy/elementary/src/lib/Elementary.h.in b/legacy/elementary/src/lib/Elementary.h.in
index 8b2e3e8b88..da33280e5a 100644
--- a/legacy/elementary/src/lib/Elementary.h.in
+++ b/legacy/elementary/src/lib/Elementary.h.in
@@ -23681,7 +23681,7 @@ extern "C" {
23681 * @li ELM_PANEL_ORIENT_LEFT 23681 * @li ELM_PANEL_ORIENT_LEFT
23682 * @li ELM_PANEL_ORIENT_RIGHT 23682 * @li ELM_PANEL_ORIENT_RIGHT
23683 * 23683 *
23684 * To set/get/unset the contetn of the panel, you can use 23684 * To set/get/unset the content of the panel, you can use
23685 * elm_object_content_set/get/unset APIs. 23685 * elm_object_content_set/get/unset APIs.
23686 * Once the content object is set, a previously set one will be deleted. 23686 * Once the content object is set, a previously set one will be deleted.
23687 * If you want to keep that old content object, use the 23687 * If you want to keep that old content object, use the
@@ -23806,10 +23806,20 @@ extern "C" {
23806 * Available styles for it: 23806 * Available styles for it:
23807 * - @c "default" 23807 * - @c "default"
23808 * 23808 *
23809 * Default contents parts of the panes widget that you can use for are:
23810 * @li "elm.swallow.left" - A leftside content of the panes
23811 * @li "elm.swallow.right" - A rightside content of the panes
23812 *
23813 * If panes is displayed vertically, left content will be displayed at
23814 * top.
23815 *
23809 * Here is an example on its usage: 23816 * Here is an example on its usage:
23810 * @li @ref panes_example 23817 * @li @ref panes_example
23811 */ 23818 */
23812 23819
23820#define ELM_PANES_CONTENT_LEFT "elm.swallow.left"
23821#define ELM_PANES_CONTENT_RIGHT "elm.swallow.right"
23822
23813 /** 23823 /**
23814 * @addtogroup Panes 23824 * @addtogroup Panes
23815 * @{ 23825 * @{
@@ -23846,7 +23856,7 @@ extern "C" {
23846 * 23856 *
23847 * @ingroup Panes 23857 * @ingroup Panes
23848 */ 23858 */
23849 EAPI void elm_panes_content_left_set(Evas_Object *obj, Evas_Object *content) EINA_ARG_NONNULL(1); 23859 EINA_DEPRECATED EAPI void elm_panes_content_left_set(Evas_Object *obj, Evas_Object *content) EINA_ARG_NONNULL(1);
23850 23860
23851 /** 23861 /**
23852 * Set the right content of the panes widget. 23862 * Set the right content of the panes widget.
@@ -23866,7 +23876,7 @@ extern "C" {
23866 * 23876 *
23867 * @ingroup Panes 23877 * @ingroup Panes
23868 */ 23878 */
23869 EAPI void elm_panes_content_right_set(Evas_Object *obj, Evas_Object *content) EINA_ARG_NONNULL(1); 23879 EINA_DEPRECATED EAPI void elm_panes_content_right_set(Evas_Object *obj, Evas_Object *content) EINA_ARG_NONNULL(1);
23870 23880
23871 /** 23881 /**
23872 * Get the left content of the panes. 23882 * Get the left content of the panes.
@@ -23880,7 +23890,7 @@ extern "C" {
23880 * 23890 *
23881 * @ingroup Panes 23891 * @ingroup Panes
23882 */ 23892 */
23883 EAPI Evas_Object *elm_panes_content_left_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); 23893 EINA_DEPRECATED EAPI Evas_Object *elm_panes_content_left_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
23884 23894
23885 /** 23895 /**
23886 * Get the right content of the panes. 23896 * Get the right content of the panes.
@@ -23894,7 +23904,7 @@ extern "C" {
23894 * 23904 *
23895 * @ingroup Panes 23905 * @ingroup Panes
23896 */ 23906 */
23897 EAPI Evas_Object *elm_panes_content_right_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); 23907 EINA_DEPRECATED EAPI Evas_Object *elm_panes_content_right_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
23898 23908
23899 /** 23909 /**
23900 * Unset the left content used for the panes. 23910 * Unset the left content used for the panes.
@@ -23909,7 +23919,7 @@ extern "C" {
23909 * 23919 *
23910 * @ingroup Panes 23920 * @ingroup Panes
23911 */ 23921 */
23912 EAPI Evas_Object *elm_panes_content_left_unset(Evas_Object *obj) EINA_ARG_NONNULL(1); 23922 EINA_DEPRECATED EAPI Evas_Object *elm_panes_content_left_unset(Evas_Object *obj) EINA_ARG_NONNULL(1);
23913 23923
23914 /** 23924 /**
23915 * Unset the right content used for the panes. 23925 * Unset the right content used for the panes.
@@ -24361,7 +24371,6 @@ extern "C" {
24361 * - @c "default" 24371 * - @c "default"
24362 * 24372 *
24363 * Default contents parts of the conformant widget that you can use for are: 24373 * Default contents parts of the conformant widget that you can use for are:
24364 *
24365 * @li "elm.swallow.content" - A content of the conformant 24374 * @li "elm.swallow.content" - A content of the conformant
24366 * 24375 *
24367 * See how to use this widget in this example: 24376 * See how to use this widget in this example:
@@ -28192,6 +28201,9 @@ extern "C" {
28192 * @ref tutorial_naviframe gives a good overview of the usage of the API. 28201 * @ref tutorial_naviframe gives a good overview of the usage of the API.
28193 */ 28202 */
28194 28203
28204#define ELM_NAVIFRAME_ITEM_PREV_BTN "elm.swallow.prev_btn"
28205#define ELM_NAVIFRAME_ITEM_NEXT_BTN "elm.swallow.next_btn"
28206
28195 /** 28207 /**
28196 * @addtogroup Naviframe 28208 * @addtogroup Naviframe
28197 * @{ 28209 * @{
diff --git a/legacy/elementary/src/lib/elm_panes.c b/legacy/elementary/src/lib/elm_panes.c
index f80fe8518f..d2fd836006 100644
--- a/legacy/elementary/src/lib/elm_panes.c
+++ b/legacy/elementary/src/lib/elm_panes.c
@@ -212,6 +212,105 @@ _unpress(void *data, Evas_Object *obj __UNUSED__ , const char *emission __UNUSED
212 } 212 }
213} 213}
214 214
215static void
216_content_left_set(Evas_Object *obj, Evas_Object *content)
217{
218 Widget_Data *wd = elm_widget_data_get(obj);
219 if (wd->contents.left)
220 {
221 evas_object_del(wd->contents.left);
222 wd->contents.left = NULL;
223 }
224 if (content)
225 {
226 wd->contents.left = content;
227 elm_widget_sub_object_add(obj, content);
228 edje_object_part_swallow(wd->panes, "elm.swallow.left", content);
229 }
230}
231
232static void
233_content_right_set(Evas_Object *obj, Evas_Object *content)
234{
235 Widget_Data *wd = elm_widget_data_get(obj);
236 if (wd->contents.right)
237 {
238 evas_object_del(wd->contents.right);
239 wd->contents.right = NULL;
240 }
241 if (content)
242 {
243 wd->contents.right = content;
244 elm_widget_sub_object_add(obj, content);
245 edje_object_part_swallow(wd->panes, "elm.swallow.right", content);
246 }
247}
248
249static Evas_Object *
250_content_left_unset(Evas_Object *obj)
251{
252 Widget_Data *wd = elm_widget_data_get(obj);
253 if (!wd->contents.left) return NULL;
254 Evas_Object *content = wd->contents.left;
255 elm_widget_sub_object_del(obj, content);
256 edje_object_part_unswallow(wd->panes, content);
257 wd->contents.left = NULL;
258 return content;
259}
260
261static Evas_Object *
262_content_right_unset(Evas_Object *obj)
263{
264 Widget_Data *wd = elm_widget_data_get(obj);
265 if (!wd->contents.right) return NULL;
266 Evas_Object *content = wd->contents.right;
267 elm_widget_sub_object_del(obj, content);
268 edje_object_part_unswallow(wd->panes, content);
269 wd->contents.right = NULL;
270 return content;
271}
272
273static void
274_content_set_hook(Evas_Object *obj, const char *part, Evas_Object *content)
275{
276 ELM_CHECK_WIDTYPE(obj, widtype);
277 Widget_Data *wd = elm_widget_data_get(obj);
278 if (!wd) return;
279
280 if ((!part) || (!strcmp(part, "elm.swallow.right")))
281 _content_right_set(obj, content);
282 else if(!strcmp(part, "elm.swallow.left"))
283 _content_left_set(obj, content);
284}
285
286static Evas_Object *
287_content_get_hook(const Evas_Object *obj, const char *part)
288{
289 ELM_CHECK_WIDTYPE(obj, widtype) NULL;
290 Widget_Data *wd = elm_widget_data_get(obj);
291 if (!wd) return NULL;
292 if ((!part) || (!strcmp(part, "elm.swallow.right")))
293 return wd->contents.left;
294 else if (!strcmp(part, "elm.swallow.left"))
295 return wd->contents.right;
296 return NULL;
297}
298
299static Evas_Object *
300_content_unset_hook(Evas_Object *obj, const char *part)
301{
302 ELM_CHECK_WIDTYPE(obj, widtype) NULL;
303 Widget_Data *wd = elm_widget_data_get(obj);
304 if (!wd) return NULL;
305
306 if ((!part) || (!strcmp(part, "elm.swallow.right")))
307 _content_right_unset(obj);
308 else if (!strcmp(part, "elm.swallow.left"))
309 _content_left_unset(obj);
310
311 return NULL;
312}
313
215EAPI Evas_Object * 314EAPI Evas_Object *
216elm_panes_add(Evas_Object *parent) 315elm_panes_add(Evas_Object *parent)
217{ 316{
@@ -228,6 +327,9 @@ elm_panes_add(Evas_Object *parent)
228 elm_widget_del_hook_set(obj, _del_hook); 327 elm_widget_del_hook_set(obj, _del_hook);
229 elm_widget_theme_hook_set(obj, _theme_hook); 328 elm_widget_theme_hook_set(obj, _theme_hook);
230 elm_widget_focus_next_hook_set(obj, _elm_panes_focus_next_hook); 329 elm_widget_focus_next_hook_set(obj, _elm_panes_focus_next_hook);
330 elm_widget_content_set_hook_set(obj, _content_set_hook);
331 elm_widget_content_get_hook_set(obj, _content_get_hook);
332 elm_widget_content_unset_hook_set(obj, _content_unset_hook);
231 elm_widget_can_focus_set(obj, EINA_FALSE); 333 elm_widget_can_focus_set(obj, EINA_FALSE);
232 334
233 wd->panes = edje_object_add(e); 335 wd->panes = edje_object_add(e);
@@ -257,88 +359,40 @@ elm_panes_add(Evas_Object *parent)
257 return obj; 359 return obj;
258} 360}
259 361
260
261EAPI void 362EAPI void
262elm_panes_content_left_set(Evas_Object *obj, Evas_Object *content) 363elm_panes_content_left_set(Evas_Object *obj, Evas_Object *content)
263{ 364{
264 ELM_CHECK_WIDTYPE(obj, widtype); 365 _content_set_hook(obj, "elm.swallow.left", content);
265 Widget_Data *wd = elm_widget_data_get(obj);
266 if (!wd) return;
267 if (wd->contents.left)
268 {
269 evas_object_del(wd->contents.left);
270 wd->contents.left = NULL;
271 }
272 if (content)
273 {
274 wd->contents.left = content;
275 elm_widget_sub_object_add(obj, content);
276 edje_object_part_swallow(wd->panes, "elm.swallow.left", content);
277 }
278} 366}
279 367
280EAPI void 368EAPI void
281elm_panes_content_right_set(Evas_Object *obj, Evas_Object *content) 369elm_panes_content_right_set(Evas_Object *obj, Evas_Object *content)
282{ 370{
283 ELM_CHECK_WIDTYPE(obj, widtype); 371 _content_set_hook(obj, NULL, content);
284 Widget_Data *wd = elm_widget_data_get(obj);
285 if (!wd) return;
286 if (wd->contents.right)
287 {
288 evas_object_del(wd->contents.right);
289 wd->contents.right = NULL;
290 }
291 if (content)
292 {
293 wd->contents.right = content;
294 elm_widget_sub_object_add(obj, content);
295 edje_object_part_swallow(wd->panes, "elm.swallow.right", content);
296 }
297} 372}
298 373
299EAPI Evas_Object * 374EAPI Evas_Object *
300elm_panes_content_left_get(const Evas_Object *obj) 375elm_panes_content_left_get(const Evas_Object *obj)
301{ 376{
302 ELM_CHECK_WIDTYPE(obj, widtype) NULL; 377 return _content_get_hook(obj, "elm.swallow.left");
303 Widget_Data *wd = elm_widget_data_get(obj);
304 if (!wd) return NULL;
305 return wd->contents.left;
306} 378}
307 379
308EAPI Evas_Object * 380EAPI Evas_Object *
309elm_panes_content_right_get(const Evas_Object *obj) 381elm_panes_content_right_get(const Evas_Object *obj)
310{ 382{
311 ELM_CHECK_WIDTYPE(obj, widtype) NULL; 383 return _content_get_hook(obj, NULL);
312 Widget_Data *wd = elm_widget_data_get(obj);
313 return wd->contents.right;
314} 384}
315 385
316EAPI Evas_Object * 386EAPI Evas_Object *
317elm_panes_content_left_unset(Evas_Object *obj) 387elm_panes_content_left_unset(Evas_Object *obj)
318{ 388{
319 ELM_CHECK_WIDTYPE(obj, widtype) NULL; 389 return _content_unset_hook(obj, "elm.swallow.left");
320 Widget_Data *wd = elm_widget_data_get(obj);
321 if (!wd) return NULL;
322 if (!wd->contents.left) return NULL;
323 Evas_Object *content = wd->contents.left;
324 elm_widget_sub_object_del(obj, content);
325 edje_object_part_unswallow(wd->panes, content);
326 wd->contents.left = NULL;
327 return content;
328} 390}
329 391
330EAPI Evas_Object * 392EAPI Evas_Object *
331elm_panes_content_right_unset(Evas_Object *obj) 393elm_panes_content_right_unset(Evas_Object *obj)
332{ 394{
333 ELM_CHECK_WIDTYPE(obj, widtype) NULL; 395 return _content_unset_hook(obj, "elm.swallow.right");
334 Widget_Data *wd = elm_widget_data_get(obj);
335 if (!wd) return NULL;
336 if (!wd->contents.right) return NULL;
337 Evas_Object *content = wd->contents.right;
338 elm_widget_sub_object_del(obj, content);
339 edje_object_part_unswallow(wd->panes, content);
340 wd->contents.right = NULL;
341 return content;
342} 396}
343 397
344EAPI double 398EAPI double