152 return wxEmptyString;
157 code = wxS(
"allowed_orientation" );
163 clause = wxString::Format( wxS(
"(constraint %s (any true))" ), code );
167 wxArrayString angles;
170 angles.Add( wxS(
"0" ) );
172 angles.Add( wxS(
"90" ) );
174 angles.Add( wxS(
"180" ) );
176 angles.Add( wxS(
"270" ) );
178 if( angles.IsEmpty() )
179 clause = wxString::Format( wxS(
"(constraint %s (angles none))" ), code );
181 clause = wxString::Format( wxS(
"(constraint %s (angles %s))" ), code,
182 wxJoin( angles,
' ' ) );
185 wxLogTrace( wxS(
"KI_TRACE_DRC_RULE_EDITOR" ), wxS(
"Allowed orientation clause: %s" ), clause );
187 return buildRule( aContext, { clause } );
wxString buildRule(const RULE_GENERATION_CONTEXT &aContext, const std::vector< wxString > &aConstraintClauses) const
wxStaticBitmap * GetConstraintImage(wxPanel *aParent, BITMAPS aBitMap)
wxString result
Test unit parsing edge cases and error handling.