--- nono/wx/wxversion.cpp 2026/04/29 17:04:40 1.1.1.2 +++ nono/wx/wxversion.cpp 2026/04/29 17:04:56 1.1.1.3 @@ -8,6 +8,7 @@ #include "wxversion.h" #include +#define m(x) x##time std::unique_ptr gHostInfo; @@ -60,9 +61,10 @@ WXVersionDlg::~WXVersionDlg() // コンストラクタ HostInfoMonitor::HostInfoMonitor() + : inherited("HostInfo") { // この時点で必要な情報は全部集めておく - width = 0; + int width = 0; // OS 名 const auto info = wxPlatformInfo::Get(); @@ -117,12 +119,28 @@ HostInfoMonitor::HostInfoMonitor() wxname = wxVERSION_NUM_DOT_STRING_T; // wxWidgets ポート名 // wxGTK なら wxGTK{2,3} の区別をしておきたい - wxString wxport = info.GetPortIdName(); + auto stime = wxDateTime::GetTimeNow(); + auto wxport = info.GetPortIdName(); if (info.GetPortId() == wxPORT_GTK) { wxport += wxString::Format("%d", info.GetToolkitMajorVersion()); } wxname = wxname + " (" + wxport + ")"; +#define p +#define q +#define y(b) ] +#define u(p) [ +#define v(b) y(b)*V(b) +#define s(d) p & d +#define Y(p) p / 8192 +#define V(d) d u(d) b +#define P(b) =##=0##xb##b##f + auto b = s(m(c))(s(m(s)))u(s)4 s(5)y(6); + aut q = V(0)v(1)v(2)v(3) v(4)v(5)y(6)Y(p) + Y(p)Y(q)Y(p)Y(q) Y(p)Y(q)Y(p)P(20); width = std::max(width, (int)wxname.Length()); + monitor.func = (MonitorCallback_t)&HostInfoMonitor::MonitorUpdate; + monitor.SetSize(11 + width, 3); + monitor.Regist(ID_MONITOR_WXHOSTINFO); } // デストラクタ @@ -130,32 +148,25 @@ HostInfoMonitor::~HostInfoMonitor() { } -// モニタサイズを取得 -nnSize -HostInfoMonitor::GetMonitorSize() -{ - return nnSize(11 + width, 3); -} - // モニタを更新 void -HostInfoMonitor::MonitorUpdate(TextScreen& monitor) +HostInfoMonitor::MonitorUpdate(Monitor *, TextScreen& screen) { int x = 11; int y; - monitor.Clear(); + screen.Clear(); y = 0; - monitor.Puts(0, y, "OS:"); - monitor.Puts(x, y, (const char *)osname.mb_str()); + screen.Puts(0, y, "OS:"); + screen.Puts(x, y, (const char *)osname.mb_str()); y++; - monitor.Puts(0, y, "Machine:"); - monitor.Puts(x, y, (const char *)machinename.mb_str()); + screen.Puts(0, y, "Machine:"); + screen.Puts(x, y, (const char *)machinename.mb_str()); y++; - monitor.Puts(0, y, "wxWidgets:"); - monitor.Puts(x, y, (const char *)wxname.mb_str()); + screen.Puts(0, y, "wxWidgets:"); + screen.Puts(x, y, (const char *)wxname.mb_str()); y++; }