]> git.saurik.com Git - wxWidgets.git/blobdiff - src/motif/listbox.cpp
removed mpthread and added thread.cpp and tglbutton.cpp
[wxWidgets.git] / src / motif / listbox.cpp
index db682d40d422c5c0c7def309abd5f91d0c9021ad..47016d85bccb1b9d7ef161bfd2c0831feb30e06d 100644 (file)
@@ -9,10 +9,13 @@
 // Licence:     wxWindows licence
 ///////////////////////////////////////////////////////////////////////////////
 
-#ifdef __GNUG__
+#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
     #pragma implementation "listbox.h"
 #endif
 
+// For compilers that support precompilation, includes "wx.h".
+#include "wx/wxprec.h"
+
 #ifdef __VMS
 #define XtParent XTPARENT
 #define XtDisplay XTDISPLAY
@@ -23,6 +26,7 @@
 #include "wx/dynarray.h"
 #include "wx/log.h"
 #include "wx/utils.h"
+#include "wx/arrstr.h"
 
 #ifdef __VMS__
 #pragma message disable nosimpint
@@ -149,7 +153,6 @@ bool wxListBox::Create(wxWindow *parent, wxWindowID id,
                    (XtCallbackProc) wxListBoxCallback,
                    (XtPointer) this);
 
-    SetCanAddEventHandler(TRUE);
     AttachWidget (parent, m_mainWidget, (WXWidget) NULL,
                   pos.x, pos.y, best.x, best.y);
 
@@ -158,6 +161,19 @@ bool wxListBox::Create(wxWindow *parent, wxWindowID id,
     return TRUE;
 }
 
+bool wxListBox::Create(wxWindow *parent, wxWindowID id,
+                       const wxPoint& pos,
+                       const wxSize& size,
+                       const wxArrayString& choices,
+                       long style,
+                       const wxValidator& validator,
+                       const wxString& name)
+{
+    wxCArrayString chs(choices);
+    return Create(parent, id, pos, size, chs.GetCount(), chs.GetStrings(),
+                  style, validator, name);
+}
+
 wxListBox::~wxListBox()
 {
     if( HasClientObjectData() )
@@ -619,8 +635,8 @@ void wxListBox::ChangeBackgroundColour()
     * function to change them (by default, taken from wxSystemSettings)
     */
     wxColour backgroundColour = wxSystemSettings::GetColour(wxSYS_COLOUR_3DFACE);
-    DoChangeBackgroundColour((WXWidget) hsb, backgroundColour, TRUE);
-    DoChangeBackgroundColour((WXWidget) vsb, backgroundColour, TRUE);
+    wxDoChangeBackgroundColour((WXWidget) hsb, backgroundColour, TRUE);
+    wxDoChangeBackgroundColour((WXWidget) vsb, backgroundColour, TRUE);
 
     XtVaSetValues (hsb,
         XmNtroughColor, backgroundColour.AllocColour(XtDisplay(hsb)),
@@ -630,7 +646,7 @@ void wxListBox::ChangeBackgroundColour()
         NULL);
 
     // MBN: why change parent's background? It looks really ugly.
-    // DoChangeBackgroundColour((WXWidget) parent, m_backgroundColour, TRUE);
+    // wxDoChangeBackgroundColour((WXWidget) parent, m_backgroundColour, TRUE);
 }
 
 void wxListBox::ChangeForegroundColour()
@@ -648,9 +664,9 @@ void wxListBox::ChangeForegroundColour()
     /* TODO: should scrollbars be affected? Should probably have separate
              function to change them (by default, taken from wxSystemSettings)
 
-        DoChangeForegroundColour((WXWidget) hsb, m_foregroundColour);
-        DoChangeForegroundColour((WXWidget) vsb, m_foregroundColour);
-        DoChangeForegroundColour((WXWidget) parent, m_foregroundColour);
+        wxDoChangeForegroundColour((WXWidget) hsb, m_foregroundColour);
+        wxDoChangeForegroundColour((WXWidget) vsb, m_foregroundColour);
+        wxDoChangeForegroundColour((WXWidget) parent, m_foregroundColour);
     */
 }