47 header->SetBackgroundColour(
wxColour(0,64,128));
50 m_activeInfo->SetForegroundColour(
wxColour(255,255,255));
51 m_activeInfo->SetBackgroundColour(
wxColour(0,64,128));
53 m_activeInfo->SetFont(m_activeInfoFont);
55 header->SetSizer(headerSizer);
56 headerSizer->
Fit(header);
77 m_treebook->AddPage(m_commonPanel,
_(
"Common"));
80 for (DebuggerManager::RegisteredPlugins::const_iterator it = plugins.begin(); it != plugins.end(); ++it)
85 for (DebuggerManager::ConfigurationVector::const_iterator itConfig = data.
GetConfigurations().begin();
89 wxPanel *panel = (*itConfig)->MakePanel(m_treebook);
90 m_treebook->AddSubPage(panel, (*itConfig)->GetName());
96 m_mapPanelToConfig[panel] = conf;
100 for (
size_t ii = 0; ii < m_treebook->GetPageCount(); ++ii)
101 m_treebook->ExpandNode(ii);
110 delete it->second.config;
128 for (DebuggerManager::RegisteredPlugins::const_iterator it = plugins.begin(); it != plugins.end(); ++it)
131 path << it->first->GetSettingsName();
153 t += it->second.pluginGUIName +
wxT(
" - ") + c->
GetName() +
wxT(
"\n");
154 if (!c->
SaveChanges(static_cast<wxPanel*>(it->first)))
159 int normalIndex = -1;
163 for (DebuggerManager::RegisteredPlugins::const_iterator it = plugins.begin(); it != plugins.end(); ++it)
166 it->first->OnConfigurationChange(activePlugin == it->first);
179 if (treebook->GetPage(p) == page)
212 conf.
config = pluginConfig;
224 std::vector<wxWindow*> panels;
234 wxMultiChoiceDialog dialog(panel,
_(
"Choose which configurations to be deleted"),
_(
"Choose"), choices);
239 if (selection.GetCount() == choices.
GetCount())
241 cbMessageBox(
_(
"Can't delete all configurations. There should be at least one."),
245 for (
size_t s = 0; s < selection.GetCount(); ++s)
247 int index = selection[s];
249 if (p < m_treebook->GetPageCount())
252 cbAssert(plugin == it->second.plugin);
253 delete it->second.config;
271 size_t index = p - 1;
276 cbAssert(plugin == it->second.plugin);
277 delete it->second.config;
wxSize Fit(wxWindow *window)
void EndModal(int retCode)
MapPanelToConfiguration m_mapPanelToConfig
cbDebuggerPlugin * GetActiveDebugger()
cbDebuggerConfiguration * config
TextCtrlLogger * GetLogger(int &index)
static const long ID_LABEL_ACTIVE_INFO
ConfigurationVector & GetConfigurations()
void SetupLog(int normalIndex)
ConfigManager * GetConfigManager(const wxString &name_space) const
Base class for debugger plugins.
static Manager * Get()
Use Manager::Get() to get a pointer to its instance Manager::Get() is guaranteed to never return an i...
virtual ~DebuggerSettingsDlg()
wxArrayInt GetSelections() const
void OnOK(wxCommandEvent &event)
static const long ID_TREEBOOK
const wxString & GetName() const
virtual size_t GetPageCount() const
virtual bool SaveChanges(wxPanel *panel)=0
void OnPageChanged(wxNotebookEvent &event)
wxString & Remove(size_t pos)
virtual wxPanel * MakePanel(wxWindow *parent)=0
void DeleteConfig(wxWindow *panel, cbDebuggerPlugin *plugin)
void SetName(const wxString &name)
DebuggerSettingsCommonPanel * m_commonPanel
void Write(const wxString &name, const wxString &value, bool ignoreEmpty=false)
DebuggerManager * GetDebuggerManager() const
wxSizerItem * Add(wxWindow *window, const wxSizerFlags &flags)
virtual bool DeletePage(size_t pagePos)
const wxSize wxDefaultSize
const wxPoint wxDefaultPosition
wxStaticText * m_activeInfo
virtual cbDebuggerConfiguration * LoadConfig(const ConfigManagerWrapper &config)=0
#define wxDEFAULT_DIALOG_STYLE
virtual cbDebuggerConfiguration * Clone() const =0
int GetPageParent(size_t page) const
const wxString & GetBasepath() const
const wxString & _(const wxString &string)
std::map< cbDebuggerPlugin *, PluginData > RegisteredPlugins
wxArray< int > wxArrayInt
virtual bool InsertSubPage(size_t pagePos, wxWindow *page, const wxString &text, bool bSelect=false, int imageId=wxNOT_FOUND)
void DeleteSubPath(const wxString &strPath)
DLLIMPORT void PlaceWindow(wxTopLevelWindow *w, cbPlaceDialogMode mode=pdlBest, bool enforce=false)
RegisteredPlugins const & GetAllDebuggers() const
wxString GetGUIName() const
size_t FindPageIndex(wxTreebook *treebook, wxWindow *page)
void SetConfig(const ConfigManagerWrapper &config)
cbDebuggerPlugin * plugin
void SetSizeHints(wxWindow *window)
bool CreateConfig(wxWindow *panel, cbDebuggerPlugin *plugin, const wxString &name)
virtual wxString GetPageText(size_t nPage) const=0
ConfigManagerWrapper NewConfig(cbDebuggerPlugin *plugin, const wxString &name)
#define wxTRANSPARENT_WINDOW
const ConfigManagerWrapper & GetConfig() 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.
void ResetConfig(wxWindow *panel, cbDebuggerPlugin *plugin)
Wrapper class for reading or writing config values, without the need for the full path...