/////////////////////////////////////////////////////////////////////////////
-// Name: univ/radiobut.cpp
+// Name: src/univ/radiobut.cpp
// Purpose: wxRadioButton implementation
// Author: Vadim Zeitlin
// Modified by:
// headers
// ----------------------------------------------------------------------------
-#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
- #pragma implementation "univradiobut.h"
-#endif
-
#include "wx/wxprec.h"
#ifdef __BORLANDC__
#if wxUSE_RADIOBTN
+#include "wx/radiobut.h"
+
#ifndef WX_PRECOMP
#include "wx/dcclient.h"
- #include "wx/radiobut.h"
#include "wx/validate.h"
#endif
// implementation
// ============================================================================
-IMPLEMENT_DYNAMIC_CLASS(wxRadioButton, wxControl)
-
// ----------------------------------------------------------------------------
// wxRadioButton
// ----------------------------------------------------------------------------
-wxRadioButton::wxRadioButton()
-{
- Init();
-}
-
-wxRadioButton::wxRadioButton(wxWindow *parent,
- wxWindowID id,
- const wxString& label,
- const wxPoint& pos,
- const wxSize& size,
- long style,
- const wxValidator& validator,
- const wxString& name)
-{
- Init();
-
- Create(parent, id, label, pos, size, style, validator, name);
-}
-
bool wxRadioButton::Create(wxWindow *parent,
wxWindowID id,
const wxString &label,
if ( !wxCheckBox::Create(parent, id, label, pos, size, style,
validator, name) )
{
- return FALSE;
+ return false;
}
- return TRUE;
+ return true;
}
// ----------------------------------------------------------------------------
{
if ( IsChecked() )
{
- SetValue(FALSE);
+ SetValue(false);
}
}
wxSize wxRadioButton::GetBitmapSize() const
{
wxBitmap bmp = GetBitmap(State_Normal, Status_Checked);
- return bmp.Ok() ? wxSize(bmp.GetWidth(), bmp.GetHeight())
+ return bmp.IsOk() ? wxSize(bmp.GetWidth(), bmp.GetHeight())
: GetRenderer()->GetRadioBitmapSize();
}
}
#endif // wxUSE_RADIOBTN
-