libgtksourceviewmm: sourceview.h Source File

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

# 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   //TODO: Properties.
    00435
    00436
    00437 };
    00438
    00439 } /* namespace gtksourceview */
    00440
    00441
    00442 namespace Glib
    00443 {
    00452   gtksourceview::SourceView* wrap(GtkSourceView* object, bool take_copy = false);
    00453 } //namespace Glib
    00454
    00455
    00456 #endif /* _GTKSOURCEVIEWMM_SOURCEVIEW_H */
    00457