|
|
1.1 root 1: //
2: // nono
1.1.1.2 ! root 3: // Copyright (C) 2020 nono project
! 4: // Licensed under nono-license.txt
1.1 root 5: //
6:
7: #pragma once
8:
9: #include "wxsubwindow.h"
10: #include "wxtextscreen.h"
11:
12: class WXLogMonitor : public WXSubWindow
13: {
1.1.1.2 ! root 14: using inherited = WXSubWindow;
1.1 root 15:
16: public:
17: WXLogMonitor(wxWindow *, wxWindowID);
18: virtual ~WXLogMonitor();
19:
20: virtual void SetFontSize(fontsize_t fontsize);
21:
22: private:
23: void OnTimer(wxTimerEvent& event);
24:
25: void Append(const char *);
26:
27: // テキストスクリーンコントロール
28: WXTextScreen *screen = NULL;
29:
30: // テキストスクリーン
31: TextScreen text;
32:
33: int col = 0;
34: int row = 0;
35:
36: // ログバッファ
37: // ここは属性フィールドを持たないテキストによる循環バッファ
1.1.1.2 ! root 38: std::unique_ptr<uint8[]> logbuf {};
1.1 root 39:
40: // 書き込み位置
41: int target = 0;
42:
43: // UTF-8 -> CP932 変換
44: wxCSConv conv { "CP932" };
45:
46: wxTimer timer;
47:
48: // イベントテーブル
49: wxDECLARE_EVENT_TABLE();
50: };
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.