--- nono/wx/wxlcdwindow.h 2026/04/29 17:05:12 1.1.1.7 +++ nono/wx/wxlcdwindow.h 2026/04/29 17:05:27 1.1.1.9 @@ -5,7 +5,7 @@ // // -// LUNA LCD パネル +// LUNA LCD パネル、モニタ // #pragma once @@ -14,13 +14,17 @@ #include "wxbitmappanel.h" #include "wxmonitor.h" -// LCD パネル -class WXLCDPanel : public WXBitmapPanel +class LCDDevice; + +// LUNA 前面 LCD パネル +class WXLCDPanel : public WXTextPanel { - using inherited = WXBitmapPanel; + using inherited = WXTextPanel; public: - WXLCDPanel(wxWindow *parent); - virtual ~WXLCDPanel() override; + explicit WXLCDPanel(wxWindow *parent); + ~WXLCDPanel() override; + + void FontChanged() override; private: void OnLCDChanged(wxCommandEvent& event); @@ -28,39 +32,53 @@ class WXLCDPanel : public WXBitmapPanel void DrawChar(int x, int y, uint8 ch); const uint8 *ddram {}; + + int unit {}; + int u_width {}; + int u_height {}; + + LCDDevice *lcd {}; }; -// LCD ウィンドウ +// LUNA 前面 LCD ウィンドウ class WXLCDWindow : public WXSubWindow { using inherited = WXSubWindow; public: - WXLCDWindow(wxWindow *parent); - virtual ~WXLCDWindow() override; + explicit WXLCDWindow(wxWindow *parent); + ~WXLCDWindow() override; private: WXLCDPanel *panel {}; }; -// LCD キャラクタパネル -class WXLCDCharPanel : public WXBitmapPanel +// モニタの LCD キャラクタ部パネル +class WXLCDCharPanel : public WXTextPanel { - using inherited = WXBitmapPanel; + using inherited = WXTextPanel; public: - WXLCDCharPanel(wxWindow *parent); - virtual ~WXLCDCharPanel() override; + explicit WXLCDCharPanel(wxWindow *parent); + ~WXLCDCharPanel() override; + + void FontChanged() override; private: void Draw() override; + + int unit {}; + int u_width {}; + int u_height {}; + + LCDDevice *lcd {}; }; -// LCD キャラクタウィンドウ +// LCD モニタウィンドウ class WXLCDMonitor : public WXSubWindow { using inherited = WXSubWindow; public: - WXLCDMonitor(wxWindow *parent); - virtual ~WXLCDMonitor() override; + explicit WXLCDMonitor(wxWindow *parent); + ~WXLCDMonitor() override; private: WXMonitorPanel *monpanel {};