XML-based resource system overview
Classes: wxXmlResource, wxXmlResourceHandler
The XML-based resource system, known as XRC, allows user interface elements such as
dialogs, menu bars and toolbars, to be stored in text files and loaded into
the application at run-time. XRC files can also be compiled into binary XRS files or C++
code (the former makes it possible to store all resources in a single file and the latter
is useful when you want to embed the resources into the executable).
There are several advantages to using XRC resources.
- Recompiling and linking an application is not necessary if the
- If you use a dialog designer that generates C++ code, it can be hard
to reintegrate this into existing C++ code. Separation of resources and code
is a more elegant solution.
- You can choose between different alternative resource files at run time, if necessary.
- The XRC format uses sizers for flexibility, allowing dialogs to be resizable
and highly portable.
- The XRC format is a wxWidgets standard,
and can be generated or postprocessed by any program that understands it. As it is based
on the XML standard, existing XML editors can be used for simple editing purposes.
XRC was written by Vaclav Slavik.