Lines Matching refs:scrollbar
57 void ScrollbarThemeMacOverlayAPI::registerScrollbar(ScrollbarThemeClient* scrollbar)
59 ScrollbarThemeMacCommon::registerScrollbar(scrollbar);
61 bool isHorizontal = scrollbar->orientation() == HorizontalScrollbar;
62 ScrollbarPainter scrollbarPainter = [NSClassFromString(@"NSScrollerImp") scrollerImpWithStyle:recommendedScrollerStyle() controlSize:(NSControlSize)scrollbar->controlSize() horizontal:isHorizontal replacingScrollerImp:nil];
63 scrollbarPainterMap()->add(scrollbar, scrollbarPainter);
64 updateEnabledState(scrollbar);
65 updateScrollbarOverlayStyle(scrollbar);
68 void ScrollbarThemeMacOverlayAPI::unregisterScrollbar(ScrollbarThemeClient* scrollbar)
70 scrollbarPainterMap()->remove(scrollbar);
72 ScrollbarThemeMacCommon::unregisterScrollbar(scrollbar);
75 void ScrollbarThemeMacOverlayAPI::setNewPainterForScrollbar(ScrollbarThemeClient* scrollbar, ScrollbarPainter newPainter)
77 scrollbarPainterMap()->set(scrollbar, newPainter);
78 updateEnabledState(scrollbar);
79 updateScrollbarOverlayStyle(scrollbar);
82 ScrollbarPainter ScrollbarThemeMacOverlayAPI::painterForScrollbar(ScrollbarThemeClient* scrollbar)
84 return scrollbarPainterMap()->get(scrollbar).get();
87 void ScrollbarThemeMacOverlayAPI::paintTrackBackground(GraphicsContext* context, ScrollbarThemeClient* scrollbar, const IntRect& rect) {
94 CGRect frameRect = scrollbar->frameRect();
95 ScrollbarPainter scrollbarPainter = painterForScrollbar(scrollbar);
96 [scrollbarPainter setEnabled:scrollbar->enabled()];
103 void ScrollbarThemeMacOverlayAPI::paintThumb(GraphicsContext* context, ScrollbarThemeClient* scrollbar, const IntRect& rect) {
110 ScrollbarPainter scrollbarPainter = painterForScrollbar(scrollbar);
111 [scrollbarPainter setEnabled:scrollbar->enabled()];
115 if (scrollbar->enabled())
118 // If this state is not set, then moving the cursor over the scrollbar area will only cause the
119 // scrollbar to engorge when moved over the top of the scrollbar area.
120 [scrollbarPainter setBoundsSize: NSSizeFromCGSize(scrollbar->frameRect().size())];
136 void ScrollbarThemeMacOverlayAPI::updateScrollbarOverlayStyle(ScrollbarThemeClient* scrollbar)
138 ScrollbarPainter painter = painterForScrollbar(scrollbar);
139 switch (scrollbar->scrollbarOverlayStyle()) {
157 bool ScrollbarThemeMacOverlayAPI::hasThumb(ScrollbarThemeClient* scrollbar)
159 ScrollbarPainter painter = painterForScrollbar(scrollbar);
162 return scrollbar->enabled() && (scrollbar->orientation() == HorizontalScrollbar ?
163 scrollbar->width() :
164 scrollbar->height()) >= minLengthForThumb;
167 IntRect ScrollbarThemeMacOverlayAPI::backButtonRect(ScrollbarThemeClient* scrollbar, ScrollbarPart part, bool painting)
173 IntRect ScrollbarThemeMacOverlayAPI::forwardButtonRect(ScrollbarThemeClient* scrollbar, ScrollbarPart part, bool painting)
179 IntRect ScrollbarThemeMacOverlayAPI::trackRect(ScrollbarThemeClient* scrollbar, bool painting)
181 ASSERT(!hasButtons(scrollbar));
182 return scrollbar->frameRect();
185 int ScrollbarThemeMacOverlayAPI::minimumThumbLength(ScrollbarThemeClient* scrollbar)
187 return [painterForScrollbar(scrollbar) knobMinLength];
190 void ScrollbarThemeMacOverlayAPI::updateEnabledState(ScrollbarThemeClient* scrollbar)
192 [painterForScrollbar(scrollbar) setEnabled:scrollbar->enabled()];