|
|
|
NavigationPersonal tools |
Edje Textblock Part
The textblock part type is used to display text in multiple lines. Since it uses Edje Styles to do the formatting, the designer can change the way each style tag is going to affect the text.
part {
name: "partName";
type: TEXTBLOCK;
description {
state: "default" 0.0;
text {
style: "styleName";
}
rel1 {
}
rel2 {
}
}
}
[edit] Differences with TextThe textblock type has many properties in common with the text part type. Support for some properties has been removed since they are already implemented in the style block.
[edit] Example textblock with styleThe following is a simple example on how to use a style alongside a textblock. The example should compile cleanly and the result, once loaded in an Edje viewer application, should be similar to the screenshot in this article. TexBlock Example
styles
{
style {
name: "textblock_style";
base: "font=Edje-Vera font_size=12 align=left valign=bottom color=#000 wrap=word";
tag: "salute" " font_size=15 color=#fff style=soft_shadow shadow_color=#000";
tag: "/salute" "- \n";
tag: "response" " font_size=10 style=outline outline_color=#fff";
tag: "/response" "-";
tag: "highlight" "+ style=underline underline_color=#000A underline2_color=#0005";
tag: "/highlight" "-"
tag: "time" "+ color=#00f";
tag: "/time" "-"
tag: "scary" "+ color=#f00 style=soft_outline outline_color=#f005";
tag: "/scare" "-"
tag: "mega_br" " \n \n";
tag: "br" " \n";
}
}
collections {
group {
name: "tutorial.parts";
parts {
part {
name: "testing_textblock";
type: TEXTBLOCK;
description {
state: "default" 0.0;
text {
text: "<salute>Hello everybody!</salute><response>Hello Dr. Nick!</response><mega_br>There <highlight>nothing else</highlight> here. <br><time>now</time> prepare to <scary>die!</scare>";
style: "textblock_style";
min: 0 0;
}
}
}
} //Parts
} //Group
} //Collection
|