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 
00053 enum SourceSmartHomeEndType
00054 {
00055   SOURCE_SMART_HOME_END_DISABLED,
00056   SOURCE_SMART_HOME_END_BEFORE,
00057   SOURCE_SMART_HOME_END_AFTER,
00058   SOURCE_SMART_HOME_END_ALWAYS
00059 };
00060 
00061 } // namespace gtksourceview
00062 
00063 
00064 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00065 namespace Glib
00066 {
00067 
00068 template <>
00069 class Value<gtksourceview::SourceSmartHomeEndType> : public Glib::Value_Enum<gtksourceview::SourceSmartHomeEndType>
00070 {
00071 public:
00072   static GType value_type() G_GNUC_CONST;
00073 };
00074 
00075 } // namespace Glib
00076 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
00077 
00078 
00079 namespace gtksourceview
00080 {
00081 
00082 
00086 
00087 class SourceView : public Gtk::TextView
00088 {
00089   public:
00090 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00091   typedef SourceView CppObjectType;
00092   typedef SourceView_Class CppClassType;
00093   typedef GtkSourceView BaseObjectType;
00094   typedef GtkSourceViewClass BaseClassType;
00095 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
00096 
00097   virtual ~SourceView();
00098 
00099 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00100 
00101 private:
00102   friend class SourceView_Class;
00103   static CppClassType sourceview_class_;
00104 
00105   // noncopyable
00106   SourceView(const SourceView&);
00107   SourceView& operator=(const SourceView&);
00108 
00109 protected:
00110   explicit SourceView(const Glib::ConstructParams& construct_params);
00111   explicit SourceView(GtkSourceView* castitem);
00112 
00113 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
00114 
00115 public:
00116 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00117   static GType get_type()      G_GNUC_CONST;
00118   static GType get_base_type() G_GNUC_CONST;
00119 #endif
00120 
00122   GtkSourceView*       gobj()       { return reinterpret_cast<GtkSourceView*>(gobject_); }
00123 
00125   const GtkSourceView* gobj() const { return reinterpret_cast<GtkSourceView*>(gobject_); }
00126 
00127 
00128 public:
00129   //C++ methods used to invoke GTK+ virtual functions:
00130 #ifdef GLIBMM_VFUNCS_ENABLED
00131 #endif //GLIBMM_VFUNCS_ENABLED
00132 
00133 protected:
00134   //GTK+ Virtual Functions (override these to change behaviour):
00135 #ifdef GLIBMM_VFUNCS_ENABLED
00136 #endif //GLIBMM_VFUNCS_ENABLED
00137 
00138   //Default Signal Handlers::
00139 #ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
00140   virtual void on_redo();
00141   virtual void on_undo();
00142 #endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
00143 
00144 
00145 private:
00146 
00147 
00148 public:
00149   //_CTOR_DEFAULT(gtk_source_view_new_val) ;
00150   //_WRAP_CTOR (SourceView (const Glib::RefPtr<SourceBuffer> &buffer), gtk_source_view_new_with_buffer)
00151 
00153   explicit SourceView () ;
00154 
00159   explicit SourceView (const Glib::RefPtr<SourceBuffer> &buffer) ;
00160 
00161 
00162   static Glib::RefPtr<SourceView> create();
00163 
00164   
00165   static Glib::RefPtr<SourceView> create(const Glib::RefPtr<SourceBuffer> & buffer);
00166 
00167 
00171   Glib::RefPtr<const SourceBuffer> get_source_buffer () const ;
00172 
00176   Glib::RefPtr<SourceBuffer> get_source_buffer () ;
00177 
00181   void set_source_buffer (const Glib::RefPtr<SourceBuffer> &source_buffer) ;
00182 
00186   
00190   void set_show_line_numbers(bool show=true);
00191 
00195   
00199   bool get_show_line_numbers() const;
00200 
00204   
00208   void set_tab_width(guint width);
00209 
00213   
00217   guint get_tab_width() const;
00218 
00222   
00226   void set_auto_indent(bool enable=true);
00227 
00231   
00235   bool get_auto_indent() const;
00236 
00240   
00245   void set_insert_spaces_instead_of_tabs(bool enable=true);
00246 
00250   
00254   bool get_insert_spaces_instead_of_tabs() const;
00255 
00259   
00263   void set_show_right_margin(bool show = true);
00264 
00268   
00272   bool get_show_right_margin() const;
00273 
00277   
00281   void set_highlight_current_line(bool highlight=true);
00282 
00286   
00290   bool get_highlight_current_line() const;
00291   
00295   
00300   void set_right_margin_position(guint margin);
00301 
00305   
00309   guint get_right_margin_position() const;
00310 
00314   
00319   void set_smart_home_end(SourceSmartHomeEndType smart_he);
00320 
00324   
00328   SourceSmartHomeEndType get_smart_home_end() const;
00329 
00330   
00336   void set_show_line_marks(bool show = true);
00337   
00343   bool get_show_line_marks() const;
00344   
00352   void set_indent_on_tab(bool show = true);
00353   
00359   bool get_indent_on_tab() const;
00360   
00366   void set_indent_width(gint width);
00367   
00371   gint get_indent_width() const;
00372   
00381   void set_mark_category_priority(const Glib::ustring& category, gint priority);
00382   
00390   gint get_mark_category_priority(const Glib::ustring& category) const;
00391   
00399   void set_mark_category_pixbuf(const Glib::ustring& category, const Glib::RefPtr<Gdk::Pixbuf>& pixbuf);
00400   
00407   Glib::RefPtr<Gdk::Pixbuf> get_mark_category_pixbuf(const Glib::ustring& category);
00408   
00415   Glib::RefPtr<const Gdk::Pixbuf> get_mark_category_pixbuf(const Glib::ustring& category) const;
00416 
00417   
00423   Glib::SignalProxy0< void > signal_redo();
00424 
00425   
00431   Glib::SignalProxy0< void > signal_undo();
00432 
00433 
00434   #ifdef GLIBMM_PROPERTIES_ENABLED
00435 
00441   Glib::PropertyProxy<bool> property_show_line_numbers() ;
00442 #endif //#GLIBMM_PROPERTIES_ENABLED
00443 
00444 #ifdef GLIBMM_PROPERTIES_ENABLED
00445 
00451   Glib::PropertyProxy_ReadOnly<bool> property_show_line_numbers() const;
00452 #endif //#GLIBMM_PROPERTIES_ENABLED
00453 
00454   #ifdef GLIBMM_PROPERTIES_ENABLED
00455 
00461   Glib::PropertyProxy<bool> property_show_line_marks() ;
00462 #endif //#GLIBMM_PROPERTIES_ENABLED
00463 
00464 #ifdef GLIBMM_PROPERTIES_ENABLED
00465 
00471   Glib::PropertyProxy_ReadOnly<bool> property_show_line_marks() const;
00472 #endif //#GLIBMM_PROPERTIES_ENABLED
00473 
00474   #ifdef GLIBMM_PROPERTIES_ENABLED
00475 
00481   Glib::PropertyProxy<guint> property_tab_width() ;
00482 #endif //#GLIBMM_PROPERTIES_ENABLED
00483 
00484 #ifdef GLIBMM_PROPERTIES_ENABLED
00485 
00491   Glib::PropertyProxy_ReadOnly<guint> property_tab_width() const;
00492 #endif //#GLIBMM_PROPERTIES_ENABLED
00493 
00494   #ifdef GLIBMM_PROPERTIES_ENABLED
00495 
00501   Glib::PropertyProxy<int> property_indent_width() ;
00502 #endif //#GLIBMM_PROPERTIES_ENABLED
00503 
00504 #ifdef GLIBMM_PROPERTIES_ENABLED
00505 
00511   Glib::PropertyProxy_ReadOnly<int> property_indent_width() const;
00512 #endif //#GLIBMM_PROPERTIES_ENABLED
00513 
00514   #ifdef GLIBMM_PROPERTIES_ENABLED
00515 
00521   Glib::PropertyProxy<bool> property_auto_indent() ;
00522 #endif //#GLIBMM_PROPERTIES_ENABLED
00523 
00524 #ifdef GLIBMM_PROPERTIES_ENABLED
00525 
00531   Glib::PropertyProxy_ReadOnly<bool> property_auto_indent() const;
00532 #endif //#GLIBMM_PROPERTIES_ENABLED
00533 
00534   #ifdef GLIBMM_PROPERTIES_ENABLED
00535 
00541   Glib::PropertyProxy<bool> property_insert_spaces_instead_of_tabs() ;
00542 #endif //#GLIBMM_PROPERTIES_ENABLED
00543 
00544 #ifdef GLIBMM_PROPERTIES_ENABLED
00545 
00551   Glib::PropertyProxy_ReadOnly<bool> property_insert_spaces_instead_of_tabs() const;
00552 #endif //#GLIBMM_PROPERTIES_ENABLED
00553 
00554   #ifdef GLIBMM_PROPERTIES_ENABLED
00555 
00561   Glib::PropertyProxy<bool> property_show_right_margin() ;
00562 #endif //#GLIBMM_PROPERTIES_ENABLED
00563 
00564 #ifdef GLIBMM_PROPERTIES_ENABLED
00565 
00571   Glib::PropertyProxy_ReadOnly<bool> property_show_right_margin() const;
00572 #endif //#GLIBMM_PROPERTIES_ENABLED
00573 
00574   #ifdef GLIBMM_PROPERTIES_ENABLED
00575 
00581   Glib::PropertyProxy<guint> property_right_margin_position() ;
00582 #endif //#GLIBMM_PROPERTIES_ENABLED
00583 
00584 #ifdef GLIBMM_PROPERTIES_ENABLED
00585 
00591   Glib::PropertyProxy_ReadOnly<guint> property_right_margin_position() const;
00592 #endif //#GLIBMM_PROPERTIES_ENABLED
00593 
00594   #ifdef GLIBMM_PROPERTIES_ENABLED
00595 
00601   Glib::PropertyProxy<SourceSmartHomeEndType> property_smart_home_end() ;
00602 #endif //#GLIBMM_PROPERTIES_ENABLED
00603 
00604 #ifdef GLIBMM_PROPERTIES_ENABLED
00605 
00611   Glib::PropertyProxy_ReadOnly<SourceSmartHomeEndType> property_smart_home_end() const;
00612 #endif //#GLIBMM_PROPERTIES_ENABLED
00613 
00614   #ifdef GLIBMM_PROPERTIES_ENABLED
00615 
00621   Glib::PropertyProxy<bool> property_highlight_current_line() ;
00622 #endif //#GLIBMM_PROPERTIES_ENABLED
00623 
00624 #ifdef GLIBMM_PROPERTIES_ENABLED
00625 
00631   Glib::PropertyProxy_ReadOnly<bool> property_highlight_current_line() const;
00632 #endif //#GLIBMM_PROPERTIES_ENABLED
00633 
00634   #ifdef GLIBMM_PROPERTIES_ENABLED
00635 
00641   Glib::PropertyProxy<bool> property_indent_on_tab() ;
00642 #endif //#GLIBMM_PROPERTIES_ENABLED
00643 
00644 #ifdef GLIBMM_PROPERTIES_ENABLED
00645 
00651   Glib::PropertyProxy_ReadOnly<bool> property_indent_on_tab() const;
00652 #endif //#GLIBMM_PROPERTIES_ENABLED
00653 
00654 
00655 };
00656 
00657 } /* namespace gtksourceview */
00658 
00659 
00660 namespace Glib
00661 {
00670   gtksourceview::SourceView* wrap(GtkSourceView* object, bool take_copy = false);
00671 } //namespace Glib
00672 
00673 
00674 #endif /* _GTKSOURCEVIEWMM_SOURCEVIEW_H */
00675 

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