]> git.saurik.com Git - wxWidgets.git/blame - include/wx/effects.h
Fix needed for free MS SDK
[wxWidgets.git] / include / wx / effects.h
CommitLineData
3f4fc796
JS
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
12028905 13#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
3f4fc796
JS
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
24class WXDLLEXPORT wxEffects: public wxObject
25{
26DECLARE_CLASS(wxEffects)
27
28public:
29 // Assume system colours
30 wxEffects() ;
31 // Going from lightest to darkest
32 wxEffects(const wxColour& highlightColour, const wxColour& lightShadow,
db54b046
RD
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 }
3f4fc796
JS
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);
db54b046 65
3f4fc796
JS
66protected:
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