X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/37f214d588b02079a3ddf64c2e46585ca1657c1b..4304b42f1a1a586e96c645cb47d1cd3c98e3dec6:/src/os2/choice.cpp diff --git a/src/os2/choice.cpp b/src/os2/choice.cpp index dfe1fe24af..be96555450 100644 --- a/src/os2/choice.cpp +++ b/src/os2/choice.cpp @@ -30,7 +30,9 @@ bool wxChoice::Create(wxWindow *parent, const wxSize& size, int n, const wxString choices[], long style, +#if wxUSE_VALIDATORS const wxValidator& validator, +#endif const wxString& name) { if ( !CreateControl(parent, id, pos, size, style, validator, name) ) @@ -128,6 +130,16 @@ int wxChoice::FindString(const wxString& s) const return 0; } +void wxChoice::SetString(int n, const wxString& s) +{ + wxFAIL_MSG(wxT("not implemented")); + +#if 0 // should do this, but no Insert() so far + Delete(n); + Insert(n + 1, s); +#endif +} + wxString wxChoice::GetString(int n) const { size_t len = 0; // TODO: (size_t)::SendMessage(GetHwnd(), CB_GETLBTEXTLEN, n, 0); @@ -149,7 +161,7 @@ wxString wxChoice::GetString(int n) const // client data // ---------------------------------------------------------------------------- -void wxChoice::DoSetClientData( int n, void* clientData ) +void wxChoice::DoSetItemClientData( int n, void* clientData ) { // TODO: /* @@ -160,7 +172,7 @@ void wxChoice::DoSetClientData( int n, void* clientData ) */ } -void* wxChoice::DoGetClientData( int n ) const +void* wxChoice::DoGetItemClientData( int n ) const { // TODO: /* @@ -178,15 +190,14 @@ void* wxChoice::DoGetClientData( int n ) const return NULL; } -void wxChoice::DoSetClientObject( int n, wxClientData* clientData ) +void wxChoice::DoSetItemClientObject( int n, wxClientData* clientData ) { - DoSetClientData(n, clientData); + DoSetItemClientData(n, clientData); } -wxClientData* wxChoice::DoGetClientObject( int n ) const +wxClientData* wxChoice::DoGetItemClientObject( int n ) const { - // TODO: return (wxClientData *)DoGetClientData(n); - return NULL; + return (wxClientData *)DoGetItemClientData(n); } // ---------------------------------------------------------------------------- @@ -205,7 +216,7 @@ void wxChoice::DoSetSize(int x, int y, wxControl::DoSetSize(x, y, width, -1, sizeFlags); } -wxSize wxChoice::DoGetBestSize() +wxSize wxChoice::DoGetBestSize() const { // find the widest string int wLine; @@ -226,7 +237,7 @@ wxSize wxChoice::DoGetBestSize() // the combobox should be larger than the widest string int cx, cy; - wxGetCharSize(GetHWND(), &cx, &cy, &GetFont()); + wxGetCharSize(GetHWND(), &cx, &cy, (wxFont*)&GetFont()); wChoice += 5*cx;