X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/fd304d989b2c5c35ac1a849d508cb21f4d54609e..0e878cfcc6486c7903ae89b316bc71700320199d:/src/motif/combobox.cpp diff --git a/src/motif/combobox.cpp b/src/motif/combobox.cpp index 36e322073f..5e81729e67 100644 --- a/src/motif/combobox.cpp +++ b/src/motif/combobox.cpp @@ -13,10 +13,12 @@ #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 @@ -24,6 +26,10 @@ #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" @@ -124,6 +130,11 @@ void wxComboBox::SetValue(const wxString& value) 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() ); @@ -269,7 +280,8 @@ void wxComboBoxCallback (Widget WXUNUSED(w), XtPointer clientData, 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() ) @@ -326,5 +338,6 @@ wxSize wxComboBox::DoGetBestSize() const return wxWindow::DoGetBestSize(); } -#endif +#endif // XmVersion < 2000 +#endif // wxUSE_COMBOBOX