Reference Manual
Inti Logo
Main Page | Namespace List | Class Hierarchy | Alphabetical List | Compound List | File List | Namespace Members | Compound Members | File Members

sourcestylescheme.h

Go to the documentation of this file.
00001 /*  Inti-SourceView: Integrated Foundation Classes
00002  *  Copyright (C) 2003 The Inti Development Team.
00003  *
00004  *  This program is free software; you can redistribute it and/or modify
00005  *  it under the terms of the GNU General Public License as published by
00006  *  the Free Software Foundation; either version 2 of the License, or
00007  *  (at your option) any later version.
00008  *
00009  *  This program is distributed in the hope that it will be useful,
00010  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00011  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00012  *  GNU Library General Public License for more details.
00013  *
00014  *  You should have received a copy of the GNU Library General Public License
00015  *  along with this program; if not, write to the Free Software
00016  *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
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 //  Override these do_ methods when you want to change the default behaviour of the GtkSourceStyleScheme.
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 //  Signals
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 } // namespace Gtk
00125 
00126 } // namespace Inti
00127 
00128 #endif // INTI_GTK_SOURCE_STYLE_SCHEME_H
00129 
Main Page - Footer


Generated on Wed Aug 27 21:17:27 2003 for Inti-SourceView by doxygen 1.3.2 written by Dimitri van Heesch, © 1997-2002