Fixed using list of wildcards in filter of wxDocTemplate.
[wxWidgets.git] / src / generic / listctrl.cpp
index bc9bb84c92e94307a3c9c6c9c7496d327a310049..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)
 
@@ -520,8 +520,6 @@ public:
 
     virtual ~wxListMainWindow();
 
-    wxWindow *GetMainWindowOfCompositeControl() { return GetParent(); }
-
     bool HasFlag(int flag) const { return m_parent->HasFlag(flag); }
 
     // return true if this is a virtual list control
@@ -780,6 +778,8 @@ public:
     wxListTextCtrl*     m_textctrl;
 
 protected:
+    wxWindow *GetMainWindowOfCompositeControl() { return GetParent(); }
+
     // the total count of items in a virtual list control
     size_t m_countVirt;
 
@@ -1683,8 +1683,6 @@ void wxListHeaderWindow::OnPaint( wxPaintEvent &WXUNUSED(event) )
     PrepareDC( dc );
     AdjustDC( dc );
 
-    dc.BeginDrawing();
-
     dc.SetFont( GetFont() );
 
     // width and height of the entire header window
@@ -1794,8 +1792,6 @@ void wxListHeaderWindow::OnPaint( wxPaintEvent &WXUNUSED(event) )
 
         x += wCol;
     }
-
-    dc.EndDrawing();
 }
 
 void wxListHeaderWindow::DrawCurrent()
@@ -2568,7 +2564,7 @@ void wxListMainWindow::Thaw()
 {
     wxCHECK_RET( m_freezeCount > 0, _T("thawing unfrozen list control?") );
 
-    if ( !--m_freezeCount )
+    if ( --m_freezeCount == 0 )
         Refresh();
 }
 
@@ -2591,8 +2587,6 @@ void wxListMainWindow::OnPaint( wxPaintEvent &WXUNUSED(event) )
     int dev_x, dev_y;
     CalcScrolledPosition( 0, 0, &dev_x, &dev_y );
 
-    dc.BeginDrawing();
-
     dc.SetFont( GetFont() );
 
     if ( InReportView() )
@@ -2700,8 +2694,6 @@ void wxListMainWindow::OnPaint( wxPaintEvent &WXUNUSED(event) )
         }
     }
 #endif
-
-    dc.EndDrawing();
 }
 
 void wxListMainWindow::HighlightAll( bool on )
@@ -4681,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);
         }
     }
 }
@@ -5299,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
     {
@@ -5435,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