X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/5d4b632ba3c0e5e5c43412d2d7a2b485b8fcebf2..491b5be8305968871bc289453ed088a70c3de044:/src/os2/radiobox.cpp?ds=sidebyside diff --git a/src/os2/radiobox.cpp b/src/os2/radiobox.cpp index 43bcd15f5e..cf31c122fb 100644 --- a/src/os2/radiobox.cpp +++ b/src/os2/radiobox.cpp @@ -15,6 +15,8 @@ #ifndef WX_PRECOMP #include #include "wx/setup.h" + #include "wx/wxchar.h" + #include "wx/string.h" #include "wx/bitmap.h" #include "wx/brush.h" #include "wx/radiobox.h" @@ -22,9 +24,7 @@ #include "wx/os2/private.h" -#if !USE_SHARED_LIBRARY IMPLEMENT_DYNAMIC_CLASS(wxRadioBox, wxControl) -#endif // --------------------------------------------------------------------------- // private functions @@ -51,6 +51,21 @@ static s_wndprocRadioBtn = NULL; // wxRadioBox // --------------------------------------------------------------------------- +int wxRadioBox::GetCount() const +{ + return m_noItems; +} + +int wxRadioBox::GetColumnCount() const +{ + return GetNumHor(); +} + +int wxRadioBox::GetRowCount() const +{ + return GetNumVer(); +} + int wxRadioBox::GetNumVer() const { if ( m_windowStyle & wxRA_SPECIFY_ROWS ) @@ -144,11 +159,7 @@ bool wxRadioBox::Create(wxWindow *parent, wxWindowID id, const wxString& title, int n, const wxString choices[], int majorDim, long style, #if wxUSE_VALIDATORS -# if defined(__VISAGECPP__) - const wxValidator* val, const wxString& name) -# else const wxValidator& val, const wxString& name) -# endif #endif { m_selectedButton = -1; @@ -285,6 +296,14 @@ wxRadioBox::~wxRadioBox() } +void wxRadioBox::SetString(int item, const wxString& label) +{ + wxCHECK_RET( item >= 0 && item < m_noItems, wxT("invalid radiobox index") ); + + m_radioWidth[item] = m_radioHeight[item] = -1; + ::WinSetWindowText((HWND)m_radioButtons[item], label.c_str()); +} + wxString wxRadioBox::GetLabel(int item) const { wxCHECK_MSG( item >= 0 && item < m_noItems, wxT(""), wxT("invalid radiobox index") );