ScrollbarThemeGtk.h [plain text]
#ifndef ScrollbarThemeGtk_h
#define ScrollbarThemeGtk_h
#include "ScrollbarThemeComposite.h"
namespace WebCore {
class Scrollbar;
class ScrollbarThemeGtk final : public ScrollbarThemeComposite {
public:
virtual ~ScrollbarThemeGtk();
bool hasButtons(Scrollbar&) override;
bool hasThumb(Scrollbar&) override;
IntRect backButtonRect(Scrollbar&, ScrollbarPart, bool) override;
IntRect forwardButtonRect(Scrollbar&, ScrollbarPart, bool) override;
IntRect trackRect(Scrollbar&, bool) override;
#ifndef GTK_API_VERSION_2
ScrollbarThemeGtk();
bool paint(Scrollbar&, GraphicsContext&, const IntRect& damageRect) override;
ScrollbarButtonPressAction handleMousePressEvent(Scrollbar&, const PlatformMouseEvent&, ScrollbarPart) override;
int scrollbarThickness(ScrollbarControlSize, ScrollbarExpansionState = ScrollbarExpansionState::Expanded) override;
int minimumThumbLength(Scrollbar&) override;
Seconds initialAutoscrollTimerDelay() override { return 200_ms; }
Seconds autoscrollTimerDelay() override { return 20_ms; }
void themeChanged() override;
bool usesOverlayScrollbars() const override { return m_usesOverlayScrollbars; }
bool invalidateOnMouseEnterExit() override { return m_usesOverlayScrollbars; }
private:
void updateThemeProperties();
bool m_hasForwardButtonStartPart : 1;
bool m_hasForwardButtonEndPart : 1;
bool m_hasBackButtonStartPart : 1;
bool m_hasBackButtonEndPart : 1;
bool m_usesOverlayScrollbars { false };
#endif // GTK_API_VERSION_2
};
}
#endif