Files

50 lines
928 B
C++
Raw Permalink Normal View History

2014-01-31 08:23:00 +13:00
2019-01-18 15:55:40 +01:00
#include "debuggerapp.hpp"
2019-01-18 17:04:34 +01:00
#include "debugger.hpp"
2019-01-18 15:55:40 +01:00
#include "prefs.hpp"
2019-01-18 17:04:34 +01:00
#include "resource.hpp"
#include "stdafx.hpp"
2014-01-31 08:23:00 +13:00
DebuggerApp debuggerApp;
2019-01-18 17:04:34 +01:00
DebuggerApp::~DebuggerApp() {}
2014-01-31 08:23:00 +13:00
2019-01-18 17:04:34 +01:00
BOOL DebuggerApp::InitInstance()
{
2014-01-31 08:23:00 +13:00
AfxInitRichEdit();
2019-01-18 17:04:34 +01:00
main_frame = new MainFrame();
2014-01-31 08:23:00 +13:00
2019-01-18 17:04:34 +01:00
m_pMainWnd = main_frame;
2014-01-31 08:23:00 +13:00
RECT rect;
2019-01-18 17:04:34 +01:00
SystemParametersInfo(SPI_GETWORKAREA, 0, &rect, 0);
2014-01-31 08:23:00 +13:00
2019-01-18 17:04:34 +01:00
int x = rect.left;
int w = rect.right - x;
int h = 240;
int y = rect.bottom - h;
2014-01-31 08:23:00 +13:00
2019-01-18 17:04:34 +01:00
main_frame->Create(0, "Blitz Debugger", WS_OVERLAPPEDWINDOW | WS_CLIPCHILDREN, CRect(x, y, x + w, y + h));
main_frame->ShowWindow(SW_SHOW);
2014-01-31 08:23:00 +13:00
main_frame->UpdateWindow();
return TRUE;
}
2019-01-18 17:04:34 +01:00
int DebuggerApp::ExitInstance()
{
2014-01-31 08:23:00 +13:00
main_frame->DestroyWindow();
return 0;
}
2019-01-18 17:04:34 +01:00
MainFrame* DebuggerApp::mainFrame()
{
2014-01-31 08:23:00 +13:00
return debuggerApp.main_frame;
}
2019-01-18 17:04:34 +01:00
Debugger* _cdecl debuggerGetDebugger(void* mod, void* env)
{
debuggerApp.mainFrame()->setRuntime(mod, env);
2014-01-31 08:23:00 +13:00
return debuggerApp.mainFrame();
}