ScrollbarThemeMac.h [plain text]
#ifndef ScrollbarThemeMac_h
#define ScrollbarThemeMac_h
#include "ScrollbarThemeComposite.h"
typedef id ScrollbarPainter;
namespace WebCore {
class ScrollbarThemeMac : public ScrollbarThemeComposite {
public:
ScrollbarThemeMac();
virtual ~ScrollbarThemeMac();
void preferencesChanged();
virtual void updateEnabledState(ScrollbarThemeClient*);
virtual bool paint(ScrollbarThemeClient*, GraphicsContext*, const IntRect& damageRect);
virtual int scrollbarThickness(ScrollbarControlSize = RegularScrollbar);
virtual bool supportsControlTints() const { return true; }
virtual bool usesOverlayScrollbars() const;
virtual void updateScrollbarOverlayStyle(ScrollbarThemeClient*);
virtual double initialAutoscrollTimerDelay();
virtual double autoscrollTimerDelay();
virtual ScrollbarButtonsPlacement buttonsPlacement() const;
virtual void registerScrollbar(ScrollbarThemeClient*);
virtual void unregisterScrollbar(ScrollbarThemeClient*);
void setNewPainterForScrollbar(ScrollbarThemeClient*, ScrollbarPainter);
ScrollbarPainter painterForScrollbar(ScrollbarThemeClient*);
static bool isCurrentlyDrawingIntoLayer();
static void setIsCurrentlyDrawingIntoLayer(bool);
protected:
virtual bool hasButtons(ScrollbarThemeClient*);
virtual bool hasThumb(ScrollbarThemeClient*);
virtual IntRect backButtonRect(ScrollbarThemeClient*, ScrollbarPart, bool painting = false);
virtual IntRect forwardButtonRect(ScrollbarThemeClient*, ScrollbarPart, bool painting = false);
virtual IntRect trackRect(ScrollbarThemeClient*, bool painting = false);
virtual int maxOverlapBetweenPages() { return 40; }
virtual int minimumThumbLength(ScrollbarThemeClient*);
virtual bool shouldCenterOnThumb(ScrollbarThemeClient*, const PlatformMouseEvent&);
virtual bool shouldDragDocumentInsteadOfThumb(ScrollbarThemeClient*, const PlatformMouseEvent&);
int scrollbarPartToHIPressedState(ScrollbarPart);
#if USE(ACCELERATED_COMPOSITING) && ENABLE(RUBBER_BANDING)
virtual void setUpOverhangAreasLayerContents(GraphicsLayer*, const Color&) OVERRIDE;
virtual void setUpContentShadowLayer(GraphicsLayer*) OVERRIDE;
#endif
};
}
#endif