To demonstrate the beauty of XRC, here's an alternate version:
<?xml version="1.0" ?>
<resource>
<object class="wxPanel" name="regexLabPanel">
<size>450,350</size>
<style>wxNO_BORDER</style>
<exstyle>wxWS_EX_VALIDATE_RECURSIVELY</exstyle>
<object class="wxBoxSizer">
<orient>wxHORIZONTAL</orient>
<object class="sizeritem">
<object class="wxStaticBoxSizer">
<label>Flags</label>
<orient>wxVERTICAL</orient>
<object class="sizeritem">
<object class="wxBoxSizer">
<orient>wxVERTICAL</orient>
<object class="sizeritem">
<object class="wxCheckBox" name="gCheckbox">
<label>g</label>
<checked>0</checked>
<style>wxNO_BORDER</style>
<tooltip>g - match globally</tooltip>
</object>
<option>0</option>
<flag>wxALIGN_CENTRE|wxALL</flag>
<border>5</border>
</object>
<object class="sizeritem">
<object class="wxCheckBox" name="iCheckbox">
<label>i</label>
<checked>0</checked>
<style>wxNO_BORDER</style>
<tooltip>i - Do case-insensitive pattern matching.</
+tooltip>
</object>
<option>1</option>
<flag>wxALIGN_CENTRE|wxALL</flag>
</object>
<object class="sizeritem">
<object class="wxCheckBox" name="mCheckbox">
<label>m</label>
<checked>0</checked>
<style>wxNO_BORDER</style>
<tooltip>m - Treat string as multiple lines.</toolti
+p>
</object>
<option>0</option>
<flag>wxALIGN_CENTRE|wxALL</flag>
<border>5</border>
</object>
<object class="sizeritem">
<object class="wxCheckBox" name="eCheckbox">
<label>e</label>
<checked>0</checked>
<style>wxNO_BORDER</style>
<enabled>0</enabled>
<tooltip>e - Evaluate the right side as an expressio
+n.</tooltip>
</object>
<option>0</option>
<flag>wxALIGN_CENTRE|wxALL</flag>
<border>5</border>
</object>
<object class="sizeritem">
<object class="wxCheckBox" name="sCheckbox">
<label>s</label>
<checked>0</checked>
<style>wxNO_BORDER</style>
<tooltip>s - Treat string as single line</tooltip>
</object>
<option>0</option>
<flag>wxALIGN_CENTRE|wxALL</flag>
<border>5</border>
</object>
<object class="sizeritem">
<object class="wxCheckBox" name="xCheckbox">
<label>x</label>
<checked>0</checked>
<style>wxNO_BORDER</style>
<tooltip>x - Permit whitespace and comments.</toolti
+p>
</object>
<option>0</option>
<flag>wxALIGN_CENTRE|wxALL</flag>
<border>5</border>
</object>
<object class="sizeritem">
<object class="wxCheckBox" name="explainCheckbox">
<label>Explain</label>
<checked>0</checked>
<style>wxNO_BORDER</style>
<enabled>0</enabled>
<tooltip>use YAPE::Regex::Explain to explain the reg
+ex.</tooltip>
</object>
<option>0</option>
<flag>wxALIGN_CENTRE|wxALL</flag>
<border>5</border>
</object>
</object>
<option>0</option>
<flag>wxEXPAND|wxGROW|wxALIGN_CENTRE</flag>
</object>
<object class="sizeritem">
<object class="wxBoxSizer">
<orient>wxVERTICAL</orient>
<object class="sizeritem">
<object class="wxButton" name="testButton">
<label>Test Regex</label>
<default>1</default>
<enabled>1</enabled>
<focused>1</focused>
<hidden>0</hidden>
<tooltip>eval that code\ntest your *hypothesis* ;)</
+tooltip>
</object>
<flag>wxALIGN_RIGHT|wxALIGN_CENTRE_VERTICAL</flag>
</object>
</object>
<option>1</option>
<flag>wxGROW|wxALIGN_RIGHT</flag>
</object>
</object>
<option>0</option>
<flag>wxTOP|wxBOTTOM|wxALL|wxEXPAND|wxALIGN_CENTRE</flag>
<border>5</border>
</object>
<object class="sizeritem">
<object class="wxBoxSizer">
<orient>wxVERTICAL</orient>
<object class="sizeritem">
<object class="wxStaticBoxSizer">
<label>Regex String</label>
<orient>wxHORIZONTAL</orient>
<object class="sizeritem">
<object class="wxTextCtrl" name="regexString">
<value>\b([b-df-hj-np-tv-z])(\w+)</value>
<size>100,50</size>
<style>wxTE_MULTILINE|wxNO_BORDER</style>
<tooltip>Insert regular expression pattern here</too
+ltip>
</object>
<option>1</option>
<flag>wxEXPAND|wxGROW</flag>
</object>
</object>
<option>0</option>
<flag>wxTOP|wxEXPAND</flag>
<border>5</border>
</object>
<object class="sizeritem">
<object class="wxCheckBox" name="replacementCheckbox">
<label>Make mine a replacement</label>
<checked>0</checked>
<style>wxNO_BORDER</style>
<tooltip>make mine a substitution (s///)</tooltip>
</object>
<option>0</option>
<flag>wxALL|wxEXPAND</flag>
<border>5</border>
</object>
<object class="sizeritem">
<object class="wxStaticBoxSizer">
<label>Replacement String</label>
<orient>wxHORIZONTAL</orient>
<object class="sizeritem">
<object class="wxTextCtrl" name="replacementString">
<size>100,50</size>
<style>wxTE_MULTILINE|wxNO_BORDER</style>
<tooltip>s{pattern}{stuff you enter here goes here}<
+/tooltip>
</object>
<option>1</option>
<flag>wxEXPAND|wxGROW</flag>
</object>
</object>
<option>0</option>
<flag>wxEXPAND</flag>
</object>
<object class="sizeritem">
<object class="wxStaticBoxSizer">
<label>Test String</label>
<orient>wxVERTICAL</orient>
<object class="sizeritem">
<object class="wxTextCtrl" name="testString">
<value>hello world!</value>
<size>100,50</size>
<style>wxTE_MULTILINE|wxNO_BORDER</style>
<tooltip>string to operate on goes here</tooltip>
</object>
<option>1</option>
<flag>wxEXPAND|wxGROW</flag>
</object>
</object>
<option>0</option>
<flag>wxTOP|wxBOTTOM|wxEXPAND</flag>
<border>5</border>
</object>
<object class="sizeritem">
<object class="wxStaticBoxSizer">
<label>Pretty Html Output</label>
<orient>wxHORIZONTAL</orient>
<object class="sizeritem">
<object class="wxHtmlWindow" name="htmlOut">
<size>-1,100</size>
<tooltip>This is where the explanation goes</tooltip
+>
</object>
<option>1</option>
<flag>wxEXPAND|wxGROW|wxALIGN_CENTRE</flag>
</object>
</object>
<option>1</option>
<flag>wxEXPAND</flag>
<border>0</border>
</object>
</object>
<option>1</option>
<flag>wxEXPAND</flag>
</object>
</object>
</object>
</resource>
MJD says you
can't just make shit up and expect the computer to know what you mean, retardo!
** The Third rule of perl club is a statement of fact: pod is sexy.
|