diff options
author | Lorry Tar Creator <lorry-tar-importer@lorry> | 2017-06-27 06:07:23 +0000 |
---|---|---|
committer | Lorry Tar Creator <lorry-tar-importer@lorry> | 2017-06-27 06:07:23 +0000 |
commit | 1bf1084f2b10c3b47fd1a588d85d21ed0eb41d0c (patch) | |
tree | 46dcd36c86e7fbc6e5df36deb463b33e9967a6f7 /Source/WebCore/rendering/RenderScrollbarTheme.h | |
parent | 32761a6cee1d0dee366b885b7b9c777e67885688 (diff) | |
download | WebKitGtk-tarball-master.tar.gz |
webkitgtk-2.16.5HEADwebkitgtk-2.16.5master
Diffstat (limited to 'Source/WebCore/rendering/RenderScrollbarTheme.h')
-rw-r--r-- | Source/WebCore/rendering/RenderScrollbarTheme.h | 63 |
1 files changed, 30 insertions, 33 deletions
diff --git a/Source/WebCore/rendering/RenderScrollbarTheme.h b/Source/WebCore/rendering/RenderScrollbarTheme.h index e331d009b..ed49bedcb 100644 --- a/Source/WebCore/rendering/RenderScrollbarTheme.h +++ b/Source/WebCore/rendering/RenderScrollbarTheme.h @@ -23,8 +23,7 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifndef RenderScrollbarTheme_h -#define RenderScrollbarTheme_h +#pragma once #include "ScrollbarThemeComposite.h" @@ -34,53 +33,51 @@ class PlatformMouseEvent; class Scrollbar; class ScrollView; -class RenderScrollbarTheme : public ScrollbarThemeComposite { +class RenderScrollbarTheme final : public ScrollbarThemeComposite { public: - virtual ~RenderScrollbarTheme() {}; + virtual ~RenderScrollbarTheme() { } - virtual int scrollbarThickness(ScrollbarControlSize controlSize) { return ScrollbarTheme::theme()->scrollbarThickness(controlSize); } + int scrollbarThickness(ScrollbarControlSize controlSize) override { return ScrollbarTheme::theme().scrollbarThickness(controlSize); } - virtual ScrollbarButtonsPlacement buttonsPlacement() const { return ScrollbarTheme::theme()->buttonsPlacement(); } + ScrollbarButtonsPlacement buttonsPlacement() const override { return ScrollbarTheme::theme().buttonsPlacement(); } - virtual bool supportsControlTints() const { return true; } + bool supportsControlTints() const override { return true; } - virtual void paintScrollCorner(ScrollView*, GraphicsContext* context, const IntRect& cornerRect); + void paintScrollCorner(ScrollView*, GraphicsContext&, const IntRect& cornerRect) override; - virtual bool shouldCenterOnThumb(ScrollbarThemeClient* scrollbar, const PlatformMouseEvent& event) { return ScrollbarTheme::theme()->shouldCenterOnThumb(scrollbar, event); } - - virtual double initialAutoscrollTimerDelay() { return ScrollbarTheme::theme()->initialAutoscrollTimerDelay(); } - virtual double autoscrollTimerDelay() { return ScrollbarTheme::theme()->autoscrollTimerDelay(); } + ScrollbarButtonPressAction handleMousePressEvent(Scrollbar& scrollbar, const PlatformMouseEvent& event, ScrollbarPart pressedPart) override { return ScrollbarTheme::theme().handleMousePressEvent(scrollbar, event, pressedPart); } + + double initialAutoscrollTimerDelay() override { return ScrollbarTheme::theme().initialAutoscrollTimerDelay(); } + double autoscrollTimerDelay() override { return ScrollbarTheme::theme().autoscrollTimerDelay(); } - virtual void registerScrollbar(ScrollbarThemeClient* scrollbar) { return ScrollbarTheme::theme()->registerScrollbar(scrollbar); } - virtual void unregisterScrollbar(ScrollbarThemeClient* scrollbar) { return ScrollbarTheme::theme()->unregisterScrollbar(scrollbar); } + void registerScrollbar(Scrollbar& scrollbar) override { return ScrollbarTheme::theme().registerScrollbar(scrollbar); } + void unregisterScrollbar(Scrollbar& scrollbar) override { return ScrollbarTheme::theme().unregisterScrollbar(scrollbar); } - virtual int minimumThumbLength(ScrollbarThemeClient*); + int minimumThumbLength(Scrollbar&) override; - void buttonSizesAlongTrackAxis(ScrollbarThemeClient*, int& beforeSize, int& afterSize); + void buttonSizesAlongTrackAxis(Scrollbar&, int& beforeSize, int& afterSize); static RenderScrollbarTheme* renderScrollbarTheme(); protected: - virtual bool hasButtons(ScrollbarThemeClient*); - virtual bool hasThumb(ScrollbarThemeClient*); + bool hasButtons(Scrollbar&) override; + bool hasThumb(Scrollbar&) override; - virtual IntRect backButtonRect(ScrollbarThemeClient*, ScrollbarPart, bool painting = false); - virtual IntRect forwardButtonRect(ScrollbarThemeClient*, ScrollbarPart, bool painting = false); - virtual IntRect trackRect(ScrollbarThemeClient*, bool painting = false); + IntRect backButtonRect(Scrollbar&, ScrollbarPart, bool painting = false) override; + IntRect forwardButtonRect(Scrollbar&, ScrollbarPart, bool painting = false) override; + IntRect trackRect(Scrollbar&, bool painting = false) override; - virtual void willPaintScrollbar(GraphicsContext*, ScrollbarThemeClient*) override; - virtual void didPaintScrollbar(GraphicsContext*, ScrollbarThemeClient*) override; + void willPaintScrollbar(GraphicsContext&, Scrollbar&) override; + void didPaintScrollbar(GraphicsContext&, Scrollbar&) override; - virtual void paintScrollbarBackground(GraphicsContext*, ScrollbarThemeClient*); - virtual void paintTrackBackground(GraphicsContext*, ScrollbarThemeClient*, const IntRect&); - virtual void paintTrackPiece(GraphicsContext*, ScrollbarThemeClient*, const IntRect&, ScrollbarPart); - virtual void paintButton(GraphicsContext*, ScrollbarThemeClient*, const IntRect&, ScrollbarPart); - virtual void paintThumb(GraphicsContext*, ScrollbarThemeClient*, const IntRect&); - virtual void paintTickmarks(GraphicsContext*, ScrollbarThemeClient*, const IntRect&) override; - - virtual IntRect constrainTrackRectToTrackPieces(ScrollbarThemeClient*, const IntRect&); + void paintScrollbarBackground(GraphicsContext&, Scrollbar&) override; + void paintTrackBackground(GraphicsContext&, Scrollbar&, const IntRect&) override; + void paintTrackPiece(GraphicsContext&, Scrollbar&, const IntRect&, ScrollbarPart) override; + void paintButton(GraphicsContext&, Scrollbar&, const IntRect&, ScrollbarPart) override; + void paintThumb(GraphicsContext&, Scrollbar&, const IntRect&) override; + void paintTickmarks(GraphicsContext&, Scrollbar&, const IntRect&) override; + + IntRect constrainTrackRectToTrackPieces(Scrollbar&, const IntRect&) override; }; } // namespace WebCore - -#endif // RenderScrollbarTheme_h |