--- nono/wx/wxmainview.h 2026/04/29 17:04:53 1.1.1.8 +++ nono/wx/wxmainview.h 2026/04/29 17:05:04 1.1.1.10 @@ -6,17 +6,18 @@ #pragma once -#include "wxheader.h" +#include "wxnono.h" #include -class WXMainView - : public wxPanel +class WXMainView : public wxPanel { using inherited = wxPanel; public: WXMainView(wxWindow *); virtual ~WXMainView() override; + bool Init(); + void DoRefresh(); void DoResize(double scale); @@ -25,6 +26,10 @@ class WXMainView // 現在のスケール (wxapp が初期値を指定するため static 変数にしてある) static double screen_scale; + // 文字入力モードを取得・設定 + bool GetCharInputMode() const { return is_charinput; } + void SetCharInputMode(bool enable); + // マウスモードを設定 void SetMouseMode(bool enable); // マウスモードを取得 (キャプチャされているなら true) @@ -35,6 +40,7 @@ class WXMainView // キー入力イベント (WXSoftKeyPanel からも呼ばれる) void OnKeyDown(wxKeyEvent& event); void OnKeyUp(wxKeyEvent& event); + void OnChar(wxKeyEvent& event); private: void OnTimer(wxTimerEvent& event); @@ -58,6 +64,9 @@ class WXMainView static const int keycode_table[0x190]; + // 文字入力モードなら true + bool is_charinput {}; + // マウスモード (キャプチャしていれば true) bool mousemode {}; // 前回のマウス座標とボタン