sourceview.h

Go to the documentation of this file.
00001 // -*- c++ -*-
00002 // Generated by gtkmmproc -- DO NOT MODIFY!
00003 #ifndef _GTKSOURCEVIEWMM_SOURCEVIEW_H
00004 #define _GTKSOURCEVIEWMM_SOURCEVIEW_H
00005 
00006 
00007 #include <glibmm.h>
00008 
00009 /* sourceview.hg
00010  * 
00011  * Copyright (C) 2004-2005 Jae Jang
00012  * Copyright (C) 2005-2006 Rob Page
00013  * Copyright (C) 2005-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 
00032 
00033 #include <gtkmm/textview.h>
00034 #include <gtksourceviewmm/sourcebuffer.h>
00035 
00036 
00037 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00038 typedef struct _GtkSourceView GtkSourceView;
00039 typedef struct _GtkSourceViewClass GtkSourceViewClass;
00040 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
00041 
00042 
00043 namespace gtksourceview
00044 { class SourceView_Class; } // namespace gtksourceview
00045 namespace gtksourceview
00046 {
00047 
00051 
00052 class SourceView : public Gtk::TextView
00053 {
00054   public:
00055 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00056   typedef SourceView CppObjectType;
00057   typedef SourceView_Class CppClassType;
00058   typedef GtkSourceView BaseObjectType;
00059   typedef GtkSourceViewClass BaseClassType;
00060 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
00061 
00062   virtual ~SourceView();
00063 
00064 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00065 
00066 private:
00067   friend class SourceView_Class;
00068   static CppClassType sourceview_class_;
00069 
00070   // noncopyable
00071   SourceView(const SourceView&);
00072   SourceView& operator=(const SourceView&);
00073 
00074 protected:
00075   explicit SourceView(const Glib::ConstructParams& construct_params);
00076   explicit SourceView(GtkSourceView* castitem);
00077 
00078 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
00079 
00080 public:
00081 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00082   static GType get_type()      G_GNUC_CONST;
00083   static GType get_base_type() G_GNUC_CONST;
00084 #endif
00085 
00087   GtkSourceView*       gobj()       { return reinterpret_cast<GtkSourceView*>(gobject_); }
00088 
00090   const GtkSourceView* gobj() const { return reinterpret_cast<GtkSourceView*>(gobject_); }
00091 
00092 
00093 public:
00094   //C++ methods used to invoke GTK+ virtual functions:
00095 #ifdef GLIBMM_VFUNCS_ENABLED
00096 #endif //GLIBMM_VFUNCS_ENABLED
00097 
00098 protected:
00099   //GTK+ Virtual Functions (override these to change behaviour):
00100 #ifdef GLIBMM_VFUNCS_ENABLED
00101 #endif //GLIBMM_VFUNCS_ENABLED
00102 
00103   //Default Signal Handlers::
00104 #ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
00105   virtual void on_redo();
00106   virtual void on_undo();
00107 #endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
00108 
00109 
00110 private:
00111 
00112 
00113 public:
00114   //_CTOR_DEFAULT(gtk_source_view_new_val) ;
00115   //_WRAP_CTOR (SourceView (Glib::RefPtr<SourceBuffer> &buffer), gtk_source_view_new_with_buffer)
00116 
00118   explicit SourceView () ;
00119 
00124   explicit SourceView (Glib::RefPtr<SourceBuffer> &buffer) ;
00125 
00126 
00127   static Glib::RefPtr<SourceView> create();
00128 
00129   
00130   static Glib::RefPtr<SourceView> create(Glib::RefPtr<SourceBuffer> & buffer);
00131 
00132 
00136   Glib::RefPtr<const SourceBuffer> get_source_buffer () const ;
00137 
00141   Glib::RefPtr<SourceBuffer> get_source_buffer () ;
00142 
00146   void set_source_buffer (Glib::RefPtr<SourceBuffer> &source_buffer) ;
00147 
00151   
00152   void set_show_line_numbers(bool show=true);
00153 
00157   
00158   bool get_show_line_numbers() const;
00159 
00163   
00164   void set_show_line_markers(bool show=true);
00165 
00169   
00170   bool get_show_line_markers() const;
00171 
00175   
00176   void set_tabs_width(guint width);
00177 
00181   
00182   guint get_tabs_width() const;
00183 
00187   
00188   void set_auto_indent(bool enable=true);
00189 
00193   
00194   bool get_auto_indent() const;
00195 
00199   
00200   void set_insert_spaces_instead_of_tabs(bool enable=true);
00201 
00205   
00206   bool get_insert_spaces_instead_of_tabs() const;
00207 
00211   
00212   void set_show_margin(bool show=true);
00213 
00217   
00218   bool get_show_margin() const;
00219 
00223   
00224   void set_highlight_current_line(bool highlight=true);
00225 
00229   
00230   bool get_highlight_current_line() const;
00231   
00235   
00236   void set_margin(guint margin);
00237 
00241   
00242   guint get_margin() const;
00243 
00248   
00249   void set_marker_pixbuf(const Glib::ustring& marker, Glib::RefPtr<Gdk::Pixbuf> pixbuf);
00250 
00255   
00256   Glib::RefPtr<Gdk::Pixbuf> get_marker_pixbuf(const Glib::ustring& marker);
00257 
00262   
00263   Glib::RefPtr<const Gdk::Pixbuf> get_marker_pixbuf(const Glib::ustring& marker) const;
00264 
00268   
00269   void set_smart_home_end(bool enable=true);
00270 
00274   
00275   bool get_smart_home_end() const;
00276 
00277   
00283   Glib::SignalProxy0< void > signal_redo();
00284 
00285 
00291   Glib::SignalProxy0< void > signal_undo();
00292 
00293 
00294 };
00295 
00296 } /* namespace gtksourceview */
00297 
00298 
00299 namespace Glib
00300 {
00306   gtksourceview::SourceView* wrap(GtkSourceView* object, bool take_copy = false);
00307 } //namespace Glib
00308 
00309 
00310 #endif /* _GTKSOURCEVIEWMM_SOURCEVIEW_H */
00311 

Generated on Tue May 1 21:29:15 2007 for libgtksourceviewmm by  doxygen 1.5.1