diff options
| author | Josh Ferrell <josh@vector35.com> | 2022-11-30 15:53:22 -0500 |
|---|---|---|
| committer | Josh Ferrell <josh@vector35.com> | 2022-11-30 16:26:04 -0500 |
| commit | 9372cd0e81000ca4d5e412e8eecde16424d346bd (patch) | |
| tree | d33a0afb86f706ba788828b805cb31f782e67360 /ui/linearview.h | |
| parent | 5d3258ccaf934b9f24620be65a081dcc3737acaa (diff) | |
Add sticky header to linear view
Diffstat (limited to 'ui/linearview.h')
| -rw-r--r-- | ui/linearview.h | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/ui/linearview.h b/ui/linearview.h index 4cf67bdb..84cf1c22 100644 --- a/ui/linearview.h +++ b/ui/linearview.h @@ -111,6 +111,25 @@ public: virtual bool deserialize(const Json::Value& value) override; }; +class LinearView; + +class StickyHeader: public QWidget +{ + RenderContext m_render; + LinearView* m_parent; + BinaryViewRef m_data; + + LinearViewLine m_line; +public: + StickyHeader(LinearView* parent, BinaryViewRef data); + + void update(const LinearViewLine& line); + void updateFonts() { m_render.update(); } + + virtual void paintEvent(QPaintEvent* event) override; +}; + + /*! \ingroup linearview @@ -160,6 +179,7 @@ class BINARYNINJAUIAPI LinearView : public QAbstractScrollArea, public View, pub ViewFrame* m_view; uint64_t m_allocatedLength; + StickyHeader* m_header; RenderContext m_render; int m_cols, m_rows; uint64_t m_scrollBarMultiplier; |
