/* sourcebuffer.hg * * Copyright (C) 2004-2005 Jae Jang * Copyright (C) 2005-2006 Rob Page * Copyright (C)2006 Dodji Seketeli * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include #include #include #include #include _DEFS(gtksourceviewmm,gtksourceview) _PINCLUDE(gtkmm/private/textbuffer_p.h) namespace gtksourceview { /** Multi-line source editing widget. It displays a Gtk::SourceBuffer. */ class SourceBuffer : public Gtk::TextBuffer { _CLASS_GOBJECT(SourceBuffer, GtkSourceBuffer, GTK_SOURCE_BUFFER, Gtk::TextBuffer, GtkTextBuffer) protected: _CTOR_DEFAULT ; _WRAP_CTOR(SourceBuffer(Glib::RefPtr &tagtable), gtk_source_buffer_new) explicit SourceBuffer (Glib::RefPtr &language) ; public: _WRAP_CREATE(Glib::RefPtr &tagtable) _WRAP_CREATE(Glib::RefPtr &language) _WRAP_METHOD(bool get_check_brackets(), gtk_source_buffer_get_check_brackets) _WRAP_METHOD(bool get_check_brackets() const, gtk_source_buffer_get_check_brackets, constversion) _WRAP_METHOD(void set_check_brackets(bool check_brackets=true), gtk_source_buffer_set_check_brackets) _WRAP_METHOD(void set_bracket_match_style(const SourceTagStyle& style), gtk_source_buffer_set_bracket_match_style) _WRAP_METHOD(bool get_highlight(), gtk_source_buffer_get_highlight) _WRAP_METHOD(bool get_highlight() const, gtk_source_buffer_get_highlight, constversion) _WRAP_METHOD(void set_highlight(bool highlight=true), gtk_source_buffer_set_highlight) _WRAP_METHOD(int get_max_undo_levels(), gtk_source_buffer_get_max_undo_levels) _WRAP_METHOD(int get_max_undo_levels() const, gtk_source_buffer_get_max_undo_levels, constversion) _WRAP_METHOD(void set_max_undo_levels(int max_undo_levels), gtk_source_buffer_set_max_undo_levels) _WRAP_METHOD(Glib::RefPtr get_language(), gtk_source_buffer_get_language, refreturn) _WRAP_METHOD(Glib::RefPtr get_language() const, gtk_source_buffer_get_language, refreturn, constversion) _WRAP_METHOD(void set_language(Glib::RefPtr language), gtk_source_buffer_set_language) _WRAP_METHOD(gunichar get_escape_char(), gtk_source_buffer_get_escape_char) _WRAP_METHOD(gunichar get_escape_char() const, gtk_source_buffer_get_escape_char, constversion) _WRAP_METHOD(void set_escape_char(gunichar escape_char), gtk_source_buffer_set_escape_char) _WRAP_METHOD(bool can_undo() const, gtk_source_buffer_can_undo) _WRAP_METHOD(bool can_redo() const, gtk_source_buffer_can_redo) _WRAP_METHOD(void undo(), gtk_source_buffer_undo) _WRAP_METHOD(void redo(), gtk_source_buffer_redo) _WRAP_METHOD(void begin_not_undoable_action(), gtk_source_buffer_begin_not_undoable_action) _WRAP_METHOD(void end_notundoable_action(), gtk_source_buffer_end_not_undoable_action) _WRAP_METHOD(Glib::RefPtr create_marker(const Glib::ustring& name, const Glib::ustring& type, const Gtk::TextIter& where), gtk_source_buffer_create_marker) _WRAP_METHOD(void move_marker(Glib::RefPtr, const Gtk::TextIter& where), gtk_source_buffer_move_marker) _WRAP_METHOD(void delete_marker(Glib::RefPtr), gtk_source_buffer_delete_marker) _WRAP_METHOD(Glib::RefPtr get_marker(const Glib::ustring& name), gtk_source_buffer_get_marker, refreturn) _WRAP_METHOD(Glib::RefPtr get_marker(const Glib::ustring& name) const, gtk_source_buffer_get_marker, refreturn, constversion) _WRAP_METHOD(Glib::SListHandle > get_markers_in_region(const Gtk::TextIter& begin, const Gtk::TextIter& end), gtk_source_buffer_get_markers_in_region) _WRAP_METHOD(Glib::SListHandle > get_markers_in_region(const Gtk::TextIter& begin, const Gtk::TextIter& end) const, gtk_source_buffer_get_markers_in_region, constversion) _WRAP_METHOD(Glib::RefPtr get_first_marker(), gtk_source_buffer_get_first_marker, refreturn) _WRAP_METHOD(Glib::RefPtr get_first_marker() const, gtk_source_buffer_get_first_marker, refreturn, constversion) _WRAP_METHOD(Glib::RefPtr get_last_marker(), gtk_source_buffer_get_last_marker, refreturn) _WRAP_METHOD(Glib::RefPtr get_last_marker() const, gtk_source_buffer_get_last_marker, refreturn, constversion) Gtk::TextIter get_iter_at_marker(Glib::RefPtr marker); Gtk::TextIter get_iter_at_marker(Glib::RefPtr marker) const; _IGNORE(gtk_source_buffer_get_iter_at_marker) _WRAP_METHOD(Glib::RefPtr get_next_marker(Gtk::TextIter& iter), gtk_source_buffer_get_next_marker) _WRAP_METHOD(Glib::RefPtr get_prev_marker(Gtk::TextIter& iter), gtk_source_buffer_get_prev_marker) _WRAP_SIGNAL(void can_redo (bool can_redo), "can-redo") _WRAP_SIGNAL(void can_undo (bool can_redo), "can-undo") _WRAP_SIGNAL(void highlight_updated (Gtk::TextIter &start, Gtk::TextIter &end), "highlight-updated") _WRAP_SIGNAL(void marker_updated (Gtk::TextIter &where), "marker-updated") }; } /* namespace gtksourceview */