Install ardour as a binary, a script and a set of shared
[ardour.git] / libs / gtkmm2 / gtk / gtkmm / style.h
1 // -*- c++ -*-
2 // Generated by gtkmmproc -- DO NOT MODIFY!
3 #ifndef _GTKMM_STYLE_H
4 #define _GTKMM_STYLE_H
5
6 #include <glibmm.h>
7
8 /* $Id$ */
9
10 /* Copyright (C) 1998-2002 The gtkmm Development Team
11  *
12  * This library is free software; you can redistribute it and/or
13  * modify it under the terms of the GNU Library General Public
14  * License as published by the Free Software Foundation; either
15  * version 2 of the License, or (at your option) any later version.
16  *
17  * This library is distributed in the hope that it will be useful,
18  * but WITHOUT ANY WARRANTY; without even the implied warranty of
19  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
20  * Library General Public License for more details.
21  *
22  * You should have received a copy of the GNU Library General Public
23  * License along with this library; if not, write to the Free
24  * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
25  */
26
27
28 #include <pangomm/fontdescription.h>
29 #include <pangomm/layout.h>
30
31 #include <gdkmm/gc.h>
32 #include <gdkmm/pixmap.h>
33 #include <gdkmm/types.h>
34 #include <gdkmm/window.h>
35
36 #include <gtkmm/object.h>
37 #include <gtkmm/enums.h>
38 #include <gtkmm/iconsource.h>
39 #include <gtkmm/iconset.h>
40 #include <gtkmmconfig.h>
41
42
43 #ifndef DOXYGEN_SHOULD_SKIP_THIS
44 typedef struct _GtkStyle GtkStyle;
45 typedef struct _GtkStyleClass GtkStyleClass;
46 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
47
48
49 namespace Gtk
50 { class Style_Class; } // namespace Gtk
51 namespace Gtk
52 {
53
54 class Widget;
55 class RcStyle;
56
57
58 class Style : public Glib::Object
59 {
60   
61 #ifndef DOXYGEN_SHOULD_SKIP_THIS
62
63 public:
64   typedef Style CppObjectType;
65   typedef Style_Class CppClassType;
66   typedef GtkStyle BaseObjectType;
67   typedef GtkStyleClass BaseClassType;
68
69 private:  friend class Style_Class;
70   static CppClassType style_class_;
71
72 private:
73   // noncopyable
74   Style(const Style&);
75   Style& operator=(const Style&);
76
77 protected:
78   explicit Style(const Glib::ConstructParams& construct_params);
79   explicit Style(GtkStyle* castitem);
80
81 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
82
83 public:
84   virtual ~Style();
85
86 #ifndef DOXYGEN_SHOULD_SKIP_THIS
87   static GType get_type()      G_GNUC_CONST;
88   static GType get_base_type() G_GNUC_CONST;
89 #endif
90
91   ///Provides access to the underlying C GObject.
92   GtkStyle*       gobj()       { return reinterpret_cast<GtkStyle*>(gobject_); }
93
94   ///Provides access to the underlying C GObject.
95   const GtkStyle* gobj() const { return reinterpret_cast<GtkStyle*>(gobject_); }
96
97   ///Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs.
98   GtkStyle* gobj_copy();
99
100 private:
101
102   
103 protected:
104   Style();
105
106 public:
107   
108   static Glib::RefPtr<Style> create();
109
110   
111   void set_fg(Gtk::StateType state, const Gdk::Color& color);
112   Gdk::Color get_fg(Gtk::StateType state) const;
113
114   void set_bg(Gtk::StateType state, const Gdk::Color& color);
115   Gdk::Color get_bg(Gtk::StateType state) const;
116
117   void set_light(Gtk::StateType state, const Gdk::Color& color);
118   Gdk::Color get_light(Gtk::StateType state) const;
119
120   void set_dark(Gtk::StateType state, const Gdk::Color& color);
121   Gdk::Color get_dark(Gtk::StateType state) const;
122
123   void set_mid(Gtk::StateType state, const Gdk::Color& color);
124   Gdk::Color get_mid(Gtk::StateType state) const;
125
126   void set_text(Gtk::StateType state, const Gdk::Color& color);
127   Gdk::Color get_text(Gtk::StateType state) const;
128
129   void set_base(Gtk::StateType state, const Gdk::Color& color);
130   Gdk::Color get_base(Gtk::StateType state) const;
131
132   void set_text_aa(Gtk::StateType state, const Gdk::Color& color);
133   Gdk::Color get_text_aa(Gtk::StateType state) const;
134
135
136   void set_black(const Gdk::Color& value);
137   Gdk::Color get_black() const;
138   void set_white(const Gdk::Color& value);
139   Gdk::Color get_white() const;
140
141   void set_font(const Pango::FontDescription& font_desc);
142
143   // These are only available after being attached to a window.
144   Pango::FontDescription get_font() const;
145
146   void set_xthickness(int xthickness);
147   int get_xthickness() const;
148
149   void set_ythickness(int ythickness);
150   int get_ythickness() const;
151
152   Glib::RefPtr<Gdk::GC> get_fg_gc(Gtk::StateType state_type);
153   Glib::RefPtr<const Gdk::GC> get_fg_gc(Gtk::StateType state_type) const;
154
155   Glib::RefPtr<Gdk::GC> get_bg_gc(Gtk::StateType state_type);
156   Glib::RefPtr<const Gdk::GC> get_bg_gc(Gtk::StateType state_type) const;
157
158   Glib::RefPtr<Gdk::GC> get_light_gc(Gtk::StateType state_type);
159   Glib::RefPtr<const Gdk::GC> get_light_gc(Gtk::StateType state_type) const;
160
161   Glib::RefPtr<Gdk::GC> get_dark_gc(Gtk::StateType state_type);
162   Glib::RefPtr<const Gdk::GC> get_dark_gc(Gtk::StateType state_type) const;
163
164   Glib::RefPtr<Gdk::GC> get_mid_gc ( Gtk::StateType state_type);
165   Glib::RefPtr<const Gdk::GC> get_mid_gc ( Gtk::StateType state_type) const;
166
167   Glib::RefPtr<Gdk::GC> get_text_gc(Gtk::StateType state_type);
168   Glib::RefPtr<const Gdk::GC> get_text_gc(Gtk::StateType state_type) const;
169
170   Glib::RefPtr<Gdk::GC> get_base_gc(Gtk::StateType state_type);
171   Glib::RefPtr<const Gdk::GC> get_base_gc(Gtk::StateType state_type) const;
172
173   Glib::RefPtr<Gdk::GC> get_black_gc();
174   Glib::RefPtr<const Gdk::GC> get_black_gc() const;
175   Glib::RefPtr<Gdk::GC> get_white_gc();
176   Glib::RefPtr<const Gdk::GC> get_white_gc() const;
177
178   /* Deprecated in gtkmm 2.2 -- use get_bg() instead.
179    * Honestly, I have absolutely no idea why this method was added
180    * in the first place.  It's basically just confusing since it's
181    * absolutely unrelated to set_background().  Sigh.
182    */
183   Gdk::Color get_background(Gtk::StateType state_type) const;
184
185   /* Deprecated in gtkmm 2.2 -- use get_bg_pixmap() instead.
186    */
187   Glib::RefPtr<Gdk::Pixmap> get_background_pixmap(Gtk::StateType state_type);
188
189   void set_bg_pixmap(Gtk::StateType state_type, const Glib::RefPtr<Gdk::Pixmap>& pixmap);
190   Glib::RefPtr<Gdk::Pixmap>       get_bg_pixmap(Gtk::StateType state_type);
191   Glib::RefPtr<const Gdk::Pixmap> get_bg_pixmap(Gtk::StateType state_type) const;
192
193   
194   /** Draws an arrow in the given rectangle on @a window  using the given 
195    * parameters. @a arrow_type  determines the direction of the arrow.
196    * @param window A Gdk::Window.
197    * @param state_type A state.
198    * @param shadow_type The type of shadow to draw.
199    * @param area Clip rectangle.
200    * @param widget The widget.
201    * @param detail A style detail.
202    * @param arrow_type The type of arrow to draw.
203    * @param fill <tt>true</tt> if the arrow tip should be filled.
204    * @param x X origin of the rectangle to draw the arrow in.
205    * @param y Y origin of the rectangle to draw the arrow in.
206    * @param width Width of the rectangle to draw the arrow in.
207    * @param height Height of the rectangle to draw the arrow in.
208    */
209   void paint_arrow(
210                   const Glib::RefPtr<Gdk::Window>&  window,
211                   Gtk::StateType                    state_type,
212                   ShadowType                        shadow_type,
213                   const Gdk::Rectangle&             area,
214                   Widget&                           widget,
215                   const Glib::ustring&              detail,
216                   ArrowType                         arrow_type,
217                   bool                              fill,
218                   int                               x,
219                   int                               y,
220                   int                               width,
221                   int                               height) const;
222
223   
224   /** Draws a box on @a window  with the given parameters.
225    * @param window A Gdk::Window.
226    * @param state_type A state.
227    * @param shadow_type The type of shadow to draw.
228    * @param area Clip rectangle.
229    * @param widget The widget.
230    * @param detail A style detail.
231    * @param x X origin of the box.
232    * @param y Y origin of the box.
233    * @param width The width of the box.
234    * @param height The height of the box.
235    */
236   void paint_box(
237                   const Glib::RefPtr<Gdk::Window>&  window,
238                   Gtk::StateType                    state_type,
239                   ShadowType                        shadow_type,
240                   const Gdk::Rectangle&             area,
241                   Widget&                           widget,
242                   const Glib::ustring&              detail,
243                   int                               x,
244                   int                               y,
245                   int                               width,
246                   int                               height) const;
247
248   
249   /** Draws a box in @a window  using the given style and state and shadow type, 
250    * leaving a gap in one side.
251    * @param window A Gdk::Window.
252    * @param state_type A state.
253    * @param shadow_type Type of shadow to draw.
254    * @param area Clip rectangle.
255    * @param widget The widget.
256    * @param detail A style detail.
257    * @param x X origin of the rectangle.
258    * @param y Y origin of the rectangle.
259    * @param width Width of the rectangle.
260    * @param height Width of the rectangle.
261    * @param gap_side Side in which to leave the gap.
262    * @param gap_x Starting position of the gap.
263    * @param gap_width Width of the gap.
264    */
265   void paint_box_gap(
266                   const Glib::RefPtr<Gdk::Window>&  window,
267                   Gtk::StateType                    state_type,
268                   ShadowType                        shadow_type,
269                   const Gdk::Rectangle&             area,
270                   Widget&                           widget,
271                   const Glib::ustring&              detail,
272                   int                               x,
273                   int                               y,
274                   int                               width,
275                   int                               height,
276                   PositionType                      gap_side,
277                   int                               gap_x,
278                   int                               gap_width) const;
279
280   
281   /** Draws a check button indicator in the given rectangle on @a window  with 
282    * the given parameters.
283    * @param window A Gdk::Window.
284    * @param state_type A state.
285    * @param shadow_type The type of shadow to draw.
286    * @param area Clip rectangle.
287    * @param widget The widget.
288    * @param detail A style detail.
289    * @param x X origin of the rectangle to draw the check in.
290    * @param y Y origin of the rectangle to draw the check in.
291    * @param width The width of the rectangle to draw the check in.
292    * @param height The height of the rectangle to draw the check in.
293    */
294   void paint_check(
295                   const Glib::RefPtr<Gdk::Window>&  window,
296                   Gtk::StateType                    state_type,
297                   ShadowType                        shadow_type,
298                   const Gdk::Rectangle&             area,
299                   Widget&                           widget,
300                   const Glib::ustring&              detail,
301                   int                               x,
302                   int                               y,
303                   int                               width,
304                   int                               height) const;
305
306   
307   /** Draws a diamond in the given rectangle on @a window  using the given
308    * parameters.
309    * @param window A Gdk::Window.
310    * @param state_type A state.
311    * @param shadow_type The type of shadow to draw.
312    * @param area Clip rectangle.
313    * @param widget The widget.
314    * @param detail A style detail.
315    * @param x X origin of the rectangle to draw the diamond in.
316    * @param y Y origin of the rectangle to draw the diamond in.
317    * @param width Width of the rectangle to draw the diamond in.
318    * @param height Height of the rectangle to draw the diamond in.
319    */
320   void paint_diamond(
321                   const Glib::RefPtr<Gdk::Window>&  window,
322                   Gtk::StateType                    state_type,
323                   ShadowType                        shadow_type,
324                   const Gdk::Rectangle&             area,
325                   Widget&                           widget,
326                   const Glib::ustring&              detail,
327                   int                               x,
328                   int                               y,
329                   int                               width,
330                   int                               height) const;
331
332   
333   /** Draws an extension, i.e.\ a notebook tab.
334    * @param window A Gdk::Window.
335    * @param state_type A state.
336    * @param shadow_type Type of shadow to draw.
337    * @param area Clip rectangle.
338    * @param widget The widget.
339    * @param detail A style detail.
340    * @param x X origin of the extension.
341    * @param y Y origin of the extension.
342    * @param width Width of the extension.
343    * @param height Width of the extension.
344    * @param gap_side The side on to which the extension is attached.
345    */
346   void paint_extension(
347                   const Glib::RefPtr<Gdk::Window>&  window,
348                   Gtk::StateType                    state_type,
349                   ShadowType                        shadow_type,
350                   const Gdk::Rectangle&             area,
351                   Widget&                           widget,
352                   const Glib::ustring&              detail,
353                   int                               x,
354                   int                               y,
355                   int                               width,
356                   int                               height,
357                   PositionType                      gap_side) const;
358
359   
360   /** Draws a flat box on @a window  with the given parameters.
361    * @param window A Gdk::Window.
362    * @param state_type A state.
363    * @param shadow_type The type of shadow to draw.
364    * @param area Clip rectangle.
365    * @param widget The widget.
366    * @param detail A style detail.
367    * @param x X origin of the box.
368    * @param y Y origin of the box.
369    * @param width The width of the box.
370    * @param height The height of the box.
371    */
372   void paint_flat_box(
373                   const Glib::RefPtr<Gdk::Window>&  window,
374                   Gtk::StateType                    state_type,
375                   ShadowType                        shadow_type,
376                   const Gdk::Rectangle&             area,
377                   Widget&                           widget,
378                   const Glib::ustring&              detail,
379                   int                               x,
380                   int                               y,
381                   int                               width,
382                   int                               height) const;
383
384   
385   /** Draws a focus indicator around the given rectangle on @a window  using the
386    * given style.
387    * @param window A Gdk::Window.
388    * @param state_type A state.
389    * @param area Clip rectangle.
390    * @param widget The widget.
391    * @param detail A style detail.
392    * @param x The x origin of the rectangle around which to draw a focus indicator.
393    * @param y The y origin of the rectangle around which to draw a focus indicator.
394    * @param width The width of the rectangle around which to draw a focus indicator.
395    * @param height The height of the rectangle around which to draw a focus indicator.
396    */
397   void paint_focus(
398                   const Glib::RefPtr<Gdk::Window>&  window,
399                   Gtk::StateType                    state_type,
400                   const Gdk::Rectangle&             area,
401                   Widget&                           widget,
402                   const Glib::ustring&              detail,
403                   int                               x,
404                   int                               y,
405                   int                               width,
406                   int                               height) const;
407
408   
409   /** Draws a handle as used in Gtk::HandleBox and Gtk::Paned.
410    * @param window A Gdk::Window.
411    * @param state_type A state.
412    * @param shadow_type Type of shadow to draw.
413    * @param area Clip rectangle.
414    * @param widget The widget.
415    * @param detail A style detail.
416    * @param x X origin of the handle.
417    * @param y Y origin of the handle.
418    * @param width With of the handle.
419    * @param height Height of the handle.
420    * @param orientation The orientation of the handle.
421    */
422   void paint_handle(
423                   const Glib::RefPtr<Gdk::Window>&  window,
424                   Gtk::StateType                    state_type,
425                   ShadowType                        shadow_type,
426                   const Gdk::Rectangle&             area,
427                   Widget&                           widget,
428                   const Glib::ustring&              detail,
429                   int                               x,
430                   int                               y,
431                   int                               width,
432                   int                               height,
433                   Orientation                       orientation) const;
434
435   
436   /** Draws a horizontal line from ( @a x1 , @a y ) to ( @a x2 , @a y ) in @a window 
437    * using the given style and state.
438    * @param window A Gdk::Window.
439    * @param state_type A state.
440    * @param area Rectangle to which the output is clipped.
441    * @param widget The widget.
442    * @param detail A style detail.
443    * @param x1 The starting x coordinate.
444    * @param x2 The ending x coordinate.
445    * @param y The y coordinate.
446    */
447   void paint_hline(
448                   const Glib::RefPtr<Gdk::Window>&  window,
449                   Gtk::StateType                    state_type,
450                   const Gdk::Rectangle&             area,
451                   Widget&                           widget,
452                   const Glib::ustring&              detail,
453                   int                               x1,
454                   int                               x2,
455                   int                               y) const;
456
457   
458   /** Draws a radio button indicator in the given rectangle on @a window  with 
459    * the given parameters.
460    * @param window A Gdk::Window.
461    * @param state_type A state.
462    * @param shadow_type The type of shadow to draw.
463    * @param area Clip rectangle.
464    * @param widget The widget.
465    * @param detail A style detail.
466    * @param x X origin of the rectangle to draw the option in.
467    * @param y Y origin of the rectangle to draw the option in.
468    * @param width The width of the rectangle to draw the option in.
469    * @param height The height of the rectangle to draw the option in.
470    */
471   void paint_option(
472                   const Glib::RefPtr<Gdk::Window>&  window,
473                   Gtk::StateType                    state_type,
474                   ShadowType                        shadow_type,
475                   const Gdk::Rectangle&             area,
476                   Widget&                           widget,
477                   const Glib::ustring&              detail,
478                   int                               x,
479                   int                               y,
480                   int                               width,
481                   int                               height) const;
482
483   void paint_polygon(
484                   const Glib::RefPtr<Gdk::Window>&      window,
485                   Gtk::StateType                        state_type,
486                   ShadowType                            shadow_type,
487                   const Gdk::Rectangle&                 area,
488                   Widget&                               widget,
489                   const Glib::ustring&                  detail,
490                   const Glib::ArrayHandle<Gdk::Point>&  points,
491                   bool                                  fill) const;
492
493   
494   /** Draws a shadow around the given rectangle in @a window  
495    * using the given style and state and shadow type.
496    * @param window A Gdk::Window.
497    * @param state_type A state.
498    * @param shadow_type Type of shadow to draw.
499    * @param area Clip rectangle.
500    * @param widget The widget.
501    * @param detail A style detail.
502    * @param x X origin of the rectangle.
503    * @param y Y origin of the rectangle.
504    * @param width Width of the rectangle.
505    * @param height Width of the rectangle.
506    */
507   void paint_shadow(
508                   const Glib::RefPtr<Gdk::Window>&  window,
509                   Gtk::StateType                    state_type,
510                   ShadowType                        shadow_type,
511                   const Gdk::Rectangle&             area,
512                   Widget&                           widget,
513                   const Glib::ustring&              detail,
514                   int                               x,
515                   int                               y,
516                   int                               width,
517                   int                               height) const;
518
519   
520   /** Draws a shadow around the given rectangle in @a window  
521    * using the given style and state and shadow type, leaving a 
522    * gap in one side.
523    * @param window A Gdk::Window.
524    * @param state_type A state.
525    * @param shadow_type Type of shadow to draw.
526    * @param area Clip rectangle.
527    * @param widget The widget.
528    * @param detail A style detail.
529    * @param x X origin of the rectangle.
530    * @param y Y origin of the rectangle.
531    * @param width Width of the rectangle.
532    * @param height Width of the rectangle.
533    * @param gap_side Side in which to leave the gap.
534    * @param gap_x Starting position of the gap.
535    * @param gap_width Width of the gap.
536    */
537   void paint_shadow_gap(
538                   const Glib::RefPtr<Gdk::Window>&  window,
539                   Gtk::StateType                    state_type,
540                   ShadowType                        shadow_type,
541                   const Gdk::Rectangle&             area,
542                   Widget&                           widget,
543                   const Glib::ustring&              detail,
544                   int                               x,
545                   int                               y,
546                   int                               width,
547                   int                               height,
548                   PositionType                      gap_side,
549                   int                               gap_x,
550                   int                               gap_width) const;
551
552   
553   /** 
554    */
555   void paint_slider(
556                   const Glib::RefPtr<Gdk::Window>&  window,
557                   Gtk::StateType                    state_type,
558                   ShadowType                        shadow_type,
559                   const Gdk::Rectangle&             area,
560                   Widget&                           widget,
561                   const Glib::ustring&              detail,
562                   int                               x,
563                   int                               y,
564                   int                               width,
565                   int                               height,
566                   Orientation                       orientation) const;
567
568   
569   /** Draws an option menu tab (i.e.\ the up and down pointing arrows)
570    * in the given rectangle on @a window  using the given parameters.
571    * @param window A Gdk::Window.
572    * @param state_type A state.
573    * @param shadow_type The type of shadow to draw.
574    * @param area Clip rectangle.
575    * @param widget The widget.
576    * @param detail A style detail.
577    * @param x X origin of the rectangle to draw the tab in.
578    * @param y Y origin of the rectangle to draw the tab in.
579    * @param width The width of the rectangle to draw the tab in.
580    * @param height The height of the rectangle to draw the tab in.
581    */
582   void paint_tab(
583                   const Glib::RefPtr<Gdk::Window>&  window,
584                   Gtk::StateType                    state_type,
585                   ShadowType                        shadow_type,
586                   const Gdk::Rectangle&             area,
587                   Widget&                           widget,
588                   const Glib::ustring&              detail,
589                   int                               x,
590                   int                               y,
591                   int                               width,
592                   int                               height) const;
593
594                   
595   /** Draws a vertical line from ( @a x , @a y1 ) to ( @a x , @a y2 ) in @a window 
596    * using the given style and state.
597    * @param window A Gdk::Window.
598    * @param state_type A state.
599    * @param area Rectangle to which the output is clipped.
600    * @param widget The widget.
601    * @param detail A style detail.
602    * @param y1 The starting y coordinate.
603    * @param y2 The ending y coordinate.
604    * @param x The x coordinate.
605    */
606   void paint_vline(
607                   const Glib::RefPtr<Gdk::Window>&  window,
608                   Gtk::StateType                    state_type,
609                   const Gdk::Rectangle&             area,
610                   Widget&                           widget,
611                   const Glib::ustring&              detail,
612                   int                               y1,
613                   int                               y2,
614                   int                               x) const;
615
616   
617   /** Draws an expander as used in Gtk::TreeView.
618    * @param window A Gdk::Window.
619    * @param state_type A state.
620    * @param area Clip rectangle.
621    * @param widget The widget.
622    * @param detail A style detail.
623    * @param x The x position to draw the expander at.
624    * @param y The y position to draw the expander at.
625    * @param expander_style The style to draw the expander in.
626    */
627   void paint_expander(
628                   const Glib::RefPtr<Gdk::Window>&  window,
629                   Gtk::StateType                    state_type,
630                   const Gdk::Rectangle&             area,
631                   Widget&                           widget,
632                   const Glib::ustring&              detail,
633                   int                               x,
634                   int                               y,
635                   ExpanderStyle                     expander_style) const;
636
637   
638   /** 
639    */
640   void paint_layout(
641                   const Glib::RefPtr<Gdk::Window>&    window,
642                   Gtk::StateType                      state_type,
643                   bool                                use_text,
644                   const Gdk::Rectangle&               area,
645                   Widget&                             widget,
646                   const Glib::ustring&                detail,
647                   int                                 x,
648                   int                                 y,
649                   const Glib::RefPtr<Pango::Layout>&  layout) const;
650
651   
652   /** Draws a resize grip in the given rectangle on @a window  using the given
653    * parameters.
654    * @param window A Gdk::Window.
655    * @param state_type A state.
656    * @param area Clip rectangle.
657    * @param widget The widget.
658    * @param detail A style detail.
659    * @param edge The edge in which to draw the resize grip.
660    * @param x The x origin of the rectangle in which to draw the resize grip.
661    * @param y The y origin of the rectangle in which to draw the resize grip.
662    * @param width The width of the rectangle in which to draw the resize grip.
663    * @param height The height of the rectangle in which to draw the resize grip.
664    */
665   void paint_resize_grip(
666                   const Glib::RefPtr<Gdk::Window>&  window,
667                   Gtk::StateType                    state_type,
668                   const Gdk::Rectangle&             area,
669                   Widget&                           widget,
670                   const Glib::ustring&              detail,
671                   Gdk::WindowEdge                   edge,
672                   int                               x,
673                   int                               y,
674                   int                               width,
675                   int                               height) const;
676
677
678   Glib::RefPtr<Style> copy();
679
680   // These are worthless to the users - they should use set_style instead.
681   
682   //_WRAP_METHOD(Glib::RefPtr<Style> attach(const Glib::RefPtr<Gdk::Window>& window), gtk_style_attach)
683   //_WRAP_METHOD(void detach(), gtk_style_detach)
684
685   
686   /** Sets the background of @a window  to the background color or pixmap
687    * specified by @a style  for the given state.
688    * @param window A Gdk::Window.
689    * @param state_type A state.
690    */
691   void set_background(const Glib::RefPtr<Gdk::Window>& window, Gtk::StateType state_type);
692
693   
694   void apply_default_background(const Glib::RefPtr<Gdk::Window>& window, bool set_bg,
695                       Gtk::StateType state_type, const Gdk::Rectangle& area,
696                       int x, int y, int width, int height);
697
698   
699   IconSet lookup_icon_set(const Gtk::StockID& stock_id);
700
701   
702   /** Renders the icon specified by @a source  at the given @a size  
703    * according to the given parameters and returns the result in a 
704    * pixbuf.
705    * @param source The Gtk::IconSource specifying the icon to render.
706    * @param direction A text direction.
707    * @param state A state.
708    * @param size The size to render the icon at. A size of (GtkIconSize)-1
709    * means render at the size of the source and don't scale.
710    * @param widget The widget.
711    * @param detail A style detail.
712    * @return A newly-created Gdk::Pixbuf containing the rendered icon.
713    */
714   Glib::RefPtr<Gdk::Pixbuf> render_icon(const IconSource& source,
715                                        Gtk::TextDirection direction, Gtk::StateType state, Gtk::IconSize size,
716                                        Gtk::Widget& widget, const Glib::ustring& detail);
717
718 protected:
719     virtual void realize_vfunc();
720     virtual void unrealize_vfunc();
721     virtual void copy_vfunc(const Glib::RefPtr<Style>& src);
722     virtual Glib::RefPtr<Style> clone_vfunc();
723     virtual void init_from_rc_vfunc(const Glib::RefPtr<RcStyle>& rc_style);
724     virtual void set_background_vfunc(const Glib::RefPtr<Gdk::Window>& window, Gtk::StateType state_type);
725
726     virtual Glib::RefPtr<Gdk::Pixbuf> render_icon_vfunc(const IconSource& source, TextDirection direction, Gtk::StateType state, IconSize size, Widget* widget, const Glib::ustring& detail);
727     virtual void draw_hline_vfunc(const Glib::RefPtr<Gdk::Window>& window, Gtk::StateType state_type, const Gdk::Rectangle& area, Widget* widget, const Glib::ustring& detail, int x1, int x2, int y);
728     virtual void draw_vline_vfunc(const Glib::RefPtr<Gdk::Window>& window, Gtk::StateType state_type, const Gdk::Rectangle& area, Widget* widget, const Glib::ustring& detail, int y1, int y2, int x);
729     virtual void draw_shadow_vfunc(const Glib::RefPtr<Gdk::Window>& window, Gtk::StateType state_type, ShadowType shadow_type, const Gdk::Rectangle& area, Widget* widget, const Glib::ustring& detail, int x, int y, int width, int height);
730     virtual void draw_polygon_vfunc(const Glib::RefPtr<Gdk::Window>& window, Gtk::StateType state_type, ShadowType shadow_type, const Gdk::Rectangle& area, Widget* widget, const Glib::ustring& detail, GdkPoint* point, int npoints, bool fill);
731     virtual void draw_arrow_vfunc(const Glib::RefPtr<Gdk::Window>& window, Gtk::StateType state_type, ShadowType shadow_type, const Gdk::Rectangle& area, Widget* widget, const Glib::ustring& detail, Gtk::ArrowType arrow_type, bool fill, int x, int y, int width, int height);
732     virtual void draw_diamond_vfunc(const Glib::RefPtr<Gdk::Window>& window, Gtk::StateType state_type, ShadowType shadow_type, const Gdk::Rectangle& area, Widget* widget, const Glib::ustring& detail, int x, int y, int width, int height);
733     virtual void draw_string_vfunc(const Glib::RefPtr<Gdk::Window>& window, Gtk::StateType state_type, const Gdk::Rectangle& area, Widget* widget, const Glib::ustring& detail, int x, int y, const Glib::ustring& string);
734     virtual void draw_box_vfunc(const Glib::RefPtr<Gdk::Window>& window, Gtk::StateType state_type, ShadowType shadow_type, const Gdk::Rectangle& area, Widget* widget, const Glib::ustring& detail, int x, int y, int width, int height);
735     virtual void draw_flat_box_vfunc(const Glib::RefPtr<Gdk::Window>& window, Gtk::StateType state_type, ShadowType shadow_type, const Gdk::Rectangle& area, Widget* widget, const Glib::ustring& detail, int x, int y, int width, int height);
736     virtual void draw_check_vfunc(const Glib::RefPtr<Gdk::Window>& window, Gtk::StateType state_type, ShadowType shadow_type, const Gdk::Rectangle& area, Widget* widget, const Glib::ustring& detail, int x, int y, int width, int height);
737     virtual void draw_option_vfunc(const Glib::RefPtr<Gdk::Window>& window, Gtk::StateType state_type, ShadowType shadow_type, const Gdk::Rectangle& area, Widget* widget, const Glib::ustring& detail, int x, int y, int width, int height);
738     virtual void draw_tab_vfunc(const Glib::RefPtr<Gdk::Window>& window, Gtk::StateType state_type, ShadowType shadow_type, const Gdk::Rectangle& area, Widget* widget, const Glib::ustring& detail, int x, int y, int width, int height);
739     virtual void draw_shadow_gap_vfunc(const Glib::RefPtr<Gdk::Window>& window, Gtk::StateType state_type, ShadowType shadow_type, const Gdk::Rectangle& area, Widget* widget, const Glib::ustring& detail, int x, int y, int width, int height, Gtk::PositionType gap_side, int gap_x, int gap_width);
740     virtual void draw_box_gap_vfunc(const Glib::RefPtr<Gdk::Window>& window, Gtk::StateType state_type, ShadowType shadow_type, const Gdk::Rectangle& area, Widget* widget, const Glib::ustring& detail, int x, int y, int width, int height, Gtk::PositionType gap_side, int gap_x, int gap_width);
741     virtual void draw_extension_vfunc(const Glib::RefPtr<Gdk::Window>& window, Gtk::StateType state_type, ShadowType shadow_type, const Gdk::Rectangle& area, Widget* widget, const Glib::ustring& detail, int x, int y, int width, int height, PositionType gap_side);
742     virtual void draw_focus_vfunc(const Glib::RefPtr<Gdk::Window>& window, Gtk::StateType state_type, const Gdk::Rectangle& area, Widget* widget, const Glib::ustring& detail, int x, int y, int width, int height);
743     virtual void draw_slider_vfunc(const Glib::RefPtr<Gdk::Window>& window, Gtk::StateType state_type, ShadowType shadow_type, const Gdk::Rectangle& area, Widget* widget, const Glib::ustring& detail, int x, int y, int width, int height, Orientation orientation);
744     virtual void draw_handle_vfunc(const Glib::RefPtr<Gdk::Window>& window, Gtk::StateType state_type, ShadowType shadow_type, const Gdk::Rectangle& area, Widget* widget, const Glib::ustring& detail, int x, int y, int width, int height, Orientation orientation);
745     virtual void draw_expander_vfunc(const Glib::RefPtr<Gdk::Window>& window, Gtk::StateType state_type, const Gdk::Rectangle& area, Widget* widget, const Glib::ustring& detail, int x, int y, ExpanderStyle expander_style);
746     virtual void draw_layout_vfunc(const Glib::RefPtr<Gdk::Window>& window, Gtk::StateType state_type, bool use_text, const Gdk::Rectangle& area, Widget* widget, const Glib::ustring& detail, int x, int y, const Glib::RefPtr<Pango::Layout>& layout);
747     virtual void draw_resize_grip_vfunc(const Glib::RefPtr<Gdk::Window>& window, Gtk::StateType state_type, const Gdk::Rectangle& area, Widget* widget, const Glib::ustring& detail, Gdk::WindowEdge edge, int x, int y, int width, int height);
748
749   
750   Glib::SignalProxy0< void > signal_realize();
751
752   
753   Glib::SignalProxy0< void > signal_unrealize();
754
755
756 public:
757
758 public:
759   //C++ methods used to invoke GTK+ virtual functions:
760
761 protected:
762   //GTK+ Virtual Functions (override these to change behaviour):
763
764   //Default Signal Handlers::
765   virtual void on_realize();
766   virtual void on_unrealize();
767
768
769 };
770
771 } // namespace Gtk
772
773
774 namespace Glib
775 {
776   /** @relates Gtk::Style
777    * @param object The C instance
778    * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
779    * @result A C++ instance that wraps this C instance.
780    */
781   Glib::RefPtr<Gtk::Style> wrap(GtkStyle* object, bool take_copy = false);
782 }
783
784
785 #endif /* _GTKMM_STYLE_H */
786