X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/e2bc1d69812f8fc3f6ae24508a9d007ad5d00ede..04fa04d8067d235ab45b5bc05b65f0679634b541:/src/os2/listctrl.cpp diff --git a/src/os2/listctrl.cpp b/src/os2/listctrl.cpp index 648f43ed62..cf9a922745 100644 --- a/src/os2/listctrl.cpp +++ b/src/os2/listctrl.cpp @@ -106,7 +106,7 @@ typedef struct _MYRECORD // Problem: // The MSW version had problems with SetTextColour() et al as the // CListItemAttr's were stored keyed on the item index. If a item was -// inserted anywhere but the end of the list the the text attributes +// inserted anywhere but the end of the list the text attributes // (colour etc) for the following items were out of sync. // // Solution: @@ -140,8 +140,7 @@ public: ~CListItemInternalData() { - delete m_pAttr; - m_pAttr = NULL; + wxDELETE(m_pAttr); } wxListItemAttr* m_pAttr; @@ -702,7 +701,7 @@ void ConvertToOS2ListItem ( break; default: - wxFAIL_MSG( _T("wxOS2 does not support more than 10 columns in REPORT view") ); + wxFAIL_MSG( wxT("wxOS2 does not support more than 10 columns in REPORT view") ); break; } } @@ -774,13 +773,6 @@ void ConvertToOS2ListCol ( pField->offStruct = 0; } // end of ConvertToOS2ListCol - -IMPLEMENT_DYNAMIC_CLASS(wxListCtrl, wxControl) -IMPLEMENT_DYNAMIC_CLASS(wxListView, wxListCtrl) -IMPLEMENT_DYNAMIC_CLASS(wxListItem, wxObject) - -IMPLEMENT_DYNAMIC_CLASS(wxListEvent, wxNotifyEvent) - BEGIN_EVENT_TABLE(wxListCtrl, wxControl) EVT_PAINT(wxListCtrl::OnPaint) END_EVENT_TABLE() @@ -965,8 +957,7 @@ wxListCtrl::~wxListCtrl () { m_pTextCtrl->SetHWND(0); m_pTextCtrl->UnsubclassWin(); - delete m_pTextCtrl; - m_pTextCtrl = NULL; + wxDELETE(m_pTextCtrl); } if (m_bOwnsImageListNormal) @@ -1464,7 +1455,7 @@ bool wxListCtrl::SetItemImage ( bool wxListCtrl::SetItemColumnImage ( long lItem , long lColumn -, int nImage +, int nImage) { wxListItem vInfo; @@ -1519,9 +1510,9 @@ long wxListCtrl::GetItemData ( } // end of wxListCtrl::GetItemData // Sets the item data -bool wxListCtrl::SetItemData ( +bool wxListCtrl::SetItemPtrData ( long lItem -, long lData +, wxUIntPtr lData ) { wxListItem vInfo; @@ -1530,7 +1521,7 @@ bool wxListCtrl::SetItemData ( vInfo.m_itemId = lItem; vInfo.m_data = lData; return SetItem(vInfo); -} // end of wxListCtrl::SetItemData +} // end of wxListCtrl::SetItemPtrData // Gets the item rectangle bool wxListCtrl::GetItemRect ( long lItem, @@ -2220,7 +2211,7 @@ long wxListCtrl::InsertItem ( wxListItem& rInfo ) { - wxASSERT_MSG( !IsVirtual(), _T("can't be used with virtual controls") ); + wxASSERT_MSG( !IsVirtual(), wxT("can't be used with virtual controls") ); PFIELDINFO pFieldInfo = FindOS2ListFieldByColNum ( GetHWND() ,rInfo.GetColumn() @@ -2256,7 +2247,7 @@ long wxListCtrl::InsertItem ( vInsert.fInvalidateRecord = TRUE; // - // Check wether we need to allocate our internal data + // Check whether we need to allocate our internal data // bool bNeedInternalData = ((rInfo.GetMask() & wxLIST_MASK_DATA) || rInfo.HasAttributes() @@ -2440,7 +2431,7 @@ bool wxListCtrl::SortItems ( wxListCtrlCompare fn, long lData ) ,(PVOID)&vInternalData )) { - wxLogDebug(_T("CM_SORTRECORD failed")); + wxLogDebug(wxT("CM_SORTRECORD failed")); return false; } return true; @@ -2573,7 +2564,7 @@ wxString wxListCtrl::OnGetItemText ( { // this is a pure virtual function, in fact - which is not really pure // because the controls which are not virtual don't need to implement it - wxFAIL_MSG( _T("not supposed to be called") ); + wxFAIL_MSG( wxT("not supposed to be called") ); return wxEmptyString; } // end of wxListCtrl::OnGetItemText @@ -2582,7 +2573,7 @@ int wxListCtrl::OnGetItemImage ( ) const { // same as above - wxFAIL_MSG( _T("not supposed to be called") ); + wxFAIL_MSG( wxT("not supposed to be called") ); return -1; } // end of wxListCtrl::OnGetItemImage @@ -2602,7 +2593,7 @@ wxListItemAttr* wxListCtrl::OnGetItemAttr ( ) const { wxASSERT_MSG( lItem >= 0 && lItem < GetItemCount(), - _T("invalid item index in OnGetItemAttr()") ); + wxT("invalid item index in OnGetItemAttr()") ); // // No attributes by default @@ -2614,7 +2605,7 @@ void wxListCtrl::SetItemCount ( long lCount ) { - wxASSERT_MSG( IsVirtual(), _T("this is for virtual controls only") ); + wxASSERT_MSG( IsVirtual(), wxT("this is for virtual controls only") ); // // Cannot explicitly set the record count in OS/2 @@ -2750,7 +2741,7 @@ MRESULT wxListCtrl::OS2WindowProc( WXUINT uMsg, // } vEvent.SetEventType(vEventType); - bProcessed = GetEventHandler()->ProcessEvent(vEvent); + bProcessed = HandleWindowEvent(vEvent); break; } if (!bProcessed)