--- nono/wx/wxlcdwindow.h 2026/04/29 17:04:59 1.1.1.5 +++ nono/wx/wxlcdwindow.h 2026/04/29 17:05:08 1.1.1.6 @@ -10,29 +10,23 @@ #pragma once -#include "wxnono.h" -#include "wxbitmapbuf.h" #include "wxsubwindow.h" +#include "wxbitmappanel.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 OnLCDChanged(wxCommandEvent& event); - void OnPaint(wxPaintEvent& event); - void Draw(wxDC&); - void DrawChar(wxDC&, int x, int y, uint8 ch); + void Draw() override; + void DrawChar(int x, int y, uint8 ch); const uint8 *ddram {}; - - WXBitmapBuf bitmap {}; - - wxDECLARE_EVENT_TABLE(); }; // LCD ウィンドウ @@ -48,20 +42,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 キャラクタウィンドウ