Ardour  9.0-pre0-582-g084a23a80d
textbuffer.h
Go to the documentation of this file.
1 // -*- c++ -*-
2 // Generated by gmmproc 2.45.3 -- DO NOT MODIFY!
3 #ifndef _GTKMM_TEXTBUFFER_H
4 #define _GTKMM_TEXTBUFFER_H
5 
6 #include <gtkmmconfig.h>
7 
8 
9 #include <glibmm/ustring.h>
10 #include <sigc++/sigc++.h>
11 
12 /* $Id: textbuffer.hg,v 1.20 2006/11/20 09:19:49 murrayc Exp $ */
13 
14 /* Copyright(C) 1998-2002 The gtkmm Development Team
15  *
16  * This library is free software; you can redistribute it and/or
17  * modify it under the terms of the GNU Lesser General Public
18  * License as published by the Free Software Foundation; either
19  * version 2.1 of the License, or(at your option) any later version.
20  *
21  * This library is distributed in the hope that it will be useful,
22  * but WITHOUT ANY WARRANTY; without even the implied warranty of
23  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
24  * Lesser General Public License for more details.
25  *
26  * You should have received a copy of the GNU Lesser General Public
27  * License along with this library; if not, write to the Free
28  * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
29  */
30 
31 // This is for including the config header before any code (such as
32 // the #ifndef GTKMM_DISABLE_DEPRECATED in deprecated classes) is generated:
33 
34 
35 #include <gtkmm/object.h>
36 #include <gtkmm/texttagtable.h>
37 #include <gtkmm/textchildanchor.h>
38 #include <gtkmm/textmark.h>
39 #include <gtkmm/textiter.h>
40 #include <gtkmm/clipboard.h>
41 #include <gdkmm/pixbuf.h>
42 #include <gtkmmconfig.h>
43 #include <utility>
44 
45 
46 #ifndef DOXYGEN_SHOULD_SKIP_THIS
47 typedef struct _GtkTextBuffer GtkTextBuffer;
49 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
50 
51 
52 #ifndef DOXYGEN_SHOULD_SKIP_THIS
53 namespace Gtk
54 { class TextBuffer_Class; } // namespace Gtk
55 #endif //DOXYGEN_SHOULD_SKIP_THIS
56 
57 namespace Gtk
58 {
59 
60 class TextMark;
61 class TextIter;
62 
93 class TextBuffer : public Glib::Object
94 {
95 
96 #ifndef DOXYGEN_SHOULD_SKIP_THIS
97 
98 public:
99  typedef TextBuffer CppObjectType;
100  typedef TextBuffer_Class CppClassType;
101  typedef GtkTextBuffer BaseObjectType;
102  typedef GtkTextBufferClass BaseClassType;
103 
104 private: friend class TextBuffer_Class;
105  static CppClassType textbuffer_class_;
106 
107 private:
108  // noncopyable
109  TextBuffer(const TextBuffer&);
110  TextBuffer& operator=(const TextBuffer&);
111 
112 protected:
113  explicit TextBuffer(const Glib::ConstructParams& construct_params);
114  explicit TextBuffer(GtkTextBuffer* castitem);
115 
116 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
117 
118 public:
119  virtual ~TextBuffer();
120 
123  static GType get_type() G_GNUC_CONST;
124 
125 #ifndef DOXYGEN_SHOULD_SKIP_THIS
126 
127 
128  static GType get_base_type() G_GNUC_CONST;
129 #endif
130 
132  GtkTextBuffer* gobj() { return reinterpret_cast<GtkTextBuffer*>(gobject_); }
133 
135  const GtkTextBuffer* gobj() const { return reinterpret_cast<GtkTextBuffer*>(gobject_); }
136 
139 
140 private:
141 
142 
143 public:
145  typedef TextTag Tag;
147  typedef TextMark Mark;
149 
150 protected:
152  explicit TextBuffer(const Glib::RefPtr<TagTable>& tag_table);
153 
154 public:
155 
156  static Glib::RefPtr<TextBuffer> create();
157 
158 
159  static Glib::RefPtr<TextBuffer> create(const Glib::RefPtr<TagTable>& tag_table);
160 
161 
167  int get_line_count() const;
168 
176  int get_char_count() const;
177 
179  int size() const;
180 
181 
186  Glib::RefPtr<TextBuffer::TagTable> get_tag_table();
187 
192  Glib::RefPtr<const TextBuffer::TagTable> get_tag_table() const;
193 
197  void set_text(const Glib::ustring& text);
198 
203  void set_text(const char* text_begin, const char* text_end);
204 
205 
206  #ifndef GTKMM_DISABLE_DEPRECATED
207 
210  void assign(const Glib::ustring& text);
211 
214  void assign(const char* text_begin, const char* text_end);
215  #endif // GTKMM_DISABLE_DEPRECATED
216 
217 
218  //TODO: Make all insert() methods have the same return type:
219 
228  iterator insert(const iterator& pos, const Glib::ustring& text);
229 
239  iterator insert(const iterator& pos, const char* text_begin, const char* text_end);
240 
247  void insert_at_cursor(const Glib::ustring& text);
248 
256  void insert_at_cursor(const char* text_begin, const char* text_end);
257 
269  std::pair<iterator,bool> insert_interactive(
270  const iterator& pos, const Glib::ustring& text, bool default_editable = true);
271 
284  std::pair<iterator,bool> insert_interactive(
285  const iterator& pos, const char* text_begin, const char* text_end, bool default_editable = true);
286 
296  bool insert_interactive_at_cursor(const Glib::ustring& text, bool default_editable = true);
297 
308  bool insert_interactive_at_cursor(const char* text_begin, const char* text_end,
309  bool default_editable = true);
310 
322  iterator insert(const iterator& pos, const iterator& range_begin, const iterator& range_end);
323 
324 
336  std::pair<iterator,bool> insert_interactive(const iterator& pos, const iterator& range_begin, const iterator& range_end, bool default_editable = true);
337 
338 
339  iterator insert_with_tag(const iterator& pos, const Glib::ustring& text, const Glib::RefPtr<Tag>& tag);
340  iterator insert_with_tag(const iterator& pos, const char* text_begin, const char* text_end, const Glib::RefPtr<Tag>& tag);
341 
342  iterator insert_with_tag(const iterator& pos, const Glib::ustring& text, const Glib::ustring& tag_name);
343  iterator insert_with_tag(const iterator& pos, const char* text_begin, const char* text_end, const Glib::ustring& tag_name);
344 
353  iterator insert_with_tags(const iterator& pos, const Glib::ustring& text,
354  const Glib::ArrayHandle< Glib::RefPtr<Tag> >& tags);
355 
365  iterator insert_with_tags(const iterator& pos, const char* text_begin, const char* text_end,
366  const Glib::ArrayHandle< Glib::RefPtr<Tag> >& tags);
367 
376  iterator insert_with_tags_by_name(const iterator& pos, const Glib::ustring& text,
377  const Glib::StringArrayHandle& tag_names);
378 
379 
388  iterator insert_with_tags_by_name(const iterator& pos, const char* text_begin, const char* text_end,
389  const Glib::StringArrayHandle& tag_names);
390 
391  /* Deletes all text between @a range_begin and @a range_end. The order of range_begin and range_end is not actually relevant.
392  * This function actually emits the "delete_range" signal, and the default handler of that signal deletes the text.
393  * Because the buffer is modified, all outstanding iterators become invalid after calling this function.
394  * @param range_begin
395  * @param range_end
396  * @result An iterator that points to the location where text was deleted.
397  */
398  iterator erase(const iterator& range_begin, const iterator& range_end);
399 
400 
401  /* Deletes all editable text between @a range_begin and @a range_end. The order of range_begin and range_end is not actually relevant.
402  * This function actually emits the "delete_range" signal, and the default handler of that signal deletes the text.
403  * Because the buffer is modified, all outstanding iterators become invalid after calling this function.
404  *
405  * @a default_editable indicates the editability of text that doesn't have a tag affecting editability applied to it.
406  * Typically the result of Gtk::TextView::get_editable() is appropriate here.
407  *
408  * @param range_begin
409  * @param range_end
410  * @param default_editable Default editability of buffer
411  * @result An iterator that points to the location where text was deleted, or end() is no text was deleted.
412  */
413  std::pair<iterator,bool> erase_interactive(const iterator& range_begin, const iterator& range_end, bool default_editable = true);
414 
415 
432  iterator backspace(const iterator& iter, bool interactive = true, bool default_editable = true);
433 
434 
435 #ifndef GTKMM_DISABLE_DEPRECATED
436 
452  Glib::ustring get_text(const iterator& start, const iterator& end, bool include_hidden_chars = true);
453 #endif // GTKMM_DISABLE_DEPRECATED
454 
455 
469  Glib::ustring get_text(const iterator& start, const iterator& end, bool include_hidden_chars = true) const;
470 
471 #ifndef GTKMM_DISABLE_DEPRECATED
472 
475  Glib::ustring get_text(bool include_hidden_chars = true);
476 #endif // GTKMM_DISABLE_DEPRECATED
477 
478 
490  Glib::ustring get_text(bool include_hidden_chars = true) const;
491 
492 
493 #ifndef GTKMM_DISABLE_DEPRECATED
494 
497  Glib::ustring get_slice(const iterator& start, const iterator& end, bool include_hidden_chars = true);
498 #endif // GTKMM_DISABLE_DEPRECATED
499 
500 
517  Glib::ustring get_slice(const iterator& start, const iterator& end, bool include_hidden_chars = true) const;
518 
519  iterator insert_pixbuf(const iterator& pos, const Glib::RefPtr<Gdk::Pixbuf>& pixbuf);
520 
521 
522  iterator insert_child_anchor(const iterator& pos, const Glib::RefPtr<ChildAnchor>& anchor);
523 
524 
525  Glib::RefPtr<ChildAnchor> create_child_anchor(const iterator& pos);
526 
527 
538  void add_mark(const Glib::RefPtr<TextBuffer::Mark>& mark, const iterator& where);
539 
540 
558  Glib::RefPtr<TextBuffer::Mark> create_mark(const Glib::ustring& mark_name, const iterator& where, bool left_gravity = true);
559 
577  Glib::RefPtr<Mark> create_mark(const iterator& where, bool left_gravity = true);
578 
579 
586  void move_mark(const Glib::RefPtr<Mark>& mark, const iterator& where);
587 
600  void delete_mark(const Glib::RefPtr<Mark>& mark);
601 
602 
609  Glib::RefPtr<TextBuffer::Mark> get_mark(const Glib::ustring& name);
610 
617  Glib::RefPtr<const TextBuffer::Mark> get_mark(const Glib::ustring& name) const;
618 
619 
626  void move_mark_by_name(const Glib::ustring& name, const iterator& where);
627 
633  void delete_mark_by_name(const Glib::ustring& name);
634 
635 
643  Glib::RefPtr<TextBuffer::Mark> get_insert();
644 
659  Glib::RefPtr<TextBuffer::Mark> get_selection_bound();
660 
661 
672  void place_cursor(const iterator& where);
673 
682  void apply_tag(const Glib::RefPtr<Tag>& tag, const iterator& start, const iterator& end);
683 
692  void remove_tag(const Glib::RefPtr<Tag>& tag, const iterator& start, const iterator& end);
693 
701  void apply_tag_by_name(const Glib::ustring& name, const iterator& start, const iterator& end);
702 
710  void remove_tag_by_name(const Glib::ustring& name, const iterator& start, const iterator& end);
711 
721  void remove_all_tags(const iterator& start, const iterator& end);
722 
730  Glib::RefPtr<Tag> create_tag(const Glib::ustring& tag_name);
731 
732 
738  Glib::RefPtr<Tag> create_tag();
739 
740  iterator get_iter_at_line_offset(int line_number, int char_offset);
741  iterator get_iter_at_line_index(int line_number, int byte_index);
742  iterator get_iter_at_offset(int char_offset);
743  iterator get_iter_at_line(int line_number);
746  void get_bounds(iterator& range_begin, iterator& range_end);
747 
752  iterator get_iter_at_mark(const Glib::RefPtr<Mark>& mark);
753 
758  iterator get_iter_at_child_anchor(const Glib::RefPtr<ChildAnchor>& anchor);
759 
760 
768  bool get_modified() const;
769 
778  void set_modified(bool setting = true);
779 
780 
785  bool get_has_selection() const;
786 
787 
794  void add_selection_clipboard(const Glib::RefPtr<Clipboard>& clipboard);
795 
802  void remove_selection_clipboard(const Glib::RefPtr<Clipboard>& clipboard);
803 
810  void cut_clipboard(const Glib::RefPtr<Clipboard>& clipboard, bool default_editable = true);
811 
816  void copy_clipboard(const Glib::RefPtr<Clipboard>& clipboard);
817  void paste_clipboard(const Glib::RefPtr<Clipboard>& clipboard, const iterator& override_location, bool default_editable = true);
818  void paste_clipboard(const Glib::RefPtr<Clipboard>& clipboard, bool default_editable = true);
819 
820 
833 
843  bool erase_selection(bool interactive = true, bool default_editable = true);
844 
845 
857  void select_range(const iterator& ins, const iterator& bound);
858 
859 /* Called to specify atomic user actions, used to implement undo */
860 
880 
885 
886 
895  Glib::RefPtr<TargetList> get_copy_target_list() const;
896 
905  Glib::RefPtr<TargetList> get_paste_target_list() const;
906 
907 //TODO: I have commented these out for now because I don't understand what the register_buffer and content_buffer are. murrayc.
908  //TODO: Documentation.
909  // typedef sigc::slot<guint8*, const Glib::RefPtr<TextBuffer>& /* content_buffer */, const iterator& /* start */, const iterator& /* end */, gsize& /* length */> SlotSerialize;
910 
911 
912 //TODO: Use ArrayHandle, or just use guint8* to be more efficient?
913  // typedef sigc::slot<bool, const Glib::RefPtr<TextBuffer>& /* content_buffer */, iterator& /* iter */, const guint8* /* data */, gsize /* length */, bool /* create_tags */> SlotDeserialize;
914 
915 /*
916  Glib::ustring register_serialize_format(const Glib::ustring& mime_type, const SlotSerialize& slot);
917  _IGNORE(gtk_text_buffer_register_serialize_format)
918 */
919 
920 
943  Glib::ustring register_serialize_tagset(const Glib::ustring& tagset_name);
944 
945 /*
946  Glib::ustring register_deserialize_format(const Glib::ustring& mime_type, const SlotDeserialize& slot);
947  _IGNORE(gtk_text_buffer_register_deserialize_format)
948 */
949 
958  Glib::ustring register_deserialize_tagset(const Glib::ustring& tagset_name);
959 
960 
967  void unregister_serialize_format(const Glib::ustring& format);
968 
975  void unregister_deserialize_format(const Glib::ustring& format);
976 
977 
999  void set_can_create_tags(const Glib::ustring& format, bool can_create_tags = true);
1000 
1007  bool get_can_create_tags(const Glib::ustring& format) const;
1008 
1009 
1010  Glib::StringArrayHandle get_serialize_formats() const;
1011 
1012  Glib::StringArrayHandle get_deserialize_formats() const;
1013 
1014 
1015 /*
1016 //TODO: I have commented these out for now because I don't understand what the register_buffer and content_buffer are. murrayc.
1017 
1018 //TODO: Use something other than gsize?
1019 #m4 _CONVERSION(`const iterator&', `GtkTextIter*',`($3).gobj()')
1020  _WRAP_METHOD(guint8* serialize(const Glib::RefPtr<TextBuffer>& content_buffer,
1021  const Glib::ustring& format,
1022  const iterator& iterstart,
1023  const iterator& iterend,
1024  gsize& length), gtk_text_buffer_serialize)
1025 
1026 //TODO: Is the bool superfluous?
1027 //TODO: Use an ArrayHandle?
1028  _WRAP_METHOD(bool deserialize(const Glib::RefPtr<TextBuffer>& content_buffer,
1029  const Glib::ustring& format,
1030  const iterator& iter, const guint8* data,
1031  gsize length), gtk_text_buffer_deserialize, errthrow)
1032 */
1033 
1034 
1041  Glib::SignalProxy3< void,const TextBuffer::iterator&,const Glib::ustring&,int > signal_insert();
1042 
1043 
1050  Glib::SignalProxy2< void,const TextBuffer::iterator&,const Glib::RefPtr<Gdk::Pixbuf>& > signal_insert_pixbuf();
1051 
1052 
1059  Glib::SignalProxy2< void,const TextBuffer::iterator&,const Glib::RefPtr<ChildAnchor>& > signal_insert_child_anchor();
1060 
1061 
1077  Glib::SignalProxy2< void,const TextBuffer::iterator&,const TextBuffer::iterator& > signal_erase();
1078 
1079 
1086  Glib::SignalProxy0< void > signal_changed();
1087 
1088 
1095  Glib::SignalProxy0< void > signal_modified_changed();
1096 
1097 
1104  Glib::SignalProxy2< void,const TextBuffer::iterator&,const Glib::RefPtr<TextBuffer::Mark>& > signal_mark_set();
1105 
1106 
1113  Glib::SignalProxy1< void,const Glib::RefPtr<TextBuffer::Mark>& > signal_mark_deleted();
1114 
1115 
1122  Glib::SignalProxy3< void,const Glib::RefPtr<TextBuffer::Tag>&,const TextBuffer::iterator&,const TextBuffer::iterator& > signal_apply_tag();
1123 
1124 
1131  Glib::SignalProxy3< void,const Glib::RefPtr<TextBuffer::Tag>&,const TextBuffer::iterator&,const TextBuffer::iterator& > signal_remove_tag();
1132 
1133 
1140  Glib::SignalProxy0< void > signal_begin_user_action();
1141 
1142 
1149  Glib::SignalProxy0< void > signal_end_user_action();
1150 
1151 
1152  //TODO: Remove no_default_handler when we can break ABI:
1153 
1154 
1161  Glib::SignalProxy1< void,const Glib::RefPtr<Gtk::Clipboard>& > signal_paste_done();
1162 
1163 
1169  Glib::PropertyProxy_ReadOnly< Glib::RefPtr<TextBuffer::TagTable> > property_tag_table() const;
1170 
1171 
1177  Glib::PropertyProxy< Glib::ustring > property_text() ;
1178 
1184  Glib::PropertyProxy_ReadOnly< Glib::ustring > property_text() const;
1185 
1191  Glib::PropertyProxy_ReadOnly< bool > property_has_selection() const;
1192 
1193 
1199  Glib::PropertyProxy_ReadOnly< int > property_cursor_position() const;
1200 
1201 
1202  //TODO: Check the ref-counting/conversion for these: _WRAP_PROPERTY("copy-target-list", Glib::ListHandle< Glib::RefPtr<TargetList> >)
1203  //TODO: _WRAP_PROPERTY("paste-target-list", Glib::ListHandle< Glib::RefPtr<TargetList> >)
1204 
1205 
1206 public:
1207 
1208 public:
1209  //C++ methods used to invoke GTK+ virtual functions:
1210 
1211 protected:
1212  //GTK+ Virtual Functions (override these to change behaviour):
1213 
1214  //Default Signal Handlers::
1216  virtual void on_insert(const TextBuffer::iterator& pos, const Glib::ustring& text, int bytes);
1218  virtual void on_insert_pixbuf(const TextBuffer::iterator& pos, const Glib::RefPtr<Gdk::Pixbuf>& pixbuf);
1220  virtual void on_insert_child_anchor(const TextBuffer::iterator& pos, const Glib::RefPtr<ChildAnchor>& anchor);
1224  virtual void on_changed();
1226  virtual void on_modified_changed();
1228  virtual void on_mark_set(const TextBuffer::iterator& location, const Glib::RefPtr<TextBuffer::Mark>& mark);
1230  virtual void on_mark_deleted(const Glib::RefPtr<TextBuffer::Mark>& mark);
1232  virtual void on_apply_tag(const Glib::RefPtr<TextBuffer::Tag>& tag, const TextBuffer::iterator& range_begin, const TextBuffer::iterator& range_end);
1234  virtual void on_remove_tag(const Glib::RefPtr<TextBuffer::Tag>& tag, const TextBuffer::iterator& range_begin, const TextBuffer::iterator& range_end);
1236  virtual void on_begin_user_action();
1238  virtual void on_end_user_action();
1239 
1240 
1241 };
1242 
1243 } // namespace Gtk
1244 
1245 
1246 namespace Glib
1247 {
1256  Glib::RefPtr<Gtk::TextBuffer> wrap(GtkTextBuffer* object, bool take_copy = false);
1257 }
1258 
1259 
1260 #endif /* _GTKMM_TEXTBUFFER_H */
1261 
Glib::RefPtr< Tag > create_tag(const Glib::ustring &tag_name)
bool insert_interactive_at_cursor(const Glib::ustring &text, bool default_editable=true)
Glib::RefPtr< Gtk::TextBuffer > wrap(GtkTextBuffer *object, bool take_copy=false)
TextTagTable TagTable
Definition: textbuffer.h:146
void assign(const Glib::ustring &text)
Glib::SignalProxy3< void, const Glib::RefPtr< TextBuffer::Tag > &, const TextBuffer::iterator &, const TextBuffer::iterator & > signal_remove_tag()
void delete_mark_by_name(const Glib::ustring &name)
virtual void on_modified_changed()
This is a default handler for the signal signal_modified_changed().
Glib::SignalProxy1< void, const Glib::RefPtr< TextBuffer::Mark > & > signal_mark_deleted()
iterator insert_with_tag(const iterator &pos, const Glib::ustring &text, const Glib::ustring &tag_name)
void delete_mark(const Glib::RefPtr< Mark > &mark)
virtual ~TextBuffer()
virtual void on_insert_pixbuf(const TextBuffer::iterator &pos, const Glib::RefPtr< Gdk::Pixbuf > &pixbuf)
This is a default handler for the signal signal_insert_pixbuf().
static GType get_type() G_GNUC_CONST
iterator insert_with_tags_by_name(const iterator &pos, const Glib::ustring &text, const Glib::StringArrayHandle &tag_names)
virtual void on_remove_tag(const Glib::RefPtr< TextBuffer::Tag > &tag, const TextBuffer::iterator &range_begin, const TextBuffer::iterator &range_end)
This is a default handler for the signal signal_remove_tag().
void place_cursor(const iterator &where)
Glib::RefPtr< TargetList > get_paste_target_list() const
iterator insert(const iterator &pos, const char *text_begin, const char *text_end)
Glib::SignalProxy2< void, const TextBuffer::iterator &, const TextBuffer::iterator & > signal_erase()
virtual void on_changed()
This is a default handler for the signal signal_changed().
void remove_tag(const Glib::RefPtr< Tag > &tag, const iterator &start, const iterator &end)
Glib::RefPtr< const TextBuffer::Mark > get_mark(const Glib::ustring &name) const
virtual void on_apply_tag(const Glib::RefPtr< TextBuffer::Tag > &tag, const TextBuffer::iterator &range_begin, const TextBuffer::iterator &range_end)
This is a default handler for the signal signal_apply_tag().
void remove_all_tags(const iterator &start, const iterator &end)
Glib::RefPtr< TextBuffer::Mark > get_mark(const Glib::ustring &name)
Glib::RefPtr< ChildAnchor > create_child_anchor(const iterator &pos)
Glib::RefPtr< TextBuffer::TagTable > get_tag_table()
void paste_clipboard(const Glib::RefPtr< Clipboard > &clipboard, const iterator &override_location, bool default_editable=true)
void apply_tag_by_name(const Glib::ustring &name, const iterator &start, const iterator &end)
iterator get_iter_at_mark(const Glib::RefPtr< Mark > &mark)
bool erase_selection(bool interactive=true, bool default_editable=true)
int get_line_count() const
Glib::ustring get_text(bool include_hidden_chars=true) const
TextBuffer(const Glib::RefPtr< TagTable > &tag_table)
iterator insert_with_tags_by_name(const iterator &pos, const char *text_begin, const char *text_end, const Glib::StringArrayHandle &tag_names)
GtkTextBuffer * gobj_copy()
Provides access to the underlying C instance. The caller is responsible for unrefing it....
int get_char_count() const
void paste_clipboard(const Glib::RefPtr< Clipboard > &clipboard, bool default_editable=true)
virtual void on_insert_child_anchor(const TextBuffer::iterator &pos, const Glib::RefPtr< ChildAnchor > &anchor)
This is a default handler for the signal signal_insert_child_anchor().
Glib::RefPtr< TextBuffer::Mark > get_insert()
void unregister_serialize_format(const Glib::ustring &format)
void insert_at_cursor(const Glib::ustring &text)
Glib::RefPtr< TextBuffer::Mark > get_selection_bound()
Glib::SignalProxy1< void, const Glib::RefPtr< Gtk::Clipboard > & > signal_paste_done()
std::pair< iterator, bool > insert_interactive(const iterator &pos, const Glib::ustring &text, bool default_editable=true)
void set_can_create_tags(const Glib::ustring &format, bool can_create_tags=true)
void add_mark(const Glib::RefPtr< TextBuffer::Mark > &mark, const iterator &where)
Glib::PropertyProxy_ReadOnly< bool > property_has_selection() const
bool get_can_create_tags(const Glib::ustring &format) const
std::pair< iterator, bool > insert_interactive(const iterator &pos, const char *text_begin, const char *text_end, bool default_editable=true)
void cut_clipboard(const Glib::RefPtr< Clipboard > &clipboard, bool default_editable=true)
int size() const
See get_char_count().
virtual void on_insert(const TextBuffer::iterator &pos, const Glib::ustring &text, int bytes)
This is a default handler for the signal signal_insert().
void set_text(const char *text_begin, const char *text_end)
Glib::SignalProxy0< void > signal_end_user_action()
iterator get_iter_at_line_index(int line_number, int byte_index)
virtual void on_begin_user_action()
This is a default handler for the signal signal_begin_user_action().
iterator begin()
Glib::SignalProxy2< void, const TextBuffer::iterator &, const Glib::RefPtr< ChildAnchor > & > signal_insert_child_anchor()
Glib::RefPtr< TargetList > get_copy_target_list() const
iterator backspace(const iterator &iter, bool interactive=true, bool default_editable=true)
bool get_has_selection() const
Glib::ustring get_text(bool include_hidden_chars=true)
iterator get_iter_at_line(int line_number)
iterator insert_with_tag(const iterator &pos, const Glib::ustring &text, const Glib::RefPtr< Tag > &tag)
iterator insert_child_anchor(const iterator &pos, const Glib::RefPtr< ChildAnchor > &anchor)
Glib::PropertyProxy_ReadOnly< Glib::ustring > property_text() const
void move_mark(const Glib::RefPtr< Mark > &mark, const iterator &where)
void select_range(const iterator &ins, const iterator &bound)
iterator insert_pixbuf(const iterator &pos, const Glib::RefPtr< Gdk::Pixbuf > &pixbuf)
iterator insert_with_tag(const iterator &pos, const char *text_begin, const char *text_end, const Glib::ustring &tag_name)
Glib::RefPtr< Mark > create_mark(const iterator &where, bool left_gravity=true)
void unregister_deserialize_format(const Glib::ustring &format)
iterator insert_with_tags(const iterator &pos, const char *text_begin, const char *text_end, const Glib::ArrayHandle< Glib::RefPtr< Tag > > &tags)
bool insert_interactive_at_cursor(const char *text_begin, const char *text_end, bool default_editable=true)
Glib::PropertyProxy_ReadOnly< Glib::RefPtr< TextBuffer::TagTable > > property_tag_table() const
Glib::SignalProxy2< void, const TextBuffer::iterator &, const Glib::RefPtr< Gdk::Pixbuf > & > signal_insert_pixbuf()
void apply_tag(const Glib::RefPtr< Tag > &tag, const iterator &start, const iterator &end)
GtkTextBuffer * gobj()
Provides access to the underlying C GObject.
Definition: textbuffer.h:132
void insert_at_cursor(const char *text_begin, const char *text_end)
iterator erase(const iterator &range_begin, const iterator &range_end)
Glib::ustring get_slice(const iterator &start, const iterator &end, bool include_hidden_chars=true) const
Glib::SignalProxy3< void, const Glib::RefPtr< TextBuffer::Tag > &, const TextBuffer::iterator &, const TextBuffer::iterator & > signal_apply_tag()
Glib::ustring register_deserialize_tagset(const Glib::ustring &tagset_name)
Glib::SignalProxy0< void > signal_changed()
void copy_clipboard(const Glib::RefPtr< Clipboard > &clipboard)
virtual void on_erase(const TextBuffer::iterator &start, const TextBuffer::iterator &end)
This is a default handler for the signal signal_erase().
void set_text(const Glib::ustring &text)
bool get_modified() const
Glib::RefPtr< TextBuffer::Mark > create_mark(const Glib::ustring &mark_name, const iterator &where, bool left_gravity=true)
void get_bounds(iterator &range_begin, iterator &range_end)
Glib::ustring register_serialize_tagset(const Glib::ustring &tagset_name)
const GtkTextBuffer * gobj() const
Provides access to the underlying C GObject.
Definition: textbuffer.h:135
iterator insert(const iterator &pos, const iterator &range_begin, const iterator &range_end)
iterator get_iter_at_child_anchor(const Glib::RefPtr< ChildAnchor > &anchor)
virtual void on_end_user_action()
This is a default handler for the signal signal_end_user_action().
iterator insert_with_tags(const iterator &pos, const Glib::ustring &text, const Glib::ArrayHandle< Glib::RefPtr< Tag > > &tags)
Glib::ustring get_slice(const iterator &start, const iterator &end, bool include_hidden_chars=true)
iterator get_iter_at_line_offset(int line_number, int char_offset)
Glib::SignalProxy0< void > signal_modified_changed()
Glib::SignalProxy2< void, const TextBuffer::iterator &, const Glib::RefPtr< TextBuffer::Mark > & > signal_mark_set()
std::pair< iterator, bool > erase_interactive(const iterator &range_begin, const iterator &range_end, bool default_editable=true)
TextIter iterator
Definition: textbuffer.h:144
iterator end()
virtual void on_mark_set(const TextBuffer::iterator &location, const Glib::RefPtr< TextBuffer::Mark > &mark)
This is a default handler for the signal signal_mark_set().
iterator insert(const iterator &pos, const Glib::ustring &text)
virtual void on_mark_deleted(const Glib::RefPtr< TextBuffer::Mark > &mark)
This is a default handler for the signal signal_mark_deleted().
void end_user_action()
static Glib::RefPtr< TextBuffer > create(const Glib::RefPtr< TagTable > &tag_table)
void set_modified(bool setting=true)
TextChildAnchor ChildAnchor
Definition: textbuffer.h:148
void remove_tag_by_name(const Glib::ustring &name, const iterator &start, const iterator &end)
Glib::PropertyProxy_ReadOnly< int > property_cursor_position() const
Glib::RefPtr< Tag > create_tag()
Glib::PropertyProxy< Glib::ustring > property_text()
void add_selection_clipboard(const Glib::RefPtr< Clipboard > &clipboard)
Glib::StringArrayHandle get_deserialize_formats() const
void move_mark_by_name(const Glib::ustring &name, const iterator &where)
Glib::StringArrayHandle get_serialize_formats() const
Glib::ustring get_text(const iterator &start, const iterator &end, bool include_hidden_chars=true)
iterator insert_with_tag(const iterator &pos, const char *text_begin, const char *text_end, const Glib::RefPtr< Tag > &tag)
void assign(const char *text_begin, const char *text_end)
TextMark Mark
Definition: textbuffer.h:147
iterator get_iter_at_offset(int char_offset)
Glib::SignalProxy3< void, const TextBuffer::iterator &, const Glib::ustring &, int > signal_insert()
void remove_selection_clipboard(const Glib::RefPtr< Clipboard > &clipboard)
bool get_selection_bounds(iterator &start, iterator &end) const
static Glib::RefPtr< TextBuffer > create()
Glib::SignalProxy0< void > signal_begin_user_action()
void begin_user_action()
Glib::ustring get_text(const iterator &start, const iterator &end, bool include_hidden_chars=true) const
Glib::RefPtr< const TextBuffer::TagTable > get_tag_table() const
std::pair< iterator, bool > insert_interactive(const iterator &pos, const iterator &range_begin, const iterator &range_end, bool default_editable=true)
GtkImageIconNameData name
Definition: gtkimage.h:6
GtkImagePixbufData pixbuf
Definition: gtkimage.h:2
PBD::PropertyDescriptor< timepos_t > start
PBD::PropertyDescriptor< std::string > tags
Definition: ardour_ui.h:188
minimum disk read bytes