35 m_scintillaTricks( nullptr )
39 [
this]( wxKeyEvent& aEvent )
41 wxPostEvent(
this, wxCommandEvent( wxEVT_COMMAND_BUTTON_CLICKED, wxID_OK ) );
45 [
this]( wxStyledTextEvent& aEvent )
49 [](
const wxString& xRef, wxArrayString* tokens )
111 wxRegEx re(
".*?(\\$\\{(.+?)\\})|(\\$\\((.+?)\\)).*?", wxRE_ADVANCED );
112 wxASSERT( re.IsValid() );
114 std::set<wxString> unique;
120 while( re.Matches( src ) )
122 wxString envvar = re.GetMatch( src, 2 );
125 if( envvar.IsEmpty() )
126 envvar = re.GetMatch( src, 4 );
129 unique.insert( envvar );
132 src.Replace( re.GetMatch( src, 0 ), wxEmptyString );
139 for(
const wxString& evName : unique )
144 m_path_subs_grid->SetCellValue( row, 0, wxT(
"${" ) + evName + wxT(
"}" ) );
151 evValue =
_(
"<value set at runtime>" );
156 wxGetEnv( evName, &evValue );
Class DIALOG_EXECUTECOMMAND_JOB_SETTINGS_BASE.
wxCheckBox * m_cbRecordOutput
wxCheckBox * m_cbIgnoreExitCode
WX_GRID * m_path_subs_grid
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.
void SetConfiguredOutputPath(const wxString &aPath)
Sets the configured output path for the job, this path is always saved to file.
wxString GetConfiguredOutputPath() const
Returns the configured output path for the job.
Add cut/copy/paste, dark theme, autocomplete and brace highlighting to a wxStyleTextCtrl instance.
void DoTextVarAutocomplete(const std::function< void(const wxString &xRef, wxArrayString *tokens)> &getTokensFn)
void ClearRows()
wxWidgets recently added an ASSERT which fires if the position is greater than or equal to the number...
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.