#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 = 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::Delete(int n)
{
XmComboBoxDeletePos((Widget) m_mainWidget, n+1);
- wxNode *node = m_stringList.Nth(n);
+ wxStringList::Node *node = m_stringList.Item(n);
if (node)
{
- delete[] (char *)node->Data();
+ delete[] node->GetData();
delete node;
}
m_clientDataDict.Delete(n, HasClientObjectData());
wxString wxComboBox::GetString(int n) const
{
- wxNode *node = m_stringList.Nth(n);
+ wxStringList::Node *node = m_stringList.Item(n);
if (node)
- return wxString((char *) node->Data ());
+ return wxString(node->GetData ());
else
return wxEmptyString;
}
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