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); }
void SetJoin(wxPenJoin join);
void SetCap(wxPenCap cap);
- wxColour& GetColour() const;
+ wxColour GetColour() const;
int GetWidth() const;
wxPenStyle GetStyle() const;
wxPenJoin GetJoin() const;
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);
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;
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 );
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;
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 );
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;
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:
void SetJoin(wxPenJoin join) ;
void SetCap(wxPenCap cap) ;
- wxColour& GetColour() const ;
+ wxColour GetColour() const ;
int GetWidth() const;
wxPenStyle GetStyle() const;
wxPenJoin GetJoin() const;
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);
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;
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
void SetJoin(wxPenJoin join);
void SetCap(wxPenCap cap);
- wxColour& GetColour() const;
+ wxColour GetColour() const;
int GetWidth() const;
wxPenStyle GetStyle() const;
wxPenJoin GetJoin() const;
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;
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;
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
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;
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 );
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;
@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
@see SetStipple()
*/
- wxBitmap* GetStipple() const;
+ virtual wxBitmap* GetStipple() const;
/**
Returns the brush style, one of the ::wxBrushStyle values.
@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);
//@}
/**
@see wxBitmap
*/
- void SetStipple(const wxBitmap& bitmap);
+ virtual void SetStipple(const wxBitmap& bitmap);
/**
Sets the brush style.
@see GetStyle()
*/
- void SetStyle(wxBrushStyle style);
+ virtual void SetStyle(wxBrushStyle style);
/**
Inequality operator.
@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).
@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
@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.
@see GetCap()
*/
- void SetCap(wxPenCap capStyle);
+ virtual void SetCap(wxPenCap capStyle);
//@{
/**
@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);
//@}
/**
@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
@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.
};
/**
- 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;
M_PENDATA->SetStipple(Stipple);
}
-wxColour& wxPen::GetColour() const
+wxColour wxPen::GetColour() const
{
return (M_PENDATA ? M_PENDATA->m_colour : wxNullColour);
}
return M_BRUSHDATA->m_style;
}
-wxColour& wxBrush::GetColour() const
+wxColour wxBrush::GetColour() const
{
wxCHECK_MSG( Ok(), wxNullColour, _T("invalid brush") );
return 1;
}
-wxColour &wxPen::GetColour() const
+wxColour wxPen::GetColour() const
{
wxCHECK_MSG( Ok(), wxNullColour, wxT("invalid pen") );
return M_BRUSHDATA->m_style;
}
-wxColour &wxBrush::GetColour() const
+wxColour wxBrush::GetColour() const
{
wxCHECK_MSG( Ok(), wxNullColour, _T("invalid brush") );
return M_PENDATA->m_width;
}
-wxColour &wxPen::GetColour() const
+wxColour wxPen::GetColour() const
{
wxCHECK_MSG( Ok(), wxNullColour, wxT("invalid pen") );
return M_BRUSHDATA->m_style;
}
-wxColour &wxBrush::GetColour() const
+wxColour wxBrush::GetColour() const
{
wxCHECK_MSG( Ok(), wxNullColour, _T("invalid brush") );
return M_PENDATA->m_width;
}
-wxColour &wxPen::GetColour() const
+wxColour wxPen::GetColour() const
{
wxCHECK_MSG( Ok(), wxNullColour, wxT("invalid pen") );
// wxBrush accessors
// ----------------------------------------------------------------------------
-const wxColour& wxBrush::GetColour() const
+wxColour wxBrush::GetColour() const
{
wxCHECK_MSG( Ok(), wxNullColour, _T("invalid brush") );
return m_refData ? penData && *M_PENDATA == *penData : !penData;
}
-wxColour& wxPen::GetColour() const
+wxColour wxPen::GetColour() const
{
wxCHECK_MSG( Ok(), wxNullColour, wxT("invalid pen") );
return M_BRUSHDATA->m_style;
}
-wxColour &wxBrush::GetColour() const
+wxColour wxBrush::GetColour() const
{
wxCHECK_MSG( Ok(), wxNullColour, _T("invalid brush") );
return M_PENDATA->m_width;
}
-wxColour &wxPen::GetColour() const
+wxColour wxPen::GetColour() const
{
wxCHECK_MSG( Ok(), wxNullColour, wxT("invalid pen") );
M_PENDATA->SetCap(cap);
}
-wxColour& wxPen::GetColour() const
+wxColour wxPen::GetColour() const
{
wxCHECK_MSG( Ok(), wxNullColour, wxT("invalid pen") );
RealizeResource();
} // end of wxPen::SetCap
-wxColour& wxPen::GetColour() const
+wxColour wxPen::GetColour() const
{
wxCHECK_MSG( Ok(), wxNullColour, wxT("invalid pen") );
return M_BRUSHDATA->m_style;
}
-wxColour &wxBrush::GetColour() const
+wxColour wxBrush::GetColour() const
{
wxCHECK_MSG( Ok(), wxNullColour, _T("invalid brush") );
return M_PENDATA->m_width;
}
-wxColour &wxPen::GetColour() const
+wxColour wxPen::GetColour() const
{
wxCHECK_MSG( Ok(), wxNullColour, wxT("invalid pen") );