Something like this should be nicely pluggable:
LowEntryBarrierPlugin::OnAppFinishedLoading()
{
// this is some hefty pseudo-code, but you get the idea :-)
for(filename, patchedfilename in all_xrc_files_to_replace)
{
wxXmlResource::Get()->UnLoad(_T("memory:") + filename );
wxXmlResource::Get()->Load(patchedfilename);
}
}
It first unloads the resouces loaded by the application, and then loads the patched versions instead. Not the most efficient thing to do, but it should work seamlessly.
Please do note that you absolutely need the memory: prefix for unloading, since we do batch loading on the resources for performance reasons (especially over NFS) and let the XRC functions solely read from a memory stream.