From 9b5f1895643cf94b38ac19a4c1151e259310852e Mon Sep 17 00:00:00 2001 From: =?utf8?q?W=C5=82odzimierz=20Skiba?= Date: Thu, 26 Jan 2006 16:02:02 +0000 Subject: [PATCH] Include order is wxprec.h=>defs.h=>platform.h=>setup.h so remove explicit setup.h inclusion not touched by chckconf.h. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@37159 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/common/bmpbase.cpp | 3 +- src/common/imagall.cpp | 3 +- src/common/imagpnm.cpp | 3 +- src/generic/dcpsg.cpp | 2 -- src/generic/dragimgg.cpp | 3 +- src/generic/helpext.cpp | 1 - src/generic/statusbr.cpp | 1 - src/gtk/filedlg.cpp | 5 +--- src/gtk/glcanvas.cpp | 4 +-- src/gtk/gsockgtk.cpp | 5 ++-- src/gtk/tooltip.cpp | 5 +--- src/gtk1/filedlg.cpp | 5 +--- src/gtk1/glcanvas.cpp | 4 +-- src/gtk1/gsockgtk.cpp | 5 ++-- src/gtk1/tooltip.cpp | 5 +--- src/mgl/gdiobj.cpp | 8 ++---- src/mgl/window.cpp | 1 - src/motif/accel.cpp | 1 - src/motif/combobox.cpp | 2 -- src/motif/combobox_native.cpp | 6 ++-- src/motif/dnd.cpp | 54 +++++++++++++++++------------------ src/motif/utils.cpp | 1 - src/motif/window.cpp | 3 +- 23 files changed, 47 insertions(+), 83 deletions(-) diff --git a/src/common/bmpbase.cpp b/src/common/bmpbase.cpp index 7868b0b775..8d832f5ed9 100644 --- a/src/common/bmpbase.cpp +++ b/src/common/bmpbase.cpp @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////////// -// Name: bitmap.cpp +// Name: src/common/bitmap.cpp // Purpose: wxBitmapBase // Author: VaclavSlavik // Created: 2001/04/11 @@ -21,7 +21,6 @@ defined(__WXMOTIF__) || \ defined(__WXX11__) -#include "wx/setup.h" #include "wx/utils.h" #include "wx/palette.h" #include "wx/bitmap.h" diff --git a/src/common/imagall.cpp b/src/common/imagall.cpp index bb4d3dc7dd..bc437495c0 100644 --- a/src/common/imagall.cpp +++ b/src/common/imagall.cpp @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////////// -// Name: imagall.cpp +// Name: src/common/imagall.cpp // Purpose: wxImage access all handler // Author: Sylvain Bougnoux // RCS-ID: $Id$ @@ -15,7 +15,6 @@ #endif #ifndef WX_PRECOMP -# include "wx/setup.h" #endif #include "wx/image.h" diff --git a/src/common/imagpnm.cpp b/src/common/imagpnm.cpp index aaa30aec58..86884d7d09 100644 --- a/src/common/imagpnm.cpp +++ b/src/common/imagpnm.cpp @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////////// -// Name: imagpnm.cpp +// Name: src/common/imagpnm.cpp // Purpose: wxImage PNM handler // Author: Sylvain Bougnoux // RCS-ID: $Id$ @@ -15,7 +15,6 @@ #endif #ifndef WX_PRECOMP -# include "wx/setup.h" #endif #if wxUSE_IMAGE && wxUSE_PNM diff --git a/src/generic/dcpsg.cpp b/src/generic/dcpsg.cpp index 3f7057b564..f5dad23ae7 100644 --- a/src/generic/dcpsg.cpp +++ b/src/generic/dcpsg.cpp @@ -22,8 +22,6 @@ #if wxUSE_POSTSCRIPT -#include "wx/setup.h" - #include "wx/dcmemory.h" #include "wx/utils.h" #include "wx/intl.h" diff --git a/src/generic/dragimgg.cpp b/src/generic/dragimgg.cpp index 00433a6df6..06912f3064 100644 --- a/src/generic/dragimgg.cpp +++ b/src/generic/dragimgg.cpp @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////////// -// Name: dragimgg.cpp +// Name: src/generic/dragimgg.cpp // Purpose: Generic wxDragImage implementation // Author: Julian Smart // Modified by: @@ -28,7 +28,6 @@ #ifndef WX_PRECOMP #include -#include "wx/setup.h" #include "wx/window.h" #include "wx/frame.h" #include "wx/dcclient.h" diff --git a/src/generic/helpext.cpp b/src/generic/helpext.cpp index 39c9f93735..1bf7d2b43d 100644 --- a/src/generic/helpext.cpp +++ b/src/generic/helpext.cpp @@ -18,7 +18,6 @@ #if wxUSE_HELP && !defined(__WXWINCE__) && (!defined(__WXMAC__) || defined(__WXMAC_OSX__)) #ifndef WX_PRECOMP - #include "wx/setup.h" #include "wx/string.h" #include "wx/utils.h" #include "wx/list.h" diff --git a/src/generic/statusbr.cpp b/src/generic/statusbr.cpp index f098347991..e294b18078 100644 --- a/src/generic/statusbr.cpp +++ b/src/generic/statusbr.cpp @@ -19,7 +19,6 @@ #if wxUSE_STATUSBAR #ifndef WX_PRECOMP -#include "wx/setup.h" #include "wx/frame.h" #include "wx/settings.h" #include "wx/dcclient.h" diff --git a/src/gtk/filedlg.cpp b/src/gtk/filedlg.cpp index ca86050527..57a34be327 100644 --- a/src/gtk/filedlg.cpp +++ b/src/gtk/filedlg.cpp @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////////// -// Name: gtk/filedlg.cpp +// Name: src/gtk/filedlg.cpp // Purpose: native implementation of wxFileDialog // Author: Robert Roebling, Zbigniew Zagorski, Mart Raudsepp // Id: $Id$ @@ -10,9 +10,6 @@ // For compilers that support precompilation, includes "wx.h". #include "wx/wxprec.h" -// Include setup.h to get wxUSE flags for compilers that do not support precompilation of headers -#include "wx/setup.h" - #if wxUSE_FILEDLG #include "wx/filedlg.h" diff --git a/src/gtk/glcanvas.cpp b/src/gtk/glcanvas.cpp index b945ff75da..7ce06c5f0b 100644 --- a/src/gtk/glcanvas.cpp +++ b/src/gtk/glcanvas.cpp @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////////// -// Name: gtk/glcanvas.cpp +// Name: src/gtk/glcanvas.cpp // Purpose: wxGLCanvas, for using OpenGL/Mesa with wxWidgets and GTK // Author: Robert Roebling // Modified by: @@ -12,8 +12,6 @@ // For compilers that support precompilation, includes "wx.h". #include "wx/wxprec.h" -#include "wx/setup.h" - #if wxUSE_GLCANVAS #include "wx/glcanvas.h" diff --git a/src/gtk/gsockgtk.cpp b/src/gtk/gsockgtk.cpp index 5a142b08ca..390b19982e 100644 --- a/src/gtk/gsockgtk.cpp +++ b/src/gtk/gsockgtk.cpp @@ -1,12 +1,13 @@ /* ------------------------------------------------------------------------- * Project: GSocket (Generic Socket) for WX - * Name: gsockgtk.c + * Name: src/gtk/gsockgtk.cpp * Purpose: GSocket: GTK part * Licence: The wxWindows licence * CVSID: $Id$ * ------------------------------------------------------------------------- */ -#include "wx/setup.h" +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" #if wxUSE_SOCKETS diff --git a/src/gtk/tooltip.cpp b/src/gtk/tooltip.cpp index 3b04c2c35d..caf2a283be 100644 --- a/src/gtk/tooltip.cpp +++ b/src/gtk/tooltip.cpp @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////////// -// Name: tooltip.cpp +// Name: src/gtk/tooltip.cpp // Purpose: wxToolTip implementation // Author: Robert Roebling // Id: $Id$ @@ -10,8 +10,6 @@ // For compilers that support precompilation, includes "wx.h". #include "wx/wxprec.h" -#include "wx/setup.h" - #if wxUSE_TOOLTIPS #include "wx/tooltip.h" @@ -79,4 +77,3 @@ void wxToolTip::SetDelay( long msecs ) } #endif - diff --git a/src/gtk1/filedlg.cpp b/src/gtk1/filedlg.cpp index e1b7d25cab..f64b084703 100644 --- a/src/gtk1/filedlg.cpp +++ b/src/gtk1/filedlg.cpp @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////////// -// Name: gtk/filedlg.cpp +// Name: src/gtk1/filedlg.cpp // Purpose: native implementation of wxFileDialog // Author: Robert Roebling, Zbigniew Zagorski, Mart Raudsepp // Id: $Id$ @@ -10,9 +10,6 @@ // For compilers that support precompilation, includes "wx.h". #include "wx/wxprec.h" -// Include setup.h to get wxUSE flags for compilers that do not support precompilation of headers -#include "wx/setup.h" - #if wxUSE_FILEDLG #include "wx/filedlg.h" diff --git a/src/gtk1/glcanvas.cpp b/src/gtk1/glcanvas.cpp index 53f4ce9c2e..44fede6bfd 100644 --- a/src/gtk1/glcanvas.cpp +++ b/src/gtk1/glcanvas.cpp @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////////// -// Name: gtk/glcanvas.cpp +// Name: src/gtk1/glcanvas.cpp // Purpose: wxGLCanvas, for using OpenGL/Mesa with wxWidgets and GTK // Author: Robert Roebling // Modified by: @@ -12,8 +12,6 @@ // For compilers that support precompilation, includes "wx.h". #include "wx/wxprec.h" -#include "wx/setup.h" - #if wxUSE_GLCANVAS #include "wx/glcanvas.h" diff --git a/src/gtk1/gsockgtk.cpp b/src/gtk1/gsockgtk.cpp index 5a142b08ca..a3656b7284 100644 --- a/src/gtk1/gsockgtk.cpp +++ b/src/gtk1/gsockgtk.cpp @@ -1,12 +1,13 @@ /* ------------------------------------------------------------------------- * Project: GSocket (Generic Socket) for WX - * Name: gsockgtk.c + * Name: src/gtk1/gsockgtk.cpp * Purpose: GSocket: GTK part * Licence: The wxWindows licence * CVSID: $Id$ * ------------------------------------------------------------------------- */ -#include "wx/setup.h" +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" #if wxUSE_SOCKETS diff --git a/src/gtk1/tooltip.cpp b/src/gtk1/tooltip.cpp index b44b027d64..0ac2a8b1da 100644 --- a/src/gtk1/tooltip.cpp +++ b/src/gtk1/tooltip.cpp @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////////// -// Name: tooltip.cpp +// Name: src/gtk1/tooltip.cpp // Purpose: wxToolTip implementation // Author: Robert Roebling // Id: $Id$ @@ -10,8 +10,6 @@ // For compilers that support precompilation, includes "wx.h". #include "wx/wxprec.h" -#include "wx/setup.h" - #if wxUSE_TOOLTIPS #include "wx/tooltip.h" @@ -79,4 +77,3 @@ void wxToolTip::SetDelay( long msecs ) } #endif - diff --git a/src/mgl/gdiobj.cpp b/src/mgl/gdiobj.cpp index c9d60934ce..fd2bd43779 100644 --- a/src/mgl/gdiobj.cpp +++ b/src/mgl/gdiobj.cpp @@ -1,12 +1,12 @@ ///////////////////////////////////////////////////////////////////////////// -// Name: gdiobj.cpp +// Name: src/mgl/gdiobj.cpp // Purpose: wxGDIObject class // Author: Julian Smart // Modified by: // Created: 01/02/97 // RCS-ID: $Id$ // Copyright: (c) Julian Smart -// Licence: wxWindows licence +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// // For compilers that support precompilation, includes "wx.h". @@ -18,7 +18,6 @@ #ifndef WX_PRECOMP #include -#include "wx/setup.h" #include "wx/list.h" #include "wx/utils.h" #endif @@ -27,6 +26,3 @@ IMPLEMENT_DYNAMIC_CLASS(wxGDIObject, wxObject) - - - diff --git a/src/mgl/window.cpp b/src/mgl/window.cpp index 042582eabe..55810916b4 100644 --- a/src/mgl/window.cpp +++ b/src/mgl/window.cpp @@ -27,7 +27,6 @@ #include "wx/window.h" #include "wx/msgdlg.h" #include "wx/accel.h" - #include "wx/setup.h" #include "wx/dc.h" #include "wx/dcclient.h" #include "wx/utils.h" diff --git a/src/motif/accel.cpp b/src/motif/accel.cpp index 5ee34248c5..e6769cd37c 100644 --- a/src/motif/accel.cpp +++ b/src/motif/accel.cpp @@ -12,7 +12,6 @@ // For compilers that support precompilation, includes "wx.h". #include "wx/wxprec.h" -#include "wx/setup.h" #include "wx/accel.h" #include "wx/string.h" #include "wx/utils.h" diff --git a/src/motif/combobox.cpp b/src/motif/combobox.cpp index 0c157e39ba..063cb93c68 100644 --- a/src/motif/combobox.cpp +++ b/src/motif/combobox.cpp @@ -12,8 +12,6 @@ // For compilers that support precompilation, includes "wx.h". #include "wx/wxprec.h" -#include "wx/setup.h" - #if wxUSE_COMBOBOX #include "wx/combobox.h" diff --git a/src/motif/combobox_native.cpp b/src/motif/combobox_native.cpp index e6672c200a..80245a8370 100644 --- a/src/motif/combobox_native.cpp +++ b/src/motif/combobox_native.cpp @@ -12,8 +12,6 @@ // For compilers that support precompilation, includes "wx.h". #include "wx/wxprec.h" -#include "wx/setup.h" - #if wxUSE_COMBOBOX #include "wx/combobox.h" @@ -115,8 +113,8 @@ bool wxComboBox::Create(wxWindow *parent, wxWindowID id, (XtPointer) this); wxSize best = GetBestSize(); - if( size.x != -1 ) best.x = size.x; - if( size.y != -1 ) best.y = size.y; + if( size.x != wxDefaultCoord ) best.x = size.x; + if( size.y != wxDefaultCoord ) best.y = size.y; AttachWidget (parent, m_mainWidget, (WXWidget) NULL, pos.x, pos.y, best.x, best.y); diff --git a/src/motif/dnd.cpp b/src/motif/dnd.cpp index a11b402107..202c9d2f51 100644 --- a/src/motif/dnd.cpp +++ b/src/motif/dnd.cpp @@ -1,17 +1,15 @@ /////////////////////////////////////////////////////////////////////////////// -// Name: dnd.cpp +// Name: src/motif/dnd.cpp // Purpose: wxDropTarget, wxDropSource classes // Author: Julian Smart // Id: $Id$ // Copyright: (c) 1998 Julian Smart -// Licence: wxWindows licence +// Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// // For compilers that support precompilation, includes "wx.h". #include "wx/wxprec.h" -#include "wx/setup.h" - #if wxUSE_DRAG_AND_DROP #include "wx/dnd.h" @@ -91,10 +89,10 @@ bool wxFileDropTarget::OnDrop(long x, long y, const void *data, size_t size ) for (i = 0; i < size; i++) if (text[i] == 0) number++; - if (number == 0) return true; - + if (number == 0) return true; + char **files = new char*[number]; - + text = (char*) data; for ( i = 0; i < number; i++) { @@ -103,10 +101,10 @@ bool wxFileDropTarget::OnDrop(long x, long y, const void *data, size_t size ) text += len+1; } - bool ret = OnDropFiles( x, y, 1, files ); - + bool ret = OnDropFiles( x, y, 1, files ); + free( files ); - + return ret; } @@ -140,12 +138,12 @@ wxDropSource::wxDropSource( wxDataObject &data, wxWindow *win ) { #if 0 g_blockEventsOnDrag = true; - + m_window = win; m_widget = win->m_widget; if (win->m_wxwindow) m_widget = win->m_wxwindow; m_retValue = wxDragCancel; - + m_data = &data; m_defaultCursor = wxCursor( wxCURSOR_NO_ENTRY ); @@ -162,7 +160,7 @@ wxDropSource::~wxDropSource(void) { // if (m_data) delete m_data; } - + wxDragResult wxDropSource::DoDragDrop( int WXUNUSED(flags) ) { // wxASSERT_MSG( m_data, "wxDragSource: no data" ); @@ -171,15 +169,15 @@ wxDragResult wxDropSource::DoDragDrop( int WXUNUSED(flags) ) #if 0 if (!m_data) return (wxDragResult) wxDragNone; if (m_data->GetDataSize() == 0) return (wxDragResult) wxDragNone; - + RegisterWindow(); - + // TODO - + UnregisterWindow(); - + g_blockEventsOnDrag = false; - + return m_retValue; #endif } @@ -190,30 +188,30 @@ void wxDropSource::RegisterWindow(void) if (!m_data) return; wxString formats; - + wxDataFormat df = m_data->GetPreferredFormat(); - - switch (df) + + switch (df) { - case wxDF_TEXT: + case wxDF_TEXT: formats += "text/plain"; - break; + break; case wxDF_FILENAME: formats += "file:ALL"; - break; + break; default: break; } - + char *str = WXSTRINGCAST formats; - + // TODO } void wxDropSource::UnregisterWindow(void) { if (!m_widget) return; - + // TODO } #endif @@ -222,7 +220,7 @@ wxPrivateDropTarget::wxPrivateDropTarget() { m_id = wxTheApp->GetAppName(); } - + size_t wxPrivateDropTarget::GetFormatCount() const { return 1; diff --git a/src/motif/utils.cpp b/src/motif/utils.cpp index 7f0a201f83..d4322fe7cc 100644 --- a/src/motif/utils.cpp +++ b/src/motif/utils.cpp @@ -24,7 +24,6 @@ #define XtDisplay XTDISPLAY #endif -#include "wx/setup.h" #include "wx/utils.h" #include "wx/apptrait.h" #include "wx/app.h" diff --git a/src/motif/window.cpp b/src/motif/window.cpp index ab65b8786c..cea79f107f 100644 --- a/src/motif/window.cpp +++ b/src/motif/window.cpp @@ -26,7 +26,6 @@ #define XtScreen XTSCREEN #endif -#include "wx/setup.h" #include "wx/menu.h" #include "wx/dc.h" #include "wx/dcclient.h" @@ -2492,7 +2491,7 @@ void wxWindow::ChangeFont(bool keepOriginalSize) GetSize(& width1, & height1); if (keepOriginalSize && (width != width1 || height != height1)) { - SetSize(-1, -1, width, height); + SetSize(wxDefaultCoord, wxDefaultCoord, width, height); } } } -- 2.45.2