Reference Manual

Main Page | Namespace List | Class Hierarchy | Alphabetical List | Compound List | File List | Namespace Members | Compound Members | File Members

# rc.h

Go to the documentation of this file.

    00001 /*  Inti: Integrated Foundation Classes
    00002  *  Copyright (C) 2002 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
    00025
    00026 #ifndef INTI_GTK_RC_H
    00027 #define INTI_GTK_RC_H
    00028
    00029 #ifndef INTI_G_OBJECT_H
    00030 #include <inti/glib/object.h>
    00031 #endif
    00032
    00033 #ifndef INTI_GTK_ENUMS_H
    00034 #include <inti/gtk/enums.h>
    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 Inti {
    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);
    00118
    00119         static String get_theme_dir();
    00123
    00124         static String get_module_dir();
    00130
    00131         static String get_im_module_file();
    00135
    00136         static Style* get_style(const Widget& widget);
    00145
    00146         static Pointer<G::Scanner> get_scanner();
    00148
    00152
    00153         static void add_default_file(const String& filename);
    00158
    00159         static void set_default_files(const std::vector<String>& filenames);
    00162
    00163         static void parse(const String& filename);
    00168
    00169         static void parse_string(const String& rc_string);
    00172
    00173         static bool reparse_all();
    00177
    00178         static bool reparse_all_for_settings(const Settings& settings, bool force_load);
    00182
    00183         static String find_pixmap_in_path(const Settings& settings, const String& pixmap_file, const G::Scanner *scanner = 0);
    00191
    00192         static unsigned int parse_color(const G::Scanner& scanner, Gdk::Color& color);
    00197
    00198         static unsigned int parse_state(const G::Scanner& scanner, StateType& state);
    00203
    00205 };
    00206
    00212
    00213 class RcStyle : public G::Object
    00214 {
    00215         friend class G::Object;
    00216         friend class RcStyleClass;
    00217
    00218 protected:
    00221
    00222         explicit RcStyle(GtkRcStyle *rc_style, bool reference = true);
    00229
    00231
    00232 public:
    00235
    00236         RcStyle();
    00238
    00239         RcStyle(const RcStyle& src);
    00242
    00243         virtual ~RcStyle();
    00245
    00246         RcStyle& operator=(const RcStyle& src);
    00249
    00253
    00254         GtkRcStyle* gtk_rc_style() const { return (GtkRcStyle*)instance; }
    00256
    00257         GtkRcStyleClass* gtk_rc_style_class() const;
    00259
    00260         operator GtkRcStyle* () const;
    00262
    00264 };
    00265
    00266 } // namespace Gtk
    00267
    00268 } // namespace Inti
    00269
    00270 #endif // INTI_GTK_RC_H
    00271

Main Page - Footer