]> git.saurik.com Git - wxWidgets.git/blobdiff - src/generic/listctrl.cpp
Warning fix
[wxWidgets.git] / src / generic / listctrl.cpp
index 3ebe7d921aaf1258296508eb8a1c6e7d2d22182b..bd5c8f1860dcb2e71e9ac53102aacba4231d123f 100644 (file)
@@ -268,7 +268,7 @@ private:
 //  wxListLineData (internal)
 //-----------------------------------------------------------------------------
 
-WX_DECLARE_LIST(wxListItemData, wxListItemDataList);
+WX_DECLARE_EXPORTED_LIST(wxListItemData, wxListItemDataList);
 #include "wx/listimpl.cpp"
 WX_DEFINE_LIST(wxListItemDataList)
 
@@ -503,7 +503,7 @@ private:
 //  wxListMainWindow (internal)
 //-----------------------------------------------------------------------------
 
-WX_DECLARE_LIST(wxListHeaderData, wxListHeaderDataList);
+WX_DECLARE_EXPORTED_LIST(wxListHeaderData, wxListHeaderDataList);
 #include "wx/listimpl.cpp"
 WX_DEFINE_LIST(wxListHeaderDataList)
 
@@ -2564,7 +2564,7 @@ void wxListMainWindow::Thaw()
 {
     wxCHECK_RET( m_freezeCount > 0, _T("thawing unfrozen list control?") );
 
-    if ( !--m_freezeCount )
+    if ( --m_freezeCount == 0 )
         Refresh();
 }
 
@@ -4673,10 +4673,10 @@ void wxGenericListCtrl::CalculateAndSetHeaderHeight()
         {
             m_headerHeight = h;
 
-            m_headerWin->SetSize(m_headerWin->GetSize().x, m_headerHeight);
-
             if ( HasHeader() )
                 ResizeReportView(true);
+            else    //why is this needed if it doesn't have a header?
+                m_headerWin->SetSize(m_headerWin->GetSize().x, m_headerHeight);
         }
     }
 }
@@ -5291,7 +5291,12 @@ void wxGenericListCtrl::ResizeReportView(bool showHeader)
     if ( showHeader )
     {
         m_headerWin->SetSize( 0, 0, cw, m_headerHeight );
-        m_mainWin->SetSize( 0, m_headerHeight + 1, cw, ch - m_headerHeight - 1 );
+        if(ch > m_headerHeight)
+            m_mainWin->SetSize( 0, m_headerHeight + 1, 
+                                   cw, ch - m_headerHeight - 1 );
+        else
+            m_mainWin->SetSize( 0, m_headerHeight + 1, 
+                                   cw, 0);
     }
     else // no header window
     {
@@ -5427,6 +5432,16 @@ bool wxGenericListCtrl::DoPopupMenu( wxMenu *menu, int x, int y )
 #endif
 }
 
+void wxGenericListCtrl::DoClientToScreen( int *x, int *y ) const
+{
+    return m_mainWin->DoClientToScreen(x, y);
+}
+
+void wxGenericListCtrl::DoScreenToClient( int *x, int *y ) const
+{
+    return m_mainWin->DoScreenToClient(x, y);
+}
+
 void wxGenericListCtrl::SetFocus()
 {
     // The test in window.cpp fails as we are a composite