--- nono/wx/wxmpumonitor.cpp 2026/04/29 17:05:08 1.1.1.5 +++ nono/wx/wxmpumonitor.cpp 2026/04/29 17:05:57 1.1.1.9 @@ -9,9 +9,6 @@ // #include "wxmpumonitor.h" -#include "fontmanager.h" -#include "wxtextscreen.h" -#include "m88200.h" // // CMMU キャッシュウィンドウ @@ -19,12 +16,11 @@ // コンストラクタ WXCacheWindow::WXCacheWindow(wxWindow *parent, const wxString& name, - Monitor& monitor_) + Monitor *monitor_) : inherited(parent, name, monitor_) { - // テキストスクリーンパネルに送られるマウスイベントをこちらで処理する - screen->Connect(wxEVT_LEFT_DOWN, - wxMouseEventHandler(WXCacheWindow::OnLeftDown), NULL, this); + // モニタパネルに送られるマウスイベントをこちらで処理する + monpanel->Bind(wxEVT_LEFT_DOWN, &WXCacheWindow::OnLeftDown, this); } // デストラクタ @@ -39,7 +35,7 @@ WXCacheWindow::OnLeftDown(wxMouseEvent& const wxPoint& pos = event.GetPosition(); // テキストの桁数、行数にする - wxPoint tpos = screen->GetTextPosition(pos); + wxPoint tpos = monpanel->GetTextPosition(pos); int x = tpos.x; int y = tpos.y; @@ -51,12 +47,12 @@ WXCacheWindow::OnLeftDown(wxMouseEvent& if (x % 5 < 4) { // このモニタは userdata を現在のセット番号として使っている int setidx = y * 16 + (x / 5); - screen->SetUserData(setidx); + monpanel->SetUserData(setidx); } } // 画面更新 - screen->DoRefresh(); + monpanel->DoRefresh(); event.Skip(); }