MCPcopy Create free account
hub / github.com/dhewm/dhewm3 / WndProc

Method WndProc

neo/tools/debugger/DebuggerWindow.cpp:1408–1856  ·  view source on GitHub ↗

================ rvDebuggerWindow::WndProc Window procedure for the deubgger window ================ */

Source from the content-addressed store, hash-verified

1406================
1407*/
1408LRESULT CALLBACK rvDebuggerWindow::WndProc ( HWND wnd, UINT msg, WPARAM wparam, LPARAM lparam )
1409{
1410 rvDebuggerWindow* window = (rvDebuggerWindow*) GetWindowLongPtr ( wnd, GWLP_USERDATA );
1411
1412 switch ( msg )
1413 {
1414 case WM_INITMENUPOPUP:
1415 window->HandleInitMenu ( wparam, lparam );
1416 break;
1417
1418 case WM_DESTROY:
1419 {
1420 gDebuggerApp.GetOptions().SetColumnWidths ( "cw_callstack", window->mWndCallstack );
1421 gDebuggerApp.GetOptions().SetColumnWidths ( "cw_threads", window->mWndThreads );
1422 gDebuggerApp.GetOptions().SetColumnWidths ( "cw_watch", window->mWndWatch );
1423 gDebuggerApp.GetOptions().SetWindowPlacement ( "wp_main", wnd );
1424
1425 int i;
1426 for ( i = 0; i < window->mWatches.Num ( ); i ++ )
1427 {
1428 gDebuggerApp.GetOptions().SetString ( va("watch%d", i ), window->mWatches[i]->mVariable );
1429 }
1430 gDebuggerApp.GetOptions().SetString ( va("watch%d", i ), "" );
1431
1432 window->mWnd = NULL;
1433 SetWindowLongPtr ( wnd, GWLP_USERDATA, 0 );
1434 break;
1435 }
1436
1437 case WM_ERASEBKGND:
1438 return 0;
1439
1440 case WM_COMMAND:
1441 window->HandleCommand ( wparam, lparam );
1442 break;
1443
1444 case WM_SETCURSOR:
1445 {
1446 POINT point;
1447 GetCursorPos ( &point );
1448 ScreenToClient ( wnd, &point );
1449 if ( PtInRect ( &window->mSplitterRect, point ) )
1450 {
1451 SetCursor ( LoadCursor ( NULL, IDC_SIZENS ) );
1452 return true;
1453 }
1454 break;
1455 }
1456
1457 case WM_SIZE:
1458 {
1459 float scaling_factor = Win_GetWindowScalingFactor(wnd);
1460 int s18 = int(18 * scaling_factor);
1461 int s4 = int(4 * scaling_factor);
1462 int s10 = int(10 * scaling_factor);
1463
1464 RECT rect;
1465 window->mMarginSize = window->mZoomScaleDem ? ((long)(s18 * (float)window->mZoomScaleNum / (float)window->mZoomScaleDem)): s18;

Callers

nothing calls this directly

Calls 15

vaFunction · 0.85
SetColumnWidthsMethod · 0.80
GetMarginWidthMethod · 0.80
HandleCreateMethod · 0.80
HandleActivateMethod · 0.80
AddWatchMethod · 0.80
UpdateWatchMethod · 0.80
UpdateCallstackMethod · 0.80
OpenScriptMethod · 0.80
UpdateScriptListMethod · 0.80

Tested by

no test coverage detected