X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/af49c4b8a2d3553e733e71c7dd3911881f4c1a2a..5e3c3fc9b8160620d3b3eb3a2d0ed789d44ccbae:/include/wx/effects.h?ds=sidebyside diff --git a/include/wx/effects.h b/include/wx/effects.h index 09db9151a1..eaf1f482ec 100644 --- a/include/wx/effects.h +++ b/include/wx/effects.h @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////////// -// Name: effects.h +// Name: wx/effects.h // Purpose: wxEffects class // Draws 3D effects. // Author: Julian Smart et al @@ -7,13 +7,9 @@ // Created: 25/4/2000 // RCS-ID: $Id$ // Copyright: (c) Julian Smart -// Licence: wxWindows licence +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// -#if defined(__GNUG__) && !defined(__APPLE__) -#pragma interface "effects.h" -#endif - #ifndef _WX_EFFECTS_H_ #define _WX_EFFECTS_H_ @@ -21,6 +17,11 @@ * wxEffects: various 3D effects */ +#include "wx/object.h" +#include "wx/colour.h" +#include "wx/gdicmn.h" +#include "wx/dc.h" + class WXDLLEXPORT wxEffects: public wxObject { DECLARE_CLASS(wxEffects) @@ -30,13 +31,39 @@ public: wxEffects() ; // Going from lightest to darkest wxEffects(const wxColour& highlightColour, const wxColour& lightShadow, - const wxColour& faceColour, const wxColour& mediumShadow, const wxColour& darkShadow) ; + const wxColour& faceColour, const wxColour& mediumShadow, + const wxColour& darkShadow) ; + + // Accessors + wxColour GetHighlightColour() const { return m_highlightColour; } + wxColour GetLightShadow() const { return m_lightShadow; } + wxColour GetFaceColour() const { return m_faceColour; } + wxColour GetMediumShadow() const { return m_mediumShadow; } + wxColour GetDarkShadow() const { return m_darkShadow; } + + void SetHighlightColour(const wxColour& c) { m_highlightColour = c; } + void SetLightShadow(const wxColour& c) { m_lightShadow = c; } + void SetFaceColour(const wxColour& c) { m_faceColour = c; } + void SetMediumShadow(const wxColour& c) { m_mediumShadow = c; } + void SetDarkShadow(const wxColour& c) { m_darkShadow = c; } + + void Set(const wxColour& highlightColour, const wxColour& lightShadow, + const wxColour& faceColour, const wxColour& mediumShadow, + const wxColour& darkShadow) + { + SetHighlightColour(highlightColour); + SetLightShadow(lightShadow); + SetFaceColour(faceColour); + SetMediumShadow(mediumShadow); + SetDarkShadow(darkShadow); + } // Draw a sunken edge void DrawSunkenEdge(wxDC& dc, const wxRect& rect, int borderSize = 1); // Tile a bitmap - bool TileBitmap(const wxRect& rect, wxDC& dc, wxBitmap& bitmap); + bool TileBitmap(const wxRect& rect, wxDC& dc, const wxBitmap& bitmap); + protected: wxColour m_highlightColour; // Usually white wxColour m_lightShadow; // Usually light grey @@ -46,4 +73,3 @@ protected: }; #endif -