efl
1efl_version: 1 22;
2
3collections {
4
5styles {
6style {
7name: "entry_style";
8// This style wraps lines at word boundaries.
9// Check Evas textblock's documentation to see all the options
10base: "font="sans" font_size=10 color=#000 wrap="word" left_margin=2 right_margin=2";
11}
12}
13
14group {
15name: "example/main";
16min: 12 50;
17
18parts {
19part {
20name: "background";
21type: RECT;
22mouse_events: 0;
23description {
24state: "default" 0.0;
25// 3 pixels of margin on left and top
26rel1.offset: 3 3;
27// 3 pixels of margin on right and bottom... -1 (default) -3 = -4
28// Look at documentation about EDC parts positioning
29rel2.offset: -4 -4;
30}
31}
32
33part {
34name: "example/text";
35type: TEXTBLOCK;
36scale: 1;
37// It's mandatory to set entry_mode as editable.
38entry_mode: EDITABLE;
39select_mode: DEFAULT;
40cursor_mode: UNDER;
41mouse_events: 1;
42// It causes a textblock that is editable to allow multiple lines
43// for editing.
44multiline: 1;
45// Set groups used to be used as selection effect and
46// cursor.
47source: "example/selection";
48source4: "example/cursor";
49description {
50state: "default" 0.0;
51min: 12 50;
52// Position text relative to background, with a small margin
53rel1 {
54to: "background";
55offset: 2 2;
56}
57rel2 {
58to: "background";
59offset: -3 -3;
60}
61text {
62style: "entry_style";
63min: 0 1;
64align: 0.0 0.0;
65}
66}
67}
68}
69
70programs {
71program {
72name: "focus";
73signal: "load";
74source: "";
75action: FOCUS_SET;
76target: "example/text";
77}
78}
79}
80
81group {
82name: "example/selection";
83
84parts {
85part {
86name: "selection";
87type: RECT;
88mouse_events: 0;
89description {
90state: "default" 0.0;
91color: 180 180 180 255;
92}
93}
94}
95}
96
97group {
98name: "example/cursor";
99min: 1 0;
100
101parts {
102part {
103name: "cursor";
104type: RECT;
105mouse_events: 0;
106description {
107state: "default" 0.0;
108min: 2 12;
109color: 0 0 0 255;
110}
111description {
112state: "hidden" 0.0;
113inherit: "default" 0.0;
114color: 0 0 0 0;
115}
116}
117}
118
119// These programs are used to blink the cursor. They're
120// started by the "load" signal, emitted when the EDJ file is loaded.
121// It's a infinite loop between "default" and "hidden" states of
122// the "cursor" part.
123programs {
124program {
125name: "cursor_hide";
126signal: "load";
127source: "";
128action: STATE_SET "hidden" 0.0;
129target: "cursor";
130transition: SINUSOIDAL 0.2;
131after: "cursor_hide_timer";
132}
133program {
134name: "cursor_hide_timer";
135in: 0.2 0.0;
136after: "cursor_show";
137}
138program {
139name: "cursor_show";
140action: STATE_SET "default" 0.0;
141target: "cursor";
142after: "cursor_show_timer";
143}
144program {
145name: "cursor_show_timer";
146in: 0.5 0.0;
147after: "cursor_hide";
148}
149}
150}
151}
152