--- nono/wx/wxstatuspanel.h 2026/04/29 17:05:12 1.1.1.5 +++ nono/wx/wxstatuspanel.h 2026/04/29 17:05:16 1.1.1.6 @@ -15,8 +15,11 @@ #include "scsibus.h" #include -class Indicator; class HostNetDevice; +class Indicator; +class NewsCtlrDevice; +class PowerDevice; +class Syncer; class WXStatusPanel; // インジケータ情報 (ほぼ構造体) @@ -41,6 +44,8 @@ class Indicator FDD1, FDD2, FDD3, + NEWSLED1, + NEWSLED2, }; protected: using dispfunc_t = void (WXStatusPanel::*)(const Indicator *); @@ -52,6 +57,11 @@ class Indicator minlen = minlen_; draw = draw_; } + Indicator(int id_, int minlen_, dispfunc_t draw_, const std::string& text_) + : Indicator(id_, minlen_, draw_) + { + text = text_; + } virtual ~Indicator() = default; // インジケータ識別子 @@ -94,6 +104,12 @@ class Indicator class WXStatusPanel : public WXTextPanel { using inherited = WXTextPanel; + + struct FDstat { + bool loaded {}; + FDDDevice::LED access_led {}; + bool eject_led {}; + }; public: WXStatusPanel(wxWindow *parent); virtual ~WXStatusPanel() override; @@ -119,6 +135,8 @@ class WXStatusPanel : public WXTextPanel void DrawSCSI(const Indicator *); void DrawNet(const Indicator *); void DrawFD(const Indicator *); + void DrawNewsLED1(const Indicator *); + void DrawNewsLED2(const Indicator *); void DrawPower(const Indicator *); void DrawTextLED(const Indicator *, Color fg, Color bg); void DClickPerf(const Indicator *); @@ -129,8 +147,10 @@ class WXStatusPanel : public WXTextPanel std::vector indicators {}; // インジケータ表示用 + PowerDevice *power {}; bool ispower {}; bool powerled {}; + Syncer *syncer {}; int perf_mode {}; int perf_rate {}; std::shared_ptr scsibus {}; @@ -147,9 +167,13 @@ class WXStatusPanel : public WXTextPanel uint64 net_rx_pkts {}; bool net_tx_active {}; bool net_rx_active {}; - std::array fd_loaded {}; - std::array fd_access_led {}; - std::array fd_eject_led {}; + std::vector fdd_vector {}; // 存在するドライブのリスト + std::array fdstat {}; // こっちは穴空き配列 + NewsCtlrDevice *newsctlr {}; + int newsled {}; + + // 丸いアクセスマーク (X68k FD 用) + std::unique_ptr accmark /*{}*/; // 背景再描画 bool refresh_background {}; @@ -162,6 +186,5 @@ class WXStatusPanel : public WXTextPanel static const uint8 AccessMark12[]; static const uint8 AccessMark16[]; + static const uint8 AccessMark24[]; }; - -extern WXStatusPanel *gStatusPanel;