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
This commit is contained in:
Włodzimierz Skiba
2006-06-05 16:46:15 +00:00
parent b3d78b0cc5
commit b0b5881aea
12 changed files with 61 additions and 65 deletions

View File

@@ -1,22 +1,23 @@
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// Name: cocoa/radiobut.mm // Name: src/cocoa/radiobut.mm
// Purpose: wxRadioButton // Purpose: wxRadioButton
// Author: David Elliott // Author: David Elliott
// Modified by: // Modified by:
// Created: 2003/03/16 // Created: 2003/03/16
// RCS-ID: $Id: // RCS-ID: $Id$
// Copyright: (c) 2003 David Elliott // Copyright: (c) 2003 David Elliott
// Licence: wxWidgets licence // Licence: wxWidgets licence
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
#include "wx/wxprec.h" #include "wx/wxprec.h"
#if wxUSE_RADIOBTN #if wxUSE_RADIOBTN
#include "wx/radiobut.h"
#ifndef WX_PRECOMP #ifndef WX_PRECOMP
#include "wx/log.h" #include "wx/log.h"
#include "wx/app.h" #include "wx/app.h"
#include "wx/radiobut.h"
#endif //WX_PRECOMP #endif //WX_PRECOMP
#import <AppKit/NSButton.h> #import <AppKit/NSButton.h>

View File

@@ -29,14 +29,11 @@
#include "wx/event.h" #include "wx/event.h"
#include "wx/window.h" #include "wx/window.h"
#include "wx/scrolbar.h" #include "wx/scrolbar.h"
#include "wx/radiobut.h"
#endif //WX_PRECOMP #endif //WX_PRECOMP
#include "wx/containr.h" #include "wx/containr.h"
#ifdef __WXMSW__
#include "wx/radiobut.h"
#endif
// trace mask for focus messages // trace mask for focus messages
#define TRACE_FOCUS _T("focus") #define TRACE_FOCUS _T("focus")

View File

@@ -15,15 +15,18 @@
#include "wx/radiobox.h" #include "wx/radiobox.h"
#ifndef WX_PRECOMP
#include "wx/radiobut.h"
#endif
#include "wx/arrstr.h" #include "wx/arrstr.h"
#include "wx/radiobut.h"
#include "wx/mac/uma.h" #include "wx/mac/uma.h"
IMPLEMENT_DYNAMIC_CLASS(wxRadioBox, wxControl) IMPLEMENT_DYNAMIC_CLASS(wxRadioBox, wxControl)
BEGIN_EVENT_TABLE(wxRadioBox, wxControl) BEGIN_EVENT_TABLE(wxRadioBox, wxControl)
EVT_RADIOBUTTON( wxID_ANY , wxRadioBox::OnRadioButton ) EVT_RADIOBUTTON( wxID_ANY , wxRadioBox::OnRadioButton )
END_EVENT_TABLE() END_EVENT_TABLE()

View File

@@ -19,8 +19,11 @@
#include "wx/radiobox.h" #include "wx/radiobox.h"
#ifndef WX_PRECOMP
#include "wx/radiobut.h"
#endif
#include "wx/arrstr.h" #include "wx/arrstr.h"
#include "wx/radiobut.h"
#include "wx/mac/uma.h" #include "wx/mac/uma.h"
IMPLEMENT_DYNAMIC_CLASS(wxRadioBox, wxControl) IMPLEMENT_DYNAMIC_CLASS(wxRadioBox, wxControl)
@@ -30,7 +33,7 @@ IMPLEMENT_DYNAMIC_CLASS(wxRadioBox, wxControl)
//------------------------------------------------------------------------------------- //-------------------------------------------------------------------------------------
// Default constructor // Default constructor
BEGIN_EVENT_TABLE(wxRadioBox, wxControl) BEGIN_EVENT_TABLE(wxRadioBox, wxControl)
EVT_RADIOBUTTON( wxID_ANY , wxRadioBox::OnRadioButton ) EVT_RADIOBUTTON( wxID_ANY , wxRadioBox::OnRadioButton )
END_EVENT_TABLE() END_EVENT_TABLE()
void wxRadioBox::OnRadioButton( wxCommandEvent &outer ) void wxRadioBox::OnRadioButton( wxCommandEvent &outer )

View File

@@ -1,5 +1,5 @@
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// Name: msw/radiobut.cpp // Name: src/msw/radiobut.cpp
// Purpose: wxRadioButton // Purpose: wxRadioButton
// Author: Julian Smart // Author: Julian Smart
// Modified by: // Modified by:
@@ -26,8 +26,9 @@
#if wxUSE_RADIOBTN #if wxUSE_RADIOBTN
#include "wx/radiobut.h"
#ifndef WX_PRECOMP #ifndef WX_PRECOMP
#include "wx/radiobut.h"
#include "wx/settings.h" #include "wx/settings.h"
#include "wx/dcscreen.h" #include "wx/dcscreen.h"
#endif #endif
@@ -314,4 +315,3 @@ wxSize wxRadioButton::DoGetBestSize() const
} }
#endif // wxUSE_RADIOBTN #endif // wxUSE_RADIOBTN

View File

@@ -13,12 +13,13 @@
#include "wx/wxprec.h" #include "wx/wxprec.h"
#ifdef __BORLANDC__ #ifdef __BORLANDC__
#pragma hdrstop #pragma hdrstop
#endif #endif
#include "wx/radiobut.h"
#ifndef WX_PRECOMP #ifndef WX_PRECOMP
#include <stdio.h> #include <stdio.h>
#include "wx/radiobut.h"
#include "wx/brush.h" #include "wx/brush.h"
#include "wx/dcscreen.h" #include "wx/dcscreen.h"
#include "wx/settings.h" #include "wx/settings.h"
@@ -34,27 +35,23 @@ extern void wxAssociateWinWithHandle( HWND hWnd
void wxRadioButton::Init() void wxRadioButton::Init()
{ {
m_bFocusJustSet = FALSE; m_bFocusJustSet = false;
} // end of wxRadioButton::Init } // end of wxRadioButton::Init
void wxRadioButton::Command ( void wxRadioButton::Command ( wxCommandEvent& rEvent )
wxCommandEvent& rEvent
)
{ {
SetValue ((rEvent.GetInt() != 0) ); SetValue ((rEvent.GetInt() != 0) );
ProcessCommand (rEvent); ProcessCommand (rEvent);
} // end of wxRadioButton::Command } // end of wxRadioButton::Command
bool wxRadioButton::Create( bool wxRadioButton::Create( wxWindow* pParent,
wxWindow* pParent wxWindowID vId,
, wxWindowID vId const wxString& rsLabel,
, const wxString& rsLabel const wxPoint& rPos,
, const wxPoint& rPos const wxSize& rSize,
, const wxSize& rSize long lStyle,
, long lStyle const wxValidator& rValidator,
, const wxValidator& rValidator const wxString& rsName )
, const wxString& rsName
)
{ {
if ( !CreateControl( pParent if ( !CreateControl( pParent
,vId ,vId
@@ -63,7 +60,7 @@ bool wxRadioButton::Create(
,lStyle ,lStyle
,rValidator ,rValidator
,rsName)) ,rsName))
return FALSE; return false;
long lSstyle = WS_TABSTOP; long lSstyle = WS_TABSTOP;
@@ -93,19 +90,15 @@ bool wxRadioButton::Create(
,rsLabel ,rsLabel
,0 ,0
)) ))
return FALSE; return false;
wxAssociateWinWithHandle(m_hWnd, this); wxAssociateWinWithHandle(m_hWnd, this);
if (HasFlag(wxRB_GROUP)) if (HasFlag(wxRB_GROUP))
SetValue(TRUE); SetValue(true);
SetFont(*wxSMALL_FONT); SetFont(*wxSMALL_FONT);
SetSize( rPos.x SetSize( rPos.x, rPos.y, rSize.x, rSize.y );
,rPos.y return true;
,rSize.x
,rSize.y
);
return TRUE;
} // end of wxRadioButton::Create } // end of wxRadioButton::Create
wxSize wxRadioButton::DoGetBestSize() const wxSize wxRadioButton::DoGetBestSize() const
@@ -170,7 +163,7 @@ bool wxRadioButton::OS2Command( WXUINT wParam, WXWORD WXUNUSED(wId) )
// (presumably when another button is pressed) // (presumably when another button is pressed)
// //
if (!bIsChecked ) if (!bIsChecked )
SetValue(TRUE); SetValue(true);
} }
wxCommandEvent rEvent( wxEVT_COMMAND_RADIOBUTTON_SELECTED, m_windowId ); wxCommandEvent rEvent( wxEVT_COMMAND_RADIOBUTTON_SELECTED, m_windowId );
rEvent.SetEventObject(this); rEvent.SetEventObject(this);
@@ -195,17 +188,13 @@ void wxRadioButton::SetFocus()
wxControl::SetFocus(); wxControl::SetFocus();
} }
void wxRadioButton::SetLabel( void wxRadioButton::SetLabel( const wxString& rsLabel )
const wxString& rsLabel
)
{ {
wxString sLabel = ::wxPMTextToLabel(rsLabel); wxString sLabel = ::wxPMTextToLabel(rsLabel);
::WinSetWindowText((HWND)GetHWND(), (const char *)sLabel.c_str()); ::WinSetWindowText((HWND)GetHWND(), (const char *)sLabel.c_str());
} // end of wxRadioButton::SetLabel } // end of wxRadioButton::SetLabel
void wxRadioButton::SetValue( void wxRadioButton::SetValue( bool bValue )
bool bValue
)
{ {
::WinSendMsg((HWND)GetHWND(), BM_SETCHECK, (MPARAM)bValue, (MPARAM)0); ::WinSendMsg((HWND)GetHWND(), BM_SETCHECK, (MPARAM)bValue, (MPARAM)0);
if (bValue) if (bValue)
@@ -238,7 +227,7 @@ void wxRadioButton::SetValue(
// //
break; break;
} }
pBtn->SetValue(FALSE); pBtn->SetValue(false);
if (pBtn->HasFlag(wxRB_GROUP)) if (pBtn->HasFlag(wxRB_GROUP))
{ {
// //
@@ -268,7 +257,7 @@ void wxRadioButton::SetValue(
// //
break; break;
} }
pBtn->SetValue(FALSE); pBtn->SetValue(false);
} }
} }
} // end of wxRadioButton::SetValue } // end of wxRadioButton::SetValue
@@ -281,14 +270,14 @@ MRESULT wxRadioButton::OS2WindowProc(
{ {
if (uMsg == WM_SETFOCUS) if (uMsg == WM_SETFOCUS)
{ {
m_bFocusJustSet = TRUE; m_bFocusJustSet = true;
MRESULT mRc = wxControl::OS2WindowProc( uMsg MRESULT mRc = wxControl::OS2WindowProc( uMsg
,wParam ,wParam
,lParam ,lParam
); );
m_bFocusJustSet = FALSE; m_bFocusJustSet = false;
return mRc; return mRc;
} }
return wxControl::OS2WindowProc( uMsg return wxControl::OS2WindowProc( uMsg

View File

@@ -36,11 +36,11 @@
#include "wx/settings.h" #include "wx/settings.h"
#include "wx/button.h" #include "wx/button.h"
#include "wx/checkbox.h" #include "wx/checkbox.h"
#include "wx/radiobut.h"
#endif #endif
#include "wx/toplevel.h" #include "wx/toplevel.h"
#include "wx/tglbtn.h" #include "wx/tglbtn.h"
#include "wx/radiobut.h"
#include "wx/slider.h" #include "wx/slider.h"
#include <Control.h> #include <Control.h>

View File

@@ -33,14 +33,13 @@
#include "wx/brush.h" #include "wx/brush.h"
#include "wx/settings.h" #include "wx/settings.h"
#include "wx/log.h" #include "wx/log.h"
#include "wx/radiobut.h"
#endif #endif
#if wxUSE_TOOLTIPS #if wxUSE_TOOLTIPS
#include "wx/tooltip.h" #include "wx/tooltip.h"
#endif // wxUSE_TOOLTIPS #endif // wxUSE_TOOLTIPS
#include "wx/radiobut.h"
// TODO: wxCONSTRUCTOR // TODO: wxCONSTRUCTOR
#if 0 // wxUSE_EXTENDED_RTTI #if 0 // wxUSE_EXTENDED_RTTI
WX_DEFINE_FLAGS( wxRadioBoxStyle ) WX_DEFINE_FLAGS( wxRadioBoxStyle )

View File

@@ -26,8 +26,9 @@
#if wxUSE_RADIOBTN #if wxUSE_RADIOBTN
#include "wx/radiobut.h"
#ifndef WX_PRECOMP #ifndef WX_PRECOMP
#include "wx/radiobut.h"
#include "wx/settings.h" #include "wx/settings.h"
#include "wx/dcscreen.h" #include "wx/dcscreen.h"
#endif #endif

View File

@@ -35,13 +35,13 @@
#include "wx/containr.h" // wxSetFocusToChild() #include "wx/containr.h" // wxSetFocusToChild()
#include "wx/button.h" #include "wx/button.h"
#include "wx/checkbox.h" #include "wx/checkbox.h"
#include "wx/radiobut.h"
#endif //WX_PRECOMP #endif //WX_PRECOMP
#include "wx/module.h" #include "wx/module.h"
#include "wx/display.h" #include "wx/display.h"
// controls for sending select event // controls for sending select event
#include "wx/radiobut.h"
#include "wx/tglbtn.h" #include "wx/tglbtn.h"
#include "wx/slider.h" #include "wx/slider.h"
#include "wx/datectrl.h" #include "wx/datectrl.h"

View File

@@ -1,5 +1,5 @@
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// Name: univ/radiobut.cpp // Name: src/univ/radiobut.cpp
// Purpose: wxRadioButton implementation // Purpose: wxRadioButton implementation
// Author: Vadim Zeitlin // Author: Vadim Zeitlin
// Modified by: // Modified by:
@@ -25,9 +25,10 @@
#if wxUSE_RADIOBTN #if wxUSE_RADIOBTN
#include "wx/radiobut.h"
#ifndef WX_PRECOMP #ifndef WX_PRECOMP
#include "wx/dcclient.h" #include "wx/dcclient.h"
#include "wx/radiobut.h"
#include "wx/validate.h" #include "wx/validate.h"
#endif #endif
@@ -176,4 +177,3 @@ void wxRadioButton::DoDraw(wxControlRenderer *renderer)
} }
#endif // wxUSE_RADIOBTN #endif // wxUSE_RADIOBTN

View File

@@ -1,5 +1,5 @@
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// Name: xh_radbt.cpp // Name: src/xrc/xh_radbt.cpp
// Purpose: XRC resource for wxRadioButton // Purpose: XRC resource for wxRadioButton
// Author: Bob Mitchell // Author: Bob Mitchell
// Created: 2000/03/21 // Created: 2000/03/21
@@ -18,7 +18,10 @@
#if wxUSE_XRC && wxUSE_RADIOBTN #if wxUSE_XRC && wxUSE_RADIOBTN
#include "wx/xrc/xh_radbt.h" #include "wx/xrc/xh_radbt.h"
#include "wx/radiobut.h"
#ifndef WX_PRECOMP
#include "wx/radiobut.h"
#endif
IMPLEMENT_DYNAMIC_CLASS(wxRadioButtonXmlHandler, wxXmlResourceHandler) IMPLEMENT_DYNAMIC_CLASS(wxRadioButtonXmlHandler, wxXmlResourceHandler)