]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/bmpcboxcmn.cpp
Applied #15375 to stop event-sending in generic wxSpinCtrl ctor (eco)
[wxWidgets.git] / src / common / bmpcboxcmn.cpp
index 71b37abc19a58ed512ffd99a112b332743636cce..1fa3c83ffa1a40ed24c108087b28562b13eb089a 100644 (file)
@@ -3,7 +3,6 @@
 // Purpose:     wxBitmapComboBox
 // Author:      Jaakko Salli
 // Created:     2008-04-09
-// RCS-ID:      $Id:$
 // Copyright:   (c) 2008 Jaakko Salli
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
@@ -28,6 +27,8 @@
 
 #ifndef WX_PRECOMP
     #include "wx/log.h"
+    #include "wx/dc.h"
+    #include "wx/ctrlsub.h"
 #endif
 
 #include "wx/settings.h"
@@ -36,7 +37,7 @@
 #include "wx/odcombo.h"
 
 
-const wxChar wxBitmapComboBoxNameStr[] = wxT("bitmapComboBox");
+const char wxBitmapComboBoxNameStr[] = "bitmapComboBox";
 
 #if defined(wxBITMAPCOMBOBOX_OWNERDRAWN_BASED)
 
@@ -220,7 +221,7 @@ void wxBitmapComboBoxBase::DrawItem(wxDC& dc,
                       true);
     }
 
-    if ( text.length() )
+    if ( !text.empty() )
         dc.DrawText(text,
                     rect.x + m_imgAreaWidth + 1,
                     rect.y + (rect.height-dc.GetCharHeight())/2);
@@ -233,7 +234,7 @@ wxCoord wxBitmapComboBoxBase::MeasureItem(size_t WXUNUSED(item)) const
         int imgHeightArea = m_usedImgSize.y + 2;
         return imgHeightArea > m_fontHeight ? imgHeightArea : m_fontHeight;
     }
-    
+
     return wxBCB_DEFAULT_ITEM_HEIGHT;
 }