From 11dbb4bfab8f7441e87b34cd094ac6e69438b50a Mon Sep 17 00:00:00 2001 From: =?utf8?q?W=C5=82odzimierz=20Skiba?= Date: Tue, 9 May 2006 13:55:29 +0000 Subject: [PATCH] Include wx/dcscreen.h according to precompiled headers of wx/wx.h (with other minor cleaning). git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@39123 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/cocoa/dcscreen.cpp | 17 +++++++++-------- src/generic/sashwin.cpp | 5 +++-- src/gtk/minifram.cpp | 12 +++++++----- src/gtk1/minifram.cpp | 12 +++++++----- src/mac/carbon/dcscreen.cpp | 14 +++++++------- src/mac/classic/dcscreen.cpp | 28 +++++++++++++++------------- src/mgl/dcscreen.cpp | 8 +++++--- src/mgl/window.cpp | 2 +- src/msw/dcscreen.cpp | 7 +++---- src/os2/checklst.cpp | 2 +- src/os2/dcscreen.cpp | 24 ++++++++++-------------- src/palmos/dcscreen.cpp | 7 +++---- 12 files changed, 71 insertions(+), 67 deletions(-) diff --git a/src/cocoa/dcscreen.cpp b/src/cocoa/dcscreen.cpp index 50e5fa00f2..d809bb7ee5 100644 --- a/src/cocoa/dcscreen.cpp +++ b/src/cocoa/dcscreen.cpp @@ -4,14 +4,16 @@ // Author: David Elliott // Modified by: // Created: 2003/03/16 -// RCS-ID: $Id: +// RCS-ID: $Id$ // Copyright: (c) 2002 David Elliott -// Licence: wxWindows license +// Licence: wxWindows license ///////////////////////////////////////////////////////////////////////////// #include "wx/wxprec.h" + +#include "wx/dcscreen.h" + #ifndef WX_PRECOMP - #include "wx/dcscreen.h" #endif //WX_PRECOMP //----------------------------------------------------------------------------- @@ -22,15 +24,14 @@ IMPLEMENT_DYNAMIC_CLASS(wxScreenDC,wxDC) wxScreenDC::wxScreenDC(void) { - m_ok = false; -}; + m_ok = false; +} wxScreenDC::wxScreenDC( wxDC *WXUNUSED(dc) ) { - m_ok = false; -}; + m_ok = false; +} wxScreenDC::~wxScreenDC(void) { } - diff --git a/src/generic/sashwin.cpp b/src/generic/sashwin.cpp index 752516aa9d..3a4e2b6d97 100644 --- a/src/generic/sashwin.cpp +++ b/src/generic/sashwin.cpp @@ -20,19 +20,20 @@ #if wxUSE_SASH +#include "wx/sashwin.h" + #ifndef WX_PRECOMP #include "wx/dialog.h" #include "wx/frame.h" #include "wx/settings.h" #include "wx/dcclient.h" + #include "wx/dcscreen.h" #endif #include "wx/math.h" #include -#include "wx/dcscreen.h" -#include "wx/sashwin.h" #include "wx/laywin.h" DEFINE_EVENT_TYPE(wxEVT_SASH_DRAGGED) diff --git a/src/gtk/minifram.cpp b/src/gtk/minifram.cpp index 2e55af6f53..45beaf5a6b 100644 --- a/src/gtk/minifram.cpp +++ b/src/gtk/minifram.cpp @@ -10,11 +10,13 @@ // For compilers that support precompilation, includes "wx.h". #include "wx/wxprec.h" -#include "wx/minifram.h" - #if wxUSE_MINIFRAME -#include "wx/dcscreen.h" +#include "wx/minifram.h" + +#ifndef WX_PRECOMP + #include "wx/dcscreen.h" +#endif #include "gtk/gtk.h" #include "wx/gtk/win_gtk.h" @@ -167,7 +169,7 @@ static gint gtk_window_button_release_callback( GtkWidget *widget, GdkEventButto if (!win->m_isDragging) return TRUE; - win->m_isDragging = FALSE; + win->m_isDragging = false; int x = (int)gdk_event->x; int y = (int)gdk_event->y; @@ -334,4 +336,4 @@ void wxMiniFrame::SetTitle( const wxString &title ) gdk_window_invalidate_rect( GTK_PIZZA(m_mainWidget)->bin_window, NULL, true ); } -#endif +#endif // wxUSE_MINIFRAME diff --git a/src/gtk1/minifram.cpp b/src/gtk1/minifram.cpp index c60a64cb35..a7803836b3 100644 --- a/src/gtk1/minifram.cpp +++ b/src/gtk1/minifram.cpp @@ -10,11 +10,13 @@ // For compilers that support precompilation, includes "wx.h". #include "wx/wxprec.h" -#include "wx/minifram.h" - #if wxUSE_MINIFRAME -#include "wx/dcscreen.h" +#include "wx/minifram.h" + +#ifndef WX_PRECOMP + #include "wx/dcscreen.h" +#endif #include "gtk/gtk.h" #include "wx/gtk1/win_gtk.h" @@ -219,7 +221,7 @@ static gint gtk_window_button_release_callback( GtkWidget *widget, GdkEventButto if (!win->m_isDragging) return TRUE; - win->m_isDragging = FALSE; + win->m_isDragging = false; int x = (int)gdk_event->x; int y = (int)gdk_event->y; @@ -400,4 +402,4 @@ void wxMiniFrame::SetTitle( const wxString &title ) gtk_widget_draw( m_mainWidget, (GdkRectangle*) NULL ); } -#endif +#endif // wxUSE_MINIFRAME diff --git a/src/mac/carbon/dcscreen.cpp b/src/mac/carbon/dcscreen.cpp index 85f092c8f0..b321bfcfb1 100644 --- a/src/mac/carbon/dcscreen.cpp +++ b/src/mac/carbon/dcscreen.cpp @@ -1,17 +1,18 @@ ///////////////////////////////////////////////////////////////////////////// -// Name: dcscreen.cpp +// Name: src/mac/carbon/dcscreen.cpp // Purpose: wxScreenDC class // Author: Stefan Csomor // Modified by: // Created: 1998-01-01 // RCS-ID: $Id$ // Copyright: (c) Stefan Csomor -// Licence: wxWindows licence +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// #include "wx/wxprec.h" #include "wx/dcscreen.h" + #include "wx/mac/uma.h" IMPLEMENT_DYNAMIC_CLASS(wxScreenDC, wxWindowDC) @@ -24,7 +25,7 @@ wxScreenDC::wxScreenDC() GetPort( &port ) ; SetPort( (GrafPtr) m_macPort ) ; Point pt = { 0,0 } ; - LocalToGlobal( &pt ) ; + LocalToGlobal( &pt ) ; SetPort( port ) ; m_macLocalOrigin.x = -pt.h ; m_macLocalOrigin.y = -pt.v ; @@ -43,17 +44,17 @@ wxScreenDC::wxScreenDC() m_maxY = screenBits.bounds.bottom ; #if wxMAC_USE_CORE_GRAPHICS - m_graphicContext = new wxMacCGContext( port ) ; + m_graphicContext = new wxMacCGContext( port ) ; #else MacSetRectRgn( (RgnHandle) m_macBoundaryClipRgn , m_minX , m_minY , m_maxX , m_maxY ) ; OffsetRgn( (RgnHandle) m_macBoundaryClipRgn , m_macLocalOrigin.x , m_macLocalOrigin.y ) ; CopyRgn( (RgnHandle) m_macBoundaryClipRgn , (RgnHandle) m_macCurrentClipRgn ) ; #endif - m_ok = TRUE ; + m_ok = true ; } wxScreenDC::~wxScreenDC() -{ +{ #if wxMAC_USE_CORE_GRAPHICS delete m_graphicContext ; m_graphicContext = NULL ; @@ -62,4 +63,3 @@ wxScreenDC::~wxScreenDC() if ( m_macPort ) DisposePort( (CGrafPtr) m_macPort ) ; } - diff --git a/src/mac/classic/dcscreen.cpp b/src/mac/classic/dcscreen.cpp index bbfbc77964..65f4ef442d 100644 --- a/src/mac/classic/dcscreen.cpp +++ b/src/mac/classic/dcscreen.cpp @@ -1,15 +1,18 @@ ///////////////////////////////////////////////////////////////////////////// -// Name: dcscreen.cpp +// Name: src/mac/classic/dcscreen.cpp // Purpose: wxScreenDC class // Author: Stefan Csomor // Modified by: // Created: 1998-01-01 // RCS-ID: $Id$ // Copyright: (c) Stefan Csomor -// Licence: wxWindows licence +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// +#include "wx/wxprec.h" + #include "wx/dcscreen.h" + #include "wx/mac/uma.h" IMPLEMENT_DYNAMIC_CLASS(wxScreenDC, wxWindowDC) @@ -23,7 +26,7 @@ wxScreenDC::wxScreenDC() GetPort( &port ) ; SetPort( (GrafPtr) m_macPort ) ; Point pt = { 0,0 } ; - LocalToGlobal( &pt ) ; + LocalToGlobal( &pt ) ; SetPort( port ) ; m_macLocalOrigin.x = -pt.h ; m_macLocalOrigin.y = -pt.v ; @@ -32,17 +35,17 @@ wxScreenDC::wxScreenDC() m_macLocalOrigin.x = 0 ; m_macLocalOrigin.y = 0 ; #endif - m_ok = TRUE ; + m_ok = true ; BitMap screenBits; GetQDGlobalsScreenBits( &screenBits ); - m_minX = screenBits.bounds.left ; - #if TARGET_CARBON - SInt16 height ; - GetThemeMenuBarHeight( &height ) ; - m_minY = screenBits.bounds.top + height ; - #else - m_minY = screenBits.bounds.top + LMGetMBarHeight() ; - #endif + m_minX = screenBits.bounds.left ; +#if TARGET_CARBON + SInt16 height ; + GetThemeMenuBarHeight( &height ) ; + m_minY = screenBits.bounds.top + height ; +#else + m_minY = screenBits.bounds.top + LMGetMBarHeight() ; +#endif m_maxX = screenBits.bounds.right ; m_maxY = screenBits.bounds.bottom ; MacSetRectRgn( (RgnHandle) m_macBoundaryClipRgn , m_minX , m_minY , m_maxX , m_maxY ) ; @@ -54,4 +57,3 @@ wxScreenDC::~wxScreenDC() { // TODO } - diff --git a/src/mgl/dcscreen.cpp b/src/mgl/dcscreen.cpp index 67fbc4590f..4edb3f61c7 100644 --- a/src/mgl/dcscreen.cpp +++ b/src/mgl/dcscreen.cpp @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////////// -// Name: dcscreen.cpp +// Name: src/mgl/dcscreen.cpp // Author: Vaclav Slavik // Id: $Id$ // Copyright: (c) 2001-2002 SciTech Software, Inc. (www.scitechsoft.com) @@ -14,14 +14,16 @@ #endif #include "wx/dcscreen.h" + #include "wx/mgl/private.h" IMPLEMENT_DYNAMIC_CLASS(wxScreenDC, wxDC) -wxScreenDC::wxScreenDC() : wxDC() +wxScreenDC::wxScreenDC() + :wxDC() { SetMGLDC(g_displayDC, FALSE /* no ownership */); - + // VS: we have to hide the mouse, otherwise rendering artifacts may occur MS_obscure(); } diff --git a/src/mgl/window.cpp b/src/mgl/window.cpp index db89438703..8c203f29e7 100644 --- a/src/mgl/window.cpp +++ b/src/mgl/window.cpp @@ -35,6 +35,7 @@ #include "wx/panel.h" #include "wx/intl.h" #include "wx/log.h" + #include "wx/dcscreen.h" #endif #if wxUSE_DRAG_AND_DROP @@ -43,7 +44,6 @@ #include "wx/sysopt.h" #include "wx/mgl/private.h" -#include "wx/dcscreen.h" #include "wx/caret.h" #include diff --git a/src/msw/dcscreen.cpp b/src/msw/dcscreen.cpp index 0dc06f194c..26d350895d 100644 --- a/src/msw/dcscreen.cpp +++ b/src/msw/dcscreen.cpp @@ -13,9 +13,11 @@ #include "wx/wxprec.h" #ifdef __BORLANDC__ -#pragma hdrstop + #pragma hdrstop #endif +#include "wx/dcscreen.h" + #ifndef WX_PRECOMP #include "wx/string.h" #include "wx/window.h" @@ -23,8 +25,6 @@ #include "wx/msw/private.h" -#include "wx/dcscreen.h" - IMPLEMENT_DYNAMIC_CLASS(wxScreenDC, wxDC) // Create a DC representing the whole screen @@ -36,4 +36,3 @@ wxScreenDC::wxScreenDC() // DrawText() to OPAQUE as required, otherwise always TRANSPARENT ::SetBkMode( GetHdc(), TRANSPARENT ); } - diff --git a/src/os2/checklst.cpp b/src/os2/checklst.cpp index 3bcd1f9abe..8896782c02 100644 --- a/src/os2/checklst.cpp +++ b/src/os2/checklst.cpp @@ -25,6 +25,7 @@ #include "wx/log.h" #include "wx/window.h" #include "wx/dcmemory.h" + #include "wx/dcscreen.h" #endif #include "wx/colour.h" @@ -33,7 +34,6 @@ #include "wx/listbox.h" #include "wx/ownerdrw.h" #include "wx/settings.h" -#include "wx/dcscreen.h" #define INCL_PM #include diff --git a/src/os2/dcscreen.cpp b/src/os2/dcscreen.cpp index 4cf8dcc35b..2fa80efcef 100644 --- a/src/os2/dcscreen.cpp +++ b/src/os2/dcscreen.cpp @@ -1,12 +1,12 @@ ///////////////////////////////////////////////////////////////////////////// -// Name: dcscreen.cpp +// Name: src/os2/dcscreen.cpp // Purpose: wxScreenDC class // Author: David Webster // Modified by: // Created: 10/14/99 // RCS-ID: $Id$ // Copyright: (c) David Webster -// Licence: wxWindows licence +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// // For compilers that support precompilation, includes "wx.h". @@ -17,15 +17,15 @@ #define INCL_PM #include +#include "wx/dcscreen.h" + #ifndef WX_PRECOMP - #include "wx/string.h" - #include "wx/window.h" + #include "wx/string.h" + #include "wx/window.h" #endif #include "wx/os2/private.h" -#include "wx/dcscreen.h" - IMPLEMENT_DYNAMIC_CLASS(wxScreenDC, wxWindowDC) // Create a DC representing the whole screen @@ -36,17 +36,13 @@ wxScreenDC::wxScreenDC() ::GpiSetBackMix(m_hPS, BM_LEAVEALONE); } // end of wxScreenDC::wxScreenDC() -void wxScreenDC::DoGetSize( - int* pnWidth -, int* pnHeight -) const +void wxScreenDC::DoGetSize( int* pnWidth, + int* pnHeight ) const { // // Skip wxWindowDC version because it doesn't work without a valid m_canvas // (which we don't have) // - wxDC::DoGetSize( pnWidth - ,pnHeight - ); -} // end of wxScreenDC::DoGetSize + wxDC::DoGetSize( pnWidth, pnHeight ); +} // end of wxScreenDC::DoGetSize diff --git a/src/palmos/dcscreen.cpp b/src/palmos/dcscreen.cpp index 5b25f590d4..f89af8a49a 100644 --- a/src/palmos/dcscreen.cpp +++ b/src/palmos/dcscreen.cpp @@ -13,16 +13,16 @@ #include "wx/wxprec.h" #ifdef __BORLANDC__ -#pragma hdrstop + #pragma hdrstop #endif +#include "wx/dcscreen.h" + #ifndef WX_PRECOMP #include "wx/string.h" #include "wx/window.h" #endif -#include "wx/dcscreen.h" - IMPLEMENT_DYNAMIC_CLASS(wxScreenDC, wxWindowDC) // Create a DC representing the whole screen @@ -33,4 +33,3 @@ wxScreenDC::wxScreenDC() void wxScreenDC::DoGetSize(int *width, int *height) const { } - -- 2.45.2