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,3 +1,14 @@
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
%% Name: pen.tex
|
||||
%% Purpose: wxPen docs
|
||||
%% Author:
|
||||
%% Modified by:
|
||||
%% Created:
|
||||
%% RCS-ID: $Id$
|
||||
%% Copyright: (c) wxWidgets
|
||||
%% License: wxWindows license
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
|
||||
\section{\class{wxPen}}\label{wxpen}
|
||||
|
||||
A pen is a drawing tool for drawing outlines. It is used for drawing
|
||||
@@ -251,7 +262,7 @@ Sets the pen cap style, which may be one of {\bf wxCAP\_ROUND}, {\bf wxCAP\_PROJ
|
||||
|
||||
\func{void}{SetColour}{\param{const wxString\& }{colourName}}
|
||||
|
||||
\func{void}{SetColour}{\param{int}{ red}, \param{int}{ green}, \param{int}{ blue}}
|
||||
\func{void}{SetColour}{\param{const unsigned char}{ red}, \param{const unsigned char}{ green}, \param{const unsigned char}{ blue}}
|
||||
|
||||
The pen's colour is changed to the given colour.
|
||||
|
||||
@@ -412,5 +423,3 @@ to the pen list, and returns it.
|
||||
\func{void}{RemovePen}{\param{wxPen*}{ pen}}
|
||||
|
||||
Used by wxWidgets to remove a pen from the list.
|
||||
|
||||
|
||||
|
@@ -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:
|
||||
@@ -40,7 +40,7 @@ public:
|
||||
// Implementation
|
||||
// ------------------------------------------------------------------------
|
||||
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) ;
|
||||
|
||||
|
@@ -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 );
|
||||
|
||||
|
@@ -51,7 +51,7 @@ public:
|
||||
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 );
|
||||
|
@@ -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 );
|
||||
|
||||
|
@@ -51,7 +51,7 @@ public:
|
||||
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 );
|
||||
|
@@ -1,5 +1,5 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: brush.h
|
||||
// Name: wx/mac/carbon/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 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,7 +40,7 @@ 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);
|
||||
|
@@ -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:
|
||||
@@ -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,5 +1,5 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: pen.h
|
||||
// Name: wx/x11/pen.h
|
||||
// Purpose: wxPen class
|
||||
// Author: Julian Smart
|
||||
// Modified by:
|
||||
@@ -47,7 +47,7 @@ public:
|
||||
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 );
|
||||
|
@@ -173,7 +173,7 @@ void wxBrush::SetColour(const wxColour& col)
|
||||
M_BRUSHDATA->SetColour(col);
|
||||
}
|
||||
|
||||
void wxBrush::SetColour(unsigned char r, unsigned char g, unsigned char b)
|
||||
void wxBrush::SetColour(const unsigned char r, const unsigned char g, const unsigned char b)
|
||||
{
|
||||
AllocExclusive();
|
||||
M_BRUSHDATA->SetColour(wxColour(r,g,b));
|
||||
@@ -215,4 +215,3 @@ WX_NSColor wxBrush::GetNSColor()
|
||||
return [NSColor clearColor];
|
||||
return M_BRUSHDATA->GetNSColor();
|
||||
}
|
||||
|
||||
|
@@ -303,7 +303,7 @@ void wxPen::SetColour(const wxColour& col)
|
||||
M_PENDATA->SetColour(col);
|
||||
}
|
||||
|
||||
void wxPen::SetColour(unsigned char r, unsigned char g, unsigned char b)
|
||||
void wxPen::SetColour(const unsigned char r, const unsigned char g, const unsigned char b)
|
||||
{
|
||||
AllocExclusive();
|
||||
M_PENDATA->SetColour(wxColour(r, g, b));
|
||||
@@ -369,4 +369,3 @@ int wxPen::GetCocoaLineDash(const float **pattern)
|
||||
*pattern = NULL;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@@ -90,9 +90,9 @@ wxObjectRefData *wxBrush::CloneRefData(const wxObjectRefData *data) const
|
||||
|
||||
bool wxBrush::operator == ( const wxBrush& brush ) const
|
||||
{
|
||||
if (m_refData == brush.m_refData) return TRUE;
|
||||
if (m_refData == brush.m_refData) return true;
|
||||
|
||||
if (!m_refData || !brush.m_refData) return FALSE;
|
||||
if (!m_refData || !brush.m_refData) return false;
|
||||
|
||||
return ( *(wxBrushRefData*)m_refData == *(wxBrushRefData*)brush.m_refData );
|
||||
}
|
||||
@@ -137,7 +137,7 @@ void wxBrush::SetColour( const wxColour& col )
|
||||
M_BRUSHDATA->m_colour = col;
|
||||
}
|
||||
|
||||
void wxBrush::SetColour( unsigned char r, unsigned char g, unsigned char b )
|
||||
void wxBrush::SetColour( const unsigned char r, const unsigned char g, const unsigned char b )
|
||||
{
|
||||
AllocExclusive();
|
||||
|
||||
@@ -165,4 +165,3 @@ void wxBrush::SetStipple( const wxBitmap& stipple )
|
||||
M_BRUSHDATA->m_style = wxSTIPPLE;
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -1,5 +1,5 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: pen.cpp
|
||||
// Name: src/gtk/pen.cpp
|
||||
// Purpose:
|
||||
// Author: Robert Roebling
|
||||
// Id: $Id$
|
||||
@@ -47,19 +47,19 @@ public:
|
||||
bool operator == (const wxPenRefData& data) const
|
||||
{
|
||||
if ( m_countDashes != data.m_countDashes )
|
||||
return FALSE;
|
||||
return false;
|
||||
|
||||
if ( m_dash )
|
||||
{
|
||||
if ( !data.m_dash ||
|
||||
memcmp(m_dash, data.m_dash, m_countDashes*sizeof(wxGTKDash)) )
|
||||
{
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
else if ( data.m_dash )
|
||||
{
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -110,9 +110,9 @@ wxObjectRefData *wxPen::CloneRefData(const wxObjectRefData *data) const
|
||||
|
||||
bool wxPen::operator == ( const wxPen& pen ) const
|
||||
{
|
||||
if (m_refData == pen.m_refData) return TRUE;
|
||||
if (m_refData == pen.m_refData) return true;
|
||||
|
||||
if (!m_refData || !pen.m_refData) return FALSE;
|
||||
if (!m_refData || !pen.m_refData) return false;
|
||||
|
||||
return ( *(wxPenRefData*)m_refData == *(wxPenRefData*)pen.m_refData );
|
||||
}
|
||||
@@ -132,7 +132,7 @@ void wxPen::SetDashes( int number_of_dashes, const wxDash *dash )
|
||||
M_PENDATA->m_dash = (wxGTKDash *)dash;
|
||||
}
|
||||
|
||||
void wxPen::SetColour( int red, int green, int blue )
|
||||
void wxPen::SetColour( const unsigned char red, const unsigned char green, const unsigned char blue )
|
||||
{
|
||||
AllocExclusive();
|
||||
|
||||
@@ -217,4 +217,3 @@ wxColour &wxPen::GetColour() const
|
||||
|
||||
return M_PENDATA->m_colour;
|
||||
}
|
||||
|
||||
|
@@ -90,9 +90,9 @@ wxObjectRefData *wxBrush::CloneRefData(const wxObjectRefData *data) const
|
||||
|
||||
bool wxBrush::operator == ( const wxBrush& brush ) const
|
||||
{
|
||||
if (m_refData == brush.m_refData) return TRUE;
|
||||
if (m_refData == brush.m_refData) return true;
|
||||
|
||||
if (!m_refData || !brush.m_refData) return FALSE;
|
||||
if (!m_refData || !brush.m_refData) return false;
|
||||
|
||||
return ( *(wxBrushRefData*)m_refData == *(wxBrushRefData*)brush.m_refData );
|
||||
}
|
||||
@@ -137,7 +137,7 @@ void wxBrush::SetColour( const wxColour& col )
|
||||
M_BRUSHDATA->m_colour = col;
|
||||
}
|
||||
|
||||
void wxBrush::SetColour( unsigned char r, unsigned char g, unsigned char b )
|
||||
void wxBrush::SetColour( const unsigned char r, const unsigned char g, const unsigned char b )
|
||||
{
|
||||
AllocExclusive();
|
||||
|
||||
@@ -165,4 +165,3 @@ void wxBrush::SetStipple( const wxBitmap& stipple )
|
||||
M_BRUSHDATA->m_style = wxSTIPPLE;
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -1,5 +1,5 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: pen.cpp
|
||||
// Name: src/gtk/pen.cpp
|
||||
// Purpose:
|
||||
// Author: Robert Roebling
|
||||
// Id: $Id$
|
||||
@@ -47,19 +47,19 @@ public:
|
||||
bool operator == (const wxPenRefData& data) const
|
||||
{
|
||||
if ( m_countDashes != data.m_countDashes )
|
||||
return FALSE;
|
||||
return false;
|
||||
|
||||
if ( m_dash )
|
||||
{
|
||||
if ( !data.m_dash ||
|
||||
memcmp(m_dash, data.m_dash, m_countDashes*sizeof(wxGTKDash)) )
|
||||
{
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
else if ( data.m_dash )
|
||||
{
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -110,9 +110,9 @@ wxObjectRefData *wxPen::CloneRefData(const wxObjectRefData *data) const
|
||||
|
||||
bool wxPen::operator == ( const wxPen& pen ) const
|
||||
{
|
||||
if (m_refData == pen.m_refData) return TRUE;
|
||||
if (m_refData == pen.m_refData) return true;
|
||||
|
||||
if (!m_refData || !pen.m_refData) return FALSE;
|
||||
if (!m_refData || !pen.m_refData) return false;
|
||||
|
||||
return ( *(wxPenRefData*)m_refData == *(wxPenRefData*)pen.m_refData );
|
||||
}
|
||||
@@ -132,7 +132,7 @@ void wxPen::SetDashes( int number_of_dashes, const wxDash *dash )
|
||||
M_PENDATA->m_dash = (wxGTKDash *)dash;
|
||||
}
|
||||
|
||||
void wxPen::SetColour( int red, int green, int blue )
|
||||
void wxPen::SetColour( const unsigned char red, const unsigned char green, const unsigned char blue )
|
||||
{
|
||||
AllocExclusive();
|
||||
|
||||
@@ -217,4 +217,3 @@ wxColour &wxPen::GetColour() const
|
||||
|
||||
return M_PENDATA->m_colour;
|
||||
}
|
||||
|
||||
|
@@ -1,5 +1,5 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: brush.cpp
|
||||
// Name: src/mac/carbon/brush.cpp
|
||||
// Purpose: wxBrush
|
||||
// Author: Stefan Csomor
|
||||
// Modified by:
|
||||
@@ -129,7 +129,7 @@ void wxBrush::SetColour(const wxColour& col)
|
||||
RealizeResource();
|
||||
}
|
||||
|
||||
void wxBrush::SetColour(unsigned char r, unsigned char g, unsigned char b)
|
||||
void wxBrush::SetColour(const unsigned char r, const unsigned char g, const unsigned char b)
|
||||
{
|
||||
Unshare();
|
||||
|
||||
@@ -184,7 +184,7 @@ void wxBrush::MacSetThemeBackground(unsigned long macThemeBackground, const WXRE
|
||||
|
||||
bool wxBrush::RealizeResource()
|
||||
{
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
unsigned long wxBrush::MacGetThemeBackground( WXRECTPTR extent) const
|
||||
|
@@ -1,5 +1,5 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: pen.cpp
|
||||
// Name: src/mac/carbon/pen.cpp
|
||||
// Purpose: wxPen
|
||||
// Author: Stefan Csomor
|
||||
// Modified by:
|
||||
@@ -107,7 +107,7 @@ void wxPen::SetColour(const wxColour& col)
|
||||
RealizeResource();
|
||||
}
|
||||
|
||||
void wxPen::SetColour(unsigned char r, unsigned char g, unsigned char b)
|
||||
void wxPen::SetColour(const unsigned char r, const unsigned char g, const unsigned char b)
|
||||
{
|
||||
Unshare();
|
||||
|
||||
@@ -175,7 +175,5 @@ void wxPen::SetCap(int Cap)
|
||||
bool wxPen::RealizeResource()
|
||||
{
|
||||
// nothing to do here for mac
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
|
@@ -1,5 +1,5 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: brush.cpp
|
||||
// Name: src/mac/classic/brush.cpp
|
||||
// Purpose: wxBrush
|
||||
// Author: Stefan Csomor
|
||||
// Modified by:
|
||||
@@ -128,7 +128,7 @@ void wxBrush::SetColour(const wxColour& col)
|
||||
RealizeResource();
|
||||
}
|
||||
|
||||
void wxBrush::SetColour(unsigned char r, unsigned char g, unsigned char b)
|
||||
void wxBrush::SetColour(const unsigned char r, const unsigned char g, const unsigned char b)
|
||||
{
|
||||
Unshare();
|
||||
|
||||
@@ -180,7 +180,7 @@ void wxBrush::SetMacThemeBackground(unsigned long macThemeBackground, const WXRE
|
||||
|
||||
bool wxBrush::RealizeResource()
|
||||
{
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
unsigned long wxBrush::GetMacThemeBackground( WXRECTPTR extent) const
|
||||
|
@@ -1,5 +1,5 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: pen.cpp
|
||||
// Name: src/mac/classic/pen.cpp
|
||||
// Purpose: wxPen
|
||||
// Author: Stefan Csomor
|
||||
// Modified by:
|
||||
@@ -106,7 +106,7 @@ void wxPen::SetColour(const wxColour& col)
|
||||
RealizeResource();
|
||||
}
|
||||
|
||||
void wxPen::SetColour(unsigned char r, unsigned char g, unsigned char b)
|
||||
void wxPen::SetColour(const unsigned char r, const unsigned char g, const unsigned char b)
|
||||
{
|
||||
Unshare();
|
||||
|
||||
@@ -174,7 +174,5 @@ void wxPen::SetCap(int Cap)
|
||||
bool wxPen::RealizeResource()
|
||||
{
|
||||
// nothing to do here for mac
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
|
@@ -1,5 +1,5 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: brush.cpp
|
||||
// Name: src/mgl/brush.cpp
|
||||
// Purpose:
|
||||
// Author: Vaclav Slavik
|
||||
// Id: $Id$
|
||||
@@ -223,7 +223,7 @@ void wxBrush::SetColour(const wxColour& col)
|
||||
M_BRUSHDATA->m_colour = col;
|
||||
}
|
||||
|
||||
void wxBrush::SetColour(unsigned char r, unsigned char g, unsigned char b)
|
||||
void wxBrush::SetColour(const unsigned char r, const unsigned char g, const unsigned char b)
|
||||
{
|
||||
AllocExclusive();
|
||||
M_BRUSHDATA->m_colour.Set(r, g, b);
|
||||
@@ -262,4 +262,3 @@ wxObjectRefData *wxBrush::CloneRefData(const wxObjectRefData *data) const
|
||||
{
|
||||
return new wxBrushRefData(*(wxBrushRefData *)data);
|
||||
}
|
||||
|
||||
|
@@ -1,5 +1,5 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: pen.cpp
|
||||
// Name: src/mgl/pen.cpp
|
||||
// Purpose:
|
||||
// Author: Vaclav Slavik
|
||||
// Id: $Id$
|
||||
@@ -138,7 +138,7 @@ void wxPen::SetDashes(int number_of_dashes, const wxDash *dash)
|
||||
M_PENDATA->m_dash = (wxDash *)dash; /* TODO */
|
||||
}
|
||||
|
||||
void wxPen::SetColour(int red, int green, int blue)
|
||||
void wxPen::SetColour(const unsigned char red, const unsigned char green, const unsigned char blue)
|
||||
{
|
||||
AllocExclusive();
|
||||
M_PENDATA->m_colour.Set(red, green, blue);
|
||||
@@ -259,4 +259,3 @@ wxObjectRefData *wxPen::CloneRefData(const wxObjectRefData *data) const
|
||||
{
|
||||
return new wxPenRefData(*(wxPenRefData *)data);
|
||||
}
|
||||
|
||||
|
@@ -314,7 +314,7 @@ void wxBrush::SetColour(const wxColour& col)
|
||||
M_BRUSHDATA->SetColour(col);
|
||||
}
|
||||
|
||||
void wxBrush::SetColour(unsigned char r, unsigned char g, unsigned char b)
|
||||
void wxBrush::SetColour(const unsigned char r, const unsigned char g, const unsigned char b)
|
||||
{
|
||||
AllocExclusive();
|
||||
|
||||
@@ -334,5 +334,3 @@ void wxBrush::SetStipple(const wxBitmap& stipple)
|
||||
|
||||
M_BRUSHDATA->SetStipple(stipple);
|
||||
}
|
||||
|
||||
|
||||
|
@@ -1,5 +1,5 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: msw/pen.cpp
|
||||
// Name: src/msw/pen.cpp
|
||||
// Purpose: wxPen
|
||||
// Author: Julian Smart
|
||||
// Modified by:
|
||||
@@ -305,7 +305,7 @@ void wxPen::SetColour(const wxColour& col)
|
||||
RealizeResource();
|
||||
}
|
||||
|
||||
void wxPen::SetColour(unsigned char r, unsigned char g, unsigned char b)
|
||||
void wxPen::SetColour(const unsigned char r, const unsigned char g, const unsigned char b)
|
||||
{
|
||||
Unshare();
|
||||
|
||||
@@ -397,4 +397,3 @@ int wx2msPenStyle(int wx_style)
|
||||
#endif
|
||||
return PS_SOLID;
|
||||
}
|
||||
|
||||
|
@@ -1,5 +1,5 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: brush.cpp
|
||||
// Name: src/os2/brush.cpp
|
||||
// Purpose: wxBrush
|
||||
// Author: David Webster
|
||||
// Modified by:
|
||||
@@ -139,7 +139,7 @@ bool wxBrush::RealizeResource()
|
||||
vError = ::WinGetLastError(vHabmain);
|
||||
sError = wxPMErrorToStr(vError);
|
||||
wxLogError(_T("Unable to set current color table to RGB mode. Error: %s\n"), sError.c_str());
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
if (M_BRUSHDATA->m_nStyle==wxTRANSPARENT)
|
||||
@@ -224,7 +224,7 @@ bool wxBrush::RealizeResource()
|
||||
}
|
||||
return bOk;
|
||||
}
|
||||
return FALSE;
|
||||
return false;
|
||||
} // end of wxBrush::RealizeResource
|
||||
|
||||
WXHANDLE wxBrush::GetResourceHandle()
|
||||
@@ -241,7 +241,7 @@ bool wxBrush::FreeResource( bool WXUNUSED(bForce) )
|
||||
M_BRUSHDATA->m_hBrush = 0;
|
||||
return true;
|
||||
}
|
||||
else return FALSE;
|
||||
else return false;
|
||||
} // end of wxBrush::FreeResource
|
||||
|
||||
bool wxBrush::IsFree() const
|
||||
@@ -266,32 +266,21 @@ void wxBrush::Unshare()
|
||||
}
|
||||
} // end of wxBrush::Unshare
|
||||
|
||||
void wxBrush::SetColour(
|
||||
const wxColour& rColour
|
||||
)
|
||||
void wxBrush::SetColour( const wxColour& rColour )
|
||||
{
|
||||
Unshare();
|
||||
M_BRUSHDATA->m_vColour = rColour;
|
||||
RealizeResource();
|
||||
}
|
||||
|
||||
void wxBrush::SetColour(
|
||||
unsigned char cRed
|
||||
, unsigned char cGreen
|
||||
, unsigned char cBlue
|
||||
)
|
||||
void wxBrush::SetColour(const unsigned char cRed, const unsigned char cGreen, const unsigned char cBlue)
|
||||
{
|
||||
Unshare();
|
||||
M_BRUSHDATA->m_vColour.Set( cRed
|
||||
,cGreen
|
||||
,cBlue
|
||||
);
|
||||
M_BRUSHDATA->m_vColour.Set( cRed, cGreen, cBlue );
|
||||
RealizeResource();
|
||||
} // end of wxBrush::SetColour
|
||||
|
||||
void wxBrush::SetStyle(
|
||||
int nStyle
|
||||
)
|
||||
void wxBrush::SetStyle(int nStyle)
|
||||
{
|
||||
Unshare();
|
||||
M_BRUSHDATA->m_nStyle = nStyle;
|
||||
|
@@ -1,5 +1,5 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: pen.cpp
|
||||
// Name: src/os2/pen.cpp
|
||||
// Purpose: wxPen
|
||||
// Author: David Webster
|
||||
// Modified by:
|
||||
@@ -152,7 +152,7 @@ bool wxPen::RealizeResource()
|
||||
vError = ::WinGetLastError(vHabmain);
|
||||
sError = wxPMErrorToStr(vError);
|
||||
wxLogError(_T("Unable to set current color table to RGB mode. Error: %s\n"), sError.c_str());
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
if (M_PENDATA->m_nStyle == wxTRANSPARENT)
|
||||
{
|
||||
@@ -216,7 +216,7 @@ bool wxPen::RealizeResource()
|
||||
vError = ::WinGetLastError(vHabmain);
|
||||
sError = wxPMErrorToStr(vError);
|
||||
wxLogError(_T("Can't set Gpi attributes for a LINEBUNDLE. Error: %s\n"), sError.c_str());
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
ULONG flAttrMask = 0L;
|
||||
@@ -346,29 +346,21 @@ void wxPen::Unshare()
|
||||
}
|
||||
} // end of wxPen::Unshare
|
||||
|
||||
void wxPen::SetColour(
|
||||
const wxColour& rColour
|
||||
)
|
||||
void wxPen::SetColour( const wxColour& rColour )
|
||||
{
|
||||
Unshare();
|
||||
M_PENDATA->m_vColour = rColour;
|
||||
RealizeResource();
|
||||
} // end of wxPen::SetColour
|
||||
|
||||
void wxPen::SetColour(
|
||||
unsigned char cRed
|
||||
, unsigned char cGreen
|
||||
, unsigned char cBlue
|
||||
)
|
||||
void wxPen::SetColour( const unsigned char cRed, const unsigned char cGreen, const unsigned char cBlue)
|
||||
{
|
||||
Unshare();
|
||||
M_PENDATA->m_vColour.Set(cRed, cGreen, cBlue);
|
||||
RealizeResource();
|
||||
} // end of wxPen::SetColour
|
||||
|
||||
void wxPen::SetPS(
|
||||
HPS hPS
|
||||
)
|
||||
void wxPen::SetPS( HPS hPS )
|
||||
{
|
||||
Unshare();
|
||||
if (M_PENDATA->m_hPen)
|
||||
|
@@ -72,7 +72,7 @@ wxBrush& wxBrush::operator=(const wxBrush& brush)
|
||||
|
||||
bool wxBrush::operator==(const wxBrush& brush) const
|
||||
{
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
wxObjectRefData *wxBrush::CreateRefData() const
|
||||
@@ -117,7 +117,7 @@ void wxBrush::SetColour(const wxColour& col)
|
||||
{
|
||||
}
|
||||
|
||||
void wxBrush::SetColour(unsigned char r, unsigned char g, unsigned char b)
|
||||
void wxBrush::SetColour(const unsigned char r, const unsigned char g, const unsigned char b)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -128,5 +128,3 @@ void wxBrush::SetStyle(int style)
|
||||
void wxBrush::SetStipple(const wxBitmap& stipple)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
|
@@ -88,7 +88,7 @@ void wxPen::SetColour(const wxColour& col)
|
||||
{
|
||||
}
|
||||
|
||||
void wxPen::SetColour(unsigned char r, unsigned char g, unsigned char b)
|
||||
void wxPen::SetColour(const unsigned char r, const unsigned char g, const unsigned char b)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -115,4 +115,3 @@ void wxPen::SetJoin(int Join)
|
||||
void wxPen::SetCap(int Cap)
|
||||
{
|
||||
}
|
||||
|
||||
|
@@ -138,7 +138,7 @@ void wxBrush::SetColour( const wxColour& col )
|
||||
M_BRUSHDATA->m_colour = col;
|
||||
}
|
||||
|
||||
void wxBrush::SetColour( unsigned char r, unsigned char g, unsigned char b )
|
||||
void wxBrush::SetColour( const unsigned char r, const unsigned char g, const unsigned char b )
|
||||
{
|
||||
AllocExclusive();
|
||||
|
||||
|
@@ -122,7 +122,7 @@ void wxPen::SetDashes( int number_of_dashes, const wxDash *dash )
|
||||
M_PENDATA->m_dash = (wxX11Dash *)dash; // TODO
|
||||
}
|
||||
|
||||
void wxPen::SetColour( int red, int green, int blue )
|
||||
void wxPen::SetColour( const unsigned char red, const unsigned char green, const unsigned char blue )
|
||||
{
|
||||
AllocExclusive();
|
||||
|
||||
|
Reference in New Issue
Block a user