X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/525007cf12a3025c2a6ca3c58663062e567c0e25..74a8f67d96591cec101def2a7d47c64072aff7fd:/src/cocoa/radiobut.mm diff --git a/src/cocoa/radiobut.mm b/src/cocoa/radiobut.mm index 3edd79a16d..3a5d0553b0 100644 --- a/src/cocoa/radiobut.mm +++ b/src/cocoa/radiobut.mm @@ -6,7 +6,7 @@ // Created: 2003/03/16 // RCS-ID: $Id$ // Copyright: (c) 2003 David Elliott -// Licence: wxWidgets licence +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// #include "wx/wxprec.h" @@ -28,7 +28,6 @@ WX_DEFINE_LIST(wxRadioButtonList); -IMPLEMENT_DYNAMIC_CLASS(wxRadioButton, wxControl) // wxRadioButtonBase == wxControl BEGIN_EVENT_TABLE(wxRadioButton, wxControl) END_EVENT_TABLE() @@ -145,6 +144,17 @@ bool wxRadioButton::GetValue() const return state==NSOnState; } +void wxRadioButton::SetLabel(const wxString& label) +{ + wxAutoNSAutoreleasePool pool; + CocoaSetLabelForObject(label, GetNSButton()); +} + +wxString wxRadioButton::GetLabel() const +{ + return wxStringWithNSString([GetNSButton() title]); +} + /** * If this radio button is part of a group, this method turns off every other * button in the group. If this radio button is not part of a group, this