00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00021
00022 #ifndef INTI_GTK_SOURCE_STYLE_SCHEME_H
00023 #define INTI_GTK_SOURCE_STYLE_SCHEME_H
00024
00025 #ifndef INTI_G_TYPE_H
00026 #include <inti/glib/type.h>
00027 #endif
00028
00029 #ifndef __GTK_SOURCE_STYLE_SCHEME_H__
00030 #include <gtksourceview/gtksourcestylescheme.h>
00031 #endif
00032
00033 #ifndef _CPP_VECTOR
00034 #include <vector>
00035 #endif
00036
00037 namespace Inti {
00038
00039 namespace Gtk {
00040
00041 class SourceStyleSchemeClass;
00042 class SourceTagStyle;
00043
00046
00047 class SourceStyleScheme : public virtual G::TypeInterface
00048 {
00049 friend class SourceStyleSchemeClass;
00050
00051 protected:
00054
00055 virtual ~SourceStyleScheme() = 0;
00057
00059
00060
00061 virtual const char* do_get_name();
00062
00063 virtual GtkSourceTagStyle* do_get_tag_style(const char *style_name);
00064
00065 virtual GSList* do_get_style_names();
00066
00069
00070 virtual void on_style_changed(const String& tag_id);
00073
00075
00076
00077 typedef G::Signal1<void, const char*> StyleChangedSignalType;
00078 typedef G::SignalProxy<TypeInstance, StyleChangedSignalType> StyleChangedSignalProxy;
00079 static const StyleChangedSignalType style_changed_signal;
00080
00081 public:
00082 static SourceStyleScheme* get_default();
00084
00087
00088 GtkSourceStyleScheme* gtk_source_style_scheme() const { return (GtkSourceStyleScheme*)instance; }
00090
00091 GtkSourceStyleSchemeClass* gtk_source_style_scheme_class() const;
00093
00094 operator GtkSourceStyleScheme* () const;
00096
00097 bool is_gtk_source_style_scheme() const;
00099
00100 String get_name() const;
00102
00103 SourceTagStyle* get_tag_style(const String& style_name) const;
00107
00108 bool get_style_names(std::vector<String>& names) const;
00112
00116
00117 const StyleChangedSignalProxy sig_style_changed()
00118 {
00119 return StyleChangedSignalProxy(this, &style_changed_signal);
00120 }
00122 };
00123
00124 }
00125
00126 }
00127
00128 #endif // INTI_GTK_SOURCE_STYLE_SCHEME_H
00129