1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: wxEffects class
5 // Author: Julian Smart et al
9 // Copyright: (c) Julian Smart
10 // Licence: wxWindows licence
11 /////////////////////////////////////////////////////////////////////////////
13 #if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
14 #pragma interface "effects.h"
17 #ifndef _WX_EFFECTS_H_
18 #define _WX_EFFECTS_H_
21 * wxEffects: various 3D effects
24 class WXDLLEXPORT wxEffects
: public wxObject
26 DECLARE_CLASS(wxEffects
)
29 // Assume system colours
31 // Going from lightest to darkest
32 wxEffects(const wxColour
& highlightColour
, const wxColour
& lightShadow
,
33 const wxColour
& faceColour
, const wxColour
& mediumShadow
,
34 const wxColour
& darkShadow
) ;
37 wxColour
GetHighlightColour() const { return m_highlightColour
; }
38 wxColour
GetLightShadow() const { return m_lightShadow
; }
39 wxColour
GetFaceColour() const { return m_faceColour
; }
40 wxColour
GetMediumShadow() const { return m_mediumShadow
; }
41 wxColour
GetDarkShadow() const { return m_darkShadow
; }
43 void SetHighlightColour(const wxColour
& c
) { m_highlightColour
= c
; }
44 void SetLightShadow(const wxColour
& c
) { m_lightShadow
= c
; }
45 void SetFaceColour(const wxColour
& c
) { m_faceColour
= c
; }
46 void SetMediumShadow(const wxColour
& c
) { m_mediumShadow
= c
; }
47 void SetDarkShadow(const wxColour
& c
) { m_darkShadow
= c
; }
49 void Set(const wxColour
& highlightColour
, const wxColour
& lightShadow
,
50 const wxColour
& faceColour
, const wxColour
& mediumShadow
,
51 const wxColour
& darkShadow
)
53 SetHighlightColour(highlightColour
);
54 SetLightShadow(lightShadow
);
55 SetFaceColour(faceColour
);
56 SetMediumShadow(mediumShadow
);
57 SetDarkShadow(darkShadow
);
61 void DrawSunkenEdge(wxDC
& dc
, const wxRect
& rect
, int borderSize
= 1);
64 bool TileBitmap(const wxRect
& rect
, wxDC
& dc
, wxBitmap
& bitmap
);
67 wxColour m_highlightColour
; // Usually white
68 wxColour m_lightShadow
; // Usually light grey
69 wxColour m_faceColour
; // Usually grey
70 wxColour m_mediumShadow
; // Usually dark grey
71 wxColour m_darkShadow
; // Usually black