From 81ce36aa591e89a802e0d900ac3c4bdbbacce48c Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Wed, 29 Sep 2004 09:25:47 +0000 Subject: [PATCH] more 64 bit correctness fixes git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@29533 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/generic/listctrl.h | 4 ++-- include/wx/msw/listctrl.h | 4 ++-- src/generic/listctrl.cpp | 16 ++++++++-------- src/msw/listctrl.cpp | 4 ++-- 4 files changed, 14 insertions(+), 14 deletions(-) diff --git a/include/wx/generic/listctrl.h b/include/wx/generic/listctrl.h index 6efe3d70ac..dbc93a9a85 100644 --- a/include/wx/generic/listctrl.h +++ b/include/wx/generic/listctrl.h @@ -101,7 +101,7 @@ public: bool SetItemImage( long item, int image, int selImage); wxString GetItemText( long item ) const; void SetItemText( long item, const wxString& str ); - long GetItemData( long item ) const; + wxUIntPtr GetItemData( long item ) const; bool SetItemData( long item, long data ); bool GetItemRect( long item, wxRect& rect, int code = wxLIST_RECT_BOUNDS ) const; bool GetItemPosition( long item, wxPoint& pos ) const; @@ -141,7 +141,7 @@ public: bool EnsureVisible( long item ); long FindItem( long start, const wxString& str, bool partial = false ); - long FindItem( long start, long data ); + long FindItem( long start, wxUIntPtr data ); long FindItem( long start, const wxPoint& pt, int direction ); // not supported in wxGLC long HitTest( const wxPoint& point, int& flags); long InsertItem(wxListItem& info); diff --git a/include/wx/msw/listctrl.h b/include/wx/msw/listctrl.h index 6ba1bea220..2c5ca5e04b 100644 --- a/include/wx/msw/listctrl.h +++ b/include/wx/msw/listctrl.h @@ -169,7 +169,7 @@ public: void SetItemText(long item, const wxString& str) ; // Gets the item data - long GetItemData(long item) const ; + wxUIntPtr GetItemData(long item) const ; // Sets the item data bool SetItemData(long item, long data) ; @@ -284,7 +284,7 @@ public: // Find an item whose data matches this data, starting from the item after 'start' // or the beginning if 'start' is -1. - long FindItem(long start, long data); + long FindItem(long start, wxUIntPtr data); // Find an item nearest this position in the specified direction, starting from // the item after 'start' or the beginning if 'start' is -1. diff --git a/src/generic/listctrl.cpp b/src/generic/listctrl.cpp index 3a2774b15e..573f8c91f6 100644 --- a/src/generic/listctrl.cpp +++ b/src/generic/listctrl.cpp @@ -164,7 +164,7 @@ public: void SetItem( const wxListItem &info ); void SetImage( int image ) { m_image = image; } - void SetData( long data ) { m_data = data; } + void SetData( wxUIntPtr data ) { m_data = data; } void SetPosition( int x, int y ); void SetSize( int width, int height ); @@ -203,7 +203,7 @@ public: int m_image; // user data associated with the item - long m_data; + wxUIntPtr m_data; // the item coordinates are not used in report mode, instead this pointer // is NULL and the owner window is used to retrieve the item position and @@ -679,7 +679,7 @@ public: void DeleteEverything(); void EnsureVisible( long index ); long FindItem( long start, const wxString& str, bool partial = false ); - long FindItem( long start, long data); + long FindItem( long start, wxUIntPtr data); long FindItem( const wxPoint& pt ); long HitTest( int x, int y, int &flags ); void InsertItem( wxListItem &item ); @@ -4271,7 +4271,7 @@ long wxListMainWindow::FindItem(long start, const wxString& str, bool WXUNUSED(p return wxNOT_FOUND; } -long wxListMainWindow::FindItem(long start, long data) +long wxListMainWindow::FindItem(long start, wxUIntPtr data) { long pos = start; if (pos < 0) @@ -4466,9 +4466,9 @@ int LINKAGEMODE list_ctrl_compare_func_1( wxListLineData **arg1, wxListLineData wxListLineData *line2 = *arg2; wxListItem item; line1->GetItem( 0, item ); - long data1 = item.m_data; + wxUIntPtr data1 = item.m_data; line2->GetItem( 0, item ); - long data2 = item.m_data; + wxUIntPtr data2 = item.m_data; return list_ctrl_compare_func_2( data1, data2, list_ctrl_compare_data ); } @@ -4840,7 +4840,7 @@ void wxGenericListCtrl::SetItemText( long item, const wxString& str ) m_mainWin->SetItemText(item, str); } -long wxGenericListCtrl::GetItemData( long item ) const +wxUIntPtr wxGenericListCtrl::GetItemData( long item ) const { wxListItem info; info.m_itemId = item; @@ -5080,7 +5080,7 @@ long wxGenericListCtrl::FindItem( long start, const wxString& str, bool partial return m_mainWin->FindItem( start, str, partial ); } -long wxGenericListCtrl::FindItem( long start, long data ) +long wxGenericListCtrl::FindItem( long start, wxUIntPtr data ) { return m_mainWin->FindItem( start, data ); } diff --git a/src/msw/listctrl.cpp b/src/msw/listctrl.cpp index 9d2fc92173..03215598d1 100644 --- a/src/msw/listctrl.cpp +++ b/src/msw/listctrl.cpp @@ -938,7 +938,7 @@ void wxListCtrl::SetItemText(long item, const wxString& str) } // Gets the item data -long wxListCtrl::GetItemData(long item) const +wxUIntPtr wxListCtrl::GetItemData(long item) const { wxListItem info; @@ -1375,7 +1375,7 @@ long wxListCtrl::FindItem(long start, const wxString& str, bool partial) // NOTE : Lindsay Mathieson - 14-July-2002 // No longer use ListView_FindItem as the data attribute is now stored // in a wxListItemInternalData structure refernced by the actual lParam -long wxListCtrl::FindItem(long start, long data) +long wxListCtrl::FindItem(long start, wxUIntPtr data) { long idx = start + 1; long count = GetItemCount(); -- 2.45.2