RenderScrollbarTheme.h [plain text]
#pragma once
#include "ScrollbarThemeComposite.h"
namespace WebCore {
class PlatformMouseEvent;
class Scrollbar;
class ScrollView;
class RenderScrollbarTheme final : public ScrollbarThemeComposite {
public:
virtual ~RenderScrollbarTheme() { }
int scrollbarThickness(ScrollbarControlSize controlSize) override { return ScrollbarTheme::theme().scrollbarThickness(controlSize); }
ScrollbarButtonsPlacement buttonsPlacement() const override { return ScrollbarTheme::theme().buttonsPlacement(); }
bool supportsControlTints() const override { return true; }
void paintScrollCorner(ScrollView*, GraphicsContext&, const IntRect& cornerRect) override;
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(); }
void registerScrollbar(Scrollbar& scrollbar) override { return ScrollbarTheme::theme().registerScrollbar(scrollbar); }
void unregisterScrollbar(Scrollbar& scrollbar) override { return ScrollbarTheme::theme().unregisterScrollbar(scrollbar); }
int minimumThumbLength(Scrollbar&) override;
void buttonSizesAlongTrackAxis(Scrollbar&, int& beforeSize, int& afterSize);
static RenderScrollbarTheme* renderScrollbarTheme();
protected:
bool hasButtons(Scrollbar&) override;
bool hasThumb(Scrollbar&) override;
IntRect backButtonRect(Scrollbar&, ScrollbarPart, bool painting = false) override;
IntRect forwardButtonRect(Scrollbar&, ScrollbarPart, bool painting = false) override;
IntRect trackRect(Scrollbar&, bool painting = false) override;
void willPaintScrollbar(GraphicsContext&, Scrollbar&) override;
void didPaintScrollbar(GraphicsContext&, Scrollbar&) override;
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;
};
}