Code::Blocks  SVN r11506
Macros
externaldepsdlg.cpp File Reference
#include "sdk_precomp.h"
#include "externaldepsdlg.h"
#include <wx/msgdlg.h>
#include "editpathdlg.h"
Include dependency graph for externaldepsdlg.cpp:

Go to the source code of this file.

Macros

#define DoAdd(listbox, message)
 
#define DoEdit(listbox, message)
 
#define DoDel(listbox)
 

Macro Definition Documentation

◆ DoAdd

#define DoAdd (   listbox,
  message 
)
Value:
{ \
wxListBox* lst = XRCCTRL(*this, listbox, wxListBox); \
EditPathDlg dlg(this, \
m_pProject->GetBasePath(), \
m_pProject->GetBasePath(), \
message, \
wxEmptyString, \
false); \
PlaceWindow(&dlg); \
if (dlg.ShowModal() == wxID_OK) \
lst->Append(dlg.GetPath()); \
}

Definition at line 97 of file externaldepsdlg.cpp.

Referenced by ExternalDepsDlg::OnAddAdditional(), and ExternalDepsDlg::OnAddExternal().

◆ DoDel

#define DoDel (   listbox)
Value:
{ \
wxListBox* lst = XRCCTRL(*this, listbox, wxListBox); \
int sel = lst->GetSelection(); \
if (sel == -1) \
return; \
if (cbMessageBox(_("Are you sure you want to remove this file?"), _("Remove file"), wxYES_NO | wxNO_DEFAULT, this) == wxID_NO) \
return; \
lst->Delete(sel); \
}
const wxString & _(const wxString &string)
DLLIMPORT int cbMessageBox(const wxString &message, const wxString &caption=wxEmptyString, int style=wxOK, wxWindow *parent=NULL, int x=-1, int y=-1)
wxMessageBox wrapper.
Definition: globals.cpp:1395

Definition at line 130 of file externaldepsdlg.cpp.

Referenced by ExternalDepsDlg::OnDelAdditional(), and ExternalDepsDlg::OnDelExternal().

◆ DoEdit

#define DoEdit (   listbox,
  message 
)
Value:
{ \
wxListBox* lst = XRCCTRL(*this, listbox, wxListBox); \
int sel = lst->GetSelection(); \
if (sel == -1) \
return; \
EditPathDlg dlg(this, \
lst->GetStringSelection(), \
m_pProject->GetBasePath(), \
message, \
wxEmptyString, \
false); \
PlaceWindow(&dlg); \
if (dlg.ShowModal() == wxID_OK) \
lst->SetString(sel, dlg.GetPath()); \
}

Definition at line 112 of file externaldepsdlg.cpp.

Referenced by ExternalDepsDlg::OnEditAdditional(), and ExternalDepsDlg::OnEditExternal().