wxBrush::SetColour and wxPen::SetColour unified. Source cleaning.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@35794 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: include/wx/cocoa/brush.h
|
||||
// Name: wx/cocoa/brush.h
|
||||
// Purpose: wxBrush class
|
||||
// Author: David Elliott <dfe@cox.net>
|
||||
// Modified by:
|
||||
@@ -39,10 +39,10 @@ public:
|
||||
// ------------------------------------------------------------------------
|
||||
// Implementation
|
||||
// ------------------------------------------------------------------------
|
||||
virtual void SetColour(const wxColour& col) ;
|
||||
virtual void SetColour(unsigned char r, unsigned char g, unsigned char b) ;
|
||||
virtual void SetStyle(int style) ;
|
||||
virtual void SetStipple(const wxBitmap& stipple) ;
|
||||
virtual void SetColour(const wxColour& col) ;
|
||||
virtual void SetColour(const unsigned char r, const unsigned char g, const unsigned char b) ;
|
||||
virtual void SetStyle(int style) ;
|
||||
virtual void SetStipple(const wxBitmap& stipple) ;
|
||||
|
||||
// assignment
|
||||
wxBrush& operator = (const wxBrush& brush)
|
||||
|
@@ -6,7 +6,7 @@
|
||||
// Created: 2003/08/02 (stubs from 22.03.2003)
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) 2003 David Elliott
|
||||
// Licence: wxWindows licence
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef __WX_COCOA_PEN_H__
|
||||
@@ -47,7 +47,7 @@ public:
|
||||
virtual bool Ok() const { return (m_refData != NULL) ; }
|
||||
|
||||
void SetColour(const wxColour& col) ;
|
||||
void SetColour(unsigned char r, unsigned char g, unsigned char b) ;
|
||||
void SetColour(const unsigned char r, const unsigned char g, const unsigned char b) ;
|
||||
|
||||
void SetWidth(int width);
|
||||
void SetStyle(int style);
|
||||
|
@@ -1,5 +1,5 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: brush.h
|
||||
// Name: wx/gtk/brush.h
|
||||
// Purpose:
|
||||
// Author: Robert Roebling
|
||||
// Id: $Id$
|
||||
@@ -51,7 +51,7 @@ public:
|
||||
wxBitmap *GetStipple() const;
|
||||
|
||||
void SetColour( const wxColour& col );
|
||||
void SetColour( unsigned char r, unsigned char g, unsigned char b );
|
||||
void SetColour( const unsigned char r, const unsigned char g, const unsigned char b );
|
||||
void SetStyle( int style );
|
||||
void SetStipple( const wxBitmap& stipple );
|
||||
|
||||
|
@@ -36,28 +36,28 @@ class WXDLLIMPEXP_CORE wxPen: public wxGDIObject
|
||||
{
|
||||
public:
|
||||
wxPen() { }
|
||||
|
||||
|
||||
wxPen( const wxColour &colour, int width = 1, int style = wxSOLID );
|
||||
~wxPen();
|
||||
|
||||
|
||||
wxPen( const wxPen& pen )
|
||||
: wxGDIObject()
|
||||
{ Ref(pen); }
|
||||
wxPen& operator = ( const wxPen& pen ) { Ref(pen); return *this; }
|
||||
|
||||
|
||||
bool Ok() const { return m_refData != NULL; }
|
||||
|
||||
|
||||
bool operator == ( const wxPen& pen ) const;
|
||||
bool operator != (const wxPen& pen) const { return !(*this == pen); }
|
||||
|
||||
void SetColour( const wxColour &colour );
|
||||
void SetColour( int red, int green, int blue );
|
||||
void SetColour( const unsigned char red, const unsigned char green, const unsigned char blue );
|
||||
void SetCap( int capStyle );
|
||||
void SetJoin( int joinStyle );
|
||||
void SetStyle( int style );
|
||||
void SetWidth( int width );
|
||||
void SetDashes( int number_of_dashes, const wxDash *dash );
|
||||
|
||||
|
||||
wxColour &GetColour() const;
|
||||
int GetCap() const;
|
||||
int GetJoin() const;
|
||||
@@ -67,11 +67,11 @@ public:
|
||||
int GetDashCount() const;
|
||||
wxDash* GetDash() const;
|
||||
|
||||
private:
|
||||
private:
|
||||
// ref counting code
|
||||
virtual wxObjectRefData *CreateRefData() const;
|
||||
virtual wxObjectRefData *CloneRefData(const wxObjectRefData *data) const;
|
||||
|
||||
|
||||
DECLARE_DYNAMIC_CLASS(wxPen)
|
||||
};
|
||||
|
||||
|
@@ -1,5 +1,5 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: brush.h
|
||||
// Name: wx/gtk/brush.h
|
||||
// Purpose:
|
||||
// Author: Robert Roebling
|
||||
// Id: $Id$
|
||||
@@ -51,7 +51,7 @@ public:
|
||||
wxBitmap *GetStipple() const;
|
||||
|
||||
void SetColour( const wxColour& col );
|
||||
void SetColour( unsigned char r, unsigned char g, unsigned char b );
|
||||
void SetColour( const unsigned char r, const unsigned char g, const unsigned char b );
|
||||
void SetStyle( int style );
|
||||
void SetStipple( const wxBitmap& stipple );
|
||||
|
||||
|
@@ -36,28 +36,28 @@ class WXDLLIMPEXP_CORE wxPen: public wxGDIObject
|
||||
{
|
||||
public:
|
||||
wxPen() { }
|
||||
|
||||
|
||||
wxPen( const wxColour &colour, int width = 1, int style = wxSOLID );
|
||||
~wxPen();
|
||||
|
||||
|
||||
wxPen( const wxPen& pen )
|
||||
: wxGDIObject()
|
||||
{ Ref(pen); }
|
||||
wxPen& operator = ( const wxPen& pen ) { Ref(pen); return *this; }
|
||||
|
||||
|
||||
bool Ok() const { return m_refData != NULL; }
|
||||
|
||||
|
||||
bool operator == ( const wxPen& pen ) const;
|
||||
bool operator != (const wxPen& pen) const { return !(*this == pen); }
|
||||
|
||||
void SetColour( const wxColour &colour );
|
||||
void SetColour( int red, int green, int blue );
|
||||
void SetColour( const unsigned char red, const unsigned char green, const unsigned char blue );
|
||||
void SetCap( int capStyle );
|
||||
void SetJoin( int joinStyle );
|
||||
void SetStyle( int style );
|
||||
void SetWidth( int width );
|
||||
void SetDashes( int number_of_dashes, const wxDash *dash );
|
||||
|
||||
|
||||
wxColour &GetColour() const;
|
||||
int GetCap() const;
|
||||
int GetJoin() const;
|
||||
@@ -67,11 +67,11 @@ public:
|
||||
int GetDashCount() const;
|
||||
wxDash* GetDash() const;
|
||||
|
||||
private:
|
||||
private:
|
||||
// ref counting code
|
||||
virtual wxObjectRefData *CreateRefData() const;
|
||||
virtual wxObjectRefData *CloneRefData(const wxObjectRefData *data) const;
|
||||
|
||||
|
||||
DECLARE_DYNAMIC_CLASS(wxPen)
|
||||
};
|
||||
|
||||
|
@@ -1,5 +1,5 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: brush.h
|
||||
// Name: wx/mac/carbon/brush.h
|
||||
// Purpose: wxBrush class
|
||||
// Author: Stefan Csomor
|
||||
// Modified by:
|
||||
@@ -40,8 +40,8 @@ public:
|
||||
{ Ref(brush); }
|
||||
~wxBrush();
|
||||
|
||||
virtual void SetColour(const wxColour& col) ;
|
||||
virtual void SetColour(unsigned char r, unsigned char g, unsigned char b) ;
|
||||
virtual void SetColour(const wxColour& col) ;
|
||||
virtual void SetColour(const unsigned char r, const unsigned char g, const unsigned char b) ;
|
||||
virtual void SetStyle(int style) ;
|
||||
virtual void SetStipple(const wxBitmap& stipple) ;
|
||||
virtual void MacSetTheme(short macThemeBrush) ;
|
||||
|
@@ -1,5 +1,5 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/mac/pen.h
|
||||
// Name: wx/mac/carbon/pen.h
|
||||
// Purpose: wxPen class
|
||||
// Author: Stefan Csomor
|
||||
// Modified by:
|
||||
@@ -65,7 +65,7 @@ public:
|
||||
|
||||
// Override in order to recreate the pen
|
||||
void SetColour(const wxColour& col) ;
|
||||
void SetColour(unsigned char r, unsigned char g, unsigned char b) ;
|
||||
void SetColour(const unsigned char r, const unsigned char g, const unsigned char b) ;
|
||||
|
||||
void SetWidth(int width) ;
|
||||
void SetStyle(int style) ;
|
||||
|
@@ -1,5 +1,5 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: brush.h
|
||||
// Name: wx/mac/classic/brush.h
|
||||
// Purpose: wxBrush class
|
||||
// Author: Stefan Csomor
|
||||
// Modified by:
|
||||
@@ -41,7 +41,7 @@ public:
|
||||
~wxBrush();
|
||||
|
||||
virtual void SetColour(const wxColour& col) ;
|
||||
virtual void SetColour(unsigned char r, unsigned char g, unsigned char b) ;
|
||||
virtual void SetColour(const unsigned char r, const unsigned char g, const unsigned char b) ;
|
||||
virtual void SetStyle(int style) ;
|
||||
virtual void SetStipple(const wxBitmap& stipple) ;
|
||||
virtual void SetMacTheme(short macThemeBrush) ;
|
||||
|
@@ -1,5 +1,5 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/mac/pen.h
|
||||
// Name: wx/mac/classic/pen.h
|
||||
// Purpose: wxPen class
|
||||
// Author: Stefan Csomor
|
||||
// Modified by:
|
||||
@@ -65,7 +65,7 @@ public:
|
||||
|
||||
// Override in order to recreate the pen
|
||||
void SetColour(const wxColour& col) ;
|
||||
void SetColour(unsigned char r, unsigned char g, unsigned char b) ;
|
||||
void SetColour(const unsigned char r, const unsigned char g, const unsigned char b) ;
|
||||
|
||||
void SetWidth(int width) ;
|
||||
void SetStyle(int style) ;
|
||||
|
@@ -1,5 +1,5 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: brush.h
|
||||
// Name: wx/mgl/brush.h
|
||||
// Purpose:
|
||||
// Author: Vaclav Slavik
|
||||
// Id: $Id$
|
||||
@@ -45,7 +45,7 @@ public:
|
||||
wxBitmap *GetStipple() const;
|
||||
|
||||
void SetColour(const wxColour& col);
|
||||
void SetColour(unsigned char r, unsigned char g, unsigned char b);
|
||||
void SetColour(const unsigned char r, const unsigned char g, const unsigned char b);
|
||||
void SetStyle(int style);
|
||||
void SetStipple(const wxBitmap& stipple);
|
||||
|
||||
|
@@ -40,14 +40,14 @@ public:
|
||||
bool operator != (const wxPen& pen) const;
|
||||
|
||||
void SetColour(const wxColour &colour);
|
||||
void SetColour(int red, int green, int blue);
|
||||
void SetColour(const unsigned char red, const unsigned char green, const unsigned char blue);
|
||||
void SetCap(int capStyle);
|
||||
void SetJoin(int joinStyle);
|
||||
void SetStyle(int style);
|
||||
void SetWidth(int width);
|
||||
void SetDashes(int number_of_dashes, const wxDash *dash);
|
||||
void SetStipple(const wxBitmap& stipple);
|
||||
|
||||
|
||||
wxColour &GetColour() const;
|
||||
int GetCap() const;
|
||||
int GetJoin() const;
|
||||
@@ -57,7 +57,7 @@ public:
|
||||
int GetDashCount() const;
|
||||
wxDash* GetDash() const;
|
||||
wxBitmap *GetStipple() const;
|
||||
|
||||
|
||||
bool Ok() const;
|
||||
|
||||
// implementation:
|
||||
@@ -68,7 +68,7 @@ protected:
|
||||
virtual wxObjectRefData *CreateRefData() const;
|
||||
virtual wxObjectRefData *CloneRefData(const wxObjectRefData *data) const;
|
||||
|
||||
private:
|
||||
private:
|
||||
DECLARE_DYNAMIC_CLASS(wxPen)
|
||||
};
|
||||
|
||||
|
@@ -32,7 +32,7 @@ public:
|
||||
virtual ~wxBrush();
|
||||
|
||||
virtual void SetColour(const wxColour& col);
|
||||
virtual void SetColour(unsigned char r, unsigned char g, unsigned char b);
|
||||
virtual void SetColour(const unsigned char r, const unsigned char g, const unsigned char b);
|
||||
virtual void SetStyle(int style);
|
||||
virtual void SetStipple(const wxBitmap& stipple);
|
||||
|
||||
|
@@ -1,5 +1,5 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/pen.h
|
||||
// Name: wx/msw/pen.h
|
||||
// Purpose: wxPen class
|
||||
// Author: Julian Smart
|
||||
// Modified by: Vadim Zeitlin: fixed operator=(), ==(), !=()
|
||||
@@ -102,7 +102,7 @@ public:
|
||||
|
||||
// Override in order to recreate the pen
|
||||
void SetColour(const wxColour& col);
|
||||
void SetColour(unsigned char r, unsigned char g, unsigned char b);
|
||||
void SetColour(const unsigned char r, const unsigned char g, const unsigned char b);
|
||||
|
||||
void SetWidth(int width);
|
||||
void SetStyle(int style);
|
||||
@@ -138,4 +138,3 @@ private:
|
||||
};
|
||||
|
||||
#endif // _WX_PEN_H_
|
||||
|
||||
|
@@ -1,5 +1,5 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: brush.h
|
||||
// Name: wx/os2/brush.h
|
||||
// Purpose: wxBrush class
|
||||
// Author: David Webster
|
||||
// Modified by:
|
||||
@@ -27,11 +27,11 @@ public:
|
||||
~wxBrushRefData();
|
||||
|
||||
protected:
|
||||
int m_nStyle;
|
||||
wxBitmap m_vStipple ;
|
||||
wxColour m_vColour;
|
||||
WXHBRUSH m_hBrush; // in OS/2 GPI this will be the PS the pen is associated with
|
||||
AREABUNDLE m_vBundle;
|
||||
int m_nStyle;
|
||||
wxBitmap m_vStipple ;
|
||||
wxColour m_vColour;
|
||||
WXHBRUSH m_hBrush; // in OS/2 GPI this will be the PS the pen is associated with
|
||||
AREABUNDLE m_vBundle;
|
||||
};
|
||||
|
||||
#define M_BRUSHDATA ((wxBrushRefData *)m_refData)
|
||||
@@ -43,9 +43,7 @@ class WXDLLEXPORT wxBrush: public wxBrushBase
|
||||
|
||||
public:
|
||||
wxBrush();
|
||||
wxBrush( const wxColour& rCol
|
||||
,int nStyle = wxSOLID
|
||||
);
|
||||
wxBrush(const wxColour& rCol, int nStyle = wxSOLID);
|
||||
wxBrush(const wxBitmap& rStipple);
|
||||
inline wxBrush(const wxBrush& rBrush) { Ref(rBrush); }
|
||||
~wxBrush();
|
||||
@@ -55,10 +53,7 @@ public:
|
||||
inline bool operator != (const wxBrush& rBrush) const { return m_refData != rBrush.m_refData; }
|
||||
|
||||
virtual void SetColour(const wxColour& rColour);
|
||||
virtual void SetColour( unsigned char cRed
|
||||
,unsigned char cGreen
|
||||
,unsigned char cBrush
|
||||
);
|
||||
virtual void SetColour(const unsigned char cRed, const unsigned char cGreen, const unsigned char cBrush);
|
||||
virtual void SetPS(HPS hPS);
|
||||
virtual void SetStyle(int nStyle) ;
|
||||
virtual void SetStipple(const wxBitmap& rStipple);
|
||||
|
@@ -68,10 +68,7 @@ public:
|
||||
// Override in order to recreate the pen
|
||||
//
|
||||
void SetColour(const wxColour& rColour);
|
||||
void SetColour( unsigned char cRed
|
||||
,unsigned char cGreen
|
||||
,unsigned char cBlue
|
||||
);
|
||||
void SetColour(const unsigned char cRed, const unsigned char cGreen, const unsigned char cBlue);
|
||||
|
||||
void SetWidth(int nWidth);
|
||||
void SetStyle(int nStyle);
|
||||
@@ -100,7 +97,7 @@ public:
|
||||
// Useful helper: create the brush resource
|
||||
//
|
||||
bool RealizeResource(void);
|
||||
bool FreeResource(bool bForce = FALSE);
|
||||
bool FreeResource(bool bForce = false);
|
||||
WXHANDLE GetResourceHandle(void);
|
||||
bool IsFree(void) const;
|
||||
void Unshare(void);
|
||||
|
@@ -32,7 +32,7 @@ public:
|
||||
virtual ~wxBrush();
|
||||
|
||||
virtual void SetColour(const wxColour& col);
|
||||
virtual void SetColour(unsigned char r, unsigned char g, unsigned char b);
|
||||
virtual void SetColour(const unsigned char r, const unsigned char g, const unsigned char b);
|
||||
virtual void SetStyle(int style);
|
||||
virtual void SetStipple(const wxBitmap& stipple);
|
||||
|
||||
|
@@ -102,7 +102,7 @@ public:
|
||||
|
||||
// Override in order to recreate the pen
|
||||
void SetColour(const wxColour& col);
|
||||
void SetColour(unsigned char r, unsigned char g, unsigned char b);
|
||||
void SetColour(const unsigned char r, const unsigned char g, const unsigned char b);
|
||||
|
||||
void SetWidth(int width);
|
||||
void SetStyle(int style);
|
||||
@@ -128,7 +128,7 @@ public:
|
||||
|
||||
// Internal
|
||||
bool RealizeResource();
|
||||
bool FreeResource(bool force = FALSE);
|
||||
bool FreeResource(bool force = false);
|
||||
WXHANDLE GetResourceHandle() const;
|
||||
bool IsFree() const;
|
||||
void Unshare();
|
||||
@@ -138,4 +138,3 @@ private:
|
||||
};
|
||||
|
||||
#endif // _WX_PEN_H_
|
||||
|
||||
|
@@ -1,5 +1,5 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: brush.h
|
||||
// Name: wx/x11/brush.h
|
||||
// Purpose: wxBrush class
|
||||
// Author: Julian Smart, Robert Roebling
|
||||
// Modified by:
|
||||
@@ -48,7 +48,7 @@ public:
|
||||
wxBitmap *GetStipple() const;
|
||||
|
||||
void SetColour( const wxColour& col );
|
||||
void SetColour( unsigned char r, unsigned char g, unsigned char b );
|
||||
void SetColour( const unsigned char r, const unsigned char g, const unsigned char b );
|
||||
void SetStyle( int style );
|
||||
void SetStipple( const wxBitmap& stipple );
|
||||
|
||||
|
@@ -1,12 +1,12 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: pen.h
|
||||
// Name: wx/x11/pen.h
|
||||
// Purpose: wxPen class
|
||||
// Author: Julian Smart
|
||||
// Modified by:
|
||||
// Created: 17/09/98
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) Julian Smart
|
||||
// Licence: wxWindows licence
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_PEN_H_
|
||||
@@ -33,21 +33,21 @@ class WXDLLIMPEXP_CORE wxPen: public wxGDIObject
|
||||
{
|
||||
public:
|
||||
wxPen() { }
|
||||
|
||||
|
||||
wxPen( const wxColour &colour, int width = 1, int style = wxSOLID );
|
||||
wxPen( const wxBitmap &stipple, int width );
|
||||
~wxPen();
|
||||
|
||||
|
||||
wxPen( const wxPen& pen ) { Ref(pen); }
|
||||
wxPen& operator = ( const wxPen& pen ) { Ref(pen); return *this; }
|
||||
|
||||
|
||||
bool Ok() const { return m_refData != NULL; }
|
||||
|
||||
|
||||
bool operator == ( const wxPen& pen ) const;
|
||||
bool operator != (const wxPen& pen) const { return !(*this == pen); }
|
||||
|
||||
void SetColour( const wxColour &colour );
|
||||
void SetColour( int red, int green, int blue );
|
||||
void SetColour( const unsigned char red, const unsigned char green, const unsigned char blue );
|
||||
void SetCap( int capStyle );
|
||||
void SetJoin( int joinStyle );
|
||||
void SetStyle( int style );
|
||||
@@ -65,11 +65,11 @@ public:
|
||||
wxDash* GetDash() const;
|
||||
wxBitmap* GetStipple() const;
|
||||
|
||||
private:
|
||||
private:
|
||||
// ref counting code
|
||||
virtual wxObjectRefData *CreateRefData() const;
|
||||
virtual wxObjectRefData *CloneRefData(const wxObjectRefData *data) const;
|
||||
|
||||
|
||||
DECLARE_DYNAMIC_CLASS(wxPen)
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user