Atk.EditableText

g Atk.EditableText Atk.EditableText GObject.GInterface GObject.GInterface GObject.GInterface->Atk.EditableText

Implementations:
 Atk.NoOpObject

Methods

  copy_text (start_pos, end_pos)
  cut_text (start_pos, end_pos)
  delete_text (start_pos, end_pos)
  insert_text (string, length, position)
  paste_text (position)
  set_run_attributes (attrib_set, start_offset, end_offset)
  set_text_contents (string)

Virtual Methods

  do_copy_text (start_pos, end_pos)
  do_cut_text (start_pos, end_pos)
  do_delete_text (start_pos, end_pos)
  do_insert_text (string, length, position)
  do_paste_text (position)
  do_set_run_attributes (attrib_set, start_offset, end_offset)
  do_set_text_contents (string)

Properties

None

Signals

None

Fields

None

Class Details

class Atk.EditableText
Bases:GObject.GInterface
Structure:Atk.EditableTextIface

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.

See also: Atk.Text

copy_text(start_pos, end_pos)[source]
Parameters:
  • start_pos (int) – start position
  • end_pos (int) – end position

Copy text from start_pos up to, but not including end_pos to the clipboard.

cut_text(start_pos, end_pos)[source]
Parameters:
  • start_pos (int) – start position
  • end_pos (int) – end position

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

delete_text(start_pos, end_pos)[source]
Parameters:
  • start_pos (int) – start position
  • end_pos (int) – end position

Delete text start_pos up to, but not including end_pos.

insert_text(string, length, position)[source]
Parameters:
  • string (str) – the text to insert
  • length (int) – the length of text to insert, in bytes
  • position (int) – The caller initializes this to the position at which to insert the text. After the call it points at the position after the newly inserted text.

Insert text at a given position.

paste_text(position)[source]
Parameters:position (int) – position to paste

Paste text from clipboard to specified position.

set_run_attributes(attrib_set, start_offset, end_offset)[source]
Parameters:
  • attrib_set ([object]) – an #AtkAttributeSet
  • start_offset (int) – start of range in which to set attributes
  • end_offset (int) – end of range in which to set attributes
Returns:

True if attributes successfully set for the specified range, otherwise False

Return type:

bool

Sets the attributes for a specified range. See the ATK_ATTRIBUTE macros (such as #ATK_ATTRIBUTE_LEFT_MARGIN) for examples of attributes that can be set. Note that other attributes that do not have corresponding ATK_ATTRIBUTE macros may also be set for certain text widgets.

set_text_contents(string)[source]
Parameters:string (str) – string to set for text contents of self

Set text contents of self.

do_copy_text(start_pos, end_pos) virtual
Parameters:
  • start_pos (int) – start position
  • end_pos (int) – end position

Copy text from start_pos up to, but not including end_pos to the clipboard.

do_cut_text(start_pos, end_pos) virtual
Parameters:
  • start_pos (int) – start position
  • end_pos (int) – end position

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

do_delete_text(start_pos, end_pos) virtual
Parameters:
  • start_pos (int) – start position
  • end_pos (int) – end position

Delete text start_pos up to, but not including end_pos.

do_insert_text(string, length, position) virtual
Parameters:
  • string (str) – the text to insert
  • length (int) – the length of text to insert, in bytes
  • position (int) – The caller initializes this to the position at which to insert the text. After the call it points at the position after the newly inserted text.

Insert text at a given position.

do_paste_text(position) virtual
Parameters:position (int) – position to paste

Paste text from clipboard to specified position.

do_set_run_attributes(attrib_set, start_offset, end_offset) virtual
Parameters:
  • attrib_set ([object]) – an #AtkAttributeSet
  • start_offset (int) – start of range in which to set attributes
  • end_offset (int) – end of range in which to set attributes
Returns:

True if attributes successfully set for the specified range, otherwise False

Return type:

bool

Sets the attributes for a specified range. See the ATK_ATTRIBUTE macros (such as #ATK_ATTRIBUTE_LEFT_MARGIN) for examples of attributes that can be set. Note that other attributes that do not have corresponding ATK_ATTRIBUTE macros may also be set for certain text widgets.

do_set_text_contents(string) virtual
Parameters:string (str) – string to set for text contents of text

Set text contents of text.