summaryrefslogtreecommitdiff
path: root/LibGUI/GScrollBar.h
diff options
context:
space:
mode:
authorAndreas Kling <awesomekling@gmail.com>2019-02-10 06:51:01 +0100
committerAndreas Kling <awesomekling@gmail.com>2019-02-10 06:51:01 +0100
commit9ea2131adffe83559b160d9a17b1fbe2dffb25fe (patch)
tree5dcb4fded63c8ef76963fd12348cad2a0dc235fd /LibGUI/GScrollBar.h
parent6b8af2f33a63becabaf4f6c11032b4a4efb96df2 (diff)
downloadserenity-9ea2131adffe83559b160d9a17b1fbe2dffb25fe.zip
LibGUI: Support dragging the GScrollBar scrubber.
This was pleasantly easy to implement with the global mouse tracking. :^)
Diffstat (limited to 'LibGUI/GScrollBar.h')
-rw-r--r--LibGUI/GScrollBar.h12
1 files changed, 9 insertions, 3 deletions
diff --git a/LibGUI/GScrollBar.h b/LibGUI/GScrollBar.h
index 48f1199bb1..4fd458afd3 100644
--- a/LibGUI/GScrollBar.h
+++ b/LibGUI/GScrollBar.h
@@ -24,19 +24,25 @@ public:
private:
virtual void paint_event(GPaintEvent&) override;
virtual void mousedown_event(GMouseEvent&) override;
+ virtual void mouseup_event(GMouseEvent&) override;
+ virtual void mousemove_event(GMouseEvent&) override;
virtual const char* class_name() const override { return "GScrollBar"; }
int button_size() const { return 16; }
Rect up_button_rect() const;
Rect down_button_rect() const;
- Rect pgup_rect() const;
- Rect pgdn_rect() const;
+ Rect upper_gutter_rect() const;
+ Rect lower_gutter_rect() const;
Rect scrubber_rect() const;
+ int scrubbable_range_in_pixels() const;
int m_min { 0 };
int m_max { 0 };
int m_value { 0 };
int m_step { 1 };
int m_big_step { 5 };
-};
+ bool m_scrubbing { false };
+ int m_scrub_start_value { 0 };
+ Point m_scrub_origin;
+};