]> git.saurik.com Git - wxWidgets.git/blobdiff - src/generic/datavgen.cpp
The Great wxRegion Refactoring:
[wxWidgets.git] / src / generic / datavgen.cpp
index e84b872f4bfbbb1cfcf0001bff4dc400eb2eaf63..7d404f3e72f5d1e2795624ef217ad112cc09f4a4 100644 (file)
 // For compilers that support precompilation, includes "wx.h".
 #include "wx/wxprec.h"
 
 // For compilers that support precompilation, includes "wx.h".
 #include "wx/wxprec.h"
 
+#ifdef __BORLANDC__
+    #pragma hdrstop
+#endif
+
 #if wxUSE_DATAVIEWCTRL
 
 #include "wx/dataview.h"
 #if wxUSE_DATAVIEWCTRL
 
 #include "wx/dataview.h"
 #ifdef wxUSE_GENERICDATAVIEWCTRL
 
 #ifndef WX_PRECOMP
 #ifdef wxUSE_GENERICDATAVIEWCTRL
 
 #ifndef WX_PRECOMP
+    #ifdef __WXMSW__
+        #include "wx/msw/wrapwin.h"
+    #endif
     #include "wx/sizer.h"
     #include "wx/log.h"
     #include "wx/sizer.h"
     #include "wx/log.h"
+    #include "wx/dcclient.h"
+    #include "wx/timer.h"
+    #include "wx/settings.h"
 #endif
 
 #include "wx/stockitem.h"
 #endif
 
 #include "wx/stockitem.h"
-#include "wx/dcclient.h"
 #include "wx/calctrl.h"
 #include "wx/popupwin.h"
 #include "wx/renderer.h"
 #include "wx/calctrl.h"
 #include "wx/popupwin.h"
 #include "wx/renderer.h"
-#include "wx/timer.h"
-#include "wx/settings.h"
-
-#ifdef __WXMSW__
-    #include "wx/msw/wrapwin.h"
-#endif
 
 //-----------------------------------------------------------------------------
 // classes
 
 //-----------------------------------------------------------------------------
 // classes
@@ -51,7 +54,7 @@ public:
                             const wxPoint &pos = wxDefaultPosition,
                             const wxSize &size = wxDefaultSize,
                             const wxString &name = wxT("wxdataviewctrlheaderwindow") );
                             const wxPoint &pos = wxDefaultPosition,
                             const wxSize &size = wxDefaultSize,
                             const wxString &name = wxT("wxdataviewctrlheaderwindow") );
-    ~wxDataViewHeaderWindow();
+    virtual ~wxDataViewHeaderWindow();
 
     void SetOwner( wxDataViewCtrl* owner ) { m_owner = owner; }
     wxDataViewCtrl *GetOwner() { return m_owner; }
 
     void SetOwner( wxDataViewCtrl* owner ) { m_owner = owner; }
     wxDataViewCtrl *GetOwner() { return m_owner; }
@@ -136,7 +139,7 @@ public:
                             const wxPoint &pos = wxDefaultPosition,
                             const wxSize &size = wxDefaultSize,
                             const wxString &name = wxT("wxdataviewctrlmainwindow") );
                             const wxPoint &pos = wxDefaultPosition,
                             const wxSize &size = wxDefaultSize,
                             const wxString &name = wxT("wxdataviewctrlmainwindow") );
-    ~wxDataViewMainWindow();
+    virtual ~wxDataViewMainWindow();
 
     // notifications from wxDataViewListModel
     bool RowAppended();
 
     // notifications from wxDataViewListModel
     bool RowAppended();
@@ -1142,7 +1145,7 @@ size_t wxDataViewMainWindow::GetLastVisibleRow()
     wxSize client_size = GetClientSize();
     m_owner->CalcUnscrolledPosition( client_size.x, client_size.y, &client_size.x, &client_size.y );
 
     wxSize client_size = GetClientSize();
     m_owner->CalcUnscrolledPosition( client_size.x, client_size.y, &client_size.x, &client_size.y );
 
-    return wxMin( GetRowCount()-1, (client_size.y/m_lineHeight)+1 );
+    return wxMin( GetRowCount()-1, ((unsigned)client_size.y/m_lineHeight)+1 );
 }
 
 size_t wxDataViewMainWindow::GetRowCount()
 }
 
 size_t wxDataViewMainWindow::GetRowCount()