--- nono/wx/wxmainview.h 2026/04/29 17:05:04 1.1.1.10 +++ nono/wx/wxmainview.h 2026/04/29 17:05:16 1.1.1.13 @@ -4,10 +4,18 @@ // Licensed under nono-license.txt // +// +// メイン画面パネル +// + #pragma once #include "wxnono.h" -#include + +wxDECLARE_EVENT(NONO_EVT_MOUSEMODE, wxCommandEvent); + +class Keyboard; +class Renderer; class WXMainView : public wxPanel { @@ -18,7 +26,7 @@ class WXMainView : public wxPanel bool Init(); - void DoRefresh(); + void Close(); void DoResize(double scale); // 現在のスケールを返す @@ -46,10 +54,9 @@ class WXMainView : public wxPanel void OnTimer(wxTimerEvent& event); void OnPaint(wxPaintEvent& event); void OnMouse(wxMouseEvent& event); - - // 裏バッファ。 - // VM がレンダリングするバッファ。 - std::unique_ptr ImageBuf {}; + void OnMouseCaptureLost(wxMouseCaptureLostEvent& event); + void OnRender(wxCommandEvent& event); + void OnMouseMode(wxCommandEvent& event); // 仮想画面サイズ (ピクセル) int rendwidth {}; @@ -80,11 +87,8 @@ class WXMainView : public wxPanel // マウスカーソルを移動させる void MyWarpPointer(wxSize pos); - // 再描画を律速する - wxTimer timer {}; - std::atomic paint_request {}; + Keyboard *keyboard {}; + Renderer *renderer {}; wxDECLARE_EVENT_TABLE(); }; - -extern WXMainView *gMainView;