Applied patch [ 679397 ] remove GPL code from motif build

from Ian Brown, with some modifications; this patch replaces the (GPL)
Motif ComboBox with an implementation based on the native (for Motif 2.0)
ComboBox. The old ComboBox is still used as a fallback for older Motif
versions. My modifications include some method's implementation and
some workarounds for LessTif.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@19114 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Mattia Barbon
2003-02-04 21:09:03 +00:00
parent 205b0c9c6a
commit 9b1bd0c6e7
8 changed files with 426 additions and 8 deletions

View File

@@ -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