void DebuggerSettingsDlg::Initialize() { DebuggerMgr &mgr = DebuggerMgr::Get(); wxArrayString debuggers = mgr.GetAvailableDebuggers(); for (size_t i=0; i<debuggers.GetCount(); i++) { //create page per-debugger m_book->AddPage(new DebuggerPage(m_book, debuggers.Item(i)), debuggers.Item(i), true); } m_listCtrl1->InsertColumn(0, wxT("Type")); m_listCtrl1->InsertColumn(1, wxT("Expression")); m_listCtrl1->InsertColumn(2, wxT("Debugger Command")); //add items from the saved items DebuggerConfigTool::Get()->ReadObject(wxT("DebuggerCommands"), &m_data); //Populate the list with the items from the configuration file std::vector<DebuggerCmdData> cmds = m_data.GetCmds(); for (size_t i=0; i<cmds.size(); i++) { DebuggerCmdData cmd = cmds.at(i); long item = AppendListCtrlRow(m_listCtrl1); SetColumnText(m_listCtrl1, item, 0, cmd.GetName()); SetColumnText(m_listCtrl1, item, 1, cmd.GetCommand()); SetColumnText(m_listCtrl1, item, 2, cmd.GetDbgCommand()); } m_listCtrl1->SetColumnWidth(0, 100); m_listCtrl1->SetColumnWidth(1, 200); }
PreDefinedTypesPage::PreDefinedTypesPage( wxWindow* parent, const DebuggerPreDefinedTypes& preDefTypes ) : PreDefinedTypesPageBase( parent ) , m_selectedItem(wxNOT_FOUND) { m_data = preDefTypes; m_listCtrl1->InsertColumn(0, _("Type")); m_listCtrl1->InsertColumn(1, _("Expression")); m_listCtrl1->InsertColumn(2, _("Debugger Command")); //Populate the list with the items from the configuration file DebuggerCmdDataVec cmds = m_data.GetCmds(); for (size_t i=0; i<cmds.size(); i++) { DebuggerCmdData cmd = cmds.at(i); long item = AppendListCtrlRow(m_listCtrl1); SetColumnText(m_listCtrl1, item, 0, cmd.GetName()); SetColumnText(m_listCtrl1, item, 1, cmd.GetCommand()); SetColumnText(m_listCtrl1, item, 2, cmd.GetDbgCommand()); } m_listCtrl1->SetColumnWidth(0, 100); m_listCtrl1->SetColumnWidth(1, 200); }