34 #include <wx/statline.h>
35 #include <wx/listctrl.h>
36 #include <boost/format.hpp>
84 wxDialog(parent, -1, _T(""), wxDefaultPosition, wxSize(400,300)),
87 createContents(
this,
true,
true);
89 asList_ =
dynamic_cast<wxListCtrl*
>(
FindWindow(ID_LIST));
117 format fmt = prodeTexts->
text(
141 wxListCtrl* portList =
142 dynamic_cast<wxListCtrl*
>(
FindWindow(ID_LIST));
145 wxLIST_FORMAT_LEFT, 100);
148 wxLIST_FORMAT_LEFT, 40);
151 wxLIST_FORMAT_LEFT, 90);
154 wxLIST_FORMAT_LEFT, 90);
157 wxLIST_FORMAT_LEFT, 80);
169 item = asList_->GetNextItem(
170 item, wxLIST_NEXT_ALL, wxLIST_STATE_SELECTED);
178 machine_->addressSpaceNavigator();
180 if (!navigator.
hasItem(asName)) {
184 return navigator.
item(asName);
198 machine_->addressSpaceNavigator();
202 while (navigator.
hasItem(newName)) {
217 if (dialog.ShowModal() == wxID_OK) {
234 wxCommandEvent
dummy;
249 if (selected == NULL) {
281 if (asList_->GetSelectedItemCount() != 1) {
298 machine_->addressSpaceNavigator();
300 asList_->DeleteAllItems();
302 for (
int i = 0; i < asNavigator.
count(); i++) {
322 asList_->SetItemState(event.GetIndex(), wxLIST_STATE_SELECTED,
323 wxLIST_STATE_SELECTED);
325 wxMenu* contextMenu =
new wxMenu();
328 format button = prodeTexts->
text(
332 button = prodeTexts->
text(
336 asList_->PopupMenu(contextMenu, event.GetPoint());
354 wxBoxSizer *item0 =
new wxBoxSizer( wxVERTICAL );
356 wxListCtrl *item1 =
new wxListCtrl( parent, ID_LIST, wxDefaultPosition, wxSize(400,200), wxLC_REPORT|wxLC_SINGLE_SEL );
357 item0->Add( item1, 0, wxALIGN_CENTER|wxALL, 5 );
359 wxGridSizer *item2 =
new wxGridSizer( 3, 0, 0 );
361 wxButton *item3 =
new wxButton( parent, ID_ADD, wxT(
"&Add..."), wxDefaultPosition, wxDefaultSize, 0 );
362 item2->Add( item3, 0, wxALIGN_CENTER|wxALL, 5 );
364 wxButton *item4 =
new wxButton( parent, ID_EDIT, wxT(
"&Edit..."), wxDefaultPosition, wxDefaultSize, 0 );
365 item2->Add( item4, 0, wxALIGN_CENTER|wxALL, 5 );
367 wxButton *item5 =
new wxButton( parent, ID_DELETE, wxT(
"&Delete"), wxDefaultPosition, wxDefaultSize, 0 );
368 item2->Add( item5, 0, wxALIGN_CENTER|wxALL, 5 );
370 item0->Add( item2, 0, wxGROW, 5 );
372 wxStaticLine *item6 =
new wxStaticLine( parent, ID_LINE, wxDefaultPosition, wxSize(20,-1), wxLI_HORIZONTAL );
373 item0->Add( item6, 0, wxGROW|wxALL, 5 );
375 wxGridSizer *item7 =
new wxGridSizer( 2, 0, 0 );
377 wxButton *item8 =
new wxButton( parent, ID_HELP, wxT(
"&Help"), wxDefaultPosition, wxDefaultSize, 0 );
378 item7->Add( item8, 0, wxALL, 5 );
380 wxBoxSizer *item9 =
new wxBoxSizer( wxHORIZONTAL );
382 wxButton *item10 =
new wxButton( parent, wxID_OK, wxT(
"&OK"), wxDefaultPosition, wxDefaultSize, 0 );
383 item9->Add( item10, 0, wxALIGN_CENTER|wxALL, 5 );
385 wxButton *item11 =
new wxButton( parent, wxID_CANCEL, wxT(
"&Cancel"), wxDefaultPosition, wxDefaultSize, 0 );
386 item9->Add( item11, 0, wxALIGN_CENTER|wxALL, 5 );
388 item7->Add( item9, 0, wxALL, 5 );
390 item0->Add( item7, 0, wxGROW, 5 );
394 parent->SetSizer( item0 );
396 item0->SetSizeHints( parent );