From 681e0f3961b910ad69bb409b6de2baf1f4d61066 Mon Sep 17 00:00:00 2001 From: James Cowgill Date: Mon, 12 Oct 2015 20:39:30 +0100 Subject: Imported Upstream version 9.0+dfsg --- LiteEditor/breakpointdlg.h | 60 ++++++++++++++++++++++++++-------------------- 1 file changed, 34 insertions(+), 26 deletions(-) (limited to 'LiteEditor/breakpointdlg.h') diff --git a/LiteEditor/breakpointdlg.h b/LiteEditor/breakpointdlg.h index 61d4ead6..b744dcc2 100644 --- a/LiteEditor/breakpointdlg.h +++ b/LiteEditor/breakpointdlg.h @@ -28,41 +28,49 @@ #include "breakpointdlgbase.h" #include "breakpointsmgr.h" -// Since a breakpoint will always have an internal id, but a valid debugger one only when the debugger's running, store both here -struct bpd_IDs -{ - int debugger_id; - int internal_id; - bpd_IDs(const BreakpointInfo& bp) { debugger_id = bp.debugger_id; internal_id = bp.internal_id; } - // If the debugger is running, debugger_id will (should) be >0. Otherwise use the internal_id - int GetBestId() { return debugger_id == -1 ? internal_id : debugger_id; } - wxString GetIdAsString() // Internal IDs start at FIRST_INTERNAL_ID + 1, == 10001 - { int id = (GetBestId() > FIRST_INTERNAL_ID ? GetBestId()-FIRST_INTERNAL_ID : GetBestId()); - wxString idstr; idstr << id; return idstr; - } +// Since a breakpoint will always have an internal id, but a valid debugger one only when the debugger's running, store +// both here +struct bpd_IDs { + double debugger_id; + double internal_id; + bpd_IDs(const BreakpointInfo& bp) + { + debugger_id = bp.debugger_id; + internal_id = bp.internal_id; + } + // If the debugger is running, debugger_id will (should) be >0. Otherwise use the internal_id + double GetBestId() { return debugger_id == -1 ? internal_id : debugger_id; } + wxString GetIdAsString() // Internal IDs start at FIRST_INTERNAL_ID + 1, == 10001 + { + double id = (GetBestId() > FIRST_INTERNAL_ID ? GetBestId() - FIRST_INTERNAL_ID : GetBestId()); + wxString idstr; + idstr << id; + return idstr; + } }; /** Implementing BreakpointDlgBase */ class BreakpointDlg : public BreakpointTabBase { - long m_selectedItem; + long m_selectedItem; + protected: - void OnAdd(wxCommandEvent &e); - void OnEdit(wxCommandEvent &e); - void OnDelete(wxCommandEvent &e); - void OnDeleteAll(wxCommandEvent &e); - void OnApplyPending(wxCommandEvent &e); - void OnItemActivated(wxListEvent &e); - void OnItemSelected(wxListEvent &e); - void OnItemDeselected(wxListEvent &e); - void OnItemRightClick(wxListEvent& e); + void OnAdd(wxCommandEvent& e); + void OnEdit(wxCommandEvent& e); + void OnDelete(wxCommandEvent& e); + void OnDeleteAll(wxCommandEvent& e); + void OnApplyPending(wxCommandEvent& e); + void OnItemActivated(wxListEvent& e); + void OnItemSelected(wxListEvent& e); + void OnItemDeselected(wxListEvent& e); + void OnItemRightClick(wxListEvent& e); - std::vector m_ids; + std::vector m_ids; public: - /** Constructor */ - BreakpointDlg( wxWindow* parent ); - void Initialize(); + /** Constructor */ + BreakpointDlg(wxWindow* parent); + void Initialize(); }; #endif // __breakpointdlg__ -- cgit v1.2.3