--- nono/wx/wxlcdwindow.h 2026/04/29 17:04:53 1.1.1.3 +++ nono/wx/wxlcdwindow.h 2026/04/29 17:05:08 1.1.1.6 @@ -10,33 +10,23 @@ #pragma once -#include "wxheader.h" -#include "wxbmp.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 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 {}; - - WXBitmap bitmap {}; - - // 描画管理用 - uint32 count {}; - wxTimer timer {}; - - wxDECLARE_EVENT_TABLE(); }; // LCD ウィンドウ @@ -44,7 +34,7 @@ class WXLCDWindow : public WXSubWindow { using inherited = WXSubWindow; public: - WXLCDWindow(wxWindow *parent, wxWindowID id); + WXLCDWindow(wxWindow *parent); virtual ~WXLCDWindow() override; private: @@ -52,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&); - - WXBitmap bitmap {}; - - wxDECLARE_EVENT_TABLE(); + void Draw() override; }; // LCD キャラクタウィンドウ @@ -73,7 +58,7 @@ class WXLCDMonitor : public WXSubWindow { using inherited = WXSubWindow; public: - WXLCDMonitor(wxWindow *parent, wxWindowID id); + WXLCDMonitor(wxWindow *parent); virtual ~WXLCDMonitor() override; private: