mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 18:28:12 +00:00

The architecture here is a little bit convoluted. I ended up making a new container widget (TimelineContainer) that works similarly to GUI::ScrollableContainerWidget but has two subwidgets (a fixed header that only scrolls vertically, and the timeline view that scrolls on both axes.) It would be nice to generalize this mechanism eventually and move it back into LibGUI, but for now let's go with a special widget for Profiler so we can continue iterating on the GUI. :^)
31 lines
502 B
C++
31 lines
502 B
C++
/*
|
|
* Copyright (c) 2021, Andreas Kling <kling@serenityos.org>
|
|
*
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include <LibGUI/Frame.h>
|
|
|
|
namespace Profiler {
|
|
|
|
class Process;
|
|
|
|
class TimelineHeader final : public GUI::Frame {
|
|
C_OBJECT(TimelineHeader);
|
|
|
|
public:
|
|
virtual ~TimelineHeader();
|
|
|
|
private:
|
|
TimelineHeader(Process const&);
|
|
|
|
virtual void paint_event(GUI::PaintEvent&) override;
|
|
|
|
Process const& m_process;
|
|
RefPtr<Gfx::Bitmap> m_icon;
|
|
String m_text;
|
|
};
|
|
|
|
}
|