void SetStyle(int style)
{
- if ( style != wxSOLID && style != wxTRANSPARENT )
+ if ( style != wxPENSTYLE_SOLID && style != wxPENSTYLE_TRANSPARENT )
{
wxFAIL_MSG( "only wxSOLID and wxTRANSPARENT styles are supported" );
- style = wxSOLID;
+ style = wxPENSTYLE_SOLID;
}
m_style = style;
wxPenStyle wxPen::GetStyle() const
{
- wxCHECK_MSG( Ok(), -1, wxT("invalid pen") );
+ wxCHECK_MSG( Ok(), wxPENSTYLE_MAX, wxT("invalid pen") );
return M_PENDATA->m_style;
}
wxPenRefData()
{
m_width = 1;
- m_style = wxSOLID;
+ m_style = wxPENSTYLE_SOLID;
m_joinStyle = wxJOIN_ROUND;
m_capStyle = wxCAP_ROUND;
m_dash = (wxGTKDash*) NULL;
m_join == data.m_join &&
m_cap == data.m_cap &&
m_colour == data.m_colour &&
- (m_style != wxSTIPPLE || m_stipple.IsSameAs(data.m_stipple)) &&
- (m_style != wxUSER_DASH ||
+ (m_style != wxPENSTYLE_STIPPLE || m_stipple.IsSameAs(data.m_stipple)) &&
+ (m_style != wxPENSTYLE_USER_DASH ||
(m_nbDash == data.m_nbDash &&
memcmp(m_dash, data.m_dash, m_nbDash*sizeof(wxDash)) == 0));
}
wxPenRefData::wxPenRefData()
{
- m_style = wxSOLID;
+ m_style = wxPENSTYLE_SOLID;
m_width = 1;
m_join = wxJOIN_ROUND ;
m_cap = wxCAP_ROUND ;
M_PENDATA->m_stipple = stipple;
M_PENDATA->m_width = Width;
- M_PENDATA->m_style = wxSTIPPLE;
+ M_PENDATA->m_style = wxPENSTYLE_STIPPLE;
M_PENDATA->m_join = wxJOIN_ROUND ;
M_PENDATA->m_cap = wxCAP_ROUND ;
M_PENDATA->m_nbDash = 0 ;
Unshare();
M_PENDATA->m_stipple = Stipple;
- M_PENDATA->m_style = wxSTIPPLE;
+ M_PENDATA->m_style = wxPENSTYLE_STIPPLE;
RealizeResource();
}
m_capStyle == data.m_capStyle &&
m_joinStyle == data.m_joinStyle &&
m_colour == data.m_colour &&
- (m_style != wxSTIPPLE || m_stipple.IsSameAs(data.m_stipple)) &&
- (m_style != wxUSER_DASH ||
+ (m_style != wxPENSTYLE_STIPPLE || m_stipple.IsSameAs(data.m_stipple)) &&
+ (m_style != wxPENSTYLE_USER_DASH ||
(m_dash == data.m_dash &&
memcmp(m_dash, data.m_dash, m_countDashes*sizeof(wxDash)) == 0));
}
wxPenRefData::wxPenRefData()
{
m_width = 1;
- m_style = wxSOLID;
+ m_style = wxPENSTYLE_SOLID;
m_joinStyle = wxJOIN_ROUND;
m_capStyle = wxCAP_ROUND;
m_dash = (wxDash*) NULL;
m_refData = new wxPenRefData();
M_PENDATA->m_width = width;
- M_PENDATA->m_style = wxSTIPPLE;
+ M_PENDATA->m_style = wxPENSTYLE_STIPPLE;
M_PENDATA->m_stipple = stipple;
wxBitmapToPixPattern(stipple, &(M_PENDATA->m_pixPattern), NULL);
}
#include "wx/list.h"
#include "wx/utils.h"
#include "wx/app.h"
+ #include "wx/bitmap.h"
#endif // WX_PRECOMP
#include "wx/msw/private.h"
m_join == data.m_join &&
m_cap == data.m_cap &&
m_colour == data.m_colour &&
- (m_style != wxSTIPPLE || m_stipple.IsSameAs(data.m_stipple)) &&
- (m_style != wxUSER_DASH ||
+ (m_style != wxPENSTYLE_STIPPLE || m_stipple.IsSameAs(data.m_stipple)) &&
+ (m_style != wxPENSTYLE_USER_DASH ||
(m_nbDash == data.m_nbDash &&
memcmp(m_dash, data.m_dash, m_nbDash*sizeof(wxDash)) == 0));
}
// Only NT can display dashed or dotted lines with width > 1
static const int os = wxGetOsVersion();
if ( os != wxOS_WINDOWS_NT &&
- (m_style == wxDOT ||
- m_style == wxLONG_DASH ||
- m_style == wxSHORT_DASH ||
- m_style == wxDOT_DASH ||
- m_style == wxUSER_DASH) &&
+ (m_style == wxPENSTYLE_DOT ||
+ m_style == wxPENSTYLE_LONG_DASH ||
+ m_style == wxPENSTYLE_SHORT_DASH ||
+ m_style == wxPENSTYLE_DOT_DASH ||
+ m_style == wxPENSTYLE_USER_DASH) &&
m_width > 1 )
{
m_width = 1;
// CreatePen()
if ( m_join == wxJOIN_ROUND &&
m_cap == wxCAP_ROUND &&
- m_style != wxUSER_DASH &&
- m_style != wxSTIPPLE &&
- (m_width <= 1 || m_style == wxSOLID) )
+ m_style != wxPENSTYLE_USER_DASH &&
+ m_style != wxPENSTYLE_STIPPLE &&
+ (m_width <= 1 || m_style == wxPENSTYLE_SOLID) )
#endif // !wxHAVE_EXT_CREATE_PEN
{
m_hPen = ::CreatePen(ConvertPenStyle(m_style), m_width, col);
wxPenRefData::wxPenRefData()
{
- m_nStyle = wxSOLID;
+ m_nStyle = wxPENSTYLE_SOLID;
m_nWidth = 1;
m_nJoin = wxJOIN_ROUND ;
m_nCap = wxCAP_ROUND ;
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;
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;
wxPenRefData()
{
m_width = 1;
- m_style = wxSOLID;
+ m_style = wxPENSTYLE_SOLID;
m_joinStyle = wxJOIN_ROUND;
m_capStyle = wxCAP_ROUND;
m_dash = (wxX11Dash*) NULL;