X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/f3ebca94dddd57008b48c466d3e4919ba4e6a6f4..a7d5151df02bf70a9f6ff1c5c7fd33ab07bf409c:/src/msw/pen.cpp diff --git a/src/msw/pen.cpp b/src/msw/pen.cpp index d072864e47..e3609b79bb 100644 --- a/src/msw/pen.cpp +++ b/src/msw/pen.cpp @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////////// -// Name: msw/pen.cpp +// Name: src/msw/pen.cpp // Purpose: wxPen // Author: Julian Smart // Modified by: @@ -9,10 +9,6 @@ // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// -#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) -#pragma implementation "pen.h" -#endif - // For compilers that support precompilation, includes "wx.h". #include "wx/wxprec.h" @@ -263,41 +259,41 @@ bool wxPen::RealizeResource() WXHANDLE wxPen::GetResourceHandle() const { - if ( !M_PENDATA ) - return 0; - else - return (WXHANDLE)M_PENDATA->m_hPen; + if ( !M_PENDATA ) + return 0; + else + return (WXHANDLE)M_PENDATA->m_hPen; } bool wxPen::FreeResource(bool WXUNUSED(force)) { - if (M_PENDATA && (M_PENDATA->m_hPen != 0)) - { - DeleteObject((HPEN) M_PENDATA->m_hPen); - M_PENDATA->m_hPen = 0; - return true; - } - else return false; + if (M_PENDATA && (M_PENDATA->m_hPen != 0)) + { + DeleteObject((HPEN) M_PENDATA->m_hPen); + M_PENDATA->m_hPen = 0; + return true; + } + else return false; } bool wxPen::IsFree() const { - return (M_PENDATA && M_PENDATA->m_hPen == 0); + return (M_PENDATA && M_PENDATA->m_hPen == 0); } void wxPen::Unshare() { - // Don't change shared data - if (!m_refData) + // Don't change shared data + if (!m_refData) { - m_refData = new wxPenRefData(); - } + m_refData = new wxPenRefData(); + } else { - wxPenRefData* ref = new wxPenRefData(*(wxPenRefData*)m_refData); - UnRef(); - m_refData = ref; - } + wxPenRefData* ref = new wxPenRefData(*(wxPenRefData*)m_refData); + UnRef(); + m_refData = ref; + } } void wxPen::SetColour(const wxColour& col) @@ -401,4 +397,3 @@ int wx2msPenStyle(int wx_style) #endif return PS_SOLID; } -