38 : m_pProject(project),
43 XRCCTRL(*
this,
"wxID_CANCEL",
wxButton)->SetDefault();
58 for (
unsigned int i = 0; i < array.
GetCount(); ++i)
60 lst->Append(array[i]);
69 for (
unsigned int i = 0; i < array.
GetCount(); ++i)
71 lst->Append(array[i]);
79 for (
unsigned int i = 0; i < (
unsigned int)lst->GetCount(); ++i)
81 deps << lst->GetString(i) <<
_T(
';');
86 lst = XRCCTRL(*
this,
"lstAdditionalFiles",
wxListBox);
87 for (
unsigned int i = 0; i < (
unsigned int)lst->GetCount(); ++i)
89 files << lst->GetString(i) <<
_T(
';');
97 #define DoAdd(listbox,message) \ 99 wxListBox* lst = XRCCTRL(*this, listbox, wxListBox); \ 100 EditPathDlg dlg(this, \ 101 m_pProject->GetBasePath(), \ 102 m_pProject->GetBasePath(), \ 107 if (dlg.ShowModal() == wxID_OK) \ 108 lst->Append(dlg.GetPath()); \ 112 #define DoEdit(listbox,message) \ 114 wxListBox* lst = XRCCTRL(*this, listbox, wxListBox); \ 115 int sel = lst->GetSelection(); \ 118 EditPathDlg dlg(this, \ 119 lst->GetStringSelection(), \ 120 m_pProject->GetBasePath(), \ 125 if (dlg.ShowModal() == wxID_OK) \ 126 lst->SetString(sel, dlg.GetPath()); \ 130 #define DoDel(listbox) \ 132 wxListBox* lst = XRCCTRL(*this, listbox, wxListBox); \ 133 int sel = lst->GetSelection(); \ 136 if (cbMessageBox(_("Are you sure you want to remove this file?"), _("Remove file"), wxYES_NO | wxNO_DEFAULT, this) == wxID_NO) \ 143 DoAdd(
"lstAdditionalFiles",
_(
"Add additional output file"));
148 DoEdit(
"lstAdditionalFiles",
_(
"Edit additional output file"));
153 DoDel(
"lstAdditionalFiles");
158 DoAdd(
"lstExternalFiles",
_(
"Add external dependency file"));
163 DoEdit(
"lstExternalFiles",
_(
"Edit external dependency file"));
168 DoDel(
"lstExternalFiles");
173 int selAdd = XRCCTRL(*
this,
"lstAdditionalFiles",
wxListBox)->GetSelection();
174 int selExt = XRCCTRL(*
this,
"lstExternalFiles",
wxListBox)->GetSelection();
176 XRCCTRL(*
this,
"btnEditAdditional",
wxButton)->Enable(selAdd != -1);
177 XRCCTRL(*
this,
"btnDelAdditional",
wxButton)->Enable(selAdd != -1);
178 XRCCTRL(*
this,
"btnEditExternal",
wxButton)->Enable(selExt != -1);
179 XRCCTRL(*
this,
"btnDelExternal",
wxButton)->Enable(selExt != -1);
DLLIMPORT wxArrayString GetArrayFromString(const wxString &text, const wxString &separator=DEFAULT_ARRAY_SEP, bool trimSpaces=true)
void EndModal(int retCode)
~ExternalDepsDlg() override
void OnAddExternal(wxCommandEvent &event)
virtual const wxString & GetAdditionalOutputFiles() const
void OnEditExternal(wxCommandEvent &event)
virtual const wxString & GetExternalDeps() const
void EndModal(int retCode) override
void OnDelAdditional(wxCommandEvent &event)
Represents a Code::Blocks project.
void OnEditAdditional(wxCommandEvent &event)
virtual void SetExternalDeps(const wxString &deps)
Set a list of all the external files this targets depends on.
void OnDelExternal(wxCommandEvent &event)
const wxString & _(const wxString &string)
void OnAddAdditional(wxCommandEvent &event)
Represents a Code::Blocks project build target.
static wxXmlResource * Get()
#define DoAdd(listbox, message)
void OnUpdateUI(wxUpdateUIEvent &event)
virtual void SetAdditionalOutputFiles(const wxString &files)
Set a list of all additional output files this targets creates, besides its main output.
wxObject * LoadObject(wxWindow *parent, const wxString &name, const wxString &classname)
#define DoEdit(listbox, message)
ProjectBuildTarget * m_pTarget