Part Block

Table of Contents

part
{
   // inherit all the fields of another part
   inherit: "partname";
   // name the part
   name: "partname";
   // set the part type
   type: IMAGE;
   // enable mouse events on the part
   mouse_events: 0/1;
   // repeat mouse events to parts below the current one
   repeat_events: 0/1;
   ignore_flags: NONE;
   // whether the part sizes scale with the edje scaling factor
   scale: 0/1;
   // whether fully-transparent pixels are taken into account for collision detection
   precise_is_inside: 0/1;
   // only render the area of the part that coincides with the given part
   clip_to: "anotherpart";
   // for group/textblock parts: swallow the given group (for textblock: goes below text)
   source: "groupname";
   // same as source but goes on top of text
   source2: "groupname";
   // for textblock parts: swallow the given group below the mouse cursor when it hovers over the part
   source3: "groupname";
   // same as source3 but goes on top of the cursor
   source4: "groupname";
   // for textblock parts: swallow the given group below text anchors (<a>...</a>)
   source5: "groupname";
   // same as source5 but goes on to top of the anchor
   source6: "groupname";
   // add a shadow effect to the part
   effect: SOFT_SHADOW (BOTTOM_RIGHT);
   // for textblock parts: makes the text editable, possibly with a specific behavior
   entry_mode: PASSWORD;
   // for textblock parts: change how the tex selection is triggered
   select_mode: EXPLICIT;
   // for editable textblock parts: where to draw the (blinking) cursor
   cursor_mode: UNDER;
   // for editable textblock parts: allow multiple lines
   multiline: 0/1;
   // for textblock parts: accessibility features will be used
   access: 0/1;
   // no-one uses that
   pointer_mode: AUTOGRAB;
   use_alternate_font_metrics: 0/1;
   // remove the given program; useful when it was inherited
   program_remove: "programname";
   // remove the given part; useful when it was inherited
   part_remove: "partname";
   // insert the current part below the given part, as if it were declared before
   insert_before: "partname";
   // insert the current part above the given part, as if it were declared after
   insert_after: "partname";
   // define a new part inside this one
   part
   {
      <part definition>
   }
   draggable
   {
      // confine the current part to the given part
      confine: "another part";
      // only start drag when it would have moved enough to be outside of the given part
      threshold: "another part";
      // forward drag events to the given part instead of handling them
      events: "another draggable part";
      // enable horizontal drag of the part with steps each step_size or with steps_count steps
      x: 0/1 &lt;step_size&gt; &lt;steps_count&gt;;
      // same as x but vertical
      y: 1 0 100;
   }
   // for box or table parts
   box/table
   {
      // list of items
      items
      {
         item
         {
            // define item type, can only be GROUP
            type: GROUP;
            // name the item
            name: "name";
            // set the source for this item, i.e. its contents
            source: "groupname";
            // minimum horizontal and vertical item sizes (-1 for expand)
            min: -1 -1;
            // maximum horizontal and vertical item sizes (-1 for ignore)
            max: 100 100;
            // set the item padding in pixels
            padding: 2 2 2 2;
            spread: 1 1;
            // set the item alignment
            align: 0.5 0.5;
            // set a weight hint in the box for the given object
            weight: 1 1;
            // set the aspect ratio hint
            aspect: 1 1;
            aspect_mode: BOTH;
            // number of columns and rows the item will take
            span: 1 1;
         }
      }
   }
   description
   {
      // inherit another description
      inherit: "default" 1.0;
      // name the current description
      state: "default" 1.0;
      // use another part as content of the current "PROXY" part (This description only works in the PROXY part and the current part mirrors the rendering content of the source part)
      source: "partname";
      // make the part (in)visible (invisible parts emit no signals)
      visible: 0/1;
      // emit a signal when the given dimension becomes zero or stops being zero
      limit: WIDTH;
      // horizontal and vertical alignment of the part inside its parent
      align: 0.5 0.5;
      // set that the part does not change size
      fixed: 0/1 0/1;
      // set the minimum size for the part
      min: 200 200;
      // forcibly multiply the minimum sizes by the given factors
      minmul: 1.2 1.2;
      // set the maximum size for the part
      max: 400 400;
      // make vertical and horizontal resizes happen in steps
      step: 0 0;
      // force aspect ratio to be kept between min and max between resizes
      aspect: 0.8 1.2;
      // the dimension to which the aspect ratio applies
      aspect_preference: BOTH;
      // use the given color class which can be used to factor font colors
      color_class: "colorclassname";
      // set the text color
      color: 255 0 0 255;
      // set the color of the text's shadow
      color2: 0 255 0 255;
      // set the color of the text's outline
      color3: 0 0 255 255;
      // define the positions of the top-left (rel1) and bottom-right (rel2) corners
      rel1/rel2
      {
         // make relative and offset use the given part for their positioning
         to: "partname";
         // position the corner relative to the part given through to (0.0 being axis beginning, 1.0 being its end)
         relative: 0.1 0.1;
         // add an absolute offset (in pixels) along each axis
         offset: 10 10;
         // same as to but only for the x axis
         to_x: "partname";
         // same as to but only for the y axis
         to_y: "partname";
      }
      // settings specific to parts of type image
      image
      {
         // name (not path) of the regular image
         normal: "imagename";
         // image to use while transitioning to the normal image; use several times to create animations
         tween: "imagename2";
         // set the number of pixels that make up each border of the image, i.e. are not resized when the image is
         border: 4 4 4 4;
         // hide, strip from its alpha or show (default) the non-border part of the image
         middle: DEFAULT;
         border_scale_by: 1.0;
         // whether to scale the border or not
         border_scale: 0/1;
         scale_hint: STATIC;
         // set how the image is going to fill its part
         fill:
         {
            // whether to smooth the image when scaling it
            smooth: 0/1;
            spread: ??;
            // whether to scale or tile to fit when resizing the image is needed
            type: SCALE/TILE;
            // only display the part of the image that is below and to the right of the given point
            origin
            {
               // specify top-left point as relative coordinates
               relative: 0.1 0.1;
               // specify top-left point as a pixel offset
               offset: 10 10;
            }
            // specify bottom-right point as relative coordinates
            size
            {
               relative: 0.1 0.1;
               // specify bottom-right point as a pixel offset
               offset: 10 10;
            }
         }
      }
      // settings specific to parts of type text and textblock
      text
      {
         // set the part's text
         text: "some text";
         // set the text's font
         font: "Sans";
         // set the text's size
         size: 14;
         // set the text's class which can be used to factor font and font-size settings
         text_class: "classname";
         // use the styles defined in stylename
         style: "stylename";
         // for textblocks in password mode, replace characters to hide with this string
         repch: "*";
         // set the min and max font sizes allowed when resizing (default is 0 0, i.e. unrestricted)
         size_range: 6 18;
         // increase font size as much as possible while still remaining in the container for both axis
         fit: 0/1 0/1;
         // make the min size of the container equal to the min size of the current text (0 0 by default)
         min: 0/1 0/1;
         // make the max size of the container equal to the max size of the current text (0 0 by default)
         max: 0/1 0/1;
         // set the vertical and horizontal alignments of the text
         align: 0.5 0.5;
         // re-use the text of another part
         text_source: "partname";
         // when text is too long to fit, relative position at which to cut the text and put an ellipsis ("...")
         ellipsis: 0.9;
      }
      // settings specific to parts of type box
      box
      {
         // set how children while be arranged in the box
         layout: horizontal_homogeneous;
         // set the vertical and horizontal alignments of box
         align: 0.5 0.5;
         // set the padding between items of the box
         padding: 1 1;
         // make the box' min size be the min size of its elements (i.e. make it shrinkable as much as its items)
         min: 0 1;
      }
      table
      {
         // make items homogeneous
         homogeneous: NONE;
         // set the vertical and horizontal alignments of box
         align: 0.5 0.5;
         // set the padding between items of the box
         padding: 1 1;
         // make the table's min size be the min size of its elements (i.e. make it shrinkable as much as its items)
         min: 0 1;
      }
      map
      {
         perspective: "partname";
         light: "partname";
         on: 0/1;
         smooth: 0/1;
         alpha: 0/1;
         backface_cull: 0/1;
         perspective_on: 0/1;
         color: 0/1;
         rotation
         {
            center: "partname";
            x: 45;
            y: 120;
            z: 90;
         }
         perspective
         {
            zplane: 0/1;
            focal: 20;
         }
         // simpler syntax to create transitions to the current part
         link
         {
            base: "edje,signal" "edje";
         }
      }
   }
}

Part

part
{
   name: "partname";
   type: IMAGE;
   mouse_events:  1;
   repeat_events: 0;
   ignore_flags: NONE;
   clip_to: "anotherpart";
   source:  "groupname";
   pointer_mode: AUTOGRAB;
   use_alternate_font_metrics: 0;
 
   dragable {}
   items {}
   description {}
}

Parts are used to represent the most basic design elements of the theme, for example, a part can represent a line in a border or a label on a button.

  • inherit [part name]
    Copies all attributes except part name from referenced part into current part. All existing attributes, except part name, are overwritten.
When inheriting any parts, descriptions without state names are not allowed.
  • program_remove [program name] (program name) (program name) …
    Removes the listed programs from an inherited group. Removing non-existing programs is not allowed.
This breaks program sequences if a program in the middle of the sequence is removed.
  • part_remove [part name] (part name) (part name) …
    Removes the listed parts from an inherited group. Removing non-existing parts is not allowed.
  • name [part name]
    The part's name is used as reference in the theme's relative positioning system, by programs and in some cases by the application. It must be unique within the group.
  • type [TYPE]
    Sets the type. This is set to IMAGE by default. Valid types are:
    • RECT: Rectangle object in the screen
    • TEXT: Simple text
    • IMAGE: Image area
    • SWALLOW: Area where you can add the object
    • TEXTBLOCK: Complex text with multiple lines, mark-up elements, and such.
    • GROUP: Part which can include other groups in the same group.
    • BOX: Container object as a container. It has a row or column.
    • TABLE: Container object as a container. It has a row and column.
    • PROXY: Clone of another part in the same group. It shares the memory of the source part.
    • SPACER: Rectangle object, but invisible. Recommended to padding because it does not allocate any memory.

Nested parts adds hierarchy to Edje. Nested part inherits its location relatively to the parent part. To declare a nested part create a new part within current part declaration. Define parent part name before adding nested parts.

part
{
   name: "parent_rect";
   type: RECT;
   description {}
   part
   {
      name: "nested_rect";
      type: RECT;
      description {}
   }
}
  • insert_before [another part's name]
    The part's name which this part is inserted before. One part cannot have both insert_before and insert_after. One part cannot refer more than one by insert_before.
  • insert_after [another part's name]
    The part's name which this part is inserted after. One part cannot have both insert_before and insert_after. One part cannot refer more than one by insert_after.
  • mouse_events [1 or 0]
    Specifies whether the part emits signals, although it is named mouse_events. Disabling it (0) prevents the part from emitting signal. It is set to 1 by default, or to the value set to mouse_events at the group level, if any.
  • repeat_events [1 or 0]
    Specifies whether a part echoes a mouse event to other parts below the pointer (1), or not (0). It is set to 0 by default.
  • ignore_flags [FLAG] … Specifies whether events with the given flags are ignored, i.e., do not emit signals to the parts. Multiple flags must be separated by spaces, the effect is ignoring all events with one of the flags specified. Possible flags are:
    • NONE: Event is handled properly (default value)
    • ON_HOLD: Event is not handled or passed in this part
  • scale [1 or 0]
    Specifies whether the part scales its size with an Edje scaling factor. By default scale is off (0) and the default scale factor is 1.0 which means no scaling. This is used to scale properties such as font size, min/max size of the part, and it can also be used to scale based on DPI of the target device. The reason to be selective is that some parts are scaled well, others are not, so choose what works best.
  • pointer_mode [MODE]
    Sets the mouse pointer behavior for a given part. The default value is AUTOGRAB. Available modes are:
    • AUTOGRAB, when the part is clicked and the button remains pressed, the part is the source of all future mouse signals emitted, even outside the object, until the button is released.
    • NOGRAB, the effect is limited to the part's container.
  • precise_is_inside [1 or 0]
    Enables precise point collision detection for the part, which is more resource-intensive. It is disabled by default.
  • use_alternate_font_metrics [1 or 0]
    Only affects text and textblock parts, when enabled Edje uses different size measurement functions. It is disabled by default.
  • clip_to [another part's name]
    Only renders the area of part that coincides with another part's container. Overflowing content is not displayed. Note that the part being clipped to can only be a rectangle part.
  • source [another group's name]
    Only available to GROUP or TEXTBLOCK parts. Swallows the specified group into the part's container if it is a GROUP. If TEXTBLOCK it is used for the group to be loaded and used for selection display UNDER the selected text. source2 is used for on top of the selected text, if source2 is specified.
  • source2 [another group's name]
    Only available to TEXTBLOCK parts. It is used for the group to be loaded and used for selection display OVER the selected text. source is used for under of the selected text, if source is specified.
  • source3 [another group's name]
    Only available to TEXTBLOCK parts. It is used for the group to be loaded and used for cursor display UNDER the cursor position. source4 is used for over the cursor text, if source4 is specified.
  • source4 [another group's name]
    Only available to TEXTBLOCK parts. It is used for the group to be loaded and used for cursor display OVER the cursor position. source3 is used for under the cursor text, if source4 is specified.
  • source5 [another group's name]
    Only available to TEXTBLOCK parts. It is used for the group to be loaded and used for anchors display UNDER the anchor position. source6 is used for over the anchors text, if source6 is specified.
  • source6 [another group's name]
    Only available to TEXTBLOCK parts. It is used for the group to be loaded and used for anchor display OVER the anchor position. source5 is used for under the anchor text, if source6 is specified.
  • effect [effect] (shadow direction)
    Apply the selected outline, shadow, or glow effect to “textblock” (take care that this effect only works for the textblock). The available effects are:
    • PLAIN
    • OUTLINE
    • SOFT_OUTLINE
    • SHADOW
    • SOFT_SHADOW
    • OUTLINE_SHADOW
    • OUTLINE_SOFT_SHADOW
    • FAR_SHADOW
    • FAR_SOFT_SHADOW
    • GLOW

      The available shadow directions definitions are (default is BOTTOM_RIGHT):
    • BOTTOM_RIGHT
    • BOTTOM
    • BOTTOM_LEFT
    • LEFT
    • TOP_LEFT
    • TOP
    • TOP_RIGHT
    • RIGHT
  • entry_mode [mode]
    Sets the edit mode for a textblock part. The available modes are:
    • NONE:
      The textblock is non-editable.
    • PLAIN:
      The textblock is non-editable, but selectable.
    • EDITABLE:
      The textblock is editable.
    • PASSWORD:
      The textblock is editable if the Edje object has the keyboard focus and the part has the Edje focus (or selectable always regardless of focus). In the event of password mode, not selectable and all text chars replaced with *'s but editable and pastable.
  • select_mode [mode]
    Sets the selection mode for a textblock part. The available modes are:
    • DEFAULT, selection mode is what you would expect on any desktop. Press mouse, drag and release to end.
    • EXPLICIT, this mode requires the application controlling the Edje object has to explicitly begin and end selection modes, and the selection itself is draggable at both ends.
  • cursor_mode [mode]
    Sets the cursor mode for a textblock part. The available modes are:
    • UNDER, the cursor draws below the character pointed at. That is the default.
    • BEFORE, the cursor is drawn as a vertical line before the current character, just like many other GUI toolkits handle it.
  • multiline [1 or 0]
    It causes a textblock that is editable to allow multiple lines for editing.
  • access [1 or 0]
    Specifies whether the part uses accessibility feature (1), or not (0). It is set to 0 by default.

Draggable

dragable
{
   confine: "another part";
   threshold: "another part";
   events:  "another draggable part";
   x: 0 0 0;
   y: 0 0 0;
}

When this block is used the part can be dragged around the interface, do not confuse with external drag and drop. By default Edje (and most applications) attempts to use the minimal size possible for a draggable part. If the min property is not set in the description the part is (most likely) set to 0px width and 0px height, thus invisible.

  • x [enable/disable] [step] [count]
    Used to set up dragging events for the X axis. The first parameter is used to enable (1 or -1) and disable (0) dragging along the axis. When enabled, 1 sets the starting point at 0.0 and -1 at 1.0. The second parameter takes any integer and limits movement to values divisible by it, causing the part to jump from position to position. If step is set to 0 it is calculated as width of confine part divided by count.
  • y [enable/disable] [step] [count]
    Used to set up dragging events for the Y axis. The first parameter is used to enable (1 or -1) and disable (0) dragging along the axis. When enabled, 1 sets the starting point at 0.0 and -1 at 1.0. The second parameter takes any integer and limits movement to values divisible by it, causing the part to jump from position to position. If step is set to 0 it is calculated as height of confine part divided by count.
  • confine [another part's name]
    Limits the movement of the dragged part to another part's container. Set a min size for the part, or the dragged object will not show up.
  • threshold [another part's name]
    When set, the movement of the dragged part can only start when it get moved enough to be outside of the threshold part.
  • events [another draggable part's name]
    Causes the part to forward the drag events to another part, thus ignoring them for itself.

Box/table

Items
box/table
{
   items
   {
      item
      {
         type: GROUP;
         source: "some source";
         min: -1 -1;
         max: 100 100;
         padding: 1 1 2 2;
      }
      item
      {
         type: GROUP;
         source: "some other source";
         name: "some name";
         align: 1.0 0.5;
      }
   }
}

On a BOX part, this block is used to set other groups as elements of the box. These can be mixed with external objects set by the application through the edje_object_part_box* API.

Item
  • type [item type]
    Sets the type of the object this item holds. The supported type is:
    • GROUP (default)
  • name [name for the object]
    Sets the name of the object via evas_object_name_set().
  • source [another group's name]
    Sets the group this object is made of.
  • min [width] [height]
    Sets the minimum size hints for this object.
Must be -1 to get expand behavior.
  • spread [width] [height]
    Replicates the item in a rectangle of size width x height box starting from the defined position of this item. The default value is 1 1;.
  • prefer [width] [height]
    Sets the preferred size hints for this object.
  • max [width] [height]
    Sets the maximum size hints for this object.
  • padding [left] [right] [top] [bottom]
    Sets the padding hints for this object.
  • align [x] [y]
    Sets the alignment hints for this object.
  • weight [x] [y]
    Sets the weight hints for this object.
  • aspect [w] [h]
    Sets the aspect width and height hints for this object.
  • aspect_mode [mode]
    Sets the aspect control hints for this object. The available hints are:
    • NONE
    • NEITHER
    • HORIZONTAL
    • VERTICAL
    • BOTH
  • options [extra options]
    Sets extra options for the object.
  • position [col] [row]
    Sets the position this item has in the table. This is required for parts of type TABLE.
  • span [col] [row]
    Sets how many columns and rows this item uses. The default value is 1 1.

Description

description
{
   inherit: "another_description" INDEX;
   state: "description_name" INDEX;
   visible: 1;
   min: 0 0;
   max: -1 -1;
   align: 0.5 0.5;
   fixed: 0 0;
   step: 0 0;
   aspect: 1 1;
 
   rel1
   {
      ...
   }
 
   rel2
   {
      ...
   }
}

Every part can have one or more description blocks. Each description is used to define style and layout properties of a part in a given “state”.

  • inherit [another description's name] [another description's index]
    Thee description inherits all the properties from the named description. The properties defined in this part override the inherited properties, reducing the amount of necessary code for simple state changes. Note: inheritance in Edje is single level only.
  • source [another part's name]
    Causes the part to use another part's content as the content of this part. This works only with PROXY part.
  • state [name for the description] [index]
    Sets a name used to identify a description inside a given part. Multiple descriptions are used to declare different states of the same part, like “clicked” or “invisible”. All state declarations are also coupled with an index number between 0.0 and 1.0. All parts must have at least one description named “default 0.0”.
  • visible [0 or 1]
    Takes a Boolean value specifying whether part is visible (1) or not (0). Non-visible parts do not emit signals. The default value is 1.
  • limit [mode]
    Emits a signal when the part size changes from zero or to a zero (limit,width,over, limit,width,zero). By default no signal are emitted. Valid values are:
    • NONE
    • WIDTH
    • HEIGHT
    • BOTH
  • align [X axis] [Y axis]
    When the displayed object's size is smaller or bigger than its container, this property moves it relatively along both axis inside its container. “0.0” means left/top edges of the object touching container's respective ones, and “1.0” stands for right/bottom edges of the object (on horizontal/vertical axis, respectively). The default value is “0.5 0.5”.
  • fixed [width, 0 or 1] [height, 0 or 1]
    Sets the minimum size calculation. See edje_object_size_min_calc() and edje_object_size_min_restricted_calc(). This tells the min size calculation routine that this part does not change size in width or height (1 for it does not, 0 for it does), so the routine does not try to expand or contract the part.
  • min [width] [height] or SOURCE
    Sets the minimum size of the state. When min is defined to SOURCE, it looks at the original image size and enforces its minimal size to match at least the original one. The part must be an IMAGE or a GROUP part.
  • minmul [width multiplier] [height multiplier]
    A multiplier forcibly applied to whatever minimum size is only during minimum size calculation.
  • max [width] [height] or SOURCE
    The maximum size of the state. A size of -1.0 means that it is ignored in one direction. When max is set to SOURCE, Edje enforces the part to be not more than the original image size. The part must be an IMAGE part.
  • step [width] [height]
    Restricts resizing of each dimension to values divisible by its value. This causes the part to jump from value to value while resizing. The default value is “0 0” which disables stepping.
  • aspect [min] [max]
    Normally width and height can be resized to any values independently. The aspect property forces the width to height ratio to be kept between the minimum and maximum set. For example, “1.0 1.0” increases the width a pixel for every pixel added to height. The default value is “0.0 0.0” which disables aspect. For a more detailed explanation, see the <a href=“/documentation/guides/native-application/ui/edje-0#min_size_hint”>Min Size Hint</a> .
  • aspect_preference [DIMENSION]
    Set the dimensions to which the “aspect” property applies. Available options are:
    • BOTH
    • VERTICAL
    • HORIZONTAL
    • SOURCE
    • NONE
  • color_class [color class name]
    The part uses the color values of the named color_class, these values can be overridden by the “color”, “color2” and “color3” properties.
  • color [red] [green] [blue] [alpha]
    Sets the main color to the specified values (between 0 and 255).
The textblock part is not affected by the color description. Set the color in the text style.
  • color2 [red] [green] [blue] [alpha]
    Sets the text shadow color to the specified values (0 to 255).
  • color3 [red] [green] [blue] [alpha]
    Sets the text outline color to the specified values (0 to 255).
Rel1/rel2
description
{
   rel1
   {
      relative: 0.0 0.0;
      offset:     0   0;
   }
   rel2
   {
      relative: 1.0 1.0;
      offset:    -1  -1;
   }
}

The rel1 and rel2 blocks are used to define the position of each corner of the part's container. With rel1 being the left-up corner and rel2 being the right-down corner.

  • relative [X axis] [Y axis]
    Moves the corner to a relative position inside the container of the relative “to” part. Values from 0.0 (0%, beginning) to 1.0 (100%, end) of each axis.
  • offset [X axis] [Y axis]
    Affects the corner position a fixed number of pixels along each axis.
  • to [another part's name]
    Positions the corner relatively to another part's container. Setting to “” resets this value for inherited parts.
  • to_x [another part's name]
    Positions the corner relatively to the X axis of another part's container. This affects the first parameter of “relative”. Setting to “” resets this value for inherited parts.
  • to_y [another part's name]
    Positions the corner relatively to the Y axis of another part's container. This affects the second parameter of “relative”. Setting to “” resets this value for inherited parts.
Image
description
{
   image
   {
      normal: "filename.ext";
      tween:  "filename2.ext";
      tween:  "filenameN.ext";
      border:  left right top bottom;
      middle:  0/1/NONE/DEFAULT/SOLID;
      fill {}
   }
}
  • normal [image's filename]
    Name of image to be used as previously declared in the images block. In an animation, this is the first and last image displayed. It is required in any image part
  • tween [image's filename]
    Name of an image to be used in an animation loop, an image block can have none, one or multiple tween declarations. Images are displayed in the order they are listed, during the transition to the state they are declared in; the “normal” image is the final state.
  • border [left] [right] [top] [bottom]
    Sets the area (in pixels) of each side of the image is displayed as a fixed size border, from the side -&gt; inwards, preventing the corners from being changed on a resize.
  • middle [mode]
    If border is set, this value tells Edje if the rest of the image (not covered by the defined border) displayed or not or be assumed to be solid (without alpha). The default value is 1/DEFAULT. The available values are:
    • 0 or NONE
    • 1 or DEFAULT
    • SOLID (strip alpha from the image over the middle zone)
  • border_scale_by [value]
    If border scaling is enabled then normally the OUTPUT border sizes (e.g. if 3 pixels on the left edge are set as a border, then normally at scale 1.0, those 3 columns are always exactly 3 columns of output, or at scale 2.0 they are 6 columns, or 0.33 they merge into a single column). This property multiplies the input scale factor by this multiplier, allowing the creation of supersampled borders to make higher resolution outputs possible by always using the highest resolution artwork and then runtime scaling it down. Value can be: 0.0 or bigger (0.0 or 1.0 to turn it off)
  • border_scale [0/1]
    Tells Edje if the border is scaled by the object/global Edje scale factors.
  • scale_hint [mode]
    Sets the evas image scale hint letting the engine more effectively save cached copies of the scaled image if it makes sense. Valid values are:
    • 0 or NONE
    • DYNAMIC
    • STATIC

Image.fill

image
{
   fill
   {
      type: SCALE;
      smooth: 0-1;
      origin {}
      size {}
   }
}

The fill method is an optional block that defines the way an IMAGE part is going to be displayed inside its container. It can be used for tiling (repeating the image) or displaying only part of an image. See evas_object_image_fill_set() documentation for more details.

  • smooth [0 or 1]
    The smooth property takes a boolean value to decide if the image will be smoothed on scaling (1) or not (0). The default value is 1.
  • spread
  • type [fill type]
    Sets the image fill type. The part parameter “min” must be set, it is size of tiled image. If parameter “max” set tiled area has the size accordingly “max” values. SCALE is default type. Valid values are:
    • SCALE, image is scaled accordingly the value of the parameters

“relative” and “offset” from “origin” and “size” blocks.

  • TILE, image is tiled accordingly parameters value “relative” and “offset” from “origin” and “size” blocks.
image
{
   fill
   {
      origin
      {
         relative: 0.0 0.0;
         offset: 0 0;
      }
   }
}

The origin block is used to place the starting point, inside the displayed element, that is used to render the tile. By default, the origin is set at the element's left-up corner.

  • relative [X axis] [Y axis]
    Sets the starting point relatively to displayed element's content.
  • offset [X axis] [Y axis]
    Affects the starting point a fixed number of pixels along each axis.
image
{
   fill
   {
      size
      {
         relative: 1.0 1.0;
         offset: -1 -1;
      }
   }
}

The size block defines the tile size of the content that are displayed.

  • relative [width] [height]
    Takes a pair of decimal values that represent the percentage of the original size of the element. For example, “0.5 0.5” represents half the size, while “2.0 2.0” represents the double. The default value is “1.0 1.0”.
  • offset [X axis] [Y axis]
    Affects the size of the tile a fixed number of pixels along each axis.
text
{
   text: "some string of text to display";
   font: "font_name";
   size: SIZE;
   text_class: "class_name";
   fit: horizontal vertical;
   min: horizontal vertical;
   max: horizontal vertical;
   align: X-axis Y-axis;
   source: "part_name";
   text_source: "text_part_name";
   style: "stylename";
}
  • text [a string of text, or nothing]
    Sets the default content of a text part, normally the application is the one changing its value.
  • text_class [text class name]
    Similar to color_class, this is the name used by the application to alter the font family and size at runtime.
  • font [font alias]
    This sets the font family to one of the aliases set up in the “fonts” block. Can be overridden by the application.
  • style [the style name]
    Causes the part to use the default style and tags defined in the “style” block with the specified name.
  • repch [the replacement character string]
    If this is a textblock and is in PASSWORD mode this string is used to replace every character to hide the details of the entry. Normally * is used, but you can use anything you like.
  • size [font size in points (pt)]
    Sets the default font size for the text part. Can be overridden by the application.
  • size_range [font min size in points (pt)] [font max size in points (pt)]
    Sets the allowed font size for the text part. Setting min and max to 0 means that sizing is not restricted. This is also the default value.
  • fit [horizontal] [vertical]
    When any of the parameters is set to 1 Edje resizes the text for it to fit in its container. Both are disabled by default.
  • min [horizontal] [vertical]
    When any of the parameters is enabled (1) it forces the minimum size of the container to be equal to the minimum size of the text. The default value is “0 0”.
  • max [horizontal] [vertical]
    When any of the parameters is enabled (1) it forces the maximum size of the container to be equal to the maximum size of the text. The default value is “0 0”.
  • align [horizontal] [vertical] Changes the position of the point of balance inside the container. The default value is 0.5 0.5.
  • source [another TEXT part's name]
    Causes the part to use the text properties (like font and size) of another part and update them as they change.
  • text_source [another TEXT part's name]
    Causes the part to display the text content of another part and update them as they change.
  • ellipsis [point of balance]
    Balances the text in a relative point from 0.0 to 1.0, this point is the last section of the string to be cut out in case of a resize that is smaller than the text itself. The default value is 0.0. Set to -1.0 for no ellipsis.
Box
box
{
   layout: "vertical";
   padding: 0 2;
   align: 0.5 0.5;
   min: 0 0;
}

A box block can contain other objects and display them in different layouts, any of the predefined set, or a custom one, set by the application.

  • layout [primary layout] (fallback layout)
    Sets the layout for the box:
    • horizontal (default)
    • vertical
    • horizontal_homogeneous
    • vertical_homogeneous
    • horizontal_max (homogeneous to the max sized child)
    • vertical_max
    • horizontal_flow
    • vertical_flow
    • stack
    • some_other_custom_layout_set_by_the_application
      Set a custom layout as a fallback. For more information, see edje_box_layout_register(). If an unregistered layout is used, it defaults to horizontal.
  • align [horizontal] [vertical]
    Changes the position of the point of balance inside the container. The default value is 0.5 0.5.
  • padding [horizontal] [vertical]
    Sets the space between cells in pixels. The default value is 0 0.
  • min [horizontal] [vertical]
    When any of the parameters is enabled (1) it forces the minimum size of the box to be equal to the minimum size of the items. The default value is 0 0.
Table
table
{
   homogeneous: TABLE;
   padding: 0 2;
   align: 0.5 0.5;
   min: 0 0;
}

A table block can contain other objects packed in multiple columns and rows, and each item can span across more than one column and/or row.

  • homogeneous [homogeneous mode]
    Sets the homogeneous mode for the table:
    • NONE: default
    • TABLE: available space is evenly divided between children (which overflows onto other children if too little space is available)
    • ITEM: size of each item is the largest minimal size of all the items
  • align [horizontal] [vertical]
    Changes the position of the point of balance inside the container. The default value is 0.5 0.5.
  • padding [horizontal] [vertical]
    Sets the space between cells in pixels. The default value is 0 0.
  • min [horizontal] [vertical]
    When any of the parameters is enabled (1), it forces the minimum size of the table to be equal to the minimum size of the items. The default value is 0 0.
Map
map
{
   perspective: "name";
   light: "name";
   on: 1;
   smooth: 1;
   perspective_on: 1;
   backface_cull: 1;
   alpha: 1;
 
   rotation
   {
      ...
   }
}
  • perspective [another part's name]
    This sets the part that is used as the perspective point for giving a part a 3D look. The perspective point must have a perspective section that provides zplane and focal properties. The center of this part is used as the focal point, thus size, color and visibility are not relevant, just center point, zplane and focal are used. This also implicitly enables perspective transforms.
  • light [another part's name]
    This sets the part that is used as the light for calculating the brightness (based on how directly the part's surface is facing the light source point). Like the perspective point part, the center point is used and zplane is used for the z position (0 being the zero-plane where all 2D objects normally live) and positive values being further away into the distance. The light part color is used as the light color (alpha not used for light color). The color2 color is used for the ambient lighting when calculating brightness (alpha also not used).
  • on [1 or 0]
    This enables mapping for the part. Default is 0.
  • smooth [1 or 0]
    This enables smooth map rendering. This may be linear interpolation, anisotropic filtering or anything the engine decides is smooth. This is a best-effort hint and may not produce precisely the same results in all engines and situations. The default value is 1.
  • alpha [1 or 0]
    This enables alpha channel when map rendering. The default value is 1.
  • backface_cull [1 or 0]
    This enables backface culling (when the rotated part that normally faces the camera is facing away after being rotated etc.). This means that the object are hidden when backface is culled.
  • perspective_on [1 or 0]
    This enables perspective when rotating even without a perspective point object. This uses perspective set for the object itself or for the canvas as a whole as the global perspective with edje_perspective_set() and edje_perspective_global_set().
  • color [point] [red] [green] [blue] [alpha]
    This sets the color of a vertex in the map. Colors are linearly interpolated between vertex points through the map. The default color of a vertex in a map is white solid (255, 255, 255, 255) which means it has no affect on modifying the part pixels. Currently only four points are supported: 0 - Left-Top point of a part. 1 - Right-Top point of a part. 2 - Left-Bottom point of a part. 3 - Right-Bottom point of a part.

Map.rotation

rotation
{
   center: "name";
   x: 45.0;
   y: 45.0;
   z: 45.0;
}

Rotates the part, optionally with the center on another part.

  • center [another part's name]
    This sets the part that is used as the center of rotation when rotating the part with this description. The part's center point is used as the rotation center when applying rotation around the x, y and z axes. If no center is given, the parts original center itself is used for the rotation center.
  • x [X degrees]
    This sets the rotation around the x axis of the part considering the center set. The value is given in degrees.
  • y [Y degrees]
    This sets the rotation around the y axis of the part considering the center set. The value is given in degrees.
  • z [Z degrees]
    This sets the rotation around the z axis of the part considering the center set. The value is given in degrees.

Perspective

perspective
{
   zplane: 0;
   focal: 1000;
}

Adds focal and plane perspective to the part. Active if perspective_on is true. Must be provided if the part is being used by other part as it is perspective target.

  • zplane [unscaled Z value]
    This sets the z value that is not scaled. Normally this is 0 as that is the z distance.
  • focal [distance]
    This sets the distance from the focal z plane (zplane) and the camera - i.e. equating to focal length of the camera
link
{
   base: "edje,signal" "edje";
   transition: LINEAR 0.2;
   in: 0.5 0.1;
   after: "some_program";
}

The link block can be used to create transitions to the enclosing part description state. The result of the above block is identical to creating a program with

action: STATE_SET "default"";
signal: "edje,signal";
source: "edje";
  • base [signal] [source]
    Defines the signal and source which triggers the transition to this state. The source parameter is optional here and is filled with the current group's default value if it is not provided.