]>
Dogcows Code - chaz/openbox/blob - otk/rendertexture.hh
3d324e30fc7a65e204b1d13c3d188f14742395a2
1 // -*- mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; -*-
2 #ifndef __rendertexture_hh
3 #define __rendertexture_hh
5 #include "rendercolor.hh"
9 //! Superclass for all the Textures
34 //! If true, the texture is not rendered at all, so all options are ignored
35 bool _parent_relative
;
36 //! The relief type of the texture
38 //! The way the bevel should be drawn
40 //! If a flat border is drawn on the outside, ignored for all ReliefType
41 //! values except ReliefType::Flat
43 //! The type of gradient to fill the texture with (if any)
44 GradientType _gradient
;
45 //! If interlace lines should be drawn over the texture
48 //! The base color for the texture, the only color when the texture is solid.
49 //! This must always be defined
50 const RenderColor
*_color
;
51 //! The shadow color for the bevel. This must be defined if
52 //! RenderTexture::_relief is not RenderTexture::ReliefType::Flat
53 const RenderColor
*_bevel_dark_color
;
54 //! The light color for the bevel. This must be defined if
55 //! RenderTexture::_relief is not RenderTexture::ReliefType::Flat
56 const RenderColor
*_bevel_light_color
;
57 //! The color for the flat border if RenderTexture::_border is true. This
58 //! must be defined if it is true
59 const RenderColor
*_border_color
;
60 //! The color for the interlace lines if RenderTexture. This must be defined
62 const RenderColor
*_interlace_color
;
65 RenderTexture(bool parent_relative
, ReliefType relief
, BevelType bevel
,
66 bool border
, GradientType gradient
, bool interlaced
,
67 const RenderColor
*color
, const RenderColor
*bevel_dark_color
,
68 const RenderColor
*bevel_light_color
,
69 const RenderColor
*border_color
,
70 const RenderColor
*interlace_color
)
71 : _parent_relative(parent_relative
),
76 _interlaced(interlaced
),
78 _bevel_dark_color(bevel_dark_color
),
79 _bevel_light_color(bevel_light_color
),
80 _border_color(border_color
),
81 _interlace_color(interlace_color
)
83 assert(_relief
== Flat
|| (_bevel_dark_color
&& _bevel_light_color
));
84 assert(!_border
|| _border_color
);
85 assert(!_interlaced
|| _interlace_color
);
89 //! If true, the texture is not rendered at all, so all options are ignored
90 inline bool parentRelative() const { return _parent_relative
; }
91 //! The relief type of the texture
92 inline ReliefType
relief() const { return _relief
; }
93 //! The way the bevel should be drawn
94 inline BevelType
bevel() const { return _bevel
; }
95 //! If a flat border is drawn on the outside, ignored for all ReliefType
96 //! values except ReliefType::Flat
97 inline bool border() const { return _border
; }
98 //! The type of gradient to fill the texture with (if any)
99 inline GradientType
gradient() const { return _gradient
; }
100 //! If interlace lines should be drawn over the texture
101 inline bool interlaced() const { return _interlaced
; }
103 //! The base color for the texture, the only color when the texture is solid.
104 //! This must always be defined
105 inline const RenderColor
& color() const { return *_color
; }
106 //! The shadow color for the bevel. This must be defined if
107 //! RenderTexture::_relief is not RenderTexture::ReliefType::Flat
108 inline const RenderColor
& bevelDarkColor() const
109 { return *_bevel_dark_color
; }
110 //! The light color for the bevel. This must be defined if
111 //! RenderTexture::)relief is not RenderTexture::ReliefType::Flat
112 inline const RenderColor
& bevelLightColor() const
113 { return *_bevel_light_color
; }
114 //! The color for the flat border if RenderTexture::_border is true. This
115 //! must be defined if it is true
116 inline const RenderColor
& borderColor() const { return *_border_color
; }
117 //! The color for the interlace lines if RenderTexture. This must be defined
119 inline const RenderColor
& interlaceColor() const
120 { return *_interlace_color
; }
125 #endif // __rendertexture_hh
This page took 0.040596 seconds and 4 git commands to generate.