forked from enlightenment/enlightenment
128 lines
2.4 KiB
Plaintext
128 lines
2.4 KiB
Plaintext
|
images {
|
||
|
image: "e17_menu_radio1.png" COMP;
|
||
|
image: "e17_menu_radio2.png" COMP;
|
||
|
}
|
||
|
group {
|
||
|
name: "widgets/radio";
|
||
|
parts {
|
||
|
part {
|
||
|
name: "outline";
|
||
|
mouse_events: 0;
|
||
|
description {
|
||
|
state: "default" 0.0;
|
||
|
min: 16 16;
|
||
|
max: 16 16;
|
||
|
align: 0.0 0.5;
|
||
|
fixed: 1 1;
|
||
|
rel1 {
|
||
|
relative: 0.0 0.0;
|
||
|
offset: 1 1;
|
||
|
}
|
||
|
rel2 {
|
||
|
relative: 1.0 1.0;
|
||
|
offset: -2 -2;
|
||
|
}
|
||
|
image {
|
||
|
normal: "e17_menu_radio1.png";
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
part {
|
||
|
name: "item1";
|
||
|
mouse_events: 0;
|
||
|
description {
|
||
|
state: "default" 0.0;
|
||
|
visible: 0;
|
||
|
rel1 {
|
||
|
to: "outline";
|
||
|
relative: 0.0 0.0;
|
||
|
offset: 0 0;
|
||
|
}
|
||
|
rel2 {
|
||
|
to: "outline";
|
||
|
relative: 1.0 1.0;
|
||
|
offset: -1 -1;
|
||
|
}
|
||
|
image {
|
||
|
normal: "e17_menu_radio2.png";
|
||
|
}
|
||
|
}
|
||
|
description {
|
||
|
state: "active" 0.0;
|
||
|
inherit: "default" 0.0;
|
||
|
visible: 1;
|
||
|
}
|
||
|
}
|
||
|
part {
|
||
|
name: "label";
|
||
|
type: TEXT;
|
||
|
effect: SHADOW;
|
||
|
mouse_events: 0;
|
||
|
description {
|
||
|
state: "default" 0.0;
|
||
|
rel1 {
|
||
|
to_x: "outline";
|
||
|
relative: 1.0 0.0;
|
||
|
offset: 1 1;
|
||
|
}
|
||
|
rel2 {
|
||
|
relative: 1.0 1.0;
|
||
|
offset: -1 -2;
|
||
|
}
|
||
|
color: 0 0 0 255;
|
||
|
color3: 255 255 255 128;
|
||
|
text {
|
||
|
text: "Radio Button";
|
||
|
font: "Edje-Vera";
|
||
|
size: 10;
|
||
|
min: 1 1;
|
||
|
align: 0.0 0.5;
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
part {
|
||
|
name: "event";
|
||
|
type: RECT;
|
||
|
description {
|
||
|
state: "default" 0.0;
|
||
|
color: 0 0 0 0;
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
programs {
|
||
|
program {
|
||
|
name: "turn_on1";
|
||
|
signal: "toggle_on";
|
||
|
source: "";
|
||
|
action: STATE_SET "active" 0.0;
|
||
|
target: "item1";
|
||
|
}
|
||
|
program {
|
||
|
name: "turn_off1";
|
||
|
signal: "toggle_off";
|
||
|
source: "";
|
||
|
action: STATE_SET "default" 0.0;
|
||
|
target: "item1";
|
||
|
}
|
||
|
program {
|
||
|
name: "click";
|
||
|
signal: "mouse,down,1";
|
||
|
source: "event";
|
||
|
script {
|
||
|
new buf[100];
|
||
|
new Float:val;
|
||
|
|
||
|
get_state(PART:"item1", buf, sizeof(buf), val);
|
||
|
if (!strcmp(buf, "default")) {
|
||
|
set_state(PART:"item1", "active", 0.0);
|
||
|
emit("toggled", "on");
|
||
|
}
|
||
|
else {
|
||
|
set_state(PART:"item1", "default", 0.0);
|
||
|
emit("toggled", "off");
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|