diff --git a/src/gtk/data.cpp b/src/gtk/data.cpp index 51f339fb83..714d5169c5 100644 --- a/src/gtk/data.cpp +++ b/src/gtk/data.cpp @@ -12,9 +12,9 @@ #ifndef WX_PRECOMP #include "wx/object.h" + #include "wx/window.h" #endif -#include "wx/window.h" #include "wx/dc.h" #include "wx/cursor.h" diff --git a/src/gtk/dcscreen.cpp b/src/gtk/dcscreen.cpp index 3e0d46d5bb..8e00545f96 100644 --- a/src/gtk/dcscreen.cpp +++ b/src/gtk/dcscreen.cpp @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////////// -// Name: dcscreen.cpp +// Name: src/gtk/dcscreen.cpp // Purpose: // Author: Robert Roebling // Id: $Id$ @@ -11,7 +11,10 @@ #include "wx/wxprec.h" #include "wx/dcscreen.h" -#include "wx/window.h" + +#ifndef WX_PRECOMP + #include "wx/window.h" +#endif #include #include @@ -33,7 +36,7 @@ IMPLEMENT_DYNAMIC_CLASS(wxScreenDC,wxPaintDC) wxScreenDC::wxScreenDC() { - m_ok = FALSE; + m_ok = false; m_cmap = gdk_colormap_get_system(); m_window = gdk_get_default_root_window(); @@ -44,7 +47,7 @@ wxScreenDC::wxScreenDC() m_layout = pango_layout_new( m_context ); // m_fontdesc = pango_font_description_copy( widget->style->font_desc ); - m_isScreenDC = TRUE; + m_isScreenDC = true; SetUpDC(); diff --git a/src/gtk/dnd.cpp b/src/gtk/dnd.cpp index b199481b30..ffd858bc76 100644 --- a/src/gtk/dnd.cpp +++ b/src/gtk/dnd.cpp @@ -19,9 +19,9 @@ #include "wx/log.h" #include "wx/app.h" #include "wx/utils.h" + #include "wx/window.h" #endif -#include "wx/window.h" #include "wx/gdicmn.h" #include "wx/gtk/private.h" diff --git a/src/gtk/renderer.cpp b/src/gtk/renderer.cpp index b86627af63..b2ac87afaf 100644 --- a/src/gtk/renderer.cpp +++ b/src/gtk/renderer.cpp @@ -25,10 +25,14 @@ #endif #include "wx/renderer.h" + +#ifndef WX_PRECOMP + #include "wx/window.h" +#endif + #include #include "wx/gtk/win_gtk.h" -#include "wx/window.h" #include "wx/dc.h" #include "wx/dcclient.h" #include "wx/settings.h" @@ -436,7 +440,7 @@ wxRendererGTK::DrawComboBoxDropButton(wxWindow *win, DrawDropArrow(win,dc,rect); } -void +void wxRendererGTK::DrawCheckBox(wxWindow *win, wxDC& dc, const wxRect& rect, @@ -468,8 +472,8 @@ wxRendererGTK::DrawCheckBox(wxWindow *win, NULL, button, "cellcheck", - dc.LogicalToDeviceX(rect.x)+2, - dc.LogicalToDeviceY(rect.y)+3, + dc.LogicalToDeviceX(rect.x)+2, + dc.LogicalToDeviceY(rect.y)+3, 13, 13 ); } @@ -511,11 +515,11 @@ wxRendererGTK::DrawPushButton(wxWindow *win, ); } -void +void wxRendererGTK::DrawItemSelectionRect(wxWindow *win, - wxDC& dc, - const wxRect& rect, - int flags ) + wxDC& dc, + const wxRect& rect, + int flags ) { // for reason why we do this, see DrawDropArrow wxWindowDC& wdc = (wxWindowDC&)dc; @@ -533,7 +537,7 @@ wxRendererGTK::DrawItemSelectionRect(wxWindow *win, GTK_PIZZA(win->m_wxwindow)->bin_window, state, GTK_SHADOW_NONE, - NULL, + NULL, win->m_wxwindow, "treeview", dc.LogicalToDeviceX(rect.x), diff --git a/src/gtk/tooltip.cpp b/src/gtk/tooltip.cpp index e0d3bd03fa..bce18195c1 100644 --- a/src/gtk/tooltip.cpp +++ b/src/gtk/tooltip.cpp @@ -13,7 +13,10 @@ #if wxUSE_TOOLTIPS #include "wx/tooltip.h" -#include "wx/window.h" + +#ifndef WX_PRECOMP + #include "wx/window.h" +#endif #include "wx/gtk/private.h" @@ -52,7 +55,7 @@ void wxToolTip::Apply( wxWindow *win ) m_window = win; - if (m_text.IsEmpty()) + if (m_text.empty()) m_window->ApplyToolTip( ss_tooltips, (wxChar*) NULL ); else m_window->ApplyToolTip( ss_tooltips, m_text ); @@ -83,4 +86,4 @@ void wxToolTip::SetDelay( long msecs ) gtk_tooltips_set_delay( ss_tooltips, (int)msecs ); } -#endif +#endif // wxUSE_TOOLTIPS diff --git a/src/gtk1/data.cpp b/src/gtk1/data.cpp index 96193525eb..48730c7ec9 100644 --- a/src/gtk1/data.cpp +++ b/src/gtk1/data.cpp @@ -12,9 +12,9 @@ #ifndef WX_PRECOMP #include "wx/object.h" + #include "wx/window.h" #endif -#include "wx/window.h" #include "wx/dc.h" #include "wx/cursor.h" diff --git a/src/gtk1/dcscreen.cpp b/src/gtk1/dcscreen.cpp index dbd3a29229..7797f94394 100644 --- a/src/gtk1/dcscreen.cpp +++ b/src/gtk1/dcscreen.cpp @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////////// -// Name: dcscreen.cpp +// Name: src/gtk1/dcscreen.cpp // Purpose: // Author: Robert Roebling // Id: $Id$ @@ -11,7 +11,10 @@ #include "wx/wxprec.h" #include "wx/dcscreen.h" -#include "wx/window.h" + +#ifndef WX_PRECOMP + #include "wx/window.h" +#endif #include #include @@ -33,11 +36,11 @@ IMPLEMENT_DYNAMIC_CLASS(wxScreenDC,wxPaintDC) wxScreenDC::wxScreenDC() { - m_ok = FALSE; + m_ok = false; m_cmap = gdk_colormap_get_system(); m_window = GDK_ROOT_PARENT(); - m_isScreenDC = TRUE; + m_isScreenDC = true; SetUpDC(); diff --git a/src/gtk1/dnd.cpp b/src/gtk1/dnd.cpp index 1d128192e1..becc53af14 100644 --- a/src/gtk1/dnd.cpp +++ b/src/gtk1/dnd.cpp @@ -19,9 +19,9 @@ #include "wx/log.h" #include "wx/app.h" #include "wx/utils.h" + #include "wx/window.h" #endif -#include "wx/window.h" #include "wx/gdicmn.h" #include "wx/gtk1/private.h" diff --git a/src/gtk1/renderer.cpp b/src/gtk1/renderer.cpp index 65efb88eae..43b904d760 100644 --- a/src/gtk1/renderer.cpp +++ b/src/gtk1/renderer.cpp @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////////// -// Name: gtk/renderer.cpp +// Name: src/gtk1/renderer.cpp // Purpose: implementation of wxRendererNative for wxGTK // Author: Vadim Zeitlin // Modified by: @@ -25,10 +25,14 @@ #endif #include "wx/renderer.h" + +#ifndef WX_PRECOMP + #include "wx/window.h" +#endif + #include #include "wx/gtk1/win_gtk.h" -#include "wx/window.h" #include "wx/dc.h" #include "wx/dcclient.h" diff --git a/src/gtk1/tooltip.cpp b/src/gtk1/tooltip.cpp index 0ac2a8b1da..141f3bc17d 100644 --- a/src/gtk1/tooltip.cpp +++ b/src/gtk1/tooltip.cpp @@ -13,7 +13,10 @@ #if wxUSE_TOOLTIPS #include "wx/tooltip.h" -#include "wx/window.h" + +#ifndef WX_PRECOMP + #include "wx/window.h" +#endif #include "wx/gtk1/private.h" @@ -52,7 +55,7 @@ void wxToolTip::Apply( wxWindow *win ) m_window = win; - if (m_text.IsEmpty()) + if (m_text.empty()) m_window->ApplyToolTip( ss_tooltips, (wxChar*) NULL ); else m_window->ApplyToolTip( ss_tooltips, m_text ); diff --git a/src/mac/carbon/app.cpp b/src/mac/carbon/app.cpp index 4a80a2817d..3487a763de 100644 --- a/src/mac/carbon/app.cpp +++ b/src/mac/carbon/app.cpp @@ -17,9 +17,9 @@ #include "wx/intl.h" #include "wx/log.h" #include "wx/utils.h" + #include "wx/window.h" #endif -#include "wx/window.h" #include "wx/frame.h" #include "wx/button.h" #include "wx/gdicmn.h" diff --git a/src/mac/carbon/bmpbuttn.cpp b/src/mac/carbon/bmpbuttn.cpp index 48fec8aac6..2df9569de4 100644 --- a/src/mac/carbon/bmpbuttn.cpp +++ b/src/mac/carbon/bmpbuttn.cpp @@ -13,21 +13,24 @@ #if wxUSE_BMPBUTTON -#include "wx/window.h" #include "wx/bmpbuttn.h" +#ifndef WX_PRECOMP + #include "wx/window.h" +#endif + IMPLEMENT_DYNAMIC_CLASS(wxBitmapButton, wxButton) #include "wx/mac/uma.h" #include "wx/bitmap.h" bool wxBitmapButton::Create( wxWindow *parent, - wxWindowID id, const wxBitmap& bitmap, - const wxPoint& pos, - const wxSize& size, - long style, - const wxValidator& validator, - const wxString& name ) + wxWindowID id, const wxBitmap& bitmap, + const wxPoint& pos, + const wxSize& size, + long style, + const wxValidator& validator, + const wxString& name ) { m_macIsUserPane = false; @@ -55,9 +58,9 @@ bool wxBitmapButton::Create( wxWindow *parent, if ( bitmap.Ok() ) { wxSize newSize = DoGetBestSize(); - if ( width == -1 ) + if ( width == wxDefaultCoord ) width = newSize.x; - if ( height == -1 ) + if ( height == wxDefaultCoord ) height = newSize.y; } diff --git a/src/mac/carbon/dcclient.cpp b/src/mac/carbon/dcclient.cpp index 24e5d95e30..f706434036 100644 --- a/src/mac/carbon/dcclient.cpp +++ b/src/mac/carbon/dcclient.cpp @@ -15,11 +15,11 @@ #ifndef WX_PRECOMP #include "wx/log.h" + #include "wx/window.h" #endif #include "wx/dcmemory.h" #include "wx/region.h" -#include "wx/window.h" #include "wx/toplevel.h" #include "wx/settings.h" #include "wx/math.h" diff --git a/src/mac/carbon/dnd.cpp b/src/mac/carbon/dnd.cpp index 22cef52744..ab82e4c481 100644 --- a/src/mac/carbon/dnd.cpp +++ b/src/mac/carbon/dnd.cpp @@ -17,9 +17,9 @@ #ifndef WX_PRECOMP #include "wx/app.h" + #include "wx/window.h" #endif // WX_PRECOMP -#include "wx/window.h" #include "wx/toplevel.h" #include "wx/gdicmn.h" #include "wx/mac/private.h" diff --git a/src/mac/carbon/menu.cpp b/src/mac/carbon/menu.cpp index 94f29966bc..fec068407d 100644 --- a/src/mac/carbon/menu.cpp +++ b/src/mac/carbon/menu.cpp @@ -24,10 +24,10 @@ #include "wx/log.h" #include "wx/app.h" #include "wx/utils.h" + #include "wx/window.h" #endif #include "wx/menuitem.h" -#include "wx/window.h" #include "wx/log.h" #include "wx/frame.h" diff --git a/src/mac/carbon/tooltip.cpp b/src/mac/carbon/tooltip.cpp index d2038b876b..8ffbb4101a 100644 --- a/src/mac/carbon/tooltip.cpp +++ b/src/mac/carbon/tooltip.cpp @@ -15,10 +15,10 @@ #ifndef WX_PRECOMP #include "wx/app.h" + #include "wx/window.h" #endif // WX_PRECOMP #include "wx/dc.h" -#include "wx/window.h" #include "wx/timer.h" #include "wx/geometry.h" #include "wx/mac/uma.h" diff --git a/src/mac/classic/app.cpp b/src/mac/classic/app.cpp index 5f4fb9e612..f7359bc924 100644 --- a/src/mac/classic/app.cpp +++ b/src/mac/classic/app.cpp @@ -21,9 +21,9 @@ #include "wx/intl.h" #include "wx/log.h" #include "wx/utils.h" + #include "wx/window.h" #endif -#include "wx/window.h" #include "wx/frame.h" #include "wx/button.h" #include "wx/gdicmn.h" diff --git a/src/mac/classic/bmpbuttn.cpp b/src/mac/classic/bmpbuttn.cpp index a5ac7c6304..be7783beb6 100644 --- a/src/mac/classic/bmpbuttn.cpp +++ b/src/mac/classic/bmpbuttn.cpp @@ -1,17 +1,24 @@ ///////////////////////////////////////////////////////////////////////////// -// Name: bmpbuttn.cpp +// Name: src/mac/classic/bmpbuttn.cpp // Purpose: wxBitmapButton // Author: Stefan Csomor // Modified by: // Created: 1998-01-01 // RCS-ID: $Id$ // Copyright: (c) Stefan Csomor -// Licence: wxWindows licence +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// -#include "wx/window.h" +#include "wx/wxprec.h" + +#if wxUSE_BMPBUTTON + #include "wx/bmpbuttn.h" +#ifndef WX_PRECOMP + #include "wx/window.h" +#endif + IMPLEMENT_DYNAMIC_CLASS(wxBitmapButton, wxButton) #include "wx/mac/uma.h" @@ -30,7 +37,7 @@ bool wxBitmapButton::Create(wxWindow *parent, wxWindowID id, const wxBitmap& bit return false; m_bmpNormal = bitmap; - + if (style & wxBU_AUTODRAW) { m_marginX = wxDEFAULT_BUTTON_MARGIN; @@ -58,19 +65,19 @@ bool wxBitmapButton::Create(wxWindow *parent, wxWindowID id, const wxBitmap& bit Str255 title ; m_bmpNormal = bitmap; wxBitmapRefData * bmap = NULL ; - + if ( m_bmpNormal.Ok() ) bmap = (wxBitmapRefData*) ( m_bmpNormal.GetRefData()) ; - + MacPreControlCreate( parent , id , wxEmptyString , pos , wxSize( width , height ) ,style, validator , name , &bounds , title ) ; - m_macControl = (WXWidget) ::NewControl( MAC_WXHWND(parent->MacGetRootWindow()) , &bounds , title , false , 0 , - kControlBehaviorOffsetContents + - ( bmap && bmap->m_bitmapType == kMacBitmapTypeIcon ? - kControlContentCIconHandle : kControlContentPictHandle ) , 0, + m_macControl = (WXWidget) ::NewControl( MAC_WXHWND(parent->MacGetRootWindow()) , &bounds , title , false , 0 , + kControlBehaviorOffsetContents + + ( bmap && bmap->m_bitmapType == kMacBitmapTypeIcon ? + kControlContentCIconHandle : kControlContentPictHandle ) , 0, (( style & wxBU_AUTODRAW ) ? kControlBevelButtonSmallBevelProc : kControlBevelButtonNormalBevelProc ), (long) this ) ; wxASSERT_MSG( (ControlHandle) m_macControl != NULL , wxT("No valid mac control") ) ; - + ControlButtonContentInfo info ; wxMacCreateBitmapButton( &info , m_bmpNormal ) ; if ( info.contentType != kControlNoContent ) @@ -79,7 +86,7 @@ bool wxBitmapButton::Create(wxWindow *parent, wxWindowID id, const wxBitmap& bit } MacPostControlCreate() ; - return TRUE; + return true; } void wxBitmapButton::SetBitmapLabel(const wxBitmap& bitmap) @@ -106,3 +113,5 @@ wxSize wxBitmapButton::DoGetBestSize() const } return best; } + +#endif // wxUSE_BMPBUTTON diff --git a/src/mac/classic/dcclient.cpp b/src/mac/classic/dcclient.cpp index 6c8fbe9f18..747423c259 100644 --- a/src/mac/classic/dcclient.cpp +++ b/src/mac/classic/dcclient.cpp @@ -1,18 +1,24 @@ ///////////////////////////////////////////////////////////////////////////// -// Name: dcclient.cpp +// Name: src/mac/classic/dcclient.cpp // Purpose: wxClientDC 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/dcclient.h" + +#ifndef WX_PRECOMP + #include "wx/window.h" +#endif + #include "wx/dcmemory.h" #include "wx/region.h" -#include "wx/window.h" #include "wx/toplevel.h" #include "wx/math.h" #include "wx/mac/private.h" @@ -37,17 +43,17 @@ IMPLEMENT_DYNAMIC_CLASS(wxPaintDC, wxWindowDC) #include "wx/mac/uma.h" -wxWindowDC::wxWindowDC() +wxWindowDC::wxWindowDC() { m_window = NULL ; } -wxWindowDC::wxWindowDC(wxWindow *window) +wxWindowDC::wxWindowDC(wxWindow *window) { m_window = window ; wxTopLevelWindowMac* rootwindow = window->MacGetTopLevelWindow() ; WindowRef windowref = (WindowRef) rootwindow->MacGetWindowRef() ; - + int x , y ; x = y = 0 ; window->MacWindowToRootWindow( &x , &y ) ; @@ -57,7 +63,7 @@ wxWindowDC::wxWindowDC(wxWindow *window) OffsetRgn( (RgnHandle) m_macBoundaryClipRgn , m_macLocalOrigin.x , m_macLocalOrigin.y ) ; CopyRgn( (RgnHandle) m_macBoundaryClipRgn , (RgnHandle) m_macCurrentClipRgn ) ; m_macPort = UMAGetWindowPort( windowref ) ; - m_ok = TRUE ; + m_ok = true ; SetBackground(window->MacGetBackgroundBrush()); } @@ -103,7 +109,7 @@ wxClientDC::wxClientDC(wxWindow *window) CopyRgn( (RgnHandle) m_macBoundaryClipRgn ,(RgnHandle) m_macCurrentClipRgn ) ; m_macPort = UMAGetWindowPort( windowref ) ; - m_ok = TRUE ; + m_ok = true ; SetBackground(window->MacGetBackgroundBrush()); SetFont( window->GetFont() ) ; } @@ -150,7 +156,7 @@ wxPaintDC::wxPaintDC(wxWindow *window) CopyRgn( (RgnHandle) m_macBoundaryClipRgn , (RgnHandle) m_macCurrentClipRgn ) ; m_macPort = UMAGetWindowPort( windowref ) ; - m_ok = TRUE ; + m_ok = true ; SetBackground(window->MacGetBackgroundBrush()); SetFont( window->GetFont() ) ; } @@ -165,5 +171,3 @@ void wxPaintDC::DoGetSize(int *width, int *height) const m_window->GetClientSize( width, height ); } - - diff --git a/src/mac/classic/dnd.cpp b/src/mac/classic/dnd.cpp index 5acd609b19..43cc599f1a 100644 --- a/src/mac/classic/dnd.cpp +++ b/src/mac/classic/dnd.cpp @@ -21,9 +21,9 @@ #ifndef WX_PRECOMP #include "wx/app.h" + #include "wx/window.h" #endif // WX_PRECOMP -#include "wx/window.h" #include "wx/toplevel.h" #include "wx/gdicmn.h" #include "wx/mac/private.h" diff --git a/src/mac/classic/menu.cpp b/src/mac/classic/menu.cpp index 66a7365a55..12cba13bf2 100644 --- a/src/mac/classic/menu.cpp +++ b/src/mac/classic/menu.cpp @@ -24,10 +24,10 @@ #include "wx/log.h" #include "wx/app.h" #include "wx/utils.h" + #include "wx/window.h" #endif #include "wx/menuitem.h" -#include "wx/window.h" #include "wx/frame.h" #include "wx/mac/uma.h" diff --git a/src/mac/classic/tooltip.cpp b/src/mac/classic/tooltip.cpp index 5c2424b150..cca96f416c 100644 --- a/src/mac/classic/tooltip.cpp +++ b/src/mac/classic/tooltip.cpp @@ -19,10 +19,10 @@ #ifndef WX_PRECOMP #include "wx/app.h" + #include "wx/window.h" #endif #include "wx/dc.h" -#include "wx/window.h" #include "wx/timer.h" #include "wx/geometry.h" #include "wx/mac/uma.h" @@ -408,4 +408,4 @@ void wxMacToolTip::Clear() #endif } -#endif +#endif // wxUSE_TOOLTIPS diff --git a/src/mac/corefoundation/hidjoystick.cpp b/src/mac/corefoundation/hidjoystick.cpp index ee7178d643..d9be35e342 100644 --- a/src/mac/corefoundation/hidjoystick.cpp +++ b/src/mac/corefoundation/hidjoystick.cpp @@ -34,11 +34,11 @@ #ifndef WX_PRECOMP #include "wx/log.h" #include "wx/event.h" //joystick wxEvents + #include "wx/window.h" //for wxWindow to "capture" joystick #endif #include "wx/joystick.h" //... #include "wx/thread.h" //wxThread for polling thread/ wxCriticalSection -#include "wx/window.h" //for wxWindow to "capture" joystick //private headers #include "wx/mac/corefoundation/hid.h" //private mac hid stuff diff --git a/src/motif/cursor.cpp b/src/motif/cursor.cpp index fdcb917d39..11c30421c7 100644 --- a/src/motif/cursor.cpp +++ b/src/motif/cursor.cpp @@ -21,10 +21,9 @@ #ifndef WX_PRECOMP #include "wx/app.h" #include "wx/utils.h" + #include "wx/window.h" #endif -#include "wx/window.h" - #if wxUSE_IMAGE #include "wx/image.h" #endif diff --git a/src/motif/dcclient.cpp b/src/motif/dcclient.cpp index a689189381..eef4a0aa7d 100644 --- a/src/motif/dcclient.cpp +++ b/src/motif/dcclient.cpp @@ -44,10 +44,10 @@ #ifndef WX_PRECOMP #include "wx/log.h" #include "wx/app.h" + #include "wx/window.h" #endif #include "wx/dcmemory.h" -#include "wx/window.h" #include "wx/image.h" #include "wx/math.h" diff --git a/src/motif/dcscreen.cpp b/src/motif/dcscreen.cpp index d385243254..10b0fb0acc 100644 --- a/src/motif/dcscreen.cpp +++ b/src/motif/dcscreen.cpp @@ -16,9 +16,9 @@ #ifndef WX_PRECOMP #include "wx/utils.h" + #include "wx/window.h" #endif -#include "wx/window.h" #include "wx/frame.h" #ifdef __VMS__ diff --git a/src/motif/dnd.cpp b/src/motif/dnd.cpp index aac3b27102..8cb7763047 100644 --- a/src/motif/dnd.cpp +++ b/src/motif/dnd.cpp @@ -19,9 +19,9 @@ #include "wx/log.h" #include "wx/app.h" #include "wx/utils.h" + #include "wx/window.h" #endif -#include "wx/window.h" #include "wx/gdicmn.h" #include diff --git a/src/motif/evtloop.cpp b/src/motif/evtloop.cpp index 0d5a12fbf2..4271f4577c 100644 --- a/src/motif/evtloop.cpp +++ b/src/motif/evtloop.cpp @@ -28,10 +28,10 @@ #ifndef WX_PRECOMP #include "wx/event.h" #include "wx/app.h" + #include "wx/window.h" #endif //WX_PRECOMP #include "wx/evtloop.h" -#include "wx/window.h" #ifdef __VMS__ #pragma message disable nosimpint diff --git a/src/motif/palette.cpp b/src/motif/palette.cpp index 12cf5a31dd..378172ff5b 100644 --- a/src/motif/palette.cpp +++ b/src/motif/palette.cpp @@ -42,10 +42,9 @@ not the functionality that wxPalette::Create() aims to provide. #ifndef WX_PRECOMP #include "wx/app.h" #include "wx/utils.h" + #include "wx/window.h" #endif -#include "wx/window.h" - #ifdef __VMS__ #pragma message disable nosimpint #endif diff --git a/src/msw/dcclient.cpp b/src/msw/dcclient.cpp index 890f27dffd..05685aa39f 100644 --- a/src/msw/dcclient.cpp +++ b/src/msw/dcclient.cpp @@ -29,10 +29,9 @@ #ifndef WX_PRECOMP #include "wx/string.h" #include "wx/log.h" + #include "wx/window.h" #endif -#include "wx/window.h" - #include "wx/msw/private.h" // ---------------------------------------------------------------------------- diff --git a/src/msw/joystick.cpp b/src/msw/joystick.cpp index 51e6178094..78e023fd73 100644 --- a/src/msw/joystick.cpp +++ b/src/msw/joystick.cpp @@ -22,9 +22,9 @@ #ifndef WX_PRECOMP #include "wx/string.h" + #include "wx/window.h" #endif -#include "wx/window.h" #include "wx/msw/private.h" #if !defined(__GNUWIN32_OLD__) || defined(__CYGWIN10__) @@ -36,7 +36,6 @@ #define NO_JOYGETPOSEX #endif -#include "wx/window.h" #include "wx/msw/registry.h" #include diff --git a/src/msw/listbox.cpp b/src/msw/listbox.cpp index e9e500591e..f2507cf98f 100644 --- a/src/msw/listbox.cpp +++ b/src/msw/listbox.cpp @@ -27,9 +27,9 @@ #include "wx/dc.h" #include "wx/utils.h" #include "wx/log.h" + #include "wx/window.h" #endif -#include "wx/window.h" #include "wx/msw/private.h" #include diff --git a/src/msw/statbmp.cpp b/src/msw/statbmp.cpp index c321fe5f73..26a32bf03b 100644 --- a/src/msw/statbmp.cpp +++ b/src/msw/statbmp.cpp @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////////// -// Name: statbmp.cpp +// Name: src/msw/statbmp.cpp // Purpose: wxStaticBitmap // Author: Julian Smart // Modified by: @@ -26,14 +26,15 @@ #if wxUSE_STATBMP -#include "wx/window.h" -#include "wx/msw/private.h" +#include "wx/statbmp.h" #ifndef WX_PRECOMP + #include "wx/window.h" #include "wx/icon.h" - #include "wx/statbmp.h" #endif +#include "wx/msw/private.h" + #include "wx/sysopt.h" #include @@ -276,9 +277,9 @@ void wxStaticBitmap::SetImageNoCopy( wxGDIImage* image) if (m_currentHandle != 0 && oldHandle != (HGDIOBJ) m_currentHandle) { // the static control made a copy and we are responsible for deleting it - DeleteObject((HGDIOBJ) oldHandle); + DeleteObject((HGDIOBJ) oldHandle); } - m_currentHandle = (WXHANDLE)handle; + m_currentHandle = (WXHANDLE)handle; #endif // Win32 if ( ImageIsOk() ) @@ -303,4 +304,3 @@ void wxStaticBitmap::SetImageNoCopy( wxGDIImage* image) } #endif // wxUSE_STATBMP - diff --git a/src/os2/checklst.cpp b/src/os2/checklst.cpp index 692eafb574..ed0d2e3f36 100644 --- a/src/os2/checklst.cpp +++ b/src/os2/checklst.cpp @@ -23,12 +23,12 @@ #ifndef WX_PRECOMP #include "wx/object.h" #include "wx/log.h" + #include "wx/window.h" #endif #include "wx/colour.h" #include "wx/font.h" #include "wx/bitmap.h" -#include "wx/window.h" #include "wx/listbox.h" #include "wx/ownerdrw.h" #include "wx/settings.h" diff --git a/src/os2/dcclient.cpp b/src/os2/dcclient.cpp index 74423dfaf2..abc17ca2bb 100644 --- a/src/os2/dcclient.cpp +++ b/src/os2/dcclient.cpp @@ -26,10 +26,9 @@ #include "wx/string.h" #include "wx/log.h" #include "wx/app.h" + #include "wx/window.h" #endif -#include "wx/window.h" - #include "wx/os2/private.h" // ---------------------------------------------------------------------------- diff --git a/src/os2/dcprint.cpp b/src/os2/dcprint.cpp index edd3969173..c6e79fdb52 100644 --- a/src/os2/dcprint.cpp +++ b/src/os2/dcprint.cpp @@ -26,9 +26,9 @@ #include "wx/math.h" #include "wx/string.h" #include "wx/log.h" + #include "wx/window.h" #endif -#include "wx/window.h" #include "wx/os2/private.h" IMPLEMENT_CLASS(wxPrinterDC, wxDC) diff --git a/src/os2/dnd.cpp b/src/os2/dnd.cpp index 9d277bfade..0f61318b77 100644 --- a/src/os2/dnd.cpp +++ b/src/os2/dnd.cpp @@ -18,9 +18,9 @@ #ifndef WX_PRECOMP #include "wx/app.h" + #include "wx/window.h" #endif -#include "wx/window.h" #include "wx/gdicmn.h" #define INCL_PM diff --git a/src/os2/joystick.cpp b/src/os2/joystick.cpp index c86cb881a6..2117fd31e3 100644 --- a/src/os2/joystick.cpp +++ b/src/os2/joystick.cpp @@ -18,6 +18,7 @@ #ifndef WX_PRECOMP #include "wx/string.h" + #include "wx/window.h" #endif #define INCL_PM @@ -26,8 +27,6 @@ #define NO_JOYGETPOSEX -#include "wx/window.h" - IMPLEMENT_DYNAMIC_CLASS(wxJoystick, wxObject) // Attributes diff --git a/src/os2/listbox.cpp b/src/os2/listbox.cpp index 11e6a92bc7..ae9fc4101a 100644 --- a/src/os2/listbox.cpp +++ b/src/os2/listbox.cpp @@ -26,9 +26,9 @@ #include "wx/utils.h" #include "wx/scrolwin.h" #include "wx/log.h" + #include "wx/window.h" #endif -#include "wx/window.h" #include "wx/os2/private.h" #define INCL_M diff --git a/src/os2/region.cpp b/src/os2/region.cpp index 012ed66e87..a0723c0073 100644 --- a/src/os2/region.cpp +++ b/src/os2/region.cpp @@ -14,12 +14,12 @@ #ifndef WX_PRECOMP #include "wx/app.h" + #include "wx/window.h" #endif #include "wx/os2/region.h" #include "wx/gdicmn.h" -#include "wx/window.h" #include "wx/os2/private.h" IMPLEMENT_DYNAMIC_CLASS(wxRegion, wxGDIObject) diff --git a/src/os2/settings.cpp b/src/os2/settings.cpp index 805e567da7..a190d277d0 100644 --- a/src/os2/settings.cpp +++ b/src/os2/settings.cpp @@ -17,11 +17,11 @@ #include "wx/pen.h" #include "wx/brush.h" #include "wx/gdicmn.h" + #include "wx/window.h" #endif #include "wx/module.h" #include "wx/settings.h" -#include "wx/window.h" #include "wx/os2/private.h" // the module which is used to clean up wxSystemSettings data (this is a diff --git a/src/os2/statbmp.cpp b/src/os2/statbmp.cpp index 304f45835e..3ec5c73c58 100644 --- a/src/os2/statbmp.cpp +++ b/src/os2/statbmp.cpp @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////////// -// Name: statbmp.cpp +// Name: src/os2/statbmp.cpp // Purpose: wxStaticBitmap // Author: David Webster // Modified by: @@ -12,15 +12,16 @@ // For compilers that support precompilation, includes "wx.h". #include "wx/wxprec.h" -#include "wx/dcclient.h" -#include "wx/window.h" -#include "wx/os2/private.h" +#include "wx/statbmp.h" #ifndef WX_PRECOMP #include "wx/icon.h" - #include "wx/statbmp.h" + #include "wx/window.h" #endif +#include "wx/dcclient.h" +#include "wx/os2/private.h" + #include // --------------------------------------------------------------------------- @@ -119,7 +120,7 @@ bool wxStaticBitmap::Create( wxWindow* pParent, sError = wxPMErrorToStr(vError); return false; } - wxCHECK_MSG( m_hWnd, FALSE, wxT("Failed to create static bitmap") ); + wxCHECK_MSG( m_hWnd, false, wxT("Failed to create static bitmap") ); m_pImage = ConvertImage(rBitmap); ::WinSendMsg( m_hWnd, SM_SETHANDLE, @@ -154,12 +155,10 @@ wxSize wxStaticBitmap::DoGetBestSize() const return wxWindow::DoGetBestSize(); } -void wxStaticBitmap::OnPaint ( - wxPaintEvent& WXUNUSED(rEvent) -) +void wxStaticBitmap::OnPaint ( wxPaintEvent& WXUNUSED(rEvent) ) { - wxPaintDC vDc(this); - wxBitmap* pBitmap; + wxPaintDC vDc(this); + wxBitmap* pBitmap; if (m_pImage->IsKindOf(CLASSINFO(wxIcon))) { @@ -177,14 +176,12 @@ void wxStaticBitmap::OnPaint ( } } // end of wxStaticBitmap::OnPaint -void wxStaticBitmap::SetImage( - const wxGDIImage& rBitmap -) +void wxStaticBitmap::SetImage( const wxGDIImage& rBitmap ) { - int nX = 0; - int nY = 0; - int nWidth = 0; - int nHeight = 0; + int nX = 0; + int nY = 0; + int nWidth = 0; + int nHeight = 0; Free(); ::WinSendMsg( GetHwnd() diff --git a/src/os2/statbox.cpp b/src/os2/statbox.cpp index ec2bd57eef..41f25791f4 100644 --- a/src/os2/statbox.cpp +++ b/src/os2/statbox.cpp @@ -17,9 +17,9 @@ #ifndef WX_PRECOMP #include "wx/app.h" #include "wx/dcclient.h" + #include "wx/window.h" #endif -#include "wx/window.h" #include "wx/os2/private.h" IMPLEMENT_DYNAMIC_CLASS(wxStaticBox, wxControl) diff --git a/src/palmos/dcclient.cpp b/src/palmos/dcclient.cpp index 1269dcb586..b8a423d326 100644 --- a/src/palmos/dcclient.cpp +++ b/src/palmos/dcclient.cpp @@ -29,10 +29,9 @@ #ifndef WX_PRECOMP #include "wx/string.h" #include "wx/log.h" + #include "wx/window.h" #endif -#include "wx/window.h" - // ---------------------------------------------------------------------------- // array/list types // ---------------------------------------------------------------------------- diff --git a/src/palmos/joystick.cpp b/src/palmos/joystick.cpp index f189adc7cd..01a44cd3e3 100644 --- a/src/palmos/joystick.cpp +++ b/src/palmos/joystick.cpp @@ -18,10 +18,9 @@ #ifndef WX_PRECOMP #include "wx/string.h" + #include "wx/window.h" #endif -#include "wx/window.h" - IMPLEMENT_DYNAMIC_CLASS(wxJoystick, wxObject) // Attributes diff --git a/src/palmos/listbox.cpp b/src/palmos/listbox.cpp index 6876e0668f..eb61926a48 100644 --- a/src/palmos/listbox.cpp +++ b/src/palmos/listbox.cpp @@ -28,9 +28,9 @@ #include "wx/dc.h" #include "wx/utils.h" #include "wx/log.h" + #include "wx/window.h" #endif -#include "wx/window.h" #include "wx/palmos/private.h" #if wxUSE_OWNER_DRAWN diff --git a/src/palmos/statbmp.cpp b/src/palmos/statbmp.cpp index 361ba260a7..2546840061 100644 --- a/src/palmos/statbmp.cpp +++ b/src/palmos/statbmp.cpp @@ -26,14 +26,15 @@ #if wxUSE_STATBMP -#include "wx/window.h" -#include "wx/palmos/private.h" +#include "wx/statbmp.h" #ifndef WX_PRECOMP #include "wx/icon.h" - #include "wx/statbmp.h" + #include "wx/window.h" #endif +#include "wx/palmos/private.h" + // --------------------------------------------------------------------------- // macors // --------------------------------------------------------------------------- diff --git a/src/palmos/window.cpp b/src/palmos/window.cpp index f87ff65b7f..b18b7f742d 100644 --- a/src/palmos/window.cpp +++ b/src/palmos/window.cpp @@ -77,7 +77,6 @@ #include "wx/textctrl.h" #include "wx/notebook.h" #include "wx/listctrl.h" -#include "wx/window.h" #include diff --git a/src/unix/joystick.cpp b/src/unix/joystick.cpp index 6383d60124..49a4cad688 100644 --- a/src/unix/joystick.cpp +++ b/src/unix/joystick.cpp @@ -18,6 +18,7 @@ #ifndef WX_PRECOMP #include "wx/event.h" + #include "wx/window.h" #endif //WX_PRECOMP #include @@ -28,7 +29,6 @@ #include #include -#include "wx/window.h" #include "wx/unix/private.h" enum { diff --git a/src/x11/dcclient.cpp b/src/x11/dcclient.cpp index fe196bc01e..2d54259349 100644 --- a/src/x11/dcclient.cpp +++ b/src/x11/dcclient.cpp @@ -16,10 +16,10 @@ #ifndef WX_PRECOMP #include "wx/app.h" + #include "wx/window.h" #endif #include "wx/dcmemory.h" -#include "wx/window.h" #include "wx/image.h" #include "wx/module.h" #include "wx/fontutil.h" diff --git a/src/x11/dcscreen.cpp b/src/x11/dcscreen.cpp index 8b922df00c..8fb5786a5a 100644 --- a/src/x11/dcscreen.cpp +++ b/src/x11/dcscreen.cpp @@ -17,9 +17,9 @@ #ifndef WX_PRECOMP #include "wx/app.h" #include "wx/utils.h" + #include "wx/window.h" #endif -#include "wx/window.h" #include "wx/frame.h" #include "wx/fontutil.h" diff --git a/src/x11/dnd.cpp b/src/x11/dnd.cpp index 1697027afd..7b6cdbbecd 100644 --- a/src/x11/dnd.cpp +++ b/src/x11/dnd.cpp @@ -23,9 +23,9 @@ #include "wx/log.h" #include "wx/app.h" #include "wx/utils.h" + #include "wx/window.h" #endif -#include "wx/window.h" #include "wx/gdicmn.h" #include diff --git a/src/x11/evtloop.cpp b/src/x11/evtloop.cpp index de6b1f8b83..a0a848e097 100644 --- a/src/x11/evtloop.cpp +++ b/src/x11/evtloop.cpp @@ -25,9 +25,9 @@ #ifndef WX_PRECOMP #include "wx/hash.h" #include "wx/app.h" + #include "wx/window.h" #endif -#include "wx/window.h" #include "wx/tooltip.h" #include "wx/timer.h" #include "wx/module.h" diff --git a/src/x11/icon.cpp b/src/x11/icon.cpp index 1d428034e6..ae063ad5d9 100644 --- a/src/x11/icon.cpp +++ b/src/x11/icon.cpp @@ -1,16 +1,22 @@ ///////////////////////////////////////////////////////////////////////////// -// Name: icon.cpp +// Name: src/x11/icon.cpp // Purpose: wxIcon class // Author: Julian Smart // Modified by: // Created: 17/09/98 // RCS-ID: $Id$ // Copyright: (c) Julian Smart -// Licence: wxWindows licence +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// +// for compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + #include "wx/icon.h" -#include "wx/window.h" + +#ifndef WX_PRECOMP + #include "wx/window.h" +#endif #include "wx/x11/private.h" diff --git a/src/x11/palette.cpp b/src/x11/palette.cpp index e2d9504f4b..61a885cbdd 100644 --- a/src/x11/palette.cpp +++ b/src/x11/palette.cpp @@ -42,10 +42,9 @@ not the functionality that wxPalette::Create() aims to provide. #ifndef WX_PRECOMP #include "wx/app.h" #include "wx/utils.h" + #include "wx/window.h" #endif -#include "wx/window.h" - #ifdef __VMS__ #pragma message disable nosimpint #endif diff --git a/src/x11/utils.cpp b/src/x11/utils.cpp index 604b5f8100..aa03ce8a5b 100644 --- a/src/x11/utils.cpp +++ b/src/x11/utils.cpp @@ -28,12 +28,12 @@ #ifndef WX_PRECOMP #include "wx/app.h" + #include "wx/window.h" // for wxTopLevelWindows #endif #include "wx/apptrait.h" #include "wx/msgdlg.h" #include "wx/cursor.h" -#include "wx/window.h" // for wxTopLevelWindows #include #include diff --git a/src/xrc/xh_unkwn.cpp b/src/xrc/xh_unkwn.cpp index a7b7beaf44..144e3a4c00 100644 --- a/src/xrc/xh_unkwn.cpp +++ b/src/xrc/xh_unkwn.cpp @@ -21,9 +21,9 @@ #ifndef WX_PRECOMP #include "wx/log.h" + #include "wx/window.h" #endif -#include "wx/window.h" #include "wx/sizer.h" #include "wx/panel.h"