00001
00002
00003 #ifndef _GTKSOURCEVIEWMM_SOURCETAG_H
00004 #define _GTKSOURCEVIEWMM_SOURCETAG_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
00030
00034
00035 #include <glibmm/slisthandle.h>
00036 #include <gtkmm/textbuffer.h>
00037 #include <gtksourceviewmm/sourcetagstyle.h>
00038 #include <gtksourceview/gtksourcetag.h>
00039
00040
00047
00048
00049 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00050 typedef struct _GtkSourceTag GtkSourceTag;
00051 typedef struct _GtkSourceTagClass GtkSourceTagClass;
00052 #endif
00053
00054
00055 namespace gtksourceview
00056 { class SourceTag_Class; }
00057 namespace gtksourceview
00058 {
00067
00068 class SourceTag : public Gtk::TextTag
00069 {
00070
00071 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00072
00073 public:
00074 typedef SourceTag CppObjectType;
00075 typedef SourceTag_Class CppClassType;
00076 typedef GtkSourceTag BaseObjectType;
00077 typedef GtkSourceTagClass BaseClassType;
00078
00079 private: friend class SourceTag_Class;
00080 static CppClassType sourcetag_class_;
00081
00082 private:
00083
00084 SourceTag(const SourceTag&);
00085 SourceTag& operator=(const SourceTag&);
00086
00087 protected:
00088 explicit SourceTag(const Glib::ConstructParams& construct_params);
00089 explicit SourceTag(GtkSourceTag* castitem);
00090
00091 #endif
00092
00093 public:
00094 virtual ~SourceTag();
00095
00096 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00097 static GType get_type() G_GNUC_CONST;
00098 static GType get_base_type() G_GNUC_CONST;
00099 #endif
00100
00102 GtkSourceTag* gobj() { return reinterpret_cast<GtkSourceTag*>(gobject_); }
00103
00105 const GtkSourceTag* gobj() const { return reinterpret_cast<GtkSourceTag*>(gobject_); }
00106
00108 GtkSourceTag* gobj_copy();
00109
00110 private:
00111
00112
00113 protected:
00114 SourceTag();
00115
00116 public:
00117
00130 static Glib::RefPtr<SourceTag> create_syntax_tag (const Glib::ustring &a_id,
00131 const Glib::ustring &a_name,
00132 const Glib::ustring &a_pat_start,
00133 const Glib::ustring &a_pat_end);
00134
00135
00143 static Glib::RefPtr<SourceTag> create_pattern_tag (const Glib::ustring &a_id,
00144 const Glib::ustring &a_name,
00145 const Glib::ustring &a_pattern);
00146
00147
00166 static Glib::RefPtr<SourceTag> create_keyword_list_tag (const Glib::ustring &a_id,
00167 const Glib::ustring &a_name,
00168 const Glib::SListHandle<const Glib::ustring> &a_keywords,
00169 bool a_case_sensitive=true,
00170 bool a_match_empty_string_at_beginning=true,
00171 bool a_match_empty_string_at_end=true,
00172 const Glib::ustring &a_beginning_regex="",
00173 const Glib::ustring &a_end_regex="") ;
00174
00175
00184 static Glib::RefPtr<SourceTag> create_line_comment_tag_new (const Glib::ustring &a_id,
00185 const Glib::ustring &a_name,
00186 const Glib::ustring &a_pattern_start) ;
00187
00188
00197 static Glib::RefPtr<SourceTag> create_string_tag_new (const Glib::ustring &a_id,
00198 const Glib::ustring &a_name,
00199 const Glib::ustring &a_pattern_start,
00200 const Glib::ustring &a_pattern_end,
00201 bool a_end_at_line_end=true) ;
00202
00203
00207
00208 Glib::ustring get_id() const;
00209
00213
00214 SourceTagStyle get_style() const;
00215
00219
00220 void set_style(const SourceTagStyle& a_style);
00221
00222
00223 public:
00224
00225 public:
00226
00227 #ifdef GLIBMM_VFUNCS_ENABLED
00228 #endif //GLIBMM_VFUNCS_ENABLED
00229
00230 protected:
00231
00232 #ifdef GLIBMM_VFUNCS_ENABLED
00233 #endif //GLIBMM_VFUNCS_ENABLED
00234
00235
00236 #ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
00237 #endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
00238
00239
00240 };
00241
00242 }
00243
00244
00245 namespace Glib
00246 {
00255 Glib::RefPtr<gtksourceview::SourceTag> wrap(GtkSourceTag* object, bool take_copy = false);
00256 }
00257
00258
00259 #endif
00260