| ATK Library Reference Manual | |||
|---|---|---|---|
| <<< Previous Page | Home | Up | Next Page >>> | 
| struct AtkEditableText; struct AtkEditableTextIface; gboolean atk_editable_text_set_run_attributes (AtkEditableText *text, AtkAttributeSet *attrib_set, gint start_offset, gint end_offset); void atk_editable_text_set_text_contents (AtkEditableText *text, const gchar *string); void atk_editable_text_insert_text (AtkEditableText *text, const gchar *string, gint length, gint *position); void atk_editable_text_copy_text (AtkEditableText *text, gint start_pos, gint end_pos); void atk_editable_text_cut_text (AtkEditableText *text, gint start_pos, gint end_pos); void atk_editable_text_delete_text (AtkEditableText *text, gint start_pos, gint end_pos); void atk_editable_text_paste_text (AtkEditableText *text, gint position); | 
| struct AtkEditableTextIface
{
  GTypeInterface parent_interface;
  gboolean (* set_run_attributes) (AtkEditableText  *text,
                                   AtkAttributeSet  *attrib_set,
                                   gint		    start_offset,
 				   gint		    end_offset);
  void   (* set_text_contents)    (AtkEditableText  *text,
                                   const gchar      *string);
  void   (* insert_text)          (AtkEditableText  *text,
                                   const gchar      *string,
                                   gint             length,
                                   gint             *position);
  void   (* copy_text)            (AtkEditableText  *text,
                                   gint             start_pos,
                                   gint             end_pos);
  void   (* cut_text)             (AtkEditableText  *text,
                                   gint             start_pos,
                                   gint             end_pos);
  void   (* delete_text)          (AtkEditableText  *text,
                                   gint             start_pos,
                                   gint             end_pos);
  void   (* paste_text)           (AtkEditableText  *text,
                                   gint             position);
}; | 
| gboolean atk_editable_text_set_run_attributes (AtkEditableText *text, AtkAttributeSet *attrib_set, gint start_offset, gint 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.
| text : | an AtkEditableText | 
| attrib_set : | an AtkAttributeSet | 
| start_offset : | start of range in which to set attributes | 
| end_offset : | end of range in which to set attributes | 
| Returns : | TRUE if attributes successfully set for the specified range, otherwise FALSE | 
| void        atk_editable_text_set_text_contents
                                            (AtkEditableText *text,
                                             const gchar *string); | 
Set text contents of text.
| text : | an AtkEditableText | 
| string : | string to set for text contents of text | 
| void atk_editable_text_insert_text (AtkEditableText *text, const gchar *string, gint length, gint *position); | 
Insert text at a given position.
| text : | an AtkEditableText | 
| string : | the text to insert | 
| length : | the length of text to insert, in bytes | 
| position : | 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. | 
| void atk_editable_text_copy_text (AtkEditableText *text, gint start_pos, gint end_pos); | 
Copy text from start_pos up to, but not including end_pos to the clipboard.
| text : | an AtkEditableText | 
| start_pos : | start position | 
| end_pos : | end position | 
| void atk_editable_text_cut_text (AtkEditableText *text, gint start_pos, gint end_pos); | 
Copy text from start_pos up to, but not including end_pos to the clipboard and then delete from the widget.
| text : | an AtkEditableText | 
| start_pos : | start position | 
| end_pos : | end position | 
| void atk_editable_text_delete_text (AtkEditableText *text, gint start_pos, gint end_pos); | 
Delete text start_pos up to, but not including end_pos.
| text : | an AtkEditableText | 
| start_pos : | start position | 
| end_pos : | end position | 
| void atk_editable_text_paste_text (AtkEditableText *text, gint position); | 
Paste text from clipboard to specified position.
| text : | an AtkEditableText | 
| position : | position to paste |