X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/aa61d3525370a9b9fa8c797d9b7f89d96994db5f..05e0b047d879cdbfade7f2ab346c0acdf3e29f96:/src/os2/checklst.cpp diff --git a/src/os2/checklst.cpp b/src/os2/checklst.cpp index 8d2d55ee55..bda47bb7d1 100644 --- a/src/os2/checklst.cpp +++ b/src/os2/checklst.cpp @@ -18,18 +18,23 @@ #if wxUSE_CHECKLISTBOX && wxUSE_OWNER_DRAWN -#include "wx/object.h" -#include "wx/colour.h" -#include "wx/font.h" -#include "wx/bitmap.h" -#include "wx/window.h" -#include "wx/listbox.h" -#include "wx/ownerdrw.h" -#include "wx/settings.h" -#include "wx/dcmemory.h" -#include "wx/dcscreen.h" #include "wx/checklst.h" -#include "wx/log.h" + +#ifndef WX_PRECOMP + #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 + +#include "wx/os2/dc.h" +#include "wx/ownerdrw.h" #define INCL_PM #include @@ -108,7 +113,9 @@ bool wxCheckListBoxItem::OnDrawItem ( wxDC& rDc, { 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); @@ -163,8 +170,8 @@ bool wxCheckListBoxItem::OnDrawItem ( wxDC& rDc, // 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, @@ -280,10 +287,13 @@ void wxCheckListBox::Delete(unsigned int n) m_aItems.RemoveAt(n); } // end of wxCheckListBox::Delete -void wxCheckListBox::DoInsertItems(const wxArrayString& items, unsigned int pos) +int wxCheckListBox::DoInsertItems(const wxArrayStringsAdapter& items, + unsigned int pos, + void **clientData, + wxClientDataType type) { // pos is validated in wxListBox - wxListBox::DoInsertItems( items, pos ); + int result = wxListBox::DoInsertItems( items, pos, clientData, type ); unsigned int n = items.GetCount(); for (unsigned int i = 0; i < n; i++) { @@ -297,7 +307,8 @@ void wxCheckListBox::DoInsertItems(const wxArrayString& items, unsigned int pos) MPFROMP(pNewItem) ); } -} // end of wxCheckListBox::InsertItems + return result; +} // end of wxCheckListBox::DoInsertItems bool wxCheckListBox::SetFont ( const wxFont& rFont ) {