--- nono/wx/wxlcdwindow.h 2026/04/29 17:04:39 1.1 +++ nono/wx/wxlcdwindow.h 2026/04/29 17:05:44 1.1.1.10 @@ -5,81 +5,83 @@ // // -// LUNA LCD パネル +// LUNA LCD パネル、モニタ // #pragma once -#include "wxheader.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); - ~WXLCDPanel(); + explicit WXLCDPanel(wxWindow *parent); + ~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 {}; - std::unique_ptr bmpbuf {}; - std::unique_ptr image {}; - std::unique_ptr bitmap {}; - - // 描画管理用 - uint32 count {}; - wxTimer timer {}; + int unit {}; + int u_width {}; + int u_height {}; - wxDECLARE_EVENT_TABLE(); + LCDDevice *lcd {}; }; -// LCD ウィンドウ +// LUNA 前面 LCD ウィンドウ class WXLCDWindow : public WXSubWindow { using inherited = WXSubWindow; public: - WXLCDWindow(wxWindow *parent, wxWindowID id); - ~WXLCDWindow(); - - private: - WXLCDPanel *panel {}; + explicit WXLCDWindow(wxWindow *parent); + ~WXLCDWindow() override; }; -// LCD キャラクタパネル -class WXLCDCharPanel : public wxPanel +// モニタの LCD キャラクタ部パネル +class WXLCDCharPanel : public WXTextPanel { - using inherited = wxPanel; + using inherited = WXTextPanel; public: - WXLCDCharPanel(wxWindow *parent); - ~WXLCDCharPanel(); + explicit WXLCDCharPanel(wxWindow *parent); + ~WXLCDCharPanel() override; + + void FontChanged() override; private: - void OnPaint(wxPaintEvent& event); - void Draw(wxDC&); + void Draw() override; - std::unique_ptr bmpbuf {}; - std::unique_ptr image {}; - std::unique_ptr bitmap {}; + int unit {}; + int u_width {}; + int u_height {}; - wxDECLARE_EVENT_TABLE(); + LCDDevice *lcd {}; }; -// LCD キャラクタウィンドウ +// LCD モニタウィンドウ class WXLCDMonitor : public WXSubWindow { using inherited = WXSubWindow; public: - WXLCDMonitor(wxWindow *parent, wxWindowID id); - ~WXLCDMonitor(); + explicit WXLCDMonitor(wxWindow *parent); + ~WXLCDMonitor() override; + + void FontChanged() override; + bool Layout() override; private: - WXTextScreen *monpanel {}; + WXMonitorPanel *monpanel {}; WXLCDCharPanel *chrpanel {}; + WXBitmapPanel *space {}; };