Bases: efl.evas.Object
New in version 1.8.
The size of a cell of the given textgrid object in pixels.
This functions retrieves the width and height, in pixels, of a cell of the textgrid object obj and store them respectively in the buffers width and height. Their value depends on the monospace font used for the textgrid object, as well as the style. width and height can be None. On error, they are set to 0.
| Type : | (int width, int height) |
|---|
See also
Get the string at the given row of the given textgrid object.
| Parameters: | y – The row index of the grid. |
|---|---|
| Returns: | A pointer to the first cell of the given row. |
This function returns a pointer to the first cell of the line y of the textgrid object obj. If y is not between 0 and the number of lines of the grid - 1, or on error, this function return None.
See also
Set the string at the given row of the given textgrid object.
| Parameters: |
|
|---|
This function returns cells to the textgrid taken by cellrow_get(). The row pointer row should be the same row pointer returned by cellrow_get() for the same row y.
See also
The font family and size on a given textgrid object.
This property allows the font_name and font_size of the textgrid object to be set. The font_name string has to follow fontconfig’s convention on naming fonts, as it’s the underlying library used to query system fonts by Evas (see the fc-list command’s output, on your system, to get an idea). It also has to be a monospace font. If font_name is None, or if it is an empty string, or if font_size is less or equal than 0, or on error, this function does nothing.
| Type : | (unicode font_name, unicode font_size) |
|---|---|
| See : | font_source |
The font (source) file used on a given textgrid object.
This allows the font file to be explicitly set for the textgrid object, overriding system lookup, which will first occur in the given file’s contents. If None or an empty string is assigned, or the same font_source has already been set, or on error, this does nothing.
| Type : | unicode |
|---|
See also
The retrieve color to the given palette at the given index of the given textgrid object.
| Parameters: |
|
|---|---|
| Return type: | (int r, int g, int b, int a) |
This function retrieves the color for the palette of type pal at the index idx of the textgrid object obj. The ARGB components are stored in the buffers r, g, b and a. If idx is not between 0 and the index of the latest set color, or if pal is EVAS_TEXTGRID_PALETTE_NONE or EVAS_TEXTGRID_PALETTE_LAST, the values of the components are 0. r, g, b and a can be None.
| See : | palette_set() |
|---|
The set color to the given palette at the given index of the given textgrid object.
| Parameters: |
|
|---|
This function sets the color for the palette of type pal at the index idx of the textgrid object obj. The ARGB components are given by r, g, b and a. This color can be used when setting the TextgridCell object. The components must set a pre-multiplied color. If pal is EVAS_TEXTGRID_PALETTE_NONE or EVAS_TEXTGRID_PALETTE_LAST, or if idx is not between 0 and 255, or on error, this function does nothing. The color components are clamped between 0 and 255. If idx is greater than the latest set color, the colors between this last index and idx - 1 are set to black (0, 0, 0, 0).
| See : | palette_get() |
|---|
The size of the textgrid object.
The number of lines h and the number of columns w of the textgrid object. Values less than or equal to 0 are ignored.
| Type : | (int w, int h) |
|---|
TODO: document this
Indicate for evas that part of a textgrid region (cells) has been updated.
| Parameters: |
|
|---|
This function declares to evas that a region of cells was updated by code and needs refreshing. An application should modify cells like this as an example:
cells = tg.cellrow_get(row)
for i in range(width):
cells[i].codepoint = 'E'
tg.cellrow_set(row, cells)
tg.update_add(0, row, width, 1)
See also
Bases: object
The values that describe each cell.
New in version 1.8.
the index of the palette for the background color
| Type : | int |
|---|
whether the extended palette is used for the background color
| Type : | bool |
|---|
whether the character is bold
| Type : | bool |
|---|
the UNICODE value of the character
| Type : | unicode |
|---|
If the codepoint is merged with the following cell to the right visually (cells must be in pairs with 2nd cell being a duplicate in all ways except codepoint is 0)
| Type : | bool |
|---|
the index of the palette for the foreground color
| Type : | int |
|---|
whether the extended palette is used for the foreground color
| Type : | bool |
|---|
whether the character is oblique
| Type : | bool |
|---|
whether the character is strikethrough’ed
| Type : | bool |
|---|
whether the character is underlined
| Type : | bool |
|---|