This repository has been archived on 2024-12-16. You can view files and clone it, but cannot push or open issues or pull requests.
cb-legacy-dev/installers/wizard/wxwidgets/wxsmith/resource_s.wxs

143 lines
9.6 KiB
Plaintext
Raw Normal View History

2023-11-18 16:56:10 +00:00
<?xml version="1.0" encoding="utf-8" ?>
<wxsmith>
[IF WXDIALOG]<object class="wxDialog" name="[CLASS_PREFIX]Dialog">
<title>wxWidgets app</title>
<object class="wxBoxSizer" variable="BoxSizer1" member="yes">
<object class="sizeritem">
<object class="wxStaticText" name="ID_STATICTEXT1" variable="StaticText1" member="yes">
<label>Welcome to&#x0A;wxWidgets</label>
<font>
<size>20</size>
<sysfont>wxSYS_DEFAULT_GUI_FONT</sysfont>
</font>
</object>
<flag>wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL</flag>
<border>10</border>
<option>1</option>
</object>
<object class="sizeritem">
<object class="wxBoxSizer" variable="BoxSizer2" member="yes">
<orient>wxVERTICAL</orient>
<object class="sizeritem">
<object class="wxButton" name="ID_BUTTON1" variable="Button1" member="yes">
<label>About</label>
<handler function="OnAbout" entry="EVT_BUTTON" />
</object>
<flag>wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL</flag>
<border>4</border>
<option>1</option>
</object>
<object class="sizeritem">
<object class="wxStaticLine" name="ID_STATICLINE1" variable="StaticLine1" member="yes">
<size>10,-1</size>
</object>
<flag>wxALL|wxEXPAND|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL</flag>
<border>4</border>
</object>
<object class="sizeritem">
<object class="wxButton" name="ID_BUTTON2" variable="Button2" member="yes">
<label>Quit</label>
<handler function="OnQuit" entry="EVT_BUTTON" />
</object>
<flag>wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL</flag>
<border>4</border>
<option>1</option>
</object>
</object>
<flag>wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL</flag>
<border>4</border>
</object>
</object>
</object>[ENDIF WXDIALOG][IF WXFRAME]<object class="wxFrame" name="[CLASS_PREFIX]Frame">
<bg>wxSYS_COLOUR_BTNFACE</bg>
<minsize>200,200</minsize>
<extra_code>// This code will set a smaller font if Win 3.11 is detected:&#x0A;int majorVer; int minorVer;&#x0A;wxGetOsVersion(&amp;majorVer, &amp;minorVer);&#x0A;if (minorVer == 30 || majorVer == 30 || majorVer == 3)&#x0A;{&#x0A; wxFont thisFont(8,wxFONTFAMILY__DEFAULT,wxFONTSTYLE__NORMAL,wxFONTWEIGHT__NORMAL,false,wxEmptyString,wxFONTENCODING__DEFAULT);&#x0A; SetFont(thisFont);&#x0A;}</extra_code>
<id_arg>0</id_arg>
<style>wxDEFAULT_FRAME_STYLE|wxFULL_REPAINT_ON_RESIZE</style>
<object class="wxBoxSizer" variable="BoxSizer1" member="no">
<object class="sizeritem">
<object class="wxPanel" name="ID_PANEL1" variable="Panel1" member="yes">
<size>286,334</size>
<object class="wxBoxSizer" variable="BoxSizer2" member="no">
<orient>wxVERTICAL</orient>
<object class="sizeritem">
<object class="wxNotebook" name="ID_NOTEBOOK1" variable="Notebook1" member="yes">
<object class="notebookpage">
<object class="wxPanel" name="ID_PANEL3" variable="Panel3" member="yes">
<object class="wxBoxSizer" variable="BoxSizer4" member="no">
<object class="sizeritem">
<object class="wxTextCtrl" name="ID_TEXTCTRL2" variable="TextCtrl2" member="yes">
<value>How to create a scalable window with working sizers:&#x0A;&#x0A;A wxBoxSizer (BoxSizer1) is placed as the first element on the wxFrame.&#x0A;&#x0A;Then, a wxPanel (Panel1) is placed onto the sizer. &quot;Expand&quot; is selected, &quot;Border width&quot; is set to 0. The panel will fill the entire sizer. The panel size can be increased by dragging the corner, or typing &quot;Width&quot; and &quot;Height&quot; parameters. A minimum size can be forced by unchecking &quot;Default Min size&quot; and specifying the size.&#x0A;&#x0A;BoxSizer2 is placed onto the Panel1. Option wxVERTICAL is selected. Then, a wxNotebook (Notebook1) and Panel2 are placed onto the BoxSizer2. Option &quot;Expand&quot; is selected for both the Panel2 and Notebook1. Now each of these elements will take half of the space in the window and they will be arranged vertically.&#x0A;&#x0A;BoxSizer3 is added onto the Panel2. Orientation wxHORIZONTAL is selected. Then a wxTextCtrl (TextCtrl1) and wxButton (Button1) is placed onto BoxSizer3. Now the text control and the button will be arranged horizontally and will take half of the panel space. They will not use the entire height of the panel, because &quot;Expand&quot; property is not selected.&#x0A;&#x0A;Button1 can be made smaller by setting &quot;Proportion&quot; property to 0. Now the button will have the default size and will not be scaled. TextCtrl1 has &quot;Proportion&quot; set to 1 and it will take entire available horizontal space. &#x0A;&#x0A;&quot;Proportion&quot; is set to 0 for Panel2. Now the panel will be shrunk vertically and will have the same height as the button and the text control.&#x0A;&#x0A;A new page is added into Notebook1 by clicking right mouse button - Add New Page. Panel3 is created automatically.&#x0A;&#x0A;BoxSizer4 is added onto Panel3. &#x0A;&#x0A;TextCtrl2 is added onto BoxSizer4. &quot;Expand&quot; property is checked. Now the text box will fill the entire page of the wxNotebook. Style wxTE__MULTILINE is selected to enable multiline text.&#x0A;&#x0A;NOTES FOR WIN 3.11 COMPATIBILITY:&#x0A;===============================&#x0A;wxBORDER__SIMPLE style needs to be applied to text controls, otherwise there will be no border visible.&#x0A;&#x0A;Also, Font type: Custom font, Size: 8 may be selected to have smaller fonts under Win 3.11. This can be changed globally, by editing the &quot;Font&quot; property for entire wxFrame.&#x0A;OR, if you want the proper font to be determined on the runtime, then don&apos;t change the &quot;Font&quot; property manually, instead add the following code into &quot;Extra code&quot; property of the wxFrame:&#x0A;// This code will set a smaller font if Win 3.11 is detected:&#x0A;int majorVer; int minorVer;&#x0A;wxGetOsVersion(&amp;majorVer, &amp;minorVer);&#x0A;if (minorVer == 30 || majorVer == 30 || majorVer == 3)&#x0A;{&#x0A; wxFont thisFont(8,wxFONTFAMILY__DEFAULT,wxFONTSTYLE__NORMAL,wxFONTWEIGHT__NORMAL,false,wxEmptyString,wxFONTENCODING__DEFAULT);&#x0A; SetFont(thisFont);&#x0A;}&#x0A;&#x0A;The &quot;Background&quot; of the wxFrame can be also changed to &quot;Face of button&quot; for better color consistency.&#x0A;&#x0A;Also, wxFULL__REPAINT__ON__RESIZE style has been checked on wxFrame to fix incomplete window refresh after resizing under Win 3.11.</value>
<style>wxTE_MULTILINE|wxBORDER_SIMPLE</style>
</object>
<flag>wxALL|wxEXPAND</flag>
<border>5</border>
<option>1</option>
</object>
</object>
</object>
<label>Info</label>
</object>
</object>
<flag>wxALL|wxEXPAND</flag>
<border>5</border>
<option>1</option>
</object>
<object class="sizeritem">
<object class="wxPanel" name="ID_PANEL2" variable="Panel2" member="yes">
<object class="wxBoxSizer" variable="BoxSizer3" member="no">
<object class="sizeritem">
<object class="wxTextCtrl" name="ID_TEXTCTRL1" variable="TextCtrl1" member="yes">
<value>Click the button to popup this message</value>
<style>wxBORDER_SIMPLE</style>
</object>
<flag>wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL</flag>
<border>5</border>
<option>1</option>
</object>
<object class="sizeritem">
<object class="wxButton" name="ID_BUTTON1" variable="Button1" member="yes">
<label>Button</label>
<handler function="OnButton1Click" entry="EVT_BUTTON" />
</object>
<flag>wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL</flag>
<border>5</border>
</object>
</object>
</object>
<flag>wxALL|wxEXPAND</flag>
</object>
</object>
</object>
<flag>wxALL|wxEXPAND</flag>
<option>1</option>
</object>
</object>
<object class="wxMenuBar" variable="MenuBar1" member="no">
<object class="wxMenu" variable="Menu1" member="no">
<label>&amp;File</label>
<object class="wxMenuItem" name="idMenuQuit" variable="MenuItem1" member="no">
<label>Quit</label>
<accel>Alt-F4</accel>
<help>Quit the application</help>
<handler function="OnQuit" entry="EVT_MENU" />
</object>
</object>
<object class="wxMenu" variable="Menu2" member="no">
<label>Help</label>
<object class="wxMenuItem" name="idMenuAbout" variable="MenuItem2" member="no">
<label>About</label>
<accel>F1</accel>
<help>Show info about this application</help>
<handler function="OnAbout" entry="EVT_MENU" />
</object>
</object>
</object>
<object class="wxStatusBar" name="ID_STATUSBAR1" variable="StatusBar1" member="yes">
<fields>1</fields>
<widths>-1</widths>
<styles>wxSB_NORMAL</styles>
</object>
</object>[ENDIF WXFRAME]
</wxsmith>