X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/37f214d588b02079a3ddf64c2e46585ca1657c1b..ef70f0ecdbc4268923e132b257c95e8a2525f4ca:/src/os2/choice.cpp?ds=sidebyside diff --git a/src/os2/choice.cpp b/src/os2/choice.cpp index dfe1fe24af..84758c1bb8 100644 --- a/src/os2/choice.cpp +++ b/src/os2/choice.cpp @@ -20,9 +20,7 @@ #include "wx/os2/private.h" -#if !USE_SHARED_LIBRARY IMPLEMENT_DYNAMIC_CLASS(wxChoice, wxControl) -#endif bool wxChoice::Create(wxWindow *parent, wxWindowID id, @@ -30,7 +28,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 +128,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 +159,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 +170,7 @@ void wxChoice::DoSetClientData( int n, void* clientData ) */ } -void* wxChoice::DoGetClientData( int n ) const +void* wxChoice::DoGetItemClientData( int n ) const { // TODO: /* @@ -178,15 +188,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 +214,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 +235,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; @@ -237,7 +246,7 @@ wxSize wxChoice::DoGetBestSize() return wxSize(wChoice, hChoice); } -MRESULT wxChoice::OS2WindowProc(HWND hwnd, WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam) +MRESULT wxChoice::OS2WindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam) { // TODO: /* @@ -255,7 +264,7 @@ MRESULT wxChoice::OS2WindowProc(HWND hwnd, WXUINT nMsg, WXWPARAM wParam, WXLPARA return 0; } */ - return wxWindow::OS2WindowProc(hwnd, nMsg, wParam, lParam); + return wxWindow::OS2WindowProc(nMsg, wParam, lParam); } bool wxChoice::OS2Command(WXUINT param, WXWORD WXUNUSED(id))