|
|
|
NavigationPersonal tools |
Edje Part
Parts are used to represent the most basic elements of the theme, for example, a part can represent a line in a border or a label on a button.
[edit] Common Blocks and Properties
part {
name: "part_name";
type: TYPE;
mouse_events: 0-1;
repeat_events: 0-1;
precise_is_inside: 0-1;
clip_to: "another_part";
description {
}
dragable {
}
}
All the different part types share a common set blocks and properties.
[edit] Description
description {
state: "description_name" INDEX;
inherit: "another_description" INDEX;
visible: 0-1;
min: width height;
max: width height;
align: X-axis Y-axis;
fixed: 0-1 0-1;
step: width height;
aspect: min max;
rel1 {
}
rel2 {
}
}
Every part can have one or more description blocks. Each block is used to define style and layout properties of a part in a given "state".
[edit] Rel1 and Rel2
rel1 {
to: "anotherpart";
relative: 0.0 0.0;
offset: 0 0;
}
rel2 {
to_x: "anotherpart";
to_y: "anotherotherpart";
}
Rel1 and Rel2 are used to define the position of the left-top and bottom-right corners of a part's container. A detailed explanation can be found in the Edje Part Positioning article. [edit] Dragable
dragable {
confine: "nameOfPart";
events: //unknown;
x: 0-1 0-1 0-1;
y: 0-1 0-1 0-1;
}
The dragable block is used to define a set of properties in drag able objects. This section is incomplete. Please help the wiki by expanding it. [edit] Rect
part {
name: "part_name";
type: RECT;
description {
state: "default" 0.0;
color: 0-255 0-255 0-255 0-255;
rel1 {
}
rel2 {
}
}
}
The rect is one of the most basic types of the Edje library, when set, it fills the whole part's container with the defined color. When the alpha channel is set to 0 the rect is invisible, but the rect still detect events and send signals. The default color is white. [edit] Image
part {
name: "part_name";
type: IMAGE;
description {
state: "default" INDEX;
image {
}
fill {
}
rel1 {
}
rel2 {
}
}
}
The image part type is one of the most feature full types of the Edje library, it's used to display images of any type supported by Evas inside an interface. Any part of the image type can include two additional blocks in it's description, image and fill, which are used to set the display properties of the image inside it's container. [edit] Text
part {
name: "part_name";
type: TEXT;
effect: TYPE;
description {
color: 0-255 0-255 0-255 0-255;
color2: 0-255 0-255 0-255 0-255;
color3: 0-255 0-255 0-255 0-255;
text {
}
}
}
The text part type is used to display a given string of text in a single line. It's description block contains an additional block named "text" in which properties specific to the type are set. [edit] Textblock
part {
name: "partName";
type: TEXTBLOCK;
description {
state: "default" 0.0;
text {
style: "styleName";
min: 1 1;
}
rel1 {
}
rel2 {
}
}
}
The text block part types are defined in a similar fashion that the text parts but allows the designer to display multiple lines of text formatted using Edje Styles. [edit] Gradient
part {
name: "gradient";
type: GRADIENT;
description {
state: "default" 0.0;
gradient {
}
fill {
}
}
}
The gradient type displays a combination of two or more colors as a gradient in many different directions and forms. [edit] Swallow
part {
name: "partName";
type: SWALLOW;
mouse_events: 0-1;
description {
state: "default" 0.0;
color: 0-255 0-255 0-255 0-255;
rel1 {
}
rel2 {
}
}
}
The swallow type allows the application to insert Edje/Evas objects or even EWL widgets into the interface but contrived into the container of the swallow part. |