examples/unsorted/elementary/codegen_example.edc

110 lines
2.9 KiB
Plaintext

collections {
group {
name: "elm/example/mylayout/default";
data {
item: "title" "elm_codegen Example";
}
parts {
part {
name: "example/title";
api: "title" "The example title";
type: TEXT;
description {
state: "default" 0.0;
color: 0 0 0 255;
rel1 {
relative: 0.0 0.0;
offset: 0 0;
}
rel2 {
relative: 1.0 0.2;
offset: -1 -1;
}
text {
text: "Using elementary_codegen";
size: 16;
font: "sans";
min: 1 1;
ellipsis: -1;
}
}
}
part {
name: "example/custom";
api: "custom" "The swallow part";
type: SWALLOW;
description {
state: "default" 0.0;
min: 160 50;
max: 160 50;
align: 0.5 0.4;
}
description {
state: "big" 0.0;
inherit: "default" 0.0;
min: 320 100;
max: 320 100;
}
} // example/custom
part {
name: "example/box";
api: "box" "The box part";
type: BOX;
description {
state: "default" 0.0;
box {
layout: "horizontal_homogeneous";
}
rel1.relative: 0.0 0.5;
rel2.relative: 1.0 0.6;
}
} // box
part {
name: "example/table";
api: "table" "The table part";
type: TABLE;
description {
state: "default" 0.0;
rel1.relative: 0.0 0.8;
rel2.relative: 1.0 1.0;
}
} // table
programs {
program {
name: "swallow,grow";
api: "swallow_grow" "Executed when the button enlarges";
signal: "button,enlarge";
action: STATE_SET "big" 0.0;
transition: LINEAR 0.5;
target: "example/custom";
after: "emit,changed";
}
program {
name: "swallow,shrink";
api: "swallow_shrink" "Executed when the button reduces";
signal: "button,reduce";
action: STATE_SET "default" 0.0;
transition: LINEAR 0.5;
target: "example/custom";
after: "emit,changed";
}
program {
name: "emit,changed";
action: SIGNAL_EMIT "size,changed" "";
api: "size_changed" "Emit the signal size,changed";
}
}
}
}
}