gtk+-2.0 Reference Manual

Synopsis

public class TextBuffer : Object  {
    public    weak TextBTree            btree ;
    public    weak GLib.SList           clipboard_contents_buffers ;
    public    weak GLib.SList           selection_clipboards ;
    public    weak TextLogAttrCache     log_attr_cache ;
    public    uint                      user_action_count ;
    public    uint                      modified ;


    public    weak TargetList           copy_target_list          { get; } ;
    public    weak int                  cursor_position           { get; } ;
    public    weak bool                 has_selection             { get; } ;
    public    weak TargetList           paste_target_list         { get; } ;
    public    weak TextTagTable         tag_table                 { get; construct } ;
    public    weak string               text                      { get; set; } ;


    public                              TextBuffer                ( TextTagTable        table ) ;


    public    signal void               apply_tag                 ( TextTag             tag,
                                                                    TextIter            start_char,
                                                                    TextIter            end_char )  ;
    public    signal void               begin_user_action         (  )  ;
    public    signal void               changed                   (  )  ;
    public    signal void               delete_range              ( TextIter            start,
                                                                    TextIter            end )  ;
    public    signal void               end_user_action           (  )  ;
    public    signal void               insert_child_anchor       ( TextIter            pos,
                                                                    TextChildAnchor     anchor )  ;
    public    signal void               insert_pixbuf             ( TextIter            pos,
                                                                    Gdk.Pixbuf          pixbuf )  ;
    public    signal void               insert_text               ( TextIter            pos,
                                                                    string              text,
                                                                    int                 length )  ;
    public    signal void               mark_deleted              ( TextMark            mark )  ;
    public    signal void               mark_set                  ( TextIter            location,
                                                                    TextMark            mark )  ;
    public    signal void               modified_changed          (  )  ;
    public    signal void               remove_tag                ( TextTag             tag,
                                                                    TextIter            start_char,
                                                                    TextIter            end_char )  ;


    public    void                      add_mark                  ( TextMark            mark,
                                                                    TextIter            where ) ;
    public    void                      add_selection_clipboard   ( Clipboard           clipboard ) ;
    public    void                      apply_tag_by_name         ( string              name,
                                                                    TextIter            start,
                                                                    TextIter            end ) ;
    public    bool                      backspace                 ( TextIter            iter,
                                                                    bool                interactive,
                                                                    bool                default_editable ) ;
    public    void                      copy_clipboard            ( Clipboard           clipboard ) ;
    public    weak TextChildAnchor      create_child_anchor       ( TextIter            iter ) ;
    public    weak TextMark             create_mark               ( string?             mark_name,
                                                                    TextIter            where,
                                                                    bool                left_gravity ) ;
    public    weak TextTag              create_tag                ( string              tag_name,
                                                                    ... ) ;
    public    void                      cut_clipboard             ( Clipboard           clipboard,
                                                                    bool                default_editable ) ;
    public    void                      delete                    ( TextIter            start,
                                                                    TextIter            end ) ;
    public    bool                      delete_interactive        ( TextIter            start_iter,
                                                                    TextIter            end_iter,
                                                                    bool                default_editable ) ;
    public    void                      delete_mark               ( TextMark            mark ) ;
    public    void                      delete_mark_by_name       ( string              name ) ;
    public    bool                      delete_selection          ( bool                interactive,
                                                                    bool                default_editable ) ;
    public    bool                      deserialize               ( TextBuffer          content_buffer,
                                                                    Gdk.Atom            format,
                                                                    TextIter            iter,
                                                                    uchar               data,
                                                                    ulong               length ) 
                                                             throws GLib.Error;
    public    bool                      deserialize_get_can_create_tags ( Gdk.Atom            format ) ;
    public    void                      deserialize_set_can_create_tags ( Gdk.Atom            format,
                                                                    bool                can_create_tags ) ;
    public    void                      get_bounds                ( TextIter            start,
                                                                    TextIter            end ) ;
    public    int                       get_char_count            (  ) ;
    public    weak TargetList           get_copy_target_list      (  ) ;
    public    Gdk.Atom                  get_deserialize_formats   ( int                 n_formats ) ;
    public    void                      get_end_iter              ( TextIter            iter ) ;
    public    bool                      get_has_selection         (  ) ;
    public    weak TextMark             get_insert                (  ) ;
    public    void                      get_iter_at_child_anchor  ( TextIter            iter,
                                                                    TextChildAnchor     anchor ) ;
    public    void                      get_iter_at_line          ( TextIter            iter,
                                                                    int                 line_number ) ;
    public    void                      get_iter_at_line_index    ( TextIter            iter,
                                                                    int                 line_number,
                                                                    int                 byte_index ) ;
    public    void                      get_iter_at_line_offset   ( TextIter            iter,
                                                                    int                 line_number,
                                                                    int                 char_offset ) ;
    public    void                      get_iter_at_mark          ( TextIter            iter,
                                                                    TextMark            mark ) ;
    public    void                      get_iter_at_offset        ( TextIter            iter,
                                                                    int                 char_offset ) ;
    public    int                       get_line_count            (  ) ;
    public    weak TextMark             get_mark                  ( string              name ) ;
    public    bool                      get_modified              (  ) ;
    public    weak TargetList           get_paste_target_list     (  ) ;
    public    weak TextMark             get_selection_bound       (  ) ;
    public    bool                      get_selection_bounds      ( TextIter            start,
                                                                    TextIter            end ) ;
    public    Gdk.Atom                  get_serialize_formats     ( int                 n_formats ) ;
    public    weak string               get_slice                 ( TextIter            start,
                                                                    TextIter            end,
                                                                    bool                include_hidden_chars ) ;
    public    void                      get_start_iter            ( TextIter            iter ) ;
    public    weak TextTagTable         get_tag_table             (  ) ;
    public    weak string               get_text                  ( TextIter            start,
                                                                    TextIter            end,
                                                                    bool                include_hidden_chars ) ;
    public    void                      insert                    ( TextIter            iter,
                                                                    string              text,
                                                                    int                 len ) ;
    public    void                      insert_at_cursor          ( string              text,
                                                                    int                 len ) ;
    public    bool                      insert_interactive        ( TextIter            iter,
                                                                    string              text,
                                                                    int                 len,
                                                                    bool                default_editable ) ;
    public    bool                      insert_interactive_at_cursor ( string              text,
                                                                    int                 len,
                                                                    bool                default_editable ) ;
    public    void                      insert_range              ( TextIter            iter,
                                                                    TextIter            start,
                                                                    TextIter            end ) ;
    public    bool                      insert_range_interactive  ( TextIter            iter,
                                                                    TextIter            start,
                                                                    TextIter            end,
                                                                    bool                default_editable ) ;
    public    void                      insert_with_tags          ( TextIter            iter,
                                                                    string              text,
                                                                    int                 len,
                                                                    ... ) ;
    public    void                      insert_with_tags_by_name  ( TextIter            iter,
                                                                    string              text,
                                                                    int                 len,
                                                                    ... ) ;
    public    void                      move_mark                 ( TextMark            mark,
                                                                    TextIter            where ) ;
    public    void                      move_mark_by_name         ( string              name,
                                                                    TextIter            where ) ;
    public    void                      paste_clipboard           ( Clipboard           clipboard,
                                                                    TextIter?           override_location,
                                                                    bool                default_editable ) ;
    public    void                      place_cursor              ( TextIter            where ) ;
    public    Gdk.Atom                  register_deserialize_format ( string              mime_type,
                                                                    TextBufferDeserializeFunc function,
                                                                    GLib.DestroyNotify  user_data_destroy ) ;
    public    Gdk.Atom                  register_deserialize_tagset ( string              tagset_name ) ;
    public    Gdk.Atom                  register_serialize_format ( string              mime_type,
                                                                    TextBufferSerializeFunc function,
                                                                    GLib.DestroyNotify  user_data_destroy ) ;
    public    Gdk.Atom                  register_serialize_tagset ( string              tagset_name ) ;
    public    void                      remove_all_tags           ( TextIter            start,
                                                                    TextIter            end ) ;
    public    void                      remove_selection_clipboard ( Clipboard           clipboard ) ;
    public    void                      remove_tag_by_name        ( string              name,
                                                                    TextIter            start,
                                                                    TextIter            end ) ;
    public    void                      select_range              ( TextIter            ins,
                                                                    TextIter            bound ) ;
    public    uchar                     serialize                 ( TextBuffer          content_buffer,
                                                                    Gdk.Atom            format,
                                                                    TextIter            start,
                                                                    TextIter            end,
                                                                    ulong               length ) ;
    public    void                      set_modified              ( bool                setting ) ;
    public    void                      set_text                  ( string              text,
                                                                    int                 len ) ;
    public    void                      unregister_deserialize_format ( Gdk.Atom            format ) ;
    public    void                      unregister_serialize_format ( Gdk.Atom            format ) ;
}

TextBuffer Description

Details

Constructor Details

TextBuffer ()
    public                              TextBuffer                ( TextTagTable        table ) ;		

Field Details

btree
    public    weak TextBTree            btree ;		

clipboard_contents_buffers
    public    weak GLib.SList           clipboard_contents_buffers ;		

selection_clipboards
    public    weak GLib.SList           selection_clipboards ;		

log_attr_cache
    public    weak TextLogAttrCache     log_attr_cache ;		

user_action_count
    public    uint                      user_action_count ;		

modified
    public    uint                      modified ;		

Signal Details

apply_tag
    public    signal void               apply_tag                 ( TextTag             tag,
                                                                    TextIter            start_char,
                                                                    TextIter            end_char )  ;		

begin_user_action
    public    signal void               begin_user_action         (  )  ;		

changed
    public    signal void               changed                   (  )  ;		

delete_range
    public    signal void               delete_range              ( TextIter            start,
                                                                    TextIter            end )  ;		

end_user_action
    public    signal void               end_user_action           (  )  ;		

insert_child_anchor
    public    signal void               insert_child_anchor       ( TextIter            pos,
                                                                    TextChildAnchor     anchor )  ;		

insert_pixbuf
    public    signal void               insert_pixbuf             ( TextIter            pos,
                                                                    Gdk.Pixbuf          pixbuf )  ;		

insert_text
    public    signal void               insert_text               ( TextIter            pos,
                                                                    string              text,
                                                                    int                 length )  ;		

mark_deleted
    public    signal void               mark_deleted              ( TextMark            mark )  ;		

mark_set
    public    signal void               mark_set                  ( TextIter            location,
                                                                    TextMark            mark )  ;		

modified_changed
    public    signal void               modified_changed          (  )  ;		

remove_tag
    public    signal void               remove_tag                ( TextTag             tag,
                                                                    TextIter            start_char,
                                                                    TextIter            end_char )  ;		

Property Details

copy_target_list
    public    weak TargetList           copy_target_list          { get; } ;		

cursor_position
    public    weak int                  cursor_position           { get; } ;		

has_selection
    public    weak bool                 has_selection             { get; } ;		

paste_target_list
    public    weak TargetList           paste_target_list         { get; } ;		

tag_table
    public    weak TextTagTable         tag_table                 { get; construct } ;		

text
    public    weak string               text                      { get; set; } ;		

Method Details

add_mark ()
    public    void                      add_mark                  ( TextMark            mark,
                                                                    TextIter            where ) ;		

add_selection_clipboard ()
    public    void                      add_selection_clipboard   ( Clipboard           clipboard ) ;		

apply_tag_by_name ()
    public    void                      apply_tag_by_name         ( string              name,
                                                                    TextIter            start,
                                                                    TextIter            end ) ;		

backspace ()
    public    bool                      backspace                 ( TextIter            iter,
                                                                    bool                interactive,
                                                                    bool                default_editable ) ;		

copy_clipboard ()
    public    void                      copy_clipboard            ( Clipboard           clipboard ) ;		

create_child_anchor ()
    public    weak TextChildAnchor      create_child_anchor       ( TextIter            iter ) ;		

create_mark ()
    public    weak TextMark             create_mark               ( string?             mark_name,
                                                                    TextIter            where,
                                                                    bool                left_gravity ) ;		

create_tag ()
    public    weak TextTag              create_tag                ( string              tag_name,
                                                                    ... ) ;		

cut_clipboard ()
    public    void                      cut_clipboard             ( Clipboard           clipboard,
                                                                    bool                default_editable ) ;		

delete ()
    public    void                      delete                    ( TextIter            start,
                                                                    TextIter            end ) ;		

delete_interactive ()
    public    bool                      delete_interactive        ( TextIter            start_iter,
                                                                    TextIter            end_iter,
                                                                    bool                default_editable ) ;		

delete_mark ()
    public    void                      delete_mark               ( TextMark            mark ) ;		

delete_mark_by_name ()
    public    void                      delete_mark_by_name       ( string              name ) ;		

delete_selection ()
    public    bool                      delete_selection          ( bool                interactive,
                                                                    bool                default_editable ) ;		

deserialize ()
    public    bool                      deserialize               ( TextBuffer          content_buffer,
                                                                    Gdk.Atom            format,
                                                                    TextIter            iter,
                                                                    uchar               data,
                                                                    ulong               length ) 
                                                             throws GLib.Error;		

deserialize_get_can_create_tags ()
    public    bool                      deserialize_get_can_create_tags ( Gdk.Atom            format ) ;		

deserialize_set_can_create_tags ()
    public    void                      deserialize_set_can_create_tags ( Gdk.Atom            format,
                                                                    bool                can_create_tags ) ;		

get_bounds ()
    public    void                      get_bounds                ( TextIter            start,
                                                                    TextIter            end ) ;		

get_char_count ()
    public    int                       get_char_count            (  ) ;		

get_copy_target_list ()
    public    weak TargetList           get_copy_target_list      (  ) ;		

get_deserialize_formats ()
    public    Gdk.Atom                  get_deserialize_formats   ( int                 n_formats ) ;		

get_end_iter ()
    public    void                      get_end_iter              ( TextIter            iter ) ;		

get_has_selection ()
    public    bool                      get_has_selection         (  ) ;		

get_insert ()
    public    weak TextMark             get_insert                (  ) ;		

get_iter_at_child_anchor ()
    public    void                      get_iter_at_child_anchor  ( TextIter            iter,
                                                                    TextChildAnchor     anchor ) ;		

get_iter_at_line ()
    public    void                      get_iter_at_line          ( TextIter            iter,
                                                                    int                 line_number ) ;		

get_iter_at_line_index ()
    public    void                      get_iter_at_line_index    ( TextIter            iter,
                                                                    int                 line_number,
                                                                    int                 byte_index ) ;		

get_iter_at_line_offset ()
    public    void                      get_iter_at_line_offset   ( TextIter            iter,
                                                                    int                 line_number,
                                                                    int                 char_offset ) ;		

get_iter_at_mark ()
    public    void                      get_iter_at_mark          ( TextIter            iter,
                                                                    TextMark            mark ) ;		

get_iter_at_offset ()
    public    void                      get_iter_at_offset        ( TextIter            iter,
                                                                    int                 char_offset ) ;		

get_line_count ()
    public    int                       get_line_count            (  ) ;		

get_mark ()
    public    weak TextMark             get_mark                  ( string              name ) ;		

get_modified ()
    public    bool                      get_modified              (  ) ;		

get_paste_target_list ()
    public    weak TargetList           get_paste_target_list     (  ) ;		

get_selection_bound ()
    public    weak TextMark             get_selection_bound       (  ) ;		

get_selection_bounds ()
    public    bool                      get_selection_bounds      ( TextIter            start,
                                                                    TextIter            end ) ;		

get_serialize_formats ()
    public    Gdk.Atom                  get_serialize_formats     ( int                 n_formats ) ;		

get_slice ()
    public    weak string               get_slice                 ( TextIter            start,
                                                                    TextIter            end,
                                                                    bool                include_hidden_chars ) ;		

get_start_iter ()
    public    void                      get_start_iter            ( TextIter            iter ) ;		

get_tag_table ()
    public    weak TextTagTable         get_tag_table             (  ) ;		

get_text ()
    public    weak string               get_text                  ( TextIter            start,
                                                                    TextIter            end,
                                                                    bool                include_hidden_chars ) ;		

insert ()
    public    void                      insert                    ( TextIter            iter,
                                                                    string              text,
                                                                    int                 len ) ;		

insert_at_cursor ()
    public    void                      insert_at_cursor          ( string              text,
                                                                    int                 len ) ;		

insert_interactive ()
    public    bool                      insert_interactive        ( TextIter            iter,
                                                                    string              text,
                                                                    int                 len,
                                                                    bool                default_editable ) ;		

insert_interactive_at_cursor ()
    public    bool                      insert_interactive_at_cursor ( string              text,
                                                                    int                 len,
                                                                    bool                default_editable ) ;		

insert_range ()
    public    void                      insert_range              ( TextIter            iter,
                                                                    TextIter            start,
                                                                    TextIter            end ) ;		

insert_range_interactive ()
    public    bool                      insert_range_interactive  ( TextIter            iter,
                                                                    TextIter            start,
                                                                    TextIter            end,
                                                                    bool                default_editable ) ;		

insert_with_tags ()
    public    void                      insert_with_tags          ( TextIter            iter,
                                                                    string              text,
                                                                    int                 len,
                                                                    ... ) ;		

insert_with_tags_by_name ()
    public    void                      insert_with_tags_by_name  ( TextIter            iter,
                                                                    string              text,
                                                                    int                 len,
                                                                    ... ) ;		

move_mark ()
    public    void                      move_mark                 ( TextMark            mark,
                                                                    TextIter            where ) ;		

move_mark_by_name ()
    public    void                      move_mark_by_name         ( string              name,
                                                                    TextIter            where ) ;		

paste_clipboard ()
    public    void                      paste_clipboard           ( Clipboard           clipboard,
                                                                    TextIter?           override_location,
                                                                    bool                default_editable ) ;		

place_cursor ()
    public    void                      place_cursor              ( TextIter            where ) ;		

register_deserialize_format ()
    public    Gdk.Atom                  register_deserialize_format ( string              mime_type,
                                                                    TextBufferDeserializeFunc function,
                                                                    GLib.DestroyNotify  user_data_destroy ) ;		

register_deserialize_tagset ()
    public    Gdk.Atom                  register_deserialize_tagset ( string              tagset_name ) ;		

register_serialize_format ()
    public    Gdk.Atom                  register_serialize_format ( string              mime_type,
                                                                    TextBufferSerializeFunc function,
                                                                    GLib.DestroyNotify  user_data_destroy ) ;		

register_serialize_tagset ()
    public    Gdk.Atom                  register_serialize_tagset ( string              tagset_name ) ;		

remove_all_tags ()
    public    void                      remove_all_tags           ( TextIter            start,
                                                                    TextIter            end ) ;		

remove_selection_clipboard ()
    public    void                      remove_selection_clipboard ( Clipboard           clipboard ) ;		

remove_tag_by_name ()
    public    void                      remove_tag_by_name        ( string              name,
                                                                    TextIter            start,
                                                                    TextIter            end ) ;		

select_range ()
    public    void                      select_range              ( TextIter            ins,
                                                                    TextIter            bound ) ;		

serialize ()
    public    uchar                     serialize                 ( TextBuffer          content_buffer,
                                                                    Gdk.Atom            format,
                                                                    TextIter            start,
                                                                    TextIter            end,
                                                                    ulong               length ) ;		

set_modified ()
    public    void                      set_modified              ( bool                setting ) ;		

set_text ()
    public    void                      set_text                  ( string              text,
                                                                    int                 len ) ;		

unregister_deserialize_format ()
    public    void                      unregister_deserialize_format ( Gdk.Atom            format ) ;		

unregister_serialize_format ()
    public    void                      unregister_serialize_format ( Gdk.Atom            format ) ;		


Created by Valadoc