IMPLEMENT_DYNAMIC_CLASS(wxPen, wxGDIObject)
#endif
-wxPenRefData::wxPenRefData(void)
+wxPenRefData::wxPenRefData()
{
m_style = wxSOLID;
m_width = 1;
m_hPen = 0;
}
-wxPenRefData::~wxPenRefData(void)
+wxPenRefData::~wxPenRefData()
{
if ( m_hPen )
::DeleteObject((HPEN) m_hPen);
// Pens
-wxPen::wxPen(void)
+wxPen::wxPen()
{
if ( wxThePenList )
wxThePenList->AddPen(this);
wxThePenList->AddPen(this);
}
-wxPen::wxPen(const wxString& col, int Width, int Style)
-{
- m_refData = new wxPenRefData;
-
- M_PENDATA->m_colour = col;
-// M_PENDATA->m_stipple = NULL ;
- M_PENDATA->m_width = Width;
- M_PENDATA->m_style = Style;
- M_PENDATA->m_join = wxJOIN_ROUND ;
- M_PENDATA->m_cap = wxCAP_ROUND ;
- M_PENDATA->m_nbDash = 0 ;
- M_PENDATA->m_dash = 0 ;
- M_PENDATA->m_hPen = 0 ;
-
- RealizeResource();
-
- if ( wxThePenList )
- wxThePenList->AddPen(this);
-}
-
-bool wxPen::RealizeResource(void)
+bool wxPen::RealizeResource()
{
if (M_PENDATA && (M_PENDATA->m_hPen == 0))
{
return FALSE;
}
-WXHANDLE wxPen::GetResourceHandle(void)
+WXHANDLE wxPen::GetResourceHandle()
{
if ( !M_PENDATA )
return 0;
else return FALSE;
}
-bool wxPen::IsFree(void)
+bool wxPen::IsFree() const
{
return (M_PENDATA && M_PENDATA->m_hPen == 0);
}
RealizeResource();
}
-void wxPen::SetColour(const wxString& col)
-{
- Unshare();
-
- M_PENDATA->m_colour = col;
-
- RealizeResource();
-}
-
-void wxPen::SetColour(const unsigned char r, const unsigned char g, const unsigned char b)
+void wxPen::SetColour(unsigned char r, unsigned char g, unsigned char b)
{
Unshare();