]> git.saurik.com Git - wxWidgets.git/blobdiff - src/motif/listbox.cpp
Fix recreating of wxBitmapComboBox using untyped client data.
[wxWidgets.git] / src / motif / listbox.cpp
index 3d138f64353bee572dc91cc81c658f89403a24e6..c4d601a8004fcab8ac8f80a3b4ccec12f63f5115 100644 (file)
@@ -4,7 +4,6 @@
 // Author:      Julian Smart
 // Modified by:
 // Created:     17/09/98
-// RCS-ID:      $Id$
 // Copyright:   (c) Julian Smart
 // Licence:     wxWindows licence
 ///////////////////////////////////////////////////////////////////////////////
     #include "wx/arrstr.h"
 #endif
 
-#ifdef __VMS
-#define XtParent XTPARENT
-#define XtDisplay XTDISPLAY
-#endif
-
 #ifdef __VMS__
 #pragma message disable nosimpint
 #endif
@@ -38,8 +32,6 @@
 #endif
 #include "wx/motif/private.h"
 
-IMPLEMENT_DYNAMIC_CLASS(wxListBox, wxControlWithItems)
-
 static void wxListBoxCallback(Widget w,
                               XtPointer clientData,
                               XmListCallbackStruct * cbs);
@@ -108,7 +100,7 @@ bool wxListBox::Create(wxWindow *parent, wxWindowID id,
               ( m_windowStyle & wxLB_EXTENDED ) ? XmEXTENDED_SELECT :
                                                   XmBROWSE_SELECT );
     ++count;
-    if( m_font.Ok() )
+    if( m_font.IsOk() )
     {
         XtSetArg( args[count],
                   (String)wxFont::GetFontTag(), m_font.GetFontTypeC(dpy) );
@@ -459,9 +451,9 @@ void wxListBoxCallback (Widget WXUNUSED(w), XtPointer clientData,
     wxEventType evtType;
 
     if( cbs->reason == XmCR_DEFAULT_ACTION )
-        evtType = wxEVT_COMMAND_LISTBOX_DOUBLECLICKED;
+        evtType = wxEVT_LISTBOX_DCLICK;
     else
-        evtType = wxEVT_COMMAND_LISTBOX_SELECTED;
+        evtType = wxEVT_LISTBOX;
 
     int n = cbs->item_position - 1;
     wxCommandEvent event (evtType, item->GetId());
@@ -490,7 +482,7 @@ void wxListBoxCallback (Widget WXUNUSED(w), XtPointer clientData,
         item->DoToggleItem( n, x );
 #endif
     case XmCR_DEFAULT_ACTION:
-        item->GetEventHandler()->ProcessEvent(event);
+        item->HandleWindowEvent(event);
         break;
     case XmCR_EXTENDED_SELECT:
         switch (cbs->selection_type)
@@ -499,7 +491,7 @@ void wxListBoxCallback (Widget WXUNUSED(w), XtPointer clientData,
         case XmADDITION:
         case XmMODIFICATION:
             item->DoToggleItem( n, x );
-            item->GetEventHandler()->ProcessEvent(event);
+            item->HandleWindowEvent(event);
             break;
         }
         break;