]> git.saurik.com Git - wxWidgets.git/commitdiff
some more build fix for wxPen/wxBrush style changes
authorFrancesco Montorsi <f18m_cpp217828@yahoo.it>
Mon, 17 Mar 2008 00:46:07 +0000 (00:46 +0000)
committerFrancesco Montorsi <f18m_cpp217828@yahoo.it>
Mon, 17 Mar 2008 00:46:07 +0000 (00:46 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@52577 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/dfb/pen.cpp
src/gtk1/pen.cpp
src/mac/carbon/pen.cpp
src/mgl/pen.cpp
src/msw/brush.cpp
src/msw/pen.cpp
src/os2/pen.cpp
src/x11/pen.cpp

index 7039406b52f909c9aa2f8cd043f162c3485f9c74..15e685dc02c3676dcbf0a0fe1d757f47b58a99d5 100644 (file)
@@ -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;
 }
index 59c6cfb553ae353602de2509c58fce883fe416fd..bdb392768e673e0d403b7146cbd4741ae63d7043 100644 (file)
@@ -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;
index fac1abae2711e7477fb241047ecc128bfa9f4888..6118f378cb377527bf042b791302e4fb851de43f 100644 (file)
@@ -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();
 }
index 9b8315efcf454d6f62e3f4b3fe8ecadc26e31844..9ba288a24004bb54aac2134f80a4ad073d048901 100644 (file)
@@ -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);
 }
index 287ed0c02704fb7d9e48d5a4ae03832caa40524a..8876224ae24151c39ee52d074b7cf83c2456d029 100644 (file)
@@ -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"
index 89cac5ba678edfcb60709cadfae49a6dedb76250..d13f4310e5008b8d8eb6b7b9ec9d675c7813b2d6 100644 (file)
@@ -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);
index 711a62a679fba745badbe59a45119d1aba032d0f..39a9e5d6c494a938fb58e246ab7871ef2b37ebcc 100644 (file)
@@ -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;
index 3d8efec95473b13a51c790f054598c52b5f502ac..31e4087bc2d68df0b74ac957a3f2f3ea122b7908 100644 (file)
@@ -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;