From 236a9de39afa090fdee3cf91cb5364ceca69e3f8 Mon Sep 17 00:00:00 2001 From: Ron Lee Date: Mon, 13 Mar 2000 14:34:35 +0000 Subject: [PATCH] moved wxDash typedef to gdicmn.h added wxXXXDash, platform dependant types for all ports made using native dialogs the default in msw/setup0.h git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@6652 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/gdicmn.h | 2 ++ include/wx/gtk/pen.h | 4 +--- include/wx/gtk1/pen.h | 4 +--- include/wx/mac/pen.h | 10 ++++++---- include/wx/motif/dcclient.h | 2 +- include/wx/motif/pen.h | 12 +++++++----- include/wx/msw/pen.h | 10 ++++++---- include/wx/msw/setup0.h | 2 +- include/wx/os2/pen.h | 10 ++++++---- include/wx/qt/pen.h | 11 +++++++---- include/wx/stubs/pen.h | 28 ++++++++++++++++++++-------- src/mac/carbon/pen.cpp | 8 ++++---- src/mac/pen.cpp | 8 ++++---- src/motif/dcclient.cpp | 22 +++++++++++----------- src/motif/pen.cpp | 8 ++++---- src/msw/pen.cpp | 18 +++++++++--------- src/os2/pen.cpp | 8 ++++---- src/qt/pen.cpp | 10 +++++----- src/stubs/pen.cpp | 8 ++++---- 19 files changed, 103 insertions(+), 82 deletions(-) diff --git a/include/wx/gdicmn.h b/include/wx/gdicmn.h index f78f14eb95..9a7231e8ff 100644 --- a/include/wx/gdicmn.h +++ b/include/wx/gdicmn.h @@ -324,6 +324,8 @@ public: // Management of pens, brushes and fonts // --------------------------------------------------------------------------- +typedef wxInt8 wxDash; + class WXDLLEXPORT wxPenList : public wxList { DECLARE_DYNAMIC_CLASS(wxPenList) diff --git a/include/wx/gtk/pen.h b/include/wx/gtk/pen.h index 218116ce8a..2f1d51c909 100644 --- a/include/wx/gtk/pen.h +++ b/include/wx/gtk/pen.h @@ -21,7 +21,7 @@ #include "wx/gdiobj.h" #include "wx/gdicmn.h" -#include +#include // only needed for wxGTKDash, should it go elsewhere.. //----------------------------------------------------------------------------- // classes @@ -29,8 +29,6 @@ class wxPen; -typedef wxInt8 wxDash; - #if GTK_CHECK_VERSION(1,2,7) typedef gint8 wxGTKDash; #else diff --git a/include/wx/gtk1/pen.h b/include/wx/gtk1/pen.h index 218116ce8a..2f1d51c909 100644 --- a/include/wx/gtk1/pen.h +++ b/include/wx/gtk1/pen.h @@ -21,7 +21,7 @@ #include "wx/gdiobj.h" #include "wx/gdicmn.h" -#include +#include // only needed for wxGTKDash, should it go elsewhere.. //----------------------------------------------------------------------------- // classes @@ -29,8 +29,6 @@ class wxPen; -typedef wxInt8 wxDash; - #if GTK_CHECK_VERSION(1,2,7) typedef gint8 wxGTKDash; #else diff --git a/include/wx/mac/pen.h b/include/wx/mac/pen.h index 938908b56b..4da77c1586 100644 --- a/include/wx/mac/pen.h +++ b/include/wx/mac/pen.h @@ -20,7 +20,7 @@ #include "wx/colour.h" #include "wx/bitmap.h" -typedef long wxDash ; +typedef long wxMACDash; class WXDLLEXPORT wxPen; @@ -39,7 +39,7 @@ protected: int m_cap ; wxBitmap m_stipple ; int m_nbDash ; - wxDash * m_dash ; + wxMACDash * m_dash ; wxColour m_colour; /* TODO: implementation WXHPEN m_hPen; @@ -81,8 +81,10 @@ public: inline int GetStyle() const { return (M_PENDATA ? M_PENDATA->m_style : 0); }; inline int GetJoin() const { return (M_PENDATA ? M_PENDATA->m_join : 0); }; inline int GetCap() const { return (M_PENDATA ? M_PENDATA->m_cap : 0); }; - inline int GetDashes(wxDash **ptr) const { - *ptr = (M_PENDATA ? M_PENDATA->m_dash : (wxDash*) NULL); return (M_PENDATA ? M_PENDATA->m_nbDash : 0); + inline int GetDashes(wxDash **ptr) const + { + *ptr = (M_PENDATA ? (wxDash*)M_PENDATA->m_dash : (wxDash*) NULL); + return (M_PENDATA ? M_PENDATA->m_nbDash : 0); } inline wxBitmap *GetStipple() const { return (M_PENDATA ? (& M_PENDATA->m_stipple) : (wxBitmap*) NULL); }; diff --git a/include/wx/motif/dcclient.h b/include/wx/motif/dcclient.h index 26969d2833..7e4bcf3cb1 100644 --- a/include/wx/motif/dcclient.h +++ b/include/wx/motif/dcclient.h @@ -149,7 +149,7 @@ protected: int m_currentPenJoin ; int m_currentPenCap ; int m_currentPenDashCount ; - char* m_currentPenDash ; + wxMOTIFDash* m_currentPenDash ; wxBitmap m_currentStipple ; int m_currentStyle ; int m_currentFill ; diff --git a/include/wx/motif/pen.h b/include/wx/motif/pen.h index 4bc54d41b7..120d793d89 100644 --- a/include/wx/motif/pen.h +++ b/include/wx/motif/pen.h @@ -20,7 +20,7 @@ #include "wx/colour.h" #include "wx/bitmap.h" -typedef char wxDash ; +typedef char wxMOTIFDash; class WXDLLEXPORT wxPen; @@ -39,7 +39,7 @@ protected: int m_cap ; wxBitmap m_stipple ; int m_nbDash ; - wxDash * m_dash ; + wxMOTIFDash *m_dash ; wxColour m_colour; }; @@ -78,11 +78,13 @@ public: inline int GetStyle() const { return (M_PENDATA ? M_PENDATA->m_style : 0); }; inline int GetJoin() const { return (M_PENDATA ? M_PENDATA->m_join : 0); }; inline int GetCap() const { return (M_PENDATA ? M_PENDATA->m_cap : 0); }; - inline int GetDashes(wxDash **ptr) const { - *ptr = (M_PENDATA ? M_PENDATA->m_dash : (wxDash*) NULL); return (M_PENDATA ? M_PENDATA->m_nbDash : 0); + inline int GetDashes(wxDash **ptr) const + { + *ptr = (M_PENDATA ? (wxDash*)M_PENDATA->m_dash : (wxDash*) NULL); + return (M_PENDATA ? M_PENDATA->m_nbDash : 0); } inline int GetDashCount() const { return (M_PENDATA->m_nbDash); } - inline wxDash* GetDash() const { return (M_PENDATA->m_dash); } + inline wxDash* GetDash() const { return (wxDash*)M_PENDATA->m_dash; } inline wxBitmap *GetStipple() const { return (M_PENDATA ? (& M_PENDATA->m_stipple) : (wxBitmap*) NULL); }; diff --git a/include/wx/msw/pen.h b/include/wx/msw/pen.h index d30a10ff83..719140d8cf 100644 --- a/include/wx/msw/pen.h +++ b/include/wx/msw/pen.h @@ -19,7 +19,7 @@ #include "wx/gdiobj.h" #include "wx/bitmap.h" -typedef WXDWORD wxDash ; +typedef WXDWORD wxMSWDash; class WXDLLEXPORT wxPen; @@ -38,7 +38,7 @@ protected: int m_cap ; wxBitmap m_stipple ; int m_nbDash ; - wxDash * m_dash ; + wxMSWDash * m_dash ; wxColour m_colour; WXHPEN m_hPen; }; @@ -78,8 +78,10 @@ public: inline int GetStyle() const { return (M_PENDATA ? M_PENDATA->m_style : 0); }; inline int GetJoin() const { return (M_PENDATA ? M_PENDATA->m_join : 0); }; inline int GetCap() const { return (M_PENDATA ? M_PENDATA->m_cap : 0); }; - inline int GetDashes(wxDash **ptr) const { - *ptr = (M_PENDATA ? M_PENDATA->m_dash : (wxDash*) NULL); return (M_PENDATA ? M_PENDATA->m_nbDash : 0); + inline int GetDashes(wxDash **ptr) const + { + *ptr = (M_PENDATA ? (wxDash*)M_PENDATA->m_dash : (wxDash*) NULL); + return (M_PENDATA ? M_PENDATA->m_nbDash : 0); } inline wxBitmap *GetStipple() const { return (M_PENDATA ? (& M_PENDATA->m_stipple) : (wxBitmap*) NULL); }; diff --git a/include/wx/msw/setup0.h b/include/wx/msw/setup0.h index 869c5ba0ab..fca3f3295b 100644 --- a/include/wx/msw/setup0.h +++ b/include/wx/msw/setup0.h @@ -471,7 +471,7 @@ // Define 1 for font size to be backward compatible // to 1.63 and earlier. 1.64 and later define point // sizes to be compatible with Windows. -#define wxUSE_GENERIC_DIALOGS_IN_MSW 1 +#define wxUSE_GENERIC_DIALOGS_IN_MSW 0 // Define 1 to use generic dialogs in Windows, even though // they duplicate native common dialog (e.g. wxColourDialog) #define wxUSE_PENWINDOWS 0 diff --git a/include/wx/os2/pen.h b/include/wx/os2/pen.h index 5c0b38ec68..6488a6b416 100644 --- a/include/wx/os2/pen.h +++ b/include/wx/os2/pen.h @@ -15,7 +15,7 @@ #include "wx/gdiobj.h" #include "wx/bitmap.h" -typedef long wxDash ; +typedef long wxPMDash; class WXDLLEXPORT wxPen; @@ -34,7 +34,7 @@ protected: int m_cap ; wxBitmap m_stipple ; int m_nbDash ; - wxDash * m_dash ; + wxPMDash * m_dash ; wxColour m_colour; WXHPEN m_hPen; }; @@ -74,8 +74,10 @@ public: inline int GetStyle() const { return (M_PENDATA ? M_PENDATA->m_style : 0); }; inline int GetJoin() const { return (M_PENDATA ? M_PENDATA->m_join : 0); }; inline int GetCap() const { return (M_PENDATA ? M_PENDATA->m_cap : 0); }; - inline int GetDashes(wxDash **ptr) const { - *ptr = (M_PENDATA ? M_PENDATA->m_dash : (wxDash*) NULL); return (M_PENDATA ? M_PENDATA->m_nbDash : 0); + inline int GetDashes(wxDash **ptr) const + { + *ptr = (M_PENDATA ? (wxDash*)M_PENDATA->m_dash : (wxDash*) NULL); + return (M_PENDATA ? M_PENDATA->m_nbDash : 0); } inline wxBitmap *GetStipple() const { return (M_PENDATA ? (& M_PENDATA->m_stipple) : (wxBitmap*) NULL); }; diff --git a/include/wx/qt/pen.h b/include/wx/qt/pen.h index 0e23c99daf..8989d44435 100644 --- a/include/wx/qt/pen.h +++ b/include/wx/qt/pen.h @@ -17,8 +17,9 @@ #endif #include "wx/gdiobj.h" +#include "wx/gdicmn.h" -typedef WXDWORD wxDash ; +typedef WXDWORD wxQTDash; class WXDLLEXPORT wxPen; @@ -37,7 +38,7 @@ protected: int m_cap ; wxBitmap m_stipple ; int m_nbDash ; - wxDash * m_dash ; + wxQTDash * m_dash; wxColour m_colour; /* TODO: implementation WXHPEN m_hPen; @@ -82,8 +83,10 @@ public: inline int GetStyle() const { return (M_PENDATA ? M_PENDATA->m_style : 0); }; inline int GetJoin() const { return (M_PENDATA ? M_PENDATA->m_join : 0); }; inline int GetCap() const { return (M_PENDATA ? M_PENDATA->m_cap : 0); }; - inline int GetDashes(wxDash **ptr) const { - *ptr = (M_PENDATA ? M_PENDATA->m_dash : NULL); return (M_PENDATA ? M_PENDATA->m_nbDash : 0); + inline int GetDashes(wxDash **ptr) const + { + *ptr = (M_PENDATA ? (wxDash*)M_PENDATA->m_dash : (wxDash*)NULL); + return (M_PENDATA ? M_PENDATA->m_nbDash : 0); } inline wxBitmap *GetStipple() const { return (M_PENDATA ? (& M_PENDATA->m_stipple) : NULL); }; diff --git a/include/wx/stubs/pen.h b/include/wx/stubs/pen.h index 938908b56b..4cb73dcb8e 100644 --- a/include/wx/stubs/pen.h +++ b/include/wx/stubs/pen.h @@ -20,7 +20,17 @@ #include "wx/colour.h" #include "wx/bitmap.h" -typedef long wxDash ; +// PORTERS, NB: this typedef is the platform specific type for dashes.. +// change all occurences of XSTUBX in pen.h and pen.cpp to something +// meaningful for your port (eg. wxMSWDash, wxGTKDash) and change the +// type from long to whatever your platform requires. + +typedef long wxXSTUBXDash; + +// wxDash is typedef'd in gdicmn.h and is the type that should be used +// for all public interfaces. Convert parameters to the wxXSTUBXDash +// type for use inside the platform specific methods, and cast them +// back to wxDash again before passing back to the user. -- RL class WXDLLEXPORT wxPen; @@ -35,11 +45,11 @@ public: protected: int m_width; int m_style; - int m_join ; - int m_cap ; - wxBitmap m_stipple ; - int m_nbDash ; - wxDash * m_dash ; + int m_join; + int m_cap; + wxBitmap m_stipple; + int m_nbDash; + wxXSTUBXDash *m_dash; wxColour m_colour; /* TODO: implementation WXHPEN m_hPen; @@ -81,8 +91,10 @@ public: inline int GetStyle() const { return (M_PENDATA ? M_PENDATA->m_style : 0); }; inline int GetJoin() const { return (M_PENDATA ? M_PENDATA->m_join : 0); }; inline int GetCap() const { return (M_PENDATA ? M_PENDATA->m_cap : 0); }; - inline int GetDashes(wxDash **ptr) const { - *ptr = (M_PENDATA ? M_PENDATA->m_dash : (wxDash*) NULL); return (M_PENDATA ? M_PENDATA->m_nbDash : 0); + inline int GetDashes(wxDash **ptr) const + { + *ptr = (M_PENDATA ? (wxDash*)M_PENDATA->m_dash : (wxDash*)NULL); + return (M_PENDATA ? M_PENDATA->m_nbDash : 0); } inline wxBitmap *GetStipple() const { return (M_PENDATA ? (& M_PENDATA->m_stipple) : (wxBitmap*) NULL); }; diff --git a/src/mac/carbon/pen.cpp b/src/mac/carbon/pen.cpp index 2502b392fb..65da06087d 100644 --- a/src/mac/carbon/pen.cpp +++ b/src/mac/carbon/pen.cpp @@ -26,7 +26,7 @@ wxPenRefData::wxPenRefData() m_join = wxJOIN_ROUND ; m_cap = wxCAP_ROUND ; m_nbDash = 0 ; - m_dash = 0 ; + m_dash = (wxMACDash*)NULL; /* TODO: null data m_hPen = 0; */ @@ -76,7 +76,7 @@ wxPen::wxPen(const wxColour& col, int Width, int Style) M_PENDATA->m_join = wxJOIN_ROUND ; M_PENDATA->m_cap = wxCAP_ROUND ; M_PENDATA->m_nbDash = 0 ; - M_PENDATA->m_dash = 0 ; + M_PENDATA->m_dash = (wxMACDash*)NULL; RealizeResource(); @@ -94,7 +94,7 @@ wxPen::wxPen(const wxBitmap& stipple, int Width) M_PENDATA->m_join = wxJOIN_ROUND ; M_PENDATA->m_cap = wxCAP_ROUND ; M_PENDATA->m_nbDash = 0 ; - M_PENDATA->m_dash = 0 ; + M_PENDATA->m_dash = (wxMACDash*)NULL; RealizeResource(); @@ -168,7 +168,7 @@ void wxPen::SetDashes(int nb_dashes, const wxDash *Dash) Unshare(); M_PENDATA->m_nbDash = nb_dashes; - M_PENDATA->m_dash = (wxDash *)Dash; + M_PENDATA->m_dash = (wxMACDash *)Dash; RealizeResource(); } diff --git a/src/mac/pen.cpp b/src/mac/pen.cpp index 2502b392fb..65da06087d 100644 --- a/src/mac/pen.cpp +++ b/src/mac/pen.cpp @@ -26,7 +26,7 @@ wxPenRefData::wxPenRefData() m_join = wxJOIN_ROUND ; m_cap = wxCAP_ROUND ; m_nbDash = 0 ; - m_dash = 0 ; + m_dash = (wxMACDash*)NULL; /* TODO: null data m_hPen = 0; */ @@ -76,7 +76,7 @@ wxPen::wxPen(const wxColour& col, int Width, int Style) M_PENDATA->m_join = wxJOIN_ROUND ; M_PENDATA->m_cap = wxCAP_ROUND ; M_PENDATA->m_nbDash = 0 ; - M_PENDATA->m_dash = 0 ; + M_PENDATA->m_dash = (wxMACDash*)NULL; RealizeResource(); @@ -94,7 +94,7 @@ wxPen::wxPen(const wxBitmap& stipple, int Width) M_PENDATA->m_join = wxJOIN_ROUND ; M_PENDATA->m_cap = wxCAP_ROUND ; M_PENDATA->m_nbDash = 0 ; - M_PENDATA->m_dash = 0 ; + M_PENDATA->m_dash = (wxMACDash*)NULL; RealizeResource(); @@ -168,7 +168,7 @@ void wxPen::SetDashes(int nb_dashes, const wxDash *Dash) Unshare(); M_PENDATA->m_nbDash = nb_dashes; - M_PENDATA->m_dash = (wxDash *)Dash; + M_PENDATA->m_dash = (wxMACDash *)Dash; RealizeResource(); } diff --git a/src/motif/dcclient.cpp b/src/motif/dcclient.cpp index ba5e1cdf3c..81df528083 100644 --- a/src/motif/dcclient.cpp +++ b/src/motif/dcclient.cpp @@ -134,7 +134,7 @@ wxWindowDC::wxWindowDC() m_currentPenWidth = 1; m_currentPenJoin = -1; m_currentPenDashCount = -1; - m_currentPenDash = (char*) NULL; + m_currentPenDash = (wxMOTIFDash*) NULL; m_currentStyle = -1; m_currentFill = -1; // m_currentBkMode = wxTRANSPARENT; @@ -159,7 +159,7 @@ wxWindowDC::wxWindowDC( wxWindow *window ) m_currentPenWidth = 1; m_currentPenJoin = -1; m_currentPenDashCount = -1; - m_currentPenDash = (char*) NULL; + m_currentPenDash = (wxMOTIFDash*) NULL; m_currentStyle = -1; m_currentFill = -1; // m_currentBkMode = wxTRANSPARENT; @@ -1514,7 +1514,7 @@ void wxWindowDC::SetPen( const wxPen &pen ) int old_pen_join = m_currentPenJoin; int old_pen_cap = m_currentPenCap; int old_pen_nb_dash = m_currentPenDashCount; - char *old_pen_dash = m_currentPenDash; + wxMOTIFDash *old_pen_dash = m_currentPenDash; wxColour oldPenColour = m_currentColour; m_currentColour = m_pen.GetColour (); @@ -1524,7 +1524,7 @@ void wxWindowDC::SetPen( const wxPen &pen ) m_currentPenJoin = m_pen.GetJoin (); m_currentPenCap = m_pen.GetCap (); m_currentPenDashCount = m_pen.GetDashCount(); - m_currentPenDash = m_pen.GetDash(); + m_currentPenDash = (wxMOTIFDash*)m_pen.GetDash(); if (m_currentStyle == wxSTIPPLE) m_currentStipple = * m_pen.GetStipple (); @@ -1552,15 +1552,15 @@ void wxWindowDC::SetPen( const wxPen &pen ) int style; int join; int cap; - static const char dotted[] = {2, 5}; - static const char short_dashed[] = {4, 4}; - static const char long_dashed[] = {4, 8}; - static const char dotted_dashed[] = {6, 6, 2, 6}; + static const wxMOTIFDash dotted[] = {2, 5}; + static const wxMOTIFDash short_dashed[] = {4, 4}; + static const wxMOTIFDash long_dashed[] = {4, 8}; + static const wxMOTIFDash dotted_dashed[] = {6, 6, 2, 6}; // We express dash pattern in pen width unit, so we are // independent of zoom factor and so on... int req_nb_dash; - const char *req_dash; + const wxMOTIFDash *req_dash; switch (m_pen.GetStyle ()) { @@ -1594,13 +1594,13 @@ void wxWindowDC::SetPen( const wxPen &pen ) case wxTRANSPARENT: default: style = LineSolid; - req_dash = NULL; + req_dash = (wxMOTIFDash*)NULL; req_nb_dash = 0; } if (req_dash && req_nb_dash) { - char *real_req_dash = new char[req_nb_dash]; + wxMOTIFDash *real_req_dash = new wxMOTIFDash[req_nb_dash]; if (real_req_dash) { int factor = scaled_width == 0 ? 1 : scaled_width; diff --git a/src/motif/pen.cpp b/src/motif/pen.cpp index bb5ab62127..3163d410e4 100644 --- a/src/motif/pen.cpp +++ b/src/motif/pen.cpp @@ -26,7 +26,7 @@ wxPenRefData::wxPenRefData() m_join = wxJOIN_ROUND ; m_cap = wxCAP_ROUND ; m_nbDash = 0 ; - m_dash = 0 ; + m_dash = (wxMOTIFDash*)NULL; } wxPenRefData::wxPenRefData(const wxPenRefData& data) @@ -69,7 +69,7 @@ wxPen::wxPen(const wxColour& col, int Width, int Style) M_PENDATA->m_join = wxJOIN_ROUND ; M_PENDATA->m_cap = wxCAP_ROUND ; M_PENDATA->m_nbDash = 0 ; - M_PENDATA->m_dash = 0 ; + M_PENDATA->m_dash = (wxMOTIFDash*)NULL; RealizeResource(); @@ -87,7 +87,7 @@ wxPen::wxPen(const wxBitmap& stipple, int Width) M_PENDATA->m_join = wxJOIN_ROUND ; M_PENDATA->m_cap = wxCAP_ROUND ; M_PENDATA->m_nbDash = 0 ; - M_PENDATA->m_dash = 0 ; + M_PENDATA->m_dash = (wxMOTIFDash*)NULL; RealizeResource(); @@ -161,7 +161,7 @@ void wxPen::SetDashes(int nb_dashes, const wxDash *Dash) Unshare(); M_PENDATA->m_nbDash = nb_dashes; - M_PENDATA->m_dash = (wxDash *)Dash; + M_PENDATA->m_dash = (wxMOTIFDash *)Dash; RealizeResource(); } diff --git a/src/msw/pen.cpp b/src/msw/pen.cpp index fd70094b25..97d1e52b05 100644 --- a/src/msw/pen.cpp +++ b/src/msw/pen.cpp @@ -41,7 +41,7 @@ wxPenRefData::wxPenRefData() m_join = wxJOIN_ROUND ; m_cap = wxCAP_ROUND ; m_nbDash = 0 ; - m_dash = 0 ; + m_dash = (wxMSWDash*)NULL; m_hPen = 0; } @@ -89,7 +89,7 @@ wxPen::wxPen(const wxColour& col, int Width, int Style) M_PENDATA->m_join = wxJOIN_ROUND ; M_PENDATA->m_cap = wxCAP_ROUND ; M_PENDATA->m_nbDash = 0 ; - M_PENDATA->m_dash = 0 ; + M_PENDATA->m_dash = (wxMSWDash*)NULL; M_PENDATA->m_hPen = 0 ; #ifndef __WIN32__ @@ -132,7 +132,7 @@ wxPen::wxPen(const wxBitmap& stipple, int Width) M_PENDATA->m_join = wxJOIN_ROUND ; M_PENDATA->m_cap = wxCAP_ROUND ; M_PENDATA->m_nbDash = 0 ; - M_PENDATA->m_dash = 0 ; + M_PENDATA->m_dash = (wxMSWDash*)NULL; M_PENDATA->m_hPen = 0 ; RealizeResource(); @@ -236,17 +236,17 @@ bool wxPen::RealizeResource() logb.lbColor = ms_colour; - wxDash *real_dash; + wxMSWDash *real_dash; if (M_PENDATA->m_style==wxUSER_DASH && M_PENDATA->m_nbDash && M_PENDATA->m_dash) { - real_dash = new wxDash[M_PENDATA->m_nbDash]; + real_dash = new wxMSWDash[M_PENDATA->m_nbDash]; int i; for (i=0; im_nbDash; i++) - real_dash[i] = M_PENDATA->m_dash[i] * M_PENDATA->m_width; + real_dash[i] = M_PENDATA->m_dash[i] * M_PENDATA->m_width; } else { - real_dash = 0; + real_dash = (wxMSWDash*)NULL; } // Win32s doesn't have ExtCreatePen function... @@ -259,7 +259,7 @@ bool wxPen::RealizeResource() M_PENDATA->m_style==wxUSER_DASH ? M_PENDATA->m_nbDash : 0, - (const DWORD*)real_dash ); + real_dash ); } else { @@ -377,7 +377,7 @@ void wxPen::SetDashes(int nb_dashes, const wxDash *Dash) Unshare(); M_PENDATA->m_nbDash = nb_dashes; - M_PENDATA->m_dash = (wxDash *)Dash; + M_PENDATA->m_dash = (wxMSWDash *)Dash; RealizeResource(); } diff --git a/src/os2/pen.cpp b/src/os2/pen.cpp index 905a09021b..1e99b340b2 100644 --- a/src/os2/pen.cpp +++ b/src/os2/pen.cpp @@ -33,7 +33,7 @@ wxPenRefData::wxPenRefData() m_join = wxJOIN_ROUND ; m_cap = wxCAP_ROUND ; m_nbDash = 0 ; - m_dash = 0 ; + m_dash = (wxPMDash*)NULL; m_hPen = 0; } @@ -82,7 +82,7 @@ wxPen::wxPen(const wxColour& col, int Width, int Style) M_PENDATA->m_join = wxJOIN_ROUND ; M_PENDATA->m_cap = wxCAP_ROUND ; M_PENDATA->m_nbDash = 0 ; - M_PENDATA->m_dash = 0 ; + M_PENDATA->m_dash = (wxPMDash*)NULL; M_PENDATA->m_hPen = 0 ; // TODO: @@ -108,7 +108,7 @@ wxPen::wxPen(const wxBitmap& stipple, int Width) M_PENDATA->m_join = wxJOIN_ROUND ; M_PENDATA->m_cap = wxCAP_ROUND ; M_PENDATA->m_nbDash = 0 ; - M_PENDATA->m_dash = 0 ; + M_PENDATA->m_dash = (wxPMDash*)NULL; M_PENDATA->m_hPen = 0 ; RealizeResource(); @@ -213,7 +213,7 @@ void wxPen::SetDashes(int nb_dashes, const wxDash *Dash) Unshare(); M_PENDATA->m_nbDash = nb_dashes; - M_PENDATA->m_dash = (wxDash *)Dash; + M_PENDATA->m_dash = (wxPMDash *)Dash; RealizeResource(); } diff --git a/src/qt/pen.cpp b/src/qt/pen.cpp index 90cb80f41d..9ff7032fb2 100644 --- a/src/qt/pen.cpp +++ b/src/qt/pen.cpp @@ -26,7 +26,7 @@ wxPenRefData::wxPenRefData() m_join = wxJOIN_ROUND ; m_cap = wxCAP_ROUND ; m_nbDash = 0 ; - m_dash = 0 ; + m_dash = (wxQTDash*)NULL; /* TODO: null data m_hPen = 0; */ @@ -76,7 +76,7 @@ wxPen::wxPen(const wxColour& col, int Width, int Style) M_PENDATA->m_join = wxJOIN_ROUND ; M_PENDATA->m_cap = wxCAP_ROUND ; M_PENDATA->m_nbDash = 0 ; - M_PENDATA->m_dash = 0 ; + M_PENDATA->m_dash = (wxQTDash*)NULL; RealizeResource(); @@ -94,7 +94,7 @@ wxPen::wxPen(const wxBitmap& stipple, int Width) M_PENDATA->m_join = wxJOIN_ROUND ; M_PENDATA->m_cap = wxCAP_ROUND ; M_PENDATA->m_nbDash = 0 ; - M_PENDATA->m_dash = 0 ; + M_PENDATA->m_dash = (wxQTDash*)NULL; RealizeResource(); @@ -112,7 +112,7 @@ wxPen::wxPen(const wxString& col, int Width, int Style) M_PENDATA->m_join = wxJOIN_ROUND ; M_PENDATA->m_cap = wxCAP_ROUND ; M_PENDATA->m_nbDash = 0 ; - M_PENDATA->m_dash = 0 ; + M_PENDATA->m_dash = (wxQTDash*)NULL; RealizeResource(); @@ -195,7 +195,7 @@ void wxPen::SetDashes(int nb_dashes, const wxDash *Dash) Unshare(); M_PENDATA->m_nbDash = nb_dashes; - M_PENDATA->m_dash = (wxDash *)Dash; + M_PENDATA->m_dash = (wxQTDash *)Dash; RealizeResource(); } diff --git a/src/stubs/pen.cpp b/src/stubs/pen.cpp index 2502b392fb..ff76f284a4 100644 --- a/src/stubs/pen.cpp +++ b/src/stubs/pen.cpp @@ -26,7 +26,7 @@ wxPenRefData::wxPenRefData() m_join = wxJOIN_ROUND ; m_cap = wxCAP_ROUND ; m_nbDash = 0 ; - m_dash = 0 ; + m_dash = (wxXSTUBXDash*)NULL; /* TODO: null data m_hPen = 0; */ @@ -76,7 +76,7 @@ wxPen::wxPen(const wxColour& col, int Width, int Style) M_PENDATA->m_join = wxJOIN_ROUND ; M_PENDATA->m_cap = wxCAP_ROUND ; M_PENDATA->m_nbDash = 0 ; - M_PENDATA->m_dash = 0 ; + M_PENDATA->m_dash = (wxXSTUBXDash*)NULL; RealizeResource(); @@ -94,7 +94,7 @@ wxPen::wxPen(const wxBitmap& stipple, int Width) M_PENDATA->m_join = wxJOIN_ROUND ; M_PENDATA->m_cap = wxCAP_ROUND ; M_PENDATA->m_nbDash = 0 ; - M_PENDATA->m_dash = 0 ; + M_PENDATA->m_dash = (wxXSTUBXDash*)NULL; RealizeResource(); @@ -168,7 +168,7 @@ void wxPen::SetDashes(int nb_dashes, const wxDash *Dash) Unshare(); M_PENDATA->m_nbDash = nb_dashes; - M_PENDATA->m_dash = (wxDash *)Dash; + M_PENDATA->m_dash = (wxXSTUBXDash*)Dash; RealizeResource(); } -- 2.47.2