X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/63da7df70114ff2c535d6cdeec5d0aca83ce97f3..6342bd1ab36c1957684c00d408d09fba65d33db6:/src/msw/treectrl.cpp diff --git a/src/msw/treectrl.cpp b/src/msw/treectrl.cpp index 0d54480eb5..80a4517527 100644 --- a/src/msw/treectrl.cpp +++ b/src/msw/treectrl.cpp @@ -46,9 +46,8 @@ #include "wx/log.h" #include "wx/dynarray.h" #include "wx/imaglist.h" -#include "wx/treectrl.h" #include "wx/settings.h" - +#include "wx/msw/treectrl.h" #include "wx/msw/dragimag.h" #ifdef __GNUWIN32_OLD__ @@ -1103,7 +1102,7 @@ wxTreeItemId wxTreeCtrl::GetRootItem() const wxTreeItemId wxTreeCtrl::GetSelection() const { - wxCHECK_MSG( !(m_windowStyle & wxTR_MULTIPLE), (WXHTREEITEM)0, + wxCHECK_MSG( !(m_windowStyle & wxTR_MULTIPLE), (long)(WXHTREEITEM)0, wxT("this only works with single selection controls") ); return wxTreeItemId((WXHTREEITEM) TreeView_GetSelection(GetHwnd())); @@ -1302,7 +1301,7 @@ wxTreeItemId wxTreeCtrl::AddRoot(const wxString& text, int image, int selectedImage, wxTreeItemData *data) { - return DoInsertItem(wxTreeItemId((WXHTREEITEM) 0), (WXHTREEITEM) 0, + return DoInsertItem(wxTreeItemId((long) (WXHTREEITEM) 0), (long)(WXHTREEITEM) 0, text, image, selectedImage, data); } @@ -1467,7 +1466,7 @@ void wxTreeCtrl::Unselect() wxT("doesn't make sense, may be you want UnselectAll()?") ); // just remove the selection - SelectItem(wxTreeItemId((WXHTREEITEM) 0)); + SelectItem(wxTreeItemId((long) (WXHTREEITEM) 0)); } void wxTreeCtrl::UnselectAll() @@ -2257,6 +2256,11 @@ bool wxTreeCtrl::MSWOnNotify(int idCtrl, WXLPARAM lParam, WXLPARAM *result) delete data; // can't be NULL here m_itemsWithIndirectData.Remove(item); +#if 0 + int iIndex = m_itemsWithIndirectData.Index(item); + wxASSERT( iIndex != wxNOT_FOUND) ; + m_itemsWithIndirectData.wxBaseArray::RemoveAt((size_t)iIndex); +#endif } else { @@ -2326,18 +2330,5 @@ bool wxTreeCtrl::MSWOnNotify(int idCtrl, WXLPARAM lParam, WXLPARAM *result) return processed; } -// ---------------------------------------------------------------------------- -// Tree event -// ---------------------------------------------------------------------------- - -IMPLEMENT_DYNAMIC_CLASS(wxTreeEvent, wxNotifyEvent) - -wxTreeEvent::wxTreeEvent(wxEventType commandType, int id) - : wxNotifyEvent(commandType, id) -{ - m_code = 0; - m_itemOld = 0; -} - #endif // __WIN95__