--- nono/wx/wxlcdwindow.h 2026/04/29 17:04:56 1.1.1.4 +++ nono/wx/wxlcdwindow.h 2026/04/29 17:05:16 1.1.1.8 @@ -5,41 +5,42 @@ // // -// LUNA LCD パネル +// LUNA LCD パネル、モニタ // #pragma once -#include "wxnono.h" -#include "wxbitmapbuf.h" #include "wxsubwindow.h" +#include "wxbitmappanel.h" +#include "wxmonitor.h" -// LCD パネル -class WXLCDPanel : public wxPanel +class LCDDevice; + +// LUNA 前面 LCD パネル +class WXLCDPanel : public WXTextPanel { - using inherited = wxPanel; + using inherited = WXTextPanel; public: WXLCDPanel(wxWindow *parent); virtual ~WXLCDPanel() override; + void FontChanged() 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 {}; + int unit {}; + int u_width {}; + int u_height {}; - // 描画管理用 - uint32 count {}; - wxTimer timer {}; - - wxDECLARE_EVENT_TABLE(); + LCDDevice *lcd {}; }; -// LCD ウィンドウ +// LUNA 前面 LCD ウィンドウ class WXLCDWindow : public WXSubWindow { using inherited = WXSubWindow; @@ -51,24 +52,27 @@ class WXLCDWindow : public WXSubWindow WXLCDPanel *panel {}; }; -// LCD キャラクタパネル -class WXLCDCharPanel : public WXPaddingPanel +// モニタの LCD キャラクタ部パネル +class WXLCDCharPanel : public WXTextPanel { - using inherited = WXPaddingPanel; + using inherited = WXTextPanel; public: WXLCDCharPanel(wxWindow *parent); virtual ~WXLCDCharPanel() override; + void FontChanged() override; + private: - void OnPaint(wxPaintEvent& event); - void Draw(wxDC&); + void Draw() override; - WXBitmapBuf bitmap {}; + int unit {}; + int u_width {}; + int u_height {}; - wxDECLARE_EVENT_TABLE(); + LCDDevice *lcd {}; }; -// LCD キャラクタウィンドウ +// LCD モニタウィンドウ class WXLCDMonitor : public WXSubWindow { using inherited = WXSubWindow; @@ -77,6 +81,6 @@ class WXLCDMonitor : public WXSubWindow virtual ~WXLCDMonitor() override; private: - WXTextScreen *monpanel {}; + WXMonitorPanel *monpanel {}; WXLCDCharPanel *chrpanel {}; };