]> git.saurik.com Git - wxWidgets.git/blobdiff - src/generic/listctrl.cpp
replace @b Note with @note; replace '' with "
[wxWidgets.git] / src / generic / listctrl.cpp
index d58f84467e61fcf01a9839dafa46d508b13ffc65..a3419d15c7d37337ddf6bc6dcf2afbf71760a4ea 100644 (file)
@@ -243,7 +243,7 @@ private:
 //  wxListLineData (internal)
 //-----------------------------------------------------------------------------
 
 //  wxListLineData (internal)
 //-----------------------------------------------------------------------------
 
-WX_DECLARE_EXPORTED_LIST(wxListItemData, wxListItemDataList);
+WX_DECLARE_LIST(wxListItemData, wxListItemDataList);
 #include "wx/listimpl.cpp"
 WX_DEFINE_LIST(wxListItemDataList)
 
 #include "wx/listimpl.cpp"
 WX_DEFINE_LIST(wxListItemDataList)
 
@@ -375,7 +375,7 @@ private:
                            int width);
 };
 
                            int width);
 };
 
-WX_DECLARE_EXPORTED_OBJARRAY(wxListLineData, wxListLineDataArray);
+WX_DECLARE_OBJARRAY(wxListLineData, wxListLineDataArray);
 #include "wx/arrimpl.cpp"
 WX_DEFINE_OBJARRAY(wxListLineDataArray)
 
 #include "wx/arrimpl.cpp"
 WX_DEFINE_OBJARRAY(wxListLineDataArray)
 
@@ -488,7 +488,7 @@ private:
 //  wxListMainWindow (internal)
 //-----------------------------------------------------------------------------
 
 //  wxListMainWindow (internal)
 //-----------------------------------------------------------------------------
 
-WX_DECLARE_EXPORTED_LIST(wxListHeaderData, wxListHeaderDataList);
+WX_DECLARE_LIST(wxListHeaderData, wxListHeaderDataList);
 #include "wx/listimpl.cpp"
 WX_DEFINE_LIST(wxListHeaderDataList)
 
 #include "wx/listimpl.cpp"
 WX_DEFINE_LIST(wxListHeaderDataList)
 
@@ -598,10 +598,6 @@ public:
         m_textctrlWrapper = NULL;
     }
 
         m_textctrlWrapper = NULL;
     }
 
-    // we don't draw anything while we're frozen so we must refresh ourselves
-    // when we're thawed to make sure the changes are displayed correctly
-    virtual void DoThaw() { Refresh(); }
-
     void OnRenameTimer();
     bool OnRenameAccept(size_t itemEdit, const wxString& value);
     void OnRenameCancelled(size_t itemEdit);
     void OnRenameTimer();
     bool OnRenameAccept(size_t itemEdit, const wxString& value);
     void OnRenameCancelled(size_t itemEdit);
@@ -1446,7 +1442,7 @@ bool wxListLineData::SetAttributes(wxDC *dc,
         if ( highlighted )
             dc->SetBrush( *m_owner->GetHighlightBrush() );
         else
         if ( highlighted )
             dc->SetBrush( *m_owner->GetHighlightBrush() );
         else
-            dc->SetBrush(wxBrush(attr->GetBackgroundColour(), wxSOLID));
+            dc->SetBrush(wxBrush(attr->GetBackgroundColour(), wxBRUSHSTYLE_SOLID));
 
         dc->SetPen( *wxTRANSPARENT_PEN );
 
 
         dc->SetPen( *wxTRANSPARENT_PEN );
 
@@ -1569,6 +1565,9 @@ void wxListLineData::DrawInReportMode( wxDC *dc,
         int xOld = x;
         x += width;
 
         int xOld = x;
         x += width;
 
+        const int wText = width - 8;
+        wxDCClipper clipper(*dc, xOld, rect.y, wText, rect.height);
+
         if ( item->HasImage() )
         {
             int ix, iy;
         if ( item->HasImage() )
         {
             int ix, iy;
@@ -1582,7 +1581,7 @@ void wxListLineData::DrawInReportMode( wxDC *dc,
         }
 
         if ( item->HasText() )
         }
 
         if ( item->HasText() )
-            DrawTextFormatted(dc, item->GetText(), col, xOld, yMid, width - 8);
+            DrawTextFormatted(dc, item->GetText(), col, xOld, yMid, wText);
     }
 }
 
     }
 }
 
@@ -1791,7 +1790,7 @@ void wxListHeaderWindow::OnPaint( wxPaintEvent &WXUNUSED(event) )
     GetClientSize( &w, &h );
     m_owner->CalcUnscrolledPosition(w, 0, &w, NULL);
 
     GetClientSize( &w, &h );
     m_owner->CalcUnscrolledPosition(w, 0, &w, NULL);
 
-    dc.SetBackgroundMode(wxTRANSPARENT);
+    dc.SetBackgroundMode(wxBRUSHSTYLE_TRANSPARENT);
     dc.SetTextForeground(GetForegroundColour());
 
     int x = HEADER_OFFSET_X;
     dc.SetTextForeground(GetForegroundColour());
 
     int x = HEADER_OFFSET_X;
@@ -2136,11 +2135,11 @@ wxListTextCtrlWrapper::wxListTextCtrlWrapper(wxListMainWindow *owner,
 void wxListTextCtrlWrapper::EndEdit(bool discardChanges)
 {
     m_aboutToFinish = true;
 void wxListTextCtrlWrapper::EndEdit(bool discardChanges)
 {
     m_aboutToFinish = true;
-    
+
     if ( discardChanges )
     {
         m_owner->OnRenameCancelled(m_itemEdited);
     if ( discardChanges )
     {
         m_owner->OnRenameCancelled(m_itemEdited);
-           
+
         Finish( true );
     }
     else
         Finish( true );
     }
     else
@@ -2159,7 +2158,7 @@ void wxListTextCtrlWrapper::Finish( bool setfocus )
     m_owner->ResetTextControl( m_text );
 
     wxPendingDelete.Append( this );
     m_owner->ResetTextControl( m_text );
 
     wxPendingDelete.Append( this );
-    
+
     if (setfocus)
         m_owner->SetFocusIgnoringChildren();
 }
     if (setfocus)
         m_owner->SetFocusIgnoringChildren();
 }
@@ -2216,7 +2215,7 @@ void wxListTextCtrlWrapper::OnKeyUp( wxKeyEvent &event )
             sx = mySize.x;
        m_text->SetSize(sx, wxDefaultCoord);
     }
             sx = mySize.x;
        m_text->SetSize(sx, wxDefaultCoord);
     }
-    
+
     event.Skip();
 }
 
     event.Skip();
 }
 
@@ -2307,7 +2306,7 @@ wxListMainWindow::wxListMainWindow( wxWindow *parent,
                             (
                                 wxSYS_COLOUR_HIGHLIGHT
                             ),
                             (
                                 wxSYS_COLOUR_HIGHLIGHT
                             ),
-                            wxSOLID
+                            wxBRUSHSTYLE_SOLID
                          );
 
     m_highlightUnfocusedBrush = new wxBrush
                          );
 
     m_highlightUnfocusedBrush = new wxBrush
@@ -2316,7 +2315,7 @@ wxListMainWindow::wxListMainWindow( wxWindow *parent,
                                  (
                                      wxSYS_COLOUR_BTNSHADOW
                                  ),
                                  (
                                      wxSYS_COLOUR_BTNSHADOW
                                  ),
-                                 wxSOLID
+                                 wxBRUSHSTYLE_SOLID
                               );
 
     SetScrollbars( 0, 0, 0, 0, 0, 0 );
                               );
 
     SetScrollbars( 0, 0, 0, 0, 0, 0 );
@@ -2704,7 +2703,7 @@ void wxListMainWindow::OnPaint( wxPaintEvent &WXUNUSED(event) )
     // done (a Windows requirement).
     wxPaintDC dc( this );
 
     // done (a Windows requirement).
     wxPaintDC dc( this );
 
-    if ( IsEmpty() || IsFrozen() )
+    if ( IsEmpty() )
     {
         // nothing to draw or not the moment to draw it
         return;
     {
         // nothing to draw or not the moment to draw it
         return;
@@ -2765,7 +2764,7 @@ void wxListMainWindow::OnPaint( wxPaintEvent &WXUNUSED(event) )
 
         if ( HasFlag(wxLC_HRULES) )
         {
 
         if ( HasFlag(wxLC_HRULES) )
         {
-            wxPen pen(GetRuleColour(), 1, wxSOLID);
+            wxPen pen(GetRuleColour(), 1, wxPENSTYLE_SOLID);
             wxSize clientSize = GetClientSize();
 
             size_t i = visibleFrom;
             wxSize clientSize = GetClientSize();
 
             size_t i = visibleFrom;
@@ -2791,7 +2790,7 @@ void wxListMainWindow::OnPaint( wxPaintEvent &WXUNUSED(event) )
         // Draw vertical rules if required
         if ( HasFlag(wxLC_VRULES) && !IsEmpty() )
         {
         // Draw vertical rules if required
         if ( HasFlag(wxLC_VRULES) && !IsEmpty() )
         {
-            wxPen pen(GetRuleColour(), 1, wxSOLID);
+            wxPen pen(GetRuleColour(), 1, wxPENSTYLE_SOLID);
             wxRect firstItemRect, lastItemRect;
 
             GetItemRect(visibleFrom, firstItemRect);
             wxRect firstItemRect, lastItemRect;
 
             GetItemRect(visibleFrom, firstItemRect);
@@ -5898,14 +5897,4 @@ void wxGenericListCtrl::Refresh(bool eraseBackground, const wxRect *rect)
     }
 }
 
     }
 }
 
-void wxGenericListCtrl::DoFreeze()
-{
-    m_mainWin->Freeze();
-}
-
-void wxGenericListCtrl::DoThaw()
-{
-    m_mainWin->Thaw();
-}
-
 #endif // wxUSE_LISTCTRL
 #endif // wxUSE_LISTCTRL