GLXCurses.TextTag module

class GLXCurses.TextTag.TextTag[source]

Bases: GLXCurses.Object.Object

You may wish to begin by reading the text widget conceptual overview which gives an overview of all the objects and data types related to the text widget and how they work together.

Tags should be in the TextTagTable for a given TextBuffer before using them with that buffer.

For each property of TextTag, there is a “set” property, e.g. “font-set” corresponds to “font”. These “set” properties reflect whether a property has been set or not.

They are maintained by GLXCurses and you should not set them independently.

accumulative_margin

Whether the margins accumulate or override each other.

When set to True the margins of this tag are added to the margins of any other non-accumulative margins present.

When set to False the margins override one another (the default).

Default value is False and be restore when accumulative_margin is set to None

Returns:If True the margins of this tag are added to the margins of any other non-accumulative
Return type:bool
background

Background color as a string.

Returns:color as a string
Return type:str
background_full_height

Whether the background color fills the entire line height or only the height of the tagged characters.

When set to True the background color fills the entire line height

Default value is False and be restore when background_full_height is set to None

Returns:If True the background color fills the entire line height
Return type:bool
background_full_height_set

Whether this tag affects background height.

When set to True this tag affects background height

Default value is False and be restore when background_full_height_set is set to None

Returns:True If this tag affects background height
Return type:bool
background_rgb

Background color as a RGB.

Default value is {'r': 0, 'g': 0, 'b': 255} and be restore when background_rgb is set to None

Returns:The RGB color as dict with r, g, b key_name
Return type:dict
background_set

Whether this tag affects the background color.

Default value is False and be restore when background_set is set to None

Returns:If True, this tag affects the background color
Return type:bool
direction

Text direction, e.g. right-to-left -> ‘RTL’ or left-to-right -> ‘LTR’.

Returns:GLXC.TextDirection direction type
Return type:str
editable

Whether the text can be modified by the user.

Default value is True and be restore when editable is set to None

Returns:If True, the text can be modified by the user.
Return type:bool
editable_set

Whether this tag affects text editability.

Default value is False and be restore when editable_set is set to None

Returns:If False, text editability is disable
Return type:bool
family

Name of the font family, e.g. Sans, Helvetica, Times, Monospace.

Default value is None and be restore when family is set to None

Returns:The font family name
Return type:str or None
family_set

Whether this tag affects the font family.

Default value is False and be restore when editable_set is set to None

Returns:If False, text editability is disable
Return type:bool