From: Enlightenment S. <no-...@en...> - 2010-06-20 16:01:24
|
Log: Add a new widget : elm_panes :) Author: watchwolf Date: 2010-06-20 09:01:15 -0700 (Sun, 20 Jun 2010) New Revision: 49773 Added: trunk/TMP/st/elementary/src/bin/test_panes.c trunk/TMP/st/elementary/src/lib/elm_panes.c Modified: trunk/TMP/st/elementary/data/themes/default.edc trunk/TMP/st/elementary/src/bin/Makefile.am trunk/TMP/st/elementary/src/bin/test.c trunk/TMP/st/elementary/src/lib/Elementary.h.in trunk/TMP/st/elementary/src/lib/Makefile.am Modified: trunk/TMP/st/elementary/data/themes/default.edc =================================================================== --- trunk/TMP/st/elementary/data/themes/default.edc 2010-06-20 15:34:42 UTC (rev 49772) +++ trunk/TMP/st/elementary/data/themes/default.edc 2010-06-20 16:01:15 UTC (rev 49773) @@ -23093,8 +23093,224 @@ } } +///////////////////////////////////////////////////////////////////////////// +// PANES +///////////////////////////////////////////////////////////////////////////// + group { + name: "elm/panes/vertical/default"; + images { + image: "bt_base1.png" COMP; + image: "bt_base2.png" COMP; + image: "bt_hilight.png" COMP; + image: "bt_shine.png" COMP; + image: "bt_glow.png" COMP; + image: "bt_dis_base.png" COMP; + image: "bt_dis_hilight.png" COMP; + } + parts + { + part + { + name: "whole"; + type: RECT; + mouse_events: 0; + description + { + state: "default" 0.0; + visible: 0; + } + } + + //2 contents + part + { + name: "whole_left"; + type: RECT; + mouse_events: 0; + description + { + state: "default" 0.0; + rel2.to_x: "bar"; + rel2.relative: 0.0 1.0; + visible: 1; + } + } + part + { + name: "elm.swallow.left"; + type: SWALLOW; + clip_to: "whole_left"; + description + { + state: "default" 0.0; + rel1.to: "whole_left"; + rel2.to: "whole_left"; + } + } + part + { + name: "whole_right"; + type: RECT; + mouse_events: 0; + description + { + state: "default" 0.0; + rel1.to_x: "bar"; + rel1.relative: 1.0 0.0; + visible: 1; + } + } + part + { + name: "elm.swallow.right"; + type: SWALLOW; + clip_to: "whole_right"; + description + { + state: "default" 0.0; + rel1.to: "whole_right"; + rel2.to: "whole_right"; + } + } + //BAR + part { name: "bar"; + mouse_events: 1; + dragable { + confine: "whole"; + x: 1 1 1; + y: 0 0 0; + } + description { state: "default" 0.0; + max: 15 999; + min: 15 999; + image { + normal: "bt_base2.png"; + border: 7 7 7 7; + } + image.middle: SOLID; + } + description { state: "clicked" 0.0; + inherit: "default" 0.0; + image.normal: "bt_base1.png"; + image.middle: SOLID; + } + description { state: "disabled" 0.0; + inherit: "default" 0.0; + image { + normal: "bt_dis_base.png"; + border: 4 4 4 4; + } + } + } + part { name: "over1"; + mouse_events: 0; + description { state: "default" 0.0; + rel1.to: "bar"; + rel2.to: "bar"; + rel2.relative: 1.0 0.5; + image { + normal: "bt_hilight.png"; + border: 7 7 7 0; + } + } + description { state: "disabled" 0.0; + inherit: "default" 0.0; + image { + normal: "bt_dis_hilight.png"; + border: 4 4 4 0; + } + } + } + part { name: "over2"; + mouse_events: 1; + repeat_events: 1; + ignore_flags: ON_HOLD; + description { state: "default" 0.0; + rel1.to: "bar"; + rel2.to: "bar"; + image { + normal: "bt_shine.png"; + border: 7 7 7 7; + } + } + description { state: "disabled" 0.0; + inherit: "default" 0.0; + visible: 0; + } + } + part { name: "over3"; + mouse_events: 1; + repeat_events: 1; + description { state: "default" 0.0; + color: 255 255 255 0; + rel1.to: "bar"; + rel2.to: "bar"; + image { + normal: "bt_glow.png"; + border: 12 12 12 12; + } + fill.smooth : 0; + } + description { state: "clicked" 0.0; + inherit: "default" 0.0; + visible: 1; + color: 255 255 255 255; + } + } + } + programs { + program { + name: "button_click"; + signal: "mouse,down,1"; + source: "over2"; + action: SIGNAL_EMIT "elm,action,press" ""; + after: "button_click_anim"; + } + program { + name: "button_click_anim"; + action: STATE_SET "clicked" 0.0; + target: "bar"; + } + program { + name: "button_unclick"; + signal: "mouse,up,1"; + source: "over2"; + action: SIGNAL_EMIT "elm,action,unpress" ""; + after: "button_unclick_anim"; + } + program { + name: "button_unclick_anim"; + action: STATE_SET "default" 0.0; + target: "bar"; + } + program { + name: "button_click2"; + signal: "mouse,down,1"; + source: "over3"; + action: STATE_SET "clicked" 0.0; + target: "over3"; + } + program { + name: "button_unclick2"; + signal: "mouse,up,1"; + source: "over3"; + action: STATE_SET "default" 0.0; + transition: DECELERATE 0.5; + target: "over3"; + } + program { + name: "button_unclick3"; + signal: "mouse,up,1"; + source: "over2"; + action: SIGNAL_EMIT "elm,action,click" ""; + } + } + } + + + ///////////////////////////////////////////////////////////////////////////// // PANEL ///////////////////////////////////////////////////////////////////////////// Modified: trunk/TMP/st/elementary/src/bin/Makefile.am =================================================================== --- trunk/TMP/st/elementary/src/bin/Makefile.am 2010-06-20 15:34:42 UTC (rev 49772) +++ trunk/TMP/st/elementary/src/bin/Makefile.am 2010-06-20 16:01:15 UTC (rev 49773) @@ -70,6 +70,7 @@ test_slideshow.c \ test_menu.c \ test_panel.c \ +test_panes.c \ test_map.c \ test_weather.c \ test_flip.c \ Modified: trunk/TMP/st/elementary/src/bin/test.c =================================================================== --- trunk/TMP/st/elementary/src/bin/test.c 2010-06-20 15:34:42 UTC (rev 49772) +++ trunk/TMP/st/elementary/src/bin/test.c 2010-06-20 16:01:15 UTC (rev 49773) @@ -63,6 +63,8 @@ void test_slideshow(void *data, Evas_Object *obj, void *event_info); void test_menu(void *data, Evas_Object *obj, void *event_info); void test_panel(void *data, Evas_Object *obj, void *event_info); +void test_panes(void *data, Evas_Object *obj, void *event_info); + void test_map(void *data, Evas_Object *obj, void *event_info); void test_weather(void *data, Evas_Object *obj, void *event_info); void test_flip(void *data, Evas_Object *obj, void *event_info); @@ -258,6 +260,7 @@ ADD_TEST("Slideshow", test_slideshow); ADD_TEST("Menu", test_menu); ADD_TEST("Panel", test_panel); + ADD_TEST("Panes", test_panes); ADD_TEST("Map", test_map); ADD_TEST("Weather", test_weather); ADD_TEST("Flip", test_flip); Modified: trunk/TMP/st/elementary/src/lib/Elementary.h.in =================================================================== --- trunk/TMP/st/elementary/src/lib/Elementary.h.in 2010-06-20 15:34:42 UTC (rev 49772) +++ trunk/TMP/st/elementary/src/lib/Elementary.h.in 2010-06-20 16:01:15 UTC (rev 49773) @@ -1467,6 +1467,19 @@ EAPI Eina_Bool elm_panel_hidden_get(Evas_Object *obj); EAPI void elm_panel_toggle(Evas_Object *obj); + + /** + * TODO + * + * 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); + typedef enum _Elm_Flip_Mode { ELM_FLIP_ROTATE_Y_CENTER_AXIS, Modified: trunk/TMP/st/elementary/src/lib/Makefile.am =================================================================== --- trunk/TMP/st/elementary/src/lib/Makefile.am 2010-06-20 15:34:42 UTC (rev 49772) +++ trunk/TMP/st/elementary/src/lib/Makefile.am 2010-06-20 16:01:15 UTC (rev 49773) @@ -69,6 +69,7 @@ elm_slideshow.c \ elm_menu.c \ elm_panel.c \ +elm_panes.c \ elm_map.c \ elm_flip.c \ elm_conform.c \ |