efl/src/lib/efl/interfaces/efl_text_format.eo

133 lines
3.9 KiB
Plaintext

enum @beta Efl.Text_Format_Wrap {
[[Wrapping policy of the text.]]
none, [[No wrapping.]]
char, [[Wrap at character boundaries.]]
word, [[Wrap at word boundaries.]]
mixed, [[Wrap at word boundaries if possible, at any character if not.]]
hyphenation [[Hyphenate if possible, otherwise try word boundaries or
at any character.]]
}
enum @beta Efl.Text_Format_Horizontal_Alignment_Auto_Type {
[[Auto-horizontal alignment of the text.]]
none, [[No auto-alignment rule.]]
normal, [[Respects LTR/RTL (bidirectional) settings.]]
locale, [[Respects locale's language settings.]]
end [[Text is placed at opposite side of LTR/RTL (bidirectional) settings.]]
}
interface @beta Efl.Text_Format {
[[The look and layout of the text.
The text format can affect the geometry of the text object, as well as
how characters are presented.
]]
c_prefix: efl_text;
methods {
@property ellipsis {
[[Controls automatic addition of ellipsis "..." to replace text which cannot be shown.
The value must be a number indicating the position of the ellipsis inside the visible text.
$[0.0] means the beginning of the text, $[1.0] means the end of the text, and values in between
mean the proportional position inside the text.
Any value smaller than 0 or greater than 1 disables ellipsis.
]]
values
{
value: double; [[Ellipsis value.]]
}
}
@property wrap {
[[Wrapping policy of the text. Requires @.multiline to be $true.]]
values {
wrap: Efl.Text_Format_Wrap; [[Wrap mode.]]
}
}
@property multiline {
[[Enables text to span multiple lines.
When $false, new-line characters are ignored and no text wrapping occurs.
]]
values {
enabled: bool; [[$true if multiline is enabled.]]
}
}
@property text_horizontal_align_auto_type {
[[Horizontal alignment of text.]]
values {
value: Efl.Text_Format_Horizontal_Alignment_Auto_Type; [[Alignment type.]]
}
}
@property text_horizontal_align {
[[Horizontal alignment of text. $[0.0] means "left"
and $[1.0] means "right".]]
values {
value: double; [[Alignment value between $[0.0] and $[1.0].]]
}
}
@property text_vertical_align {
[[Vertical alignment of text.$[0.0] means "top"
and $[1.0] means "bottom"]]
values {
value: double; [[Alignment value between $[0.0] and $[1.0].]]
}
}
@property line_gap {
[[Minimal line gap (top and bottom) for each line in the text.
$value is absolute size.
]]
values
{
value: double; [[Line gap value, in pixels.]]
}
}
@property line_rel_gap {
[[Relative line gap (top and bottom) for each line in the text.
The original line gap value is multiplied by $value.
]]
values
{
value: double; [[Relative line gap value. $[1.0] means original size.]]
}
}
@property tab_stops {
[[Size of the tab character.]]
values
{
value: int; [[Size in pixels.]]
}
}
@property password {
[[Enabling this causes all characters to be replaced by @.replacement_char.
This is useful for password input boxes.
]]
values
{
enabled: bool; [[$true if the text is a password.]]
}
}
@property replacement_char {
[[The character used to replace characters that can't be displayed
Currently only used to replace characters if @.password
is enabled.
]]
values {
repch: string; [[Replacement character]]
}
}
}
}