manpagez: man pages & more
html files: pygtk
Home | html | info | man
atk.EditableText — the ATK interface implemented by components containing user-editable text content.

Synopsis

class atk.EditableText(gobject.GInterface):
    def set_run_attributes(attrib_set, start_offset, end_offset)
def set_text_contents(string)
def insert_text(string, length, position)
def copy_text(start_pos, end_pos)
def cut_text(start_pos, end_pos)
def delete_text(start_pos, end_pos)
def paste_text(position)

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)

attrib_set :

a sequence of 2-tuples containing name-value string pairs.

start_offset :

start of range in which to set attributes

end_offset :

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 :

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)

string :

the text to insert

length :

the length of text to insert, in bytes

position :

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_pos :

start position

end_pos :

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_pos :

start position

end_pos :

end position

Copy text from start_pos up to, but not including end_pos to the clipboard and then delete from the widget.

atk.EditableText.delete_text

    def delete_text(start_pos, end_pos)

start_pos :

start position

end_pos :

end position

Delete text start_pos up to, but not including end_pos.

atk.EditableText.paste_text

    def paste_text(position)

position :

position to paste

Paste text from clipboard to the specified position.

© manpagez.com 2000-2017
Individual documents may contain additional copyright information.