elm progrees bar: new style: wheel. simple style, no text, no progression, only pulse is available

SVN revision: 42887
This commit is contained in:
Jonathan Atton 2009-10-05 13:58:13 +00:00
parent ba714b567c
commit 5b3d25c2a2
3 changed files with 105 additions and 0 deletions

View File

@ -14436,6 +14436,95 @@ collections {
}
}
group { name: "elm/progressbar/horizontal/wheel";
images {
image: "busy-1.png" COMP;
image: "busy-2.png" COMP;
image: "busy-3.png" COMP;
image: "busy-4.png" COMP;
image: "busy-5.png" COMP;
image: "busy-6.png" COMP;
image: "busy-7.png" COMP;
image: "busy-8.png" COMP;
image: "busy-9.png" COMP;
}
parts {
part { name: "elm.background.progressbar";
mouse_events: 0;
type: RECT;
description {
state: "default" 0.0;
}
}
part { name: "elm.swallow.bar";
mouse_events: 0;
type: SWALLOW;
description { state: "default" 0.0;
min: 0 0;
max: 0 0;
visible: 0;
}
}
part { name: "elm.swallow.content";
type: SWALLOW;
description { state: "default" 0.0;
min: 0 0;
max: 0 0;
visible: 0;
}
}
part { name: "background";
mouse_events: 0;
clip_to: "elm.background.progressbar";
description {
state: "default" 0.0;
min: 32 32;
max: 32 32;
visible: 1;
aspect: 1.0 1.0;
aspect_preference: BOTH;
image {
normal: "busy-9.png";
border: 7 7 7 7;
}
}
description {
state: "pulse" 0.0;
inherit: "default" 0.0;
image {
normal: "busy-9.png";
tween: "busy-1.png";
tween: "busy-2.png";
tween: "busy-3.png";
tween: "busy-4.png";
tween: "busy-5.png";
tween: "busy-6.png";
tween: "busy-7.png";
tween: "busy-8.png";
border: 7 7 7 7;
}
}
}
}
programs {
program { name: "start_pulse";
signal: "elm,state,pulse,start";
source: "elm";
action: STATE_SET "pulse" 0.0;
target: "background";
transition: LINEAR 0.5;
after: "start_pulse";
}
program { name: "stop_pulse";
signal: "elm,state,pulse,stop";
source: "elm";
action: STATE_SET "default" 0.0;
target: "background";
}
}
}
///////////////////////////////////////////////////////////////////////////////
group { name: "elm/spinner/base/default";
images {

View File

@ -8,6 +8,7 @@ typedef struct Progressbar
Evas_Object *pb4;
Evas_Object *pb5;
Evas_Object *pb6;
Evas_Object *pb7;
Eina_Bool run;
Ecore_Timer *timer;
} Progressbar;
@ -36,6 +37,7 @@ my_progressbar_test_start(void *data, Evas_Object *obj, void *event_info)
{
elm_progressbar_pulse(_test_progressbar.pb2, EINA_TRUE);
elm_progressbar_pulse(_test_progressbar.pb5, EINA_TRUE);
elm_progressbar_pulse(_test_progressbar.pb7, EINA_TRUE);
if (!_test_progressbar.run)
{
_test_progressbar.timer = ecore_timer_add(0.1, _my_progressbar_value_set, NULL);
@ -48,6 +50,7 @@ my_progressbar_test_stop(void *data, Evas_Object *obj, void *event_info)
{
elm_progressbar_pulse(_test_progressbar.pb2, EINA_FALSE);
elm_progressbar_pulse(_test_progressbar.pb5, EINA_FALSE);
elm_progressbar_pulse(_test_progressbar.pb7, EINA_FALSE);
if (_test_progressbar.run)
{
ecore_timer_del(_test_progressbar.timer);
@ -168,6 +171,15 @@ test_progressbar(void *data, Evas_Object *obj, void *event_info)
evas_object_show(pb);
_test_progressbar.pb6 = pb;
pb = elm_progressbar_add(win);
elm_object_style_set(pb, "wheel");
elm_progressbar_label_set(pb, "Style: wheel");
evas_object_size_hint_align_set(pb, EVAS_HINT_FILL, 0.5);
evas_object_size_hint_weight_set(pb, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
elm_box_pack_end(bx, pb);
evas_object_show(pb);
_test_progressbar.pb7 = pb;
bt_bx = elm_box_add(win);
elm_box_horizontal_set(bt_bx, 1);
evas_object_size_hint_weight_set(bt_bx, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);

View File

@ -836,6 +836,10 @@ extern "C" {
EAPI double elm_progressbar_value_get(const Evas_Object *obj);
/* smart callbacks called:
*/
/* available item styles:
* default
* wheel (simple style, no text, no progression, only pulse is available)
*/
EAPI Evas_Object *elm_separator_add(Evas_Object *parent);
EAPI void elm_separator_horizontal_set(Evas_Object *obj, Eina_Bool horizontal);