]> git.saurik.com Git - wxWidgets.git/commitdiff
Include wx/region.h according to precompiled headers of wx/wx.h (with other minor...
authorWłodzimierz Skiba <abx@abx.art.pl>
Fri, 16 Jun 2006 07:14:51 +0000 (07:14 +0000)
committerWłodzimierz Skiba <abx@abx.art.pl>
Fri, 16 Jun 2006 07:14:51 +0000 (07:14 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@39760 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

14 files changed:
include/wx/wx.h
src/cocoa/region.mm
src/gtk/region.cpp
src/mac/carbon/dc.cpp
src/mac/carbon/dccg.cpp
src/mac/carbon/dcclient.cpp
src/mac/carbon/region.cpp
src/mac/classic/dc.cpp
src/mac/classic/dcclient.cpp
src/mac/classic/region.cpp
src/mgl/region.cpp
src/msw/region.cpp
src/palmos/region.cpp
src/x11/utilsx.cpp

index e204e289af0ca8ed16e139f06a6d8d9b0ef35751..5f6ef4a99f1fd65015ece4ab3dabab0882509323 100644 (file)
@@ -34,6 +34,7 @@
 #include "wx/panel.h"
 #include "wx/toplevel.h"
 #include "wx/frame.h"
+#include "wx/region.h"
 #include "wx/bitmap.h"
 #include "wx/colour.h"
 #include "wx/font.h"
@@ -93,4 +94,3 @@
 #endif // wxUSE_GUI
 
 #endif // _WX_WX_H_
-
index b8ed91676fdc735d3623f818fe37f9718d6e903b..14cd20984f5e564c2f637418c555635e653c0d54 100644 (file)
@@ -1,14 +1,25 @@
 /////////////////////////////////////////////////////////////////////////////
-// Name:        cocoa/region.mm
+// Name:        src/cocoa/region.mm
 // Purpose:     wxRegion class
 // Author:      David Elliott
-// Modified by: 
+// Modified by:
 // Created:     2004/04/12
 // RCS-ID:      $Id$
 // Copyright:   (c) 2004 David Elliott
 // Licence:     wxWidgets licence
 /////////////////////////////////////////////////////////////////////////////
 
+// ============================================================================
+// declarations
+// ============================================================================
+
+// ----------------------------------------------------------------------------
+// headers
+// ----------------------------------------------------------------------------
+
+// For compilers that support precompilation, includes "wx.h".
+#include "wx/wxprec.h"
+
 #include "wx/region.h"
 
 #import <Foundation/NSGeometry.h>
@@ -33,4 +44,3 @@ wxRegion::wxRegion(const NSRect *rects, int count)
         Union(NSRectToWxRect(rects[i]));
     }
 }
-
index 4db9d7755f11db37bf19685302a4fe9a0ac15866..0fd5a8ac44b7ab088d2f2f204c32ba5888ae81b0 100644 (file)
 // For compilers that support precompilation, includes "wx.h".
 #include "wx/wxprec.h"
 
+#include "wx/region.h"
+
 #ifndef WX_PRECOMP
     #include "wx/log.h"
 #endif
 
-#include "wx/region.h"
 #include "wx/gtk/private.h"
 
 
@@ -134,9 +135,9 @@ wxObjectRefData *wxRegion::CloneRefData(const wxObjectRefData *data) const
 
 bool wxRegion::operator==( const wxRegion& region ) const
 {
-    if (m_refData == region.m_refData) return TRUE;
+    if (m_refData == region.m_refData) return true;
 
-    if (!m_refData || !region.m_refData) return FALSE;
+    if (!m_refData || !region.m_refData) return false;
 
     // compare the regions themselves, not the pointers to ref data!
     return gdk_region_equal(M_REGIONDATA->m_region,
@@ -158,7 +159,7 @@ bool wxRegion::Union( wxCoord x, wxCoord y, wxCoord width, wxCoord height )
     // rectangle results in an empty region which is definitely not what we
     // want
     if ( !width || !height )
-        return TRUE;
+        return true;
 
     if ( !m_refData )
     {
@@ -177,7 +178,7 @@ bool wxRegion::Union( wxCoord x, wxCoord y, wxCoord width, wxCoord height )
         gdk_region_union_with_rect( M_REGIONDATA->m_region, &rect );
     }
 
-    return TRUE;
+    return true;
 }
 
 bool wxRegion::Union( const wxRect& rect )
@@ -188,7 +189,7 @@ bool wxRegion::Union( const wxRect& rect )
 bool wxRegion::Union( const wxRegion& region )
 {
     if (region.IsNull())
-        return FALSE;
+        return false;
 
     if (!m_refData)
     {
@@ -202,7 +203,7 @@ bool wxRegion::Union( const wxRegion& region )
 
     gdk_region_union( M_REGIONDATA->m_region, region.GetRegion() );
 
-    return TRUE;
+    return true;
 }
 
 bool wxRegion::Intersect( wxCoord x, wxCoord y, wxCoord width, wxCoord height )
@@ -222,19 +223,19 @@ bool wxRegion::Intersect( const wxRect& rect )
 bool wxRegion::Intersect( const wxRegion& region )
 {
     if (region.IsNull())
-        return FALSE;
+        return false;
 
     if (!m_refData)
     {
         // intersecting with invalid region doesn't make sense
-        return FALSE;
+        return false;
     }
 
     AllocExclusive();
 
     gdk_region_intersect( M_REGIONDATA->m_region, region.GetRegion() );
 
-    return TRUE;
+    return true;
 }
 
 bool wxRegion::Subtract( wxCoord x, wxCoord y, wxCoord width, wxCoord height )
@@ -252,19 +253,19 @@ bool wxRegion::Subtract( const wxRect& rect )
 bool wxRegion::Subtract( const wxRegion& region )
 {
     if (region.IsNull())
-        return FALSE;
+        return false;
 
     if (!m_refData)
     {
         // subtracting from an invalid region doesn't make sense
-        return FALSE;
+        return false;
     }
 
     AllocExclusive();
 
     gdk_region_subtract( M_REGIONDATA->m_region, region.GetRegion() );
 
-    return TRUE;
+    return true;
 }
 
 bool wxRegion::Xor( wxCoord x, wxCoord y, wxCoord width, wxCoord height )
@@ -282,30 +283,30 @@ bool wxRegion::Xor( const wxRect& rect )
 bool wxRegion::Xor( const wxRegion& region )
 {
     if (region.IsNull())
-        return FALSE;
+        return false;
 
     if (!m_refData)
     {
-        return FALSE;
+        return false;
     }
 
     AllocExclusive();
 
     gdk_region_xor( M_REGIONDATA->m_region, region.GetRegion() );
 
-    return TRUE;
+    return true;
 }
 
 bool wxRegion::Offset( wxCoord x, wxCoord y )
 {
     if (!m_refData)
-        return FALSE;
+        return false;
 
     AllocExclusive();
 
     gdk_region_offset( M_REGIONDATA->m_region, x, y );
 
-    return TRUE;
+    return true;
 }
 
 // ----------------------------------------------------------------------------
@@ -342,7 +343,7 @@ wxRect wxRegion::GetBox() const
 bool wxRegion::Empty() const
 {
     if (!m_refData)
-        return TRUE;
+        return true;
 
     return gdk_region_empty( M_REGIONDATA->m_region );
 }
index 76717f4b4c0e6579958cdf08e570fd934ea80fda..7140e82d7eb80ffe6f5124c4f0771ea243181dce 100644 (file)
     #include "wx/app.h"
     #include "wx/dcmemory.h"
     #include "wx/dcprint.h"
+    #include "wx/region.h"
 #endif
 
 #include "wx/mac/uma.h"
-#include "wx/region.h"
 #include "wx/image.h"
 
 #ifdef __MSL__
index fb97b10859065a19ff320a384606eaf4fc9ba355..beddc49b5cca55526b2768cec4cbac30a104e06c 100755 (executable)
     #include "wx/app.h"
     #include "wx/dcmemory.h"
     #include "wx/dcprint.h"
+    #include "wx/region.h"
 #endif
 
 #include "wx/mac/uma.h"
-#include "wx/region.h"
 #include "wx/image.h"
 
 
index c05e9768545a91a2b09508c97140742962474d32..0e0b775e920e6581fb1ee20d4c66dac84013765e 100644 (file)
@@ -20,9 +20,9 @@
     #include "wx/settings.h"
     #include "wx/toplevel.h"
     #include "wx/math.h"
+    #include "wx/region.h"
 #endif
 
-#include "wx/region.h"
 #include "wx/mac/private.h"
 
 //-----------------------------------------------------------------------------
index b20a78b000cd46b2233b330a94f376a9586d71d5..a123e2a6479166674ff368e3d5836d29ee699da1 100644 (file)
@@ -1,5 +1,5 @@
 /////////////////////////////////////////////////////////////////////////////
-// File:      region.cpp
+// File:      src/mac/carbon/region.cpp
 // Purpose:   Region class
 // Author:    Stefan Csomor
 // Created:   Fri Oct 24 10:46:34 MET 1997
@@ -11,6 +11,7 @@
 #include "wx/wxprec.h"
 
 #include "wx/region.h"
+
 #include "wx/gdicmn.h"
 #include "wx/mac/uma.h"
 
@@ -512,7 +513,7 @@ wxRegionIterator& wxRegionIterator::operator ++ ()
 {
     if (m_current < m_numRects)
         ++m_current;
-    
+
     return *this;
 }
 
@@ -561,4 +562,3 @@ long wxRegionIterator::GetH() const
 
     return 0;
 }
-
index b368d67128641bb0da49da5b6bb2caa124d372ed..8d1e1762df203e22d8c78fd8724888d8925e59d9 100644 (file)
     #include "wx/app.h"
     #include "wx/dcmemory.h"
     #include "wx/dcprint.h"
+    #include "wx/region.h"
 #endif
 
 #include "wx/mac/uma.h"
-#include "wx/region.h"
 #include "wx/image.h"
 
 #if __MSL__ >= 0x6000
index a76be690b6c2e40e255bdf816843a8661a3e3b4d..9d7133b6e8597c5760c8569654951e24e6472d75 100644 (file)
@@ -18,9 +18,9 @@
     #include "wx/dcmemory.h"
     #include "wx/toplevel.h"
     #include "wx/math.h"
+    #include "wx/region.h"
 #endif
 
-#include "wx/region.h"
 #include "wx/mac/private.h"
 
 //-----------------------------------------------------------------------------
index 8920707ed2344150c88a0cfa4f99dedbb1abe7b3..4bfadfd5bbca254f1f2349187ba2c16bad0ab9d6 100644 (file)
@@ -1,5 +1,5 @@
 /////////////////////////////////////////////////////////////////////////////
-// File:      region.cpp
+// File:      src/mac/classic/region.cpp
 // Purpose:   Region class
 // Author:    Stefan Csomor
 // Created:   Fri Oct 24 10:46:34 MET 1997
@@ -8,7 +8,10 @@
 // Licence:   wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
 
+#include "wx/wxprec.h"
+
 #include "wx/region.h"
+
 #include "wx/gdicmn.h"
 #include "wx/mac/uma.h"
 
@@ -101,11 +104,11 @@ void wxRegion::Clear()
 bool wxRegion::Combine(long x, long y, long width, long height, wxRegionOp op)
 {
     // Don't change shared data
-    if (!m_refData) 
+    if (!m_refData)
     {
         m_refData = new wxRegionRefData();
-    } 
-    else if (m_refData->GetRefCount() > 1) 
+    }
+    else if (m_refData->GetRefCount() > 1)
     {
         wxRegionRefData* ref = (wxRegionRefData*)m_refData;
         UnRef();
@@ -113,7 +116,7 @@ bool wxRegion::Combine(long x, long y, long width, long height, wxRegionOp op)
     }
     RgnHandle rgn = NewRgn() ;
         SetRectRgn( rgn , x , y, x+width,y + height ) ;
-        
+
     switch (op)
     {
         case wxRGN_AND:
@@ -136,20 +139,20 @@ bool wxRegion::Combine(long x, long y, long width, long height, wxRegionOp op)
 
         DisposeRgn( rgn ) ;
 
-    return TRUE;
+    return true;
 }
 
 //! Union /e region with this.
 bool wxRegion::Combine(const wxRegion& region, wxRegionOp op)
 {
     if (region.Empty())
-        return FALSE;
+        return false;
 
     // Don't change shared data
     if (!m_refData) {
         m_refData = new wxRegionRefData();
-    } 
-    else    if (m_refData->GetRefCount() > 1) 
+    }
+    else if (m_refData->GetRefCount() > 1)
     {
         wxRegionRefData* ref = (wxRegionRefData*)m_refData;
         UnRef();
@@ -176,7 +179,7 @@ bool wxRegion::Combine(const wxRegion& region, wxRegionOp op)
             break ;
     }
 
-    return TRUE;
+    return true;
 }
 
 bool wxRegion::Combine(const wxRect& rect, wxRegionOp op)
@@ -191,7 +194,7 @@ bool wxRegion::Combine(const wxRect& rect, wxRegionOp op)
 // Outer bounds of region
 void wxRegion::GetBox(wxCoord& x, wxCoord& y, wxCoord& w, wxCoord& h) const
 {
-    if (m_refData) 
+    if (m_refData)
     {
         Rect box ;
         GetRegionBounds( M_REGION , &box ) ;
@@ -199,8 +202,8 @@ void wxRegion::GetBox(wxCoord& x, wxCoord& y, wxCoord& w, wxCoord& h) const
         y = box.top ;
         w = box.right - box.left ;
         h = box.bottom - box.top ;
-    } 
-    else 
+    }
+    else
     {
         x = y = w = h = 0;
     }
@@ -249,7 +252,7 @@ wxRegionContain wxRegion::Contains(const wxPoint& pt) const
     Point p = { pt.y , pt.x } ;
     if (PtInRgn( p , M_REGION ) )
         return wxInRegion;
-        
+
     return wxOutRegion;
 }
 
@@ -428,4 +431,3 @@ long wxRegionIterator::GetH() const
         return m_rects[m_current].height;
     return 0;
 }
-
index bd1da90543a09e97ad8b1992adead768e03ab8af..78b688a6cb41bdeba3833be88d571aab198b2ded 100644 (file)
@@ -15,6 +15,7 @@
 #endif
 
 #include "wx/region.h"
+
 #include "wx/gdicmn.h"
 #include "wx/thread.h"
 #include "wx/module.h"
index eb6e6721597a46808fe732d68502012340dfa7e1..df3273df82423fb75378e131cd801de9fc7d9a4f 100644 (file)
@@ -1,5 +1,5 @@
 /////////////////////////////////////////////////////////////////////////////
-// Name:      msw/region.cpp
+// Name:      src/msw/region.cpp
 // Purpose:   wxRegion implementation using Win32 API
 // Author:    Vadim Zeitlin
 // Modified by:
@@ -25,8 +25,8 @@
 #endif
 
 #include "wx/region.h"
-#include "wx/gdicmn.h"
 
+#include "wx/gdicmn.h"
 #include "wx/msw/private.h"
 
 IMPLEMENT_DYNAMIC_CLASS(wxRegion, wxGDIObject)
@@ -491,4 +491,3 @@ wxCoord wxRegionIterator::GetH() const
 
     return m_rects[m_current].height;
 }
-
index fdbffa9f08f4b284b31b83e4088dfd19fdcf616e..64e726b9977b395d8d0dbdbb708a450dda9a0268 100644 (file)
@@ -1,12 +1,12 @@
 /////////////////////////////////////////////////////////////////////////////
-// Name:      src/palmos/region.cpp
-// Purpose:   wxRegion implementation
+// Name:        src/palmos/region.cpp
+// Purpose:     wxRegion implementation
 // Author:      William Osborne - minimal working wxPalmOS port
 // Modified by:
-// Created:   10/13/04
-// RCS-ID:    $Id$
-// Copyright: (c) William Osborne
-// Licence:   wxWindows licence
+// Created:     10/13/04
+// RCS-ID:      $Id$
+// Copyright:   (c) William Osborne
+// Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
 
 // ============================================================================
@@ -25,6 +25,7 @@
 #endif
 
 #include "wx/region.h"
+
 #include "wx/gdicmn.h"
 
 IMPLEMENT_DYNAMIC_CLASS(wxRegion, wxGDIObject)
@@ -236,4 +237,3 @@ wxCoord wxRegionIterator::GetH() const
 {
     return 0;
 }
-
index ff17f168e78011fdfd805eec992301fed6928383..c01eeb8af8195e2b5a7f149a9fc84cd695e1e246 100644 (file)
@@ -23,6 +23,7 @@
 
     #ifndef WX_PRECOMP
         #include "wx/bitmap.h"
+        #include "wx/region.h"
     #endif
 
     #ifdef __VMS
@@ -32,7 +33,6 @@
         #include <X11/extensions/shape.h>
     #endif
 
-    #include "wx/region.h"
     #include "wx/dcmemory.h"
 #endif