edje_object_part_swallow(wd->panes, "elm.swallow.left", wd->contents.left);
if (wd->contents.right)
edje_object_part_swallow(wd->panes, "elm.swallow.right", wd->contents.right);
+ if (wd->contents.left && wd->contents.right)
+ edje_object_signal_emit(wd->panes, "elm.panes.pair", "elm");
if (wd->fixed)
edje_object_signal_emit(wd->panes, "elm.panes.fixed", "elm");
{
evas_object_event_callback_del_full(sub, EVAS_CALLBACK_CHANGED_SIZE_HINTS,
_changed_size_hints, obj);
+ edje_object_part_unswallow(wd->panes, sub);
wd->contents.left = NULL;
_sizing_eval(obj);
}
{
evas_object_event_callback_del_full(sub, EVAS_CALLBACK_CHANGED_SIZE_HINTS,
_changed_size_hints, obj);
+ edje_object_part_unswallow(wd->panes, sub);
wd->contents.right= NULL;
_sizing_eval(obj);
}
}
-
static void
_clicked(void *data, Evas_Object *obj __UNUSED__ , const char *emission __UNUSED__, const char *source __UNUSED__)
{
_content_left_set(Evas_Object *obj, Evas_Object *content)
{
Widget_Data *wd = elm_widget_data_get(obj);
+ if (wd->contents.left == content) return;
if (wd->contents.left)
{
evas_object_del(wd->contents.left);
- wd->contents.left = NULL;
+ edje_object_signal_emit(wd->panes, "elm.panes.unpair", "elm");
}
+ wd->contents.left = content;
if (content)
{
- wd->contents.left = content;
elm_widget_sub_object_add(obj, content);
edje_object_part_swallow(wd->panes, "elm.swallow.left", content);
+ if (wd->contents.right)
+ edje_object_signal_emit(wd->panes, "elm.panes.pair", "elm");
}
}
_content_right_set(Evas_Object *obj, Evas_Object *content)
{
Widget_Data *wd = elm_widget_data_get(obj);
+ if (wd->contents.right == content) return;
if (wd->contents.right)
{
evas_object_del(wd->contents.right);
- wd->contents.right = NULL;
+ edje_object_signal_emit(wd->panes, "elm.panes.unpair", "elm");
}
+ wd->contents.right = content;
if (content)
{
- wd->contents.right = content;
elm_widget_sub_object_add(obj, content);
edje_object_part_swallow(wd->panes, "elm.swallow.right", content);
+ if (wd->contents.left)
+ edje_object_signal_emit(wd->panes, "elm.panes.pair", "elm");
}
}
if (!wd->contents.left) return NULL;
Evas_Object *content = wd->contents.left;
elm_widget_sub_object_del(obj, content);
- edje_object_part_unswallow(wd->panes, content);
- wd->contents.left = NULL;
+ edje_object_signal_emit(wd->panes, "elm.panes.unpair", "elm");
return content;
}
if (!wd->contents.right) return NULL;
Evas_Object *content = wd->contents.right;
elm_widget_sub_object_del(obj, content);
- edje_object_part_unswallow(wd->panes, content);
- wd->contents.right = NULL;
+ edje_object_signal_emit(wd->panes, "elm.panes.unpair", "elm");
return content;
}
if (part && (!strncmp(part, "elm.swallow.", 12))) part += 12;
if (!part || !strcmp(part, "left"))
_content_left_set(obj, content);
- else if(!strcmp(part, "right"))
+ else if (!strcmp(part, "right"))
_content_right_set(obj, content);
}
edje_object_part_drag_value_set(wd->panes, "elm.bar", size, 0.0);
}
+EAPI double
+elm_panes_content_right_size_get(const Evas_Object *obj)
+{
+ return (1.0 - elm_panes_content_left_size_get(obj));
+}
+
+EAPI void
+elm_panes_content_right_size_set(Evas_Object *obj, double size)
+{
+ elm_panes_content_left_size_set(obj, (1.0 - size));
+}
+
EAPI void
elm_panes_horizontal_set(Evas_Object *obj, Eina_Bool horizontal)
{