wxPenRefData::wxPenRefData()
{
- m_nStyle = wxSOLID;
+ m_nStyle = wxPENSTYLE_SOLID;
m_nWidth = 1;
m_nJoin = wxJOIN_ROUND ;
m_nCap = wxCAP_ROUND ;
wxPen::wxPen(
const wxColour& rColour
, int nWidth
-, int nStyle
+, wxPenStyle nStyle
)
{
m_refData = new wxPenRefData;
RealizeResource();
} // end of wxPen::wxPen
+#if FUTURE_WXWIN_COMPATIBILITY_3_0
+wxPen::wxPen(const wxColour& colour, int width, int style)
+{
+ m_refData = new wxPenRefData;
+
+ M_PENDATA->m_vColour = colour;
+ M_PENDATA->m_nWidth = width;
+ M_PENDATA->m_nStyle = (wxPenStyle)nStyle;
+ M_PENDATA->m_nJoin = wxJOIN_ROUND ;
+ M_PENDATA->m_nCap = wxCAP_ROUND ;
+ M_PENDATA->m_hPen = 0L;
+
+ RealizeResource();
+}
+#endif
+
wxPen::wxPen(
const wxBitmap& rStipple
, int nWidth
} // end of wxPen::wxPen
int wx2os2PenStyle(
- int nWxStyle
+ wxPenStyle nWxStyle
);
bool wxPen::RealizeResource()
wxLogError(_T("Unable to set current color table to RGB mode. Error: %s\n"), sError.c_str());
return false;
}
- if (M_PENDATA->m_nStyle == wxTRANSPARENT)
+ if (M_PENDATA->m_nStyle == wxPENSTYLE_TRANSPARENT)
{
return true;
}
ULONG flDefMask = 0L;
switch(M_PENDATA->m_nStyle)
{
- case wxSTIPPLE:
+ case wxPENSTYLE_STIPPLE:
::GpiSetBitmapId( M_PENDATA->m_hPen
,(USHORT)M_PENDATA->m_vStipple.GetHBITMAP()
,(USHORT)M_PENDATA->m_vStipple.GetId()
flDefMask = ABB_REF_POINT;
break;
- case wxBDIAGONAL_HATCH:
+ case wxPENSTYLE_BDIAGONAL_HATCH:
m_vAreaBundle.usSymbol = PATSYM_DIAG3;
m_vAreaBundle.usSet = LCID_DEFAULT;
flAttrMask = ABB_COLOR | ABB_BACK_COLOR | ABB_MIX_MODE | ABB_BACK_MIX_MODE | ABB_SYMBOL;
flDefMask = ABB_SET | ABB_REF_POINT;
break;
- case wxCROSSDIAG_HATCH:
+ case wxPENSTYLE_CROSSDIAG_HATCH:
m_vAreaBundle.usSymbol = PATSYM_DIAGHATCH;
m_vAreaBundle.usSet = LCID_DEFAULT;
flAttrMask = ABB_COLOR | ABB_BACK_COLOR | ABB_MIX_MODE | ABB_BACK_MIX_MODE | ABB_SYMBOL;
flDefMask = ABB_SET | ABB_REF_POINT;
break;
- case wxFDIAGONAL_HATCH:
+ case wxPENSTYLE_FDIAGONAL_HATCH:
m_vAreaBundle.usSymbol = PATSYM_DIAG1;
m_vAreaBundle.usSet = LCID_DEFAULT;
flAttrMask = ABB_COLOR | ABB_BACK_COLOR | ABB_MIX_MODE | ABB_BACK_MIX_MODE | ABB_SYMBOL;
flDefMask = ABB_SET | ABB_REF_POINT;
break;
- case wxCROSS_HATCH:
+ case wxPENSTYLE_CROSS_HATCH:
m_vAreaBundle.usSymbol = PATSYM_HATCH;
m_vAreaBundle.usSet = LCID_DEFAULT;
flAttrMask = ABB_COLOR | ABB_BACK_COLOR | ABB_MIX_MODE | ABB_BACK_MIX_MODE | ABB_SYMBOL;
flDefMask = ABB_SET | ABB_REF_POINT;
break;
- case wxHORIZONTAL_HATCH:
+ case wxPENSTYLE_HORIZONTAL_HATCH:
m_vAreaBundle.usSymbol = PATSYM_HORIZ;
m_vAreaBundle.usSet = LCID_DEFAULT;
flAttrMask = ABB_COLOR | ABB_BACK_COLOR | ABB_MIX_MODE | ABB_BACK_MIX_MODE | ABB_SYMBOL;
flDefMask = ABB_SET | ABB_REF_POINT;
break;
- case wxVERTICAL_HATCH:
+ case wxPENSTYLE_VERTICAL_HATCH:
m_vAreaBundle.usSymbol = PATSYM_VERT;
m_vAreaBundle.usSet = LCID_DEFAULT;
flAttrMask = ABB_COLOR | ABB_BACK_COLOR | ABB_MIX_MODE | ABB_BACK_MIX_MODE | ABB_SYMBOL;
} // end of wxPen::SetWidth
void wxPen::SetStyle(
- int nStyle
+ wxPenStyle nStyle
)
{
AllocExclusive();
} // end of wxPen::SetDashes
void wxPen::SetJoin(
- int nJoin
+ wxPenJoin nJoin
)
{
AllocExclusive();
} // end of wxPen::SetJoin
void wxPen::SetCap(
- int nCap
+ wxPenCap nCap
)
{
AllocExclusive();
} // end of wxPen::SetCap
int wx2os2PenStyle(
- int nWxStyle
+ wxPenStyle nWxStyle
)
{
int nPMStyle = 0;
switch (nWxStyle)
{
- case wxDOT:
+ case wxPENSTYLE_DOT:
nPMStyle = LINETYPE_DOT;
break;
- case wxDOT_DASH:
+ case wxPENSTYLE_DOT_DASH:
nPMStyle = LINETYPE_DASHDOT;
break;
- case wxSHORT_DASH:
+ case wxPENSTYLE_SHORT_DASH:
nPMStyle = LINETYPE_SHORTDASH;
break;
- case wxLONG_DASH:
+ case wxPENSTYLE_LONG_DASH:
nPMStyle = LINETYPE_LONGDASH;
break;
- case wxTRANSPARENT:
+ case wxPENSTYLE_TRANSPARENT:
nPMStyle = LINETYPE_INVISIBLE;
break;
- case wxUSER_DASH:
+ case wxPENSTYLE_USER_DASH:
nPMStyle = LINETYPE_DASHDOUBLEDOT; // We must make a choice... This is mine!
break;
- case wxSOLID:
+ case wxPENSTYLE_SOLID:
default:
nPMStyle = LINETYPE_SOLID;
break;