]> git.saurik.com Git - wxWidgets.git/blame - include/wx/effects.h
Provide a task-dialog based wxMSW wxMessageDialog implementation.
[wxWidgets.git] / include / wx / effects.h
CommitLineData
3f4fc796 1/////////////////////////////////////////////////////////////////////////////
0799bc86 2// Name: wx/effects.h
3f4fc796
JS
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
1a18887b 10// Licence: wxWindows licence
3f4fc796
JS
11/////////////////////////////////////////////////////////////////////////////
12
3f4fc796
JS
13#ifndef _WX_EFFECTS_H_
14#define _WX_EFFECTS_H_
15
fe1efe6a
VZ
16// this class is deprecated and will be removed in the next wx version
17//
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
831b64f3 20#if WXWIN_COMPATIBILITY_2_8
fe1efe6a 21
3f4fc796
JS
22/*
23 * wxEffects: various 3D effects
24 */
25
0799bc86
WS
26#include "wx/object.h"
27#include "wx/colour.h"
dd4e6da0 28#include "wx/gdicmn.h"
ed8219a5 29#include "wx/dc.h"
0799bc86 30
53a2db12 31class WXDLLIMPEXP_CORE wxEffectsImpl: public wxObject
3f4fc796 32{
3f4fc796
JS
33public:
34 // Assume system colours
fe1efe6a 35 wxEffectsImpl() ;
3f4fc796 36 // Going from lightest to darkest
fe1efe6a
VZ
37 wxEffectsImpl(const wxColour& highlightColour, const wxColour& lightShadow,
38 const wxColour& faceColour, const wxColour& mediumShadow,
39 const wxColour& darkShadow) ;
db54b046
RD
40
41 // Accessors
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; }
47
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; }
53
54 void Set(const wxColour& highlightColour, const wxColour& lightShadow,
55 const wxColour& faceColour, const wxColour& mediumShadow,
56 const wxColour& darkShadow)
57 {
58 SetHighlightColour(highlightColour);
59 SetLightShadow(lightShadow);
60 SetFaceColour(faceColour);
61 SetMediumShadow(mediumShadow);
62 SetDarkShadow(darkShadow);
63 }
3f4fc796
JS
64
65 // Draw a sunken edge
66 void DrawSunkenEdge(wxDC& dc, const wxRect& rect, int borderSize = 1);
67
68 // Tile a bitmap
fbfb8bcc 69 bool TileBitmap(const wxRect& rect, wxDC& dc, const wxBitmap& bitmap);
db54b046 70
3f4fc796
JS
71protected:
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
fe1efe6a
VZ
77
78 DECLARE_CLASS(wxEffectsImpl)
3f4fc796
JS
79};
80
fe1efe6a
VZ
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...)
85//
86// note that this g++ bug (16370) is supposed to be fixed in g++ 4.3.0
87typedef wxEffectsImpl wxDEPRECATED(wxEffects);
88
89#endif // WXWIN_COMPATIBILITY_2_8
90
91#endif // _WX_EFFECTS_H_