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
// 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 <AppKit/NSButton.h>
@@ -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())

View File

@@ -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")

View File

@@ -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()

View File

@@ -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 )

View File

@@ -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

View File

@@ -13,12 +13,13 @@
#include "wx/wxprec.h"
#ifdef __BORLANDC__
#pragma hdrstop
#pragma hdrstop
#endif
#include "wx/radiobut.h"
#ifndef WX_PRECOMP
#include <stdio.h>
#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

View File

@@ -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 <Control.h>

View File

@@ -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 )

View File

@@ -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

View File

@@ -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"

View File

@@ -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

View File

@@ -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)