]> git.saurik.com Git - wxWidgets.git/blobdiff - src/generic/listctrl.cpp
add uint/long/ulong overloads of operator* and operator/ to avoid problems with ambig...
[wxWidgets.git] / src / generic / listctrl.cpp
index a0a2e38abae791e7d7634aad61dab4e01badaf22..dd735d5f19ecadec8e9e3d78353b5c1f134540ef 100644 (file)
@@ -24,7 +24,6 @@
 #if wxUSE_LISTCTRL
 
 #include "wx/listctrl.h"
-#include "wx/generic/private/listctrl.h"
 
 #if ((!defined(__WXMSW__) && !(defined(__WXMAC__) && wxOSX_USE_CARBON)) || defined(__WXUNIVERSAL__))
     // if we have a native version, its implementation file does all this
@@ -49,6 +48,7 @@
 
 #include "wx/imaglist.h"
 #include "wx/renderer.h"
+#include "wx/generic/private/listctrl.h"
 
 #ifdef __WXMAC__
     #include "wx/osx/private.h"
@@ -2293,7 +2293,6 @@ void wxListMainWindow::OnRenameCancelled(size_t itemEdit)
 
 void wxListMainWindow::OnMouse( wxMouseEvent &event )
 {
-
 #ifdef __WXMAC__
     // On wxMac we can't depend on the EVT_KILL_FOCUS event to properly
     // shutdown the edit control when the mouse is clicked elsewhere on the
@@ -2312,7 +2311,7 @@ void wxListMainWindow::OnMouse( wxMouseEvent &event )
 
     if (event.GetEventType() == wxEVT_MOUSEWHEEL)
     {
-        // let the base handle mouse wheel events.
+        // let the base class handle mouse wheel events.
         event.Skip();
         return;
     }
@@ -2323,10 +2322,9 @@ void wxListMainWindow::OnMouse( wxMouseEvent &event )
         {
             SendNotify( (size_t)-1, wxEVT_COMMAND_LIST_ITEM_RIGHT_CLICK, event.GetPosition() );
 
-            wxContextMenuEvent evtCtx(
-                wxEVT_CONTEXT_MENU,
-                GetParent()->GetId(),
-                ClientToScreen(event.GetPosition()));
+            wxContextMenuEvent evtCtx(wxEVT_CONTEXT_MENU,
+                                      GetParent()->GetId(),
+                                      ClientToScreen(event.GetPosition()));
             evtCtx.SetEventObject(GetParent());
             GetParent()->GetEventHandler()->ProcessEvent(evtCtx);
         }
@@ -2577,8 +2575,8 @@ void wxListMainWindow::MoveToItem(size_t item)
 
     const int hLine = GetLineHeight();
 
-    int view_x = SCROLL_UNIT_X * GetScrollPos( wxHORIZONTAL );
-    int view_y = hLine * GetScrollPos( wxVERTICAL );
+    int view_x = SCROLL_UNIT_X * GetListCtrl()->GetScrollPos( wxHORIZONTAL );
+    int view_y = hLine * GetListCtrl()->GetScrollPos( wxVERTICAL );
 
     if ( InReportView() )
     {
@@ -4216,7 +4214,7 @@ void wxListMainWindow::GetVisibleLinesRange(size_t *from, size_t *to)
         size_t count = GetItemCount();
         if ( count )
         {
-            m_lineFrom = GetScrollPos(wxVERTICAL);
+            m_lineFrom = GetListCtrl()->GetScrollPos(wxVERTICAL);
 
             // this may happen if SetScrollbars() hadn't been called yet
             if ( m_lineFrom >= count )