#include "xfa/fwl/cfwl_scrollbar.h"
#include <algorithm>
#include <memory>
#include <utility>
#include "xfa/fwl/cfwl_app.h"
#include "xfa/fwl/cfwl_messagemouse.h"
#include "xfa/fwl/cfwl_messagemousewheel.h"
#include "xfa/fwl/cfwl_notedriver.h"
#include "xfa/fwl/cfwl_themebackground.h"
#include "xfa/fwl/cfwl_themepart.h"
#include "xfa/fwl/ifwl_themeprovider.h"
namespace pdfium {
namespace {
constexpr int kScrollbarElapsedMsecs = …;
constexpr float kMinThumbSize = …;
}
CFWL_ScrollBar::CFWL_ScrollBar(CFWL_App* app,
const Properties& properties,
CFWL_Widget* pOuter)
: … { … }
CFWL_ScrollBar::~CFWL_ScrollBar() = default;
FWL_Type CFWL_ScrollBar::GetClassID() const { … }
void CFWL_ScrollBar::Update() { … }
void CFWL_ScrollBar::DrawWidget(CFGAS_GEGraphics* pGraphics,
const CFX_Matrix& matrix) { … }
void CFWL_ScrollBar::SetTrackPos(float fTrackPos) { … }
bool CFWL_ScrollBar::DoScroll(CFWL_EventScroll::Code dwCode, float fPos) { … }
void CFWL_ScrollBar::DrawUpperTrack(CFGAS_GEGraphics* pGraphics,
const CFX_Matrix& mtMatrix) { … }
void CFWL_ScrollBar::DrawLowerTrack(CFGAS_GEGraphics* pGraphics,
const CFX_Matrix& mtMatrix) { … }
void CFWL_ScrollBar::DrawMaxArrowBtn(CFGAS_GEGraphics* pGraphics,
const CFX_Matrix& mtMatrix) { … }
void CFWL_ScrollBar::DrawMinArrowBtn(CFGAS_GEGraphics* pGraphics,
const CFX_Matrix& mtMatrix) { … }
void CFWL_ScrollBar::DrawThumb(CFGAS_GEGraphics* pGraphics,
const CFX_Matrix& mtMatrix) { … }
void CFWL_ScrollBar::Layout() { … }
void CFWL_ScrollBar::CalcButtonLen() { … }
CFX_RectF CFWL_ScrollBar::CalcMinButtonRect() { … }
CFX_RectF CFWL_ScrollBar::CalcMaxButtonRect() { … }
CFX_RectF CFWL_ScrollBar::CalcThumbButtonRect(const CFX_RectF& rtThumb) { … }
CFX_RectF CFWL_ScrollBar::CalcMinTrackRect(const CFX_RectF& rtMinRect) { … }
CFX_RectF CFWL_ScrollBar::CalcMaxTrackRect(const CFX_RectF& rtMaxRect) { … }
float CFWL_ScrollBar::GetTrackPointPos(const CFX_PointF& point) { … }
bool CFWL_ScrollBar::SendEvent() { … }
bool CFWL_ScrollBar::OnScroll(CFWL_EventScroll::Code dwCode, float fPos) { … }
void CFWL_ScrollBar::OnProcessMessage(CFWL_Message* pMessage) { … }
void CFWL_ScrollBar::OnDrawWidget(CFGAS_GEGraphics* pGraphics,
const CFX_Matrix& matrix) { … }
void CFWL_ScrollBar::OnLButtonDown(const CFX_PointF& point) { … }
void CFWL_ScrollBar::OnLButtonUp(const CFX_PointF& point) { … }
void CFWL_ScrollBar::OnMouseMove(const CFX_PointF& point) { … }
void CFWL_ScrollBar::OnMouseLeave() { … }
void CFWL_ScrollBar::OnMouseWheel(const CFX_Vector& delta) { … }
void CFWL_ScrollBar::DoMouseDown(int32_t iItem,
const CFX_RectF& rtItem,
CFWL_PartState* pState,
const CFX_PointF& point) { … }
void CFWL_ScrollBar::DoMouseUp(int32_t iItem,
const CFX_RectF& rtItem,
CFWL_PartState* pState,
const CFX_PointF& point) { … }
void CFWL_ScrollBar::DoMouseMove(int32_t iItem,
const CFX_RectF& rtItem,
CFWL_PartState* pState,
const CFX_PointF& point) { … }
void CFWL_ScrollBar::DoMouseLeave(int32_t iItem,
const CFX_RectF& rtItem,
CFWL_PartState* pState) { … }
void CFWL_ScrollBar::DoMouseHover(int32_t iItem,
const CFX_RectF& rtItem,
CFWL_PartState* pState) { … }
void CFWL_ScrollBar::OnTimerFired() { … }
}