]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/checklst.cpp
Added files for GnomeVFS backend (currently useful
[wxWidgets.git] / src / msw / checklst.cpp
index f9790875b9649d727dd0e02b3f611ba025fcfd91..b40783e67a16b2b10bc80635f2bdde0d62613a59 100644 (file)
@@ -1,5 +1,5 @@
 ///////////////////////////////////////////////////////////////////////////////
-// Name:        msw/checklst.cpp
+// Name:        src/msw/checklst.cpp
 // Purpose:     implementation of wxCheckListBox class
 // Author:      Vadim Zeitlin
 // Modified by:
 // headers
 // ----------------------------------------------------------------------------
 
-#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
-#pragma implementation "checklst.h"
-#endif
-
 // For compilers that support precompilation, includes "wx.h".
 #include "wx/wxprec.h"
 
@@ -322,14 +318,8 @@ bool wxCheckListBox::Create(wxWindow *parent, wxWindowID id,
                             long style,
                             const wxValidator& validator, const wxString& name)
 {
-    if (wxListBox::Create(parent, id, pos, size, n, choices,
-                             style | wxLB_OWNERDRAW, validator, name))
-    {
-        SetBackgroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOW));
-        return true;
-    }
-    else
-        return false;
+    return wxListBox::Create(parent, id, pos, size, n, choices,
+                             style | wxLB_OWNERDRAW, validator, name);
 }
 
 bool wxCheckListBox::Create(wxWindow *parent, wxWindowID id,
@@ -338,14 +328,8 @@ bool wxCheckListBox::Create(wxWindow *parent, wxWindowID id,
                             long style,
                             const wxValidator& validator, const wxString& name)
 {
-    if (wxListBox::Create(parent, id, pos, size, choices,
-                             style | wxLB_OWNERDRAW, validator, name))
-    {
-        SetBackgroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOW));
-        return true;
-    }
-    else
-        return false;
+    return wxListBox::Create(parent, id, pos, size, choices,
+                             style | wxLB_OWNERDRAW, validator, name);
 }
 
 // misc overloaded methods
@@ -353,7 +337,7 @@ bool wxCheckListBox::Create(wxWindow *parent, wxWindowID id,
 
 void wxCheckListBox::Delete(int N)
 {
-    wxCHECK_RET( N >= 0 && N < m_noItems,
+    wxCHECK_RET( IsValid(N),
                  wxT("invalid index in wxListBox::Delete") );
 
     wxListBox::Delete(N);
@@ -537,7 +521,7 @@ int wxCheckListBox::DoHitTestItem(wxCoord x, wxCoord y) const
                               MAKELPARAM(x, y)
                              );
 
-  return nItem >= m_noItems ? wxNOT_FOUND : nItem;
+  return nItem >= (int)m_noItems ? wxNOT_FOUND : nItem;
 }
 
 
@@ -550,4 +534,3 @@ wxSize wxCheckListBox::DoGetBestSize() const
 }
 
 #endif
-