]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/listctrl.cpp
Win16 compilation fixes
[wxWidgets.git] / src / msw / listctrl.cpp
index b521e1c58358764b6b210a821c4030c1c7d001cc..8f09f1fcb3b7a6d03b8b1e8933f1a481f735222a 100644 (file)
@@ -61,13 +61,48 @@ static void wxConvertFromMSWListItem(const wxListCtrl *ctrl, wxListItem& info, L
 // macros
 // ----------------------------------------------------------------------------
 
-    IMPLEMENT_DYNAMIC_CLASS(wxListCtrl, wxControl)
-    IMPLEMENT_DYNAMIC_CLASS(wxListItem, wxObject)
+IMPLEMENT_DYNAMIC_CLASS(wxListCtrl, wxControl)
+IMPLEMENT_DYNAMIC_CLASS(wxListItem, wxObject)
 
 // ============================================================================
 // implementation
 // ============================================================================
 
+// ----------------------------------------------------------------------------
+// wxListEvent
+// ----------------------------------------------------------------------------
+
+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());
+        obj->m_item.SetBackgroundColour(m_item.GetBackgroundColour());
+        obj->m_item.SetFont(m_item.GetFont());
+    }
+}
+
 // ----------------------------------------------------------------------------
 // wxListCtrl construction
 // ----------------------------------------------------------------------------