From f38924e863cd44e2abd49d20d201d72aa773c51e Mon Sep 17 00:00:00 2001 From: =?utf8?q?W=C5=82odzimierz=20Skiba?= Date: Mon, 8 May 2006 07:58:37 +0000 Subject: [PATCH] Include wx/dcmemory.h according to precompiled headers of wx/wx.h (with other minor cleaning). git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@39106 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/cocoa/dcmemory.mm | 7 ++++--- src/common/effects.cpp | 12 ++++++++---- src/common/rgncmn.cpp | 15 ++++++++++----- src/generic/dcpsg.cpp | 2 +- src/gtk/bitmap.cpp | 2 +- src/gtk/dcclient.cpp | 2 +- src/gtk/dcmemory.cpp | 12 +++++------- src/gtk/gnome/gprint.cpp | 2 +- src/gtk1/bitmap.cpp | 2 +- src/gtk1/dcclient.cpp | 2 +- src/gtk1/dcmemory.cpp | 14 ++++++-------- src/html/htmlwin.cpp | 2 +- src/mac/carbon/bitmap.cpp | 2 +- src/mac/carbon/dataobj.cpp | 2 +- src/mac/carbon/dc.cpp | 2 +- src/mac/carbon/dccg.cpp | 2 +- src/mac/carbon/dcclient.cpp | 2 +- src/mac/carbon/dcmemory.cpp | 15 ++++++++------- src/mac/carbon/taskbar.cpp | 12 ++++++++---- src/mac/classic/dc.cpp | 2 +- src/mac/classic/dcclient.cpp | 2 +- src/mac/classic/dcmemory.cpp | 27 ++++++++++++++------------- src/mgl/bitmap.cpp | 2 +- src/mgl/dcmemory.cpp | 8 ++++---- src/motif/dc.cpp | 5 ++++- src/motif/dcclient.cpp | 2 +- src/motif/utils.cpp | 2 +- src/msw/dcmemory.cpp | 7 +++---- src/msw/notebook.cpp | 2 +- src/msw/ownerdrw.cpp | 24 +++++++++++------------- src/msw/statbox.cpp | 8 ++++---- src/os2/checklst.cpp | 2 +- src/os2/dcmemory.cpp | 4 ++-- src/os2/ownerdrw.cpp | 22 +++++++++++----------- src/palmos/dcmemory.cpp | 5 ++--- src/palmos/ownerdrw.cpp | 15 +++++++-------- src/univ/notebook.cpp | 8 ++++++-- src/x11/bitmap.cpp | 4 +--- src/x11/dc.cpp | 5 ++++- src/x11/dcclient.cpp | 2 +- 40 files changed, 142 insertions(+), 127 deletions(-) diff --git a/src/cocoa/dcmemory.mm b/src/cocoa/dcmemory.mm index 0f2f04c365..218fb4ff8e 100644 --- a/src/cocoa/dcmemory.mm +++ b/src/cocoa/dcmemory.mm @@ -6,10 +6,11 @@ // Created: 2003/03/16 // RCS-ID: $Id$ // Copyright: (c) 2002 David Elliott -// Licence: wxWidgets licence +// Licence: wxWidgets licence ///////////////////////////////////////////////////////////////////////////// #include "wx/wxprec.h" + #ifndef WX_PRECOMP #include "wx/log.h" #include "wx/dcmemory.h" @@ -103,7 +104,7 @@ void wxMemoryDC::SelectObject( const wxBitmap& bitmap ) operation: NSCompositeCopy fraction: 1.0]; [m_cocoaNSImage unlockFocus]; - + [nsimage release]; } } @@ -149,7 +150,7 @@ bool wxMemoryDC::CocoaDoBlitOnFocusedDC(wxCoord xdest, wxCoord ydest, width, height) operation: NSCompositeCopy // FIXME: raster ops fraction: 1.0]; - + [context restoreGraphicsState]; return false; } diff --git a/src/common/effects.cpp b/src/common/effects.cpp index 5a7ac476e0..ed11c6934d 100644 --- a/src/common/effects.cpp +++ b/src/common/effects.cpp @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////////// -// Name: effects.cpp +// Name: src/common/effects.cpp // Purpose: wxEffects implementation // Author: Julian Smart // Modified by: @@ -13,14 +13,18 @@ #include "wx/wxprec.h" #ifdef __BORLANDC__ -#pragma hdrstop + #pragma hdrstop #endif +#include "wx/effects.h" + +#ifndef WX_PRECOMP + #include "wx/dcmemory.h" +#endif //WX_PRECOMP + #include "wx/gdicmn.h" #include "wx/pen.h" -#include "wx/dcmemory.h" #include "wx/settings.h" -#include "wx/effects.h" /* * wxEffects: various 3D effects diff --git a/src/common/rgncmn.cpp b/src/common/rgncmn.cpp index b06227cc24..a32f24e8cf 100644 --- a/src/common/rgncmn.cpp +++ b/src/common/rgncmn.cpp @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////////// -// Name: rgncmn.cpp +// Name: src/common/rgncmn.cpp // Purpose: Methods of wxRegion that have a generic implementation // Author: Robin Dunn // Modified by: @@ -13,15 +13,20 @@ #include "wx/wxprec.h" #ifdef __BORLANDC__ -#pragma hdrstop + #pragma hdrstop #endif #include "wx/region.h" + +#ifndef WX_PRECOMP + #include "wx/dcmemory.h" +#endif //WX_PRECOMP + #include "wx/bitmap.h" + #if wxUSE_IMAGE -#include "wx/image.h" + #include "wx/image.h" #endif -#include "wx/dcmemory.h" //--------------------------------------------------------------------------- @@ -131,7 +136,7 @@ bool wxRegion::Union(const wxBitmap& bmp, tolerance); #else return false; -#endif +#endif } #else diff --git a/src/generic/dcpsg.cpp b/src/generic/dcpsg.cpp index 266b12c3a8..62c685559c 100644 --- a/src/generic/dcpsg.cpp +++ b/src/generic/dcpsg.cpp @@ -24,9 +24,9 @@ #include "wx/log.h" #include "wx/app.h" #include "wx/utils.h" + #include "wx/dcmemory.h" #endif // WX_PRECOMP -#include "wx/dcmemory.h" #include "wx/image.h" #include "wx/prntbase.h" #include "wx/generic/prntdlgg.h" diff --git a/src/gtk/bitmap.cpp b/src/gtk/bitmap.cpp index eb638d4944..4a0e1111f1 100644 --- a/src/gtk/bitmap.cpp +++ b/src/gtk/bitmap.cpp @@ -12,6 +12,7 @@ #ifndef WX_PRECOMP #include "wx/app.h" + #include "wx/dcmemory.h" #endif #include "wx/bitmap.h" @@ -19,7 +20,6 @@ #include "wx/icon.h" #include "wx/filefn.h" #include "wx/image.h" -#include "wx/dcmemory.h" #include "wx/rawbmp.h" // need this to get gdk_image_new_bitmap() diff --git a/src/gtk/dcclient.cpp b/src/gtk/dcclient.cpp index 6df12003f0..cfb49766cd 100644 --- a/src/gtk/dcclient.cpp +++ b/src/gtk/dcclient.cpp @@ -18,9 +18,9 @@ #ifndef WX_PRECOMP #include "wx/log.h" + #include "wx/dcmemory.h" #endif -#include "wx/dcmemory.h" #include "wx/image.h" #include "wx/module.h" #include "wx/fontutil.h" diff --git a/src/gtk/dcmemory.cpp b/src/gtk/dcmemory.cpp index 3894dd4f2e..c758430a63 100644 --- a/src/gtk/dcmemory.cpp +++ b/src/gtk/dcmemory.cpp @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////////// -// Name: dcmemory.cpp +// Name: src/gtk/dcmemory.cpp // Purpose: // Author: Robert Roebling // RCS-ID: $Id$ @@ -23,7 +23,7 @@ IMPLEMENT_DYNAMIC_CLASS(wxMemoryDC,wxWindowDC) wxMemoryDC::wxMemoryDC() : wxWindowDC() { - m_ok = FALSE; + m_ok = false; m_cmap = gtk_widget_get_default_colormap(); @@ -38,7 +38,7 @@ wxMemoryDC::wxMemoryDC() : wxWindowDC() wxMemoryDC::wxMemoryDC( wxDC *WXUNUSED(dc) ) : wxWindowDC() { - m_ok = FALSE; + m_ok = false; m_cmap = gtk_widget_get_default_colormap(); @@ -70,13 +70,13 @@ void wxMemoryDC::SelectObject( const wxBitmap& bitmap ) m_selected.PurgeOtherRepresentations(wxBitmap::Pixmap); - m_isMemDC = TRUE; + m_isMemDC = true; SetUpDC(); } else { - m_ok = FALSE; + m_ok = false; m_window = (GdkWindow *) NULL; } } @@ -158,5 +158,3 @@ void wxMemoryDC::DoGetSize( int *width, int *height ) const if (height) (*height) = 0; } } - - diff --git a/src/gtk/gnome/gprint.cpp b/src/gtk/gnome/gprint.cpp index 8c09929a65..cf2ebd86bc 100644 --- a/src/gtk/gnome/gprint.cpp +++ b/src/gtk/gnome/gprint.cpp @@ -21,6 +21,7 @@ #ifndef WX_PRECOMP #include "wx/log.h" + #include "wx/dcmemory.h" #endif #include "wx/math.h" @@ -28,7 +29,6 @@ #include "wx/gtk/private.h" #include "wx/module.h" #include "wx/dynlib.h" -#include "wx/dcmemory.h" #include "wx/icon.h" #include diff --git a/src/gtk1/bitmap.cpp b/src/gtk1/bitmap.cpp index facb2e7204..492e8751bb 100644 --- a/src/gtk1/bitmap.cpp +++ b/src/gtk1/bitmap.cpp @@ -14,13 +14,13 @@ #ifndef WX_PRECOMP #include "wx/app.h" + #include "wx/dcmemory.h" #endif // WX_PRECOMP #include "wx/palette.h" #include "wx/icon.h" #include "wx/filefn.h" #include "wx/image.h" -#include "wx/dcmemory.h" #include #include diff --git a/src/gtk1/dcclient.cpp b/src/gtk1/dcclient.cpp index b326e0d152..9d579b0bb6 100644 --- a/src/gtk1/dcclient.cpp +++ b/src/gtk1/dcclient.cpp @@ -18,9 +18,9 @@ #ifndef WX_PRECOMP #include "wx/log.h" + #include "wx/dcmemory.h" #endif -#include "wx/dcmemory.h" #include "wx/image.h" #include "wx/module.h" #include "wx/fontutil.h" diff --git a/src/gtk1/dcmemory.cpp b/src/gtk1/dcmemory.cpp index 977e3d22fd..713e58e881 100644 --- a/src/gtk1/dcmemory.cpp +++ b/src/gtk1/dcmemory.cpp @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////////// -// Name: dcmemory.cpp +// Name: src/gtk1/dcmemory.cpp // Purpose: // Author: Robert Roebling // RCS-ID: $Id$ @@ -23,15 +23,15 @@ IMPLEMENT_DYNAMIC_CLASS(wxMemoryDC,wxWindowDC) wxMemoryDC::wxMemoryDC() : wxWindowDC() { - m_ok = FALSE; + m_ok = false; m_cmap = gtk_widget_get_default_colormap(); } wxMemoryDC::wxMemoryDC( wxDC *WXUNUSED(dc) ) - : wxWindowDC() + : wxWindowDC() { - m_ok = FALSE; + m_ok = false; m_cmap = gtk_widget_get_default_colormap(); @@ -56,13 +56,13 @@ void wxMemoryDC::SelectObject( const wxBitmap& bitmap ) m_window = m_selected.GetBitmap(); } - m_isMemDC = TRUE; + m_isMemDC = true; SetUpDC(); } else { - m_ok = FALSE; + m_ok = false; m_window = (GdkWindow *) NULL; } } @@ -144,5 +144,3 @@ void wxMemoryDC::DoGetSize( int *width, int *height ) const if (height) (*height) = 0; } } - - diff --git a/src/html/htmlwin.cpp b/src/html/htmlwin.cpp index 698e4cccb4..26a6420d9d 100644 --- a/src/html/htmlwin.cpp +++ b/src/html/htmlwin.cpp @@ -21,6 +21,7 @@ #include "wx/intl.h" #include "wx/dcclient.h" #include "wx/frame.h" + #include "wx/dcmemory.h" #endif #include "wx/html/htmlwin.h" @@ -28,7 +29,6 @@ #include "wx/clipbrd.h" #include "wx/dataobj.h" #include "wx/timer.h" -#include "wx/dcmemory.h" #include "wx/settings.h" #include "wx/arrimpl.cpp" diff --git a/src/mac/carbon/bitmap.cpp b/src/mac/carbon/bitmap.cpp index d7f9c3ba83..c22d1b7821 100644 --- a/src/mac/carbon/bitmap.cpp +++ b/src/mac/carbon/bitmap.cpp @@ -15,6 +15,7 @@ #ifndef WX_PRECOMP #include "wx/log.h" + #include "wx/dcmemory.h" #endif #include "wx/icon.h" @@ -35,7 +36,6 @@ IMPLEMENT_DYNAMIC_CLASS(wxBitmapHandler, wxObject) #endif #include "wx/mac/uma.h" -#include "wx/dcmemory.h" // Implementation Notes // -------------------- diff --git a/src/mac/carbon/dataobj.cpp b/src/mac/carbon/dataobj.cpp index 3ace48bcd8..041084127d 100644 --- a/src/mac/carbon/dataobj.cpp +++ b/src/mac/carbon/dataobj.cpp @@ -19,9 +19,9 @@ #ifndef WX_PRECOMP #include "wx/intl.h" #include "wx/log.h" + #include "wx/dcmemory.h" #endif -#include "wx/dcmemory.h" #include "wx/mstream.h" #include "wx/image.h" #include "wx/metafile.h" diff --git a/src/mac/carbon/dc.cpp b/src/mac/carbon/dc.cpp index 1d07f86074..719b77aecc 100644 --- a/src/mac/carbon/dc.cpp +++ b/src/mac/carbon/dc.cpp @@ -18,10 +18,10 @@ #ifndef WX_PRECOMP #include "wx/log.h" #include "wx/app.h" + #include "wx/dcmemory.h" #endif #include "wx/mac/uma.h" -#include "wx/dcmemory.h" #include "wx/dcprint.h" #include "wx/region.h" #include "wx/image.h" diff --git a/src/mac/carbon/dccg.cpp b/src/mac/carbon/dccg.cpp index 2378561aa3..0431b8eba7 100755 --- a/src/mac/carbon/dccg.cpp +++ b/src/mac/carbon/dccg.cpp @@ -18,10 +18,10 @@ #ifndef WX_PRECOMP #include "wx/log.h" #include "wx/app.h" + #include "wx/dcmemory.h" #endif #include "wx/mac/uma.h" -#include "wx/dcmemory.h" #include "wx/dcprint.h" #include "wx/region.h" #include "wx/image.h" diff --git a/src/mac/carbon/dcclient.cpp b/src/mac/carbon/dcclient.cpp index f706434036..0eb7e0a3ce 100644 --- a/src/mac/carbon/dcclient.cpp +++ b/src/mac/carbon/dcclient.cpp @@ -16,9 +16,9 @@ #ifndef WX_PRECOMP #include "wx/log.h" #include "wx/window.h" + #include "wx/dcmemory.h" #endif -#include "wx/dcmemory.h" #include "wx/region.h" #include "wx/toplevel.h" #include "wx/settings.h" diff --git a/src/mac/carbon/dcmemory.cpp b/src/mac/carbon/dcmemory.cpp index c085610570..79ef4ee3cc 100644 --- a/src/mac/carbon/dcmemory.cpp +++ b/src/mac/carbon/dcmemory.cpp @@ -1,17 +1,18 @@ ///////////////////////////////////////////////////////////////////////////// -// Name: dcmemory.cpp +// Name: src/mac/carbon/dcmemory.cpp // Purpose: wxMemoryDC class // Author: Stefan Csomor // Modified by: // Created: 01/02/97 // RCS-ID: $Id$ // Copyright: (c) Stefan Csomor -// Licence: wxWindows licence +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// #include "wx/wxprec.h" #include "wx/dcmemory.h" + #include "wx/mac/private.h" //----------------------------------------------------------------------------- @@ -86,7 +87,7 @@ void wxMemoryDC::SelectObject( const wxBitmap& bitmap ) int h = bitmap.GetHeight() ; // TODO: should this be kCGImageAlphaPremultiplied[First,Last] ? - CGImageAlphaInfo a = kCGImageAlphaNoneSkipFirst ; + CGImageAlphaInfo a = kCGImageAlphaNoneSkipFirst ; CGColorSpaceRef genericColorSpace = wxMacGetGenericRGBColorSpace(); CGContextRef bmCtx = CGBitmapContextCreate( data , w, h, bitsPerComp , bytesPerPixel * w , genericColorSpace, a ); @@ -94,15 +95,15 @@ void wxMemoryDC::SelectObject( const wxBitmap& bitmap ) if ( bmCtx ) { - CGContextSetFillColorSpace( bmCtx, genericColorSpace ); - CGContextSetStrokeColorSpace( bmCtx, genericColorSpace ); + CGContextSetFillColorSpace( bmCtx, genericColorSpace ); + CGContextSetStrokeColorSpace( bmCtx, genericColorSpace ); CGContextTranslateCTM( bmCtx , 0 , m_selected.GetHeight() ) ; CGContextScaleCTM( bmCtx , 1 , -1 ) ; - m_graphicContext = new wxMacCGContext( bmCtx ) ; + m_graphicContext = new wxMacCGContext( bmCtx ) ; m_graphicContext->SetPen( m_pen ) ; - m_graphicContext->SetBrush( m_brush ) ; + m_graphicContext->SetBrush( m_brush ) ; } m_ok = (m_graphicContext != NULL) ; diff --git a/src/mac/carbon/taskbar.cpp b/src/mac/carbon/taskbar.cpp index 5fea2b7552..cc9afbef1d 100644 --- a/src/mac/carbon/taskbar.cpp +++ b/src/mac/carbon/taskbar.cpp @@ -1,6 +1,6 @@ /////////////////////////////////////////////////////////////////////////////// // Name: src/mac/carbon/taskbar.cpp -// Purpose: wxTaskBarIcon +// Purpose: wxTaskBarIcon // Author: Ryan Norton // Modified by: // Created: 09/25/2004 @@ -13,12 +13,16 @@ #ifdef wxHAS_TASK_BAR_ICON +#include "wx/taskbar.h" + +#ifndef WX_PRECOMP + #include "wx/dcmemory.h" +#endif + #include "wx/mac/private.h" -#include "wx/taskbar.h" #include "wx/menu.h" #include "wx/icon.h" -#include "wx/dcmemory.h" class wxTaskBarIconImpl @@ -54,7 +58,7 @@ class wxTaskBarIconWindow : public wxTopLevelWindow { public: wxTaskBarIconWindow(wxTaskBarIconImpl *impl) - : wxTopLevelWindow(NULL, -1, wxT("")), m_impl(impl) + : wxTopLevelWindow(NULL, wxID_ANY, wxEmptyString), m_impl(impl) { Connect( -1, wxEVT_COMMAND_MENU_SELECTED, diff --git a/src/mac/classic/dc.cpp b/src/mac/classic/dc.cpp index e1d53daa38..a8c87e57be 100644 --- a/src/mac/classic/dc.cpp +++ b/src/mac/classic/dc.cpp @@ -16,10 +16,10 @@ #ifndef WX_PRECOMP #include "wx/log.h" #include "wx/app.h" + #include "wx/dcmemory.h" #endif #include "wx/mac/uma.h" -#include "wx/dcmemory.h" #include "wx/dcprint.h" #include "wx/region.h" #include "wx/image.h" diff --git a/src/mac/classic/dcclient.cpp b/src/mac/classic/dcclient.cpp index 747423c259..bd31dd9744 100644 --- a/src/mac/classic/dcclient.cpp +++ b/src/mac/classic/dcclient.cpp @@ -15,9 +15,9 @@ #ifndef WX_PRECOMP #include "wx/window.h" + #include "wx/dcmemory.h" #endif -#include "wx/dcmemory.h" #include "wx/region.h" #include "wx/toplevel.h" #include "wx/math.h" diff --git a/src/mac/classic/dcmemory.cpp b/src/mac/classic/dcmemory.cpp index b1be90dbe9..32949efa75 100644 --- a/src/mac/classic/dcmemory.cpp +++ b/src/mac/classic/dcmemory.cpp @@ -1,15 +1,18 @@ ///////////////////////////////////////////////////////////////////////////// -// Name: dcmemory.cpp +// Name: src/mac/classic/dcmemory.cpp // Purpose: wxMemoryDC class // Author: Stefan Csomor // Modified by: // Created: 01/02/97 // RCS-ID: $Id$ // Copyright: (c) Stefan Csomor -// Licence: wxWindows licence +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// +#include "wx/wxprec.h" + #include "wx/dcmemory.h" + #include "wx/mac/private.h" //----------------------------------------------------------------------------- @@ -19,23 +22,23 @@ IMPLEMENT_DYNAMIC_CLASS(wxMemoryDC,wxPaintDC) wxMemoryDC::wxMemoryDC(void) -: m_selected() + : m_selected() { - m_ok = TRUE; + m_ok = true; SetBackground(*wxWHITE_BRUSH); SetBrush(*wxWHITE_BRUSH); SetPen(*wxBLACK_PEN); - m_ok = FALSE; + m_ok = false; }; wxMemoryDC::wxMemoryDC( wxDC *WXUNUSED(dc) ) -: m_selected() + : m_selected() { - m_ok = TRUE; + m_ok = true; SetBackground(*wxWHITE_BRUSH); SetBrush(*wxWHITE_BRUSH); SetPen(*wxBLACK_PEN); - m_ok = FALSE; + m_ok = false; }; wxMemoryDC::~wxMemoryDC() @@ -66,16 +69,16 @@ void wxMemoryDC::SelectObject( const wxBitmap& bitmap ) } SetRectRgn( (RgnHandle) m_macBoundaryClipRgn , 0 , 0 , m_selected.GetWidth() , m_selected.GetHeight() ) ; CopyRgn( (RgnHandle) m_macBoundaryClipRgn ,(RgnHandle) m_macCurrentClipRgn ) ; - m_ok = TRUE ; + m_ok = true ; } else { - m_ok = FALSE; + m_ok = false; } } else { - m_ok = FALSE; + m_ok = false; } } @@ -92,5 +95,3 @@ void wxMemoryDC::DoGetSize( int *width, int *height ) const if (height) (*height) = 0; } } - - diff --git a/src/mgl/bitmap.cpp b/src/mgl/bitmap.cpp index 7f5df13f1f..06e840311a 100644 --- a/src/mgl/bitmap.cpp +++ b/src/mgl/bitmap.cpp @@ -19,12 +19,12 @@ #include "wx/intl.h" #include "wx/log.h" #include "wx/utils.h" + #include "wx/dcmemory.h" #endif #include "wx/icon.h" #include "wx/filefn.h" #include "wx/image.h" -#include "wx/dcmemory.h" #include "wx/image.h" #include "wx/xpmdecod.h" diff --git a/src/mgl/dcmemory.cpp b/src/mgl/dcmemory.cpp index 8c3b60c194..c6c4233795 100644 --- a/src/mgl/dcmemory.cpp +++ b/src/mgl/dcmemory.cpp @@ -1,9 +1,9 @@ ///////////////////////////////////////////////////////////////////////////// -// Name: dcmemory.cpp +// Name: src/mgl/dcmemory.cpp // Purpose: // Author: Robert Roebling, Vaclav Slavik // RCS-ID: $Id$ -// Copyright: (c) 1998 Robert Roebling, +// Copyright: (c) 1998 Robert Roebling, // 2001 SciTech Software, Inc. (www.scitechsoft.com) // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -26,12 +26,12 @@ IMPLEMENT_DYNAMIC_CLASS(wxMemoryDC,wxWindowDC) wxMemoryDC::wxMemoryDC() : wxDC() { - m_isMemDC = TRUE; + m_isMemDC = true; } wxMemoryDC::wxMemoryDC(wxDC *WXUNUSED(dc)) : wxDC() { - m_isMemDC = TRUE; + m_isMemDC = true; } wxMemoryDC::~wxMemoryDC() diff --git a/src/motif/dc.cpp b/src/motif/dc.cpp index c6bd10e425..884ac2e7e6 100644 --- a/src/motif/dc.cpp +++ b/src/motif/dc.cpp @@ -13,7 +13,10 @@ #include "wx/wxprec.h" #include "wx/dc.h" -#include "wx/dcmemory.h" + +#ifndef WX_PRECOMP + #include "wx/dcmemory.h" +#endif IMPLEMENT_ABSTRACT_CLASS(wxDC, wxObject) diff --git a/src/motif/dcclient.cpp b/src/motif/dcclient.cpp index eef4a0aa7d..cd858688c3 100644 --- a/src/motif/dcclient.cpp +++ b/src/motif/dcclient.cpp @@ -45,9 +45,9 @@ #include "wx/log.h" #include "wx/app.h" #include "wx/window.h" + #include "wx/dcmemory.h" #endif -#include "wx/dcmemory.h" #include "wx/image.h" #include "wx/math.h" diff --git a/src/motif/utils.cpp b/src/motif/utils.cpp index dea805a657..efa8473ed1 100644 --- a/src/motif/utils.cpp +++ b/src/motif/utils.cpp @@ -28,10 +28,10 @@ #ifndef WX_PRECOMP #include "wx/app.h" + #include "wx/dcmemory.h" #endif #include "wx/apptrait.h" -#include "wx/dcmemory.h" #include "wx/bitmap.h" #include "wx/evtloop.h" diff --git a/src/msw/dcmemory.cpp b/src/msw/dcmemory.cpp index 9633d80691..e68fe93b10 100644 --- a/src/msw/dcmemory.cpp +++ b/src/msw/dcmemory.cpp @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////////// -// Name: dcmemory.cpp +// Name: src/msw/dcmemory.cpp // Purpose: wxMemoryDC class // Author: Julian Smart // Modified by: @@ -24,6 +24,8 @@ #pragma hdrstop #endif +#include "wx/dcmemory.h" + #ifndef WX_PRECOMP #include "wx/utils.h" #include "wx/log.h" @@ -31,8 +33,6 @@ #include "wx/msw/private.h" -#include "wx/dcmemory.h" - // ---------------------------------------------------------------------------- // wxWin macros // ---------------------------------------------------------------------------- @@ -199,4 +199,3 @@ void wxMemoryDC::DoDrawRectangle(wxCoord x, wxCoord y, wxCoord width, wxCoord he wxDC::DoDrawRectangle(x, y, width, height); } } - diff --git a/src/msw/notebook.cpp b/src/msw/notebook.cpp index f3d26b69d7..ff438e3dc6 100644 --- a/src/msw/notebook.cpp +++ b/src/msw/notebook.cpp @@ -27,12 +27,12 @@ #include "wx/event.h" #include "wx/app.h" #include "wx/dcclient.h" + #include "wx/dcmemory.h" #endif // WX_PRECOMP #include "wx/imaglist.h" #include "wx/control.h" #include "wx/sysopt.h" -#include "wx/dcmemory.h" #include "wx/msw/private.h" diff --git a/src/msw/ownerdrw.cpp b/src/msw/ownerdrw.cpp index c7b56a1dbc..7711d8113e 100644 --- a/src/msw/ownerdrw.cpp +++ b/src/msw/ownerdrw.cpp @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////////// -// Name: msw/ownerdrw.cpp +// Name: src/msw/ownerdrw.cpp // Purpose: implementation of wxOwnerDrawn class // Author: Vadim Zeitlin // Modified by: @@ -11,20 +11,19 @@ // For compilers that support precompilation, includes "wx.h". #include "wx/wxprec.h" -#include "wx/msw/private.h" #ifdef __BORLANDC__ -#pragma hdrstop + #pragma hdrstop #endif #ifndef WX_PRECOMP - #include "wx/window.h" - #include "wx/msw/private.h" - #include "wx/font.h" - #include "wx/bitmap.h" - #include "wx/dcmemory.h" - #include "wx/menu.h" - #include "wx/utils.h" + #include "wx/window.h" + #include "wx/msw/private.h" + #include "wx/font.h" + #include "wx/bitmap.h" + #include "wx/dcmemory.h" + #include "wx/menu.h" + #include "wx/utils.h" #endif #include "wx/settings.h" @@ -192,7 +191,7 @@ bool wxOwnerDrawn::OnMeasureItem(size_t *pwidth, size_t *pheight) // placed on top of each other. if ( !m_strAccel.empty() ) { - str.Pad(str.Length()%8); + str.Pad(str.length()%8); str += m_strAccel; } @@ -353,7 +352,7 @@ bool wxOwnerDrawn::OnDrawItem(wxDC& dc, xText += 3; // separate text from the highlight rectangle SIZE sizeRect; - ::GetTextExtentPoint32(hdc, strMenuText.c_str(), strMenuText.Length(), &sizeRect); + ::GetTextExtentPoint32(hdc, strMenuText.c_str(), strMenuText.length(), &sizeRect); ::DrawState(hdc, NULL, NULL, (LPARAM)strMenuText.c_str(), strMenuText.length(), xText, rc.y + (int) ((rc.GetHeight()-sizeRect.cy)/2.0), // centre text vertically @@ -465,4 +464,3 @@ bool wxOwnerDrawn::OnDrawItem(wxDC& dc, #endif // wxUSE_OWNER_DRAWN - diff --git a/src/msw/statbox.cpp b/src/msw/statbox.cpp index bbd39a04dc..e0680382eb 100644 --- a/src/msw/statbox.cpp +++ b/src/msw/statbox.cpp @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////////// -// Name: msw/statbox.cpp +// Name: src/msw/statbox.cpp // Purpose: wxStaticBox // Author: Julian Smart // Modified by: @@ -26,16 +26,17 @@ #if wxUSE_STATBOX +#include "wx/statbox.h" + #ifndef WX_PRECOMP #include "wx/app.h" #include "wx/dcclient.h" + #include "wx/dcmemory.h" #endif -#include "wx/statbox.h" #include "wx/notebook.h" #include "wx/sysopt.h" #include "wx/image.h" -#include "wx/dcmemory.h" #include "wx/sysopt.h" #include "wx/msw/uxtheme.h" @@ -447,4 +448,3 @@ void wxStaticBox::OnPaint(wxPaintEvent& WXUNUSED(event)) #endif // !__WXWINCE__ #endif // wxUSE_STATBOX - diff --git a/src/os2/checklst.cpp b/src/os2/checklst.cpp index ed0d2e3f36..3bcd1f9abe 100644 --- a/src/os2/checklst.cpp +++ b/src/os2/checklst.cpp @@ -24,6 +24,7 @@ #include "wx/object.h" #include "wx/log.h" #include "wx/window.h" + #include "wx/dcmemory.h" #endif #include "wx/colour.h" @@ -32,7 +33,6 @@ #include "wx/listbox.h" #include "wx/ownerdrw.h" #include "wx/settings.h" -#include "wx/dcmemory.h" #include "wx/dcscreen.h" #define INCL_PM diff --git a/src/os2/dcmemory.cpp b/src/os2/dcmemory.cpp index aeeff2c76b..b42e384441 100644 --- a/src/os2/dcmemory.cpp +++ b/src/os2/dcmemory.cpp @@ -12,6 +12,8 @@ // For compilers that support precompilation, includes "wx.h". #include "wx/wxprec.h" +#include "wx/dcmemory.h" + #ifndef WX_PRECOMP #include "wx/utils.h" #include "wx/app.h" @@ -20,8 +22,6 @@ #include "wx/os2/private.h" -#include "wx/dcmemory.h" - IMPLEMENT_DYNAMIC_CLASS(wxMemoryDC, wxDC) ///////////////////////////////////////////////////////////////////////////// diff --git a/src/os2/ownerdrw.cpp b/src/os2/ownerdrw.cpp index ac75b71f40..ee24483af6 100644 --- a/src/os2/ownerdrw.cpp +++ b/src/os2/ownerdrw.cpp @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////////// -// Name: msw/ownerdrw.cpp +// Name: src/os2/ownerdrw.cpp // Purpose: implementation of wxOwnerDrawn class // Author: David Webster // Modified by: @@ -12,18 +12,18 @@ // For compilers that support precompilation, includes "wx.h". #include "wx/wxprec.h" +#if wxUSE_OWNER_DRAWN + #ifndef WX_PRECOMP - #include "wx/window.h" - #include "wx/os2/private.h" - #include "wx/font.h" - #include "wx/bitmap.h" - #include "wx/dcmemory.h" - #include "wx/menu.h" - #include "wx/utils.h" + #include "wx/window.h" + #include "wx/os2/private.h" + #include "wx/font.h" + #include "wx/bitmap.h" + #include "wx/dcmemory.h" + #include "wx/menu.h" + #include "wx/utils.h" #endif -#if wxUSE_OWNER_DRAWN - #include "wx/settings.h" #include "wx/ownerdrw.h" #include "wx/menuitem.h" @@ -74,7 +74,7 @@ bool wxOwnerDrawn::OnMeasureItem( size_t* pWidth, // placed on top of each other. if (!m_strAccel.empty() ) { - sStr.Pad(sStr.Length()%8); + sStr.Pad(sStr.length()%8); sStr += m_strAccel; } vDC.SetFont(GetFont()); diff --git a/src/palmos/dcmemory.cpp b/src/palmos/dcmemory.cpp index 8b58a539b0..461b478a53 100644 --- a/src/palmos/dcmemory.cpp +++ b/src/palmos/dcmemory.cpp @@ -24,13 +24,13 @@ #pragma hdrstop #endif +#include "wx/dcmemory.h" + #ifndef WX_PRECOMP #include "wx/utils.h" #include "wx/log.h" #endif -#include "wx/dcmemory.h" - // ---------------------------------------------------------------------------- // wxWin macros // ---------------------------------------------------------------------------- @@ -88,4 +88,3 @@ static void wxDrawRectangle(wxDC& dc, wxCoord x, wxCoord y, wxCoord width, wxCoo void wxMemoryDC::DoDrawRectangle(wxCoord x, wxCoord y, wxCoord width, wxCoord height) { } - diff --git a/src/palmos/ownerdrw.cpp b/src/palmos/ownerdrw.cpp index a9a6b77e26..60cb581412 100644 --- a/src/palmos/ownerdrw.cpp +++ b/src/palmos/ownerdrw.cpp @@ -13,16 +13,16 @@ #include "wx/wxprec.h" #ifdef __BORLANDC__ -#pragma hdrstop + #pragma hdrstop #endif #ifndef WX_PRECOMP - #include "wx/window.h" - #include "wx/font.h" - #include "wx/bitmap.h" - #include "wx/dcmemory.h" - #include "wx/menu.h" - #include "wx/utils.h" + #include "wx/window.h" + #include "wx/font.h" + #include "wx/bitmap.h" + #include "wx/dcmemory.h" + #include "wx/menu.h" + #include "wx/utils.h" #endif #include "wx/settings.h" @@ -108,4 +108,3 @@ bool wxOwnerDrawn::OnDrawItem(wxDC& dc, #endif // wxUSE_OWNER_DRAWN - diff --git a/src/univ/notebook.cpp b/src/univ/notebook.cpp index 1d8c16355c..1255a2fe5c 100644 --- a/src/univ/notebook.cpp +++ b/src/univ/notebook.cpp @@ -25,10 +25,14 @@ #if wxUSE_NOTEBOOK -#include "wx/imaglist.h" #include "wx/notebook.h" + +#ifndef WX_PRECOMP + #include "wx/dcmemory.h" +#endif + +#include "wx/imaglist.h" #include "wx/spinbutt.h" -#include "wx/dcmemory.h" #include "wx/univ/renderer.h" diff --git a/src/x11/bitmap.cpp b/src/x11/bitmap.cpp index ae4c2e3f12..b9905dde46 100644 --- a/src/x11/bitmap.cpp +++ b/src/x11/bitmap.cpp @@ -17,13 +17,11 @@ #ifndef WX_PRECOMP #include "wx/log.h" #include "wx/app.h" + #include "wx/dcmemory.h" #endif #include "wx/icon.h" #include "wx/image.h" -#if wxUSE_NANOX -#include "wx/dcmemory.h" -#endif #include "wx/x11/private.h" diff --git a/src/x11/dc.cpp b/src/x11/dc.cpp index e3f513a143..6d81131809 100644 --- a/src/x11/dc.cpp +++ b/src/x11/dc.cpp @@ -13,7 +13,10 @@ #include "wx/wxprec.h" #include "wx/dc.h" -#include "wx/dcmemory.h" + +#ifndef WX_PRECOMP + #include "wx/dcmemory.h" +#endif IMPLEMENT_ABSTRACT_CLASS(wxDC, wxObject) diff --git a/src/x11/dcclient.cpp b/src/x11/dcclient.cpp index 2d54259349..5e3b5728cb 100644 --- a/src/x11/dcclient.cpp +++ b/src/x11/dcclient.cpp @@ -17,9 +17,9 @@ #ifndef WX_PRECOMP #include "wx/app.h" #include "wx/window.h" + #include "wx/dcmemory.h" #endif -#include "wx/dcmemory.h" #include "wx/image.h" #include "wx/module.h" #include "wx/fontutil.h" -- 2.45.2