This source file includes following definitions.
- isOverlay
- value
- location
- size
- enabled
- maximum
- totalSize
- isScrollViewScrollbar
- isScrollableAreaActive
- getTickmarks
- controlSize
- pressedPart
- hoveredPart
- scrollbarOverlayStyle
- orientation
- isLeftSideVerticalScrollbar
- isCustomScrollbar
- isAlphaLocked
- setIsAlphaLocked
#include "config.h"
#include "platform/exported/WebScrollbarImpl.h"
#include "platform/geometry/IntRect.h"
#include "platform/scroll/Scrollbar.h"
namespace blink {
WebScrollbarImpl::WebScrollbarImpl(WebCore::Scrollbar* scrollbar)
: m_scrollbar(scrollbar)
{
}
bool WebScrollbarImpl::isOverlay() const
{
return m_scrollbar->isOverlayScrollbar();
}
int WebScrollbarImpl::value() const
{
return m_scrollbar->value();
}
WebPoint WebScrollbarImpl::location() const
{
return m_scrollbar->location();
}
WebSize WebScrollbarImpl::size() const
{
return m_scrollbar->size();
}
bool WebScrollbarImpl::enabled() const
{
return m_scrollbar->enabled();
}
int WebScrollbarImpl::maximum() const
{
return m_scrollbar->maximum();
}
int WebScrollbarImpl::totalSize() const
{
return m_scrollbar->totalSize();
}
bool WebScrollbarImpl::isScrollViewScrollbar() const
{
return m_scrollbar->isScrollViewScrollbar();
}
bool WebScrollbarImpl::isScrollableAreaActive() const
{
return m_scrollbar->isScrollableAreaActive();
}
void WebScrollbarImpl::getTickmarks(WebVector<WebRect>& webTickmarks) const
{
Vector<WebCore::IntRect> tickmarks;
m_scrollbar->getTickmarks(tickmarks);
WebVector<WebRect> result(tickmarks.size());
for (size_t i = 0; i < tickmarks.size(); ++i)
result[i] = tickmarks[i];
webTickmarks.swap(result);
}
WebScrollbar::ScrollbarControlSize WebScrollbarImpl::controlSize() const
{
return static_cast<WebScrollbar::ScrollbarControlSize>(m_scrollbar->controlSize());
}
WebScrollbar::ScrollbarPart WebScrollbarImpl::pressedPart() const
{
return static_cast<WebScrollbar::ScrollbarPart>(m_scrollbar->pressedPart());
}
WebScrollbar::ScrollbarPart WebScrollbarImpl::hoveredPart() const
{
return static_cast<WebScrollbar::ScrollbarPart>(m_scrollbar->hoveredPart());
}
WebScrollbar::ScrollbarOverlayStyle WebScrollbarImpl::scrollbarOverlayStyle() const
{
return static_cast<WebScrollbar::ScrollbarOverlayStyle>(m_scrollbar->scrollbarOverlayStyle());
}
WebScrollbar::Orientation WebScrollbarImpl::orientation() const
{
return static_cast<WebScrollbar::Orientation>(m_scrollbar->orientation());
}
bool WebScrollbarImpl::isLeftSideVerticalScrollbar() const
{
return m_scrollbar->isLeftSideVerticalScrollbar();
}
bool WebScrollbarImpl::isCustomScrollbar() const
{
return m_scrollbar->isCustomScrollbar();
}
bool WebScrollbarImpl::isAlphaLocked() const
{
return m_scrollbar->isAlphaLocked();
}
void WebScrollbarImpl::setIsAlphaLocked(bool flag)
{
m_scrollbar->setIsAlphaLocked(flag);
}
}