/////////////////////////////////////////////////////////////////////////////
-// Name: pen.cpp
+// Name: src/mac/carbon/pen.cpp
// Purpose: wxPen
// Author: Stefan Csomor
// Modified by:
// Created: 1998-01-01
// RCS-ID: $Id$
// Copyright: (c) Stefan Csomor
-// Licence: wxWindows licence
+// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
-#ifdef __GNUG__
-#pragma implementation "pen.h"
-#endif
+#include "wx/wxprec.h"
-#include "wx/setup.h"
#include "wx/utils.h"
#include "wx/pen.h"
-#if !USE_SHARED_LIBRARIES
IMPLEMENT_DYNAMIC_CLASS(wxPen, wxGDIObject)
-#endif
wxPenRefData::wxPenRefData()
{
}
wxPenRefData::wxPenRefData(const wxPenRefData& data)
- : wxGDIRefData()
+: wxGDIRefData()
{
m_style = data.m_style;
m_width = data.m_width;
void wxPen::Unshare()
{
- // Don't change shared data
- if (!m_refData)
+ // Don't change shared data
+ if (!m_refData)
{
- m_refData = new wxPenRefData();
- }
+ m_refData = new wxPenRefData();
+ }
else
{
- wxPenRefData* ref = new wxPenRefData(*(wxPenRefData*)m_refData);
- UnRef();
- m_refData = ref;
- }
+ wxPenRefData* ref = new wxPenRefData(*(wxPenRefData*)m_refData);
+ UnRef();
+ m_refData = ref;
+ }
}
void wxPen::SetColour(const wxColour& col)
Unshare();
M_PENDATA->m_colour = col;
-
+
RealizeResource();
}
Unshare();
M_PENDATA->m_colour.Set(r, g, b);
-
+
RealizeResource();
}
M_PENDATA->m_stipple = Stipple;
M_PENDATA->m_style = wxSTIPPLE;
-
+
RealizeResource();
}
M_PENDATA->m_nbDash = nb_dashes;
M_PENDATA->m_dash = (wxDash *)Dash;
-
+
RealizeResource();
}
bool wxPen::RealizeResource()
{
- // nothing to do here for mac
- return TRUE;
+ // nothing to do here for mac
+ return true;
}
-
-