atkmm 2.28.3
Public Member Functions | Static Public Member Functions | Protected Member Functions | Related Functions | List of all members
Atk::EditableText Class Reference

The ATK interface implemented by components containing user-editable text content. More...

#include <atkmm/editabletext.h>

Inheritance diagram for Atk::EditableText:
Inheritance graph
[legend]

Public Member Functions

 EditableText (EditableText && src) noexcept
 
EditableTextoperator= (EditableText && src) noexcept
 
 ~EditableText () noexcept override
 
AtkEditableText * gobj ()
 Provides access to the underlying C GObject. More...
 
const AtkEditableText * gobj () const
 Provides access to the underlying C GObject. More...
 
bool set_run_attributes (const AttributeSet & attrib_set, int start_offset, int end_offset)
 Sets the attributes for a specified range. More...
 
void set_text_contents (const Glib::ustring &string)
 Set text contents of text. More...
 
void insert_text (const Glib::ustring &string, int length, int & position)
 Insert text at a given position. More...
 
void copy_text (int start_pos, int end_pos)
 Copy text from start_pos up to, but not including end_pos to the clipboard. More...
 
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 from the widget. More...
 
void delete_text (int start_pos, int end_pos)
 Delete text start_pos up to, but not including end_pos. More...
 
void paste_text (int position)
 Paste text from clipboard to specified position. More...
 

Static Public Member Functions

static void add_interface (GType gtype_implementer)
 
static GType get_type ()
 Get the GType for this class, for use with the underlying GObject type system. More...
 

Protected Member Functions

 EditableText ()
 You should derive from this class to use it. More...
 
virtual bool set_run_attributes_vfunc (AtkAttributeSet * attrib_set, int start_offset, int end_offset)
 
virtual void set_text_contents_vfunc (const Glib::ustring &string)
 
virtual void insert_text_vfunc (const Glib::ustring &string, int length, int & position)
 
virtual void copy_text_vfunc (int start_pos, int end_pos)
 
virtual void cut_text_vfunc (int start_pos, int end_pos)
 
virtual void delete_text_vfunc (int start_pos, int end_pos)
 
virtual void paste_text_vfunc (int position)
 

Related Functions

(Note that these are not member functions.)

Glib::RefPtr< Atk::EditableTextwrap (AtkEditableText * object, bool take_copy=false)
 A Glib::wrap() method for this object. More...
 

Detailed Description

The ATK interface implemented by components containing user-editable text content.

This 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).

An object which implements EditableText shall also implement Atk::Text.

Constructor & Destructor Documentation

◆ EditableText() [1/2]

Atk::EditableText::EditableText ( )
protected

You should derive from this class to use it.

◆ EditableText() [2/2]

Atk::EditableText::EditableText ( EditableText &&  src)
noexcept

◆ ~EditableText()

Atk::EditableText::~EditableText ( )
overridenoexcept

Member Function Documentation

◆ add_interface()

static void Atk::EditableText::add_interface ( GType  gtype_implementer)
static

◆ copy_text()

void 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_posStart position.
end_posEnd position.

◆ copy_text_vfunc()

virtual void Atk::EditableText::copy_text_vfunc ( int  start_pos,
int  end_pos 
)
protectedvirtual

◆ cut_text()

void 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 from the widget.

Parameters
start_posStart position.
end_posEnd position.

◆ cut_text_vfunc()

virtual void Atk::EditableText::cut_text_vfunc ( int  start_pos,
int  end_pos 
)
protectedvirtual

◆ delete_text()

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

Delete text start_pos up to, but not including end_pos.

Parameters
start_posStart position.
end_posEnd position.

◆ delete_text_vfunc()

virtual void Atk::EditableText::delete_text_vfunc ( int  start_pos,
int  end_pos 
)
protectedvirtual

◆ get_type()

static GType Atk::EditableText::get_type ( )
static

Get the GType for this class, for use with the underlying GObject type system.

◆ gobj() [1/2]

AtkEditableText * Atk::EditableText::gobj ( )
inline

Provides access to the underlying C GObject.

◆ gobj() [2/2]

const AtkEditableText * Atk::EditableText::gobj ( ) const
inline

Provides access to the underlying C GObject.

◆ insert_text()

void Atk::EditableText::insert_text ( const Glib::ustring &  string,
int  length,
int &  position 
)

Insert text at a given position.

Parameters
stringThe text to insert.
lengthThe length of text to insert, in bytes.
positionThe 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_vfunc()

virtual void Atk::EditableText::insert_text_vfunc ( const Glib::ustring &  string,
int  length,
int &  position 
)
protectedvirtual

◆ operator=()

EditableText & Atk::EditableText::operator= ( EditableText &&  src)
noexcept

◆ paste_text()

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

Paste text from clipboard to specified position.

Parameters
positionPosition to paste.

◆ paste_text_vfunc()

virtual void Atk::EditableText::paste_text_vfunc ( int  position)
protectedvirtual

◆ set_run_attributes()

bool Atk::EditableText::set_run_attributes ( const AttributeSet attrib_set,
int  start_offset,
int  end_offset 
)

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.

Parameters
attrib_setAn Atk::AttributeSet.
start_offsetStart of range in which to set attributes.
end_offsetEnd of range in which to set attributes.
Returns
true if attributes successfully set for the specified range, otherwise false.

◆ set_run_attributes_vfunc()

virtual bool Atk::EditableText::set_run_attributes_vfunc ( AtkAttributeSet *  attrib_set,
int  start_offset,
int  end_offset 
)
protectedvirtual

◆ set_text_contents()

void Atk::EditableText::set_text_contents ( const Glib::ustring &  string)

Set text contents of text.

Parameters
stringString to set for text contents of text.

◆ set_text_contents_vfunc()

virtual void Atk::EditableText::set_text_contents_vfunc ( const Glib::ustring &  string)
protectedvirtual

Friends And Related Function Documentation

◆ wrap()

Glib::RefPtr< Atk::EditableText > wrap ( AtkEditableText *  object,
bool  take_copy = false 
)
related

A Glib::wrap() method for this object.

Parameters
objectThe C instance.
take_copyFalse if the result should take ownership of the C instance. True if it should take a new copy or ref.
Returns
A C++ instance that wraps this C instance.