7#ifndef XFA_FWL_CFWL_SCROLLBAR_H_
8#define XFA_FWL_CFWL_SCROLLBAR_H_
14#include "core/fxcrt/cfx_timer.h"
15#include "core/fxcrt/check.h"
16#include "xfa/fwl/cfwl_eventscroll.h"
17#include "xfa/fwl/cfwl_themepart.h"
18#include "xfa/fwl/cfwl_widget.h"
22#define FWL_STYLEEXT_SCB_Horz (0L
<< 0
)
23#define FWL_STYLEEXT_SCB_Vert (1L
<< 0
)
43 void GetRange(
float* fMin,
float* fMax)
const {
52 void SetPageSize(
float fPageSize) { m_fPageSize = fPageSize; }
54 void SetStepSize(
float fStepSize) { m_fStepSize = fStepSize; }
55 float GetPos()
const {
return m_fPos; }
56 void SetPos(
float fPos) { m_fPos = fPos; }
60 CFWL_ScrollBar(CFWL_App* app,
77 float GetTrackPointPos(
const CFX_PointF& point);
80 bool OnScroll(CFWL_EventScroll::
Code dwCode,
float fPos);
86 bool DoScroll(CFWL_EventScroll::
Code dwCode,
float fPos);
87 void DoMouseDown(int32_t iItem,
91 void DoMouseUp(int32_t iItem,
95 void DoMouseMove(int32_t iItem,
99 void DoMouseLeave(int32_t iItem,
102 void DoMouseHover(int32_t iItem,
106 float m_fRangeMin = 0.0f;
107 float m_fRangeMax = -1.0f;
108 float m_fPageSize = 0.0f;
109 float m_fStepSize = 0.0f;
111 float m_fTrackPos = 0.0f;
117 float m_fLastTrackPos = 0.0f;
119 int32_t m_iMouseWheel = 0;
120 float m_fButtonLen = 0.0f;
121 bool m_bMouseDown =
false;
122 bool m_bMinSize =
false;
129 std::unique_ptr<CFX_Timer> m_pTimer;
135using pdfium::CFWL_ScrollBar;
void Concat(const CFX_Matrix &right)
void SetModuleWidth(int32_t width)
void SetModuleHeight(int32_t height)
void SetType(BC_TYPE type)
void DrawWidget(CFGAS_GEGraphics *pGraphics, const CFX_Matrix &matrix) override
void SetCalChecksum(bool calChecksum)
void SetErrorCorrectionLevel(int32_t ecLevel)
void OnProcessEvent(CFWL_Event *pEvent) override
void SetWideNarrowRatio(int8_t ratio)
void SetEndChar(char endChar)
void SetDataLength(int32_t dataLength)
void SetStartChar(char startChar)
void SetTextSkipNotify(const WideString &wsText) override
FWL_Type GetClassID() const override
void SetPrintChecksum(bool printChecksum)
void SetText(const WideString &wsText) override
bool IsProtectedType() const
void SetTextLocation(BC_TEXT_LOC location)
void OnProcessMessage(CFWL_Message *pMessage) override
void SetAliasChar(wchar_t wAlias)
void SetScrollOffset(float fScrollOffset) override
void OnTextWillChange(CFDE_TextEditEngine::TextChange *change) override
FWL_WidgetHit HitTest(const CFX_PointF &point) override
WideString GetText() const
CFDE_TextEditEngine * GetTxtEdtEngine()
void OnDrawWidget(CFGAS_GEGraphics *pGraphics, const CFX_Matrix &matrix) override
CFX_RectF GetWidgetRect() override
virtual void SetTextSkipNotify(const WideString &wsText)
bool OnValidate(const WideString &wsText) override
void DrawWidget(CFGAS_GEGraphics *pGraphics, const CFX_Matrix &matrix) override
std::pair< size_t, size_t > GetSelection() const
void Trace(cppgc::Visitor *visitor) const override
bool Paste(const WideString &wsPaste)
void NotifyTextFull() override
void OnTextChanged() override
CFWL_Edit(CFWL_App *app, const Properties &properties, CFWL_Widget *pOuter)
void OnSelChanged() override
const CFX_RectF & GetRTClient() const
std::optional< WideString > Copy()
size_t GetTextLength() const
bool HasSelection() const
std::optional< WideString > Cut()
void SetStates(uint32_t dwStates) override
FWL_Type GetClassID() const override
void SetLimit(int32_t nLimit)
CFX_RectF GetAutosizedWidgetRect() override
void ShowCaret(CFX_RectF *pRect)
void HideCaret(CFX_RectF *pRect)
void PreFinalize() override
virtual void SetText(const WideString &wsText)
void OnCaretChanged() override
void OnProcessEvent(CFWL_Event *pEvent) override
CFWL_Event(Type type, CFWL_Widget *pSrcTarget)
CFWL_Widget * GetDstTarget() const
CFWL_Event(Type type, CFWL_Widget *pSrcTarget, CFWL_Widget *pDstTarget)
CFWL_Widget * GetSrcTarget() const
CFX_VTemplate< int32_t > CFX_Vector
CFX_PTemplate< float > CFX_PointF
#define CONSTRUCT_VIA_MAKE_GARBAGE_COLLECTED
fxcrt::WideString WideString