--- nono/wx/wxsoftkey.h 2026/04/29 17:05:08 1.1.1.11 +++ nono/wx/wxsoftkey.h 2026/04/29 17:05:27 1.1.1.14 @@ -13,11 +13,13 @@ #include "wxsubwindow.h" #include "wxtextpanel.h" #include "keyboard.h" -#include "vm.h" +#include "mainapp.h" #include #include #include +class Keyboard; + // キー描画用のデータ構造体 struct keydata_t { @@ -72,7 +74,7 @@ class WXSoftKeyPanel : public WXTextPane WXSoftKeyPanel(wxWindow *parent, const std::vector& keydata_, int u_width_, int u_height_); public: - virtual ~WXSoftKeyPanel() override; + ~WXSoftKeyPanel() override; // フォントサイズ変更 void FontChanged() override; @@ -81,13 +83,14 @@ class WXSoftKeyPanel : public WXTextPane void UpdateTitle(); void InitColorKeytop(int num); + void InitIcon(); void OnKeyChanged(wxCommandEvent& event); void OnTimer(wxTimerEvent& event); void Draw() override; void DrawKey(const keydata_t& key); void DrawEnterKey(); - void DrawEnterMark(int x, int y); + void DrawBuzzer(const keydata_t& key); virtual int DrawLED(const keydata_t& key) = 0; const keydata_t& FindKeydata(uint) const; @@ -129,6 +132,9 @@ class WXSoftKeyPanel : public WXTextPane Rect enter_top {}; Rect enter_btm {}; + // アイコン + std::unique_ptr enter_icon /*{}*/; + // 色 ColorPalette color {}; @@ -152,6 +158,8 @@ class WXSoftKeyPanel : public WXTextPane // キー描画データ (派生クラス側から渡される) const std::vector& keydata; + Keyboard *keyboard {}; + // イベントテーブル wxDECLARE_EVENT_TABLE(); }; @@ -161,8 +169,8 @@ class WXLunaSoftKeyPanel : public WXSoft { using inherited = WXSoftKeyPanel; public: - WXLunaSoftKeyPanel(wxWindow *parent); - virtual ~WXLunaSoftKeyPanel() override; + explicit WXLunaSoftKeyPanel(wxWindow *parent); + ~WXLunaSoftKeyPanel() override; private: int DrawLED(const keydata_t& key) override; @@ -176,8 +184,8 @@ class WXX68kSoftKeyPanel : public WXSoft { using inherited = WXSoftKeyPanel; public: - WXX68kSoftKeyPanel(wxWindow *parent); - virtual ~WXX68kSoftKeyPanel() override; + explicit WXX68kSoftKeyPanel(wxWindow *parent); + ~WXX68kSoftKeyPanel() override; private: int DrawLED(const keydata_t& key) override; @@ -191,8 +199,8 @@ class WXSoftKeyWindow : public WXSubWind { using inherited = WXSubWindow; public: - WXSoftKeyWindow(wxWindow *parent, vmtype_t vmtype); - virtual ~WXSoftKeyWindow() override; + WXSoftKeyWindow(wxWindow *parent, VMType vmtype); + ~WXSoftKeyWindow() override; private: // キーボードパネル