atk.EditableText
atk.EditableText — the ATK interface implemented by components containing user-editable text content.
Synopsis
class atk.EditableText(gobject.GInterface): |
Description
atk.EditableText
should be implemented by UI components which contain text which the user
can edit, via the atk.Object
corresponding to that component (see atk.Object
).
atk.EditableText
is a subclass of atk.Text
, and as
such, an object which implements atk.EditableText
is by definition an atk.Text
implementor as well.
Methods
atk.EditableText.set_run_attributes
def set_run_attributes(attrib_set
, start_offset
, end_offset
)
| a sequence of 2-tuples containing name-value string pairs. |
| start of range in which to set attributes |
| end of range in which to set attributes |
Returns : | True if attributes were
successfully set for the specified range, otherwise
False |
Sets the attributes for a specified range. See the Atk Text Attribute Constants (such as
atk.TEXT_ATTR_LEFT_MARGIN
) for examples of
attributes that can be set. Note that other attributes that do not
have corresponding Atk Text Attribute Constants may also be set for
certain text widgets.
atk.EditableText.set_text_contents
def set_text_contents(string
)
| string to set for text contents of the text |
Set text contents of the text.
atk.EditableText.insert_text
def insert_text(string
, length
, position
)
| the text to insert |
| the length of text to insert, in bytes |
| the position at which to insert the text |
Returns : | the position after the newly inserted text. |
Insert text at a given position.
atk.EditableText.copy_text
def copy_text(start_pos
, end_pos
)
| start position |
| end position |
Copy text from start_pos
up to, but not
including end_pos
to the clipboard.
atk.EditableText.cut_text
def cut_text(start_pos
, end_pos
)
| start position |
| end position |
Copy text from start_pos
up to, but not
including end_pos
to the clipboard and then
delete from the widget.