38 lstAliases = (
wxListBox*)FindWindow(XRCID(
"ID_LST_ALIASES"));
39 btnAdd = (
wxButton*)FindWindow(XRCID(
"ID_BTN_ADD"));
40 btnEdit = (
wxButton*)FindWindow(XRCID(
"ID_BTN_EDIT"));
41 btnRemove = (
wxButton*)FindWindow(XRCID(
"ID_BTN_REMOVE"));
50 XRCCTRL(*
this,
"wxID_OK",
wxButton)->SetDefault();
53 wxArrayString virtuals = m_pProject->GetVirtualBuildTargets();
54 lstAliases->Set(virtuals);
56 if (lstAliases->GetCount() > 0)
57 lstAliases->SetSelection(0);
60 for (
int i = 0; i < m_pProject->GetBuildTargetsCount(); ++i)
61 lstTargets->Append(m_pProject->GetBuildTarget(i)->GetTitle());
86 "A virtual target must have at least one active target.\n" 87 "Did you want to remove the virtual build target?"),
_(
"Error"),
wxICON_ERROR,
this);
93 "Check the debug log for more info..."),
_(
"Error"),
wxICON_ERROR,
this);
110 bool hasSel =
lstAliases->GetSelection() != -1;
119 _(
"New virtual build target"));
125 cbMessageBox(
_(
"A virtual build target with this name already exists in this project!"),
133 cbMessageBox(
_(
"A real build target with this name already exists in this project!"),
148 _(
"Edit virtual build target"),
157 cbMessageBox(
_(
"A virtual build target with this name already exists in this project!"),
165 cbMessageBox(
_(
"A real build target with this name already exists in this project!"),
wxCheckListBox * lstTargets
void OnAliasesSelect(wxCommandEvent &event)
bool DefineVirtualBuildTarget(const wxString &alias, const wxArrayString &targets)
Define a new virtual build target.
virtual wxString GetString(unsigned int n) const
void OnAddClick(wxCommandEvent &event)
void SetVirtualTarget(const wxString &targetName)
DLLIMPORT wxString cbGetTextFromUser(const wxString &message, const wxString &caption=cbGetTextFromUserPromptStr, const wxString &default_value=wxEmptyString, wxWindow *parent=NULL, int x=wxDefaultCoord, int y=wxDefaultCoord, bool centre=true)
int Index(const wxString &sz, bool bCase=true, bool bFromEnd=false) const
void OnRemoveClick(wxCommandEvent &event)
bool IsChecked(unsigned int item) const
void OnEditClick(wxCommandEvent &event)
Represents a Code::Blocks project.
virtual const wxString & GetTitle() const
Read the target's title.
void Check(unsigned int item, bool check=true)
void OnUpdateUI(wxUpdateUIEvent &event)
const wxArrayString & GetVirtualBuildTargetGroup(const wxString &alias) const
Access a virtual build target's group of build targets.
const wxString & _(const wxString &string)
int GetBuildTargetsCount()
ProjectBuildTarget * GetBuildTarget(int index)
Access a build target.
virtual ~VirtualBuildTargetsDlg()
size_t Add(const wxString &str, size_t copies=1)
bool RemoveVirtualBuildTarget(const wxString &alias)
Remove a virtual build target.
static wxXmlResource * Get()
void OnTargetsToggled(wxCommandEvent &event)
wxObject * LoadObject(wxWindow *parent, const wxString &name, const wxString &classname)
virtual unsigned int GetCount() const
DLLIMPORT int cbMessageBox(const wxString &message, const wxString &caption=wxEmptyString, int style=wxOK, wxWindow *parent=NULL, int x=-1, int y=-1)
wxMessageBox wrapper.