From 910b005366bf2dbf317284d02ac47c18c2c27ee9 Mon Sep 17 00:00:00 2001 From: =?utf8?q?W=C5=82odzimierz=20Skiba?= Date: Fri, 26 May 2006 18:47:45 +0000 Subject: [PATCH] Include wx/wx/bmpbuttn.h according to precompiled headers of wx/wx.h (with other minor cleaning). git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@39354 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/cocoa/bmpbuttn.mm | 3 ++- src/generic/dirdlgg.cpp | 2 +- src/generic/filedlgg.cpp | 2 +- src/msw/bmpbuttn.cpp | 3 ++- src/os2/bmpbuttn.cpp | 33 +++++++++++++++++---------------- src/palmos/bmpbuttn.cpp | 4 ++-- src/univ/bmpbuttn.cpp | 6 +++--- src/xrc/xh_bmpbt.cpp | 11 +++++++---- 8 files changed, 35 insertions(+), 29 deletions(-) diff --git a/src/cocoa/bmpbuttn.mm b/src/cocoa/bmpbuttn.mm index ad28820435..c35d8ea44b 100644 --- a/src/cocoa/bmpbuttn.mm +++ b/src/cocoa/bmpbuttn.mm @@ -13,8 +13,9 @@ #if wxUSE_BMPBUTTON +#include "wx/bmpbuttn.h" + #ifndef WX_PRECOMP - #include "wx/bmpbuttn.h" #include "wx/log.h" #endif diff --git a/src/generic/dirdlgg.cpp b/src/generic/dirdlgg.cpp index 078123f983..aaa3712293 100644 --- a/src/generic/dirdlgg.cpp +++ b/src/generic/dirdlgg.cpp @@ -26,13 +26,13 @@ #include "wx/intl.h" #include "wx/log.h" #include "wx/msgdlg.h" + #include "wx/bmpbuttn.h" #endif #include "wx/statline.h" #include "wx/dirctrl.h" #include "wx/generic/dirdlgg.h" #include "wx/artprov.h" -#include "wx/bmpbuttn.h" // ---------------------------------------------------------------------------- // constants diff --git a/src/generic/filedlgg.cpp b/src/generic/filedlgg.cpp index d424aa0812..13cf558154 100644 --- a/src/generic/filedlgg.cpp +++ b/src/generic/filedlgg.cpp @@ -29,6 +29,7 @@ #include "wx/settings.h" #include "wx/log.h" #include "wx/msgdlg.h" + #include "wx/bmpbuttn.h" #endif #include "wx/checkbox.h" @@ -38,7 +39,6 @@ #include "wx/stattext.h" #include "wx/longlong.h" #include "wx/sizer.h" -#include "wx/bmpbuttn.h" #include "wx/tokenzr.h" #include "wx/config.h" #include "wx/imaglist.h" diff --git a/src/msw/bmpbuttn.cpp b/src/msw/bmpbuttn.cpp index 3b67925eaa..7dbb9a1582 100644 --- a/src/msw/bmpbuttn.cpp +++ b/src/msw/bmpbuttn.cpp @@ -18,8 +18,9 @@ #if wxUSE_BMPBUTTON +#include "wx/bmpbuttn.h" + #ifndef WX_PRECOMP - #include "wx/bmpbuttn.h" #include "wx/log.h" #include "wx/dcmemory.h" #endif diff --git a/src/os2/bmpbuttn.cpp b/src/os2/bmpbuttn.cpp index ed319ad85a..12ce06f727 100644 --- a/src/os2/bmpbuttn.cpp +++ b/src/os2/bmpbuttn.cpp @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////////// -// Name: bmpbuttn.cpp +// Name: src/os2/bmpbuttn.cpp // Purpose: wxBitmapButton // Author: David Webster // Modified by: @@ -14,8 +14,9 @@ #if wxUSE_BMPBUTTON -#ifndef WX_PRECOMP #include "wx/bmpbuttn.h" + +#ifndef WX_PRECOMP #endif #include "wx/os2/private.h" @@ -52,20 +53,20 @@ bool wxBitmapButton::Create( wxWindow* pParent, m_marginY = wxDEFAULT_BUTTON_MARGIN; } - int nX = rPos.x; - int nY = rPos.y; - int nWidth = rSize.x; - int nHeight = rSize.y; + int nX = rPos.x; + int nY = rPos.y; + int nWidth = rSize.x; + int nHeight = rSize.y; - if (vId == -1) + if (vId == wxID_ANY) m_windowId = NewControlId(); else m_windowId = vId; - if (nWidth == -1 && rBitmap.Ok()) + if (nWidth == wxDefaultCoord && rBitmap.Ok()) nWidth = rBitmap.GetWidth() + 4 * m_marginX; - if (nHeight == -1 && rBitmap.Ok()) + if (nHeight == wxDefaultCoord && rBitmap.Ok()) nHeight = rBitmap.GetHeight() + 4 * m_marginY; ULONG ulOS2Style = WS_VISIBLE | WS_TABSTOP | BS_USERBUTTON; @@ -100,15 +101,15 @@ bool wxBitmapButton::Create( wxWindow* pParent, bool wxBitmapButton::OS2OnDraw( WXDRAWITEMSTRUCT* pItem) { - PUSERBUTTON pUser = (PUSERBUTTON)pItem; - bool bAutoDraw = (GetWindowStyleFlag() & wxBU_AUTODRAW) != 0; + PUSERBUTTON pUser = (PUSERBUTTON)pItem; + bool bAutoDraw = (GetWindowStyleFlag() & wxBU_AUTODRAW) != 0; if (!pUser) - return FALSE; + return false; - wxBitmap* pBitmap; - bool bIsSelected = pUser->fsState & BDS_HILITED; - wxClientDC vDc(this); + wxBitmap* pBitmap; + bool bIsSelected = pUser->fsState & BDS_HILITED; + wxClientDC vDc(this); if (bIsSelected && m_bmpSelected.Ok()) pBitmap = &m_bmpSelected; @@ -120,7 +121,7 @@ bool wxBitmapButton::OS2OnDraw( WXDRAWITEMSTRUCT* pItem) pBitmap = &m_bmpNormal; if (!pBitmap->Ok() ) - return FALSE; + return false; // diff --git a/src/palmos/bmpbuttn.cpp b/src/palmos/bmpbuttn.cpp index 830bc3b582..6755d15ce1 100644 --- a/src/palmos/bmpbuttn.cpp +++ b/src/palmos/bmpbuttn.cpp @@ -18,8 +18,9 @@ #if wxUSE_BMPBUTTON +#include "wx/bmpbuttn.h" + #ifndef WX_PRECOMP - #include "wx/bmpbuttn.h" #include "wx/log.h" #include "wx/dcmemory.h" #endif @@ -127,4 +128,3 @@ wxSize wxBitmapButton::DoGetBestSize() const } #endif // wxUSE_BMPBUTTON - diff --git a/src/univ/bmpbuttn.cpp b/src/univ/bmpbuttn.cpp index 221f44a26f..0230a0674f 100644 --- a/src/univ/bmpbuttn.cpp +++ b/src/univ/bmpbuttn.cpp @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////////// -// Name: univ/bmpbuttn.cpp +// Name: src/univ/bmpbuttn.cpp // Purpose: wxBitmapButton implementation // Author: Vadim Zeitlin // Modified by: @@ -25,9 +25,10 @@ #if wxUSE_BMPBUTTON +#include "wx/bmpbuttn.h" + #ifndef WX_PRECOMP #include "wx/dc.h" - #include "wx/bmpbuttn.h" #include "wx/validate.h" #endif @@ -154,4 +155,3 @@ void wxBitmapButton::Release() } #endif // wxUSE_BMPBUTTON - diff --git a/src/xrc/xh_bmpbt.cpp b/src/xrc/xh_bmpbt.cpp index 5bc46413e9..7b1b22db03 100644 --- a/src/xrc/xh_bmpbt.cpp +++ b/src/xrc/xh_bmpbt.cpp @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////////// -// Name: xh_bmpbt.cpp +// Name: src/xrc/xh_bmpbt.cpp // Purpose: XRC resource for bitmap buttons // Author: Brian Gavin // Created: 2000/09/09 @@ -15,10 +15,13 @@ #pragma hdrstop #endif -#if wxUSE_XRC +#if wxUSE_XRC && wxUSE_BMPBUTTON #include "wx/xrc/xh_bmpbt.h" -#include "wx/bmpbuttn.h" + +#ifndef WX_PRECOMP + #include "wx/bmpbuttn.h" +#endif IMPLEMENT_DYNAMIC_CLASS(wxBitmapButtonXmlHandler, wxXmlResourceHandler) @@ -64,4 +67,4 @@ bool wxBitmapButtonXmlHandler::CanHandle(wxXmlNode *node) return IsOfClass(node, wxT("wxBitmapButton")); } -#endif // wxUSE_XRC +#endif // wxUSE_XRC && wxUSE_BMPBUTTON -- 2.49.0