#include "wx/os2/private.h"
-#if !USE_SHARED_LIBRARY
IMPLEMENT_DYNAMIC_CLASS(wxChoice, wxControl)
-#endif
bool wxChoice::Create(wxWindow *parent,
wxWindowID id,
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) )
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);
// client data
// ----------------------------------------------------------------------------
-void wxChoice::DoSetClientData( int n, void* clientData )
+void wxChoice::DoSetItemClientData( int n, void* clientData )
{
// TODO:
/*
*/
}
-void* wxChoice::DoGetClientData( int n ) const
+void* wxChoice::DoGetItemClientData( int n ) const
{
// TODO:
/*
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);
}
// ----------------------------------------------------------------------------
wxControl::DoSetSize(x, y, width, -1, sizeFlags);
}
-wxSize wxChoice::DoGetBestSize()
+wxSize wxChoice::DoGetBestSize() const
{
// find the widest string
int wLine;
// 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;