148 lines
4.7 KiB
Plaintext
148 lines
4.7 KiB
Plaintext
enum Efl.Text_Format_Wrap {
|
|
[[Wrapping policy for the text.
|
|
@since 1.24
|
|
]]
|
|
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 Efl.Text_Format_Horizontal_Alignment_Auto_Type {
|
|
[[Automatic horizontal alignment setting for the text (Left-To-Right or Right-To-Left).
|
|
@since 1.24
|
|
]]
|
|
none, [[No auto-alignment rule: Horizontal Alignment is decided by @Efl.Text_Format.text_horizontal_align]]
|
|
auto, [[Respects LTR/RTL (bidirectional) characters found inside the text content.]]
|
|
locale, [[Respects the system's language settings.]]
|
|
opposite [[Text is placed at opposite side of LTR/RTL (bidirectional) settings.]]
|
|
}
|
|
|
|
interface 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.
|
|
@since 1.24
|
|
]]
|
|
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; [[Position of the ellipsis inside the text, from $[0.0] to $[1.0].]]
|
|
}
|
|
}
|
|
|
|
@property wrap {
|
|
[[Wrapping policy for the text.
|
|
|
|
When text does not fit the widget in a single line, it can be automatically wrapped at
|
|
character or word boundaries, for example.
|
|
|
|
Requires @.multiline to be $true.
|
|
]]
|
|
values {
|
|
wrap: Efl.Text_Format_Wrap; [[Wrapping policy.]]
|
|
}
|
|
}
|
|
|
|
@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 multiple lines should be rendered.]]
|
|
}
|
|
}
|
|
|
|
@property text_horizontal_align_auto_type {
|
|
[[Specifies when the text's horizontal alignment should be set automatically.]]
|
|
values {
|
|
value: Efl.Text_Format_Horizontal_Alignment_Auto_Type; [[Automatic horizontal alignment type.]]
|
|
}
|
|
}
|
|
|
|
@property text_horizontal_align {
|
|
[[Manual horizontal alignment of text. $[0.0] means "left"
|
|
and $[1.0] means "right".
|
|
Setting this value also sets @.text_horizontal_align_auto_type to
|
|
@Efl.Text_Format_Horizontal_Alignment_Auto_Type.none.
|
|
This value is ignored when @.text_horizontal_align_auto_type is set to anything other than
|
|
@Efl.Text_Format_Horizontal_Alignment_Auto_Type.none.
|
|
]]
|
|
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 (in pixels) of the tab character.]]
|
|
values
|
|
{
|
|
value: int; [[Size in pixels, greater than 1.]]
|
|
}
|
|
}
|
|
|
|
@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.
|
|
|
|
Only used to replace characters if @.password is enabled.
|
|
]]
|
|
values {
|
|
repch: string; [[Replacement character.]]
|
|
}
|
|
}
|
|
}
|
|
}
|