From 1ab440bc203fc700744039abdcff12bdd6ac6f0a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?W=C5=82odzimierz=20Skiba?= Date: Wed, 7 Jun 2006 11:44:19 +0000 Subject: [PATCH] Include wx/scrolwin.h and wx/dirdlg.h according to precompiled headers of wx/wx.h (with other minor cleaning). git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@39613 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/cocoa/dirdlg.mm | 3 ++- src/common/dseldlg.cpp | 7 +++-- src/motif/window.cpp | 2 +- src/msw/dirdlg.cpp | 4 +-- src/os2/slider.cpp | 60 ++++++++++++++++++++---------------------- src/palmos/dirdlg.cpp | 3 ++- src/x11/window.cpp | 2 +- src/xrc/xh_scwin.cpp | 3 +-- 8 files changed, 40 insertions(+), 44 deletions(-) diff --git a/src/cocoa/dirdlg.mm b/src/cocoa/dirdlg.mm index e434dc60ed..69112c5bc8 100644 --- a/src/cocoa/dirdlg.mm +++ b/src/cocoa/dirdlg.mm @@ -22,10 +22,11 @@ #if wxUSE_DIRDLG +#include "wx/dirdlg.h" + #ifndef WX_PRECOMP #include "wx/msgdlg.h" #include "wx/filedlg.h" - #include "wx/dirdlg.h" #include "wx/app.h" #endif diff --git a/src/common/dseldlg.cpp b/src/common/dseldlg.cpp index 40b10ce73b..dcb2452951 100644 --- a/src/common/dseldlg.cpp +++ b/src/common/dseldlg.cpp @@ -24,12 +24,12 @@ #pragma hdrstop #endif -#ifndef WX_PRECOMP -#endif //WX_PRECOMP +#if wxUSE_DIRDLG #include "wx/dirdlg.h" -#if wxUSE_DIRDLG +#ifndef WX_PRECOMP +#endif //WX_PRECOMP // ============================================================================ // implementation @@ -53,4 +53,3 @@ wxString wxDirSelector(const wxString& message, } #endif // wxUSE_DIRDLG - diff --git a/src/motif/window.cpp b/src/motif/window.cpp index 88508d610d..40059b1372 100644 --- a/src/motif/window.cpp +++ b/src/motif/window.cpp @@ -37,10 +37,10 @@ #include "wx/button.h" #include "wx/menu.h" #include "wx/settings.h" + #include "wx/scrolwin.h" #endif #include "wx/layout.h" -#include "wx/scrolwin.h" #include "wx/module.h" #include "wx/menuitem.h" #include "wx/evtloop.h" diff --git a/src/msw/dirdlg.cpp b/src/msw/dirdlg.cpp index 8c8591fd67..f379d76255 100644 --- a/src/msw/dirdlg.cpp +++ b/src/msw/dirdlg.cpp @@ -29,10 +29,11 @@ #if wxUSE_OLE && !defined(__GNUWIN32_OLD__) && (!defined(__WXWINCE__) || \ (defined(__HANDHELDPC__) && (_WIN32_WCE >= 500))) +#include "wx/dirdlg.h" + #ifndef WX_PRECOMP #include "wx/utils.h" #include "wx/dialog.h" - #include "wx/dirdlg.h" #include "wx/log.h" #include "wx/app.h" // for GetComCtl32Version() #endif @@ -248,4 +249,3 @@ BrowseCallbackProc(HWND hwnd, UINT uMsg, LPARAM lp, LPARAM pData) #endif // compiler/platform on which the code here compiles #endif // wxUSE_DIRDLG - diff --git a/src/os2/slider.cpp b/src/os2/slider.cpp index eba1df64c6..ae0c5c1520 100644 --- a/src/os2/slider.cpp +++ b/src/os2/slider.cpp @@ -17,10 +17,10 @@ #endif #ifndef WX_PRECOMP -#include -#include "wx/utils.h" -#include "wx/brush.h" -#include "wx/scrolwin.h" + #include + #include "wx/utils.h" + #include "wx/brush.h" + #include "wx/scrolwin.h" #endif #if wxUSE_SLIDER @@ -232,7 +232,7 @@ bool wxSlider::Create( m_windowStyle = lStyle; m_nTickFreq = 0; - if (vId == -1) + if (vId == wxID_ANY) m_windowId = (int)NewControlId(); else m_windowId = vId; @@ -464,27 +464,25 @@ bool wxSlider::Create( return true; } // end of wxSlider::Create -void wxSlider::DoSetSize( - int nX -, int nY -, int nWidth -, int nHeight -, int nSizeFlags -) +void wxSlider::DoSetSize( int nX, + int nY, + int nWidth, + int nHeight, + int nSizeFlags ) { - int nX1 = nX; - int nY1 = nY; - int nWidth1 = nWidth; - int nHeight1 = nHeight; - int nXOffset = nX; - int nYOffset = nY; - int nCx; // slider,min,max sizes - int nCy; - int nCyf; - int nCurrentX; - int nCurrentY; - wxChar zBuf[300]; - wxFont vFont = this->GetFont(); + int nX1 = nX; + int nY1 = nY; + int nWidth1 = nWidth; + int nHeight1 = nHeight; + int nXOffset = nX; + int nYOffset = nY; + int nCx; // slider,min,max sizes + int nCy; + int nCyf; + int nCurrentX; + int nCurrentY; + wxChar zBuf[300]; + wxFont vFont = this->GetFont(); // // Adjust for OS/2's reverse coordinate system @@ -499,26 +497,24 @@ void wxSlider::DoSetSize( if (pParent) { - int nOS2ParentHeight = GetOS2ParentHeight(pParent); + int nOS2ParentHeight = GetOS2ParentHeight(pParent); nYOffset = nOS2ParentHeight - (nYOffset + nOS2Height); - if (nY != -1) + if (nY != wxDefaultCoord) nY1 = nOS2ParentHeight - (nY1 + nOS2Height); } else { - RECTL vRect; + RECTL vRect; ::WinQueryWindowRect(HWND_DESKTOP, &vRect); nYOffset = vRect.yTop - (nYOffset + nOS2Height); - if (nY != -1) + if (nY != wxDefaultCoord) nY1 = vRect.yTop - (nY1 + nOS2Height); } m_nSizeFlags = nSizeFlags; - GetPosition( &nCurrentX - ,&nCurrentY - ); + GetPosition( &nCurrentX, &nCurrentY ); if (nX == -1 && !(nSizeFlags & wxSIZE_ALLOW_MINUS_ONE)) nX1 = nCurrentX; if (nY == -1 && !(nSizeFlags & wxSIZE_ALLOW_MINUS_ONE)) diff --git a/src/palmos/dirdlg.cpp b/src/palmos/dirdlg.cpp index 2f9cc0f4c4..48da4eadfa 100644 --- a/src/palmos/dirdlg.cpp +++ b/src/palmos/dirdlg.cpp @@ -28,10 +28,11 @@ #if defined(__WIN95__) && !defined(__GNUWIN32_OLD__) && wxUSE_OLE +#include "wx/dirdlg.h" + #ifndef WX_PRECOMP #include "wx/utils.h" #include "wx/dialog.h" - #include "wx/dirdlg.h" #include "wx/log.h" #include "wx/app.h" // for GetComCtl32Version() #endif diff --git a/src/x11/window.cpp b/src/x11/window.cpp index 87b10a03cb..f904cdde3d 100644 --- a/src/x11/window.cpp +++ b/src/x11/window.cpp @@ -43,10 +43,10 @@ #include "wx/msgdlg.h" #include "wx/scrolbar.h" #include "wx/listbox.h" + #include "wx/scrolwin.h" #endif #include "wx/layout.h" -#include "wx/scrolwin.h" #include "wx/module.h" #include "wx/menuitem.h" #include "wx/fontutil.h" diff --git a/src/xrc/xh_scwin.cpp b/src/xrc/xh_scwin.cpp index f205a72b7b..156a3c970b 100644 --- a/src/xrc/xh_scwin.cpp +++ b/src/xrc/xh_scwin.cpp @@ -21,10 +21,9 @@ #ifndef WX_PRECOMP #include "wx/frame.h" + #include "wx/scrolwin.h" #endif -#include "wx/scrolwin.h" - IMPLEMENT_DYNAMIC_CLASS(wxScrolledWindowXmlHandler, wxXmlResourceHandler) wxScrolledWindowXmlHandler::wxScrolledWindowXmlHandler()