7#ifndef XFA_FWL_CFWL_SCROLLBAR_H_
8#define XFA_FWL_CFWL_SCROLLBAR_H_
14#include "core/fxcrt/cfx_timer.h"
15#include "third_party/base/check.h"
16#include "xfa/fwl/cfwl_eventscroll.h"
17#include "xfa/fwl/cfwl_themepart.h"
18#include "xfa/fwl/cfwl_widget.h"
20#define FWL_STYLEEXT_SCB_Horz (0L
<< 0
)
21#define FWL_STYLEEXT_SCB_Vert (1L
<< 0
)
41 void GetRange(
float* fMin,
float* fMax)
const {
50 void SetPageSize(
float fPageSize) { m_fPageSize = fPageSize; }
52 void SetStepSize(
float fStepSize) { m_fStepSize = fStepSize; }
53 float GetPos()
const {
return m_fPos; }
54 void SetPos(
float fPos) { m_fPos = fPos; }
58 CFWL_ScrollBar(CFWL_App* app,
75 float GetTrackPointPos(
const CFX_PointF& point);
78 bool OnScroll(CFWL_EventScroll::
Code dwCode,
float fPos);
79 void OnLButtonDown(
const CFX_PointF& point);
80 void OnLButtonUp(
const CFX_PointF& point);
81 void OnMouseMove(
const CFX_PointF& point);
83 void OnMouseWheel(
const CFX_Vector& delta);
84 bool DoScroll(CFWL_EventScroll::
Code dwCode,
float fPos);
85 void DoMouseDown(int32_t iItem,
88 const CFX_PointF& point);
89 void DoMouseUp(int32_t iItem,
92 const CFX_PointF& point);
93 void DoMouseMove(int32_t iItem,
96 const CFX_PointF& point);
97 void DoMouseLeave(int32_t iItem,
100 void DoMouseHover(int32_t iItem,
104 float m_fRangeMin = 0.0f;
105 float m_fRangeMax = -1.0f;
106 float m_fPageSize = 0.0f;
107 float m_fStepSize = 0.0f;
109 float m_fTrackPos = 0.0f;
115 float m_fLastTrackPos = 0.0f;
116 CFX_PointF m_cpTrackPoint;
117 int32_t m_iMouseWheel = 0;
118 float m_fButtonLen = 0.0f;
119 bool m_bMouseDown =
false;
120 bool m_bMinSize =
false;
127 std::unique_ptr<CFX_Timer> m_pTimer;
void SetDataLength(int32_t dataLength)
FWL_Type GetClassID() const override
void SetType(BC_TYPE type)
void SetCalChecksum(bool calChecksum)
void SetWideNarrowRatio(int8_t ratio)
void OnProcessEvent(CFWL_Event *pEvent) override
void DrawWidget(CFGAS_GEGraphics *pGraphics, const CFX_Matrix &matrix) override
void SetPrintChecksum(bool printChecksum)
void SetTextLocation(BC_TEXT_LOC location)
void SetStartChar(char startChar)
void SetText(const WideString &wsText) override
void SetEndChar(char endChar)
void SetModuleHeight(int32_t height)
void SetErrorCorrectionLevel(int32_t ecLevel)
void SetTextSkipNotify(const WideString &wsText) override
void SetModuleWidth(int32_t width)
bool IsProtectedType() const
void SetCharEncoding(BC_CHAR_ENCODING encoding)
CFX_RectF GetAutosizedWidgetRect() override
void OnTextChanged() override
CFX_RectF GetWidgetRect() override
virtual void SetText(const WideString &wsText)
void SetLimit(int32_t nLimit)
const CFX_RectF & GetRTClient() const
void OnProcessMessage(CFWL_Message *pMessage) override
void OnCaretChanged() override
void DrawWidget(CFGAS_GEGraphics *pGraphics, const CFX_Matrix &matrix) override
size_t GetTextLength() const
CFDE_TextEditEngine * GetTxtEdtEngine()
void Trace(cppgc::Visitor *visitor) const override
void SetScrollOffset(float fScrollOffset) override
CFWL_Edit(CFWL_App *app, const Properties &properties, CFWL_Widget *pOuter)
FWL_WidgetHit HitTest(const CFX_PointF &point) override
bool OnValidate(const WideString &wsText) override
void SetAliasChar(wchar_t wAlias)
bool Paste(const WideString &wsPaste)
void OnTextWillChange(CFDE_TextEditEngine::TextChange *change) override
absl::optional< WideString > Cut()
WideString GetText() const
FWL_Type GetClassID() const override
void PreFinalize() override
void ShowCaret(CFX_RectF *pRect)
void OnProcessEvent(CFWL_Event *pEvent) override
absl::optional< WideString > Copy()
void OnDrawWidget(CFGAS_GEGraphics *pGraphics, const CFX_Matrix &matrix) override
void SetStates(uint32_t dwStates) override
void HideCaret(CFX_RectF *pRect)
bool HasSelection() const
void OnSelChanged() override
void NotifyTextFull() override
std::pair< size_t, size_t > GetSelection() const
virtual void SetTextSkipNotify(const WideString &wsText)
CFWL_Widget * GetDstTarget() const
CFWL_Event(Type type, CFWL_Widget *pSrcTarget)
CFWL_Widget * GetSrcTarget() const
CFWL_Event(Type type, CFWL_Widget *pSrcTarget, CFWL_Widget *pDstTarget)
void Concat(const CFX_Matrix &right)
#define CONSTRUCT_VIA_MAKE_GARBAGE_COLLECTED