1 <?xml version=
"1.0" encoding=
"ISO-8859-1"?> 
   3 <resource xmlns=
"http://www.wxwindows.org/wxxrc" version=
"2.3.0.1"> 
   5 <object class=
"wxDialog" name=
"platform_property_dialog"> 
   6     <title>Platform Property Example
</title> 
   8     <object class=
"wxFlexGridSizer"> 
  13         <growablecols>0</growablecols> 
  14         <growablerows>0</growablerows> 
  15         <object class=
"sizeritem"> 
  16             <flag>wxGROW|wxALIGN_CENTER_VERTICAL|wxALL
</flag> 
  18             <object class=
"wxTextCtrl" name=
"message_textctrl"> 
  20                 <style>wxTE_MULTILINE
</style> 
  21                 <value>You can specify certain nodes of an XRC file to only be used for a certain platform.\n\nTo do this, there is a "platform" property that can be placed in any node [ie inside an opening tag]. The value of the tag can be any combination of the following: mac, win, unix, or os2. Use a | symbol between multiple platforms, for example 
<label 
platform="win|mac"
>\n\nAt runtime, if there is a platform property in the tag, if it matches the current operating system, that node will be included, otherwise it won't.\n\nThe notebook example below shows how you can specify a high level node to only appear on a certain platform: the example here being a page of  preferences that only make sense on a certain platform.\n\nThe second example shows how to replace a single attribute of a control: here the label of a download link. It is also very useful for specifying menu item accelerators keystrokes on the target platform.
</value> 
  24         <object class=
"sizeritem"> 
  25             <flag>wxGROW|wxALIGN_CENTER_VERTICAL|wxALL
</flag> 
  27             <object class=
"wxNotebook" name=
"platform_notebook"> 
  28                 <usenotebooksizer>1</usenotebooksizer> 
  30                 <object class=
"notebookpage"> 
  31                     <label>Shared options
</label> 
  32                     <object class=
"wxPanel" name=
"shared_tab"> 
  33                         <object class=
"wxBoxSizer"> 
  34                             <orient>wxVERTICAL
</orient> 
  35                             <object class=
"sizeritem"> 
  36                                 <flag>wxALIGN_CENTRE|wxALL
</flag> 
  38                                 <object class=
"wxCheckBox" name=
"shared_checkbox"> 
  39                                     <label>This preference is for all operating systems
</label> 
  45                 <object platform=
"mac" class=
"notebookpage"> 
  46                     <label>Macintosh options
</label> 
  47                     <object class=
"wxPanel" name=
"mac_specific"> 
  48                         <object class=
"wxBoxSizer"> 
  49                             <orient>wxVERTICAL
</orient> 
  50                             <object class=
"sizeritem"> 
  51                                 <flag>wxALIGN_CENTRE|wxALL
</flag> 
  53                                 <object class=
"wxCheckBox" name=
"mac_checkbox"> 
  54                                     <label>Save output in iMovie compatible format
</label> 
  60                 <object platform=
"win" class=
"notebookpage"> 
  61                     <label>Windows options
</label> 
  62                     <object class=
"wxPanel" name=
"win_specific"> 
  63                         <object class=
"wxBoxSizer"> 
  64                             <orient>wxVERTICAL
</orient> 
  65                             <object class=
"sizeritem"> 
  66                                 <flag>wxALIGN_CENTRE|wxALL
</flag> 
  68                                 <object class=
"wxCheckBox" name=
"win_checkbox"> 
  69                                     <label>Show application in icon tray instead of taskbar
</label> 
  75                 <object platform=
"unix" class=
"notebookpage"> 
  76                     <label>Linux options
</label> 
  77                     <object class=
"wxPanel" name=
"unix_specific"> 
  78                         <object class=
"wxBoxSizer"> 
  79                             <orient>wxVERTICAL
</orient> 
  80                             <object class=
"sizeritem"> 
  81                                 <flag>wxALIGN_CENTRE|wxALL
</flag> 
  83                                 <object class=
"wxCheckBox" name=
"unix_checkbox"> 
  84                                     <label>Check my home directory for previous files
</label> 
  90                 <object platform=
"os2" class=
"notebookpage"> 
  91                     <label>OS2 options
</label> 
  92                     <object class=
"wxPanel" name=
"os2_specific"> 
  93                         <object class=
"wxBoxSizer"> 
  94                             <orient>wxVERTICAL
</orient> 
  95                             <object class=
"sizeritem"> 
  96                                 <flag>wxALIGN_CENTRE|wxALL
</flag> 
  98                                 <object class=
"wxCheckBox" name=
"os2_checkbox"> 
  99                                     <label>Use WarpIn installer
</label> 
 107         <object platform=
"mac" class=
"sizeritem"> 
 108             <flag>wxALIGN_CENTRE|wxALL
</flag> 
 110             <object class=
"wxStaticText" name=
"download_mac_statictext"> 
 111                 <label>Get latest update at www.mycompany.com/download/mac
</label> 
 114         <object platform=
"win" class=
"sizeritem">  
 115             <flag>wxALIGN_CENTRE|wxALL
</flag> 
 117             <object class=
"wxStaticText" name=
"download_win_statictext"> 
 118                 <label>Get latest update at www.mycompany.com/download/win
</label> 
 121         <object platform=
"unix" class=
"sizeritem"> 
 122             <flag>wxALIGN_CENTRE|wxALL
</flag> 
 124             <object class=
"wxStaticText" name=
"download_unix_statictext"> 
 125                 <label>Get latest update at www.mycompany.com/download/unix
</label> 
 128         <object platform=
"os2kurva" class=
"sizeritem"> 
 129             <flag>wxALIGN_CENTRE|wxALL
</flag> 
 131             <object class=
"wxStaticText" name=
"download_os2_statictext"> 
 132                 <label>Get latest update at www.mycompany.com/download/os2
</label> 
 135         <object class=
"sizeritem"> 
 136             <flag>wxALIGN_CENTRE|wxALL
</flag> 
 138             <object class=
"wxButton" name=
"wxID_OK">