From 231b9591aac1d6a507aa1ecfeb5f57e720003391 Mon Sep 17 00:00:00 2001 From: Francesco Montorsi Date: Fri, 28 Mar 2008 16:47:58 +0000 Subject: [PATCH] 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 --- include/wx/brush.h | 7 +++++ include/wx/cocoa/pen.h | 2 +- include/wx/dfb/brush.h | 4 +-- include/wx/dfb/pen.h | 2 +- include/wx/gtk/brush.h | 4 +-- include/wx/gtk/pen.h | 2 +- include/wx/gtk1/brush.h | 4 +-- include/wx/gtk1/pen.h | 2 +- include/wx/mac/carbon/brush.h | 4 +-- include/wx/mac/carbon/pen.h | 2 +- include/wx/mgl/brush.h | 4 +-- include/wx/mgl/pen.h | 2 +- include/wx/msw/brush.h | 2 +- include/wx/msw/pen.h | 2 +- include/wx/os2/brush.h | 2 +- include/wx/os2/pen.h | 2 +- include/wx/palmos/brush.h | 2 +- include/wx/pen.h | 2 +- include/wx/x11/brush.h | 4 +-- include/wx/x11/pen.h | 2 +- interface/brush.h | 13 ++++----- interface/pen.h | 54 +++++++++++++++++------------------ src/cocoa/pen.mm | 2 +- src/dfb/brush.cpp | 2 +- src/dfb/pen.cpp | 2 +- src/gtk/brush.cpp | 2 +- src/gtk/pen.cpp | 2 +- src/gtk1/brush.cpp | 2 +- src/gtk1/pen.cpp | 2 +- src/mac/carbon/brush.cpp | 2 +- src/mac/carbon/pen.cpp | 2 +- src/mgl/brush.cpp | 2 +- src/mgl/pen.cpp | 2 +- src/msw/pen.cpp | 2 +- src/os2/pen.cpp | 2 +- src/x11/brush.cpp | 2 +- src/x11/pen.cpp | 2 +- 37 files changed, 79 insertions(+), 75 deletions(-) diff --git a/include/wx/brush.h b/include/wx/brush.h index 033ace1dd8..acddcd314c 100644 --- a/include/wx/brush.h +++ b/include/wx/brush.h @@ -44,7 +44,14 @@ class WXDLLIMPEXP_CORE wxBrushBase: public wxGDIObject public: 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 wxBitmap *GetStipple() const = 0; virtual bool IsHatch() const { return (GetStyle()>=wxBRUSHSTYLE_FIRST_HATCH) && (GetStyle()<=wxBRUSHSTYLE_LAST_HATCH); } diff --git a/include/wx/cocoa/pen.h b/include/wx/cocoa/pen.h index 3ee5c2f349..73f7c568f1 100644 --- a/include/wx/cocoa/pen.h +++ b/include/wx/cocoa/pen.h @@ -46,7 +46,7 @@ public: void SetJoin(wxPenJoin join); void SetCap(wxPenCap cap); - wxColour& GetColour() const; + wxColour GetColour() const; int GetWidth() const; wxPenStyle GetStyle() const; wxPenJoin GetJoin() const; diff --git a/include/wx/dfb/brush.h b/include/wx/dfb/brush.h index 0d0a46c7a5..c2360bef88 100644 --- a/include/wx/dfb/brush.h +++ b/include/wx/dfb/brush.h @@ -41,8 +41,8 @@ public: bool operator==(const wxBrush& brush) const; bool operator!=(const wxBrush& brush) const { return !(*this == brush); } - virtual wxBrushStyle GetStyle() const; - wxColour& GetColour() const; + wxBrushStyle GetStyle() const; + wxColour GetColour() const; wxBitmap *GetStipple() const; void SetColour(const wxColour& col); diff --git a/include/wx/dfb/pen.h b/include/wx/dfb/pen.h index c9906dc2ae..27fe9a9be6 100644 --- a/include/wx/dfb/pen.h +++ b/include/wx/dfb/pen.h @@ -51,7 +51,7 @@ public: void SetDashes(int number_of_dashes, const wxDash *dash); void SetStipple(const wxBitmap& stipple); - wxColour &GetColour() const; + wxColour GetColour() const; wxPenCap GetCap() const; wxPenJoin GetJoin() const; wxPenStyle GetStyle() const; diff --git a/include/wx/gtk/brush.h b/include/wx/gtk/brush.h index 190978fcd8..5c3e1d7ab6 100644 --- a/include/wx/gtk/brush.h +++ b/include/wx/gtk/brush.h @@ -32,8 +32,8 @@ public: bool operator==(const wxBrush& brush) const; bool operator!=(const wxBrush& brush) const { return !(*this == brush); } - virtual wxBrushStyle GetStyle() const; - wxColour &GetColour() const; + wxBrushStyle GetStyle() const; + wxColour GetColour() const; wxBitmap *GetStipple() const; void SetColour( const wxColour& col ); diff --git a/include/wx/gtk/pen.h b/include/wx/gtk/pen.h index 02baef3922..2af7d46048 100644 --- a/include/wx/gtk/pen.h +++ b/include/wx/gtk/pen.h @@ -40,7 +40,7 @@ public: void SetDashes( int number_of_dashes, const wxDash *dash ); void SetStipple(const wxBitmap& stipple); - wxColour &GetColour() const; + wxColour GetColour() const; wxPenCap GetCap() const; wxPenJoin GetJoin() const; wxPenStyle GetStyle() const; diff --git a/include/wx/gtk1/brush.h b/include/wx/gtk1/brush.h index 8a0001685d..c7ea67babe 100644 --- a/include/wx/gtk1/brush.h +++ b/include/wx/gtk1/brush.h @@ -42,8 +42,8 @@ public: bool operator==(const wxBrush& brush) const; bool operator!=(const wxBrush& brush) const { return !(*this == brush); } - virtual wxBrushStyle GetStyle() const; - wxColour &GetColour() const; + wxBrushStyle GetStyle() const; + wxColour GetColour() const; wxBitmap *GetStipple() const; void SetColour( const wxColour& col ); diff --git a/include/wx/gtk1/pen.h b/include/wx/gtk1/pen.h index b54de75a51..887a77951c 100644 --- a/include/wx/gtk1/pen.h +++ b/include/wx/gtk1/pen.h @@ -54,7 +54,7 @@ public: void SetDashes( int number_of_dashes, const wxDash *dash ); void SetStipple(const wxBitmap& stipple); - wxColour &GetColour() const; + wxColour GetColour() const; wxPenCap GetCap() const; wxPenJoin GetJoin() const; wxPenStyle GetStyle() const; diff --git a/include/wx/mac/carbon/brush.h b/include/wx/mac/carbon/brush.h index c59a4af24f..0d4d1c5586 100644 --- a/include/wx/mac/carbon/brush.h +++ b/include/wx/mac/carbon/brush.h @@ -38,8 +38,8 @@ public: bool operator==(const wxBrush& brush) const; bool operator!=(const wxBrush& brush) const { return !(*this == brush); } - const wxColour& GetColour() const ; - virtual wxBrushStyle GetStyle() const ; + wxColour GetColour() const; + wxBrushStyle GetStyle() const ; wxBitmap *GetStipple() const ; protected: diff --git a/include/wx/mac/carbon/pen.h b/include/wx/mac/carbon/pen.h index 13332a3077..3807aa523e 100644 --- a/include/wx/mac/carbon/pen.h +++ b/include/wx/mac/carbon/pen.h @@ -43,7 +43,7 @@ public: void SetJoin(wxPenJoin join) ; void SetCap(wxPenCap cap) ; - wxColour& GetColour() const ; + wxColour GetColour() const ; int GetWidth() const; wxPenStyle GetStyle() const; wxPenJoin GetJoin() const; diff --git a/include/wx/mgl/brush.h b/include/wx/mgl/brush.h index 27d2d0a605..6dd2b763a6 100644 --- a/include/wx/mgl/brush.h +++ b/include/wx/mgl/brush.h @@ -40,8 +40,8 @@ public: bool operator==(const wxBrush& brush) const; bool operator!=(const wxBrush& brush) const; - virtual wxBrushStyle GetStyle() const; - wxColour &GetColour() const; + wxBrushStyle GetStyle() const; + wxColour GetColour() const; wxBitmap *GetStipple() const; void SetColour(const wxColour& col); diff --git a/include/wx/mgl/pen.h b/include/wx/mgl/pen.h index 3be08b3293..cd7188c465 100644 --- a/include/wx/mgl/pen.h +++ b/include/wx/mgl/pen.h @@ -50,7 +50,7 @@ public: void SetDashes(int number_of_dashes, const wxDash *dash); void SetStipple(const wxBitmap& stipple); - wxColour &GetColour() const; + wxColour GetColour() const; wxPenCap GetCap() const; wxPenJoin GetJoin() const; wxPenStyle GetStyle() const; diff --git a/include/wx/msw/brush.h b/include/wx/msw/brush.h index 945b13c80a..3d1c7e3ae1 100644 --- a/include/wx/msw/brush.h +++ b/include/wx/msw/brush.h @@ -40,7 +40,7 @@ public: bool operator!=(const wxBrush& brush) const { return !(*this == brush); } wxColour GetColour() const; - virtual wxBrushStyle GetStyle() const; + wxBrushStyle GetStyle() const; wxBitmap *GetStipple() const; // return the HBRUSH for this brush diff --git a/include/wx/msw/pen.h b/include/wx/msw/pen.h index 412281e08b..0cff049e87 100644 --- a/include/wx/msw/pen.h +++ b/include/wx/msw/pen.h @@ -45,7 +45,7 @@ public: void SetJoin(wxPenJoin join); void SetCap(wxPenCap cap); - wxColour& GetColour() const; + wxColour GetColour() const; int GetWidth() const; wxPenStyle GetStyle() const; wxPenJoin GetJoin() const; diff --git a/include/wx/os2/brush.h b/include/wx/os2/brush.h index a7326041fd..c3dcfe85a3 100644 --- a/include/wx/os2/brush.h +++ b/include/wx/os2/brush.h @@ -36,7 +36,7 @@ public: virtual void SetStipple(const wxBitmap& rStipple); wxColour GetColour(void) const; - virtual wxBrushStyle GetStyle(void) const; + wxBrushStyle GetStyle(void) const; wxBitmap* GetStipple(void) const; int GetPS(void) const; diff --git a/include/wx/os2/pen.h b/include/wx/os2/pen.h index dfcdb9f12f..f05f6382f6 100644 --- a/include/wx/os2/pen.h +++ b/include/wx/os2/pen.h @@ -58,7 +58,7 @@ public: void SetCap(wxPenCap nCap); void SetPS(HPS hPS); - wxColour& GetColour(void) const; + wxColour GetColour(void) const; int GetWidth(void) const; wxPenStyle GetStyle(void) const; wxPenJoin GetJoin(void) const; diff --git a/include/wx/palmos/brush.h b/include/wx/palmos/brush.h index 4d65402d49..ba55d5bad7 100644 --- a/include/wx/palmos/brush.h +++ b/include/wx/palmos/brush.h @@ -42,7 +42,7 @@ public: bool operator!=(const wxBrush& brush) const { return !(*this == brush); } wxColour GetColour() const; - virtual wxBrushStyle GetStyle() const; + wxBrushStyle GetStyle() const; wxBitmap *GetStipple() const; // return the HBRUSH for this brush diff --git a/include/wx/pen.h b/include/wx/pen.h index 379f560c44..36c2bd1f7a 100644 --- a/include/wx/pen.h +++ b/include/wx/pen.h @@ -77,7 +77,7 @@ public: virtual void SetJoin(wxPenJoin join) = 0; virtual void SetCap(wxPenCap cap) = 0; - virtual wxColour& GetColour() const = 0; + virtual wxColour GetColour() const = 0; virtual wxBitmap *GetStipple() const = 0; virtual wxPenStyle GetStyle() const = 0; virtual wxPenJoin GetJoin() const = 0; diff --git a/include/wx/x11/brush.h b/include/wx/x11/brush.h index b2e6627651..1ca87cab93 100644 --- a/include/wx/x11/brush.h +++ b/include/wx/x11/brush.h @@ -41,8 +41,8 @@ public: bool operator==(const wxBrush& brush) const; bool operator!=(const wxBrush& brush) const { return !(*this == brush); } - virtual wxBrushStyle GetStyle() const; - wxColour &GetColour() const; + wxBrushStyle GetStyle() const; + wxColour GetColour() const; wxBitmap *GetStipple() const; void SetColour( const wxColour& col ); diff --git a/include/wx/x11/pen.h b/include/wx/x11/pen.h index fd2e6ad4db..9e77f0daa0 100644 --- a/include/wx/x11/pen.h +++ b/include/wx/x11/pen.h @@ -54,7 +54,7 @@ public: void SetDashes( int number_of_dashes, const wxDash *dash ); void SetStipple( const wxBitmap& stipple ); - wxColour &GetColour() const; + wxColour GetColour() const; wxPenCap GetCap() const; wxPenJoin GetJoin() const; wxPenStyle GetStyle() const; diff --git a/interface/brush.h b/interface/brush.h index edf7beb6f8..f98b98525f 100644 --- a/interface/brush.h +++ b/interface/brush.h @@ -137,7 +137,7 @@ public: @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 @@ -145,7 +145,7 @@ public: @see SetStipple() */ - wxBitmap* GetStipple() const; + virtual wxBitmap* GetStipple() const; /** Returns the brush style, one of the ::wxBrushStyle values. @@ -174,9 +174,8 @@ public: @see GetColour() */ - void SetColour(wxColour& colour); - void SetColour(const wxString& colourName); - void SetColour(unsigned char red, unsigned char green, unsigned char blue); + virtual void SetColour(wxColour& colour); + virtual void SetColour(unsigned char red, unsigned char green, unsigned char blue); //@} /** @@ -191,7 +190,7 @@ public: @see wxBitmap */ - void SetStipple(const wxBitmap& bitmap); + virtual void SetStipple(const wxBitmap& bitmap); /** Sets the brush style. @@ -201,7 +200,7 @@ public: @see GetStyle() */ - void SetStyle(wxBrushStyle style); + virtual void SetStyle(wxBrushStyle style); /** Inequality operator. diff --git a/interface/pen.h b/interface/pen.h index 9f27ffa835..a8877df3e2 100644 --- a/interface/pen.h +++ b/interface/pen.h @@ -199,14 +199,14 @@ public: @see SetCap() */ - wxPenCap GetCap() const; + virtual wxPenCap GetCap() const; /** Returns a reference to the pen colour. @see SetColour() */ - wxColour GetColour() const; + virtual wxColour GetColour() const; /** Gets an array of dashes (defined as char in X, DWORD under Windows). @@ -216,7 +216,7 @@ public: @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 @@ -225,28 +225,28 @@ public: @see SetJoin() */ - wxPenJoin GetJoin() const; + virtual wxPenJoin GetJoin() const; /** Gets a pointer to the stipple bitmap. @see SetStipple() */ - wxBitmap* GetStipple() const; + virtual wxBitmap* GetStipple() const; /** Returns the pen style. @see wxPen(), SetStyle() */ - wxPenStyle GetStyle() const; + virtual wxPenStyle GetStyle() const; /** Returns the pen width. @see SetWidth() */ - int GetWidth() const; + virtual int GetWidth() const; /** Returns @true if the pen is initialised. @@ -260,7 +260,7 @@ public: @see GetCap() */ - void SetCap(wxPenCap capStyle); + virtual void SetCap(wxPenCap capStyle); //@{ /** @@ -268,10 +268,8 @@ public: @see GetColour() */ - void SetColour(wxColour& colour); - void SetColour(const wxString& colourName); - void SetColour(unsigned char red, unsigned char green, - unsigned char blue); + virtual void SetColour(wxColour& colour); + virtual void SetColour(unsigned char red, unsigned char green, unsigned char blue); //@} /** @@ -283,7 +281,7 @@ public: @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 @@ -292,28 +290,28 @@ public: @see GetJoin() */ - void SetJoin(wxPenJoin join_style); + virtual void SetJoin(wxPenJoin join_style); /** Sets the bitmap for stippling. @see GetStipple() */ - void SetStipple(wxBitmap* stipple); + virtual void SetStipple(wxBitmap* stipple); /** Set the pen style. @see wxPen() */ - void SetStyle(wxPenStyle style); + virtual void SetStyle(wxPenStyle style); /** Sets the pen width. @see GetWidth() */ - void SetWidth(int width); + virtual void SetWidth(int width); /** Inequality operator. @@ -336,57 +334,57 @@ public: }; /** - FIXME + An empty pen. */ wxPen wxNullPen; /** - FIXME + Red pen. */ wxPen wxRED_PEN; /** - FIXME + Cyan pen. */ wxPen wxCYAN_PEN; /** - FIXME + Green pen. */ wxPen wxGREEN_PEN; /** - FIXME + Black pen. */ wxPen wxBLACK_PEN; /** - FIXME + White pen. */ wxPen wxWHITE_PEN; /** - FIXME + Transparent pen. */ wxPen wxTRANSPARENT_PEN; /** - FIXME + Black dashed pen. */ wxPen wxBLACK_DASHED_PEN; /** - FIXME + Grey pen. */ wxPen wxGREY_PEN; /** - FIXME + Medium-grey pen. */ wxPen wxMEDIUM_GREY_PEN; /** - FIXME + Light-grey pen. */ wxPen wxLIGHT_GREY_PEN; diff --git a/src/cocoa/pen.mm b/src/cocoa/pen.mm index d94b138c1a..0f08a1dc3e 100644 --- a/src/cocoa/pen.mm +++ b/src/cocoa/pen.mm @@ -327,7 +327,7 @@ void wxPen::SetStipple(const wxBitmap& Stipple) M_PENDATA->SetStipple(Stipple); } -wxColour& wxPen::GetColour() const +wxColour wxPen::GetColour() const { return (M_PENDATA ? M_PENDATA->m_colour : wxNullColour); } diff --git a/src/dfb/brush.cpp b/src/dfb/brush.cpp index efbd60cbbc..b4e4d058c0 100644 --- a/src/dfb/brush.cpp +++ b/src/dfb/brush.cpp @@ -96,7 +96,7 @@ wxBrushStyle wxBrush::GetStyle() const return M_BRUSHDATA->m_style; } -wxColour& wxBrush::GetColour() const +wxColour wxBrush::GetColour() const { wxCHECK_MSG( Ok(), wxNullColour, _T("invalid brush") ); diff --git a/src/dfb/pen.cpp b/src/dfb/pen.cpp index c71488b587..4db8f6df55 100644 --- a/src/dfb/pen.cpp +++ b/src/dfb/pen.cpp @@ -183,7 +183,7 @@ int wxPen::GetWidth() const return 1; } -wxColour &wxPen::GetColour() const +wxColour wxPen::GetColour() const { wxCHECK_MSG( Ok(), wxNullColour, wxT("invalid pen") ); diff --git a/src/gtk/brush.cpp b/src/gtk/brush.cpp index a1a29fc190..c0d8490553 100644 --- a/src/gtk/brush.cpp +++ b/src/gtk/brush.cpp @@ -109,7 +109,7 @@ wxBrushStyle wxBrush::GetStyle() const return M_BRUSHDATA->m_style; } -wxColour &wxBrush::GetColour() const +wxColour wxBrush::GetColour() const { wxCHECK_MSG( Ok(), wxNullColour, _T("invalid brush") ); diff --git a/src/gtk/pen.cpp b/src/gtk/pen.cpp index 2e38df095b..06c0d8c1ed 100644 --- a/src/gtk/pen.cpp +++ b/src/gtk/pen.cpp @@ -230,7 +230,7 @@ int wxPen::GetWidth() const return M_PENDATA->m_width; } -wxColour &wxPen::GetColour() const +wxColour wxPen::GetColour() const { wxCHECK_MSG( Ok(), wxNullColour, wxT("invalid pen") ); diff --git a/src/gtk1/brush.cpp b/src/gtk1/brush.cpp index b8dfff4351..eb5606cfea 100644 --- a/src/gtk1/brush.cpp +++ b/src/gtk1/brush.cpp @@ -116,7 +116,7 @@ wxBrushStyle wxBrush::GetStyle() const return M_BRUSHDATA->m_style; } -wxColour &wxBrush::GetColour() const +wxColour wxBrush::GetColour() const { wxCHECK_MSG( Ok(), wxNullColour, _T("invalid brush") ); diff --git a/src/gtk1/pen.cpp b/src/gtk1/pen.cpp index e7202df6e7..2ca4c94bd7 100644 --- a/src/gtk1/pen.cpp +++ b/src/gtk1/pen.cpp @@ -230,7 +230,7 @@ int wxPen::GetWidth() const return M_PENDATA->m_width; } -wxColour &wxPen::GetColour() const +wxColour wxPen::GetColour() const { wxCHECK_MSG( Ok(), wxNullColour, wxT("invalid pen") ); diff --git a/src/mac/carbon/brush.cpp b/src/mac/carbon/brush.cpp index 46132211be..84dd60d6e9 100644 --- a/src/mac/carbon/brush.cpp +++ b/src/mac/carbon/brush.cpp @@ -138,7 +138,7 @@ wxGDIRefData *wxBrush::CloneGDIRefData(const wxGDIRefData *data) const // wxBrush accessors // ---------------------------------------------------------------------------- -const wxColour& wxBrush::GetColour() const +wxColour wxBrush::GetColour() const { wxCHECK_MSG( Ok(), wxNullColour, _T("invalid brush") ); diff --git a/src/mac/carbon/pen.cpp b/src/mac/carbon/pen.cpp index 8d6461dd97..260f1abc82 100644 --- a/src/mac/carbon/pen.cpp +++ b/src/mac/carbon/pen.cpp @@ -162,7 +162,7 @@ bool wxPen::operator==(const wxPen& pen) const return m_refData ? penData && *M_PENDATA == *penData : !penData; } -wxColour& wxPen::GetColour() const +wxColour wxPen::GetColour() const { wxCHECK_MSG( Ok(), wxNullColour, wxT("invalid pen") ); diff --git a/src/mgl/brush.cpp b/src/mgl/brush.cpp index 7735469cd1..c5f2b03cc0 100644 --- a/src/mgl/brush.cpp +++ b/src/mgl/brush.cpp @@ -182,7 +182,7 @@ wxBrushStyle wxBrush::GetStyle() const return M_BRUSHDATA->m_style; } -wxColour &wxBrush::GetColour() const +wxColour wxBrush::GetColour() const { wxCHECK_MSG( Ok(), wxNullColour, _T("invalid brush") ); diff --git a/src/mgl/pen.cpp b/src/mgl/pen.cpp index 64fdb7bcef..10af321572 100644 --- a/src/mgl/pen.cpp +++ b/src/mgl/pen.cpp @@ -251,7 +251,7 @@ int wxPen::GetWidth() const return M_PENDATA->m_width; } -wxColour &wxPen::GetColour() const +wxColour wxPen::GetColour() const { wxCHECK_MSG( Ok(), wxNullColour, wxT("invalid pen") ); diff --git a/src/msw/pen.cpp b/src/msw/pen.cpp index ae1b3d63b8..ae66559cec 100644 --- a/src/msw/pen.cpp +++ b/src/msw/pen.cpp @@ -540,7 +540,7 @@ void wxPen::SetCap(wxPenCap cap) M_PENDATA->SetCap(cap); } -wxColour& wxPen::GetColour() const +wxColour wxPen::GetColour() const { wxCHECK_MSG( Ok(), wxNullColour, wxT("invalid pen") ); diff --git a/src/os2/pen.cpp b/src/os2/pen.cpp index effcfc0cbe..6dd16877ed 100644 --- a/src/os2/pen.cpp +++ b/src/os2/pen.cpp @@ -479,7 +479,7 @@ void wxPen::SetCap( RealizeResource(); } // end of wxPen::SetCap -wxColour& wxPen::GetColour() const +wxColour wxPen::GetColour() const { wxCHECK_MSG( Ok(), wxNullColour, wxT("invalid pen") ); diff --git a/src/x11/brush.cpp b/src/x11/brush.cpp index f3a0ecd8cb..71046981e4 100644 --- a/src/x11/brush.cpp +++ b/src/x11/brush.cpp @@ -117,7 +117,7 @@ wxBrushStyle wxBrush::GetStyle() const return M_BRUSHDATA->m_style; } -wxColour &wxBrush::GetColour() const +wxColour wxBrush::GetColour() const { wxCHECK_MSG( Ok(), wxNullColour, _T("invalid brush") ); diff --git a/src/x11/pen.cpp b/src/x11/pen.cpp index c6f9366587..4e8be7e168 100644 --- a/src/x11/pen.cpp +++ b/src/x11/pen.cpp @@ -223,7 +223,7 @@ int wxPen::GetWidth() const return M_PENDATA->m_width; } -wxColour &wxPen::GetColour() const +wxColour wxPen::GetColour() const { wxCHECK_MSG( Ok(), wxNullColour, wxT("invalid pen") ); -- 2.45.2