]> git.saurik.com Git - wxWidgets.git/blobdiff - src/generic/listctrl.cpp
trying to fix buildbot VC6 build error
[wxWidgets.git] / src / generic / listctrl.cpp
index 028a0fddd429ffbe26877f5a2a3d2bcce8b3e411..bf9e05c4170e386692b983d57156e428829424d4 100644 (file)
@@ -618,7 +618,7 @@ public:
     void OnPaint( wxPaintEvent &event );
 
     void OnChildFocus(wxChildFocusEvent& event);
-    
+
     void DrawImage( int index, wxDC *dc, int x, int y );
     void GetImageSize( int index, int &width, int &height ) const;
     int GetTextLength( const wxString &s ) const;
@@ -1414,7 +1414,7 @@ bool wxListLineData::SetAttributes(wxDC *dc,
 #ifdef __WXMAC__
     {
         if (m_owner->HasFocus()
-#if !defined(__WXUNIVERSAL__)
+#if !defined(__WXUNIVERSAL__) && wxOSX_USE_CARBON
                 && IsControlActive( (ControlRef)m_owner->GetHandle() )
 #endif
         )
@@ -1478,7 +1478,7 @@ void wxListLineData::Draw( wxDC *dc )
         {
             int flags = wxCONTROL_SELECTED;
             if (m_owner->HasFocus()
-#if defined( __WXMAC__ ) && !defined(__WXUNIVERSAL__)
+#if defined( __WXMAC__ ) && !defined(__WXUNIVERSAL__) && wxOSX_USE_CARBON
                 && IsControlActive( (ControlRef)m_owner->GetHandle() )
 #endif
             )
@@ -4881,12 +4881,7 @@ void wxListMainWindow::SortItems( wxListCtrlCompare fn, long data )
 
 void wxListMainWindow::OnScroll(wxScrollWinEvent& event)
 {
-    // FIXME
-#if ( defined(__WXGTK__) || defined(__WXMAC__) ) && !defined(__WXUNIVERSAL__)
-    wxScrolledCanvas::OnScroll(event);
-#else
     HandleOnScroll( event );
-#endif
 
     // update our idea of which lines are shown when we redraw the window the
     // next time
@@ -5045,10 +5040,9 @@ bool wxGenericListCtrl::Create(wxWindow *parent,
 
     m_headerHeight = 0;
 
-    if ( !(style & wxLC_MASK_TYPE) )
-    {
-        style = style | wxLC_LIST;
-    }
+    // just like in other ports, an assert will fail if the user doesn't give any type style:
+    wxASSERT_MSG( (style & wxLC_MASK_TYPE),
+                  _T("wxListCtrl style should have exactly one mode bit set") );
 
     if ( !wxControl::Create( parent, id, pos, size, style, validator, name ) )
         return false;
@@ -5769,7 +5763,7 @@ wxGenericListCtrl::GetClassDefaultAttributes(wxWindowVariant variant)
 #else
     wxUnusedVar(variant);
     wxVisualAttributes attr;
-    attr.colFg = wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOWTEXT);
+    attr.colFg = wxSystemSettings::GetColour(wxSYS_COLOUR_LISTBOXTEXT);
     attr.colBg = wxSystemSettings::GetColour(wxSYS_COLOUR_LISTBOX);
     attr.font  = wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT);
     return attr;