--- nono/wx/wxlcdwindow.h 2026/04/29 17:04:56 1.1.1.4 +++ nono/wx/wxlcdwindow.h 2026/04/29 17:05:12 1.1.1.7 @@ -10,33 +10,24 @@ #pragma once -#include "wxnono.h" -#include "wxbitmapbuf.h" #include "wxsubwindow.h" +#include "wxbitmappanel.h" +#include "wxmonitor.h" // LCD パネル -class WXLCDPanel : public wxPanel +class WXLCDPanel : public WXBitmapPanel { - using inherited = wxPanel; + using inherited = WXBitmapPanel; public: WXLCDPanel(wxWindow *parent); virtual ~WXLCDPanel() override; private: - void OnTimer(wxTimerEvent& event); - void OnPaint(wxPaintEvent& event); - void Draw(wxDC&); - void DrawChar(wxDC&, int x, int y, uint8 ch); + void OnLCDChanged(wxCommandEvent& event); + void Draw() override; + void DrawChar(int x, int y, uint8 ch); const uint8 *ddram {}; - - WXBitmapBuf bitmap {}; - - // 描画管理用 - uint32 count {}; - wxTimer timer {}; - - wxDECLARE_EVENT_TABLE(); }; // LCD ウィンドウ @@ -52,20 +43,15 @@ class WXLCDWindow : public WXSubWindow }; // LCD キャラクタパネル -class WXLCDCharPanel : public WXPaddingPanel +class WXLCDCharPanel : public WXBitmapPanel { - using inherited = WXPaddingPanel; + using inherited = WXBitmapPanel; public: WXLCDCharPanel(wxWindow *parent); virtual ~WXLCDCharPanel() override; private: - void OnPaint(wxPaintEvent& event); - void Draw(wxDC&); - - WXBitmapBuf bitmap {}; - - wxDECLARE_EVENT_TABLE(); + void Draw() override; }; // LCD キャラクタウィンドウ @@ -77,6 +63,6 @@ class WXLCDMonitor : public WXSubWindow virtual ~WXLCDMonitor() override; private: - WXTextScreen *monpanel {}; + WXMonitorPanel *monpanel {}; WXLCDCharPanel *chrpanel {}; };