File:  [Isaki's NoNo m68k/m88k emulator] / nono / wx / wxthreadmonitor.h
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs
Wed Apr 29 17:05:53 2026 UTC (2 months, 3 weeks ago) by root
Branches: MAIN, Isaki
CVS tags: v027, v026, HEAD
nono 1.6.0

//
// nono
// Copyright (C) 2025 nono project
// Licensed under nono-license.txt
//

//
// スレッドモニタ
//

#pragma once

#include "wxsubwindow.h"
#include "wxtextpanel.h"

struct ThreadInfo;
class ThreadManager;

class WXThreadMonitorPanel : WXTextPanel
{
	using inherited = WXTextPanel;

 public:
	explicit WXThreadMonitorPanel(wxWindow *parent);
	~WXThreadMonitorPanel() override;

	void FontChanged() override;
	void Draw() override;

 private:
	void OnTimer(wxTimerEvent&);
	void DrawGraph(uint x, uint y, uint w, uint h, const ThreadInfo&);

	bool redraw_all {};

	uint nthreads {};

	// 最も長いスレッド名の長さ。
	uint maxnamelen {};

	wxTimer timer {};

	ThreadManager *thman {};

	wxDECLARE_EVENT_TABLE();
};

class WXThreadMonitorWindow : public WXSubWindow
{
	using inherited = WXSubWindow;

 public:
	explicit WXThreadMonitorWindow(wxWindow *parent);
	~WXThreadMonitorWindow() override;
};

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.