X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/d3c7fc996a73e9f6a83067bc28a3c5581a3fee65..05f32fc39e4aae6144c24971c74a11d119cea82e:/include/wx/os2/brush.h diff --git a/include/wx/os2/brush.h b/include/wx/os2/brush.h index a072e4b82e..c37808f3ef 100644 --- a/include/wx/os2/brush.h +++ b/include/wx/os2/brush.h @@ -26,6 +26,13 @@ public: wxBrushRefData(const wxBrushRefData& rData); virtual ~wxBrushRefData(); + bool operator == (const wxBrushRefData& data) const + { + return (m_nStyle == data.m_nStyle && + m_vStipple.IsSameAs(data.m_vStipple) && + m_vColour == data.m_vColour); + } + protected: int m_nStyle; wxBitmap m_vStipple ; @@ -47,8 +54,8 @@ public: wxBrush(const wxBitmap& rStipple); virtual ~wxBrush(); - inline bool operator == (const wxBrush& rBrush) const { return m_refData == rBrush.m_refData; } - inline bool operator != (const wxBrush& rBrush) const { return m_refData != rBrush.m_refData; } + bool operator == (const wxBrush& rBrush) const; + inline bool operator != (const wxBrush& rBrush) const { return !(*this == rBrush); } virtual void SetColour(const wxColour& rColour); virtual void SetColour(unsigned char cRed, unsigned char cGreen, unsigned char cBrush); @@ -61,7 +68,8 @@ public: inline wxBitmap* GetStipple(void) const { return (M_BRUSHDATA ? & M_BRUSHDATA->m_vStipple : 0); }; inline int GetPS(void) const { return (M_BRUSHDATA ? M_BRUSHDATA->m_hBrush : 0); }; - inline virtual bool Ok(void) const { return (m_refData != NULL) ; } + inline virtual bool Ok() const { return IsOk(); } + inline virtual bool IsOk(void) const { return (m_refData != NULL) ; } // // Implementation @@ -71,7 +79,7 @@ public: // Useful helper: create the brush resource // bool RealizeResource(void); - WXHANDLE GetResourceHandle(void) ; + virtual WXHANDLE GetResourceHandle(void) const; bool FreeResource(bool bForce = false); bool IsFree(void) const; void Unshare(void);