Allow expanding environment variables in XRC file paths

Add a new flag wxXRC_USE_ENVVARS for wxXmlResourceFlags that triggers a
call to wxExpandEnvVars() for bitmap, icon and animation paths.

This flag is not set by default to avoid silently changing the behaviour
of existing applications.

Closes https://github.com/wxWidgets/wxWidgets/pull/1445
This commit is contained in:
ousnius
2019-07-28 13:36:19 +02:00
committed by Vadim Zeitlin
parent cd2e3dd2cf
commit 2a2fa8c5af
6 changed files with 55 additions and 6 deletions

View File

@@ -352,6 +352,9 @@ wxFileSystem URL) of the bitmap to use. For example:
The value is interpreted as path relative to the location of XRC file where the
reference occurs.
Bitmap file paths can include environment variables that are expanded if
wxXRC_USE_ENVVARS was passed to the wxXmlResource constructor.
Alternatively, it is possible to specify the bitmap using wxArtProvider IDs.
In this case, the property element has no textual value (filename) and instead
has the @c stock_id XML attribute that contains stock art ID as accepted by