add more pure virtuals to wxBrushBase; fix the GetColour() functions to return a wxColour object and not a reference; remove from docs the non-existent SetColour(const wxString&) overloads

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@52901 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Francesco Montorsi
2008-03-28 16:47:58 +00:00
parent 1f1d2182ff
commit 231b9591aa
37 changed files with 79 additions and 75 deletions

View File

@@ -44,7 +44,14 @@ class WXDLLIMPEXP_CORE wxBrushBase: public wxGDIObject
public: public:
virtual ~wxBrushBase() { } virtual ~wxBrushBase() { }
virtual void SetColour(const wxColour& col) = 0;
virtual void SetColour(unsigned char r, unsigned char g, unsigned char b) = 0;
virtual void SetStyle(wxBrushStyle style) = 0;
virtual void SetStipple(const wxBitmap& stipple) = 0;
virtual wxColour GetColour() const = 0;
virtual wxBrushStyle GetStyle() const = 0; virtual wxBrushStyle GetStyle() const = 0;
virtual wxBitmap *GetStipple() const = 0;
virtual bool IsHatch() const virtual bool IsHatch() const
{ return (GetStyle()>=wxBRUSHSTYLE_FIRST_HATCH) && (GetStyle()<=wxBRUSHSTYLE_LAST_HATCH); } { return (GetStyle()>=wxBRUSHSTYLE_FIRST_HATCH) && (GetStyle()<=wxBRUSHSTYLE_LAST_HATCH); }

View File

@@ -46,7 +46,7 @@ public:
void SetJoin(wxPenJoin join); void SetJoin(wxPenJoin join);
void SetCap(wxPenCap cap); void SetCap(wxPenCap cap);
wxColour& GetColour() const; wxColour GetColour() const;
int GetWidth() const; int GetWidth() const;
wxPenStyle GetStyle() const; wxPenStyle GetStyle() const;
wxPenJoin GetJoin() const; wxPenJoin GetJoin() const;

View File

@@ -41,8 +41,8 @@ public:
bool operator==(const wxBrush& brush) const; bool operator==(const wxBrush& brush) const;
bool operator!=(const wxBrush& brush) const { return !(*this == brush); } bool operator!=(const wxBrush& brush) const { return !(*this == brush); }
virtual wxBrushStyle GetStyle() const; wxBrushStyle GetStyle() const;
wxColour& GetColour() const; wxColour GetColour() const;
wxBitmap *GetStipple() const; wxBitmap *GetStipple() const;
void SetColour(const wxColour& col); void SetColour(const wxColour& col);

View File

@@ -51,7 +51,7 @@ public:
void SetDashes(int number_of_dashes, const wxDash *dash); void SetDashes(int number_of_dashes, const wxDash *dash);
void SetStipple(const wxBitmap& stipple); void SetStipple(const wxBitmap& stipple);
wxColour &GetColour() const; wxColour GetColour() const;
wxPenCap GetCap() const; wxPenCap GetCap() const;
wxPenJoin GetJoin() const; wxPenJoin GetJoin() const;
wxPenStyle GetStyle() const; wxPenStyle GetStyle() const;

View File

@@ -32,8 +32,8 @@ public:
bool operator==(const wxBrush& brush) const; bool operator==(const wxBrush& brush) const;
bool operator!=(const wxBrush& brush) const { return !(*this == brush); } bool operator!=(const wxBrush& brush) const { return !(*this == brush); }
virtual wxBrushStyle GetStyle() const; wxBrushStyle GetStyle() const;
wxColour &GetColour() const; wxColour GetColour() const;
wxBitmap *GetStipple() const; wxBitmap *GetStipple() const;
void SetColour( const wxColour& col ); void SetColour( const wxColour& col );

View File

@@ -40,7 +40,7 @@ public:
void SetDashes( int number_of_dashes, const wxDash *dash ); void SetDashes( int number_of_dashes, const wxDash *dash );
void SetStipple(const wxBitmap& stipple); void SetStipple(const wxBitmap& stipple);
wxColour &GetColour() const; wxColour GetColour() const;
wxPenCap GetCap() const; wxPenCap GetCap() const;
wxPenJoin GetJoin() const; wxPenJoin GetJoin() const;
wxPenStyle GetStyle() const; wxPenStyle GetStyle() const;

View File

@@ -42,8 +42,8 @@ public:
bool operator==(const wxBrush& brush) const; bool operator==(const wxBrush& brush) const;
bool operator!=(const wxBrush& brush) const { return !(*this == brush); } bool operator!=(const wxBrush& brush) const { return !(*this == brush); }
virtual wxBrushStyle GetStyle() const; wxBrushStyle GetStyle() const;
wxColour &GetColour() const; wxColour GetColour() const;
wxBitmap *GetStipple() const; wxBitmap *GetStipple() const;
void SetColour( const wxColour& col ); void SetColour( const wxColour& col );

View File

@@ -54,7 +54,7 @@ public:
void SetDashes( int number_of_dashes, const wxDash *dash ); void SetDashes( int number_of_dashes, const wxDash *dash );
void SetStipple(const wxBitmap& stipple); void SetStipple(const wxBitmap& stipple);
wxColour &GetColour() const; wxColour GetColour() const;
wxPenCap GetCap() const; wxPenCap GetCap() const;
wxPenJoin GetJoin() const; wxPenJoin GetJoin() const;
wxPenStyle GetStyle() const; wxPenStyle GetStyle() const;

View File

@@ -38,8 +38,8 @@ public:
bool operator==(const wxBrush& brush) const; bool operator==(const wxBrush& brush) const;
bool operator!=(const wxBrush& brush) const { return !(*this == brush); } bool operator!=(const wxBrush& brush) const { return !(*this == brush); }
const wxColour& GetColour() const ; wxColour GetColour() const;
virtual wxBrushStyle GetStyle() const ; wxBrushStyle GetStyle() const ;
wxBitmap *GetStipple() const ; wxBitmap *GetStipple() const ;
protected: protected:

View File

@@ -43,7 +43,7 @@ public:
void SetJoin(wxPenJoin join) ; void SetJoin(wxPenJoin join) ;
void SetCap(wxPenCap cap) ; void SetCap(wxPenCap cap) ;
wxColour& GetColour() const ; wxColour GetColour() const ;
int GetWidth() const; int GetWidth() const;
wxPenStyle GetStyle() const; wxPenStyle GetStyle() const;
wxPenJoin GetJoin() const; wxPenJoin GetJoin() const;

View File

@@ -40,8 +40,8 @@ public:
bool operator==(const wxBrush& brush) const; bool operator==(const wxBrush& brush) const;
bool operator!=(const wxBrush& brush) const; bool operator!=(const wxBrush& brush) const;
virtual wxBrushStyle GetStyle() const; wxBrushStyle GetStyle() const;
wxColour &GetColour() const; wxColour GetColour() const;
wxBitmap *GetStipple() const; wxBitmap *GetStipple() const;
void SetColour(const wxColour& col); void SetColour(const wxColour& col);

View File

@@ -50,7 +50,7 @@ public:
void SetDashes(int number_of_dashes, const wxDash *dash); void SetDashes(int number_of_dashes, const wxDash *dash);
void SetStipple(const wxBitmap& stipple); void SetStipple(const wxBitmap& stipple);
wxColour &GetColour() const; wxColour GetColour() const;
wxPenCap GetCap() const; wxPenCap GetCap() const;
wxPenJoin GetJoin() const; wxPenJoin GetJoin() const;
wxPenStyle GetStyle() const; wxPenStyle GetStyle() const;

View File

@@ -40,7 +40,7 @@ public:
bool operator!=(const wxBrush& brush) const { return !(*this == brush); } bool operator!=(const wxBrush& brush) const { return !(*this == brush); }
wxColour GetColour() const; wxColour GetColour() const;
virtual wxBrushStyle GetStyle() const; wxBrushStyle GetStyle() const;
wxBitmap *GetStipple() const; wxBitmap *GetStipple() const;
// return the HBRUSH for this brush // return the HBRUSH for this brush

View File

@@ -45,7 +45,7 @@ public:
void SetJoin(wxPenJoin join); void SetJoin(wxPenJoin join);
void SetCap(wxPenCap cap); void SetCap(wxPenCap cap);
wxColour& GetColour() const; wxColour GetColour() const;
int GetWidth() const; int GetWidth() const;
wxPenStyle GetStyle() const; wxPenStyle GetStyle() const;
wxPenJoin GetJoin() const; wxPenJoin GetJoin() const;

View File

@@ -36,7 +36,7 @@ public:
virtual void SetStipple(const wxBitmap& rStipple); virtual void SetStipple(const wxBitmap& rStipple);
wxColour GetColour(void) const; wxColour GetColour(void) const;
virtual wxBrushStyle GetStyle(void) const; wxBrushStyle GetStyle(void) const;
wxBitmap* GetStipple(void) const; wxBitmap* GetStipple(void) const;
int GetPS(void) const; int GetPS(void) const;

View File

@@ -58,7 +58,7 @@ public:
void SetCap(wxPenCap nCap); void SetCap(wxPenCap nCap);
void SetPS(HPS hPS); void SetPS(HPS hPS);
wxColour& GetColour(void) const; wxColour GetColour(void) const;
int GetWidth(void) const; int GetWidth(void) const;
wxPenStyle GetStyle(void) const; wxPenStyle GetStyle(void) const;
wxPenJoin GetJoin(void) const; wxPenJoin GetJoin(void) const;

View File

@@ -42,7 +42,7 @@ public:
bool operator!=(const wxBrush& brush) const { return !(*this == brush); } bool operator!=(const wxBrush& brush) const { return !(*this == brush); }
wxColour GetColour() const; wxColour GetColour() const;
virtual wxBrushStyle GetStyle() const; wxBrushStyle GetStyle() const;
wxBitmap *GetStipple() const; wxBitmap *GetStipple() const;
// return the HBRUSH for this brush // return the HBRUSH for this brush

View File

@@ -77,7 +77,7 @@ public:
virtual void SetJoin(wxPenJoin join) = 0; virtual void SetJoin(wxPenJoin join) = 0;
virtual void SetCap(wxPenCap cap) = 0; virtual void SetCap(wxPenCap cap) = 0;
virtual wxColour& GetColour() const = 0; virtual wxColour GetColour() const = 0;
virtual wxBitmap *GetStipple() const = 0; virtual wxBitmap *GetStipple() const = 0;
virtual wxPenStyle GetStyle() const = 0; virtual wxPenStyle GetStyle() const = 0;
virtual wxPenJoin GetJoin() const = 0; virtual wxPenJoin GetJoin() const = 0;

View File

@@ -41,8 +41,8 @@ public:
bool operator==(const wxBrush& brush) const; bool operator==(const wxBrush& brush) const;
bool operator!=(const wxBrush& brush) const { return !(*this == brush); } bool operator!=(const wxBrush& brush) const { return !(*this == brush); }
virtual wxBrushStyle GetStyle() const; wxBrushStyle GetStyle() const;
wxColour &GetColour() const; wxColour GetColour() const;
wxBitmap *GetStipple() const; wxBitmap *GetStipple() const;
void SetColour( const wxColour& col ); void SetColour( const wxColour& col );

View File

@@ -54,7 +54,7 @@ public:
void SetDashes( int number_of_dashes, const wxDash *dash ); void SetDashes( int number_of_dashes, const wxDash *dash );
void SetStipple( const wxBitmap& stipple ); void SetStipple( const wxBitmap& stipple );
wxColour &GetColour() const; wxColour GetColour() const;
wxPenCap GetCap() const; wxPenCap GetCap() const;
wxPenJoin GetJoin() const; wxPenJoin GetJoin() const;
wxPenStyle GetStyle() const; wxPenStyle GetStyle() const;

View File

@@ -137,7 +137,7 @@ public:
@see SetColour() @see SetColour()
*/ */
wxColour& GetColour() const; virtual wxColour GetColour() const;
/** /**
Gets a pointer to the stipple bitmap. If the brush does not have a wxBRUSHSTYLE_STIPPLE Gets a pointer to the stipple bitmap. If the brush does not have a wxBRUSHSTYLE_STIPPLE
@@ -145,7 +145,7 @@ public:
@see SetStipple() @see SetStipple()
*/ */
wxBitmap* GetStipple() const; virtual wxBitmap* GetStipple() const;
/** /**
Returns the brush style, one of the ::wxBrushStyle values. Returns the brush style, one of the ::wxBrushStyle values.
@@ -174,9 +174,8 @@ public:
@see GetColour() @see GetColour()
*/ */
void SetColour(wxColour& colour); virtual void SetColour(wxColour& colour);
void SetColour(const wxString& colourName); virtual void SetColour(unsigned char red, unsigned char green, unsigned char blue);
void SetColour(unsigned char red, unsigned char green, unsigned char blue);
//@} //@}
/** /**
@@ -191,7 +190,7 @@ public:
@see wxBitmap @see wxBitmap
*/ */
void SetStipple(const wxBitmap& bitmap); virtual void SetStipple(const wxBitmap& bitmap);
/** /**
Sets the brush style. Sets the brush style.
@@ -201,7 +200,7 @@ public:
@see GetStyle() @see GetStyle()
*/ */
void SetStyle(wxBrushStyle style); virtual void SetStyle(wxBrushStyle style);
/** /**
Inequality operator. Inequality operator.

View File

@@ -199,14 +199,14 @@ public:
@see SetCap() @see SetCap()
*/ */
wxPenCap GetCap() const; virtual wxPenCap GetCap() const;
/** /**
Returns a reference to the pen colour. Returns a reference to the pen colour.
@see SetColour() @see SetColour()
*/ */
wxColour GetColour() const; virtual wxColour GetColour() const;
/** /**
Gets an array of dashes (defined as char in X, DWORD under Windows). Gets an array of dashes (defined as char in X, DWORD under Windows).
@@ -216,7 +216,7 @@ public:
@see SetDashes() @see SetDashes()
*/ */
int GetDashes(wxDash** dashes) const; virtual int GetDashes(wxDash** dashes) const;
/** /**
Returns the pen join style, which may be one of @b wxJOIN_BEVEL, @b Returns the pen join style, which may be one of @b wxJOIN_BEVEL, @b
@@ -225,28 +225,28 @@ public:
@see SetJoin() @see SetJoin()
*/ */
wxPenJoin GetJoin() const; virtual wxPenJoin GetJoin() const;
/** /**
Gets a pointer to the stipple bitmap. Gets a pointer to the stipple bitmap.
@see SetStipple() @see SetStipple()
*/ */
wxBitmap* GetStipple() const; virtual wxBitmap* GetStipple() const;
/** /**
Returns the pen style. Returns the pen style.
@see wxPen(), SetStyle() @see wxPen(), SetStyle()
*/ */
wxPenStyle GetStyle() const; virtual wxPenStyle GetStyle() const;
/** /**
Returns the pen width. Returns the pen width.
@see SetWidth() @see SetWidth()
*/ */
int GetWidth() const; virtual int GetWidth() const;
/** /**
Returns @true if the pen is initialised. Returns @true if the pen is initialised.
@@ -260,7 +260,7 @@ public:
@see GetCap() @see GetCap()
*/ */
void SetCap(wxPenCap capStyle); virtual void SetCap(wxPenCap capStyle);
//@{ //@{
/** /**
@@ -268,10 +268,8 @@ public:
@see GetColour() @see GetColour()
*/ */
void SetColour(wxColour& colour); virtual void SetColour(wxColour& colour);
void SetColour(const wxString& colourName); virtual void SetColour(unsigned char red, unsigned char green, unsigned char blue);
void SetColour(unsigned char red, unsigned char green,
unsigned char blue);
//@} //@}
/** /**
@@ -283,7 +281,7 @@ public:
@see GetDashes() @see GetDashes()
*/ */
void SetDashes(int n, wxDash* dashes); virtual void SetDashes(int n, wxDash* dashes);
/** /**
Sets the pen join style, which may be one of @b wxJOIN_BEVEL, @b wxJOIN_ROUND Sets the pen join style, which may be one of @b wxJOIN_BEVEL, @b wxJOIN_ROUND
@@ -292,28 +290,28 @@ public:
@see GetJoin() @see GetJoin()
*/ */
void SetJoin(wxPenJoin join_style); virtual void SetJoin(wxPenJoin join_style);
/** /**
Sets the bitmap for stippling. Sets the bitmap for stippling.
@see GetStipple() @see GetStipple()
*/ */
void SetStipple(wxBitmap* stipple); virtual void SetStipple(wxBitmap* stipple);
/** /**
Set the pen style. Set the pen style.
@see wxPen() @see wxPen()
*/ */
void SetStyle(wxPenStyle style); virtual void SetStyle(wxPenStyle style);
/** /**
Sets the pen width. Sets the pen width.
@see GetWidth() @see GetWidth()
*/ */
void SetWidth(int width); virtual void SetWidth(int width);
/** /**
Inequality operator. Inequality operator.
@@ -336,57 +334,57 @@ public:
}; };
/** /**
FIXME An empty pen.
*/ */
wxPen wxNullPen; wxPen wxNullPen;
/** /**
FIXME Red pen.
*/ */
wxPen wxRED_PEN; wxPen wxRED_PEN;
/** /**
FIXME Cyan pen.
*/ */
wxPen wxCYAN_PEN; wxPen wxCYAN_PEN;
/** /**
FIXME Green pen.
*/ */
wxPen wxGREEN_PEN; wxPen wxGREEN_PEN;
/** /**
FIXME Black pen.
*/ */
wxPen wxBLACK_PEN; wxPen wxBLACK_PEN;
/** /**
FIXME White pen.
*/ */
wxPen wxWHITE_PEN; wxPen wxWHITE_PEN;
/** /**
FIXME Transparent pen.
*/ */
wxPen wxTRANSPARENT_PEN; wxPen wxTRANSPARENT_PEN;
/** /**
FIXME Black dashed pen.
*/ */
wxPen wxBLACK_DASHED_PEN; wxPen wxBLACK_DASHED_PEN;
/** /**
FIXME Grey pen.
*/ */
wxPen wxGREY_PEN; wxPen wxGREY_PEN;
/** /**
FIXME Medium-grey pen.
*/ */
wxPen wxMEDIUM_GREY_PEN; wxPen wxMEDIUM_GREY_PEN;
/** /**
FIXME Light-grey pen.
*/ */
wxPen wxLIGHT_GREY_PEN; wxPen wxLIGHT_GREY_PEN;

View File

@@ -327,7 +327,7 @@ void wxPen::SetStipple(const wxBitmap& Stipple)
M_PENDATA->SetStipple(Stipple); M_PENDATA->SetStipple(Stipple);
} }
wxColour& wxPen::GetColour() const wxColour wxPen::GetColour() const
{ {
return (M_PENDATA ? M_PENDATA->m_colour : wxNullColour); return (M_PENDATA ? M_PENDATA->m_colour : wxNullColour);
} }

View File

@@ -96,7 +96,7 @@ wxBrushStyle wxBrush::GetStyle() const
return M_BRUSHDATA->m_style; return M_BRUSHDATA->m_style;
} }
wxColour& wxBrush::GetColour() const wxColour wxBrush::GetColour() const
{ {
wxCHECK_MSG( Ok(), wxNullColour, _T("invalid brush") ); wxCHECK_MSG( Ok(), wxNullColour, _T("invalid brush") );

View File

@@ -183,7 +183,7 @@ int wxPen::GetWidth() const
return 1; return 1;
} }
wxColour &wxPen::GetColour() const wxColour wxPen::GetColour() const
{ {
wxCHECK_MSG( Ok(), wxNullColour, wxT("invalid pen") ); wxCHECK_MSG( Ok(), wxNullColour, wxT("invalid pen") );

View File

@@ -109,7 +109,7 @@ wxBrushStyle wxBrush::GetStyle() const
return M_BRUSHDATA->m_style; return M_BRUSHDATA->m_style;
} }
wxColour &wxBrush::GetColour() const wxColour wxBrush::GetColour() const
{ {
wxCHECK_MSG( Ok(), wxNullColour, _T("invalid brush") ); wxCHECK_MSG( Ok(), wxNullColour, _T("invalid brush") );

View File

@@ -230,7 +230,7 @@ int wxPen::GetWidth() const
return M_PENDATA->m_width; return M_PENDATA->m_width;
} }
wxColour &wxPen::GetColour() const wxColour wxPen::GetColour() const
{ {
wxCHECK_MSG( Ok(), wxNullColour, wxT("invalid pen") ); wxCHECK_MSG( Ok(), wxNullColour, wxT("invalid pen") );

View File

@@ -116,7 +116,7 @@ wxBrushStyle wxBrush::GetStyle() const
return M_BRUSHDATA->m_style; return M_BRUSHDATA->m_style;
} }
wxColour &wxBrush::GetColour() const wxColour wxBrush::GetColour() const
{ {
wxCHECK_MSG( Ok(), wxNullColour, _T("invalid brush") ); wxCHECK_MSG( Ok(), wxNullColour, _T("invalid brush") );

View File

@@ -230,7 +230,7 @@ int wxPen::GetWidth() const
return M_PENDATA->m_width; return M_PENDATA->m_width;
} }
wxColour &wxPen::GetColour() const wxColour wxPen::GetColour() const
{ {
wxCHECK_MSG( Ok(), wxNullColour, wxT("invalid pen") ); wxCHECK_MSG( Ok(), wxNullColour, wxT("invalid pen") );

View File

@@ -138,7 +138,7 @@ wxGDIRefData *wxBrush::CloneGDIRefData(const wxGDIRefData *data) const
// wxBrush accessors // wxBrush accessors
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
const wxColour& wxBrush::GetColour() const wxColour wxBrush::GetColour() const
{ {
wxCHECK_MSG( Ok(), wxNullColour, _T("invalid brush") ); wxCHECK_MSG( Ok(), wxNullColour, _T("invalid brush") );

View File

@@ -162,7 +162,7 @@ bool wxPen::operator==(const wxPen& pen) const
return m_refData ? penData && *M_PENDATA == *penData : !penData; return m_refData ? penData && *M_PENDATA == *penData : !penData;
} }
wxColour& wxPen::GetColour() const wxColour wxPen::GetColour() const
{ {
wxCHECK_MSG( Ok(), wxNullColour, wxT("invalid pen") ); wxCHECK_MSG( Ok(), wxNullColour, wxT("invalid pen") );

View File

@@ -182,7 +182,7 @@ wxBrushStyle wxBrush::GetStyle() const
return M_BRUSHDATA->m_style; return M_BRUSHDATA->m_style;
} }
wxColour &wxBrush::GetColour() const wxColour wxBrush::GetColour() const
{ {
wxCHECK_MSG( Ok(), wxNullColour, _T("invalid brush") ); wxCHECK_MSG( Ok(), wxNullColour, _T("invalid brush") );

View File

@@ -251,7 +251,7 @@ int wxPen::GetWidth() const
return M_PENDATA->m_width; return M_PENDATA->m_width;
} }
wxColour &wxPen::GetColour() const wxColour wxPen::GetColour() const
{ {
wxCHECK_MSG( Ok(), wxNullColour, wxT("invalid pen") ); wxCHECK_MSG( Ok(), wxNullColour, wxT("invalid pen") );

View File

@@ -540,7 +540,7 @@ void wxPen::SetCap(wxPenCap cap)
M_PENDATA->SetCap(cap); M_PENDATA->SetCap(cap);
} }
wxColour& wxPen::GetColour() const wxColour wxPen::GetColour() const
{ {
wxCHECK_MSG( Ok(), wxNullColour, wxT("invalid pen") ); wxCHECK_MSG( Ok(), wxNullColour, wxT("invalid pen") );

View File

@@ -479,7 +479,7 @@ void wxPen::SetCap(
RealizeResource(); RealizeResource();
} // end of wxPen::SetCap } // end of wxPen::SetCap
wxColour& wxPen::GetColour() const wxColour wxPen::GetColour() const
{ {
wxCHECK_MSG( Ok(), wxNullColour, wxT("invalid pen") ); wxCHECK_MSG( Ok(), wxNullColour, wxT("invalid pen") );

View File

@@ -117,7 +117,7 @@ wxBrushStyle wxBrush::GetStyle() const
return M_BRUSHDATA->m_style; return M_BRUSHDATA->m_style;
} }
wxColour &wxBrush::GetColour() const wxColour wxBrush::GetColour() const
{ {
wxCHECK_MSG( Ok(), wxNullColour, _T("invalid brush") ); wxCHECK_MSG( Ok(), wxNullColour, _T("invalid brush") );

View File

@@ -223,7 +223,7 @@ int wxPen::GetWidth() const
return M_PENDATA->m_width; return M_PENDATA->m_width;
} }
wxColour &wxPen::GetColour() const wxColour wxPen::GetColour() const
{ {
wxCHECK_MSG( Ok(), wxNullColour, wxT("invalid pen") ); wxCHECK_MSG( Ok(), wxNullColour, wxT("invalid pen") );