blob: 139b9ba1a75b780407fc5307bd176c9c9db61bbc (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
import efl_text_types;
abstract Efl.Text.Formatter extends Efl.Object {
[[Text Formatter API to manage text formatting(attributes).
Use it to insert and remove style attributes (font, size, color, ...) using @Efl.Text.Cursor on EFL Widgets.
Attributes can be assigned to character ranges, selected using two @Efl.Text.Cursor instances.
Cursor instances are already bound to a text object so there's no need to provide it to this class.
Style is specified using format strings as described in @Efl.Canvas.Textblock.style_apply.
There is no need to instantiate this class. Use directly the @.attribute_insert and @.attribute_clear static methods.
@since 1.24
]]
methods {
attribute_insert @static {
[[Inserts an attribute format in a specified range [$start, $end - 1].
The $format will be applied to the given range.
The passed cursors must belong to same text object, otherwise insertion will be ignored.
]]
params {
start: const(Efl.Text.Cursor); [[Start of range.]]
end: const(Efl.Text.Cursor); [[End of range.]]
format: string; [[Format string. Uses same format as $style in @Efl.Canvas.Textblock.style_apply.]]
}
}
attribute_clear @static {
[[Clear (remove) attributes in the specified range [$start, $end - 1].
]]
params {
start: const(Efl.Text.Cursor); [[Start of range.]]
end: const(Efl.Text.Cursor); [[End of range.]]
}
return: uint; [[Number of removed attributes.]]
}
}
}
|