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/sourcemarker.h>
00037 #include <gtksourceviewmm/sourcetagstyle.h>
00038 #include <gtksourceviewmm/sourcetagtable.h>
00039 
00040 
00041 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00042 typedef struct _GtkSourceBuffer GtkSourceBuffer;
00043 typedef struct _GtkSourceBufferClass GtkSourceBufferClass;
00044 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
00045 
00046 
00047 namespace gtksourceview
00048 { class SourceBuffer_Class; } // namespace gtksourceview
00049 namespace gtksourceview
00050 {
00051 
00065 
00066 class SourceBuffer : public Gtk::TextBuffer
00067 {
00068   
00069 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00070 
00071 public:
00072   typedef SourceBuffer CppObjectType;
00073   typedef SourceBuffer_Class CppClassType;
00074   typedef GtkSourceBuffer BaseObjectType;
00075   typedef GtkSourceBufferClass BaseClassType;
00076 
00077 private:  friend class SourceBuffer_Class;
00078   static CppClassType sourcebuffer_class_;
00079 
00080 private:
00081   // noncopyable
00082   SourceBuffer(const SourceBuffer&);
00083   SourceBuffer& operator=(const SourceBuffer&);
00084 
00085 protected:
00086   explicit SourceBuffer(const Glib::ConstructParams& construct_params);
00087   explicit SourceBuffer(GtkSourceBuffer* castitem);
00088 
00089 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
00090 
00091 public:
00092   virtual ~SourceBuffer();
00093 
00094 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00095   static GType get_type()      G_GNUC_CONST;
00096   static GType get_base_type() G_GNUC_CONST;
00097 #endif
00098 
00100   GtkSourceBuffer*       gobj()       { return reinterpret_cast<GtkSourceBuffer*>(gobject_); }
00101 
00103   const GtkSourceBuffer* gobj() const { return reinterpret_cast<GtkSourceBuffer*>(gobject_); }
00104 
00106   GtkSourceBuffer* gobj_copy();
00107 
00108 private:
00109 
00110 
00111 protected:
00112   SourceBuffer();
00113   explicit SourceBuffer(Glib::RefPtr<SourceTagTable> &tagtable);
00114   explicit SourceBuffer (Glib::RefPtr<SourceLanguage> &language) ;
00115 
00116 public:
00117 
00122    
00123   static Glib::RefPtr<SourceBuffer> create(Glib::RefPtr<SourceTagTable> & tagtable);
00124 
00125 
00130    
00131   static Glib::RefPtr<SourceBuffer> create(Glib::RefPtr<SourceLanguage> & language);
00132 
00133 
00137   
00138   bool get_check_brackets() const;
00139 
00146   
00147   void set_check_brackets(bool check_brackets=true);
00148 
00152   
00153   void set_bracket_match_style(const SourceTagStyle& style);
00154 
00158   
00159   bool get_highlight() const;
00160 
00173   
00174   void set_highlight(bool highlight=true);
00175 
00179   
00180   int get_max_undo_levels() const;
00181 
00194   
00195   void set_max_undo_levels(int max_undo_levels);
00196 
00200   
00201   Glib::RefPtr<SourceLanguage> get_language();
00202 
00206   
00207   Glib::RefPtr<const SourceLanguage> get_language() const;
00208 
00209 
00218   
00219   void set_language(Glib::RefPtr<SourceLanguage> language);
00220 
00224   
00225   gunichar get_escape_char() const;
00226 
00235   
00236   void set_escape_char(gunichar escape_char);
00237 
00240   
00241   bool can_undo() const;
00242 
00247   
00248   bool can_redo() const;
00249 
00259   
00260   void undo();
00261 
00266   
00267   void redo();
00268 
00274   
00275   void begin_not_undoable_action();
00276 
00281   
00282   void end_not_undoable_action();
00283 
00305   
00306   Glib::RefPtr<SourceMarker> create_marker(const Glib::ustring& name, const Glib::ustring& type, const Gtk::TextIter& where);
00307 
00311   
00312   void move_marker(Glib::RefPtr<SourceMarker> &marker, const Gtk::TextIter& where);
00313 
00319   
00320   void delete_marker(Glib::RefPtr<SourceMarker> &marker);
00321 
00325   
00326   Glib::RefPtr<SourceMarker> get_marker(const Glib::ustring& name);
00327 
00331   
00332   Glib::RefPtr<const SourceMarker> get_marker(const Glib::ustring& name) const;
00333 
00338   
00339   Glib::SListHandle<Glib::RefPtr<SourceMarker> > get_markers_in_region(const Gtk::TextIter& begin, const Gtk::TextIter& end);
00340 
00345   //_WRAP_METHOD(Glib::SListHandle<Glib::RefPtr<const SourceMarker> > get_markers_in_region(const Gtk::TextIter& begin, const Gtk::TextIter& end) const, gtk_source_buffer_get_markers_in_region, constversion)
00346 
00350   
00351   Glib::RefPtr<SourceMarker> get_first_marker();
00352 
00356   
00357   Glib::RefPtr<const SourceMarker> get_first_marker() const;
00358 
00362   
00363   Glib::RefPtr<SourceMarker> get_last_marker();
00364 
00368   
00369   Glib::RefPtr<const SourceMarker> get_last_marker() const;
00370 
00375   Gtk::TextIter get_iter_at_marker(const Glib::RefPtr<SourceMarker>& marker);
00376 
00377   
00386   
00387   Glib::RefPtr<SourceMarker> get_next_marker(Gtk::TextIter& iter);
00388 
00397   
00398   Glib::RefPtr<const SourceMarker> get_next_marker(Gtk::TextIter& iter) const;
00399 
00408   
00409   Glib::RefPtr<SourceMarker> get_prev_marker(Gtk::TextIter& iter);
00410 
00419   
00420   Glib::RefPtr<const SourceMarker> get_prev_marker(Gtk::TextIter& iter) const;
00421 
00424 
00428   
00429 
00430   Glib::SignalProxy1< void,bool > signal_can_redo();
00431 
00432 
00436   
00437 
00438   Glib::SignalProxy1< void,bool > signal_can_undo();
00439 
00440 
00447   
00448 
00449   Glib::SignalProxy2< void,Gtk::TextIter &,Gtk::TextIter & > signal_highlight_updated();
00450 
00451 
00457   
00458 
00459   Glib::SignalProxy1< void,Gtk::TextIter & > signal_marker_updated();
00460 
00462 
00463 
00464 public:
00465 
00466 public:
00467   //C++ methods used to invoke GTK+ virtual functions:
00468 #ifdef GLIBMM_VFUNCS_ENABLED
00469 #endif //GLIBMM_VFUNCS_ENABLED
00470 
00471 protected:
00472   //GTK+ Virtual Functions (override these to change behaviour):
00473 #ifdef GLIBMM_VFUNCS_ENABLED
00474 #endif //GLIBMM_VFUNCS_ENABLED
00475 
00476   //Default Signal Handlers::
00477 #ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
00478   virtual void on_can_redo(bool can_redo);
00479   virtual void on_can_undo(bool can_redo);
00480   virtual void on_highlight_updated(Gtk::TextIter & start, Gtk::TextIter & end);
00481   virtual void on_marker_updated(Gtk::TextIter & where);
00482 #endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
00483 
00484 
00485 };
00486 
00487 } /* namespace gtksourceview */
00488 
00489 
00490 namespace Glib
00491 {
00497   Glib::RefPtr<gtksourceview::SourceBuffer> wrap(GtkSourceBuffer* object, bool take_copy = false);
00498 }
00499 
00500 
00501 #endif /* _GTKSOURCEVIEWMM_SOURCEBUFFER_H */
00502 

Generated on Mon Jan 22 13:46:06 2007 for libgtksourceviewmm by  doxygen 1.4.6