GFC Logo GFC Title Logo
Reference Manual
Main Page  |  Namespace List  |  Alphabetical List  |  Class List  |  File List

rc.hh

Go to the documentation of this file.
00001 /* GFC-UI: GTK+ Foundation Classes (User Interface Library) 00002 * Copyright (C) 2002-2004 The GFC 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 00025 00026 #ifndef GFC_GTK_RC_HH 00027 #define GFC_GTK_RC_HH 00028 00029 #ifndef GFC_G_OBJECT_HH 00030 #include <gfc/glib/object.hh> 00031 #endif 00032 00033 #ifndef GFC_GTK_ENUMS_HH 00034 #include <gfc/gtk/enums.hh> 00035 #endif 00036 00037 #ifndef __GTK_RC_H__ 00038 #include <gtk/gtkrc.h> 00039 #endif 00040 00041 #ifndef _CPP_VECTOR 00042 #include <vector> 00043 #endif 00044 00045 namespace GFC { 00046 00047 namespace G { 00048 class Quark; 00049 class Scanner; 00050 } 00051 00052 namespace Gdk { 00053 class Color; 00054 class Colormap; 00055 class Pixmap; 00056 } 00057 00058 namespace Gtk { 00059 00060 class Settings; 00061 class Style; 00062 class Widget; 00063 00090 00091 class RC 00092 { 00093 public: 00096 00097 static std::vector<String> get_default_files(); 00100 00101 static Style* get_style_by_paths(const Settings& settings, const char *widget_path, const char *class_path, GType type); 00102 static Style* get_style_by_paths(const Settings& settings, const String& widget_path, const String& class_path, GType type); 00119 00120 static String get_theme_dir(); 00124 00125 static String get_module_dir(); 00131 00132 static String get_im_module_file(); 00136 00137 static Style* get_style(const Widget& widget); 00146 00147 static Pointer<G::Scanner> get_scanner(); 00149 00153 00154 static void add_default_file(const char *filename); 00155 static void add_default_file(const String& filename); 00160 00161 static void set_default_files(const std::vector<String>& filenames); 00164 00165 static void parse(const char *filename); 00166 static void parse(const String& filename); 00171 00172 static void parse_string(const char *rc_string); 00173 static void parse_string(const String& rc_string); 00176 00177 static bool reparse_all(); 00181 00182 static bool reparse_all_for_settings(const Settings& settings, bool force_load); 00188 00189 static void reset_styles(const Settings& settings); 00199 00200 static String find_pixmap_in_path(const Settings& settings, const char *pixmap_file, const G::Scanner *scanner = 0); 00201 static String find_pixmap_in_path(const Settings& settings, const String& pixmap_file, const G::Scanner *scanner = 0); 00209 00210 static unsigned int parse_color(const G::Scanner& scanner, Gdk::Color& color); 00215 00216 static unsigned int parse_state(const G::Scanner& scanner, StateType& state); 00221 00223 }; 00224 00230 00231 class RcStyle : public G::Object 00232 { 00233 friend class G::Object; 00234 00235 protected: 00238 00239 explicit RcStyle(GtkRcStyle *rc_style, bool owns_reference = true); 00246 00248 00249 public: 00252 00253 RcStyle(); 00255 00256 RcStyle(const RcStyle& src); 00259 00260 virtual ~RcStyle(); 00262 00263 RcStyle& operator=(const RcStyle& src); 00266 00270 00271 GtkRcStyle* gtk_rc_style() const; 00273 00274 operator GtkRcStyle* () const; 00276 00278 }; 00279 00280 } // namespace Gtk 00281 00282 } // namespace GFC 00283 00284 #include <gfc/gtk/inline/rc.inl> 00285 00286 #endif // GFC_GTK_RC_HH 00287

Generated on Tue Aug 24 00:34:31 2004 for GFC-UI by doxygen 1.3.8