From b0b5881aeaef69976ed1693ab0423187a8bcd53c Mon Sep 17 00:00:00 2001 From: =?utf8?q?W=C5=82odzimierz=20Skiba?= Date: Mon, 5 Jun 2006 16:46:15 +0000 Subject: [PATCH] Include wx/radiobut.h according to precompiled headers of wx/wx.h (with other minor cleaning). git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@39567 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/cocoa/radiobut.mm | 13 ++++---- src/common/containr.cpp | 5 +-- src/mac/carbon/radiobox.cpp | 7 +++-- src/mac/classic/radiobox.cpp | 7 +++-- src/msw/radiobut.cpp | 10 +++--- src/os2/radiobut.cpp | 61 +++++++++++++++--------------------- src/palmos/control.cpp | 2 +- src/palmos/radiobox.cpp | 3 +- src/palmos/radiobut.cpp | 3 +- src/palmos/toplevel.cpp | 2 +- src/univ/radiobut.cpp | 6 ++-- src/xrc/xh_radbt.cpp | 7 +++-- 12 files changed, 61 insertions(+), 65 deletions(-) diff --git a/src/cocoa/radiobut.mm b/src/cocoa/radiobut.mm index 2384a73787..caaa25001e 100644 --- a/src/cocoa/radiobut.mm +++ b/src/cocoa/radiobut.mm @@ -1,22 +1,23 @@ ///////////////////////////////////////////////////////////////////////////// -// Name: cocoa/radiobut.mm +// Name: src/cocoa/radiobut.mm // Purpose: wxRadioButton // Author: David Elliott // Modified by: // Created: 2003/03/16 -// RCS-ID: $Id: +// RCS-ID: $Id$ // Copyright: (c) 2003 David Elliott -// Licence: wxWidgets licence +// Licence: wxWidgets licence ///////////////////////////////////////////////////////////////////////////// #include "wx/wxprec.h" #if wxUSE_RADIOBTN +#include "wx/radiobut.h" + #ifndef WX_PRECOMP #include "wx/log.h" #include "wx/app.h" - #include "wx/radiobut.h" #endif //WX_PRECOMP #import @@ -99,13 +100,13 @@ wxRadioButton::~wxRadioButton() wxASSERT(slaveNode); wxASSERT(slaveNode->GetData() == this); m_radioSlaves.Erase(slaveNode); - + // Now find the new master wxRadioButton *newMaster = NULL; slaveNode = m_radioSlaves.GetFirst(); if(slaveNode) newMaster = slaveNode->GetData(); - + // For each node (including the new master) set the master, remove // it from this list, and add it to the new master's list for(; slaveNode; slaveNode = m_radioSlaves.GetFirst()) diff --git a/src/common/containr.cpp b/src/common/containr.cpp index 6869269051..700d9eb782 100644 --- a/src/common/containr.cpp +++ b/src/common/containr.cpp @@ -29,14 +29,11 @@ #include "wx/event.h" #include "wx/window.h" #include "wx/scrolbar.h" + #include "wx/radiobut.h" #endif //WX_PRECOMP #include "wx/containr.h" -#ifdef __WXMSW__ - #include "wx/radiobut.h" -#endif - // trace mask for focus messages #define TRACE_FOCUS _T("focus") diff --git a/src/mac/carbon/radiobox.cpp b/src/mac/carbon/radiobox.cpp index eaefe7429e..fb9a2b6efc 100644 --- a/src/mac/carbon/radiobox.cpp +++ b/src/mac/carbon/radiobox.cpp @@ -15,15 +15,18 @@ #include "wx/radiobox.h" +#ifndef WX_PRECOMP + #include "wx/radiobut.h" +#endif + #include "wx/arrstr.h" -#include "wx/radiobut.h" #include "wx/mac/uma.h" IMPLEMENT_DYNAMIC_CLASS(wxRadioBox, wxControl) BEGIN_EVENT_TABLE(wxRadioBox, wxControl) -EVT_RADIOBUTTON( wxID_ANY , wxRadioBox::OnRadioButton ) + EVT_RADIOBUTTON( wxID_ANY , wxRadioBox::OnRadioButton ) END_EVENT_TABLE() diff --git a/src/mac/classic/radiobox.cpp b/src/mac/classic/radiobox.cpp index 5c6edaa33d..35cba1fcbe 100644 --- a/src/mac/classic/radiobox.cpp +++ b/src/mac/classic/radiobox.cpp @@ -19,8 +19,11 @@ #include "wx/radiobox.h" +#ifndef WX_PRECOMP + #include "wx/radiobut.h" +#endif + #include "wx/arrstr.h" -#include "wx/radiobut.h" #include "wx/mac/uma.h" IMPLEMENT_DYNAMIC_CLASS(wxRadioBox, wxControl) @@ -30,7 +33,7 @@ IMPLEMENT_DYNAMIC_CLASS(wxRadioBox, wxControl) //------------------------------------------------------------------------------------- // Default constructor BEGIN_EVENT_TABLE(wxRadioBox, wxControl) -EVT_RADIOBUTTON( wxID_ANY , wxRadioBox::OnRadioButton ) + EVT_RADIOBUTTON( wxID_ANY , wxRadioBox::OnRadioButton ) END_EVENT_TABLE() void wxRadioBox::OnRadioButton( wxCommandEvent &outer ) diff --git a/src/msw/radiobut.cpp b/src/msw/radiobut.cpp index 42bbdc43e5..5196c0ba05 100644 --- a/src/msw/radiobut.cpp +++ b/src/msw/radiobut.cpp @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////////// -// Name: msw/radiobut.cpp +// Name: src/msw/radiobut.cpp // Purpose: wxRadioButton // Author: Julian Smart // Modified by: @@ -26,8 +26,9 @@ #if wxUSE_RADIOBTN +#include "wx/radiobut.h" + #ifndef WX_PRECOMP - #include "wx/radiobut.h" #include "wx/settings.h" #include "wx/dcscreen.h" #endif @@ -164,7 +165,7 @@ void wxRadioButton::SetValue(bool value) // buttons in the same group: Windows doesn't do it automatically if ( m_isChecked ) { - // If another radiobutton in the group currently has the focus, we have to + // If another radiobutton in the group currently has the focus, we have to // set it to this radiobutton, else the old readiobutton will be reselected // automatically, if a parent window loses the focus and regains it. bool shouldSetFocus = false; @@ -189,7 +190,7 @@ void wxRadioButton::SetValue(bool value) // A wxRB_SINGLE button isn't part of this group break; } - + if (btn) { if (btn == pFocusWnd) @@ -314,4 +315,3 @@ wxSize wxRadioButton::DoGetBestSize() const } #endif // wxUSE_RADIOBTN - diff --git a/src/os2/radiobut.cpp b/src/os2/radiobut.cpp index 6d6376cde7..81d6d46344 100644 --- a/src/os2/radiobut.cpp +++ b/src/os2/radiobut.cpp @@ -13,12 +13,13 @@ #include "wx/wxprec.h" #ifdef __BORLANDC__ -#pragma hdrstop + #pragma hdrstop #endif +#include "wx/radiobut.h" + #ifndef WX_PRECOMP #include - #include "wx/radiobut.h" #include "wx/brush.h" #include "wx/dcscreen.h" #include "wx/settings.h" @@ -34,27 +35,23 @@ extern void wxAssociateWinWithHandle( HWND hWnd void wxRadioButton::Init() { - m_bFocusJustSet = FALSE; + m_bFocusJustSet = false; } // end of wxRadioButton::Init -void wxRadioButton::Command ( - wxCommandEvent& rEvent -) +void wxRadioButton::Command ( wxCommandEvent& rEvent ) { SetValue ((rEvent.GetInt() != 0) ); ProcessCommand (rEvent); } // end of wxRadioButton::Command -bool wxRadioButton::Create( - wxWindow* pParent -, wxWindowID vId -, const wxString& rsLabel -, const wxPoint& rPos -, const wxSize& rSize -, long lStyle -, const wxValidator& rValidator -, const wxString& rsName -) +bool wxRadioButton::Create( wxWindow* pParent, + wxWindowID vId, + const wxString& rsLabel, + const wxPoint& rPos, + const wxSize& rSize, + long lStyle, + const wxValidator& rValidator, + const wxString& rsName ) { if ( !CreateControl( pParent ,vId @@ -63,7 +60,7 @@ bool wxRadioButton::Create( ,lStyle ,rValidator ,rsName)) - return FALSE; + return false; long lSstyle = WS_TABSTOP; @@ -93,19 +90,15 @@ bool wxRadioButton::Create( ,rsLabel ,0 )) - return FALSE; + return false; wxAssociateWinWithHandle(m_hWnd, this); if (HasFlag(wxRB_GROUP)) - SetValue(TRUE); + SetValue(true); SetFont(*wxSMALL_FONT); - SetSize( rPos.x - ,rPos.y - ,rSize.x - ,rSize.y - ); - return TRUE; + SetSize( rPos.x, rPos.y, rSize.x, rSize.y ); + return true; } // end of wxRadioButton::Create wxSize wxRadioButton::DoGetBestSize() const @@ -170,7 +163,7 @@ bool wxRadioButton::OS2Command( WXUINT wParam, WXWORD WXUNUSED(wId) ) // (presumably when another button is pressed) // if (!bIsChecked ) - SetValue(TRUE); + SetValue(true); } wxCommandEvent rEvent( wxEVT_COMMAND_RADIOBUTTON_SELECTED, m_windowId ); rEvent.SetEventObject(this); @@ -195,17 +188,13 @@ void wxRadioButton::SetFocus() wxControl::SetFocus(); } -void wxRadioButton::SetLabel( - const wxString& rsLabel -) +void wxRadioButton::SetLabel( const wxString& rsLabel ) { wxString sLabel = ::wxPMTextToLabel(rsLabel); ::WinSetWindowText((HWND)GetHWND(), (const char *)sLabel.c_str()); } // end of wxRadioButton::SetLabel -void wxRadioButton::SetValue( - bool bValue -) +void wxRadioButton::SetValue( bool bValue ) { ::WinSendMsg((HWND)GetHWND(), BM_SETCHECK, (MPARAM)bValue, (MPARAM)0); if (bValue) @@ -238,7 +227,7 @@ void wxRadioButton::SetValue( // break; } - pBtn->SetValue(FALSE); + pBtn->SetValue(false); if (pBtn->HasFlag(wxRB_GROUP)) { // @@ -268,7 +257,7 @@ void wxRadioButton::SetValue( // break; } - pBtn->SetValue(FALSE); + pBtn->SetValue(false); } } } // end of wxRadioButton::SetValue @@ -281,14 +270,14 @@ MRESULT wxRadioButton::OS2WindowProc( { if (uMsg == WM_SETFOCUS) { - m_bFocusJustSet = TRUE; + m_bFocusJustSet = true; MRESULT mRc = wxControl::OS2WindowProc( uMsg ,wParam ,lParam ); - m_bFocusJustSet = FALSE; + m_bFocusJustSet = false; return mRc; } return wxControl::OS2WindowProc( uMsg diff --git a/src/palmos/control.cpp b/src/palmos/control.cpp index ca0acf8d1f..bf5e892cd4 100644 --- a/src/palmos/control.cpp +++ b/src/palmos/control.cpp @@ -36,11 +36,11 @@ #include "wx/settings.h" #include "wx/button.h" #include "wx/checkbox.h" + #include "wx/radiobut.h" #endif #include "wx/toplevel.h" #include "wx/tglbtn.h" -#include "wx/radiobut.h" #include "wx/slider.h" #include diff --git a/src/palmos/radiobox.cpp b/src/palmos/radiobox.cpp index 53c73f5e56..c14bc68425 100644 --- a/src/palmos/radiobox.cpp +++ b/src/palmos/radiobox.cpp @@ -33,14 +33,13 @@ #include "wx/brush.h" #include "wx/settings.h" #include "wx/log.h" + #include "wx/radiobut.h" #endif #if wxUSE_TOOLTIPS #include "wx/tooltip.h" #endif // wxUSE_TOOLTIPS -#include "wx/radiobut.h" - // TODO: wxCONSTRUCTOR #if 0 // wxUSE_EXTENDED_RTTI WX_DEFINE_FLAGS( wxRadioBoxStyle ) diff --git a/src/palmos/radiobut.cpp b/src/palmos/radiobut.cpp index 394cf2d413..de723d6607 100644 --- a/src/palmos/radiobut.cpp +++ b/src/palmos/radiobut.cpp @@ -26,8 +26,9 @@ #if wxUSE_RADIOBTN +#include "wx/radiobut.h" + #ifndef WX_PRECOMP - #include "wx/radiobut.h" #include "wx/settings.h" #include "wx/dcscreen.h" #endif diff --git a/src/palmos/toplevel.cpp b/src/palmos/toplevel.cpp index e1c6b75d31..50cff4a252 100644 --- a/src/palmos/toplevel.cpp +++ b/src/palmos/toplevel.cpp @@ -35,13 +35,13 @@ #include "wx/containr.h" // wxSetFocusToChild() #include "wx/button.h" #include "wx/checkbox.h" + #include "wx/radiobut.h" #endif //WX_PRECOMP #include "wx/module.h" #include "wx/display.h" // controls for sending select event -#include "wx/radiobut.h" #include "wx/tglbtn.h" #include "wx/slider.h" #include "wx/datectrl.h" diff --git a/src/univ/radiobut.cpp b/src/univ/radiobut.cpp index d125cb30f5..41958ea779 100644 --- a/src/univ/radiobut.cpp +++ b/src/univ/radiobut.cpp @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////////// -// Name: univ/radiobut.cpp +// Name: src/univ/radiobut.cpp // Purpose: wxRadioButton implementation // Author: Vadim Zeitlin // Modified by: @@ -25,9 +25,10 @@ #if wxUSE_RADIOBTN +#include "wx/radiobut.h" + #ifndef WX_PRECOMP #include "wx/dcclient.h" - #include "wx/radiobut.h" #include "wx/validate.h" #endif @@ -176,4 +177,3 @@ void wxRadioButton::DoDraw(wxControlRenderer *renderer) } #endif // wxUSE_RADIOBTN - diff --git a/src/xrc/xh_radbt.cpp b/src/xrc/xh_radbt.cpp index aff575219e..066433bab3 100644 --- a/src/xrc/xh_radbt.cpp +++ b/src/xrc/xh_radbt.cpp @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////////// -// Name: xh_radbt.cpp +// Name: src/xrc/xh_radbt.cpp // Purpose: XRC resource for wxRadioButton // Author: Bob Mitchell // Created: 2000/03/21 @@ -18,7 +18,10 @@ #if wxUSE_XRC && wxUSE_RADIOBTN #include "wx/xrc/xh_radbt.h" -#include "wx/radiobut.h" + +#ifndef WX_PRECOMP + #include "wx/radiobut.h" +#endif IMPLEMENT_DYNAMIC_CLASS(wxRadioButtonXmlHandler, wxXmlResourceHandler) -- 2.45.2