From 876cd6f7e3c4c4a005828f4e7f53897210d29635 Mon Sep 17 00:00:00 2001 From: =?utf8?q?W=C5=82odzimierz=20Skiba?= Date: Wed, 31 May 2006 18:27:51 +0000 Subject: [PATCH] Include wx/statbox.h according to precompiled headers of wx/wx.h (with other minor cleaning). git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@39487 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/cocoa/statbox.mm | 11 ++++++----- src/common/sizer.cpp | 2 +- src/generic/statline.cpp | 11 ++++++++--- src/mac/carbon/control.cpp | 2 +- src/mac/carbon/statline.cpp | 9 ++++++--- src/mac/carbon/statlmac.cpp | 19 +++++++++++-------- src/mac/carbon/window.cpp | 2 +- src/mac/classic/control.cpp | 2 +- src/mac/classic/statline.cpp | 13 ++++++++----- src/mac/classic/statlmac.cpp | 15 +++++++++------ src/mac/classic/window.cpp | 2 +- src/xrc/xh_sizer.cpp | 2 +- src/xrc/xh_stbox.cpp | 13 ++++++++----- 13 files changed, 62 insertions(+), 41 deletions(-) diff --git a/src/cocoa/statbox.mm b/src/cocoa/statbox.mm index f60c482e30..bc36016905 100644 --- a/src/cocoa/statbox.mm +++ b/src/cocoa/statbox.mm @@ -1,18 +1,20 @@ ///////////////////////////////////////////////////////////////////////////// -// Name: cocoa/statbox.mm +// Name: src/cocoa/statbox.mm // Purpose: wxStaticBox // Author: David Elliott // Modified by: // Created: 2003/02/15 -// RCS-ID: $Id: +// RCS-ID: $Id$ // Copyright: (c) 2003 David Elliott -// Licence: wxWidgets licence +// Licence: wxWidgets licence ///////////////////////////////////////////////////////////////////////////// #include "wx/wxprec.h" + +#include "wx/statbox.h" + #ifndef WX_PRECOMP #include "wx/app.h" - #include "wx/statbox.h" #endif //WX_PRECOMP #include "wx/cocoa/autorelease.h" @@ -61,4 +63,3 @@ void wxStaticBox::GetBordersForSizer(int *borderTop, int *borderOther) const if(nextBorder > *borderOther) *borderOther = nextBorder; } - diff --git a/src/common/sizer.cpp b/src/common/sizer.cpp index 92377a0d0a..131977e2af 100644 --- a/src/common/sizer.cpp +++ b/src/common/sizer.cpp @@ -23,10 +23,10 @@ #include "wx/math.h" #include "wx/utils.h" #include "wx/settings.h" + #include "wx/statbox.h" #endif // WX_PRECOMP #include "wx/sizer.h" -#include "wx/statbox.h" #include "wx/listimpl.cpp" #if WXWIN_COMPATIBILITY_2_4 diff --git a/src/generic/statline.cpp b/src/generic/statline.cpp index fa1946572f..023745015d 100644 --- a/src/generic/statline.cpp +++ b/src/generic/statline.cpp @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////////// -// Name: generic/statline.cpp +// Name: src/generic/statline.cpp // Purpose: a generic wxStaticLine class // Author: Vadim Zeitlin // Created: 28.06.99 @@ -17,15 +17,20 @@ // ---------------------------------------------------------------------------- #include "wx/wxprec.h" -#if wxUSE_STATLINE + // For compilers that support precompilation, includes "wx.h". #ifdef __BORLANDC__ #pragma hdrstop #endif +#if wxUSE_STATLINE + #include "wx/statline.h" -#include "wx/statbox.h" + +#ifndef WX_PRECOMP + #include "wx/statbox.h" +#endif // ============================================================================ // implementation diff --git a/src/mac/carbon/control.cpp b/src/mac/carbon/control.cpp index 729cbcaf2c..45ae9e51a6 100644 --- a/src/mac/carbon/control.cpp +++ b/src/mac/carbon/control.cpp @@ -22,13 +22,13 @@ #include "wx/dialog.h" #include "wx/scrolbar.h" #include "wx/stattext.h" + #include "wx/statbox.h" #endif // WX_PRECOMP #include "wx/notebook.h" #include "wx/tabctrl.h" #include "wx/radiobox.h" #include "wx/spinbutt.h" -#include "wx/statbox.h" #include "wx/sizer.h" #include "wx/mac/uma.h" diff --git a/src/mac/carbon/statline.cpp b/src/mac/carbon/statline.cpp index aa7c133387..62abfd106a 100644 --- a/src/mac/carbon/statline.cpp +++ b/src/mac/carbon/statline.cpp @@ -1,6 +1,6 @@ ///////////////////////////////////////////////////////////////////////////// -// Name: generic/statline.cpp -// Purpose: a generic wxStaticLine class +// Name: src/mac/carbon/statline.cpp +// Purpose: wxStaticLine class // Author: Vadim Zeitlin // Created: 28.06.99 // Version: $Id$ @@ -15,7 +15,10 @@ #endif #include "wx/statline.h" -#include "wx/statbox.h" + +#ifndef WX_PRECOMP + #include "wx/statbox.h" +#endif IMPLEMENT_DYNAMIC_CLASS(wxStaticLine, wxControl) diff --git a/src/mac/carbon/statlmac.cpp b/src/mac/carbon/statlmac.cpp index 359893d527..d0102cc8c3 100644 --- a/src/mac/carbon/statlmac.cpp +++ b/src/mac/carbon/statlmac.cpp @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////////// -// Name: generic/statline.cpp +// Name: src/mac/carbon/statlmac.cpp // Purpose: a generic wxStaticLine class // Author: Vadim Zeitlin // Created: 28.06.99 @@ -19,14 +19,17 @@ // For compilers that support precompilation, includes "wx.h". #include "wx/wxprec.h" -#if wxUSE_STATLINE - #ifdef __BORLANDC__ #pragma hdrstop #endif +#if wxUSE_STATLINE + #include "wx/statline.h" -#include "wx/statbox.h" + +#ifndef WX_PRECOMP + #include "wx/statbox.h" +#endif #include "wx/mac/uma.h" @@ -47,19 +50,19 @@ bool wxStaticLine::Create( wxWindow *parent, long style, const wxString &name) { - m_macIsUserPane = FALSE ; - + m_macIsUserPane = false ; + if ( !wxStaticLineBase::Create(parent, id, pos, size, style, wxDefaultValidator, name) ) return false; Rect bounds = wxMacGetBoundsForControl( this , pos , size ) ; m_peer = new wxMacControl(this) ; - verify_noerr(CreateSeparatorControl(MAC_WXHWND(parent->MacGetTopLevelWindowRef()),&bounds, m_peer->GetControlRefAddr() ) ) ; + verify_noerr(CreateSeparatorControl(MAC_WXHWND(parent->MacGetTopLevelWindowRef()),&bounds, m_peer->GetControlRefAddr() ) ) ; MacPostControlCreate(pos,size) ; - return TRUE; + return true; } #endif //wxUSE_STATLINE diff --git a/src/mac/carbon/window.cpp b/src/mac/carbon/window.cpp index 0623dc4a13..279b28d887 100644 --- a/src/mac/carbon/window.cpp +++ b/src/mac/carbon/window.cpp @@ -27,10 +27,10 @@ #include "wx/settings.h" #include "wx/msgdlg.h" #include "wx/scrolbar.h" + #include "wx/statbox.h" #endif #include "wx/layout.h" -#include "wx/statbox.h" #include "wx/tooltip.h" #include "wx/statusbr.h" #include "wx/menuitem.h" diff --git a/src/mac/classic/control.cpp b/src/mac/classic/control.cpp index 0f1caf53ae..cebe8c8a13 100644 --- a/src/mac/classic/control.cpp +++ b/src/mac/classic/control.cpp @@ -26,13 +26,13 @@ #include "wx/dialog.h" #include "wx/scrolbar.h" #include "wx/stattext.h" + #include "wx/statbox.h" #endif // WX_PRECOMP #include "wx/notebook.h" #include "wx/tabctrl.h" #include "wx/radiobox.h" #include "wx/spinbutt.h" -#include "wx/statbox.h" #include "wx/sizer.h" IMPLEMENT_ABSTRACT_CLASS(wxControl, wxWindow) diff --git a/src/mac/classic/statline.cpp b/src/mac/classic/statline.cpp index d8a1827397..cbc160d464 100644 --- a/src/mac/classic/statline.cpp +++ b/src/mac/classic/statline.cpp @@ -1,6 +1,6 @@ ///////////////////////////////////////////////////////////////////////////// -// Name: generic/statline.cpp -// Purpose: a generic wxStaticLine class +// Name: src/mac/classic/statline.cpp +// Purpose: wxStaticLine class // Author: Vadim Zeitlin // Created: 28.06.99 // Version: $Id$ @@ -24,7 +24,10 @@ #endif #include "wx/statline.h" -#include "wx/statbox.h" + +#ifndef WX_PRECOMP + #include "wx/statbox.h" +#endif // ============================================================================ // implementation @@ -44,7 +47,7 @@ bool wxStaticLine::Create( wxWindow *parent, const wxString &name) { if ( !CreateBase(parent, id, pos, size, style, wxDefaultValidator, name) ) - return FALSE; + return false; // ok, this is ugly but it's better than nothing: use a thin static box to // emulate static line @@ -53,5 +56,5 @@ bool wxStaticLine::Create( wxWindow *parent, // m_statbox = new wxStaticBox(parent, id, wxT(""), pos, sizeReal, style, name); - return TRUE; + return true; } diff --git a/src/mac/classic/statlmac.cpp b/src/mac/classic/statlmac.cpp index 0e54cd7975..818321cb0d 100644 --- a/src/mac/classic/statlmac.cpp +++ b/src/mac/classic/statlmac.cpp @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////////// -// Name: generic/statline.cpp +// Name: src/mac/classic/statlmac.cpp // Purpose: a generic wxStaticLine class // Author: Vadim Zeitlin // Created: 28.06.99 @@ -24,7 +24,10 @@ #endif #include "wx/statline.h" -#include "wx/statbox.h" + +#ifndef WX_PRECOMP + #include "wx/statbox.h" +#endif #include "wx/mac/uma.h" @@ -51,13 +54,13 @@ bool wxStaticLine::Create( wxWindow *parent, Rect bounds ; Str255 title ; - + MacPreControlCreate( parent , id , wxEmptyString , pos , size ,style, wxDefaultValidator , name , &bounds , title ) ; - m_macControl = (WXWidget) ::NewControl( MAC_WXHWND(parent->MacGetRootWindow()) , &bounds , title , false , 0 , 0 , 1, + m_macControl = (WXWidget) ::NewControl( MAC_WXHWND(parent->MacGetRootWindow()) , &bounds , title , false , 0 , 0 , 1, kControlSeparatorLineProc , (long) this ) ; - + MacPostControlCreate() ; - return TRUE; + return true; } diff --git a/src/mac/classic/window.cpp b/src/mac/classic/window.cpp index 3393452564..0e5d2ca672 100644 --- a/src/mac/classic/window.cpp +++ b/src/mac/classic/window.cpp @@ -27,11 +27,11 @@ #include "wx/settings.h" #include "wx/msgdlg.h" #include "wx/scrolbar.h" + #include "wx/statbox.h" #endif #include "wx/layout.h" #include "wx/listbox.h" -#include "wx/statbox.h" #include "wx/notebook.h" #include "wx/tabctrl.h" #include "wx/tooltip.h" diff --git a/src/xrc/xh_sizer.cpp b/src/xrc/xh_sizer.cpp index ca8f089f91..443c870ebb 100644 --- a/src/xrc/xh_sizer.cpp +++ b/src/xrc/xh_sizer.cpp @@ -22,11 +22,11 @@ #ifndef WX_PRECOMP #include "wx/log.h" #include "wx/panel.h" + #include "wx/statbox.h" #endif #include "wx/sizer.h" #include "wx/gbsizer.h" -#include "wx/statbox.h" #include "wx/notebook.h" #include "wx/tokenzr.h" diff --git a/src/xrc/xh_stbox.cpp b/src/xrc/xh_stbox.cpp index 9c3c08a25f..a52688d5e1 100644 --- a/src/xrc/xh_stbox.cpp +++ b/src/xrc/xh_stbox.cpp @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////////// -// Name: xh_stbox.cpp +// Name: src/xrc/xh_stbox.cpp // Purpose: XRC resource for wxStaticBox // Author: Brian Gavin // Created: 2000/09/09 @@ -15,15 +15,18 @@ #pragma hdrstop #endif -#if wxUSE_XRC +#if wxUSE_XRC && wxUSE_STATBOX #include "wx/xrc/xh_stbox.h" -#include "wx/statbox.h" + +#ifndef WX_PRECOMP + #include "wx/statbox.h" +#endif IMPLEMENT_DYNAMIC_CLASS(wxStaticBoxXmlHandler, wxXmlResourceHandler) wxStaticBoxXmlHandler::wxStaticBoxXmlHandler() -: wxXmlResourceHandler() + :wxXmlResourceHandler() { AddWindowStyles(); } @@ -49,4 +52,4 @@ bool wxStaticBoxXmlHandler::CanHandle(wxXmlNode *node) return IsOfClass(node, wxT("wxStaticBox")); } -#endif // wxUSE_XRC +#endif // wxUSE_XRC && wxUSE_STATBOX -- 2.45.2