/////////////////////////////////////////////////////////////////////////////
-// 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>
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())
#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")
#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()
#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)
//-------------------------------------------------------------------------------------
// 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 )
/////////////////////////////////////////////////////////////////////////////
-// Name: msw/radiobut.cpp
+// Name: src/msw/radiobut.cpp
// Purpose: wxRadioButton
// Author: Julian Smart
// Modified by:
#if wxUSE_RADIOBTN
+#include "wx/radiobut.h"
+
#ifndef WX_PRECOMP
- #include "wx/radiobut.h"
#include "wx/settings.h"
#include "wx/dcscreen.h"
#endif
// 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;
// A wxRB_SINGLE button isn't part of this group
break;
}
-
+
if (btn)
{
if (btn == pFocusWnd)
}
#endif // wxUSE_RADIOBTN
-
#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"
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
,lStyle
,rValidator
,rsName))
- return FALSE;
+ return false;
long lSstyle = WS_TABSTOP;
,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
// (presumably when another button is pressed)
//
if (!bIsChecked )
- SetValue(TRUE);
+ SetValue(true);
}
wxCommandEvent rEvent( wxEVT_COMMAND_RADIOBUTTON_SELECTED, m_windowId );
rEvent.SetEventObject(this);
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)
//
break;
}
- pBtn->SetValue(FALSE);
+ pBtn->SetValue(false);
if (pBtn->HasFlag(wxRB_GROUP))
{
//
//
break;
}
- pBtn->SetValue(FALSE);
+ pBtn->SetValue(false);
}
}
} // end of wxRadioButton::SetValue
{
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
#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>
#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 )
#if wxUSE_RADIOBTN
+#include "wx/radiobut.h"
+
#ifndef WX_PRECOMP
- #include "wx/radiobut.h"
#include "wx/settings.h"
#include "wx/dcscreen.h"
#endif
#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"
/////////////////////////////////////////////////////////////////////////////
-// Name: univ/radiobut.cpp
+// Name: src/univ/radiobut.cpp
// Purpose: wxRadioButton implementation
// Author: Vadim Zeitlin
// Modified by:
#if wxUSE_RADIOBTN
+#include "wx/radiobut.h"
+
#ifndef WX_PRECOMP
#include "wx/dcclient.h"
- #include "wx/radiobut.h"
#include "wx/validate.h"
#endif
}
#endif // wxUSE_RADIOBTN
-
/////////////////////////////////////////////////////////////////////////////
-// Name: xh_radbt.cpp
+// Name: src/xrc/xh_radbt.cpp
// Purpose: XRC resource for wxRadioButton
// Author: Bob Mitchell
// Created: 2000/03/21
#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)