Ardour  9.0-pre0-582-g084a23a80d
rc.h
Go to the documentation of this file.
1 // -*- c++ -*-
2 // Generated by gmmproc 2.45.3 -- DO NOT MODIFY!
3 #ifndef _GTKMM_RC_H
4 #define _GTKMM_RC_H
5 
6 
7 #include <glibmm/ustring.h>
8 #include <sigc++/sigc++.h>
9 
10 /* $Id: rc.hg,v 1.6 2005/11/30 14:10:49 murrayc Exp $ */
11 
12 /* Copyright (C) 1998-2002 The gtkmm Development Team
13  *
14  * This library is free software; you can redistribute it and/or
15  * modify it under the terms of the GNU Lesser General Public
16  * License as published by the Free Software Foundation; either
17  * version 2.1 of the License, or (at your option) any later version.
18  *
19  * This library is distributed in the hope that it will be useful,
20  * but WITHOUT ANY WARRANTY; without even the implied warranty of
21  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
22  * Lesser General Public License for more details.
23  *
24  * You should have received a copy of the GNU Lesser General Public
25  * License along with this library; if not, write to the Free
26  * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
27  */
28 
29 
30 //#include <gtkmm/settings.h>
31 #include <gtkmm/style.h>
32 
33 
34 #ifndef DOXYGEN_SHOULD_SKIP_THIS
35 typedef struct _GtkRcStyle GtkRcStyle;
36 typedef struct _GtkRcStyleClass GtkRcStyleClass;
37 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
38 
39 
40 #ifndef DOXYGEN_SHOULD_SKIP_THIS
41 namespace Gtk
42 { class RcStyle_Class; } // namespace Gtk
43 #endif //DOXYGEN_SHOULD_SKIP_THIS
44 
45 namespace Gtk
46 {
47 
48 class Widget;
49 class Settings;
50 class Style;
51 
52 
67 enum RcFlags
68 {
69  RC_FG = 1 << 0,
70  RC_BG = 1 << 1,
71  RC_TEXT = 1 << 2,
72  RC_BASE = 1 << 3
73 };
74 
76 inline RcFlags operator|(RcFlags lhs, RcFlags rhs)
77  { return static_cast<RcFlags>(static_cast<unsigned>(lhs) | static_cast<unsigned>(rhs)); }
78 
80 inline RcFlags operator&(RcFlags lhs, RcFlags rhs)
81  { return static_cast<RcFlags>(static_cast<unsigned>(lhs) & static_cast<unsigned>(rhs)); }
82 
84 inline RcFlags operator^(RcFlags lhs, RcFlags rhs)
85  { return static_cast<RcFlags>(static_cast<unsigned>(lhs) ^ static_cast<unsigned>(rhs)); }
86 
88 inline RcFlags operator~(RcFlags flags)
89  { return static_cast<RcFlags>(~static_cast<unsigned>(flags)); }
90 
92 inline RcFlags& operator|=(RcFlags& lhs, RcFlags rhs)
93  { return (lhs = static_cast<RcFlags>(static_cast<unsigned>(lhs) | static_cast<unsigned>(rhs))); }
94 
96 inline RcFlags& operator&=(RcFlags& lhs, RcFlags rhs)
97  { return (lhs = static_cast<RcFlags>(static_cast<unsigned>(lhs) & static_cast<unsigned>(rhs))); }
98 
100 inline RcFlags& operator^=(RcFlags& lhs, RcFlags rhs)
101  { return (lhs = static_cast<RcFlags>(static_cast<unsigned>(lhs) ^ static_cast<unsigned>(rhs))); }
102 
103 } // namespace Gtk
104 
105 
106 #ifndef DOXYGEN_SHOULD_SKIP_THIS
107 namespace Glib
108 {
109 
110 template <>
111 class Value<Gtk::RcFlags> : public Glib::Value_Flags<Gtk::RcFlags>
112 {
113 public:
114  static GType value_type() G_GNUC_CONST;
115 };
116 
117 } // namespace Glib
118 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
119 
120 
121 namespace Gtk
122 {
123 
124 
125 class RcStyle : public Glib::Object
126 {
127 
128 #ifndef DOXYGEN_SHOULD_SKIP_THIS
129 
130 public:
131  typedef RcStyle CppObjectType;
132  typedef RcStyle_Class CppClassType;
133  typedef GtkRcStyle BaseObjectType;
134  typedef GtkRcStyleClass BaseClassType;
135 
136 private: friend class RcStyle_Class;
137  static CppClassType rcstyle_class_;
138 
139 private:
140  // noncopyable
141  RcStyle(const RcStyle&);
142  RcStyle& operator=(const RcStyle&);
143 
144 protected:
145  explicit RcStyle(const Glib::ConstructParams& construct_params);
146  explicit RcStyle(GtkRcStyle* castitem);
147 
148 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
149 
150 public:
151  virtual ~RcStyle();
152 
155  static GType get_type() G_GNUC_CONST;
156 
157 #ifndef DOXYGEN_SHOULD_SKIP_THIS
158 
159 
160  static GType get_base_type() G_GNUC_CONST;
161 #endif
162 
164  GtkRcStyle* gobj() { return reinterpret_cast<GtkRcStyle*>(gobject_); }
165 
167  const GtkRcStyle* gobj() const { return reinterpret_cast<GtkRcStyle*>(gobject_); }
168 
171 
172 private:
173 
174 
175 protected:
177 
178 public:
179 
180  static Glib::RefPtr<RcStyle> create();
181 
182 
189  Glib::RefPtr<RcStyle> copy() const;
190 
191  void set_name(const Glib::ustring& name);
192  Glib::ustring get_name() const;
193 
194  void set_bg_pixmap_name(Gtk::StateType state, const Glib::ustring& name);
195  Glib::ustring get_bg_pixmap_name(Gtk::StateType state) const;
196 
197  void set_font(const Pango::FontDescription& font_desc);
198  Pango::FontDescription get_font() const;
199 
203 
204  void set_fg(Gtk::StateType state, const Gdk::Color& color);
206 
207  void set_bg(Gtk::StateType state, const Gdk::Color& color);
209 
212 
215 
216 
217  void set_xthickness(int xthickness);
218  int get_xthickness() const;
219 
220  void set_ythickness(int ythickness);
221  int get_ythickness() const;
222 
223 
224 public:
225 
226 public:
227  //C++ methods used to invoke GTK+ virtual functions:
228 
229 protected:
230  //GTK+ Virtual Functions (override these to change behaviour):
231 
232  //Default Signal Handlers::
233 
234 
235 };
236 
237 
238 class RC
239 {
240 public:
241  explicit RC(const Glib::ustring& filename);
242 
250  static Glib::RefPtr<Style> get_style(const Widget& widget);
251 
252  static void parse_string(const Glib::ustring &rc_string);
253 
260  static bool reparse_all();
261 
270  static bool reparse_all(const Glib::RefPtr<Settings>& settings, bool force_load = true);
271 
285  static void reset_styles(const Glib::RefPtr<Settings>& settings);
286 
296  static Glib::ustring find_pixmap_in_path(const Glib::RefPtr<Settings>& settings, GScanner* scanner, const Glib::ustring& pixmap_file);
297 
306  static Glib::ustring find_pixmap_in_path(const Glib::RefPtr<Settings>& settings, const Glib::ustring& pixmap_file);
307 
314  static Glib::ustring find_module_in_path(const Glib::ustring& pixmap_file);
315 
316  static Glib::ustring get_theme_dir();
317 
324  static Glib::ustring get_module_dir();
325 
326 };
327 
328 } // namespace Gtk
329 
330 
331 namespace Glib
332 {
341  Glib::RefPtr<Gtk::RcStyle> wrap(GtkRcStyle* object, bool take_copy = false);
342 }
343 
344 
345 #endif /* _GTKMM_RC_H */
346 
Definition: rc.h:239
static Glib::RefPtr< Style > get_style(const Widget &widget)
static void parse_string(const Glib::ustring &rc_string)
static bool reparse_all()
RC(const Glib::ustring &filename)
static Glib::ustring find_pixmap_in_path(const Glib::RefPtr< Settings > &settings, GScanner *scanner, const Glib::ustring &pixmap_file)
static Glib::ustring find_module_in_path(const Glib::ustring &pixmap_file)
static Glib::ustring get_theme_dir()
static Glib::ustring get_module_dir()
static bool reparse_all(const Glib::RefPtr< Settings > &settings, bool force_load=true)
static void reset_styles(const Glib::RefPtr< Settings > &settings)
static Glib::ustring find_pixmap_in_path(const Glib::RefPtr< Settings > &settings, const Glib::ustring &pixmap_file)
int get_ythickness() const
void set_bg(Gtk::StateType state, const Gdk::Color &color)
GtkRcStyle * gobj_copy()
Provides access to the underlying C instance. The caller is responsible for unrefing it....
int get_xthickness() const
void set_fg(Gtk::StateType state, const Gdk::Color &color)
void set_base(Gtk::StateType state, const Gdk::Color &color)
Gdk::Color get_fg(Gtk::StateType state) const
static Glib::RefPtr< RcStyle > create()
void unset_color_flags(Gtk::StateType state, RcFlags flags)
Pango::FontDescription get_font() const
void set_bg_pixmap_name(Gtk::StateType state, const Glib::ustring &name)
virtual ~RcStyle()
void set_name(const Glib::ustring &name)
void set_xthickness(int xthickness)
RcFlags get_color_flags(Gtk::StateType state) const
Glib::ustring get_bg_pixmap_name(Gtk::StateType state) const
void set_font(const Pango::FontDescription &font_desc)
Glib::ustring get_name() const
Glib::RefPtr< RcStyle > copy() const
Gdk::Color get_bg(Gtk::StateType state) const
static GType get_type() G_GNUC_CONST
GtkRcStyle * gobj()
Provides access to the underlying C GObject.
Definition: rc.h:164
Gdk::Color get_base(Gtk::StateType state) const
Gdk::Color get_text(Gtk::StateType state) const
void set_ythickness(int ythickness)
const GtkRcStyle * gobj() const
Provides access to the underlying C GObject.
Definition: rc.h:167
void set_text(Gtk::StateType state, const Gdk::Color &color)
void set_color_flags(Gtk::StateType state, RcFlags flags)
Glib::RefPtr< Gtk::RcStyle > wrap(GtkRcStyle *object, bool take_copy=false)
CellRendererState & operator|=(CellRendererState &lhs, CellRendererState rhs)
Definition: cellrenderer.h:86
CellRendererState operator&(CellRendererState lhs, CellRendererState rhs)
Definition: cellrenderer.h:74
CellRendererState operator^(CellRendererState lhs, CellRendererState rhs)
Definition: cellrenderer.h:78
CellRendererState operator~(CellRendererState flags)
Definition: cellrenderer.h:82
CellRendererState & operator&=(CellRendererState &lhs, CellRendererState rhs)
Definition: cellrenderer.h:90
RcFlags
Definition: rc.h:68
CellRendererState operator|(CellRendererState lhs, CellRendererState rhs)
Definition: cellrenderer.h:70
CellRendererState & operator^=(CellRendererState &lhs, CellRendererState rhs)
Definition: cellrenderer.h:94
@ RC_TEXT
Definition: rc.h:71
@ RC_BASE
Definition: rc.h:72
@ RC_BG
Definition: rc.h:70
@ RC_FG
Definition: rc.h:69
GtkImageIconNameData name
Definition: gtkimage.h:6
PBD::PropertyDescriptor< uint32_t > color
Definition: ardour_ui.h:188
Definition: lobject.h:100