1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: wxEffects class
5 // Author: Julian Smart et al
8 // Copyright: (c) Julian Smart
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
12 #ifndef _WX_EFFECTS_H_
13 #define _WX_EFFECTS_H_
15 // this class is deprecated and will be removed in the next wx version
17 // please use wxRenderer::DrawBorder() instead of DrawSunkenEdge(); there is no
18 // replacement for TileBitmap() but it doesn't seem to be very useful anyhow
19 #if WXWIN_COMPATIBILITY_2_8
22 * wxEffects: various 3D effects
25 #include "wx/object.h"
26 #include "wx/colour.h"
27 #include "wx/gdicmn.h"
30 class WXDLLIMPEXP_CORE wxEffectsImpl
: public wxObject
33 // Assume system colours
35 // Going from lightest to darkest
36 wxEffectsImpl(const wxColour
& highlightColour
, const wxColour
& lightShadow
,
37 const wxColour
& faceColour
, const wxColour
& mediumShadow
,
38 const wxColour
& darkShadow
) ;
41 wxColour
GetHighlightColour() const { return m_highlightColour
; }
42 wxColour
GetLightShadow() const { return m_lightShadow
; }
43 wxColour
GetFaceColour() const { return m_faceColour
; }
44 wxColour
GetMediumShadow() const { return m_mediumShadow
; }
45 wxColour
GetDarkShadow() const { return m_darkShadow
; }
47 void SetHighlightColour(const wxColour
& c
) { m_highlightColour
= c
; }
48 void SetLightShadow(const wxColour
& c
) { m_lightShadow
= c
; }
49 void SetFaceColour(const wxColour
& c
) { m_faceColour
= c
; }
50 void SetMediumShadow(const wxColour
& c
) { m_mediumShadow
= c
; }
51 void SetDarkShadow(const wxColour
& c
) { m_darkShadow
= c
; }
53 void Set(const wxColour
& highlightColour
, const wxColour
& lightShadow
,
54 const wxColour
& faceColour
, const wxColour
& mediumShadow
,
55 const wxColour
& darkShadow
)
57 SetHighlightColour(highlightColour
);
58 SetLightShadow(lightShadow
);
59 SetFaceColour(faceColour
);
60 SetMediumShadow(mediumShadow
);
61 SetDarkShadow(darkShadow
);
65 void DrawSunkenEdge(wxDC
& dc
, const wxRect
& rect
, int borderSize
= 1);
68 bool TileBitmap(const wxRect
& rect
, wxDC
& dc
, const wxBitmap
& bitmap
);
71 wxColour m_highlightColour
; // Usually white
72 wxColour m_lightShadow
; // Usually light grey
73 wxColour m_faceColour
; // Usually grey
74 wxColour m_mediumShadow
; // Usually dark grey
75 wxColour m_darkShadow
; // Usually black
77 DECLARE_CLASS(wxEffectsImpl
)
80 // current versions of g++ don't generate deprecation warnings for classes
81 // declared deprecated, so define wxEffects as a typedef instead: this does
82 // generate warnings with both g++ and VC (which also has no troubles with
83 // directly deprecating the classes...)
85 // note that this g++ bug (16370) is supposed to be fixed in g++ 4.3.0
86 typedef wxEffectsImpl
wxDEPRECATED(wxEffects
);
88 #endif // WXWIN_COMPATIBILITY_2_8
90 #endif // _WX_EFFECTS_H_