busy-8.png \
busy-9.png \
arrow_right.png \
+arrow_left.png \
bt_spinner_up.png \
bt_spinner_down.png \
bt_spinner_hilight.png \
image: "bt_glow.png" COMP;
image: "bt_dis_base.png" COMP;
image: "bt_dis_hilight.png" COMP;
+ image: "arrow_right.png" COMP;
+ image: "arrow_left.png" COMP;
}
parts
{
visible: 0;
}
}
-
+
//2 contents
part
{
description
{
state: "default" 0.0;
- rel2.to_x: "bar";
+ rel2.to_x: "elm.bar";
rel2.relative: 0.0 1.0;
visible: 1;
}
description
{
state: "default" 0.0;
- rel1.to_x: "bar";
+ rel1.to_x: "elm.bar";
rel1.relative: 1.0 0.0;
visible: 1;
}
}
}
//BAR
- part { name: "bar";
+ part { name: "elm.bar";
mouse_events: 1;
dragable {
confine: "whole";
y: 0 0 0;
}
description { state: "default" 0.0;
- max: 15 999;
- min: 15 999;
+ max: 15 9999;
+ min: 15 100;
image {
normal: "bt_base2.png";
border: 7 7 7 7;
part { name: "over1";
mouse_events: 0;
description { state: "default" 0.0;
- rel1.to: "bar";
- rel2.to: "bar";
+ rel1.to: "elm.bar";
+ rel2.to: "elm.bar";
rel2.relative: 1.0 0.5;
image {
normal: "bt_hilight.png";
repeat_events: 1;
ignore_flags: ON_HOLD;
description { state: "default" 0.0;
- rel1.to: "bar";
- rel2.to: "bar";
+ rel1.to: "elm.bar";
+ rel2.to: "elm.bar";
image {
normal: "bt_shine.png";
border: 7 7 7 7;
repeat_events: 1;
description { state: "default" 0.0;
color: 255 255 255 0;
- rel1.to: "bar";
- rel2.to: "bar";
+ rel1.to: "elm.bar";
+ rel2.to: "elm.bar";
image {
normal: "bt_glow.png";
border: 12 12 12 12;
}
}
+ //Arrow
+ part {
+ name: "arrow_right";
+ description { state: "default" 0.0;
+ min: 45 45;
+ max: 45 45;
+ color: 255 255 255 0;
+
+ rel1.relative: 1.0 0.5;
+ rel1.to_x: "elm.bar";
+ rel1.offset: 45/2 -45/2;
+
+ rel2.relative: 1.0 0.5;
+ rel2.to_x: "elm.bar";
+ rel2.offset: 45/2 45/2;
+
+ image.normal: "arrow_right.png";
+ }
+ description { state: "anim_1" 0.0;
+ inherit: "default" 0.0;
+ color: 255 255 255 200;
+ rel1.offset: (45/2 + 10) -45/2;
+ rel2.offset: (45/2 +10) 45/2;
+ }
+ description { state: "anim_2" 0.0;
+ inherit: "default" 0.0;
+ color: 255 255 255 0;
+ rel1.offset: (45/2 + 20) -45/2;
+ rel2.offset: (45/2 + 20) 45/2;
+ }
+ }
+ part {
+ name: "arrow_left";
+ description { state: "default" 0.0;
+ min: 45 45;
+ max: 45 45;
+ color: 255 255 255 0;
+
+ rel1.relative: 0.0 0.5;
+ rel1.to_x: "elm.bar";
+ rel1.offset: -45/2 -45/2;
+
+ rel2.relative: 0.0 0.5;
+ rel2.to_x: "elm.bar";
+ rel2.offset: -45/2 45/2;
+
+ image.normal: "arrow_left.png";
+ }
+ description { state: "anim_1" 0.0;
+ inherit: "default" 0.0;
+ color: 255 255 255 200;
+ rel1.offset: (-45/2 - 10) -45/2;
+ rel2.offset: (-45/2 - 10) 45/2;
+ }
+ description { state: "anim_2" 0.0;
+ inherit: "default" 0.0;
+ color: 255 255 255 0;
+ rel1.offset: (-45/2 - 20) -45/2;
+ rel2.offset: (-45/2 - 20) 45/2;
+ }
+ }
+
}
programs {
program {
source: "over2";
action: SIGNAL_EMIT "elm,action,press" "";
after: "button_click_anim";
+ after: "arrow_anim_start";
}
program {
name: "button_click_anim";
action: STATE_SET "clicked" 0.0;
- target: "bar";
+ target: "elm.bar";
}
program {
name: "button_unclick";
source: "over2";
action: SIGNAL_EMIT "elm,action,unpress" "";
after: "button_unclick_anim";
+ after: "arrow_anim_stop";
}
program {
name: "button_unclick_anim";
action: STATE_SET "default" 0.0;
- target: "bar";
+ target: "elm.bar";
}
program {
name: "button_click2";
source: "over2";
action: SIGNAL_EMIT "elm,action,click" "";
}
+ program {
+ name: "button_down_double";
+ signal: "mouse,down,1,double";
+ source: "over3";
+ action: SIGNAL_EMIT "elm,action,click,double" "";
+ }
+
+ //arrows animation
+ program {
+ name: "arrow_anim_start";
+ action: STATE_SET "anim_1" 0.0;
+ target: "arrow_right";
+ target: "arrow_left";
+ transition: LINEAR 0.6;
+ after: "arrow_anim_1";
+ }
+ program {
+ name: "arrow_anim_1";
+ action: STATE_SET "anim_2" 0.0;
+ target: "arrow_right";
+ target: "arrow_left";
+ transition: LINEAR 0.6;
+ after: "arrow_anim_2";
+ }
+ program {
+ name: "arrow_anim_2";
+ action: STATE_SET "default" 0.0;
+ target: "arrow_right";
+ target: "arrow_left";
+ after: "arrow_anim_start";
+ }
+ program {
+ name: "arrow_anim_stop";
+ action: ACTION_STOP;
+ target: "arrow_anim_start";
+ target: "arrow_anim_1";
+ target: "arrow_anim_2";
+ after: "arrow_anim_stop_1";
+ }
+ program {
+ name: "arrow_anim_stop_1";
+ action: STATE_SET "default" 0.0;
+ target: "arrow_right";
+ target: "arrow_left";
+ transition: DECELERATE 0.4;
+ }
}
}
#include <Elementary.h>
#ifndef ELM_LIB_QUICKLAUNCH
-static Elm_Genlist_Item_Class itc;
+static double size = 0.0;
static void
_press(void *data, Evas_Object *obj, void *event_info)
static void
_unpress(void *data, Evas_Object *obj, void *event_info)
{
- printf("unpress\n");
+ printf("unpress, size : %f\n", elm_panes_left_content_size_get(obj));
}
static void
printf("clicked\n");
}
+
+static void
+_clicked_double(void *data, Evas_Object *obj, void *event_info)
+{
+ printf("clicked double\n");
+ if(elm_panes_left_content_size_get(obj) > 0)
+ {
+ size = elm_panes_left_content_size_get(obj);
+ elm_panes_left_content_size_set(obj, 0.0);
+ }
+ else
+ elm_panes_left_content_size_set(obj, size);
+}
+
+
void
test_panes(void *data, Evas_Object *obj, void *event_info)
{
evas_object_show(panes);
evas_object_smart_callback_add(panes, "clicked", _clicked, panes);
+ evas_object_smart_callback_add(panes, "clicked,double", _clicked_double, panes);
+
evas_object_smart_callback_add(panes, "press", _press, panes);
evas_object_smart_callback_add(panes, "unpress", _unpress, panes);
* Update the minimun height of the bar in the theme. No minimun should be set in the vertical theme
* Add horyzontal theme
* Add events (move, start ...)
- * Add getter of the size of each content (30% - 70% ...)
*/
EAPI Evas_Object *elm_panes_add(Evas_Object *parent);
EAPI void elm_panes_content_left_set(Evas_Object *obj, Evas_Object *content);
EAPI void elm_panes_content_right_set(Evas_Object *obj, Evas_Object *content);
+ EAPI double elm_panes_left_content_size_get(Evas_Object *obj);
+ EAPI void elm_panes_left_content_size_set(Evas_Object *obj, double size);
typedef enum _Elm_Flip_Mode
{
Evas_Object *left;
Evas_Object *right;
} contents;
+
+ struct
+ {
+ int x_diff;
+ int y_diff;
+ Eina_Bool move;
+ } move;
+
+ Eina_Bool clicked_double;
};
static const char *widtype = NULL;
evas_object_smart_callback_call(data, "clicked", NULL);
}
+static void
+_clicked_double(void *data, Evas_Object *obj __UNUSED__ , const char *emission __UNUSED__, const char *source __UNUSED__)
+{
+ Widget_Data *wd = elm_widget_data_get(data);
+
+ wd->clicked_double = EINA_TRUE;
+}
+
static void
_press(void *data, Evas_Object *obj __UNUSED__ , const char *emission __UNUSED__, const char *source __UNUSED__)
{
static void
_unpress(void *data, Evas_Object *obj __UNUSED__ , const char *emission __UNUSED__, const char *source __UNUSED__)
{
+ Widget_Data *wd = elm_widget_data_get(data);
evas_object_smart_callback_call(data, "unpress", NULL);
+
+ if(wd->clicked_double)
+ {
+ evas_object_smart_callback_call(data, "clicked,double", NULL);
+ wd->clicked_double = EINA_FALSE;
+ }
}
/**
elm_widget_resize_object_set(obj, wd->panes);
evas_object_show(wd->panes);
+ elm_panes_left_content_size_set(obj, 0.5);
+
edje_object_signal_callback_add(wd->panes, "elm,action,click", "", _clicked, obj);
+ edje_object_signal_callback_add(wd->panes, "elm,action,click,double", "", _clicked_double, obj);
edje_object_signal_callback_add(wd->panes, "elm,action,press", "", _press, obj);
edje_object_signal_callback_add(wd->panes, "elm,action,unpress", "", _unpress, obj);
}
}
+EAPI double elm_panes_left_content_size_get(Evas_Object *obj)
+{
+ Widget_Data *wd = elm_widget_data_get(obj);
+ double w, h;
+
+ edje_object_part_drag_value_get(wd->panes, "elm.bar", &w, &h);
+
+ return w;
+}
+
+EAPI void elm_panes_left_content_size_set(Evas_Object *obj, double size)
+{
+ Widget_Data *wd = elm_widget_data_get(obj);
+
+ edje_object_part_drag_value_set(wd->panes, "elm.bar", size, 0.0);
+}
+
+