Include wx/region.h according to precompiled headers of wx/wx.h (with other minor cleaning).

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@39760 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Włodzimierz Skiba
2006-06-16 07:14:51 +00:00
parent 32c62191d7
commit b3a44e057b
14 changed files with 70 additions and 57 deletions

View 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_

View File

@@ -1,5 +1,5 @@
/////////////////////////////////////////////////////////////////////////////
// Name: cocoa/region.mm
// Name: src/cocoa/region.mm
// Purpose: wxRegion class
// Author: David Elliott
// Modified by:
@@ -9,6 +9,17 @@
// 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]));
}
}

View File

@@ -19,11 +19,12 @@
// 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 );
}

View File

@@ -20,10 +20,10 @@
#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__

View File

@@ -20,10 +20,10 @@
#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"

View 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"
//-----------------------------------------------------------------------------

View 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"
@@ -561,4 +562,3 @@ long wxRegionIterator::GetH() const
return 0;
}

View File

@@ -18,10 +18,10 @@
#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

View 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"
//-----------------------------------------------------------------------------

View 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"
@@ -136,14 +139,14 @@ 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) {
@@ -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)
@@ -428,4 +431,3 @@ long wxRegionIterator::GetH() const
return m_rects[m_current].height;
return 0;
}

View File

@@ -15,6 +15,7 @@
#endif
#include "wx/region.h"
#include "wx/gdicmn.h"
#include "wx/thread.h"
#include "wx/module.h"

View 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;
}

View File

@@ -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;
}

View 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