3 #ifndef _GTKMM_TEXTBUFFER_H
4 #define _GTKMM_TEXTBUFFER_H
6 #include <gtkmmconfig.h>
9 #include <glibmm/ustring.h>
10 #include <sigc++/sigc++.h>
42 #include <gtkmmconfig.h>
46 #ifndef DOXYGEN_SHOULD_SKIP_THIS
52 #ifndef DOXYGEN_SHOULD_SKIP_THIS
54 {
class TextBuffer_Class; }
96 #ifndef DOXYGEN_SHOULD_SKIP_THIS
105 static CppClassType textbuffer_class_;
113 explicit TextBuffer(
const Glib::ConstructParams& construct_params);
125 #ifndef DOXYGEN_SHOULD_SKIP_THIS
128 static GType get_base_type() G_GNUC_CONST;
152 explicit TextBuffer(
const Glib::RefPtr<TagTable>& tag_table);
156 static Glib::RefPtr<TextBuffer>
create();
159 static Glib::RefPtr<TextBuffer>
create(
const Glib::RefPtr<TagTable>& tag_table);
203 void set_text(
const char* text_begin,
const char* text_end);
206 #ifndef GTKMM_DISABLE_DEPRECATED
214 void assign(
const char* text_begin,
const char* text_end);
270 const iterator& pos,
const Glib::ustring& text,
bool default_editable =
true);
285 const iterator& pos,
const char* text_begin,
const char* text_end,
bool default_editable =
true);
309 bool default_editable =
true);
354 const Glib::ArrayHandle< Glib::RefPtr<Tag> >&
tags);
366 const Glib::ArrayHandle< Glib::RefPtr<Tag> >&
tags);
377 const Glib::StringArrayHandle& tag_names);
389 const Glib::StringArrayHandle& tag_names);
435 #ifndef GTKMM_DISABLE_DEPRECATED
471 #ifndef GTKMM_DISABLE_DEPRECATED
475 Glib::ustring
get_text(
bool include_hidden_chars =
true);
490 Glib::ustring
get_text(
bool include_hidden_chars =
true)
const;
493 #ifndef GTKMM_DISABLE_DEPRECATED
558 Glib::RefPtr<TextBuffer::Mark>
create_mark(
const Glib::ustring& mark_name,
const iterator& where,
bool left_gravity =
true);
617 Glib::RefPtr<const TextBuffer::Mark>
get_mark(
const Glib::ustring&
name)
const;
810 void cut_clipboard(
const Glib::RefPtr<Clipboard>& clipboard,
bool default_editable =
true);
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);
1041 Glib::SignalProxy3< void,const TextBuffer::iterator&,const Glib::ustring&,int >
signal_insert();
1077 Glib::SignalProxy2< void,const TextBuffer::iterator&,const TextBuffer::iterator& >
signal_erase();
1104 Glib::SignalProxy2< void,const TextBuffer::iterator&,const Glib::RefPtr<TextBuffer::Mark>& >
signal_mark_set();
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)
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 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().
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.
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.
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)
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().
static Glib::RefPtr< TextBuffer > create(const Glib::RefPtr< TagTable > &tag_table)
void set_modified(bool setting=true)
TextChildAnchor ChildAnchor
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)
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()
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
GtkImagePixbufData pixbuf
PBD::PropertyDescriptor< timepos_t > start
PBD::PropertyDescriptor< std::string > tags