X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/1169a91932273bc84c23ed9dbd0a2da064d59d66..c7382f913cc2d3ddcc782b876574c58865e7d842:/src/os2/checklst.cpp diff --git a/src/os2/checklst.cpp b/src/os2/checklst.cpp index c0b1ac0ca0..0f28068581 100644 --- a/src/os2/checklst.cpp +++ b/src/os2/checklst.cpp @@ -42,15 +42,7 @@ #define GetItem(n) ((wxCheckListBoxItem *)(GetItem(n))) // ============================================================================ -// implementation of wxCheckListBoxBase -// ============================================================================ - -wxCheckListBoxBase::wxCheckListBoxBase() -{ -} - -// ============================================================================ -// implementation of wxCheckListBox +// implementation // ============================================================================ IMPLEMENT_DYNAMIC_CLASS(wxCheckListBox, wxListBox) @@ -130,7 +122,7 @@ bool wxCheckListBoxItem::OnDrawItem ( // // Unfortunately PM doesn't quite get the text position exact. We need to alter // it down and to the right, just a little bit. The coords in rRect are OS/2 - // coords not wxWindows coords. + // coords not wxWidgets coords. // vRect.x += 5; vRect.y -= 3; @@ -234,9 +226,6 @@ void wxCheckListBoxItem::Check ( m_nIndex = (size_t)nIndex; } - HWND hWndListbox = (HWND)m_pParent->GetHWND(); - RECTL rUpdate; - MRESULT mRc; wxCommandEvent vEvent( wxEVT_COMMAND_CHECKLISTBOX_TOGGLED ,m_pParent->GetId() @@ -299,6 +288,31 @@ wxCheckListBox::wxCheckListBox ( ); } // end of wxCheckListBox::wxCheckListBox +wxCheckListBox::wxCheckListBox ( + wxWindow* pParent +, wxWindowID vId +, const wxPoint& rPos +, const wxSize& rSize +, const wxArrayString& asChoices +, long lStyle +, const wxValidator& rVal +, const wxString& rsName +) + : wxListBox() +{ + wxCArrayString chs(asChoices); + Create( pParent + ,vId + ,rPos + ,rSize + ,chs.GetCount() + ,chs.GetStrings() + ,lStyle | wxLB_OWNERDRAW + ,rVal + ,rsName + ); +} // end of wxCheckListBox::wxCheckListBox + void wxCheckListBox::Delete( int N ) @@ -428,7 +442,7 @@ void wxCheckListBox::OnChar ( wxKeyEvent& rEvent ) { - if (rEvent.KeyCode() == WXK_SPACE) + if (rEvent.GetKeyCode() == WXK_SPACE) GetItem(GetSelection())->Toggle(); else rEvent.Skip(); @@ -451,7 +465,7 @@ void wxCheckListBox::OnLeftClick ( ,&nParentHeight ); vDc.SetFont(GetFont()); - vHeight = vDc.GetCharHeight() * 2.5; + vHeight = (wxCoord)(vDc.GetCharHeight() * 2.5); // // This, of course, will not work if the LB is scrolled