41 [
this]( wxKeyEvent& aEvent )
43 wxPostEvent(
this, wxCommandEvent( wxEVT_COMMAND_BUTTON_CLICKED, wxID_OK ) );
47 [
this]( wxStyledTextEvent& aEvent )
51 [](
const wxString& xRef, wxArrayString* tokens )
114 wxRegEx re(
".*?(\\$\\{(.+?)\\})|(\\$\\((.+?)\\)).*?", wxRE_ADVANCED );
115 wxASSERT( re.IsValid() );
117 std::set<wxString> unique;
123 while( re.Matches( src ) )
125 wxString envvar = re.GetMatch( src, 2 );
128 if( envvar.IsEmpty() )
129 envvar = re.GetMatch( src, 4 );
132 unique.insert( envvar );
135 src.Replace( re.GetMatch( src, 0 ), wxEmptyString );
142 for(
const wxString& evName : unique )
147 m_path_subs_grid->SetCellValue( row, 0, wxT(
"${" ) + evName + wxT(
"}" ) );
154 evValue =
_(
"<value set at runtime>" );
159 wxGetEnv( evName, &evValue );
wxCheckBox * m_cbRecordOutput
wxCheckBox * m_cbIgnoreExitCode
WX_GRID * m_path_subs_grid
DIALOG_EXECUTECOMMAND_JOB_SETTINGS_BASE(wxWindow *parent, wxWindowID id=wxID_ANY, const wxString &title=_("Execute Command Job Settings"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(-1,-1), long style=wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER)
wxStyledTextCtrl * m_textCtrlCommand
wxTextCtrl * m_textCtrlOutputPath
SCINTILLA_TRICKS * m_scintillaTricks
JOB_SPECIAL_EXECUTE * m_job
~DIALOG_EXECUTECOMMAND_JOB_SETTINGS()
bool TransferDataToWindow() override
void populateEnvironReadOnlyTable()
Populate the readonly environment variable table with names and values by examining the script and pa...
bool TransferDataFromWindow() override
void onSizeGrid(wxSizeEvent &event) override
void adjustPathSubsGridColumns(int aWidth)
DIALOG_EXECUTECOMMAND_JOB_SETTINGS(wxWindow *aParent, JOB_SPECIAL_EXECUTE *aJob)
void OnRecordOutputClicked(wxCommandEvent &event) override
void SetupStandardButtons(std::map< int, wxString > aLabels={})
void finishDialogSettings()
In all dialogs, we must call the same functions to fix minimal dlg size, the default position and per...
Add mouse and command handling (such as cut, copy, and paste) to a WX_GRID instance.
Add cut/copy/paste, dark theme, autocomplete and brace highlighting to a wxStyleTextCtrl instance.
Functions related to environment variables, including help functions.
#define OUTPUT_TMP_PATH_VAR_NAME
KICOMMON_API void GetEnvVarAutocompleteTokens(wxArrayString *aVars)
Return autocomplete tokens for environment variables for Scintilla.
#define PROJECT_VAR_NAME
A variable name whose value holds the current project directory.