00001
00002
00003 #ifndef _GTKSOURCEVIEWMM_SOURCEBUFFER_H
00004 #define _GTKSOURCEVIEWMM_SOURCEBUFFER_H
00005
00006
00007 #include <glibmm.h>
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00033
00034 #include <gtkmm/textbuffer.h>
00035 #include <gtksourceviewmm/sourcelanguage.h>
00036
00037
00038 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00039 typedef struct _GtkSourceBuffer GtkSourceBuffer;
00040 typedef struct _GtkSourceBufferClass GtkSourceBufferClass;
00041 #endif
00042
00043
00044 namespace gtksourceview
00045 { class SourceBuffer_Class; }
00046 namespace gtksourceview
00047 {
00048
00062
00063 class SourceBuffer : public Gtk::TextBuffer
00064 {
00065
00066 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00067
00068 public:
00069 typedef SourceBuffer CppObjectType;
00070 typedef SourceBuffer_Class CppClassType;
00071 typedef GtkSourceBuffer BaseObjectType;
00072 typedef GtkSourceBufferClass BaseClassType;
00073
00074 private: friend class SourceBuffer_Class;
00075 static CppClassType sourcebuffer_class_;
00076
00077 private:
00078
00079 SourceBuffer(const SourceBuffer&);
00080 SourceBuffer& operator=(const SourceBuffer&);
00081
00082 protected:
00083 explicit SourceBuffer(const Glib::ConstructParams& construct_params);
00084 explicit SourceBuffer(GtkSourceBuffer* castitem);
00085
00086 #endif
00087
00088 public:
00089 virtual ~SourceBuffer();
00090
00091 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00092 static GType get_type() G_GNUC_CONST;
00093 static GType get_base_type() G_GNUC_CONST;
00094 #endif
00095
00097 GtkSourceBuffer* gobj() { return reinterpret_cast<GtkSourceBuffer*>(gobject_); }
00098
00100 const GtkSourceBuffer* gobj() const { return reinterpret_cast<GtkSourceBuffer*>(gobject_); }
00101
00103 GtkSourceBuffer* gobj_copy();
00104
00105 private:
00106
00107
00108 protected:
00109 SourceBuffer();
00110
00111
00112 explicit SourceBuffer(const Glib::RefPtr<Gtk::TextTagTable>& tagtable);
00113 explicit SourceBuffer (const Glib::RefPtr<SourceLanguage> &language) ;
00114
00115 public:
00116
00121
00122 static Glib::RefPtr<SourceBuffer> create(const Glib::RefPtr<Gtk::TextTagTable>& tagtable);
00123
00124
00129
00130 static Glib::RefPtr<SourceBuffer> create(const Glib::RefPtr<SourceLanguage>& language);
00131
00132
00136
00137
00144
00145
00149
00150 bool get_highlight_syntax() const;
00151
00164
00165 void set_highlight_syntax(bool highlight = true);
00166
00170
00171 int get_max_undo_levels() const;
00172
00185
00186 void set_max_undo_levels(int max_undo_levels);
00187
00191
00192 Glib::RefPtr<SourceLanguage> get_language();
00193
00197
00198 Glib::RefPtr<const SourceLanguage> get_language() const;
00199
00200
00209
00210 void set_language(const Glib::RefPtr<SourceLanguage>& language);
00211
00215
00216
00225
00226
00229
00230 bool can_undo() const;
00231
00236
00237 bool can_redo() const;
00238
00248
00249 void undo();
00250
00255
00256 void redo();
00257
00263
00264 void begin_not_undoable_action();
00265
00270
00271 void end_not_undoable_action();
00272
00273
00276
00280
00281
00285
00286
00293
00299 Glib::SignalProxy2< void,Gtk::TextIter &,Gtk::TextIter & > signal_highlight_updated();
00300
00301
00307
00313 Glib::SignalProxy1< void,Gtk::TextIter & > signal_marker_updated();
00314
00316
00317
00318 public:
00319
00320 public:
00321
00322 #ifdef GLIBMM_VFUNCS_ENABLED
00323 #endif //GLIBMM_VFUNCS_ENABLED
00324
00325 protected:
00326
00327 #ifdef GLIBMM_VFUNCS_ENABLED
00328 #endif //GLIBMM_VFUNCS_ENABLED
00329
00330
00331 #ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
00332 #endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
00333
00334
00335 };
00336
00337 }
00338
00339
00340 namespace Glib
00341 {
00350 Glib::RefPtr<gtksourceview::SourceBuffer> wrap(GtkSourceBuffer* object, bool take_copy = false);
00351 }
00352
00353
00354 #endif
00355