This example shows how to manipulate T\+E\+X\+T and T\+E\+X\+T\+B\+L\+O\+C\+K parts from code.

The very first we are going to do is register a callback to react to changes in the text of our parts\+:  
\begin{DoxyCodeInclude}
   edje\_object\_text\_change\_cb\_set(edje\_obj, \_on\_text\_change, NULL);

\end{DoxyCodeInclude}


 
\begin{DoxyCodeInclude}
\_on\_text\_change(\textcolor{keywordtype}{void} *data EINA\_UNUSED, \hyperlink{group__Evas__Object__Group_ga9e19e6dd1f517a0ba437c0114d3e7c97}{Evas\_Object} *obj, \textcolor{keyword}{const} \textcolor{keywordtype}{char} *part)

\end{DoxyCodeInclude}
 \begin{DoxyNote}{Note}
Since edje\+\_\+obj represent a group we\textquotesingle{}ll be notified whenever any part\textquotesingle{}s text in that group changes.
\end{DoxyNote}
We now set the text for two our two parts\+:  
\begin{DoxyCodeInclude}
   edje\_object\_part\_text\_set(edje\_obj, \textcolor{stringliteral}{"part\_two"}, \textcolor{stringliteral}{"<b>Click here"});

\end{DoxyCodeInclude}
 \begin{DoxyNote}{Note}
Since the \char`\"{}part\+\_\+two\char`\"{} part is a T\+E\+X\+T\+B\+L\+O\+C\+K we can use formatting such as $<$b$>$
\end{DoxyNote}
And we now move on to selection issues, first thing we do is make sure the user can select text\+:  
\begin{DoxyCodeInclude}
   edje\_object\_part\_text\_select\_allow\_set(edje\_obj, \textcolor{stringliteral}{"part\_two"}, \hyperlink{group__Eina__Types__Group_ga05c12dacc8b4058994df842b41be85fc}{EINA\_TRUE});

\end{DoxyCodeInclude}


We then select the entire text, and print the selected text\+:  
\begin{DoxyCodeInclude}
   printf(\textcolor{stringliteral}{"selection: %s\(\backslash\)n"}, edje\_object\_part\_text\_selection\_get(edje\_obj, \textcolor{stringliteral}{"part\_two"}));

\end{DoxyCodeInclude}


We now unselect the entire text(set selection to none), and print the selected text\+:  
\begin{DoxyCodeInclude}
   edje\_object\_part\_text\_select\_none(edje\_obj, \textcolor{stringliteral}{"part\_two"});
   printf(\textcolor{stringliteral}{"selection: %s\(\backslash\)n"}, edje\_object\_part\_text\_selection\_get(edje\_obj, \textcolor{stringliteral}{"part\_two"}));

\end{DoxyCodeInclude}


Our example will look like this\+:

  
\begin{DoxyImageNoCaption}
  \mbox{\includegraphics[width=\textwidth]{edje-text}}
\end{DoxyImageNoCaption}


The full source code follows\+: 
\begin{DoxyCodeInclude}

\textcolor{preprocessor}{#ifdef HAVE\_CONFIG\_H}
\textcolor{preprocessor}{# include "config.h"}
\textcolor{preprocessor}{#else}
\textcolor{preprocessor}{# define EINA\_UNUSED}
\textcolor{preprocessor}{#endif}

\textcolor{preprocessor}{#ifndef PACKAGE\_DATA\_DIR}
\textcolor{preprocessor}{#define PACKAGE\_DATA\_DIR "."}
\textcolor{preprocessor}{#endif}

\textcolor{preprocessor}{#include <Ecore.h>}
\textcolor{preprocessor}{#include <\hyperlink{Ecore__Evas_8h}{Ecore\_Evas.h}>}
\textcolor{preprocessor}{#include <\hyperlink{Edje_8h}{Edje.h}>}
\textcolor{preprocessor}{#include <locale.h>}
\textcolor{preprocessor}{#include "Eo.h"}

\textcolor{preprocessor}{#define WIDTH  (500)}
\textcolor{preprocessor}{#define HEIGHT (500)}

\textcolor{keyword}{static} \textcolor{keywordtype}{int} lang\_idx = 0;
\textcolor{keyword}{static} \textcolor{keyword}{const} \textcolor{keywordtype}{char} *lang[] = \{
  \textcolor{stringliteral}{"en\_IN"},
  \textcolor{stringliteral}{"ta\_IN"},
  \textcolor{stringliteral}{"hi\_IN"}
\};

\textcolor{keyword}{static} \textcolor{keywordtype}{void}
\_on\_delete(Ecore\_Evas *ee EINA\_UNUSED)
\{
   \hyperlink{group__Ecore__Main__Loop__Group_ga95cf8e97dff0716433c2c5474d606a98}{ecore\_main\_loop\_quit}();
\}

\textcolor{keyword}{static} \textcolor{keywordtype}{void}
\_on\_text\_change(\textcolor{keywordtype}{void} *data EINA\_UNUSED, \hyperlink{group__Evas__Object__Group_ga9e19e6dd1f517a0ba437c0114d3e7c97}{Evas\_Object} *obj, \textcolor{keyword}{const} \textcolor{keywordtype}{char} *part)
\{
   printf(\textcolor{stringliteral}{"text: %s\(\backslash\)n"}, edje\_object\_part\_text\_unescaped\_get(obj, part));
\}

\textcolor{keyword}{static} \textcolor{keywordtype}{void}
\_on\_mouse\_down(\textcolor{keywordtype}{void} *data EINA\_UNUSED, \hyperlink{group__Evas__Canvas_ga5ff87cc4ce6bc43e3b640a6d37f73043}{Evas} *e EINA\_UNUSED, \hyperlink{group__Evas__Object__Group_ga9e19e6dd1f517a0ba437c0114d3e7c97}{Evas\_Object} *o EINA\_UNUSED, \textcolor{keywordtype}{void}
       *event\_info EINA\_UNUSED)
\{
   \textcolor{keywordtype}{char} *env;
   lang\_idx = (lang\_idx + 1) % (\textcolor{keyword}{sizeof} (lang) / \textcolor{keyword}{sizeof} (lang[0]));
   fprintf(stderr, \textcolor{stringliteral}{"Setting lang of this edje object to '%s'\(\backslash\)n"}, lang[lang\_idx]);
   env = getenv(\textcolor{stringliteral}{"LANGUAGE"});
   \hyperlink{group__Evil__Stdlib__Group_ga1c8b16a3abcb4dc450a0a62b42c554dd}{setenv}(\textcolor{stringliteral}{"LANGUAGE"}, lang[lang\_idx], 1);
   eo\_do(o, edje\_obj\_language\_set(lang[lang\_idx]));
   \hyperlink{group__Evil__Stdlib__Group_ga1c8b16a3abcb4dc450a0a62b42c554dd}{setenv}(\textcolor{stringliteral}{"LANGUAGE"}, env, 1);
\}

\textcolor{keyword}{static} \textcolor{keywordtype}{void}
\_on\_mouse\_down\_text(\textcolor{keywordtype}{void} *data EINA\_UNUSED, \hyperlink{group__Evas__Canvas_ga5ff87cc4ce6bc43e3b640a6d37f73043}{Evas} *e EINA\_UNUSED, \hyperlink{group__Evas__Object__Group_ga9e19e6dd1f517a0ba437c0114d3e7c97}{Evas\_Object} *o EINA\_UNUSED,
       \textcolor{keywordtype}{void} *event\_info EINA\_UNUSED)
\{
   lang\_idx = (lang\_idx + 1) % (\textcolor{keyword}{sizeof} (lang)/ \textcolor{keyword}{sizeof} (lang[0]));
   fprintf(stderr, \textcolor{stringliteral}{"Setting lang to '%s'\(\backslash\)n"}, lang[lang\_idx]);
   \hyperlink{group__Evil__Stdlib__Group_ga1c8b16a3abcb4dc450a0a62b42c554dd}{setenv}(\textcolor{stringliteral}{"LANGUAGE"}, lang[lang\_idx], 1);
   \hyperlink{group__Edje__Object__Animation_gaff680b06e1e14e848f9f0028b1e521ba}{edje\_language\_set}(lang[lang\_idx]);
\}
\textcolor{keywordtype}{int}
main(\textcolor{keywordtype}{int} argc EINA\_UNUSED, \textcolor{keywordtype}{char} *argv[] EINA\_UNUSED)
\{
   \textcolor{keyword}{const} \textcolor{keywordtype}{char}  *edje\_file = PACKAGE\_DATA\_DIR\textcolor{stringliteral}{"/text.edj"};
   Ecore\_Evas  *ee;
   \hyperlink{group__Evas__Canvas_ga5ff87cc4ce6bc43e3b640a6d37f73043}{Evas}        *evas;
   \hyperlink{group__Evas__Object__Group_ga9e19e6dd1f517a0ba437c0114d3e7c97}{Evas\_Object} *bg;
   \hyperlink{group__Evas__Object__Group_ga9e19e6dd1f517a0ba437c0114d3e7c97}{Evas\_Object} *edje\_obj;
   \hyperlink{group__Evas__Object__Group_ga9e19e6dd1f517a0ba437c0114d3e7c97}{Evas\_Object} *edje\_obj\_one;
   \hyperlink{group__Evas__Object__Group_ga9e19e6dd1f517a0ba437c0114d3e7c97}{Evas\_Object} *edje\_obj\_two;
   \hyperlink{group__Evas__Object__Group_ga9e19e6dd1f517a0ba437c0114d3e7c97}{Evas\_Object} *edje\_obj\_three;

   \textcolor{keywordflow}{if} (!\hyperlink{group__Ecore__Evas__Group_ga32ddbb6457033ad435a177eb0c4fe235}{ecore\_evas\_init}())
     \textcolor{keywordflow}{return} EXIT\_FAILURE;

   \textcolor{keywordflow}{if} (!\hyperlink{group__Edje__General__Group_ga1c9c6594f38023c29fbfb2d0c8c675db}{edje\_init}())
     \textcolor{keywordflow}{goto} shutdown\_ecore\_evas;

   \textcolor{comment}{/* this will give you a window with an Evas canvas under the first}
\textcolor{comment}{    * engine available */}
   ee = \hyperlink{group__Ecore__Evas__Group_gac7f2cdbcb79635c34317c1183dd04cb0}{ecore\_evas\_new}(NULL, 0, 0, WIDTH, HEIGHT, NULL);
   \textcolor{keywordflow}{if} (!ee) \textcolor{keywordflow}{goto} shutdown\_edje;

   \hyperlink{group__Ecore__Evas__Group_ga3d478e975e2101b9b821ef24baf3dd9e}{ecore\_evas\_callback\_delete\_request\_set}(ee, \_on\_delete);
   \hyperlink{group__Ecore__Evas__Group_ga3b2832e0373bbafae2bb7143618535c1}{ecore\_evas\_title\_set}(ee, \textcolor{stringliteral}{"Edje text Example"});

   evas = \hyperlink{group__Ecore__Evas__Group_ga75a7cc694b6069e78df47dab0b0f2d20}{ecore\_evas\_get}(ee);

   bg = \hyperlink{group__Evas__Object__Rectangle_ga4d80fc32ad1cac28428cebd65d746751}{evas\_object\_rectangle\_add}(evas);
   \hyperlink{group__Evas__Object__Group__Basic_gae34bdcfd7f5100151f6ea8ef4a392949}{evas\_object\_color\_set}(bg, 255, 255, 255, 255); \textcolor{comment}{/* white bg */}
   \hyperlink{group__Evas__Font__Group_ga02da8091bbac768b8e86c7b74b2a94f9}{evas\_object\_move}(bg, 0, 0); \textcolor{comment}{/* at canvas' origin */}
   \hyperlink{group__Evas__Font__Group_ga21e8604c0e4a93e469bff4bd069e82b5}{evas\_object\_resize}(bg, WIDTH, HEIGHT); \textcolor{comment}{/* covers full canvas */}
   \hyperlink{group__Evas__Object__Group__Basic_ga9cbc13661584e49fb9d9cdab514a1eeb}{evas\_object\_show}(bg);
   \hyperlink{group__Ecore__Evas__Group_gac35627a5c3a766ee42762dbcc9eb733d}{ecore\_evas\_object\_associate}(ee, bg, ECORE\_EVAS\_OBJECT\_ASSOCIATE\_BASE);

   edje\_obj = edje\_object\_add(evas);
   edje\_object\_file\_set(edje\_obj, edje\_file, \textcolor{stringliteral}{"example\_group"});
   \hyperlink{group__Evas__Font__Group_ga02da8091bbac768b8e86c7b74b2a94f9}{evas\_object\_move}(edje\_obj, 0, 20);
   \hyperlink{group__Evas__Font__Group_ga21e8604c0e4a93e469bff4bd069e82b5}{evas\_object\_resize}(edje\_obj, WIDTH - 40, HEIGHT - 40);
   \hyperlink{group__Evas__Object__Group__Basic_ga9cbc13661584e49fb9d9cdab514a1eeb}{evas\_object\_show}(edje\_obj);
   \hyperlink{group__Evil__Stdlib__Group_ga1c8b16a3abcb4dc450a0a62b42c554dd}{setenv}(\textcolor{stringliteral}{"LANGUAGE"}, \textcolor{stringliteral}{"en\_IN"}, 1);
   eo\_do(edje\_obj, edje\_obj\_language\_set(\textcolor{stringliteral}{"en\_IN"}));
   edje\_object\_text\_change\_cb\_set(edje\_obj, \_on\_text\_change, NULL);
   edje\_object\_part\_text\_set(edje\_obj, \textcolor{stringliteral}{"part\_two"}, \textcolor{stringliteral}{"<b>Click here"});
   edje\_object\_part\_text\_select\_allow\_set(edje\_obj, \textcolor{stringliteral}{"part\_two"}, \hyperlink{group__Eina__Types__Group_ga05c12dacc8b4058994df842b41be85fc}{EINA\_TRUE});
   edje\_object\_part\_text\_select\_all(edje\_obj, \textcolor{stringliteral}{"part\_two"});
   printf(\textcolor{stringliteral}{"selection: %s\(\backslash\)n"}, edje\_object\_part\_text\_selection\_get(edje\_obj, \textcolor{stringliteral}{"part\_two"}));
   edje\_object\_part\_text\_select\_none(edje\_obj, \textcolor{stringliteral}{"part\_two"});
   printf(\textcolor{stringliteral}{"selection: %s\(\backslash\)n"}, edje\_object\_part\_text\_selection\_get(edje\_obj, \textcolor{stringliteral}{"part\_two"}));
   \hyperlink{group__Evas__Object__Group__Events_ga23be30ac5cdfb780f1ff82e9108ec26b}{evas\_object\_event\_callback\_add}(edje\_obj, 
      \hyperlink{group__Evas_ggad64cde0da38a60e7cb7905b3ab216968a9fa52651ccf7e47cd3b7785fc4cf393f}{EVAS\_CALLBACK\_MOUSE\_DOWN}, \_on\_mouse\_down, NULL);

   edje\_obj\_one = edje\_object\_add(evas);
   edje\_object\_file\_set(edje\_obj\_one, edje\_file, \textcolor{stringliteral}{"example\_group1"});
   \hyperlink{group__Evas__Font__Group_ga02da8091bbac768b8e86c7b74b2a94f9}{evas\_object\_move}(edje\_obj\_one, 0, 50);
   \hyperlink{group__Evas__Font__Group_ga21e8604c0e4a93e469bff4bd069e82b5}{evas\_object\_resize}(edje\_obj\_one, WIDTH - 40, HEIGHT - 40);
   \hyperlink{group__Evas__Object__Group__Basic_ga9cbc13661584e49fb9d9cdab514a1eeb}{evas\_object\_show}(edje\_obj\_one);
   eo\_do(edje\_obj\_one, edje\_obj\_language\_set(\textcolor{stringliteral}{"en\_IN"}));
   edje\_object\_text\_change\_cb\_set(edje\_obj\_one, \_on\_text\_change, NULL);
   edje\_object\_part\_text\_set(edje\_obj\_one, \textcolor{stringliteral}{"part\_two"}, \textcolor{stringliteral}{"<b>Click here"});
   edje\_object\_part\_text\_select\_allow\_set(edje\_obj\_one, \textcolor{stringliteral}{"part\_two"}, \hyperlink{group__Eina__Types__Group_ga05c12dacc8b4058994df842b41be85fc}{EINA\_TRUE});
   edje\_object\_part\_text\_select\_all(edje\_obj\_one, \textcolor{stringliteral}{"part\_two"});
   printf(\textcolor{stringliteral}{"selection: %s\(\backslash\)n"}, edje\_object\_part\_text\_selection\_get(edje\_obj\_one, \textcolor{stringliteral}{"part\_two"}));
   edje\_object\_part\_text\_select\_none(edje\_obj\_one, \textcolor{stringliteral}{"part\_two"});
   printf(\textcolor{stringliteral}{"selection: %s\(\backslash\)n"}, edje\_object\_part\_text\_selection\_get(edje\_obj\_one, \textcolor{stringliteral}{"part\_two"}));
   \hyperlink{group__Evas__Object__Group__Events_ga23be30ac5cdfb780f1ff82e9108ec26b}{evas\_object\_event\_callback\_add}(edje\_obj\_one, 
      \hyperlink{group__Evas_ggad64cde0da38a60e7cb7905b3ab216968a9fa52651ccf7e47cd3b7785fc4cf393f}{EVAS\_CALLBACK\_MOUSE\_DOWN}, \_on\_mouse\_down, NULL);

   \textcolor{comment}{//Generic Language change}
   edje\_obj\_two = edje\_object\_add(evas);
   edje\_object\_file\_set(edje\_obj\_two, edje\_file, \textcolor{stringliteral}{"example\_group2"});
   \hyperlink{group__Evas__Font__Group_ga02da8091bbac768b8e86c7b74b2a94f9}{evas\_object\_move}(edje\_obj\_two, 0, 250);
   \hyperlink{group__Evas__Font__Group_ga21e8604c0e4a93e469bff4bd069e82b5}{evas\_object\_resize}(edje\_obj\_two, WIDTH - 40, HEIGHT - 40);
   \hyperlink{group__Evas__Object__Group__Basic_ga9cbc13661584e49fb9d9cdab514a1eeb}{evas\_object\_show}(edje\_obj\_two);
   \hyperlink{group__Edje__Object__Animation_gaff680b06e1e14e848f9f0028b1e521ba}{edje\_language\_set}(\textcolor{stringliteral}{"en\_IN"});
   edje\_object\_text\_change\_cb\_set(edje\_obj\_two, \_on\_text\_change, NULL);
   edje\_object\_part\_text\_set(edje\_obj\_two, \textcolor{stringliteral}{"part\_two"}, \textcolor{stringliteral}{"<b>Click here"});
   edje\_object\_part\_text\_select\_allow\_set(edje\_obj\_two, \textcolor{stringliteral}{"part\_two"}, \hyperlink{group__Eina__Types__Group_ga05c12dacc8b4058994df842b41be85fc}{EINA\_TRUE});
   edje\_object\_part\_text\_select\_all(edje\_obj\_two, \textcolor{stringliteral}{"part\_two"});
   printf(\textcolor{stringliteral}{"selection: %s\(\backslash\)n"}, edje\_object\_part\_text\_selection\_get(edje\_obj\_two, \textcolor{stringliteral}{"part\_two"}));
   edje\_object\_part\_text\_select\_none(edje\_obj\_two, \textcolor{stringliteral}{"part\_two"});
   printf(\textcolor{stringliteral}{"selection: %s\(\backslash\)n"}, edje\_object\_part\_text\_selection\_get(edje\_obj\_two, \textcolor{stringliteral}{"part\_two"}));
   \hyperlink{group__Evas__Object__Group__Events_ga23be30ac5cdfb780f1ff82e9108ec26b}{evas\_object\_event\_callback\_add}(edje\_obj\_two, 
      \hyperlink{group__Evas_ggad64cde0da38a60e7cb7905b3ab216968a9fa52651ccf7e47cd3b7785fc4cf393f}{EVAS\_CALLBACK\_MOUSE\_DOWN}, \_on\_mouse\_down\_text, NULL);

   edje\_obj\_three = edje\_object\_add(evas);
   edje\_object\_file\_set(edje\_obj\_three, edje\_file, \textcolor{stringliteral}{"example\_group3"});
   \hyperlink{group__Evas__Font__Group_ga02da8091bbac768b8e86c7b74b2a94f9}{evas\_object\_move}(edje\_obj\_three, 0, 350);
   \hyperlink{group__Evas__Font__Group_ga21e8604c0e4a93e469bff4bd069e82b5}{evas\_object\_resize}(edje\_obj\_three, WIDTH - 40, HEIGHT - 40);
   \hyperlink{group__Evas__Object__Group__Basic_ga9cbc13661584e49fb9d9cdab514a1eeb}{evas\_object\_show}(edje\_obj\_three);
   edje\_object\_text\_change\_cb\_set(edje\_obj\_three, \_on\_text\_change, NULL);
   edje\_object\_part\_text\_set(edje\_obj\_three, \textcolor{stringliteral}{"part\_two"}, \textcolor{stringliteral}{"<b>Click here"});
   edje\_object\_part\_text\_select\_allow\_set(edje\_obj\_three, \textcolor{stringliteral}{"part\_two"}, \hyperlink{group__Eina__Types__Group_ga05c12dacc8b4058994df842b41be85fc}{EINA\_TRUE});
   edje\_object\_part\_text\_select\_all(edje\_obj\_three, \textcolor{stringliteral}{"part\_two"});
   printf(\textcolor{stringliteral}{"selection: %s\(\backslash\)n"}, edje\_object\_part\_text\_selection\_get(edje\_obj\_three, \textcolor{stringliteral}{"part\_two"}));
   edje\_object\_part\_text\_select\_none(edje\_obj\_three, \textcolor{stringliteral}{"part\_two"});
   printf(\textcolor{stringliteral}{"selection: %s\(\backslash\)n"}, edje\_object\_part\_text\_selection\_get(edje\_obj\_three, \textcolor{stringliteral}{"part\_two"}));
   \hyperlink{group__Evas__Object__Group__Events_ga23be30ac5cdfb780f1ff82e9108ec26b}{evas\_object\_event\_callback\_add}(edje\_obj\_three, 
      \hyperlink{group__Evas_ggad64cde0da38a60e7cb7905b3ab216968a9fa52651ccf7e47cd3b7785fc4cf393f}{EVAS\_CALLBACK\_MOUSE\_DOWN}, \_on\_mouse\_down\_text, NULL);

   \hyperlink{group__Ecore__Evas__Group_ga4953047ff97d4f1b0d75a7d513d4f317}{ecore\_evas\_show}(ee);

   \hyperlink{group__Ecore__Main__Loop__Group_gaf103b9f668bb3e4fed12e52c6180132d}{ecore\_main\_loop\_begin}();

   \hyperlink{group__Ecore__Evas__Group_gad3ec61f2aa03df4d3dbfd0d311e0c8dc}{ecore\_evas\_free}(ee);
   \hyperlink{group__Ecore__Evas__Group_gab8fa311077f749190c9b622f672b2214}{ecore\_evas\_shutdown}();
   \hyperlink{group__Edje__General__Group_ga01041f6702f2d81bf10c3e41899805cb}{edje\_shutdown}();

   \textcolor{keywordflow}{return} EXIT\_SUCCESS;

 shutdown\_edje:
   \hyperlink{group__Edje__General__Group_ga01041f6702f2d81bf10c3e41899805cb}{edje\_shutdown}();
 shutdown\_ecore\_evas:
   \hyperlink{group__Ecore__Evas__Group_gab8fa311077f749190c9b622f672b2214}{ecore\_evas\_shutdown}();

   \textcolor{keywordflow}{return} EXIT\_FAILURE;
\}
\end{DoxyCodeInclude}


The theme used in this example is\+: 
\begin{DoxyCodeInclude}
1 collections \{
2    group \{
3       name: "sel\_group";
4       parts \{
5          part \{
6             name: "rect";
7             type: RECT;
8             description \{
9                state: "default" 0.0;
10                color: 0 255 0 255; /* green */
11                rel1.relative: 0.0 0.0;
12                rel2.relative: 1.0 1.0;
13             \}
14          \}
15       \}
16    \}
17    group \{
18       name: "example\_group";
19       max: 500 500;
20       min: 50 50;
21       translation \{
22          file \{
23             locale: en\_IN;
24             source: domain\_name.po; /* Can be either .po file or .mo file*/
25          \}
26          file \{
27             locale: hi\_IN;
28             source: domain\_name.po;
29          \}
30          file \{
31             locale: ta\_IN;
32             source: domain\_name.po;
33          \}
34       \}
35       styles \{
36          style \{
37             name: "textblock\_style\_en";
38             base: "font=Sans font\_size=22 color=#f00 wrap=word";
39             tag:  "br" "\(\backslash\)n";
40             tag:  "hilight" "+ font\_weight=Bold";
41             tag:  "b" "+ font\_weight=Bold";
42             tag:  "tab" "\(\backslash\)t";
43          \}
44          style \{
45             name: "textblock\_style\_ta";
46             base: "font=Sans font\_size=22 color=#000 wrap=word";
47             tag:  "br" "\(\backslash\)n";
48             tag:  "hilight" "+ font\_weight=Bold";
49             tag:  "b" "+ font\_weight=Bold";
50             tag:  "tab" "\(\backslash\)t";
51          \}
52          style \{
53             name: "textblock\_style\_hi";
54             base: "font=Sans font\_size=22 color=#00f wrap=word";
55             tag:  "br" "\(\backslash\)n";
56             tag:  "hilight" "+ font\_weight=Bold";
57             tag:  "b" "+ font\_weight=Bold";
58             tag:  "tab" "\(\backslash\)t";
59          \}
60       \}
61       parts \{
62          part \{
63             name: "part\_one";
64             type: TEXT;
65             description \{
66                min: 50 50;
67                state: "default" 0.0;
68                color: 0 0 255 255; /* blue */
69                rel1.relative: 0.5 0.0;
70                rel2.relative: 0.5 0.0;
71                text \{
72                   text : "LOADING";
73                   domain: "domain\_name";
74                   font: "arial";
75                   size: 22;
76                   min: 1 1;
77                   ellipsis: -1;
78                \}
79             \}
80          \}
81          part \{
82             name: "part\_two";
83             type: TEXTBLOCK;
84             select\_mode: EXPLICIT;
85             source: "sel\_group";
86             entry\_mode: PLAIN;
87             description \{
88                min: 50 50;
89                state: "default" 0.0;
90                rel1.relative: 0.0 0.25;
91                rel2.relative: 0.5 0.0;
92                text \{
93                   style: "textblock\_style\_en";
94                   min: 1 1;
95                   ellipsis: -1;
96                \}
97             \}
98             description \{
99                inherit: "default" 0.0;
100                state: "one" 0.0;
101                text \{
102                style: "textblock\_style\_hi";
103                min: 1 1;
104                \}
105            \}
106            description \{
107                inherit: "default" 0.0;
108                state: "two" 0.0;
109                text \{
110                   style: "textblock\_style\_ta";
111                   min: 1 1;
112                \}
113             \}
114          \}
115       \}
116       programs \{
117          program \{
118             signal: "edje,language,hi\_IN";
119             source: "edje";
120             script \{
121                set\_state(PART:"part\_two", "one", 1.0);
122             \}
123          \}
124          program \{
125             signal: "edje,language,ta\_IN";
126             source: "edje";
127             script \{
128                set\_state(PART:"part\_two", "two", 1.0);
129             \}
130          \}
131          program \{
132             signal: "edje,language,en\_IN";
133             source: "edje";
134             script \{
135                set\_state(PART:"part\_two", "default", 1.0);
136             \}
137          \}
138       \}
139    \}
140    group \{
141       name: "example\_group1";
142       max: 500 500;
143       min: 50 50;
144       translation \{
145          file \{
146             locale: en\_IN;
147             source: domain\_name.po;
148          \}
149          file \{
150             locale: hi\_IN;
151             source: domain\_name.po;
152          \}
153          file \{
154             locale: ta\_IN;
155             source: domain\_name.mo;
156          \}
157       \}
158       styles \{
159          style \{
160             name: "textblock\_style\_en1";
161             base: "font=Sans font\_size=22 color=#f00 wrap=word";
162             tag:  "br" "\(\backslash\)n";
163             tag:  "hilight" "+ font\_weight=Bold";
164             tag:  "b" "+ font\_weight=Bold";
165             tag:  "tab" "\(\backslash\)t";
166          \}
167          style \{
168             name: "textblock\_style\_ta1";
169             base: "font=Sans font\_size=22 color=#000 wrap=word";
170             tag:  "br" "\(\backslash\)n";
171             tag:  "hilight" "+ font\_weight=Bold";
172             tag:  "b" "+ font\_weight=Bold";
173             tag:  "tab" "\(\backslash\)t";
174          \}
175          style \{
176             name: "textblock\_style\_hi1";
177             base: "font=Sans font\_size=22 color=#00f wrap=word";
178             tag:  "br" "\(\backslash\)n";
179             tag:  "hilight" "+ font\_weight=Bold";
180             tag:  "b" "+ font\_weight=Bold";
181             tag:  "tab" "\(\backslash\)t";
182          \}
183       \}
184       parts \{
185          part \{
186             name: "part\_one";
187             type: TEXT;
188             description \{
189                min: 50 50;
190                state: "default" 0.0;
191                color: 0 0 255 255; /* blue */
192                rel1.relative: 0.5 0.25;
193                rel2.relative: 0.5 0.0;
194                text \{
195                   text : "LANG";
196                   domain: "domain\_name";
197                   font: "arial";
198                   size: 22;
199                   min: 1 1;
200                   ellipsis: -1;
201                \}
202             \}
203          \}
204          part \{
205             name: "part\_two";
206             type: TEXTBLOCK;
207             select\_mode: EXPLICIT;
208             source: "sel\_group";
209             entry\_mode: PLAIN;
210             description \{
211                min: 50 50;
212                state: "default" 0.0;
213                rel1.relative: 0.0 0.5;
214                rel2.relative: 1.0 0.0;
215                text \{
216                   style: "textblock\_style\_en1";
217                   min: 1 1;
218                   ellipsis: -1;
219                \}
220             \}
221             description \{
222                inherit: "default" 0.0;
223                state: "one" 0.0;
224                text \{
225                   style: "textblock\_style\_hi1";
226                   min: 1 1;
227                \}
228             \}
229             description \{
230                inherit: "default" 0.0;
231                state: "two" 0.0;
232                text \{
233                   style: "textblock\_style\_ta1";
234                   min: 1 1;
235                \}
236             \}
237          \}
238       \}
239       programs \{
240          program \{
241             signal: "edje,language,hi\_IN";
242             source: "edje";
243             script \{
244                set\_state(PART:"part\_two", "one", 1.0);
245             \}
246          \}
247          program \{
248             signal: "edje,language,ta\_IN";
249             source: "edje";
250             script \{
251                set\_state(PART:"part\_two", "two", 1.0);
252             \}
253          \}
254          program \{
255             signal: "edje,language,en\_IN";
256             source: "edje";
257             script \{
258                set\_state(PART:"part\_two", "default", 1.0);
259             \}
260          \}
261       \}
262    \}
263    group \{
264       name: "example\_group2";
265       max: 500 500;
266       min: 50 50;
267       translation \{
268          file \{
269             locale: en\_IN;
270             source: domain\_name.po;
271          \}
272          file \{
273             locale: hi\_IN;
274             source: domain\_name.po;
275          \}
276          file \{
277             locale: ta\_IN;
278             source: domain\_name.mo;
279          \}
280       \}
281       styles \{
282          style \{
283             name: "textblock\_style\_en2";
284             base: "font=Sans font\_size=22 color=#f00 wrap=word";
285             tag:  "br" "\(\backslash\)n";
286             tag:  "hilight" "+ font\_weight=Bold";
287             tag:  "b" "+ font\_weight=Bold";
288             tag:  "tab" "\(\backslash\)t";
289          \}
290          style \{
291             name: "textblock\_style\_ta2";
292             base: "font=Sans font\_size=22 color=#000 wrap=word";
293             tag:  "br" "\(\backslash\)n";
294             tag:  "hilight" "+ font\_weight=Bold";
295             tag:  "b" "+ font\_weight=Bold";
296             tag:  "tab" "\(\backslash\)t";
297          \}
298          style \{
299             name: "textblock\_style\_hi2";
300             base: "font=Sans font\_size=22 color=#00f wrap=word";
301             tag:  "br" "\(\backslash\)n";
302             tag:  "hilight" "+ font\_weight=Bold";
303             tag:  "b" "+ font\_weight=Bold";
304             tag:  "tab" "\(\backslash\)t";
305          \}
306       \}
307       parts \{
308          part \{
309             name: "part\_one";
310             type: TEXT;
311             description \{
312                min: 50 50;
313                state: "default" 0.0;
314                color: 0 0 255 255; /* blue */
315                rel1.relative: 0.5 0.25;
316                rel2.relative: 0.5 0.0;
317                text \{
318                   text : "SYSTEM LANGUAGE";
319                   domain: "domain\_name";
320                   font: "arial";
321                   size: 22;
322                   min: 1 1;
323                   ellipsis: -1;
324                \}
325             \}
326          \}
327          part \{
328             name: "part\_two";
329             type: TEXTBLOCK;
330             select\_mode: EXPLICIT;
331             source: "sel\_group";
332             entry\_mode: PLAIN;
333             description \{
334                min: 50 50;
335                state: "default" 0.0;
336                rel1.relative: 0.0 0.5;
337                rel2.relative: 1.0 0.0;
338                text \{
339                   style: "textblock\_style\_en2";
340                   min: 1 1;
341                   ellipsis: -1;
342                \}
343             \}
344             description \{
345                inherit: "default" 0.0;
346                state: "one" 0.0;
347                text \{   
348                   style: "textblock\_style\_hi2";
349                   min: 1 1;
350                \}
351             \}
352             description \{
353                inherit: "default" 0.0;
354                state: "two" 0.0;
355                text \{
356                   style: "textblock\_style\_ta2";
357                   min: 1 1;
358                \}
359             \}
360          \}
361       \}
362       programs \{
363          program \{
364             signal: "edje,language,hi\_IN";
365             source: "edje";
366             script \{
367                set\_state(PART:"part\_two", "one", 1.0);
368             \}
369          \}
370          program \{
371             signal: "edje,language,ta\_IN";
372             source: "edje";
373             script \{
374                set\_state(PART:"part\_two", "two", 1.0);
375             \}
376          \}
377          program \{
378             signal: "edje,language,en\_IN";
379             source: "edje";
380             script \{
381                set\_state(PART:"part\_two", "default", 1.0);
382             \}
383          \}
384       \}
385    \}
386    group \{
387       name: "example\_group3";
388       max: 500 500;
389       min: 50 50;
390       translation \{
391          file \{
392             locale: en\_IN;
393             source: domain\_name.po;
394          \}
395          file \{
396             locale: hi\_IN;
397             source: domain\_name.po;
398          \}
399          file \{
400             locale: ta\_IN;
401             source: domain\_name.mo;
402          \}
403       \}
404       styles \{
405          style \{
406             name: "textblock\_style\_en3";
407             base: "font=Sans font\_size=22 color=#f00 wrap=word";
408             tag:  "br" "\(\backslash\)n";
409             tag:  "hilight" "+ font\_weight=Bold";
410             tag:  "b" "+ font\_weight=Bold";
411             tag:  "tab" "\(\backslash\)t";
412          \}
413          style \{
414             name: "textblock\_style\_ta3";
415             base: "font=Sans font\_size=22 color=#000 wrap=word";
416             tag:  "br" "\(\backslash\)n";
417             tag:  "hilight" "+ font\_weight=Bold";
418             tag:  "b" "+ font\_weight=Bold";
419             tag:  "tab" "\(\backslash\)t";
420          \}
421          style \{
422             name: "textblock\_style\_hi3";
423             base: "font=Sans font\_size=22 color=#00f wrap=word";
424             tag:  "br" "\(\backslash\)n";
425             tag:  "hilight" "+ font\_weight=Bold";
426             tag:  "b" "+ font\_weight=Bold";
427             tag:  "tab" "\(\backslash\)t";
428          \}
429       \}
430       parts \{
431          part \{
432             name: "part\_one";
433             type: TEXT;
434             description \{
435                min: 50 50;
436                state: "default" 0.0;
437                color: 0 0 255 255; /* blue */
438                rel1.relative: 0.5 0.25;
439                rel2.relative: 0.5 0.0;
440                text \{
441                   text : "CHANGED";
442                   domain: "domain\_name";
443                   font: "arial";
444                   size: 22;
445                   min: 1 1;
446                   ellipsis: -1;
447                \}
448             \}
449          \}
450          part \{
451             name: "part\_two";
452             type: TEXTBLOCK;
453             select\_mode: EXPLICIT;
454             source: "sel\_group";
455             entry\_mode: PLAIN;
456             description \{
457                min: 50 50;
458                state: "default" 0.0;
459                rel1.relative: 0.0 0.5;
460                rel2.relative: 1.0 0.0;
461                text \{
462                   style: "textblock\_style\_en3";
463                   min: 1 1;
464                   ellipsis: -1;
465                \}
466             \}
467             description \{
468                inherit: "default" 0.0;
469                state: "one" 0.0;
470                text \{
471                   style: "textblock\_style\_hi3";
472                   min: 1 1;
473                \}
474             \}
475             description \{
476                inherit: "default" 0.0;
477                state: "two" 0.0;
478                text \{
479                   style: "textblock\_style\_ta3";
480                   min: 1 1;
481                \}
482             \}
483          \}
484       \}
485       programs \{
486          program \{
487             signal: "edje,language,hi\_IN";
488             source: "edje";
489             script \{
490                set\_state(PART:"part\_two", "one", 1.0);
491             \}
492          \}
493          program \{
494             signal: "edje,language,ta\_IN";
495             source: "edje";
496             script \{
497                set\_state(PART:"part\_two", "two", 1.0);
498             \}
499          \}
500          program \{
501             signal: "edje,language,en\_IN";
502             source: "edje";
503             script \{
504                set\_state(PART:"part\_two", "default", 1.0);
505             \}
506          \}
507       \}
508    \}
509 \}
\end{DoxyCodeInclude}


To compile use this command\+: \begin{DoxyVerb}* gcc -o edje-text edje-text.c -DPACKAGE_BIN_DIR=\"/Where/enlightenment/is/installed/bin\" -DPACKAGE_LIB_DIR=\"/Where/enlightenment/is/installed/lib\"
* -DPACKAGE_DATA_DIR=\"/Where/enlightenment/is/installed/share\"
* `pkg-config --cflags --libs evas ecore ecore-evas edje`
*
* edje_cc text.edc
* \end{DoxyVerb}
 