summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAli Alzyod <ali198724@gmail.com>2019-12-02 10:41:35 +0100
committerXavi Artigas <xavierartigas@yahoo.es>2019-12-02 18:07:19 +0100
commit5978d79858c89b75860cbd6cee324b54f213a259 (patch)
treef83b9168c4183b5df3e5dfd11321aa30a9a96069
parent05f68d98fb41421b0b50297916e8bbe74e9d5fd0 (diff)
efl_canvas_text: documentation for style set
Summary: Depends on D10607 Original Material: https://www.enlightenment.org/_legacy_embed/evas_textblock_style_page.html Reviewers: woohyun, segfaultxavi, AbdullehGhujeh Reviewed By: segfaultxavi Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D10729
-rw-r--r--src/lib/evas/canvas/efl_canvas_text.eo320
1 files changed, 317 insertions, 3 deletions
diff --git a/src/lib/evas/canvas/efl_canvas_text.eo b/src/lib/evas/canvas/efl_canvas_text.eo
index e242c78..25153c2 100644
--- a/src/lib/evas/canvas/efl_canvas_text.eo
+++ b/src/lib/evas/canvas/efl_canvas_text.eo
@@ -83,10 +83,324 @@ class @beta Efl.Canvas.Text extends Efl.Canvas.Object implements Efl.Text,
83 [[Applies a style to the text object. Applied style attributes override old ones, leaving other attributes 83 [[Applies a style to the text object. Applied style attributes override old ones, leaving other attributes
84 unaffected. 84 unaffected.
85 This is similar to setting individual style attributes using properties like @Efl.Text_Font.font_slant or 85 This is similar to setting individual style attributes using properties like @Efl.Text_Font.font_slant or
86 @Efl.Text_Format.wrap.]] 86 @Efl.Text_Format.wrap.
87
88 The style can be set as "attribute"="Value".
89 Multible attribute can be set at once separated by space.
90
91 The following styling attributes are accepted:
92
93 - Font
94 - Font fallback
95 - Font size
96 - Font source
97 - Font weight
98 - Font style
99 - Font width
100 - Language
101 - Color
102 - Underline Color
103 - Second Underline Color
104 - Underline Dash Color
105 - Outline Color
106 - Shadow Color
107 - First Glow Color
108 - Second Glow Color
109 - Backing Color
110 - Strikethrough Color
111 - Horizontal Align
112 - Vertical Align
113 - Wrap
114 - Left margin
115 - Right margin
116 - Underline
117 - Strikethrough
118 - Backing
119 - Style
120 - Tabstops
121 - Line size
122 - Relative line size
123 - Line gap
124 - Relative line gap
125 - Item
126 - Line fill
127 - Ellipsis
128 - Password
129 - Underline dash width
130 - Underline dash gap
131 - Underline height
132
133 Font
134 This sets the name of the font to be used.
135 font=<font name>
136
137 Font fallback
138 A comma delimited list of fonts to try if finding the primary font fails.
139 font_fallbacks=<font names>
140
141 Font size
142 This sets the the size of font in points to be used.
143 font_size=<size>
144
145 Font source
146 Specify source from which to search for the font.
147 font_source=<source>
148
149 Font weight
150 Sets the weight of the font. The value must be one of:
151 "normal"
152 "thin"
153 "ultralight"
154 "extralight"
155 "light"
156 "book"
157 "medium"
158 "semibold"
159 "bold"
160 "ultrabold"
161 "extrabold"
162 "black"
163 "extrablack"
164 font_weight=<weight>
165
166 Font style
167 Sets the style of the font. The value must be one of:
168 "normal"
169 "oblique"
170 "italic"
171 font_style=<style>
172
173 Font width
174 Sets the width of the font. The value must be one of:
175 "normal"
176 "ultracondensed"
177 "extracondensed"
178 "condensed"
179 "semicondensed"
180 "semiexpanded"
181 "expanded"
182 "extraexpanded"
183 "ultraexpanded"
184 font_width=<width>
185
186 Language
187 Overrides the language defined in font. For example, lang=he.
188 The value can either be a language text or one of presets:
189 "auto" - Respects system locale settings as language
190 "none" - Disable language support
191 lang=<language>
192
193 Color Commands <color>:
194 The following formats are accepted:
195 "#RRGGBB"
196 "#RRGGBBAA"
197 "#RGB"
198 "#RGBA"
199 "rgb(r,g,b)"
200 "rgba(r,g,b,a)"
201 "color_name" like "red" (X11 color names)
202
203 Color
204 Sets the color of the text.
205 color=<color>
206
207 Underline Color
208 Sets the color of the underline.
209 underline_color=<color>
210
211 Second Underline Color
212 Sets the color of the second line of underline(when using underline mode "double").
213 underline2_color=<color>
214
215 Underline Dash Color
216 Sets the color of dashed underline.
217 underline_dash_color=<color>
218
219 Outline Color
220 Sets the color of the outline of the text.
221 outline_color=<color>
222
223 Shadow Color
224 Sets the color of the shadow of the text.
225 shadow_color=<color>
226
227 First Glow Color
228 Sets the first color of the glow of text.
229 glow_color=<color>
230
231 Second Glow Color
232 Sets the second color of the glow of text.
233 glow2_color=<color>
234
235 Backing Color
236 Sets a background color for text.
237 backing_color=<color>
238
239 Strikethrough Color
240 Sets the color of text that is striked through.
241 strikethrough_color=<color>
242
243 Horizontal Align
244 Sets the horizontal alignment of the text. The value can either be a number, a percentage or one of several presets:
245 "auto" - Respects LTR/RTL settings
246 "locale" - Respects locale(language) direction settings
247 "center" - Centers the text in the line
248 "middle" - Alias for "center"
249 "left" - Puts the text at the left of the line
250 "right" - Puts the text at the right of the line
251 "start" - Respects LTR/RTL settings. It is same with "auto"
252 "end" - Puts the text at the opposite side of LTR/RTL settings
253 <number> - A number between 0.0 and 1.0 where 0.0 represents "left" and 1.0 represents "right"
254 <number>% - A percentage between 0% and 100% where 0% represents "left" and 100% represents "right"
255 align=<value or preset>
256
257 Vertical Align
258 Sets the vertical alignment of the text.
259 The value can either be a number or one of the following presets:
260 "top" - Puts text at the top of the line
261 "center" - Centers the text in the line
262 "middle" - Alias for "center"
263 "bottom" - Puts the text at the bottom of the line
264 "baseline" - Baseline
265 "base" - Alias for "baseline"
266 <number> - A number between 0.0 and 1.0 where 0.0 represents "top" and 1.0 represents "bottom"
267 <number>% - A percentage between 0% and 100% where 0% represents "top" and 100% represents "bottom"
268 valign=<value or preset>
269 See explanation of baseline at: https://en.wikipedia.org/wiki/Baseline_%28typography%29
270
271 Wrap
272 Sets the wrap policy of the text. The value must be one of the following:
273 "word" - Only wraps lines at word boundaries
274 "char" - Wraps at any character
275 "mixed" - Wrap at words if possible, if not at any character
276 "hyphenation" - Hyphenate if possible, if not wrap at words if possible, if not at any character
277 "" - Don't wrap
278 wrap=<value or preset>
279
280 Left margin
281 Sets the left margin of the text (in pixel). The value can be a number, an increment, decrement or "reset":
282 +<number> - Increments existing left margin by <number>
283 -<number> - Decrements existing left margin by <number>
284 <number> - Sets left margin to <number>
285 "reset" - Sets left margin to 0
286 left_margin=<value or reset>
287
288 Right margin
289 Sets the right margin of the text (in pixel). The value can be a number, an increment, decrement or "reset":
290 +<number> - Increments existing right margin by <number>
291 -<number> - Decrements existing right margin by <number>
292 <number> - Sets left margin to <number>
293 "reset" - Sets left margin to 0
294 right_margin=<value or reset>
295
296 Underline
297 Sets if and how a text will be underlined. The value must be one of the following:
298 "off" - No underlining
299 "single" - A single line under the text
300 "on" - Alias for "single"
301 "double" - Two lines under the text
302 "dashed" - A dashed line under the text
303 underline=off/single/on/double/dashed
304
305 Strikethrough
306 Sets if the text will be striked through. The value must be one of the following:
307 "off" - No strikethrough
308 "on" - Strikethrough
309 strikethrough=on/off
310
311 Backing
312 Sets if the text will have background color enabled or disabled. The value must be one of the following:
313 "off" - No backing
314 "on" - Backing
315 backing=on/off
316
317 Style
318 Sets the style of the text. The value must be a string composed of two comma separated parts.
319 The first part of the value sets the appearance of the text, the second the position.
320 The first part may be any of the following values:
321 "plain"
322 "off" - Alias for "plain"
323 "none" - Alias for "plain"
324 "shadow"
325 "outline"
326 "soft_outline"
327 "outline_shadow"
328 "outline_soft_shadow"
329 "glow"
330 "far_shadow"
331 "soft_shadow"
332 "far_soft_shadow" The second part may be any of the following values:
333 "bottom_right"
334 "bottom"
335 "bottom_left"
336 "left"
337 "top_left"
338 "top"
339 "top_right"
340 "right"
341 style=<appearance>,<position>
342
343 Tabstops
344 Sets the size (in pixel) of the tab character. The value must be a number greater than one.
345 tabstops=<number>
346
347 Line size
348 Sets the size (in pixel) of line of text. The value should be a number.
349 Setting this value sets linerelsize to 0%!
350 linesize=<number>
351
352 Relative line size
353 Percentage indicating the wanted size of the line relative to the calculated size.
354 Setting this value sets linesize to 0!
355 linerelsize=<number>%
356
357 Line gap
358 Sets the size (in pixel) of the line gap in text (distance between lines). The value should be a number.
359 Setting this value sets linerelgap to 0%!
360 linegap=<number>
361
362 Relative line gap
363 Sets the relative size of the line gap in text based calculated size. The value must be a percentage.
364 Setting this value sets linegap to 0!
365 linerelgap=<number>%
366
367 Line fill
368 Sets the size of the line fill in text. The value must be a percentage (how much line fill its canvas).
369 For example setting value to 100%, means the one line will fill it canvas.
370 linefill=<number>%
371
372 Ellipsis
373 Sets ellipsis mode. The value should be a number.
374 Any value smaller than 0.0 or greater than 1.0 disables ellipsis.
375 A value of 0 means ellipsizing the leftmost portion of the text first, 1 on the other hand the rightmost portion.
376 ellipsis=<number>
377
378 Password
379 Sets if the text is being used for passwords.
380 Enabling this causes all characters to be substituted for '*'. Value must be one of the following:
381 "on" - Enable
382 "off" - Disable
383 password=on/off
384
385 Underline dash width
386 Sets the width of the underline dash (in pixel). The value should be a number.
387 underline_dash_width=<number>
388
389 Underline dash gap
390 Sets the gap of the underline dash (in pixel). The value should be a number.
391 underline_dash_gap=<number>
392
393 Underline height
394 Sets the height of the single underline (in pixel). The value should be a floating number.
395 underline_height=<floatingnumber>
396
397 Gfx Filter
398 Experimental filter, see efl_gfx_filter for more information.
399 gfx_filter='filter name'
400 ]]
401
87 params { 402 params {
88 @in style: string; [[A whitespace-separated list of $[property=value] pairs, for example, 403 @in style: string; [[A whitespace-separated list of $[property=value] pairs, for example, $[font=sans font_size=30].]]
89 $[font=sans size=30].]]
90 } 404 }
91 } 405 }
92 @property all_styles { 406 @property all_styles {