Support
Contribute
Contact
Tracker
Navigation
Personal tools
 

Edje Text Part


The text part type is used to display a single line of text inside an interface, for multiple line text visit Edje Textblock Part.

The text part has many special properties that allow the designer to set 3 types of color (text, outline and shadow) and several effects to blend those colors if he wishes to do so.

See also: Edje Part, Edje Group, Edje Data Collection, Edje.

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 {
      //Text properties
    }

    rel1 {
    }

    rel2 {
    }

  }
}

Extra properties in the part block

effect: TYPE;
Causes the text to display with one of the different effects: NONE, PLAIN, OUTLINE, SOFT_OUTLINE, SHADOW, SOFT_SHADOW, OUTLINE_SHADOW, OUTLINE_SOFT_SHADOW.

Extra properties in the description block

color: 0-255 0-255 0-255 0-255;
Specifies the color off the text itself using the Edje Color Notation.The default is white (255 255 255 255).


color2: 0-255 0-255 0-255 0-255;
Specifies the color of the text outline.The default is black, but the tone varies with the effect.


color3: 0-255 0-255 0-255 0-255;
Specifies the color of the text shadow.The default is black (0 0 0 255), but the tone varies with the effect..

Text

text {
  text:        "some string of text to display";
  font:        "font_name";
  size:         SIZE;
  text_class:  "class_name";
  fit:          horizontal vertical;
  min:          horizontal vertical;
  align:        X-axis     Y-axis;
  source:      "part_name";
  text_source: "text_part_name";
  elipsis:      0.0-1.0;
}

The text block defines the specific text properties.

text: "some string of text to display";
A string of text to display, which can be later modified by the application.


font: "font_name";
The font's abstract name as defined in the fonts block. No text would be displayed unless this property is set.


size: SIZE;
The size in points. No text would be displayed unless this property is set.


text_class: "class_name";
Text classes allow the application to change the text font and size at runtime.


fit: horizontal vertical;
Takes a pair of values specifying whether to scale text to fill its container horizontally and/or vertically (1) or not (0). The default value is "0 0".


min: horizontal vertical;
Takes a pair of boolean values specifying whether the container can be reduced further than the text size, this prevents the container from chopping the text. The default value is 0 0.


align: X-axis Y-axis;
The text alignment inside it's container along both axis, where 0.0 is the left/top and 1.0 is the right/bottom.


source: "part_name";
Clarification needed.


text_source: "text_part_name";
Clarification needed.


elipsis: 0.0-1.0;
This property takes a decimal from 0.0 to 1.0, which represent the position off the string that will be displayed in case that that the string doesnt fit it's container and it's chopped out. 1.0 would show the last part of the string while 0.5 would show the middle. The default value is 0.0.

Text Effects

Text Effects
Enlarge
Text Effects
NONE
No effect is used.
PLAIN
Alias of NONE.
OUTLINE
Draws a solid outline around the characters.
SOFT_OUTLINE
Draws a smooth outline around the characters.
SHADOW
Draws a solid shadow under the characters.
SOFT_SHADOW
Draws a smooth shadow under the characters.
OUTLINE_SHADOW
A combination of the solid outline and shadow.
OUTLINE_SOFT_SHADOW
A combination of the solid outline and the smooth shadow.

Note: currently the text part doesn't support some of the effects supported by the Edje Textblock Part like far_shadow and glow.