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 
00276   
00280   bool can_undo() const;
00281 
00286   
00291   bool can_redo() const;
00292 
00302   
00312   void undo();
00313 
00318   
00322   void redo();
00323 
00329   
00338   void begin_not_undoable_action();
00339 
00344   
00350   void end_not_undoable_action();
00351 
00352   
00353   bool backward_iter_to_source_mark(Gtk::TextIter& iter, const Glib::ustring& category);
00354   // overload with category == NULL
00355   bool backward_iter_to_source_mark(Gtk::TextIter& iter);
00356 
00357   
00358   bool forward_iter_to_source_mark(Gtk::TextIter& iter, const Glib::ustring& category);
00359   // overload with category == NULL
00360   bool forward_iter_to_source_mark(Gtk::TextIter& iter);
00361 
00362   
00375   void ensure_highlight(const Gtk::TextIter& start, const Gtk::TextIter& end);
00376   
00380   void set_style_scheme(const Glib::RefPtr<SourceStyleScheme>& scheme);
00381   
00386   Glib::RefPtr<SourceStyleScheme> get_style_scheme();
00387   
00392   Glib::RefPtr<const SourceStyleScheme> get_style_scheme() const;
00393   
00394   Glib::RefPtr<SourceMark> create_source_mark(const Glib::ustring& name, const Glib::ustring& category, const Gtk::TextIter& where);
00395 
00396  
00397   Glib::SListHandle<Glib::RefPtr<SourceMark> > get_source_marks_at_line(int line, const Glib::ustring& category) const;
00398 
00399   // overloaded with category == NULL
00400   Glib::SListHandle<Glib::RefPtr<SourceMark> > get_source_marks_at_line(int line) const;
00401   
00402   Glib::SListHandle<Glib::RefPtr<SourceMark> > get_source_marks_at_iter(Gtk::TextIter& iter, const Glib::ustring& category) const;
00403   // overloaded with category == NULL
00404   Glib::SListHandle<Glib::RefPtr<SourceMark> > get_source_marks_at_iter(Gtk::TextIter& iter) const;
00405 
00406   
00407   void remove_source_marks(const Gtk::TextIter& start, const Gtk::TextIter& end, const Glib::ustring& category);
00408 
00411 
00418   
00424   Glib::SignalProxy2< void,Gtk::TextIter&,Gtk::TextIter& > signal_highlight_updated();
00425 
00426 
00432   
00438   Glib::SignalProxy1< void,const Glib::RefPtr<SourceMark>& > signal_source_mark_updated();
00439 
00441 
00442 
00443 public:
00444 
00445 public:
00446   //C++ methods used to invoke GTK+ virtual functions:
00447 #ifdef GLIBMM_VFUNCS_ENABLED
00448 #endif //GLIBMM_VFUNCS_ENABLED
00449 
00450 protected:
00451   //GTK+ Virtual Functions (override these to change behaviour):
00452 #ifdef GLIBMM_VFUNCS_ENABLED
00453 #endif //GLIBMM_VFUNCS_ENABLED
00454 
00455   //Default Signal Handlers::
00456 #ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
00457 #endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
00458 
00459 
00460 };
00461 
00462 } /* namespace gtksourceview */
00463 
00464 
00465 namespace Glib
00466 {
00475   Glib::RefPtr<gtksourceview::SourceBuffer> wrap(GtkSourceBuffer* object, bool take_copy = false);
00476 }
00477 
00478 
00479 #endif /* _GTKSOURCEVIEWMM_SOURCEBUFFER_H */
00480 

Generated on Fri Jun 20 05:53:08 2008 for libgtksourceviewmm by  doxygen 1.5.4