]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/object.cpp
1. wxWindow::IsTopLevel() added and documented
[wxWidgets.git] / src / common / object.cpp
index 5b6593668930e0f7dbce8a482c3407591f5421d7..dbc9d46ef41a7b4159ca34cdbe249e804c5e6ca9 100644 (file)
@@ -89,7 +89,14 @@ bool wxObject::IsKindOf(wxClassInfo *info) const
 
 wxObject *wxObject::Clone() const
 {
-    return GetClassInfo()->CreateObject();
+    wxObject *object = GetClassInfo()->CreateObject();
+    CopyObject(*object);
+    return object;
+}
+
+void wxObject::CopyObject(wxObject& object_dest) const
+{
+    wxASSERT(object_dest.GetClassInfo()->IsKindOf(GetClassInfo()));
 }
 
 #if defined(__WXDEBUG__) || wxUSE_DEBUG_CONTEXT