public:
wxBrushRefData();
wxBrushRefData(const wxBrushRefData& rData);
- ~wxBrushRefData();
+ 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;
wxBrush();
wxBrush(const wxColour& rCol, int nStyle = wxSOLID);
wxBrush(const wxBitmap& rStipple);
- ~wxBrush();
+ 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);
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
// 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);