#pragma implementation "combobox.h"
#endif
-#include "wx/combobox.h"
+#include "wx/setup.h"
#if wxUSE_COMBOBOX
+#include "wx/combobox.h"
+
#ifdef __VMS__
#pragma message disable nosimpint
#endif
#ifdef __VMS__
#pragma message enable nosimpint
#endif
+
+// use the old, GPL'd combobox
+#if (XmVersion < 2000)
+
#include "xmcombo/xmcombo.h"
#include "wx/motif/private.h"
{
m_inSetValue = TRUE;
if( !value.empty() )
- XmComboBoxSetString( (Widget)m_mainWidget, (char*)value.c_str() );
+ XmComboBoxSetString( (Widget)m_mainWidget,
+ wxConstCast(value.c_str(), char) );
m_inSetValue = FALSE;
}
+void wxComboBox::SetString(int n, const wxString& s)
+{
+ wxFAIL_MSG( wxT("wxComboBox::SetString only implemented for Motif 2.0") );
+}
+
int wxComboBox::DoAppend(const wxString& item)
{
wxXmString str( item.c_str() );
void wxComboBox::Replace(long from, long to, const wxString& value)
{
- XmComboBoxReplace ((Widget) m_mainWidget, (XmTextPosition) from, (XmTextPosition) to,
- (char*) (const char*) value);
+ XmComboBoxReplace ((Widget) m_mainWidget, (XmTextPosition) from,
+ (XmTextPosition) to,
+ wxConstCast(value.c_str(), char));
}
void wxComboBox::Remove(long from, long to)
case XmCR_SINGLE_SELECT:
case XmCR_BROWSE_SELECT:
{
- wxCommandEvent event (wxEVT_COMMAND_COMBOBOX_SELECTED, item->GetId());
+ wxCommandEvent event (wxEVT_COMMAND_COMBOBOX_SELECTED,
+ item->GetId());
event.m_commandInt = cbs->index - 1;
event.m_commandString = item->GetString (event.m_commandInt);
if ( item->HasClientObjectData() )
return wxWindow::DoGetBestSize();
}
-#endif
+#endif // XmVersion < 2000
+#endif // wxUSE_COMBOBOX