43 std::vector<DRC_RE_FIELD_POSITION> positions =
m_data->GetFieldPositions();
45 wxWindow* eventSource =
nullptr;
47 for( wxWindow* win = aParent; win; win = win->GetParent() )
58 wxTE_CENTRE | wxTE_PROCESS_ENTER );
60 std::make_unique<UNIT_BINDER>( &
m_unitsProvider, eventSource,
nullptr, minLengthField->GetControl(),
61 minLengthField->GetLabel(),
false,
false );
66 wxTE_CENTRE | wxTE_PROCESS_ENTER );
68 std::make_unique<UNIT_BINDER>( &
m_unitsProvider, eventSource,
nullptr, optLengthField->GetControl(),
69 optLengthField->GetLabel(),
false,
false );
74 wxTE_CENTRE | wxTE_PROCESS_ENTER );
76 std::make_unique<UNIT_BINDER>( &
m_unitsProvider, eventSource,
nullptr, maxLengthField->GetControl(),
77 maxLengthField->GetLabel(),
false,
false );
80 auto notifyModified = [
this]( wxCommandEvent& )
87 minLengthField->GetControl()->Bind( wxEVT_TEXT, notifyModified );
88 optLengthField->GetControl()->Bind( wxEVT_TEXT, notifyModified );
89 maxLengthField->GetControl()->Bind( wxEVT_TEXT, notifyModified );
91 auto notifySave = [
this]( wxCommandEvent& aEvent )
98 minLengthField->GetControl()->Bind( wxEVT_TEXT_ENTER, notifySave );
99 optLengthField->GetControl()->Bind( wxEVT_TEXT_ENTER, notifySave );
100 maxLengthField->GetControl()->Bind( wxEVT_TEXT_ENTER, notifySave );
wxString result
Test unit parsing edge cases and error handling.