]> git.saurik.com Git - wxWidgets.git/blame - include/wx/effects.h
[ 1487463 ] XRC handler for wxOwnerDrawnComboBox.
[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
16/*
17 * wxEffects: various 3D effects
18 */
19
0799bc86
WS
20#include "wx/object.h"
21#include "wx/colour.h"
dd4e6da0 22#include "wx/gdicmn.h"
ed8219a5 23#include "wx/dc.h"
0799bc86 24
3f4fc796
JS
25class WXDLLEXPORT wxEffects: public wxObject
26{
27DECLARE_CLASS(wxEffects)
28
29public:
30 // Assume system colours
31 wxEffects() ;
32 // Going from lightest to darkest
33 wxEffects(const wxColour& highlightColour, const wxColour& lightShadow,
db54b046
RD
34 const wxColour& faceColour, const wxColour& mediumShadow,
35 const wxColour& darkShadow) ;
36
37 // Accessors
38 wxColour GetHighlightColour() const { return m_highlightColour; }
39 wxColour GetLightShadow() const { return m_lightShadow; }
40 wxColour GetFaceColour() const { return m_faceColour; }
41 wxColour GetMediumShadow() const { return m_mediumShadow; }
42 wxColour GetDarkShadow() const { return m_darkShadow; }
43
44 void SetHighlightColour(const wxColour& c) { m_highlightColour = c; }
45 void SetLightShadow(const wxColour& c) { m_lightShadow = c; }
46 void SetFaceColour(const wxColour& c) { m_faceColour = c; }
47 void SetMediumShadow(const wxColour& c) { m_mediumShadow = c; }
48 void SetDarkShadow(const wxColour& c) { m_darkShadow = c; }
49
50 void Set(const wxColour& highlightColour, const wxColour& lightShadow,
51 const wxColour& faceColour, const wxColour& mediumShadow,
52 const wxColour& darkShadow)
53 {
54 SetHighlightColour(highlightColour);
55 SetLightShadow(lightShadow);
56 SetFaceColour(faceColour);
57 SetMediumShadow(mediumShadow);
58 SetDarkShadow(darkShadow);
59 }
3f4fc796
JS
60
61 // Draw a sunken edge
62 void DrawSunkenEdge(wxDC& dc, const wxRect& rect, int borderSize = 1);
63
64 // Tile a bitmap
fbfb8bcc 65 bool TileBitmap(const wxRect& rect, wxDC& dc, const wxBitmap& bitmap);
db54b046 66
3f4fc796
JS
67protected:
68 wxColour m_highlightColour; // Usually white
69 wxColour m_lightShadow; // Usually light grey
70 wxColour m_faceColour; // Usually grey
71 wxColour m_mediumShadow; // Usually dark grey
72 wxColour m_darkShadow; // Usually black
73};
74
75#endif