41 XRCCTRL(*
this,
"wxID_OK",
wxButton)->SetDefault();
55 for (
int i = 0; i < count; ++i)
59 list->Append(tool->GetName());
78 bool hasSel = list->GetSelection() != -1;
79 bool notFirst = list->GetSelection() > 0;
80 bool notLast = (list->GetSelection() < (int)(list->GetCount()) -1) && hasSel;
81 bool notSeparator =
true;
86 XRCCTRL(*
this,
"btnEdit",
wxButton)->Enable(hasSel && notSeparator);
87 XRCCTRL(*
this,
"btnRemove",
wxButton)->Enable(hasSel);
88 XRCCTRL(*
this,
"btnUp",
wxButton)->Enable(notFirst);
89 XRCCTRL(*
this,
"btnDown",
wxButton)->Enable(notLast);
113 int sel = list->GetSelection();
115 ||
cbMessageBox(
_(
"Are you sure you want to remove this tool?"),
136 int sel = list->GetSelection();
142 list->SetSelection(sel - 1);
148 int sel = list->GetSelection();
154 list->SetSelection(sel + 1);
static Manager * Get()
Use Manager::Get() to get a pointer to its instance Manager::Get() is guaranteed to never return an i...
const wxString & _(const wxString &string)
DLLIMPORT void PlaceWindow(wxTopLevelWindow *w, cbPlaceDialogMode mode=pdlBest, bool enforce=false)
static wxXmlResource * Get()
wxObject * LoadObject(wxWindow *parent, const wxString &name, const wxString &classname)
DLLIMPORT int cbMessageBox(const wxString &message, const wxString &caption=wxEmptyString, int style=wxOK, wxWindow *parent=NULL, int x=-1, int y=-1)
wxMessageBox wrapper.