efl

Форк
0
/
entry.edc 
151 строка · 3.9 Кб
1
efl_version: 1 22;
2

3
collections {
4

5
   styles {
6
      style {
7
         name: "entry_style";
8
         // This style wraps lines at word boundaries.
9
         // Check Evas textblock's documentation to see all the options
10
         base: "font="sans" font_size=10 color=#000 wrap="word" left_margin=2 right_margin=2";
11
      }
12
   }
13

14
   group {
15
      name: "example/main";
16
      min: 12 50;
17

18
      parts {
19
         part {
20
            name: "background";
21
            type: RECT;
22
            mouse_events: 0;
23
            description {
24
               state: "default" 0.0;
25
               // 3 pixels of margin on left and top
26
               rel1.offset: 3 3;
27
               // 3 pixels of margin on right and bottom... -1 (default) -3 = -4
28
               // Look at documentation about EDC parts positioning
29
               rel2.offset: -4 -4;
30
            }
31
         }
32

33
         part {
34
            name: "example/text";
35
            type: TEXTBLOCK;
36
            scale: 1;
37
            // It's mandatory to set entry_mode as editable.
38
            entry_mode: EDITABLE;
39
            select_mode: DEFAULT;
40
            cursor_mode: UNDER;
41
            mouse_events: 1;
42
            // It causes a textblock that is editable to allow multiple lines
43
            // for editing.
44
            multiline: 1;
45
            // Set groups used to be used as selection effect and
46
            // cursor.
47
            source: "example/selection";
48
            source4: "example/cursor";
49
            description {
50
               state: "default" 0.0;
51
               min: 12 50;
52
               // Position text relative to background, with a small margin
53
               rel1 {
54
                  to: "background";
55
                  offset: 2 2;
56
               }
57
               rel2 {
58
                  to: "background";
59
                  offset: -3 -3;
60
               }
61
               text {
62
                  style: "entry_style";
63
                  min: 0 1;
64
                  align: 0.0 0.0;
65
               }
66
            }
67
         }
68
      }
69

70
      programs {
71
         program {
72
            name: "focus";
73
            signal: "load";
74
            source: "";
75
            action: FOCUS_SET;
76
            target: "example/text";
77
         }
78
      }
79
   }
80

81
   group {
82
      name: "example/selection";
83

84
      parts {
85
         part {
86
            name: "selection";
87
            type: RECT;
88
            mouse_events: 0;
89
            description {
90
               state: "default" 0.0;
91
               color: 180 180 180 255;
92
            }
93
         }
94
      }
95
   }
96

97
   group {
98
      name: "example/cursor";
99
      min: 1 0;
100

101
      parts {
102
         part {
103
            name: "cursor";
104
            type: RECT;
105
            mouse_events: 0;
106
            description {
107
               state: "default" 0.0;
108
               min: 2 12;
109
               color: 0 0 0 255;
110
            }
111
            description {
112
               state: "hidden" 0.0;
113
               inherit: "default" 0.0;
114
               color: 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.
123
      programs {
124
         program {
125
            name: "cursor_hide";
126
            signal: "load";
127
            source: "";
128
            action: STATE_SET "hidden" 0.0;
129
            target: "cursor";
130
            transition: SINUSOIDAL 0.2;
131
            after: "cursor_hide_timer";
132
         }
133
         program {
134
            name: "cursor_hide_timer";
135
            in: 0.2 0.0;
136
            after: "cursor_show";
137
         }
138
         program {
139
            name: "cursor_show";
140
            action: STATE_SET "default" 0.0;
141
            target: "cursor";
142
            after: "cursor_show_timer";
143
         }
144
         program {
145
            name: "cursor_show_timer";
146
            in: 0.5 0.0;
147
            after: "cursor_hide";
148
         }
149
      }
150
   }
151
}
152

Использование cookies

Мы используем файлы cookie в соответствии с Политикой конфиденциальности и Политикой использования cookies.

Нажимая кнопку «Принимаю», Вы даете АО «СберТех» согласие на обработку Ваших персональных данных в целях совершенствования нашего веб-сайта и Сервиса GitVerse, а также повышения удобства их использования.

Запретить использование cookies Вы можете самостоятельно в настройках Вашего браузера.