--- nono/wx/wxlcdwindow.h 2026/04/29 17:04:39 1.1 +++ nono/wx/wxlcdwindow.h 2026/04/29 17:04:53 1.1.1.3 @@ -11,6 +11,7 @@ #pragma once #include "wxheader.h" +#include "wxbmp.h" #include "wxsubwindow.h" // LCD パネル @@ -19,7 +20,7 @@ class WXLCDPanel : public wxPanel using inherited = wxPanel; public: WXLCDPanel(wxWindow *parent); - ~WXLCDPanel(); + virtual ~WXLCDPanel() override; private: void OnTimer(wxTimerEvent& event); @@ -29,9 +30,7 @@ class WXLCDPanel : public wxPanel const uint8 *ddram {}; - std::unique_ptr bmpbuf {}; - std::unique_ptr image {}; - std::unique_ptr bitmap {}; + WXBitmap bitmap {}; // 描画管理用 uint32 count {}; @@ -46,27 +45,25 @@ class WXLCDWindow : public WXSubWindow using inherited = WXSubWindow; public: WXLCDWindow(wxWindow *parent, wxWindowID id); - ~WXLCDWindow(); + virtual ~WXLCDWindow() override; private: WXLCDPanel *panel {}; }; // LCD キャラクタパネル -class WXLCDCharPanel : public wxPanel +class WXLCDCharPanel : public WXPaddingPanel { - using inherited = wxPanel; + using inherited = WXPaddingPanel; public: WXLCDCharPanel(wxWindow *parent); - ~WXLCDCharPanel(); + virtual ~WXLCDCharPanel() override; private: void OnPaint(wxPaintEvent& event); void Draw(wxDC&); - std::unique_ptr bmpbuf {}; - std::unique_ptr image {}; - std::unique_ptr bitmap {}; + WXBitmap bitmap {}; wxDECLARE_EVENT_TABLE(); }; @@ -77,7 +74,7 @@ class WXLCDMonitor : public WXSubWindow using inherited = WXSubWindow; public: WXLCDMonitor(wxWindow *parent, wxWindowID id); - ~WXLCDMonitor(); + virtual ~WXLCDMonitor() override; private: WXTextScreen *monpanel {};