diff options
Diffstat (limited to 'src/osd/modules/debugger/win/pointswininfo.cpp')
-rw-r--r-- | src/osd/modules/debugger/win/pointswininfo.cpp | 57 |
1 files changed, 51 insertions, 6 deletions
diff --git a/src/osd/modules/debugger/win/pointswininfo.cpp b/src/osd/modules/debugger/win/pointswininfo.cpp index 93926a697ae..f8fb4f6ce8d 100644 --- a/src/osd/modules/debugger/win/pointswininfo.cpp +++ b/src/osd/modules/debugger/win/pointswininfo.cpp @@ -2,7 +2,7 @@ // copyright-holders:Aaron Giles, Vas Crabb //============================================================ // -// pointswininfo.c - Win32 debug window handling +// pointswininfo.cpp - Win32 debug window handling // //============================================================ @@ -11,9 +11,13 @@ #include "debugviewinfo.h" +#include "util/xmlfile.h" + #include "winutf8.h" +namespace osd::debugger::win { + pointswin_info::pointswin_info(debugger_windows_interface &debugger) : debugwin_info(debugger, false, std::string("All Breakpoints").c_str(), nullptr) { @@ -44,11 +48,9 @@ pointswin_info::pointswin_info(debugger_windows_interface &debugger) : // clamp the min/max size set_maxwidth(bounds.right - bounds.left); - // position the window at the bottom-right - SetWindowPos(window(), HWND_TOP, 100, 100, bounds.right - bounds.left, bounds.bottom - bounds.top, SWP_SHOWWINDOW); - - // recompute the children - debugwin_info::recompute_children(); + // position the window and recompute children + debugger.stagger_window(window(), bounds.right - bounds.left, bounds.bottom - bounds.top); + recompute_children(); } @@ -131,3 +133,46 @@ bool pointswin_info::handle_command(WPARAM wparam, LPARAM lparam) } return debugwin_info::handle_command(wparam, lparam); } + + +void pointswin_info::restore_configuration_from_node(util::xml::data_node const &node) +{ + switch (node.get_attribute_int(ATTR_WINDOW_POINTS_TYPE, -1)) + { + case 0: + SendMessage(window(), WM_COMMAND, ID_SHOW_BREAKPOINTS, 0); + break; + case 1: + SendMessage(window(), WM_COMMAND, ID_SHOW_WATCHPOINTS, 0); + break; + case 2: + SendMessage(window(), WM_COMMAND, ID_SHOW_REGISTERPOINTS, 0); + break; + } + + debugwin_info::restore_configuration_from_node(node); +} + + +void pointswin_info::save_configuration_to_node(util::xml::data_node &node) +{ + debugwin_info::save_configuration_to_node(node); + + node.set_attribute_int(ATTR_WINDOW_TYPE, WINDOW_TYPE_POINTS_VIEWER); + switch (m_views[0]->type()) + { + case DVT_BREAK_POINTS: + node.set_attribute_int(ATTR_WINDOW_POINTS_TYPE, 0); + break; + case DVT_WATCH_POINTS: + node.set_attribute_int(ATTR_WINDOW_POINTS_TYPE, 1); + break; + case DVT_REGISTER_POINTS: + node.set_attribute_int(ATTR_WINDOW_POINTS_TYPE, 2); + break; + default: + break; + } +} + +} // namespace osd::debugger::win |