Previous topic

efl.evas.Text Class

Next topic

efl.evas.Box Class

efl.evas.Textblock Class

class efl.evas.Textblock

Bases: efl.evas.Object

A Textblock.

Parameters:
  • canvas (Canvas) – Evas canvas for this object
  • size (tuple of ints) – Width and height
  • pos (tuple of ints) – X and Y
  • geometry (tuple of ints) – X, Y, width, height
  • color (tuple of ints) – R, G, B, A
  • name (string) – Object name
  • text_markup (string) – Markup text
  • style (string) – The style
clear()

Clear the Textblock

line_number_geometry_get(int index) -> (int x, int y, int w, int h)

Retrieve position and dimension information of a specific line.

This function is used to obtain the x, y, width and height of a the line located at index within this object.

Parameters:index – index of desired line
Return type:(int x, int y, int w, int h)
replace_char

Replacement character

Type :unicode
size_formatted

Get the formatted width and height. This calculates the actual size after restricting the textblock to the current size of the object. The main difference between this and size_native is that the “native” function does not wrapping into account it just calculates the real width of the object if it was placed on an infinite canvas, while this function gives the size after wrapping according to the size restrictions of the object.

For example for a textblock containing the text: “You shall not pass!” with no margins or padding and assuming a monospace font and a size of 7x10 char widths (for simplicity) has a native size of 19x1 and a formatted size of 5x4.

Type :(int w, int h)
See :size_native
size_native

Get the native width and height. This calculates the actual size without taking account the current size of the object. The main difference between this and size_formatted is that the “native” function does not take wrapping into account it just calculates the real width of the object if it was placed on an infinite canvas, while the “formatted” function gives the size after wrapping text according to the size restrictions of the object.

For example for a textblock containing the text: “You shall not pass!” with no margins or padding and assuming a monospace font and a size of 7x10 char widths (for simplicity) has a native size of 19x1 and a formatted size of 5x4.

Type :(int w, int h)
style

Style

Type :unicode
style_insets

Style insets

text_markup

Markup text

Type :unicode