]> git.saurik.com Git - wxWidgets.git/blobdiff - src/os2/checklst.cpp
using native key handling, closes #10406
[wxWidgets.git] / src / os2 / checklst.cpp
index ed0d2e3f36f0f38bc9a8914f0702f88e977d5e73..f0a3ac723bc88e2b18527d57b4a673e2849e5885 100644 (file)
     #include "wx/object.h"
     #include "wx/log.h"
     #include "wx/window.h"
     #include "wx/object.h"
     #include "wx/log.h"
     #include "wx/window.h"
+    #include "wx/dcmemory.h"
+    #include "wx/dcscreen.h"
+    #include "wx/settings.h"
+    #include "wx/listbox.h"
+    #include "wx/bitmap.h"
+    #include "wx/colour.h"
+    #include "wx/font.h"
 #endif
 
 #endif
 
-#include "wx/colour.h"
-#include "wx/font.h"
-#include "wx/bitmap.h"
-#include "wx/listbox.h"
+#include "wx/os2/dc.h"
 #include "wx/ownerdrw.h"
 #include "wx/ownerdrw.h"
-#include "wx/settings.h"
-#include "wx/dcmemory.h"
-#include "wx/dcscreen.h"
 
 #define INCL_PM
 #include <os2.h>
 
 #define INCL_PM
 #include <os2.h>
@@ -112,7 +113,9 @@ bool wxCheckListBoxItem::OnDrawItem ( wxDC& rDc,
 {
     wxRect vRect = rRect;
 
 {
     wxRect vRect = rRect;
 
-    ::WinQueryWindowRect( m_pParent->GetHWND(), &rDc.m_vRclPaint );
+
+    wxPMDCImpl *impl = (wxPMDCImpl*) rDc.GetImpl();
+    ::WinQueryWindowRect( m_pParent->GetHWND(), &impl->m_vRclPaint );
     if (IsChecked())
         eStat = (wxOwnerDrawn::wxODStatus)(eStat | wxOwnerDrawn::wxODChecked);
 
     if (IsChecked())
         eStat = (wxOwnerDrawn::wxODStatus)(eStat | wxOwnerDrawn::wxODChecked);
 
@@ -167,8 +170,8 @@ bool wxCheckListBoxItem::OnDrawItem ( wxDC& rDc,
             //
             HBITMAP hChkBmp = ::WinGetSysBitmap( HWND_DESKTOP, SBMP_MENUCHECK );
             POINTL  vPoint = {nX, nOldY + 3};
             //
             HBITMAP hChkBmp = ::WinGetSysBitmap( HWND_DESKTOP, SBMP_MENUCHECK );
             POINTL  vPoint = {nX, nOldY + 3};
-
-            ::WinDrawBitmap( rDc.GetHPS(),
+            wxPMDCImpl *impl = (wxPMDCImpl*) rDc.GetImpl();
+            ::WinDrawBitmap( impl->GetHPS(),
                              hChkBmp,
                              NULL,
                              &vPoint,
                              hChkBmp,
                              NULL,
                              &vPoint,
@@ -284,25 +287,6 @@ void wxCheckListBox::Delete(unsigned int n)
     m_aItems.RemoveAt(n);
 } // end of wxCheckListBox::Delete
 
     m_aItems.RemoveAt(n);
 } // end of wxCheckListBox::Delete
 
-void wxCheckListBox::DoInsertItems(const wxArrayString& items, unsigned int pos)
-{
-    // pos is validated in wxListBox
-    wxListBox::DoInsertItems( items, pos );
-    unsigned int n = items.GetCount();
-    for (unsigned int i = 0; i < n; i++)
-    {
-        wxOwnerDrawn* pNewItem = CreateItem((size_t)(pos + i));
-
-        pNewItem->SetName(items[i]);
-        m_aItems.Insert(pNewItem, (size_t)(pos + i));
-        ::WinSendMsg( (HWND)GetHWND(),
-                      LM_SETITEMHANDLE,
-                      (MPARAM)(i + pos),
-                      MPFROMP(pNewItem)
-                    );
-    }
-} // end of wxCheckListBox::InsertItems
-
 bool wxCheckListBox::SetFont ( const wxFont& rFont )
 {
     for (unsigned int i = 0; i < m_aItems.GetCount(); i++)
 bool wxCheckListBox::SetFont ( const wxFont& rFont )
 {
     for (unsigned int i = 0; i < m_aItems.GetCount(); i++)