Logo Search packages:      
Sourcecode: ardour version File versions  Download package

Atk::Text Class Reference

#include <text.h>

Inheritance diagram for Atk::Text:

sigc::trackable Atk::NoOpObject

List of all members.


Detailed Description

The ATK interface implemented by components with text content. This should be implemented by Atk::Objects on behalf of widgets that have text content which is either attributed or otherwise non-trivial. Atk::Objects whose text content is simple, unattributed, and very brief may expose that content via Atk::Object::get_name() instead; however if the text is editable, multi-line, typically longer than three or four words, attributed, selectable, or if the object already uses the 'name' ATK property for other information, this Text interface should be used to expose the text content. In the case of editable text content, Atk::EditableText (a subtype of the Atk::Text interface) should be implemented instead.

Atk::Text provides not only traversal facilities and change notification for text content, but also caret tracking and glyph bounding box calculations. Note that the text strings are exposed as UTF-8, and are therefore potentially multi-byte, and caret-to-byte offset mapping makes no assumptions about the character length; also bounding box glyph-to-offset mapping may be complex for languages which use ligatures.

Definition at line 278 of file text.h.


Public Types

typedef AtkTextIface BaseClassType
typedef AtkText BaseObjectType
typedef Text_Class CppClassType
typedef Text CppObjectType
typedef AtkTextRectangle Rectangle

Public Member Functions

bool _cpp_destruction_is_in_progress () const
bool add_selection (int start_offset, int end_offset)
AtkTextRange ** get_bounded_ranges (const Rectangle &rect, CoordType coord_type, TextClipType x_clip_type, TextClipType y_clip_type)
int get_caret_offset () const
gunichar get_character_at_offset (int offset) const
int get_character_count () const
void get_character_extents (int offset, int &x, int &y, int &width, int &height, CoordType coords) const
AttributeSet get_default_attributes () const
int get_n_selections () const
int get_offset_at_point (int x, int y, CoordType coords) const
template<class PropertyType>
void get_property (const Glib::ustring &property_name, PropertyType &value) const
 You probably want to use a specific property_*() accessor method instead.
void get_property_value (const Glib::ustring &property_name, Glib::ValueBase &value) const
 You probably want to use a specific property_*() accessor method instead.
void get_range_extents (int start_offset, int end_offset, CoordType coord_type, Rectangle &rect)
AttributeSet get_run_attributes (int offset, int &start_offset, int &end_offset) const
Glib::ustring get_selection (int selection_num, int &start_offset, int &end_offset) const
Glib::ustring get_text (int start_offset, int end_offset) const
Glib::ustring get_text_after_offset (int offset, TextBoundary boundary_type, int &start_offset, int &end_offset) const
Glib::ustring get_text_at_offset (int offset, TextBoundary boundary_type, int &start_offset, int &end_offset) const
Glib::ustring get_text_before_offset (int offset, TextBoundary boundary_type, int &start_offset, int &end_offset) const
const AtkText * gobj () const
 Provides access to the underlying C GObject.
AtkText * gobj ()
 Provides access to the underlying C GObject.
GObject * gobj_copy () const
virtual void reference () const
bool remove_selection (int selection_num)
bool set_caret_offset (int offset)
template<class PropertyType>
void set_property (const Glib::ustring &property_name, const PropertyType &value)
 You probably want to use a specific property_*() accessor method instead.
void set_property_value (const Glib::ustring &property_name, const Glib::ValueBase &value)
 You probably want to use a specific property_*() accessor method instead.
bool set_selection (int selection_num, int start_offset, int end_offset)
Glib::SignalProxy0< void > signal_text_attributes_changed ()
Glib::SignalProxy1< void, int > signal_text_caret_moved ()
Glib::SignalProxy2< void, int,
int > 
signal_text_changed ()
Glib::SignalProxy0< void > signal_text_selection_changed ()
virtual void unreference () const

Static Public Member Functions

static ObjectBase * _get_current_wrapper (GObject *object)
static void add_interface (GType gtype_implementer)
static GType get_base_type () G_GNUC_CONST
static GType get_type () G_GNUC_CONST

Protected Member Functions

void _set_current_wrapper (GObject *object)
virtual bool add_selection_vfunc (int start_offset, int end_offset)
virtual void destroy_notify_ ()
virtual int get_caret_offset_vfunc () const
virtual gunichar get_character_at_offset_vfunc (int offset) const
virtual int get_character_count_vfunc () const
virtual void get_character_extents_vfunc (int offset, int &x, int &y, int &width, int &height, CoordType coords) const
virtual AtkAttributeSet * get_default_attributes_vfunc () const
virtual int get_n_selections_vfunc () const
virtual int get_offset_at_point_vfunc (int x, int y, CoordType coords) const
virtual AtkAttributeSet * get_run_attributes_vfunc (int offset, int &start_offset, int &end_offset) const
virtual Glib::ustring get_selection_vfunc (int selection_num, int &start_offset, int &end_offset) const
virtual Glib::ustring get_text_after_offset_vfunc (int offset, TextBoundary boundary_type, int &start_offset, int &end_offset) const
virtual Glib::ustring get_text_at_offset_vfunc (int offset, TextBoundary boundary_type, int &start_offset, int &end_offset) const
virtual Glib::ustring get_text_before_offset_vfunc (int offset, TextBoundary boundary_type, int &start_offset, int &end_offset) const
virtual Glib::ustring get_text_vfunc (int start_offset, int end_offset) const
void initialize (GObject *castitem)
bool is_anonymous_custom_ () const
bool is_derived_ () const
virtual void on_text_attributes_changed ()
virtual void on_text_caret_moved (int location)
virtual void on_text_changed (int position, int length)
virtual void on_text_selection_changed ()
virtual bool remove_selection_vfunc (int selection_num)
virtual bool set_caret_offset_vfunc (int offset)
virtual bool set_selection_vfunc (int selection_num, int start_offset, int end_offset)
 Text (AtkText *castitem)

Static Protected Member Functions

static void destroy_notify_callback_ (void *data)

Protected Attributes

bool cpp_destruction_in_progress_
const char * custom_type_name_
GObject * gobject_

Package Functions

void add_destroy_notify_callback (void *data, func_destroy_notify func) const
void notify_callbacks ()
 Execute and remove all previously installed callbacks.
void remove_destroy_notify_callback (void *data) const

Package Attributes

 __pad0__:func_destroy_notify func_destroy_notify

Private Member Functions

Textoperator= (const Text &)
 Text (const Text &)

Static Private Attributes

static CppClassType text_class_

Friends

class Glib::GSigConnectionNode
class Text_Class

Related Functions

(Note that these are not member functions.)

Glib::RefPtr< Atk::Textwrap (AtkText *object, bool take_copy=false)

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

Generated by  Doxygen 1.6.0   Back to index