]> git.saurik.com Git - wxWidgets.git/blobdiff - src/generic/bmpcboxg.cpp
various close-button styles implemented in wxAuiNotebook
[wxWidgets.git] / src / generic / bmpcboxg.cpp
index 88d9cd721898a24050698a81be91b18850adb300..e74fabd3c1b95f0cd8f86eef3f919004641ec70a 100644 (file)
@@ -4,7 +4,7 @@
 // Author:      Jaakko Salli
 // Modified by:
 // Created:     Aug-31-2006
-// RCS-ID:      $Id:
+// RCS-ID:      $Id$
 // Copyright:   (c) 2005 Jaakko Salli
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
@@ -35,6 +35,7 @@
 
 #include "wx/odcombo.h"
 #include "wx/settings.h"
+#include "wx/dc.h"
 
 #if wxUSE_IMAGE
     #include "wx/image.h"
@@ -65,7 +66,7 @@ const wxChar wxBitmapComboBoxNameStr[] = wxT("bitmapComboBox");
 
 
 BEGIN_EVENT_TABLE(wxBitmapComboBox, wxOwnerDrawnComboBox)
-    EVT_SIZE(wxBitmapComboBox::OnResize)
+    EVT_SIZE(wxBitmapComboBox::OnSize)
 END_EVENT_TABLE()
 
 
@@ -263,6 +264,8 @@ int wxBitmapComboBox::DoInsertWithImage(const wxString& item,
                                         const wxBitmap& image,
                                         unsigned int pos)
 {
+    wxCHECK_MSG( IsValidInsert(pos), wxNOT_FOUND, wxT("invalid item index") );
+
     if ( !DoInsertBitmap(image, pos) )
         return wxNOT_FOUND;
 
@@ -325,7 +328,7 @@ void wxBitmapComboBox::DetermineIndent()
     SetCustomPaintWidth(indent);
 }
 
-void wxBitmapComboBox::OnResize(wxSizeEvent& event)
+void wxBitmapComboBox::OnSize(wxSizeEvent& event)
 {
     // Prevent infinite looping
     if ( !m_inResize )