]> git.saurik.com Git - wxWidgets.git/blobdiff - src/generic/listctrl.cpp
Added named section 'Property development funcions'
[wxWidgets.git] / src / generic / listctrl.cpp
index 5ca7580a98311c8b6b9164457d1eed2733e8a7d0..b62c9cf1f8932cac110c86bf4899a8c62f8080a8 100644 (file)
@@ -4152,7 +4152,7 @@ int wxListMainWindow::GetItemWidthWithImage(wxListItem * item)
 // ----------------------------------------------------------------------------
 
 static wxListCtrlCompare list_ctrl_compare_func_2;
-static wxUIntPtr         list_ctrl_compare_data;
+static wxIntPtr          list_ctrl_compare_data;
 
 int LINKAGEMODE list_ctrl_compare_func_1( wxListLineData **arg1, wxListLineData **arg2 )
 {
@@ -4166,7 +4166,7 @@ int LINKAGEMODE list_ctrl_compare_func_1( wxListLineData **arg1, wxListLineData
     return list_ctrl_compare_func_2( data1, data2, list_ctrl_compare_data );
 }
 
-void wxListMainWindow::SortItems( wxListCtrlCompare fn, wxUIntPtr data )
+void wxListMainWindow::SortItems( wxListCtrlCompare fn, wxIntPtr data )
 {
     // selections won't make sense any more after sorting the items so reset
     // them
@@ -4918,7 +4918,7 @@ bool wxGenericListCtrl::ScrollList( int dx, int dy )
 // or zero if the two items are equivalent.
 // data is arbitrary data to be passed to the sort function.
 
-bool wxGenericListCtrl::SortItems( wxListCtrlCompare fn, wxUIntPtr data )
+bool wxGenericListCtrl::SortItems( wxListCtrlCompare fn, wxIntPtr data )
 {
     m_mainWin->SortItems( fn, data );
     return true;
@@ -5198,4 +5198,18 @@ void wxGenericListCtrl::Refresh(bool eraseBackground, const wxRect *rect)
     }
 }
 
+void wxGenericListCtrl::Update()
+{
+    if ( m_mainWin )
+    {
+        if ( m_mainWin->m_dirty )
+            m_mainWin->RecalculatePositions();
+
+        m_mainWin->Update();
+    }
+
+    if ( m_headerWin )
+        m_headerWin->Update();
+}
+
 #endif // wxUSE_LISTCTRL