]> git.saurik.com Git - wxWidgets.git/blobdiff - src/generic/listctrl.cpp
no real changes
[wxWidgets.git] / src / generic / listctrl.cpp
index 6008a869de6237c3460f6a503ee8deca35229752..8c05bafe0aa5ef9be010d4ed8ac374f536da4fe4 100644 (file)
 
 #if wxUSE_LISTCTRL
 
-#include "wx/dcscreen.h"
-#include "wx/app.h"
-#include "wx/listctrl.h"
+#ifndef WX_PRECOMP
+    #include "wx/app.h"
+
+    #include "wx/dynarray.h"
+
+    #include "wx/dcscreen.h"
+
+    #include "wx/textctrl.h"
+#endif
+
 #include "wx/imaglist.h"
-#include "wx/dynarray.h"
+#include "wx/listctrl.h"
 
 #ifdef __WXGTK__
-#include <gtk/gtk.h>
-#include "wx/gtk/win_gtk.h"
+    #include <gtk/gtk.h>
+    #include "wx/gtk/win_gtk.h"
 #endif
 
 // ----------------------------------------------------------------------------
@@ -4443,53 +4450,6 @@ void wxListItem::ClearAttributes()
     }
 }
 
-// -------------------------------------------------------------------------------------
-// wxListEvent
-// -------------------------------------------------------------------------------------
-
-IMPLEMENT_DYNAMIC_CLASS(wxListEvent, wxNotifyEvent)
-
-wxListEvent::wxListEvent( wxEventType commandType, int id )
-           : wxNotifyEvent( commandType, id )
-{
-    m_code = 0;
-    m_itemIndex = 0;
-    m_oldItemIndex = 0;
-    m_col = 0;
-    m_cancelled = FALSE;
-    m_pointDrag.x = 0;
-    m_pointDrag.y = 0;
-}
-
-void wxListEvent::CopyObject(wxObject& object_dest) const
-{
-    wxListEvent *obj = (wxListEvent *)&object_dest;
-
-    wxNotifyEvent::CopyObject(object_dest);
-
-    obj->m_code = m_code;
-    obj->m_itemIndex = m_itemIndex;
-    obj->m_oldItemIndex = m_oldItemIndex;
-    obj->m_col = m_col;
-    obj->m_cancelled = m_cancelled;
-    obj->m_pointDrag = m_pointDrag;
-    obj->m_item.m_mask = m_item.m_mask;
-    obj->m_item.m_itemId = m_item.m_itemId;
-    obj->m_item.m_col = m_item.m_col;
-    obj->m_item.m_state = m_item.m_state;
-    obj->m_item.m_stateMask = m_item.m_stateMask;
-    obj->m_item.m_text = m_item.m_text;
-    obj->m_item.m_image = m_item.m_image;
-    obj->m_item.m_data = m_item.m_data;
-    obj->m_item.m_format = m_item.m_format;
-    obj->m_item.m_width = m_item.m_width;
-
-    if ( m_item.HasAttributes() )
-    {
-        obj->m_item.SetTextColour(m_item.GetTextColour());
-    }
-}
-
 // -------------------------------------------------------------------------------------
 // wxListCtrl
 // -------------------------------------------------------------------------------------
@@ -4497,6 +4457,8 @@ void wxListEvent::CopyObject(wxObject& object_dest) const
 IMPLEMENT_DYNAMIC_CLASS(wxListCtrl, wxControl)
 IMPLEMENT_DYNAMIC_CLASS(wxListView, wxListCtrl)
 
+IMPLEMENT_DYNAMIC_CLASS(wxListEvent, wxNotifyEvent)
+
 BEGIN_EVENT_TABLE(wxListCtrl,wxControl)
   EVT_SIZE(wxListCtrl::OnSize)
   EVT_IDLE(wxListCtrl::OnIdle)