Reference Manual

Main Page | Namespace List | Class Hierarchy | Alphabetical List | Compound List | File List | Namespace Members | Compound Members | File Members

# Inti::Atk::EditableText Class Reference

A AtkEditableText C++ wrapper class. More...

`#include <inti/atk/editabletext.h>`

Inheritance diagram for Inti::Atk::EditableText:

List of all members.

## Public Member Functions

Accessors

- AtkEditableText * atk_editable_text () const
    Get a pointer to the AtkEditableText structure.
- AtkEditableTextIface * atk_editable_text_iface () const
    Get a pointer to the AtkEditableTextIface structure.
- operator AtkEditableText * () const
    Conversion operator; safely converts an EditableText to an AtkEditableText pointer.

Methods

- bool set_run_attributes (const std::vector< Attribute > &attribs, int start_offset, int end_offset)
    Sets the attributes for a specified range.
- void set_text_contents (const String &str)
    Set str as the text contents of the EditableText.
- void insert_text (const String &str, int *position)
    Insert text at the given position.
- void copy_text (int start_pos, int end_pos)
    Copy text from start_pos up to, but not including end_pos to the clipboard.
- void cut_text (int start_pos, int end_pos)
    Copy text from start_pos up to, but not including end_pos to the clipboard and then delete the text from the widget.
- void delete_text (int start_pos, int end_pos)
    Delete text from start_pos up to, but not including end_pos.
- void paste_text (int position)
    Paste text from the clipboard to the specified position.

## Protected Member Functions

Constructors

- virtual ~EditableText ()=0
    Destructor.

## Detailed Description

A AtkEditableText C++ wrapper class.

The EditableText interface 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).

EditableText is a subclass of Text, and as such, an object which implements EditableText is by definition a Text implementor as well.

## Member Function Documentation

void Inti::Atk::EditableText::copy_text | ( | int | start_pos,
|  | int | end_pos
| ) |

  | Copy text from start_pos up to, but not including end_pos to the clipboard. Parameters:
  start_pos | The start position.
  end_pos | The end position.

void Inti::Atk::EditableText::cut_text | ( | int | start_pos,
|  | int | end_pos
| ) |

  | Copy text from start_pos up to, but not including end_pos to the clipboard and then delete the text from the widget. Parameters:
  start_pos | The start position.
  end_pos | The end position.

void Inti::Atk::EditableText::delete_text | ( | int | start_pos,
|  | int | end_pos
| ) |

  | Delete text from start_pos up to, but not including end_pos. Parameters:
  start_pos | The start position.
  end_pos | The end position.

void Inti::Atk::EditableText::insert_text | ( | const String & | str,
|  | int * | position
| ) |

  | Insert text at the given position. Parameters:
  str | The text to insert.
  position | The caller initializes this to the position at which to insert the text.
When the method returns position points to the position after the newly inserted text.

void Inti::Atk::EditableText::paste_text | ( | int | position | ) |

  | Paste text from the clipboard to the specified position. Parameters:
  position | The position to paste the text to.

bool Inti::Atk::EditableText::set_run_attributes | ( | const std::vector< Attribute > & | attribs,
|  | int | start_offset,
|  | int | end_offset
| ) |

  | Sets the attributes for a specified range. Parameters:
  attribs | A reference to a vector of Attribute that holds the list of attributes to set.
  start_offset | The start of the range in which to set the attributes.
  end_offset | The end of the range in which to set the attributes.
Returns: true if the attributes were successfully set for the specified range, otherwise false. See the Atk::TextAttribute enum for examples of attributes that can be set, such as TEXT_ATTR_LEFT_MARGIN. Note that other attributes that do not have a corresponding TextAttribute may also be set for certain text widgets.

void Inti::Atk::EditableText::set_text_contents | ( | const String & | str | ) |

  | Set str as the text contents of the EditableText. Parameters:
  str | The string to set as the text contents of the EditableText.

The documentation for this class was generated from the following file:

- editabletext.h

Main Page - Footer