GFC Logo GFC Title Logo
Reference Manual
Main Page  |  Namespace List  |  Alphabetical List  |  Class List  |  File List

GFC::Atk::EditableText Class Reference

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

#include <gfc/atk/editabletext.hh>

Inheritance diagram for GFC::Atk::EditableText:

GFC::G::TypeInterface GFC::G::TypeInstance GFC::Trackable List of all members.

Public Member Functions

Accessors
Methods

Protected Member Functions

Constructors

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 GFC::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 GFC::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 GFC::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 GFC::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 GFC::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 GFC::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 GFC::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:
Generated on Tue Aug 24 00:34:34 2004 for GFC-UI by doxygen 1.3.8