deprecate wxEffects
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@49276 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -13,6 +13,12 @@
|
||||
#ifndef _WX_EFFECTS_H_
|
||||
#define _WX_EFFECTS_H_
|
||||
|
||||
// this class is deprecated and will be removed in the next wx version
|
||||
//
|
||||
// please use wxRenderer::DrawBorder() instead of DrawSunkenEdge(); there is no
|
||||
// replacement for TileBitmap() but it doesn't seem to be very useful anyhow
|
||||
#ifdef WXWIN_COMPATIBILITY_2_8
|
||||
|
||||
/*
|
||||
* wxEffects: various 3D effects
|
||||
*/
|
||||
@@ -22,17 +28,15 @@
|
||||
#include "wx/gdicmn.h"
|
||||
#include "wx/dc.h"
|
||||
|
||||
class WXDLLEXPORT wxEffects: public wxObject
|
||||
class WXDLLEXPORT wxEffectsImpl: public wxObject
|
||||
{
|
||||
DECLARE_CLASS(wxEffects)
|
||||
|
||||
public:
|
||||
// Assume system colours
|
||||
wxEffects() ;
|
||||
wxEffectsImpl() ;
|
||||
// Going from lightest to darkest
|
||||
wxEffects(const wxColour& highlightColour, const wxColour& lightShadow,
|
||||
const wxColour& faceColour, const wxColour& mediumShadow,
|
||||
const wxColour& darkShadow) ;
|
||||
wxEffectsImpl(const wxColour& highlightColour, const wxColour& lightShadow,
|
||||
const wxColour& faceColour, const wxColour& mediumShadow,
|
||||
const wxColour& darkShadow) ;
|
||||
|
||||
// Accessors
|
||||
wxColour GetHighlightColour() const { return m_highlightColour; }
|
||||
@@ -70,6 +74,18 @@ protected:
|
||||
wxColour m_faceColour; // Usually grey
|
||||
wxColour m_mediumShadow; // Usually dark grey
|
||||
wxColour m_darkShadow; // Usually black
|
||||
|
||||
DECLARE_CLASS(wxEffectsImpl)
|
||||
};
|
||||
|
||||
#endif
|
||||
// current versions of g++ don't generate deprecation warnings for classes
|
||||
// declared deprecated, so define wxEffects as a typedef instead: this does
|
||||
// generate warnings with both g++ and VC (which also has no troubles with
|
||||
// directly deprecating the classes...)
|
||||
//
|
||||
// note that this g++ bug (16370) is supposed to be fixed in g++ 4.3.0
|
||||
typedef wxEffectsImpl wxDEPRECATED(wxEffects);
|
||||
|
||||
#endif // WXWIN_COMPATIBILITY_2_8
|
||||
|
||||
#endif // _WX_EFFECTS_H_
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: src/common/effects.cpp
|
||||
// Purpose: wxEffects implementation
|
||||
// Purpose: wxEffectsImpl implementation
|
||||
// Author: Julian Smart
|
||||
// Modified by:
|
||||
// Created: 25/4/2000
|
||||
@@ -26,13 +26,13 @@
|
||||
#endif //WX_PRECOMP
|
||||
|
||||
/*
|
||||
* wxEffects: various 3D effects
|
||||
* wxEffectsImpl: various 3D effects
|
||||
*/
|
||||
|
||||
IMPLEMENT_CLASS(wxEffects, wxObject)
|
||||
IMPLEMENT_CLASS(wxEffectsImpl, wxObject)
|
||||
|
||||
// Assume system colours
|
||||
wxEffects::wxEffects()
|
||||
wxEffectsImpl::wxEffectsImpl()
|
||||
{
|
||||
m_highlightColour = wxSystemSettings::GetColour(wxSYS_COLOUR_3DHILIGHT) ;
|
||||
m_lightShadow = wxSystemSettings::GetColour(wxSYS_COLOUR_3DLIGHT) ;
|
||||
@@ -42,7 +42,7 @@ wxEffects::wxEffects()
|
||||
}
|
||||
|
||||
// Going from lightest to darkest
|
||||
wxEffects::wxEffects(const wxColour& highlightColour, const wxColour& lightShadow,
|
||||
wxEffectsImpl::wxEffectsImpl(const wxColour& highlightColour, const wxColour& lightShadow,
|
||||
const wxColour& faceColour, const wxColour& mediumShadow, const wxColour& darkShadow)
|
||||
{
|
||||
m_highlightColour = highlightColour;
|
||||
@@ -53,7 +53,7 @@ wxEffects::wxEffects(const wxColour& highlightColour, const wxColour& lightShado
|
||||
}
|
||||
|
||||
// Draw a sunken edge
|
||||
void wxEffects::DrawSunkenEdge(wxDC& dc, const wxRect& rect, int WXUNUSED(borderSize))
|
||||
void wxEffectsImpl::DrawSunkenEdge(wxDC& dc, const wxRect& rect, int WXUNUSED(borderSize))
|
||||
{
|
||||
wxPen highlightPen(m_highlightColour, 1, wxSOLID);
|
||||
wxPen lightShadowPen(m_lightShadow, 1, wxSOLID);
|
||||
@@ -86,7 +86,7 @@ void wxEffects::DrawSunkenEdge(wxDC& dc, const wxRect& rect, int WXUNUSED(border
|
||||
dc.SetPen(wxNullPen);
|
||||
}
|
||||
|
||||
bool wxEffects::TileBitmap(const wxRect& rect, wxDC& dc, const wxBitmap& bitmap)
|
||||
bool wxEffectsImpl::TileBitmap(const wxRect& rect, wxDC& dc, const wxBitmap& bitmap)
|
||||
{
|
||||
int w = bitmap.GetWidth();
|
||||
int h = bitmap.GetHeight();
|
||||
|
Reference in New Issue
Block a user