]> git.saurik.com Git - wxWidgets.git/blob - include/wx/effects.h
possible fix for templates with digitalmars
[wxWidgets.git] / include / wx / effects.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: effects.h
3 // Purpose: wxEffects class
4 // Draws 3D effects.
5 // Author: Julian Smart et al
6 // Modified by:
7 // Created: 25/4/2000
8 // RCS-ID: $Id$
9 // Copyright: (c) Julian Smart
10 // Licence: wxWindows licence
11 /////////////////////////////////////////////////////////////////////////////
12
13 #if defined(__GNUG__) && !defined(__APPLE__)
14 #pragma interface "effects.h"
15 #endif
16
17 #ifndef _WX_EFFECTS_H_
18 #define _WX_EFFECTS_H_
19
20 /*
21 * wxEffects: various 3D effects
22 */
23
24 class WXDLLEXPORT wxEffects: public wxObject
25 {
26 DECLARE_CLASS(wxEffects)
27
28 public:
29 // Assume system colours
30 wxEffects() ;
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) ;
35
36 // Accessors
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; }
42
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; }
48
49 void Set(const wxColour& highlightColour, const wxColour& lightShadow,
50 const wxColour& faceColour, const wxColour& mediumShadow,
51 const wxColour& darkShadow)
52 {
53 SetHighlightColour(highlightColour);
54 SetLightShadow(lightShadow);
55 SetFaceColour(faceColour);
56 SetMediumShadow(mediumShadow);
57 SetDarkShadow(darkShadow);
58 }
59
60 // Draw a sunken edge
61 void DrawSunkenEdge(wxDC& dc, const wxRect& rect, int borderSize = 1);
62
63 // Tile a bitmap
64 bool TileBitmap(const wxRect& rect, wxDC& dc, wxBitmap& bitmap);
65
66 protected:
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
72 };
73
74 #endif
75