--- nono/wx/wxaccstatmonitor.cpp 2026/04/29 17:05:27 1.1 +++ nono/wx/wxaccstatmonitor.cpp 2026/04/29 17:05:57 1.1.1.4 @@ -11,19 +11,22 @@ // パネルには WXTextScreen 同様に四辺に DefaultPadding を手動で入れてある。 #include "wxaccstatmonitor.h" -#include "wxcolor.h" #include "wxtextscreen.h" #include "bankram.h" +#include "mainapp.h" #include "mainbus.h" +#include "monitor.h" // // アクセス状況 (グラフィカル) パネル // // コンストラクタ -WXAccStatPanel::WXAccStatPanel(wxWindow *parent, Monitor& monitor_) +WXAccStatPanel::WXAccStatPanel(wxWindow *parent, Monitor *monitor_) : inherited(parent, monitor_) { + SetName("AccStatPanel"); + // デバイスを取得 mainbus = GetMainbusDevice(); @@ -49,13 +52,16 @@ WXAccStatPanel::FontChanged() { inherited::FontChanged(); - auto monsz = mainbus->monitor_accstat.GetSize(); + auto monsz = mainbus->accstat_monitor->GetSize(); wxSize size( WXTextScreen::DefaultPadding * 2 + monsz.width * font_width, WXTextScreen::DefaultPadding * 2 + monsz.height * font_height); - SetClientSize(size); - SetMinClientSize(size); + // バックバッファのサイズを固定。 + SetMinBitmapSize(size); + + SetSize(size); + SetMinSize(size); redraw_header = true; } @@ -210,11 +216,11 @@ WXAccStatPanel::CopyLine(int cx, int py, // // コンストラクタ -WXAccStatWindow::WXAccStatWindow(wxWindow *parent, Monitor& monitor_) +WXAccStatWindow::WXAccStatWindow(wxWindow *parent, Monitor *monitor_) : inherited(parent, wxID_ANY, _("Access Status")) { new WXAccStatPanel(this, monitor_); - DoSize(); + Fit(); } // デストラクタ