forked from enlightenment/efl
docs: Add detailed text styling information
Summary: More detailed descriptions for each attribute. Relationship between attributes. Default values. Links to direct API methods for the corresponding property. General text overhaul and formatting. Test Plan: Builds and passes tests. Generate docgen or DocFX documentation and enjoy your new Text styling descriptions! Reviewers: ali.alzyod Reviewed By: ali.alzyod Subscribers: AbdullehGhujeh, cedric, #reviewers, #committers, woohyun, bu5hm4n Tags: #efl Differential Revision: https://phab.enlightenment.org/D10873
This commit is contained in:
parent
3bfc73a95a
commit
0265f4fd55
|
@ -1,53 +1,53 @@
|
||||||
import efl_gfx_types;
|
import efl_gfx_types;
|
||||||
enum @beta Efl.Text_Font_Weight {
|
enum @beta Efl.Text_Font_Weight {
|
||||||
[[Type of font weight]]
|
[[Type of font weight.]]
|
||||||
normal, [[Normal font weight]]
|
normal, [[Normal font weight.]]
|
||||||
thin, [[Thin font weight]]
|
thin, [[Thin font weight.]]
|
||||||
ultralight, [[Ultralight font weight]]
|
ultralight, [[Ultralight font weight.]]
|
||||||
extralight, [[Extralight font weight]]
|
extralight, [[Extralight font weight.]]
|
||||||
light, [[Light font weight]]
|
light, [[Light font weight.]]
|
||||||
book, [[Book font weight]]
|
book, [[Book font weight.]]
|
||||||
medium, [[Medium font weight]]
|
medium, [[Medium font weight.]]
|
||||||
semibold, [[Semibold font weight]]
|
semibold, [[Semibold font weight.]]
|
||||||
bold, [[Bold font weight]]
|
bold, [[Bold font weight.]]
|
||||||
ultrabold, [[Ultrabold font weight]]
|
ultrabold, [[Ultrabold font weight.]]
|
||||||
extrabold, [[Extrabold font weight]]
|
extrabold, [[Extrabold font weight.]]
|
||||||
black, [[Black font weight]]
|
black, [[Black font weight.]]
|
||||||
extrablack, [[Extrablack font weight]]
|
extrablack, [[Extrablack font weight.]]
|
||||||
}
|
}
|
||||||
|
|
||||||
enum @beta Efl.Text_Font_Width {
|
enum @beta Efl.Text_Font_Width {
|
||||||
[[Type of font width]]
|
[[Type of font width.]]
|
||||||
normal, [[Normal font width]]
|
normal, [[Normal font width.]]
|
||||||
ultracondensed, [[Ultracondensed font width]]
|
ultracondensed, [[Ultracondensed font width.]]
|
||||||
extracondensed, [[Extracondensed font width]]
|
extracondensed, [[Extracondensed font width.]]
|
||||||
condensed, [[Condensed font width]]
|
condensed, [[Condensed font width.]]
|
||||||
semicondensed, [[Semicondensed font width]]
|
semicondensed, [[Semicondensed font width.]]
|
||||||
semiexpanded, [[Semiexpanded font width]]
|
semiexpanded, [[Semiexpanded font width.]]
|
||||||
expanded, [[Expanded font width]]
|
expanded, [[Expanded font width.]]
|
||||||
extraexpanded, [[Extraexpanded font width]]
|
extraexpanded, [[Extraexpanded font width.]]
|
||||||
ultraexpanded, [[Ultraexpanded font width]]
|
ultraexpanded, [[Ultraexpanded font width.]]
|
||||||
}
|
}
|
||||||
|
|
||||||
enum @beta Efl.Text_Font_Slant {
|
enum @beta Efl.Text_Font_Slant {
|
||||||
[[Type of font slant]]
|
[[Type of font slant.]]
|
||||||
normal, [[Normal font slant]]
|
normal, [[Normal font slant.]]
|
||||||
oblique, [[Oblique font slant]]
|
oblique, [[Oblique font slant.]]
|
||||||
italic, [[Italic font slant]]
|
italic, [[Italic font slant.]]
|
||||||
}
|
}
|
||||||
|
|
||||||
/* FIXME: It needs to support "normal" option for non-color bitmap font.
|
/* FIXME: It needs to support "normal" option for non-color bitmap font.
|
||||||
For supporting "normal" option, S/W glyph drawing engine should be updated.
|
For supporting "normal" option, S/W glyph drawing engine should be updated.
|
||||||
*/
|
*/
|
||||||
enum @beta Efl.Text_Font_Bitmap_Scalable {
|
enum @beta Efl.Text_Font_Bitmap_Scalable {
|
||||||
[[Scalable of bitmap fonts
|
[[Scalable of bitmap fonts.
|
||||||
]]
|
]]
|
||||||
none = 0, [[Disable scalable feature for bitmap fonts.]]
|
none = 0, [[Disable scalable feature for bitmap fonts.]]
|
||||||
color = (1 << 0), [[Enable scalable feature for color bitmap fonts.]]
|
color = (1 << 0), [[Enable scalable feature for color bitmap fonts.]]
|
||||||
}
|
}
|
||||||
|
|
||||||
interface @beta Efl.Text_Font {
|
interface @beta Efl.Text_Font {
|
||||||
[[Font settings of the text
|
[[Font settings for text.
|
||||||
]]
|
]]
|
||||||
c_prefix: efl_text;
|
c_prefix: efl_text;
|
||||||
methods {
|
methods {
|
||||||
|
@ -105,42 +105,42 @@ interface @beta Efl.Text_Font {
|
||||||
}
|
}
|
||||||
|
|
||||||
@property font_fallbacks {
|
@property font_fallbacks {
|
||||||
[[Comma-separated list of font fallbacks
|
[[Comma-separated list of font fallbacks.
|
||||||
|
|
||||||
Will be used in case the primary font isn't available.
|
Will be used in case the primary font isn't available.
|
||||||
]]
|
]]
|
||||||
values {
|
values {
|
||||||
font_fallbacks: string; [[Font name fallbacks]]
|
font_fallbacks: string; [[List of fallback font names.]]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@property font_weight {
|
@property font_weight {
|
||||||
[[Type of weight of the displayed font
|
[[Type of weight of the displayed font
|
||||||
|
|
||||||
Default is @Efl.Text_Font_Weight.normal\.
|
Default is @Efl.Text_Font_Weight.normal.
|
||||||
]]
|
]]
|
||||||
values {
|
values {
|
||||||
font_weight: Efl.Text_Font_Weight; [[Font weight]]
|
font_weight: Efl.Text_Font_Weight; [[Font weight.]]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@property font_slant {
|
@property font_slant {
|
||||||
[[Type of slant of the displayed font
|
[[Type of slant of the displayed font.
|
||||||
|
|
||||||
Default is @Efl.Text_Font_Slant.normal\.
|
Default is @Efl.Text_Font_Slant.normal.
|
||||||
]]
|
]]
|
||||||
values {
|
values {
|
||||||
style: Efl.Text_Font_Slant; [[Font slant]]
|
style: Efl.Text_Font_Slant; [[Font slant.]]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@property font_width {
|
@property font_width {
|
||||||
[[Type of width of the displayed font
|
[[Type of width of the displayed font.
|
||||||
|
|
||||||
Default is @Efl.Text_Font_Width.normal\.
|
Default is @Efl.Text_Font_Width.normal.
|
||||||
]]
|
]]
|
||||||
values {
|
values {
|
||||||
width: Efl.Text_Font_Width; [[Font width]]
|
width: Efl.Text_Font_Width; [[Font width.]]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -153,19 +153,19 @@ interface @beta Efl.Text_Font {
|
||||||
"auto" to use the system locale, or "none".
|
"auto" to use the system locale, or "none".
|
||||||
]]
|
]]
|
||||||
values {
|
values {
|
||||||
lang: string; [[Language]]
|
lang: string; [[Language code.]]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@property font_bitmap_scalable {
|
@property font_bitmap_scalable {
|
||||||
[[The bitmap fonts have fixed size glyphs for several available sizes.
|
[[The bitmap fonts have fixed size glyphs for several available sizes.
|
||||||
Basically, it is not scalable. But, it needs to be scalable for some use cases.
|
Basically, it is not scalable. But, it needs to be scalable for some use cases.
|
||||||
(ex. colorful emoji fonts)
|
(e.g. colorful emoji fonts)
|
||||||
|
|
||||||
Default is @Efl.Text_Font_Bitmap_Scalable.none\.
|
Default is @Efl.Text_Font_Bitmap_Scalable.none.
|
||||||
]]
|
]]
|
||||||
values {
|
values {
|
||||||
scalable: Efl.Text_Font_Bitmap_Scalable; [[Scalable]]
|
scalable: Efl.Text_Font_Bitmap_Scalable; [[Scalable.]]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,22 +1,23 @@
|
||||||
enum @beta Efl.Text_Format_Wrap {
|
enum @beta Efl.Text_Format_Wrap {
|
||||||
[[Wrap mode of the text (not in effect if not multiline)]]
|
[[Wrapping policy of the text.]]
|
||||||
none, [[No wrapping]]
|
none, [[No wrapping.]]
|
||||||
char, [[Wrap mode character]]
|
char, [[Wrap at character boundaries.]]
|
||||||
word, [[Wrap mode word]]
|
word, [[Wrap at word boundaries.]]
|
||||||
mixed, [[Wrap mode mixed]]
|
mixed, [[Wrap at word boundaries if possible, at any character if not.]]
|
||||||
hyphenation [[Wrap mode hyphenation]]
|
hyphenation [[Hyphenate if possible, otherwise try word boundaries or
|
||||||
|
at any character.]]
|
||||||
}
|
}
|
||||||
|
|
||||||
enum @beta Efl.Text_Format_Horizontal_Alignment_Auto_Type {
|
enum @beta Efl.Text_Format_Horizontal_Alignment_Auto_Type {
|
||||||
[[Auto-horizontal alignment of the text]]
|
[[Auto-horizontal alignment of the text.]]
|
||||||
none, [[No auto-alignment rule]]
|
none, [[No auto-alignment rule.]]
|
||||||
normal, [[Respects LTR/RTL (bidirectional) settings]]
|
normal, [[Respects LTR/RTL (bidirectional) settings.]]
|
||||||
locale, [[Respects locale's langauge settings]]
|
locale, [[Respects locale's language settings.]]
|
||||||
end [[Text is places at opposite side of LTR/RTL (bidirectional) settings]]
|
end [[Text is placed at opposite side of LTR/RTL (bidirectional) settings.]]
|
||||||
}
|
}
|
||||||
|
|
||||||
interface @beta Efl.Text_Format {
|
interface @beta Efl.Text_Format {
|
||||||
[[The look and layout of the text
|
[[The look and layout of the text.
|
||||||
|
|
||||||
The text format can affect the geometry of the text object, as well as
|
The text format can affect the geometry of the text object, as well as
|
||||||
how characters are presented.
|
how characters are presented.
|
||||||
|
@ -24,83 +25,96 @@ interface @beta Efl.Text_Format {
|
||||||
c_prefix: efl_text;
|
c_prefix: efl_text;
|
||||||
methods {
|
methods {
|
||||||
@property ellipsis {
|
@property ellipsis {
|
||||||
[[Ellipsis value (number from -1.0 to 1.0)]]
|
[[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
|
values
|
||||||
{
|
{
|
||||||
value: double; [[Ellipsis value]]
|
value: double; [[Ellipsis value.]]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@property wrap {
|
@property wrap {
|
||||||
[[Wrap mode for use in the text]]
|
[[Wrapping policy of the text. Requires @.multiline to be $true.]]
|
||||||
values {
|
values {
|
||||||
wrap: Efl.Text_Format_Wrap; [[Wrap mode]]
|
wrap: Efl.Text_Format_Wrap; [[Wrap mode.]]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@property multiline {
|
@property multiline {
|
||||||
[[Multiline is enabled or not]]
|
[[Enables text to span multiple lines.
|
||||||
|
|
||||||
|
When $false, new-line characters are ignored and no text wrapping occurs.
|
||||||
|
]]
|
||||||
values {
|
values {
|
||||||
enabled: bool; [[$true if multiline is enabled, $false otherwise]]
|
enabled: bool; [[$true if multiline is enabled.]]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@property horizontal_align_auto_type {
|
@property horizontal_align_auto_type {
|
||||||
[[Horizontal alignment of text]]
|
[[Horizontal alignment of text.]]
|
||||||
values {
|
values {
|
||||||
value: Efl.Text_Format_Horizontal_Alignment_Auto_Type; [[Alignment type]]
|
value: Efl.Text_Format_Horizontal_Alignment_Auto_Type; [[Alignment type.]]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@property horizontal_align {
|
@property horizontal_align {
|
||||||
[[Horizontal alignment of text]]
|
[[Horizontal alignment of text. $[0.0] means "left"
|
||||||
|
and $[1.0] means "right".]]
|
||||||
values {
|
values {
|
||||||
value: double; [[Horizontal alignment value]]
|
value: double; [[Alignment value between $[0.0] and $[1.0].]]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@property vertical_align {
|
@property vertical_align {
|
||||||
[[Vertical alignment of text]]
|
[[Vertical alignment of text.$[0.0] means "top"
|
||||||
|
and $[1.0] means "bottom"]]
|
||||||
values {
|
values {
|
||||||
value: double; [[Vertical alignment value]]
|
value: double; [[Alignment value between $[0.0] and $[1.0].]]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@property linegap {
|
@property linegap {
|
||||||
[[Minimal line gap (top and bottom) for each line in the text
|
[[Minimal line gap (top and bottom) for each line in the text.
|
||||||
|
|
||||||
$value is absolute size.
|
$value is absolute size.
|
||||||
]]
|
]]
|
||||||
values
|
values
|
||||||
{
|
{
|
||||||
value: double; [[Line gap value]]
|
value: double; [[Line gap value, in pixels.]]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@property linerelgap {
|
@property linerelgap {
|
||||||
[[Relative line gap (top and bottom) for each line in the text
|
[[Relative line gap (top and bottom) for each line in the text.
|
||||||
|
|
||||||
The original line gap value is multiplied by $value.
|
The original line gap value is multiplied by $value.
|
||||||
]]
|
]]
|
||||||
values
|
values
|
||||||
{
|
{
|
||||||
value: double; [[Relative line gap value]]
|
value: double; [[Relative line gap value. $[1.0] means original size.]]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@property tabstops {
|
@property tabstops {
|
||||||
[[Tabstops value]]
|
[[Size of the tab character.]]
|
||||||
values
|
values
|
||||||
{
|
{
|
||||||
value: int; [[Tapstops value]]
|
value: int; [[Size in pixels.]]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@property password {
|
@property password {
|
||||||
[[Whether text is a password]]
|
[[Enabling this causes all characters to be replaced by @.replacement_char.
|
||||||
|
|
||||||
|
This is useful for password input boxes.
|
||||||
|
]]
|
||||||
values
|
values
|
||||||
{
|
{
|
||||||
enabled: bool; [[$true if the text is a password, $false otherwise]]
|
enabled: bool; [[$true if the text is a password.]]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,248 +1,257 @@
|
||||||
enum @beta Efl.Text_Style_Backing_Type
|
enum @beta Efl.Text_Style_Backing_Type
|
||||||
{
|
{
|
||||||
[[Whether to apply backing style to the displayed text or not]]
|
[[Whether to add a background colored rectangle (backing) to each line of text or not.]]
|
||||||
disabled = 0, [[Do not use backing]]
|
disabled = 0, [[Do not use backing.]]
|
||||||
enabled, [[Use backing style]]
|
enabled, [[Use backing.]]
|
||||||
}
|
}
|
||||||
|
|
||||||
enum @beta Efl.Text_Style_Strikethrough_Type
|
enum @beta Efl.Text_Style_Strikethrough_Type
|
||||||
{
|
{
|
||||||
[[Whether to apply strikethrough style to the displayed text or not]]
|
[[Whether to add a strike-through decoration to the displayed text or not.]]
|
||||||
disabled = 0, [[Do not use strikethrough]]
|
disabled = 0, [[Do not use strike-through.]]
|
||||||
enabled, [[Use strikethrough style]]
|
enabled, [[Use strike-through.]]
|
||||||
}
|
}
|
||||||
|
|
||||||
enum @beta Efl.Text_Style_Effect_Type
|
enum @beta Efl.Text_Style_Effect_Type
|
||||||
{
|
{
|
||||||
[[Effect to apply to the displayed text]]
|
[[Effect to apply to the displayed text.]]
|
||||||
none = 0, [[No effect]]
|
none = 0, [[No effect.]]
|
||||||
|
|
||||||
// colored with shadow_color
|
// colored with shadow_color
|
||||||
shadow, [[Shadow effect]]
|
shadow, [[Shadow effect.]]
|
||||||
far_shadow, [[Far shadow effect]]
|
far_shadow, [[Far shadow effect.]]
|
||||||
soft_shadow, [[Soft shadow effect]]
|
soft_shadow, [[Soft shadow effect.]]
|
||||||
far_soft_shadow, [[Far and soft shadow effect]]
|
far_soft_shadow, [[Far and soft shadow effect.]]
|
||||||
// colored with glow_color
|
// colored with glow_color
|
||||||
glow, [[Glow effect]]
|
glow, [[Glow effect.]]
|
||||||
// colored with outline_color
|
// colored with outline_color
|
||||||
outline, [[Outline effect]]
|
outline, [[Outline effect.]]
|
||||||
soft_outline, [[Soft outline effect]]
|
soft_outline, [[Soft outline effect.]]
|
||||||
// colored with outline_color + shadow_color
|
// colored with outline_color + shadow_color
|
||||||
outline_shadow, [[Outline shadow effect]]
|
outline_shadow, [[Outline + shadow effect.]]
|
||||||
outline_soft_shadow, [[Outline soft shadow effect]]
|
outline_soft_shadow, [[Outline + soft shadow effect.]]
|
||||||
}
|
}
|
||||||
|
|
||||||
enum @beta Efl.Text_Style_Shadow_Direction
|
enum @beta Efl.Text_Style_Shadow_Direction
|
||||||
{
|
{
|
||||||
[[Direction of the shadow style, if used]]
|
[[Direction of the shadow.]]
|
||||||
bottom_right = 0, [[Shadow towards bottom right]]
|
bottom_right = 0, [[Shadow towards bottom right.]]
|
||||||
bottom, [[Shadow towards botom]]
|
bottom, [[Shadow towards bottom.]]
|
||||||
bottom_left, [[Shadow towards bottom left]]
|
bottom_left, [[Shadow towards bottom left.]]
|
||||||
left, [[Shadow towards left]]
|
left, [[Shadow towards left.]]
|
||||||
top_left, [[Shadow towards top left]]
|
top_left, [[Shadow towards top left.]]
|
||||||
top, [[Shadow towards top]]
|
top, [[Shadow towards top.]]
|
||||||
top_right, [[Shadow towards top right]]
|
top_right, [[Shadow towards top right.]]
|
||||||
right, [[Shadow towards right]]
|
right, [[Shadow towards right.]]
|
||||||
}
|
}
|
||||||
|
|
||||||
enum @beta Efl.Text_Style_Underline_Type
|
enum @beta Efl.Text_Style_Underline_Type
|
||||||
{
|
{
|
||||||
[[Underline type of the displayed text]]
|
[[Type of underline of the displayed text.]]
|
||||||
off = 0, [[Text without underline]]
|
off = 0, [[Text without underline.]]
|
||||||
on, [[Underline enabled]]
|
on, [[Underline enabled.]]
|
||||||
single, [[Underlined with a signle line]]
|
single, [[Underlined with a single line.]]
|
||||||
double, [[Underlined with a double line]]
|
double, [[Underlined with a double line.]]
|
||||||
dashed, [[Underlined with a dashed line]]
|
dashed, [[Underlined with a dashed line.]]
|
||||||
}
|
}
|
||||||
|
|
||||||
interface @beta Efl.Text_Style {
|
interface @beta Efl.Text_Style {
|
||||||
[[Style to apply to the text
|
[[Decorations to add to the text.
|
||||||
|
|
||||||
A style can be coloring, effects, underline, strikethrough etc.
|
Decorations can be coloring, effects, underlines, strike-through etc.
|
||||||
]]
|
]]
|
||||||
c_prefix: efl_text;
|
c_prefix: efl_text;
|
||||||
methods {
|
methods {
|
||||||
@property normal_color {
|
@property normal_color {
|
||||||
[[Color of text, excluding style]]
|
[[Color of text, excluding decorations like, shadow, outline or glow.]]
|
||||||
values
|
values
|
||||||
{
|
{
|
||||||
r: ubyte; [[Red component]]
|
r: ubyte; [[Red component.]]
|
||||||
g: ubyte; [[Green component]]
|
g: ubyte; [[Green component.]]
|
||||||
b: ubyte; [[Blue component]]
|
b: ubyte; [[Blue component.]]
|
||||||
a: ubyte; [[Alpha component]]
|
a: ubyte; [[Alpha component.]]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@property backing_type {
|
@property backing_type {
|
||||||
[[Enable or disable backing type]]
|
[[Enables rendering of a background rectangle behind each line of text.]]
|
||||||
values
|
values
|
||||||
{
|
{
|
||||||
type: Efl.Text_Style_Backing_Type; [[Backing type]]
|
type: Efl.Text_Style_Backing_Type; [[Backing type.]]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@property backing_color {
|
@property backing_color {
|
||||||
[[Backing color]]
|
[[Color of the background rectangle (backing) behind each line of text.]]
|
||||||
values
|
values
|
||||||
{
|
{
|
||||||
r: ubyte; [[Red component]]
|
r: ubyte; [[Red component.]]
|
||||||
g: ubyte; [[Green component]]
|
g: ubyte; [[Green component.]]
|
||||||
b: ubyte; [[Blue component]]
|
b: ubyte; [[Blue component.]]
|
||||||
a: ubyte; [[Alpha component]]
|
a: ubyte; [[Alpha component.]]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@property underline_type {
|
@property underline_type {
|
||||||
[[Sets an underline style on the text]]
|
[[Underline style for the text.]]
|
||||||
values
|
values
|
||||||
{
|
{
|
||||||
type: Efl.Text_Style_Underline_Type; [[Underline type]]
|
type: Efl.Text_Style_Underline_Type; [[Underline type.]]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@property underline_color
|
@property underline_color
|
||||||
{
|
{
|
||||||
[[Color of normal underline style]]
|
[[Color of normal underline style.]]
|
||||||
values
|
values
|
||||||
{
|
{
|
||||||
r: ubyte; [[Red component]]
|
r: ubyte; [[Red component.]]
|
||||||
g: ubyte; [[Green component]]
|
g: ubyte; [[Green component.]]
|
||||||
b: ubyte; [[Blue component]]
|
b: ubyte; [[Blue component.]]
|
||||||
a: ubyte; [[Alpha component]]
|
a: ubyte; [[Alpha component.]]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@property underline_height
|
@property underline_height
|
||||||
{
|
{
|
||||||
[[Height of underline style]]
|
[[Width (in pixels) of the single underline when @.underline_type is
|
||||||
|
@Efl.Text_Style_Underline_Type.single.]]
|
||||||
values
|
values
|
||||||
{
|
{
|
||||||
height: double; [[Height]]
|
height: double; [[Underline width in pixels.]]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@property underline_dashed_color
|
@property underline_dashed_color
|
||||||
{
|
{
|
||||||
[[Color of dashed underline style]]
|
[[Color of the dashed underline. Only valid when @.underline_type is
|
||||||
|
@Efl.Text_Style_Underline_Type.dashed.]]
|
||||||
values
|
values
|
||||||
{
|
{
|
||||||
r: ubyte; [[Red component]]
|
r: ubyte; [[Red component.]]
|
||||||
g: ubyte; [[Green component]]
|
g: ubyte; [[Green component.]]
|
||||||
b: ubyte; [[Blue component]]
|
b: ubyte; [[Blue component.]]
|
||||||
a: ubyte; [[Alpha component]]
|
a: ubyte; [[Alpha component.]]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@property underline_dashed_width
|
@property underline_dashed_width
|
||||||
{
|
{
|
||||||
[[Width of dashed underline style]]
|
[[Length (in pixels) of the dashes when @.underline_type is
|
||||||
|
@Efl.Text_Style_Underline_Type.dashed.]]
|
||||||
values
|
values
|
||||||
{
|
{
|
||||||
width: int; [[Width]]
|
width: int; [[Dash length in pixels.]]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@property underline_dashed_gap
|
@property underline_dashed_gap
|
||||||
{
|
{
|
||||||
[[Gap of dashed underline style]]
|
[[Length (in pixels) of the gaps between the dashes when @.underline_type is
|
||||||
|
@Efl.Text_Style_Underline_Type.dashed.]]
|
||||||
values
|
values
|
||||||
{
|
{
|
||||||
gap: int; [[Gap]]
|
gap: int; [[Gap length in pixels.]]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@property underline2_color
|
@property underline2_color
|
||||||
{
|
{
|
||||||
[[Color of underline2 style]]
|
[[Color of the secondary underline. Only valid when @.underline_type is
|
||||||
|
@Efl.Text_Style_Underline_Type.double.]]
|
||||||
values
|
values
|
||||||
{
|
{
|
||||||
r: ubyte; [[Red component]]
|
r: ubyte; [[Red component.]]
|
||||||
g: ubyte; [[Green component]]
|
g: ubyte; [[Green component.]]
|
||||||
b: ubyte; [[Blue component]]
|
b: ubyte; [[Blue component.]]
|
||||||
a: ubyte; [[Alpha component]]
|
a: ubyte; [[Alpha component.]]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@property strikethrough_type {
|
@property strikethrough_type {
|
||||||
[[Type of strikethrough style]]
|
[[Enables crossed-out text.]]
|
||||||
values
|
values
|
||||||
{
|
{
|
||||||
type: Efl.Text_Style_Strikethrough_Type; [[Strikethrough type]]
|
type: Efl.Text_Style_Strikethrough_Type; [[Strike-through type.]]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@property strikethrough_color
|
@property strikethrough_color
|
||||||
{
|
{
|
||||||
[[Color of strikethrough_style]]
|
[[Color of the line striking through the text.]]
|
||||||
values
|
values
|
||||||
{
|
{
|
||||||
r: ubyte; [[Red component]]
|
r: ubyte; [[Red component.]]
|
||||||
g: ubyte; [[Green component]]
|
g: ubyte; [[Green component.]]
|
||||||
b: ubyte; [[Blue component]]
|
b: ubyte; [[Blue component.]]
|
||||||
a: ubyte; [[Alpha component]]
|
a: ubyte; [[Alpha component.]]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@property effect_type {
|
@property effect_type {
|
||||||
[[Type of effect used for the displayed text]]
|
[[Controls a number of decorations around the text, like shadow, outline
|
||||||
|
and glow, including combinations of them.]]
|
||||||
values {
|
values {
|
||||||
type: Efl.Text_Style_Effect_Type; [[Effect type]]
|
type: Efl.Text_Style_Effect_Type; [[Effect type.]]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@property outline_color
|
@property outline_color
|
||||||
{
|
{
|
||||||
[[Color of outline effect]]
|
[[Color of the text outline.]]
|
||||||
values
|
values
|
||||||
{
|
{
|
||||||
r: ubyte; [[Red component]]
|
r: ubyte; [[Red component.]]
|
||||||
g: ubyte; [[Green component]]
|
g: ubyte; [[Green component.]]
|
||||||
b: ubyte; [[Blue component]]
|
b: ubyte; [[Blue component.]]
|
||||||
a: ubyte; [[Alpha component]]
|
a: ubyte; [[Alpha component.]]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@property shadow_direction
|
@property shadow_direction
|
||||||
{
|
{
|
||||||
[[Direction of shadow effect]]
|
[[Direction of shadow effect.]]
|
||||||
values
|
values
|
||||||
{
|
{
|
||||||
type: Efl.Text_Style_Shadow_Direction; [[Shadow direction]]
|
type: Efl.Text_Style_Shadow_Direction; [[Shadow direction.]]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@property shadow_color
|
@property shadow_color
|
||||||
{
|
{
|
||||||
[[Color of shadow effect]]
|
[[Color of the shadow.]]
|
||||||
values
|
values
|
||||||
{
|
{
|
||||||
r: ubyte; [[Red component]]
|
r: ubyte; [[Red component.]]
|
||||||
g: ubyte; [[Green component]]
|
g: ubyte; [[Green component.]]
|
||||||
b: ubyte; [[Blue component]]
|
b: ubyte; [[Blue component.]]
|
||||||
a: ubyte; [[Alpha component]]
|
a: ubyte; [[Alpha component.]]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@property glow_color
|
@property glow_color
|
||||||
{
|
{
|
||||||
[[Color of glow effect]]
|
[[Color of the glow decoration.]]
|
||||||
values
|
values
|
||||||
{
|
{
|
||||||
r: ubyte; [[Red component]]
|
r: ubyte; [[Red component.]]
|
||||||
g: ubyte; [[Green component]]
|
g: ubyte; [[Green component.]]
|
||||||
b: ubyte; [[Blue component]]
|
b: ubyte; [[Blue component.]]
|
||||||
a: ubyte; [[Alpha component]]
|
a: ubyte; [[Alpha component.]]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@property glow2_color
|
@property glow2_color
|
||||||
{
|
{
|
||||||
[[Second color of the glow effect]]
|
[[Color of the secondary glow decoration.
|
||||||
|
This is the color of the inner glow (where it touches the text) which
|
||||||
|
gradually fades into @.glow_color as it reaches the edge.
|
||||||
|
]]
|
||||||
values
|
values
|
||||||
{
|
{
|
||||||
r: ubyte; [[Red component]]
|
r: ubyte; [[Red component.]]
|
||||||
g: ubyte; [[Green component]]
|
g: ubyte; [[Green component.]]
|
||||||
b: ubyte; [[Blue component]]
|
b: ubyte; [[Blue component.]]
|
||||||
a: ubyte; [[Alpha component]]
|
a: ubyte; [[Alpha component.]]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -6,7 +6,13 @@ class @beta Efl.Canvas.Textblock extends Efl.Canvas.Object implements Efl.Text,
|
||||||
Efl.Text_Markup, Efl.Ui.I18n
|
Efl.Text_Markup, Efl.Ui.I18n
|
||||||
{
|
{
|
||||||
[[This is the Canvas-level text class. This class only takes care of rendering text,
|
[[This is the Canvas-level text class. This class only takes care of rendering text,
|
||||||
if you need user interaction consider the classes in $Efl.Ui.]]
|
if you need user interaction consider the classes in $[Efl.Ui].
|
||||||
|
|
||||||
|
Note: No text will be rendered until a font, a font size and a font color are specified.
|
||||||
|
This can be accomplished using @Efl.Text_Font.font_family, @Efl.Text_Font.font_size and
|
||||||
|
@Efl.Text_Style.normal_color.
|
||||||
|
Alternatively, @.style_apply can be used providing the attributes $font, $font_size and $color.
|
||||||
|
]]
|
||||||
methods {
|
methods {
|
||||||
@property is_empty {
|
@property is_empty {
|
||||||
[[Whether the object is empty (no text) or not.
|
[[Whether the object is empty (no text) or not.
|
||||||
|
@ -80,337 +86,265 @@ class @beta Efl.Canvas.Textblock extends Efl.Canvas.Object implements Efl.Text,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
style_apply {
|
style_apply {
|
||||||
[[Applies a style to the text object. Applied style attributes override old ones, leaving other attributes
|
[[Applies several style attributes at once using a formatting string.
|
||||||
unaffected.
|
Given style attributes override previous values, leaving other attributes unaffected.
|
||||||
This is similar to setting individual style attributes using properties like @Efl.Text_Font.font_slant or
|
This is akin to setting individual style attributes using properties like
|
||||||
@Efl.Text_Format.wrap.
|
@Efl.Text_Font.font_slant or @Efl.Text_Format.wrap, for example.
|
||||||
|
|
||||||
The style can be set as "attribute"="Value".
|
The formatting string is a whitespace-separated list of $[attribute=value] pairs.
|
||||||
Multible attribute can be set at once separated by space.
|
|
||||||
|
|
||||||
The following styling attributes are accepted:
|
The following attributes are accepted:
|
||||||
|
|
||||||
- Font
|
- $font: Name of the font to use.
|
||||||
- Font fallback
|
Default value is empty, meaning that no text will be rendered.
|
||||||
- Font size
|
Requires $font_size and $font_color.
|
||||||
- Font source
|
See @Efl.Text_Font.font_family.
|
||||||
- Font weight
|
|
||||||
- Font style
|
|
||||||
- Font width
|
|
||||||
- Language
|
|
||||||
- Color
|
|
||||||
- Underline Color
|
|
||||||
- Second Underline Color
|
|
||||||
- Underline Dash Color
|
|
||||||
- Outline Color
|
|
||||||
- Shadow Color
|
|
||||||
- First Glow Color
|
|
||||||
- Second Glow Color
|
|
||||||
- Backing Color
|
|
||||||
- Strikethrough Color
|
|
||||||
- Horizontal Align
|
|
||||||
- Vertical Align
|
|
||||||
- Wrap
|
|
||||||
- Left margin
|
|
||||||
- Right margin
|
|
||||||
- Underline
|
|
||||||
- Strikethrough
|
|
||||||
- Backing
|
|
||||||
- Style
|
|
||||||
- Tabstops
|
|
||||||
- Line size
|
|
||||||
- Relative line size
|
|
||||||
- Line gap
|
|
||||||
- Relative line gap
|
|
||||||
- Item
|
|
||||||
- Line fill
|
|
||||||
- Ellipsis
|
|
||||||
- Password
|
|
||||||
- Underline dash width
|
|
||||||
- Underline dash gap
|
|
||||||
- Underline height
|
|
||||||
|
|
||||||
Font
|
- $font_fallbacks: Comma-delimited list of fonts to try if finding the primary font fails.
|
||||||
This sets the name of the font to be used.
|
Example: $[font_fallbacks=consolas,courier,monospace].
|
||||||
font=<font name>
|
Default value is empty.
|
||||||
|
See @Efl.Text_Font.font_fallbacks.
|
||||||
|
|
||||||
Font fallback
|
- $font_size: Height of font, in points.
|
||||||
A comma delimited list of fonts to try if finding the primary font fails.
|
Default value is 0.
|
||||||
font_fallbacks=<font names>
|
Requires $font and $font_color.
|
||||||
|
See @Efl.Text_Font.font_size.
|
||||||
|
|
||||||
Font size
|
- $font_source: Path to the file containing the font to use.
|
||||||
This sets the the size of font in points to be used.
|
Example: $[font_source=/usr/share/fonts/Sans.ttf].
|
||||||
font_size=<size>
|
Default value is empty.
|
||||||
|
See @Efl.Text_Font.font_source.
|
||||||
|
|
||||||
Font source
|
- $font_weight: Thickness of the font. The value must be one of: $normal, $thin, $ultralight, $extralight,
|
||||||
Specify source from which to search for the font.
|
$light, $book, $medium, $semibold, $bold, $ultrabold, $extrabold, $black and $extrablack.
|
||||||
font_source=<source>
|
Default value is $normal.
|
||||||
|
See @Efl.Text_Font.font_weight.
|
||||||
|
|
||||||
Font weight
|
- $font_style: Style of the font. The value must be one of: $normal, $oblique and $italic.
|
||||||
Sets the weight of the font. The value must be one of:
|
Default value is $normal.
|
||||||
"normal"
|
See @Efl.Text_Font.font_slant.
|
||||||
"thin"
|
|
||||||
"ultralight"
|
|
||||||
"extralight"
|
|
||||||
"light"
|
|
||||||
"book"
|
|
||||||
"medium"
|
|
||||||
"semibold"
|
|
||||||
"bold"
|
|
||||||
"ultrabold"
|
|
||||||
"extrabold"
|
|
||||||
"black"
|
|
||||||
"extrablack"
|
|
||||||
font_weight=<weight>
|
|
||||||
|
|
||||||
Font style
|
- $font_width: How wide the font is, relative to its height. The value must be one of:
|
||||||
Sets the style of the font. The value must be one of:
|
$normal, $ultracondensed, $extracondensed, $condensed, $semicondensed, $semiexpanded, $expanded,
|
||||||
"normal"
|
$extraexpanded and $ultraexpanded.
|
||||||
"oblique"
|
Default value is $normal.
|
||||||
"italic"
|
See @Efl.Text_Font.font_weight.
|
||||||
font_style=<style>
|
|
||||||
|
|
||||||
Font width
|
- $lang: A 2-letter ISO 639-1 language code, $auto (to use the system locale setting) or $none (to disable
|
||||||
Sets the width of the font. The value must be one of:
|
language support).
|
||||||
"normal"
|
Example: $[lang=he].
|
||||||
"ultracondensed"
|
Default value is empty.
|
||||||
"extracondensed"
|
See @Efl.Text_Font.font_lang.
|
||||||
"condensed"
|
|
||||||
"semicondensed"
|
|
||||||
"semiexpanded"
|
|
||||||
"expanded"
|
|
||||||
"extraexpanded"
|
|
||||||
"ultraexpanded"
|
|
||||||
font_width=<width>
|
|
||||||
|
|
||||||
Language
|
- $color: Color code for the text (See bottom for the complete list of supported codes).
|
||||||
Overrides the language defined in font. For example, lang=he.
|
Default value is $[rgba(0,0,0,0)] meaning that no text will be rendered.
|
||||||
The value can either be a language text or one of presets:
|
Requires $font and $font_size.
|
||||||
"auto" - Respects system locale settings as language
|
See @Efl.Text_Style.normal_color.
|
||||||
"none" - Disable language support
|
|
||||||
lang=<language>
|
|
||||||
|
|
||||||
Color Commands <color>:
|
- $underline_color: Color code for the text underline (See bottom for the complete list of supported codes).
|
||||||
The following formats are accepted:
|
Default value is $[rgba(0,0,0,0)] meaning that no underline will be rendered.
|
||||||
"#RRGGBB"
|
Requires $underline.
|
||||||
"#RRGGBBAA"
|
See @Efl.Text_Style.underline_color.
|
||||||
"#RGB"
|
|
||||||
"#RGBA"
|
|
||||||
"rgb(r,g,b)"
|
|
||||||
"rgba(r,g,b,a)"
|
|
||||||
"color_name" like "red" (X11 color names)
|
|
||||||
|
|
||||||
Color
|
- $underline2_color: Color code for the secondary text underline (See bottom for the complete list of
|
||||||
Sets the color of the text.
|
supported codes). Only valid when $[underline=double].
|
||||||
color=<color>
|
Default value is $[rgba(0,0,0,0)] meaning that secondary underline will not be rendered.
|
||||||
|
See @Efl.Text_Style.underline2_color.
|
||||||
|
|
||||||
Underline Color
|
- $underline_dash_color: Color code for the dashed underline (See bottom for the complete list of supported
|
||||||
Sets the color of the underline.
|
codes). Only valid when $[underline=dashed].
|
||||||
underline_color=<color>
|
Default value is $[rgba(0,0,0,0)] meaning that dashed underline will not be rendered.
|
||||||
|
See @Efl.Text_Style.underline_dashed_color.
|
||||||
|
|
||||||
Second Underline Color
|
- $outline_color: Color code for the text outline (See bottom for the complete list of supported codes).
|
||||||
Sets the color of the second line of underline(when using underline mode "double").
|
Only valid when the $style attribute includes an outline.
|
||||||
underline2_color=<color>
|
Default value is $[rgba(0,0,0,0)] meaning that no outline will be rendered.
|
||||||
|
See @Efl.Text_Style.outline_color.
|
||||||
|
|
||||||
Underline Dash Color
|
- $shadow_color: Color code for the text shadow (See bottom for the complete list of supported codes).
|
||||||
Sets the color of dashed underline.
|
Only valid when the $style attribute includes a shadow.
|
||||||
underline_dash_color=<color>
|
Default value is $[rgba(0,0,0,0)] meaning that no shadow will be rendered.
|
||||||
|
See @Efl.Text_Style.shadow_color.
|
||||||
|
|
||||||
Outline Color
|
- $glow_color: Color code for the glow component of the text (See bottom for the complete list of supported
|
||||||
Sets the color of the outline of the text.
|
codes). Only valid when the $style attribute includes a glow.
|
||||||
outline_color=<color>
|
Default value is $[rgba(0,0,0,0)] meaning that no glow will be rendered.
|
||||||
|
See @Efl.Text_Style.glow_color.
|
||||||
|
|
||||||
Shadow Color
|
- $glow2_color: Color code for the secondary (inner) glow component of the text (See bottom for the complete
|
||||||
Sets the color of the shadow of the text.
|
list of supported codes). Only valid when the $style attribute includes a glow.
|
||||||
shadow_color=<color>
|
Default value is $[rgba(0,0,0,0)] meaning that only the primary $glow_color will be used.
|
||||||
|
See @Efl.Text_Style.glow2_color.
|
||||||
|
|
||||||
First Glow Color
|
- $backing_color: Color code for the background of the text (See bottom for the complete list of supported
|
||||||
Sets the first color of the glow of text.
|
codes). Use a fully transparent color to disable the background.
|
||||||
glow_color=<color>
|
Default value is $[rgba(0,0,0,0)] meaning that no backing will be rendered.
|
||||||
|
Requires $backing.
|
||||||
|
See @Efl.Text_Style.backing_color.
|
||||||
|
|
||||||
Second Glow Color
|
- $strikethrough_color: Color code for the line striking through the text (See bottom for the complete list
|
||||||
Sets the second color of the glow of text.
|
of supported codes). Only valid when $[strikethrough=on]
|
||||||
glow2_color=<color>
|
Default value is $[rgba(0,0,0,0)] meaning that no strike-through line will be rendered.
|
||||||
|
See @Efl.Text_Style.strikethrough_color.
|
||||||
|
|
||||||
Backing Color
|
- $align: Horizontal alignment of the text. The value can either be a decimal number ($[0.0] means "left"
|
||||||
Sets a background color for text.
|
and $[1.0] means "right"), a percentage ($[0%] means "left" and $[100%] means "right") or one of:
|
||||||
backing_color=<color>
|
$auto (Respects LTR/RTL settings), $locale (Respects language direction settings), $center
|
||||||
|
(Centers the text in the line), $middle (Alias for $center), $left (Puts the text at the left of the line),
|
||||||
|
$right (Puts the text at the right of the line), $start (Alias for $auto), $end (Puts the text at the
|
||||||
|
opposite side of LTR/RTL settings).
|
||||||
|
Default value is $auto.
|
||||||
|
See @Efl.Text_Format.horizontal_align.
|
||||||
|
|
||||||
Strikethrough Color
|
- $valign: Vertical alignment of the text. The value can either be a decimal number ($[0.0] means "top"
|
||||||
Sets the color of text that is striked through.
|
and $[1.0] means "bottom"), a percentage ($[0%] means "top" and $[100%] means "bottom") or one of:
|
||||||
strikethrough_color=<color>
|
$top (Puts the text at the top of the text box), $center (Puts the text at the middle of the text box),
|
||||||
|
$middle (Alias for $center), $bottom (Puts the text at the bottom of the text box),
|
||||||
|
$baseline (Puts the text's baseline at the middle of the text box), $base (Alias for $baseline).
|
||||||
|
Default value is $baseline.
|
||||||
|
See @Efl.Text_Format.vertical_align.
|
||||||
|
|
||||||
Horizontal Align
|
- $wrap: Wrapping policy of the text. The value must be one of the following: $word (Only wraps lines at
|
||||||
Sets the horizontal alignment of the text. The value can either be a number, a percentage or one of several presets:
|
word boundaries), $char (Wraps at any character), $mixed (Wraps at word boundaries if possible,
|
||||||
"auto" - Respects LTR/RTL settings
|
at any character if not), $hyphenation (Hyphenate if possible, otherwise try wrapping at word boundaries
|
||||||
"locale" - Respects locale(language) direction settings
|
or at any character) or $none to disable wrapping.
|
||||||
"center" - Centers the text in the line
|
Default value is $none.
|
||||||
"middle" - Alias for "center"
|
See @Efl.Text_Format.wrap.
|
||||||
"left" - Puts the text at the left of the line
|
|
||||||
"right" - Puts the text at the right of the line
|
|
||||||
"start" - Respects LTR/RTL settings. It is same with "auto"
|
|
||||||
"end" - Puts the text at the opposite side of LTR/RTL settings
|
|
||||||
<number> - A number between 0.0 and 1.0 where 0.0 represents "left" and 1.0 represents "right"
|
|
||||||
<number>% - A percentage between 0% and 100% where 0% represents "left" and 100% represents "right"
|
|
||||||
align=<value or preset>
|
|
||||||
|
|
||||||
Vertical Align
|
- $left_margin: Distance in pixels from the left side of the text block to the beginning of the text
|
||||||
Sets the vertical alignment of the text.
|
(inner margin). The value can be a number (to set the margin), or a number preceded by $[+] or $[-]
|
||||||
The value can either be a number or one of the following presets:
|
to increment or decrement the existing margin value. $reset is also accepted, to set the margin to
|
||||||
"top" - Puts text at the top of the line
|
0 pixels.
|
||||||
"center" - Centers the text in the line
|
Default value is $[0].
|
||||||
"middle" - Alias for "center"
|
Examples: $[left_margin=10], $[left_margin=+10], $[left_margin=reset].
|
||||||
"bottom" - Puts the text at the bottom of the line
|
|
||||||
"baseline" - Baseline
|
|
||||||
"base" - Alias for "baseline"
|
|
||||||
<number> - A number between 0.0 and 1.0 where 0.0 represents "top" and 1.0 represents "bottom"
|
|
||||||
<number>% - A percentage between 0% and 100% where 0% represents "top" and 100% represents "bottom"
|
|
||||||
valign=<value or preset>
|
|
||||||
See explanation of baseline at: https://en.wikipedia.org/wiki/Baseline_%28typography%29
|
|
||||||
|
|
||||||
Wrap
|
- $right_margin: Distance in pixels from the right side of the text block to the beginning of the text
|
||||||
Sets the wrap policy of the text. The value must be one of the following:
|
(inner margin). The value can be a number (to set the margin), or a number preceded by $[+] or $[-]
|
||||||
"word" - Only wraps lines at word boundaries
|
to increment or decrement the existing margin value. $reset is also accepted, to set the margin to
|
||||||
"char" - Wraps at any character
|
0 pixels.
|
||||||
"mixed" - Wrap at words if possible, if not at any character
|
Default value is $[0].
|
||||||
"hyphenation" - Hyphenate if possible, if not wrap at words if possible, if not at any character
|
Examples: $[right_margin=10], $[right_margin=+10], $[right_margin=reset].
|
||||||
"none" - Don't wrap, this is the default value
|
|
||||||
wrap=<value or preset>
|
|
||||||
|
|
||||||
Left margin
|
- $underline: Style of the underline. The value must be one of $off (No underlining),
|
||||||
Sets the left margin of the text (in pixel). The value can be a number, an increment, decrement or "reset":
|
$single (A single line under the text), $on (Alias for $single), $double (Two lines under the text),
|
||||||
+<number> - Increments existing left margin by <number>
|
$dashed (A dashed line under the text).
|
||||||
-<number> - Decrements existing left margin by <number>
|
Default value is $off.
|
||||||
<number> - Sets left margin to <number>
|
Requires either $underline_color, $underline2_color or $underline_dash_color.
|
||||||
"reset" - Sets left margin to 0
|
See @Efl.Text_Style.underline_type.
|
||||||
left_margin=<value or reset>
|
|
||||||
|
|
||||||
Right margin
|
- $strikethrough: Enables crossed-out text. Possible values are $on and $off.
|
||||||
Sets the right margin of the text (in pixel). The value can be a number, an increment, decrement or "reset":
|
Default value is $off.
|
||||||
+<number> - Increments existing right margin by <number>
|
Requires $strikethrough_color.
|
||||||
-<number> - Decrements existing right margin by <number>
|
See @Efl.Text_Style.strikethrough_type.
|
||||||
<number> - Sets left margin to <number>
|
|
||||||
"reset" - Sets left margin to 0
|
|
||||||
right_margin=<value or reset>
|
|
||||||
|
|
||||||
Underline
|
- $backing: Enables background color for the text. Possible values are $on and $off.
|
||||||
Sets if and how a text will be underlined. The value must be one of the following:
|
Default value is $off.
|
||||||
"off" - No underlining
|
Requires $backing_color.
|
||||||
"single" - A single line under the text
|
See @Efl.Text_Style.backing_type.
|
||||||
"on" - Alias for "single"
|
|
||||||
"double" - Two lines under the text
|
|
||||||
"dashed" - A dashed line under the text
|
|
||||||
underline=off/single/on/double/dashed
|
|
||||||
|
|
||||||
Strikethrough
|
- $style: Controls a number of decorations around the text, like shadow, outline and glow, including
|
||||||
Sets if the text will be striked through. The value must be one of the following:
|
combinations of them. Possible values are $plain (No decoration, alias for $off and $none),
|
||||||
"off" - No strikethrough
|
$shadow, $outline, $soft_outline, $outline_shadow, $outline_soft_shadow, $glow (alias for $soft_outline),
|
||||||
"on" - Strikethrough
|
$far_shadow, $soft_shadow and $far_soft_shadow.
|
||||||
strikethrough=on/off
|
All values involving a shadow accept a second parameter, separated by a comma, to indicate the shadow
|
||||||
|
direction. Valid positions are $bottom_right, $bottom, $bottom_left, $left, $top_left, $top, $top_right
|
||||||
|
and $right.
|
||||||
|
Default value is $plain.
|
||||||
|
Requires either $shadow_color, $glow_color or $outline_color.
|
||||||
|
Examples: $[style=outline], $[style=shadow,bottom_right], $[style=outline_shadow,bottom].
|
||||||
|
See @Efl.Text_Style.effect_type and @Efl.Text_Style.shadow_direction.
|
||||||
|
|
||||||
Backing
|
- $tabstops: Size (in pixels) of the tab character. The value must be a number greater than one.
|
||||||
Sets if the text will have background color enabled or disabled. The value must be one of the following:
|
Default value is $[32].
|
||||||
"off" - No backing
|
See @Efl.Text_Format.tabstops.
|
||||||
"on" - Backing
|
|
||||||
backing=on/off
|
|
||||||
|
|
||||||
Style
|
- $linesize: Distance (in pixels) from the baseline of one line of text to the next. This is, a value of
|
||||||
Sets the style of the text. The value must be a string composed of two comma separated parts.
|
$[0] would render all lines on top of each other (However, this value will be ignored if it results in
|
||||||
The first part of the value sets the appearance of the text, the second the position.
|
overlapping lines of text).
|
||||||
The first part may be any of the following values:
|
Setting this value sets $linerelsize to $[0%] (disables it).
|
||||||
"plain"
|
Default value is $[0].
|
||||||
"off" - Alias for "plain"
|
|
||||||
"none" - Alias for "plain"
|
|
||||||
"shadow"
|
|
||||||
"outline"
|
|
||||||
"soft_outline"
|
|
||||||
"outline_shadow"
|
|
||||||
"outline_soft_shadow"
|
|
||||||
"glow"
|
|
||||||
"far_shadow"
|
|
||||||
"soft_shadow"
|
|
||||||
"far_soft_shadow" The second part may be any of the following values:
|
|
||||||
"bottom_right"
|
|
||||||
"bottom"
|
|
||||||
"bottom_left"
|
|
||||||
"left"
|
|
||||||
"top_left"
|
|
||||||
"top"
|
|
||||||
"top_right"
|
|
||||||
"right"
|
|
||||||
style=<appearance>,<position>
|
|
||||||
|
|
||||||
Tabstops
|
- $linerelsize: Distance (in percentage over the natural line height) from the baseline of one line of
|
||||||
Sets the size (in pixel) of the tab character. The value must be a number greater than one.
|
text to the next. A value of $[100%] does not have any impact, smaller values render lines closer together
|
||||||
tabstops=<number>
|
and bigger values render them further apart.
|
||||||
|
Setting this value sets $linesize to $[0] (disables it).
|
||||||
|
Default value is $[0%].
|
||||||
|
|
||||||
Line size
|
- $linegap: Additional empty space (in pixels) between the bottom of one line of text and the top of the
|
||||||
Sets the size (in pixel) of line of text. The value should be a number.
|
next. Setting this value sets $linerelgap to $[0%] (disables it).
|
||||||
Setting this value sets linerelsize to 0%!
|
Default value is $[0].
|
||||||
linesize=<number>
|
See @Efl.Text_Format.linegap.
|
||||||
|
|
||||||
Relative line size
|
- $linerelgap: Additional empty space (in percentage over the natural line height) between the bottom of
|
||||||
Percentage indicating the wanted size of the line relative to the calculated size.
|
one line of text and the top of the next.
|
||||||
Setting this value sets linesize to 0!
|
Setting this value sets $linegap to $[0] (disables it).
|
||||||
linerelsize=<number>%
|
Default value is $[0%].
|
||||||
|
See @Efl.Text_Format.linerelgap.
|
||||||
|
|
||||||
Line gap
|
- $linefill: An alternate way to specify the $linesize as a percentage of the canvas height.
|
||||||
Sets the size (in pixel) of the line gap in text (distance between lines). The value should be a number.
|
A value of $[100%] means that a single line fills the canvas, whereas $[25%] means that 4 lines
|
||||||
Setting this value sets linerelgap to 0%!
|
fit in the same height.
|
||||||
linegap=<number>
|
When both $linefill and $linesize are specified the one resulting in the smallest line size is used.
|
||||||
|
Default value is $[0].
|
||||||
|
|
||||||
Relative line gap
|
- $ellipsis: Controls automatic addition of ellipsis "..." to replace text which cannot be shown.
|
||||||
Sets the relative size of the line gap in text based calculated size. The value must be a percentage.
|
The value must be a number indicating the position of the ellipsis inside the visible text.
|
||||||
Setting this value sets linegap to 0!
|
$[0.0] means the beginning of the text, $[1.0] means the end of the text, and values in between
|
||||||
linerelgap=<number>%
|
mean the proportional position inside the text.
|
||||||
|
Any value smaller than 0 or greater than 1 disables ellipsis.
|
||||||
|
Default value is $[-1].
|
||||||
|
Examples: $[ellipsis=0.5
|
||||||
|
See @Efl.Text_Format.ellipsis.
|
||||||
|
|
||||||
Line fill
|
- $password: Enabling this causes all characters to be replaced by $replacement_char.
|
||||||
Sets the size of the line fill in text. The value must be a percentage (how much line fill its canvas).
|
This is useful for password input boxes.
|
||||||
For example setting value to 100%, means the one line will fill it canvas.
|
Value must be either $on or $off.
|
||||||
linefill=<number>%
|
Default value is $[off].
|
||||||
|
Requires $replacement_char.
|
||||||
|
See @Efl.Text_Format.password.
|
||||||
|
|
||||||
Ellipsis
|
- $replacement_char: Character to use instead of the actual characters when $password is $on.
|
||||||
Sets ellipsis mode. The value should be a number.
|
Default value is empty, meaning that no replacement will take place.
|
||||||
Any value smaller than 0.0 or greater than 1.0 disables ellipsis.
|
Requires $password.
|
||||||
A value of 0 means ellipsizing the leftmost portion of the text first, 1 on the other hand the rightmost portion.
|
Examples: $[replacement_char=*].
|
||||||
ellipsis=<number>
|
See @Efl.Text_Format.replacement_char.
|
||||||
|
|
||||||
Password
|
- $underline_dash_width: Length (in pixels) of the dashes when $underline is $dashed.
|
||||||
Sets if the text is being used for passwords.
|
Default value is $[6].
|
||||||
Enabling this causes all characters to be substituted for '*'. Value must be one of the following:
|
See @Efl.Text_Style.underline_dashed_width.
|
||||||
"on" - Enable
|
|
||||||
"off" - Disable
|
|
||||||
password=on/off
|
|
||||||
|
|
||||||
Underline dash width
|
- $underline_dash_gap: Length (in pixels) of the gaps between the dashes when $underline is $dashed.
|
||||||
Sets the width of the underline dash (in pixel). The value should be a number.
|
Default value is $[2].
|
||||||
underline_dash_width=<number>
|
See @Efl.Text_Style.underline_dashed_gap.
|
||||||
|
|
||||||
Underline dash gap
|
- $underline_height: Width (in pixels) of the single underline when $underline is $single.
|
||||||
Sets the gap of the underline dash (in pixel). The value should be a number.
|
Default value is $[1].
|
||||||
underline_dash_gap=<number>
|
See @Efl.Text_Style.underline_height.
|
||||||
|
|
||||||
Underline height
|
- $gfx_filter: Experimental filter name. See @Efl.Gfx.Filter for more information.
|
||||||
Sets the height of the single underline (in pixel). The value should be a floating number.
|
|
||||||
underline_height=<floatingnumber>
|
|
||||||
|
|
||||||
Gfx Filter
|
Color codes: Colors can be specified using any of the following formats:
|
||||||
Experimental filter, see efl_gfx_filter for more information.
|
$[#RRGGBB], $[#RRGGBBAA], $[#RGB], $[#RGBA], $[rgb(r,g,b)], $[rgba(r,g,b,a)].
|
||||||
gfx_filter='filter name'
|
Additionally, X11 color names like $red or $blanchedalmond can be used.
|
||||||
|
See https://en.wikipedia.org/wiki/X11_color_names for the full list.
|
||||||
]]
|
]]
|
||||||
|
|
||||||
params {
|
params {
|
||||||
@in style: string; [[A whitespace-separated list of $[property=value] pairs, for example, $[font=sans font_size=30].]]
|
@in style: string; [[A whitespace-separated list of $[attribute=value] pairs, for example,
|
||||||
|
$[font=sans font_size=30 color=white].]]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@property all_styles {
|
@property all_styles {
|
||||||
[[A string representing the complete set of styles applied to this text object.
|
[[A string representing the complete set of attributes applied to this text object.
|
||||||
This includes the default attributes plus any additional style applied with @.style_apply
|
This includes the default attributes plus any additional style applied with @.style_apply
|
||||||
or individual style properties like @Efl.Text_Font.font_slant or @Efl.Text_Format.wrap.]]
|
or individual style properties like @Efl.Text_Font.font_slant or @Efl.Text_Format.wrap.
|
||||||
|
|
||||||
|
See @.style_apply for the description of all attributes.
|
||||||
|
]]
|
||||||
get {}
|
get {}
|
||||||
values {
|
values {
|
||||||
style: string; [[A whitespace-separated list of $[property=value] pairs, for example,
|
style: string; [[A whitespace-separated list of $[attribute=value] pairs, for example,
|
||||||
$[font=sans size=30]. Do not free.]]
|
$[font=sans font_size=30 color=white].]]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@property size_formatted {
|
@property size_formatted {
|
||||||
|
|
Loading…
Reference in New Issue