]> git.saurik.com Git - wxWidgets.git/blobdiff - src/motif/listbox.cpp
don't throw away the first three stack frames in the assert stack dump (fix needed...
[wxWidgets.git] / src / motif / listbox.cpp
index 5b85211f215a6aa07f9396abbace32991a7bfd20..8eba4cd13a2d5bcf46fbf3dcf4a7764b1bbc2fb7 100644 (file)
@@ -1,5 +1,5 @@
 ///////////////////////////////////////////////////////////////////////////////
 ///////////////////////////////////////////////////////////////////////////////
-// Name:        listbox.cpp
+// Name:        src/motif/listbox.cpp
 // Purpose:     wxListBox
 // Author:      Julian Smart
 // Modified by:
 // Purpose:     wxListBox
 // Author:      Julian Smart
 // Modified by:
@@ -12,6 +12,8 @@
 // For compilers that support precompilation, includes "wx.h".
 #include "wx/wxprec.h"
 
 // For compilers that support precompilation, includes "wx.h".
 #include "wx/wxprec.h"
 
+#if wxUSE_LISTBOX
+
 #ifdef __VMS
 #define XtParent XTPARENT
 #define XtDisplay XTDISPLAY
 #ifdef __VMS
 #define XtParent XTPARENT
 #define XtDisplay XTDISPLAY
@@ -87,7 +89,7 @@ bool wxListBox::Create(wxWindow *parent, wxWindowID id,
                                    validator, name ) )
         return false;
 
                                    validator, name ) )
         return false;
 
-    m_noItems = n;
+    m_noItems = (size_t)n;
     m_backgroundColour = * wxWHITE;
 
     Widget parentWidget = (Widget) parent->GetClientWidget();
     m_backgroundColour = * wxWHITE;
 
     Widget parentWidget = (Widget) parent->GetClientWidget();
@@ -190,8 +192,9 @@ void wxListBox::DoSetFirstItem( int N )
 {
     int count, length;
 
 {
     int count, length;
 
-    if (N < 0)
+    if (!IsValid(N))
         return;
         return;
+
     XtVaGetValues ((Widget) m_mainWidget,
                     XmNvisibleItemCount, &count,
                     XmNitemCount, &length,
     XtVaGetValues ((Widget) m_mainWidget,
                     XmNvisibleItemCount, &count,
                     XmNitemCount, &length,
@@ -306,8 +309,10 @@ int wxDoFindStringInList(Widget w, const wxString& s)
         return -1;
 }
 
         return -1;
 }
 
-int wxListBox::FindString(const wxString& s) const
+int wxListBox::FindString(const wxString& s, bool WXUNUSED(bCase)) const
 {
 {
+    // FIXME: back to base class for not supported value of bCase
+
     return wxDoFindStringInList( (Widget)m_mainWidget, s );
 }
 
     return wxDoFindStringInList( (Widget)m_mainWidget, s );
 }
 
@@ -661,7 +666,7 @@ void wxListBox::ChangeForegroundColour()
     */
 }
 
     */
 }
 
-int wxListBox::GetCount() const
+size_t wxListBox::GetCount() const
 {
     return m_noItems;
 }
 {
     return m_noItems;
 }
@@ -713,3 +718,4 @@ wxSize wxListBox::DoGetBestSize() const
     return wxDoGetListBoxBestSize( (Widget)m_mainWidget, this );
 }
 
     return wxDoGetListBoxBestSize( (Widget)m_mainWidget, this );
 }
 
+#endif // wxUSE_LISTBOX