declare future-deprecated SetStyle(int) in wxPen/Brush and not wxPen/BrushBase as it's useless there (compilation of user code doing pen.SetStyle(wxDOT) still fails)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@54273 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin 2008-06-17 17:28:26 +00:00
parent bb573115a9
commit bc735a68b1
22 changed files with 111 additions and 20 deletions

View File

@ -55,11 +55,6 @@ public:
virtual bool IsHatch() const
{ return (GetStyle()>=wxBRUSHSTYLE_FIRST_HATCH) && (GetStyle()<=wxBRUSHSTYLE_LAST_HATCH); }
#if FUTURE_WXWIN_COMPATIBILITY_3_0
wxDEPRECATED_FUTURE( void SetStyle(int style) )
{ SetStyle((wxBrushStyle)style); }
#endif
};
#if defined(__WXPALMOS__)

View File

@ -55,6 +55,11 @@ public:
virtual wxBrushStyle GetStyle() const;
wxBitmap *GetStipple() const;
#if FUTURE_WXWIN_COMPATIBILITY_3_0
wxDEPRECATED_FUTURE( void SetStyle(int style) )
{ SetStyle((wxBrushStyle)style); }
#endif
// wxCocoa
WX_NSColor GetNSColor();

View File

@ -54,6 +54,12 @@ public:
int GetDashes(wxDash **ptr) const;
wxBitmap *GetStipple() const;
#if FUTURE_WXWIN_COMPATIBILITY_3_0
wxDEPRECATED_FUTURE( void SetStyle(int style) )
{ SetStyle((wxPenStyle)style); }
#endif
// Cocoa-specific
WX_NSColor GetNSColor();
int GetCocoaLineDash(const CGFloat **pattern);

View File

@ -50,6 +50,11 @@ public:
void SetStyle(wxBrushStyle style);
void SetStipple(const wxBitmap& stipple);
#if FUTURE_WXWIN_COMPATIBILITY_3_0
wxDEPRECATED_FUTURE( void SetStyle(int style) )
{ SetStyle((wxBrushStyle)style); }
#endif
protected:
virtual wxGDIRefData *CreateGDIRefData() const;
virtual wxGDIRefData *CloneGDIRefData(const wxGDIRefData *data) const;

View File

@ -61,6 +61,11 @@ public:
wxDash* GetDash() const;
wxBitmap *GetStipple() const;
#if FUTURE_WXWIN_COMPATIBILITY_3_0
wxDEPRECATED_FUTURE( void SetStyle(int style) )
{ SetStyle((wxPenStyle)style); }
#endif
protected:
virtual wxGDIRefData *CreateGDIRefData() const;
virtual wxGDIRefData *CloneGDIRefData(const wxGDIRefData *data) const;

View File

@ -41,6 +41,11 @@ public:
void SetStyle( wxBrushStyle style );
void SetStipple( const wxBitmap& stipple );
#if FUTURE_WXWIN_COMPATIBILITY_3_0
wxDEPRECATED_FUTURE( void SetStyle(int style) )
{ SetStyle((wxBrushStyle)style); }
#endif
protected:
virtual wxGDIRefData *CreateGDIRefData() const;
virtual wxGDIRefData *CloneGDIRefData(const wxGDIRefData *data) const;

View File

@ -50,6 +50,11 @@ public:
wxDash* GetDash() const;
wxBitmap *GetStipple() const;
#if FUTURE_WXWIN_COMPATIBILITY_3_0
wxDEPRECATED_FUTURE( void SetStyle(int style) )
{ SetStyle((wxPenStyle)style); }
#endif
protected:
virtual wxGDIRefData *CreateGDIRefData() const;
virtual wxGDIRefData *CloneGDIRefData(const wxGDIRefData *data) const;

View File

@ -51,6 +51,11 @@ public:
void SetStyle( wxBrushStyle style );
void SetStipple( const wxBitmap& stipple );
#if FUTURE_WXWIN_COMPATIBILITY_3_0
wxDEPRECATED_FUTURE( void SetStyle(int style) )
{ SetStyle((wxBrushStyle)style); }
#endif
private:
virtual wxGDIRefData *CreateGDIRefData() const;
virtual wxGDIRefData *CloneGDIRefData(const wxGDIRefData *data) const;

View File

@ -64,6 +64,11 @@ public:
wxDash* GetDash() const;
wxBitmap *GetStipple() const;
#if FUTURE_WXWIN_COMPATIBILITY_3_0
wxDEPRECATED_FUTURE( void SetStyle(int style) )
{ SetStyle((wxPenStyle)style); }
#endif
private:
virtual wxGDIRefData *CreateGDIRefData() const;
virtual wxGDIRefData *CloneGDIRefData(const wxGDIRefData *data) const;

View File

@ -49,6 +49,11 @@ public:
void SetStyle(wxBrushStyle style);
void SetStipple(const wxBitmap& stipple);
#if FUTURE_WXWIN_COMPATIBILITY_3_0
wxDEPRECATED_FUTURE( void SetStyle(int style) )
{ SetStyle((wxBrushStyle)style); }
#endif
// implementation:
void* GetMaskPattern() const;

View File

@ -60,6 +60,11 @@ public:
wxDash* GetDash() const;
wxBitmap *GetStipple() const;
#if FUTURE_WXWIN_COMPATIBILITY_3_0
wxDEPRECATED_FUTURE( void SetStyle(int style) )
{ SetStyle((wxPenStyle)style); }
#endif
// implementation:
void* GetPixPattern() const;

View File

@ -43,6 +43,11 @@ public:
wxBrushStyle GetStyle() const;
wxBitmap *GetStipple() const;
#if FUTURE_WXWIN_COMPATIBILITY_3_0
wxDEPRECATED_FUTURE( void SetStyle(int style) )
{ SetStyle((wxBrushStyle)style); }
#endif
// return the HBRUSH for this brush
virtual WXHANDLE GetResourceHandle() const;

View File

@ -55,6 +55,11 @@ public:
int GetDashCount() const;
wxBitmap* GetStipple() const;
#if FUTURE_WXWIN_COMPATIBILITY_3_0
wxDEPRECATED_FUTURE( void SetStyle(int style) )
{ SetStyle((wxPenStyle)style); }
#endif
// internal: wxGDIObject methods
virtual bool RealizeResource();
virtual bool FreeResource(bool force = false);

View File

@ -40,6 +40,11 @@ public:
wxBitmap* GetStipple(void) const;
int GetPS(void) const;
#if FUTURE_WXWIN_COMPATIBILITY_3_0
wxDEPRECATED_FUTURE( void SetStyle(int style) )
{ SetStyle((wxBrushStyle)style); }
#endif
//
// Implementation
//

View File

@ -69,6 +69,11 @@ public:
int GetDashCount() const;
wxBitmap* GetStipple(void) const;
#if FUTURE_WXWIN_COMPATIBILITY_3_0
wxDEPRECATED_FUTURE( void SetStyle(int style) )
{ SetStyle((wxPenStyle)style); }
#endif
//
// Implementation
//

View File

@ -42,6 +42,11 @@ public:
wxBrushStyle GetStyle() const ;
wxBitmap *GetStipple() const ;
#if FUTURE_WXWIN_COMPATIBILITY_3_0
wxDEPRECATED_FUTURE( void SetStyle(int style) )
{ SetStyle((wxBrushStyle)style); }
#endif
protected:
virtual wxGDIRefData *CreateGDIRefData() const;
virtual wxGDIRefData *CloneGDIRefData(const wxGDIRefData *data) const;

View File

@ -52,6 +52,11 @@ public:
wxBitmap *GetStipple() const ;
#if FUTURE_WXWIN_COMPATIBILITY_3_0
wxDEPRECATED_FUTURE( void SetStyle(int style) )
{ SetStyle((wxPenStyle)style); }
#endif
// Implementation
// Useful helper: create the brush resource

View File

@ -45,6 +45,11 @@ public:
wxBrushStyle GetStyle() const;
wxBitmap *GetStipple() const;
#if FUTURE_WXWIN_COMPATIBILITY_3_0
wxDEPRECATED_FUTURE( void SetStyle(int style) )
{ SetStyle((wxBrushStyle)style); }
#endif
// return the HBRUSH for this brush
virtual WXHANDLE GetResourceHandle() const;

View File

@ -125,6 +125,11 @@ public:
WXHANDLE GetResourceHandle() const;
bool IsFree() const;
#if FUTURE_WXWIN_COMPATIBILITY_3_0
wxDEPRECATED_FUTURE( void SetStyle(int style) )
{ SetStyle((wxPenStyle)style); }
#endif
protected:
virtual wxGDIRefData* CreateGDIRefData() const;
virtual wxGDIRefData* CloneGDIRefData(const wxGDIRefData* data) const;

View File

@ -84,33 +84,28 @@ public:
virtual wxPenCap GetCap() const = 0;
virtual int GetWidth() const = 0;
virtual int GetDashes(wxDash **ptr) const = 0;
#if FUTURE_WXWIN_COMPATIBILITY_3_0
wxDEPRECATED_FUTURE( void SetStyle(int style) )
{ SetStyle((wxPenStyle)style); }
#endif
};
#if defined(__WXPALMOS__)
#include "wx/palmos/pen.h"
#include "wx/palmos/pen.h"
#elif defined(__WXMSW__)
#include "wx/msw/pen.h"
#include "wx/msw/pen.h"
#elif defined(__WXMOTIF__) || defined(__WXX11__)
#include "wx/x11/pen.h"
#include "wx/x11/pen.h"
#elif defined(__WXGTK20__)
#include "wx/gtk/pen.h"
#include "wx/gtk/pen.h"
#elif defined(__WXGTK__)
#include "wx/gtk1/pen.h"
#include "wx/gtk1/pen.h"
#elif defined(__WXMGL__)
#include "wx/mgl/pen.h"
#include "wx/mgl/pen.h"
#elif defined(__WXDFB__)
#include "wx/dfb/pen.h"
#include "wx/dfb/pen.h"
#elif defined(__WXMAC__)
#include "wx/osx/pen.h"
#include "wx/osx/pen.h"
#elif defined(__WXCOCOA__)
#include "wx/cocoa/pen.h"
#include "wx/cocoa/pen.h"
#elif defined(__WXPM__)
#include "wx/os2/pen.h"
#include "wx/os2/pen.h"
#endif
class WXDLLIMPEXP_CORE wxPenList: public wxGDIObjListBase

View File

@ -50,6 +50,11 @@ public:
void SetStyle( wxBrushStyle style );
void SetStipple( const wxBitmap& stipple );
#if FUTURE_WXWIN_COMPATIBILITY_3_0
wxDEPRECATED_FUTURE( void SetStyle(int style) )
{ SetStyle((wxBrushStyle)style); }
#endif
protected:
virtual wxGDIRefData *CreateGDIRefData() const;
virtual wxGDIRefData *CloneGDIRefData(const wxGDIRefData *data) const;

View File

@ -64,6 +64,11 @@ public:
wxDash* GetDash() const;
wxBitmap* GetStipple() const;
#if FUTURE_WXWIN_COMPATIBILITY_3_0
wxDEPRECATED_FUTURE( void SetStyle(int style) )
{ SetStyle((wxPenStyle)style); }
#endif
protected:
virtual wxGDIRefData *CreateGDIRefData() const;
virtual wxGDIRefData *CloneGDIRefData(const wxGDIRefData *data) const;