Factor out platform detection from XRC code into wxPlatformId

This will allow reusing the same strings in other places.

Also use this as opportunity to add "msw" as the (preferred) synonym for
"win" for general consistency.
This commit is contained in:
Vadim Zeitlin
2021-02-02 17:03:20 +01:00
parent da45f88c53
commit 8293dcedef
4 changed files with 79 additions and 13 deletions

View File

@@ -2674,14 +2674,15 @@ should be processed on. It is filtered out and ignored on any other platforms.
Possible elemental values are:
@beginDefList
@itemdef{ @c win, Windows }
@itemdef{ @c mac, macOS (or Mac Classic in wxWidgets version supporting it) }
@itemdef{ @c msw, Windows, preferred platform name }
@itemdef{ @c win, Windows, alternative synonym }
@itemdef{ @c mac, macOS or iOS }
@itemdef{ @c unix, Any Unix platform @em except macOS }
@endDefList
Examples:
@code
<label platform="win">Windows</label>
<label platform="msw">Windows</label>
<label platform="unix">Unix</label>
<label platform="mac">macOS</label>
<help platform="mac|unix">Not a Windows machine</help>