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