1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-20 12:15:07 +00:00
serenity/Userland/Applications/SystemMonitor/ThreadStackWidget.h
Rodrigo Tobar 1f4a6e7c22 SystemMonitor: Use a TableView to display the thread stack
Using a table display this information in a much more organised and
flexible way than than what can be achieved with a TextEditor.
2021-10-15 22:10:03 -07:00

31 lines
719 B
C++

/*
* Copyright (c) 2018-2020, Andreas Kling <kling@serenityos.org>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#pragma once
#include <LibGUI/TableView.h>
#include <LibGUI/Widget.h>
class ThreadStackWidget final : public GUI::Widget {
C_OBJECT(ThreadStackWidget)
public:
virtual ~ThreadStackWidget() override;
void set_ids(pid_t pid, pid_t tid);
void refresh();
private:
ThreadStackWidget();
virtual void show_event(GUI::ShowEvent&) override;
virtual void hide_event(GUI::HideEvent&) override;
virtual void custom_event(Core::CustomEvent&) override;
pid_t m_pid { -1 };
pid_t m_tid { -1 };
RefPtr<GUI::TableView> m_stack_table;
RefPtr<Core::Timer> m_timer;
};