From ed7ec76de3e7dc4ccd0271d14b37e1017cad0db9 Mon Sep 17 00:00:00 2001 From: Francesco Montorsi Date: Mon, 17 Mar 2008 00:46:07 +0000 Subject: [PATCH] some more build fix for wxPen/wxBrush style changes git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@52577 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/dfb/pen.cpp | 6 +++--- src/gtk1/pen.cpp | 2 +- src/mac/carbon/pen.cpp | 10 +++++----- src/mgl/pen.cpp | 8 ++++---- src/msw/brush.cpp | 1 + src/msw/pen.cpp | 20 ++++++++++---------- src/os2/pen.cpp | 32 ++++++++++++++++---------------- src/x11/pen.cpp | 2 +- 8 files changed, 41 insertions(+), 40 deletions(-) diff --git a/src/dfb/pen.cpp b/src/dfb/pen.cpp index 7039406b52..15e685dc02 100644 --- a/src/dfb/pen.cpp +++ b/src/dfb/pen.cpp @@ -42,10 +42,10 @@ public: 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; @@ -169,7 +169,7 @@ wxPenJoin wxPen::GetJoin() const wxPenStyle wxPen::GetStyle() const { - wxCHECK_MSG( Ok(), -1, wxT("invalid pen") ); + wxCHECK_MSG( Ok(), wxPENSTYLE_MAX, wxT("invalid pen") ); return M_PENDATA->m_style; } diff --git a/src/gtk1/pen.cpp b/src/gtk1/pen.cpp index 59c6cfb553..bdb392768e 100644 --- a/src/gtk1/pen.cpp +++ b/src/gtk1/pen.cpp @@ -28,7 +28,7 @@ public: wxPenRefData() { m_width = 1; - m_style = wxSOLID; + m_style = wxPENSTYLE_SOLID; m_joinStyle = wxJOIN_ROUND; m_capStyle = wxCAP_ROUND; m_dash = (wxGTKDash*) NULL; diff --git a/src/mac/carbon/pen.cpp b/src/mac/carbon/pen.cpp index fac1abae27..6118f378cb 100644 --- a/src/mac/carbon/pen.cpp +++ b/src/mac/carbon/pen.cpp @@ -36,8 +36,8 @@ public: 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)); } @@ -60,7 +60,7 @@ protected: wxPenRefData::wxPenRefData() { - m_style = wxSOLID; + m_style = wxPENSTYLE_SOLID; m_width = 1; m_join = wxJOIN_ROUND ; m_cap = wxCAP_ROUND ; @@ -133,7 +133,7 @@ wxPen::wxPen(const wxBitmap& stipple, int Width) 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 ; @@ -251,7 +251,7 @@ void wxPen::SetStipple(const wxBitmap& Stipple) Unshare(); M_PENDATA->m_stipple = Stipple; - M_PENDATA->m_style = wxSTIPPLE; + M_PENDATA->m_style = wxPENSTYLE_STIPPLE; RealizeResource(); } diff --git a/src/mgl/pen.cpp b/src/mgl/pen.cpp index 9b8315efcf..9ba288a240 100644 --- a/src/mgl/pen.cpp +++ b/src/mgl/pen.cpp @@ -43,8 +43,8 @@ public: 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)); } @@ -65,7 +65,7 @@ public: wxPenRefData::wxPenRefData() { m_width = 1; - m_style = wxSOLID; + m_style = wxPENSTYLE_SOLID; m_joinStyle = wxJOIN_ROUND; m_capStyle = wxCAP_ROUND; m_dash = (wxDash*) NULL; @@ -126,7 +126,7 @@ wxPen::wxPen(const wxBitmap& stipple, int width) 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); } diff --git a/src/msw/brush.cpp b/src/msw/brush.cpp index 287ed0c027..8876224ae2 100644 --- a/src/msw/brush.cpp +++ b/src/msw/brush.cpp @@ -30,6 +30,7 @@ #include "wx/list.h" #include "wx/utils.h" #include "wx/app.h" + #include "wx/bitmap.h" #endif // WX_PRECOMP #include "wx/msw/private.h" diff --git a/src/msw/pen.cpp b/src/msw/pen.cpp index 89cac5ba67..d13f4310e5 100644 --- a/src/msw/pen.cpp +++ b/src/msw/pen.cpp @@ -64,8 +64,8 @@ public: 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)); } @@ -304,11 +304,11 @@ bool wxPenRefData::Alloc() // 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; @@ -318,9 +318,9 @@ bool wxPenRefData::Alloc() // 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); diff --git a/src/os2/pen.cpp b/src/os2/pen.cpp index 711a62a679..39a9e5d6c4 100644 --- a/src/os2/pen.cpp +++ b/src/os2/pen.cpp @@ -29,7 +29,7 @@ IMPLEMENT_DYNAMIC_CLASS(wxPen, wxGDIObject) wxPenRefData::wxPenRefData() { - m_nStyle = wxSOLID; + m_nStyle = wxPENSTYLE_SOLID; m_nWidth = 1; m_nJoin = wxJOIN_ROUND ; m_nCap = wxCAP_ROUND ; @@ -162,7 +162,7 @@ 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; } @@ -233,7 +233,7 @@ bool wxPen::RealizeResource() 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() @@ -245,42 +245,42 @@ bool wxPen::RealizeResource() 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; @@ -436,31 +436,31 @@ int wx2os2PenStyle( 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; diff --git a/src/x11/pen.cpp b/src/x11/pen.cpp index 3d8efec954..31e4087bc2 100644 --- a/src/x11/pen.cpp +++ b/src/x11/pen.cpp @@ -30,7 +30,7 @@ public: wxPenRefData() { m_width = 1; - m_style = wxSOLID; + m_style = wxPENSTYLE_SOLID; m_joinStyle = wxJOIN_ROUND; m_capStyle = wxCAP_ROUND; m_dash = (wxX11Dash*) NULL; -- 2.45.2