libgtksourceviewmm: sourcebuffer.h Source File

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

# sourcebuffer.h

Go to the documentation of this file.

    00001 // -*- c++ -*-
    00002 // Generated by gtkmmproc -- DO NOT MODIFY!
    00003 #ifndef _GTKSOURCEVIEWMM_SOURCEBUFFER_H
    00004 #define _GTKSOURCEVIEWMM_SOURCEBUFFER_H
    00005
    00006
    00007 #include <glibmm.h>
    00008
    00009 /* sourcebuffer.hg
    00010  *
    00011  * Copyright (C) 2004-2005 Jae Jang
    00012  * Copyright (C) 2005-2006 Rob Page
    00013  * Copyright (C) 2006 Dodji Seketeli
    00014  *
    00015  * This library is free software; you can redistribute it and/or
    00016  * modify it under the terms of the GNU Library General Public
    00017  * License as published by the Free Software Foundation; either
    00018  * version 2 of the License, or (at your option) any later version.
    00019  *
    00020  * This library is distributed in the hope that it will be useful,
    00021  * but WITHOUT ANY WARRANTY; without even the implied warranty of
    00022  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    00023  * Library General Public License for more details.
    00024  *
    00025  * You should have received a copy of the GNU Library General Public
    00026  * License along with this library; if not, write to the Free
    00027  * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
    00028  */
    00029
    00033
    00034 #include <gtkmm/textbuffer.h>
    00035 #include <gtksourceviewmm/sourcelanguage.h>
    00036 #include <gtksourceviewmm/sourcemark.h>
    00037
    00038
    00039 #ifndef DOXYGEN_SHOULD_SKIP_THIS
    00040 typedef struct _GtkSourceBuffer GtkSourceBuffer;
    00041 typedef struct _GtkSourceBufferClass GtkSourceBufferClass;
    00042 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
    00043
    00044
    00045 namespace gtksourceview
    00046 { class SourceBuffer_Class; } // namespace gtksourceview
    00047 namespace gtksourceview
    00048 {
    00049
    00063
    00064 class SourceBuffer : public Gtk::TextBuffer
    00065 {
    00066
    00067 #ifndef DOXYGEN_SHOULD_SKIP_THIS
    00068
    00069 public:
    00070   typedef SourceBuffer CppObjectType;
    00071   typedef SourceBuffer_Class CppClassType;
    00072   typedef GtkSourceBuffer BaseObjectType;
    00073   typedef GtkSourceBufferClass BaseClassType;
    00074
    00075 private:  friend class SourceBuffer_Class;
    00076   static CppClassType sourcebuffer_class_;
    00077
    00078 private:
    00079   // noncopyable
    00080   SourceBuffer(const SourceBuffer&);
    00081   SourceBuffer& operator=(const SourceBuffer&);
    00082
    00083 protected:
    00084   explicit SourceBuffer(const Glib::ConstructParams& construct_params);
    00085   explicit SourceBuffer(GtkSourceBuffer* castitem);
    00086
    00087 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
    00088
    00089 public:
    00090   virtual ~SourceBuffer();
    00091
    00092 #ifndef DOXYGEN_SHOULD_SKIP_THIS
    00093   static GType get_type()      G_GNUC_CONST;
    00094   static GType get_base_type() G_GNUC_CONST;
    00095 #endif
    00096
    00098   GtkSourceBuffer*       gobj()       { return reinterpret_cast<GtkSourceBuffer*>(gobject_); }
    00099
    00101   const GtkSourceBuffer* gobj() const { return reinterpret_cast<GtkSourceBuffer*>(gobject_); }
    00102
    00104   GtkSourceBuffer* gobj_copy();
    00105
    00106 private:
    00107
    00108
    00109 protected:
    00110   SourceBuffer();
    00111
    00112
    00113   explicit SourceBuffer(const Glib::RefPtr<Gtk::TextTagTable>& tagtable);
    00114   explicit SourceBuffer (const Glib::RefPtr<SourceLanguage> &language) ;
    00115
    00116 public:
    00117
    00122
    00123   static Glib::RefPtr<SourceBuffer> create(const Glib::RefPtr<Gtk::TextTagTable>& tagtable);
    00124
    00125
    00130
    00131   static Glib::RefPtr<SourceBuffer> create(const Glib::RefPtr<SourceLanguage>& language);
    00132
    00133
    00137
    00143   bool get_highlight_matching_brackets() const;
    00144
    00151
    00160   void set_highlight_matching_brackets(bool highlight=true);
    00161
    00165
    00170   bool get_highlight_syntax() const;
    00171
    00184
    00193   void set_highlight_syntax(bool highlight = true);
    00194
    00198
    00204   int get_max_undo_levels() const;
    00205
    00218
    00233   void set_max_undo_levels(int max_undo_levels);
    00234
    00238
    00242   Glib::RefPtr<SourceLanguage> get_language();
    00243
    00247
    00251   Glib::RefPtr<const SourceLanguage> get_language() const;
    00252
    00253
    00262
    00272   void set_language(const Glib::RefPtr<SourceLanguage>& language);
    00273
    00277   //gtkmmproc error: gtk_source_buffer_get_escape_char : method defs lookup failed (1)
    00278
    00287   //gtkmmproc error: gtk_source_buffer_set_escape_char : method defs lookup failed (1)
    00288
    00291
    00295   bool can_undo() const;
    00296
    00301
    00306   bool can_redo() const;
    00307
    00317
    00327   void undo();
    00328
    00333
    00337   void redo();
    00338
    00344
    00353   void begin_not_undoable_action();
    00354
    00359
    00365   void end_not_undoable_action();
    00366
    00367
    00368   bool backward_iter_to_source_mark(Gtk::TextIter& iter, const Glib::ustring& category);
    00369   // overload with category == NULL
    00370   bool backward_iter_to_source_mark(Gtk::TextIter& iter);
    00371
    00372
    00373   bool forward_iter_to_source_mark(Gtk::TextIter& iter, const Glib::ustring& category);
    00374   // overload with category == NULL
    00375   bool forward_iter_to_source_mark(Gtk::TextIter& iter);
    00376
    00377
    00390   void ensure_highlight(const Gtk::TextIter& start, const Gtk::TextIter& end);
    00391
    00395   void set_style_scheme(const Glib::RefPtr<SourceStyleScheme>& scheme);
    00396
    00401   Glib::RefPtr<SourceStyleScheme> get_style_scheme();
    00402
    00407   Glib::RefPtr<const SourceStyleScheme> get_style_scheme() const;
    00408
    00409   Glib::RefPtr<SourceMark> create_source_mark(const Glib::ustring& name, const Glib::ustring& category, const Gtk::TextIter& where);
    00410
    00411
    00412   Glib::SListHandle<Glib::RefPtr<SourceMark> > get_source_marks_at_line(int line, const Glib::ustring& category) const;
    00413
    00414   // overloaded with category == NULL
    00415   Glib::SListHandle<Glib::RefPtr<SourceMark> > get_source_marks_at_line(int line) const;
    00416
    00417   Glib::SListHandle<Glib::RefPtr<SourceMark> > get_source_marks_at_iter(Gtk::TextIter& iter, const Glib::ustring& category) const;
    00418   // overloaded with category == NULL
    00419   Glib::SListHandle<Glib::RefPtr<SourceMark> > get_source_marks_at_iter(Gtk::TextIter& iter) const;
    00420
    00421
    00422   void remove_source_marks(const Gtk::TextIter& start, const Gtk::TextIter& end, const Glib::ustring& category);
    00423
    00426
    00430   //gtkmmproc error: can-redo :  signal defs lookup failed
    00431
    00435   //gtkmmproc error: can-undo :  signal defs lookup failed
    00436
    00443
    00449   Glib::SignalProxy2< void,Gtk::TextIter&,Gtk::TextIter& > signal_highlight_updated();
    00450
    00451
    00457   //gtkmmproc error: marker-updated :  signal defs lookup failed
    00459
    00460
    00461 public:
    00462
    00463 public:
    00464   //C++ methods used to invoke GTK+ virtual functions:
    00465 #ifdef GLIBMM_VFUNCS_ENABLED
    00466 #endif //GLIBMM_VFUNCS_ENABLED
    00467
    00468 protected:
    00469   //GTK+ Virtual Functions (override these to change behaviour):
    00470 #ifdef GLIBMM_VFUNCS_ENABLED
    00471 #endif //GLIBMM_VFUNCS_ENABLED
    00472
    00473   //Default Signal Handlers::
    00474 #ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
    00475 #endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
    00476
    00477
    00478 };
    00479
    00480 } /* namespace gtksourceview */
    00481
    00482
    00483 namespace Glib
    00484 {
    00493   Glib::RefPtr<gtksourceview::SourceBuffer> wrap(GtkSourceBuffer* object, bool take_copy = false);
    00494 }
    00495
    00496
    00497 #endif /* _GTKSOURCEVIEWMM_SOURCEBUFFER_H */
    00498