18 wxBoxSizer* mainSizer =
new wxBoxSizer( wxVERTICAL );
20 m_label =
new wxStaticText(
this, wxID_ANY, label );
21 mainSizer->Add(
m_label, 0, wxALL, 5 );
25 wxArrayString choices;
26 choices.Add(
_(
"Any" ) );
27 choices.Add(
_(
"Net" ) );
28 choices.Add(
_(
"Netclass" ) );
29 choices.Add(
_(
"Within Area" ) );
30 choices.Add(
_(
"Custom Query" ) );
32 m_choice =
new wxChoice(
this, wxID_ANY, wxDefaultPosition, wxDefaultSize, choices );
53 SetSizer( mainSizer );
112 wxString expr = aExpr;
125 wxString prefix = aPrefix;
126 if( !prefix.IsEmpty() && expr.StartsWith( prefix +
"." ) )
127 expr = expr.Mid( prefix.Length() + 1 );
129 wxRegEx netRe( wxT(
"^NetName\\s*==\\s*'([^']*)'" ) );
130 wxRegEx netclassRe1( wxT(
"^hasNetclass\\('([^']*)'\\)" ) );
131 wxRegEx netclassRe2( wxT(
"^NetClass\\s*==\\s*'([^']*)'" ) );
132 wxRegEx areaRe( wxT(
"^(?:enclosedByArea|intersectsArea)\\('([^']*)'\\)" ) );
134 if( netRe.Matches( expr ) )
141 else if( netclassRe1.Matches( expr ) )
148 else if( netclassRe2.Matches( expr ) )
155 else if( areaRe.Matches( expr ) )
172 wxString prefix = aPrefix;
178 return wxEmptyString;
179 return prefix + wxString::Format(
".NetName == '%s'",
m_netSelector->GetSelectedNetname() );
183 return wxEmptyString;
184 return prefix + wxString::Format(
".hasNetclass('%s')",
m_netclassSelector->GetSelectedNetclass() );
188 return wxEmptyString;
189 return prefix + wxString::Format(
".enclosedByArea('%s')",
m_areaSelector->GetSelectedArea() );
195 return wxEmptyString;
197 default:
return wxEmptyString;