]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/persist.h
Add wxDataViewCtrl::{Set,Get}CurrentItem().
[wxWidgets.git] / include / wx / persist.h
index a46935fd90c17b6a6407fee24e3d1bafd7885d52..68097fbcbeeb3f1698e650a61017ae417a1daddb 100644 (file)
@@ -239,5 +239,15 @@ inline bool wxPersistentRegisterAndRestore(T *obj)
 
 }
 
+// A helper function which also sets the name for the (wxWindow-derived) object
+// before registering and restoring it.
+template <typename T>
+inline bool wxPersistentRegisterAndRestore(T *obj, const wxString& name)
+{
+    obj->SetName(name);
+
+    return wxPersistentRegisterAndRestore(obj);
+}
+
 #endif // _WX_PERSIST_H_