7#ifndef FPDFSDK_PWL_CPWL_EDIT_H_
8#define FPDFSDK_PWL_CPWL_EDIT_H_
13#include "core/fpdfdoc/cpvt_wordrange.h"
14#include "core/fxcrt/fx_codepage.h"
15#include "core/fxcrt/unowned_ptr.h"
16#include "core/fxcrt/widestring.h"
17#include "fpdfsdk/pwl/cpwl_wnd.h"
18#include "fpdfsdk/pwl/ipwl_fillernotify.h"
32 std::unique_ptr<IPWL_FillerNotify::PerWindowData> pAttachedData);
41 const CFX_PointF& point,
42 const CFX_Vector& delta)
override;
43 bool OnKeyDown(FWL_VKEYCODE nKeyCode,
Mask<FWL_EVENTFLAG> nFlag)
override;
44 bool OnChar(uint16_t nChar,
Mask<FWL_EVENTFLAG> nFlag)
override;
51 const CFX_PointF& point)
override;
52 bool OnLButtonUp(
Mask<FWL_EVENTFLAG> nFlag,
const CFX_PointF& point)
override;
54 const CFX_PointF& point)
override;
55 bool OnRButtonUp(
Mask<FWL_EVENTFLAG> nFlag,
const CFX_PointF& point)
override;
56 bool OnMouseMove(
Mask<FWL_EVENTFLAG> nFlag,
const CFX_PointF& point)
override;
92 void SetText(
const WideString& csText);
100 const CFX_PointF& ptHead,
101 const CFX_PointF& ptFoot);
107 static bool IsProceedtoOnChar(FWL_VKEYCODE nKeyCode,
108 Mask<FWL_EVENTFLAG> nFlag);
110 bool OnKeyDownInternal(FWL_VKEYCODE nKeyCode,
Mask<FWL_EVENTFLAG> nFlag);
111 bool OnCharInternal(uint16_t nChar,
Mask<FWL_EVENTFLAG> nFlag);
115 void InsertWord(uint16_t word,
FX_Charset nCharset);
117 bool IsWndHorV()
const;
120 void GetCaretInfo(CFX_PointF* ptHead, CFX_PointF* ptFoot)
const;
121 void SetEditCaret(
bool bVisible);
126 bool IsVScrollBarVisible()
const;
127 void SetParamByFlag();
129 bool m_bMouseDown =
false;
130 bool m_bFocus =
false;
133 std::unique_ptr<CPWL_EditImpl>
const m_pEditImpl;
CFX_FloatRect GetCenterSquare() const
constexpr CFX_FloatRect(float l, float b, float r, float t)
void ScaleFromCenterPoint(float fScale)
CFX_FloatRect & operator=(const CFX_FloatRect &that)=default
CFX_FloatRect GetDeflated(float x, float y) const
CFX_Matrix(float a1, float b1, float c1, float d1, float e1, float f1)
void SetAsTextField(absl::optional< WideString > sValue)
CPDFSDK_AppStream(CPDFSDK_Widget *widget, CPDF_Dictionary *dict)
void SetAsComboBox(absl::optional< WideString > sValue)
bool IsModifiedAPStream(const CPDF_Stream *stream) const
RetainPtr< CPDF_Stream > CreateModifiedAPStream()
bool GetFittingBounds() const
void SetAt(int32_t nWordIndex)
bool GetWord(CPVT_Word &word) const
bool GetLine(CPVT_Line &line) const
const CPVT_WordPlace & GetAt() const
ByteString GetPDFWordString(int32_t nFontIndex, uint16_t Word, uint16_t SubWord)
IPVT_FontMap * GetFontMap()
static float GetCharArrayAutoFontSize(const CPDF_Font *pFont, const CFX_FloatRect &rcPlate, int32_t nCharArray)
void SetScrollInfo(const PWL_SCROLL_INFO &info) override
void SetFontSize(float fFontSize) override
bool SetCaret(bool bVisible, const CFX_PointF &ptHead, const CFX_PointF &ptFoot)
bool SelectAllText() override
bool OnLButtonUp(Mask< FWL_EVENTFLAG > nFlag, const CFX_PointF &point) override
bool OnKeyDown(FWL_VKEYCODE nKeyCode, Mask< FWL_EVENTFLAG > nFlag) override
CPWL_Edit(const CreateParams &cp, std::unique_ptr< IPWL_FillerNotify::PerWindowData > pAttachedData)
CFX_FloatRect GetFocusRect() const override
bool RepositionChildWnd() override
void SetScrollPosition(float pos) override
void SetAlignFormatVerticalCenter()
void SetCursor() override
WideString GetText() override
void SetCharSet(FX_Charset nCharSet)
bool OnLButtonDblClk(Mask< FWL_EVENTFLAG > nFlag, const CFX_PointF &point) override
void OnSetFocus() override
void ReplaceAndKeepSelection(const WideString &text) override
void ScrollWindowVertically(float pos) override
void SetCharArray(int32_t nCharArray)
void SetSelection(int32_t nStartChar, int32_t nEndChar)
std::pair< int32_t, int32_t > GetSelection() const
void OnKillFocus() override
void SetScrollPos(const CFX_PointF &point)
void SetText(const WideString &csText)
bool OnMouseMove(Mask< FWL_EVENTFLAG > nFlag, const CFX_PointF &point) override
void ReplaceSelection(const WideString &text) override
CFX_FloatRect GetClientRect() const override
bool OnMouseWheel(Mask< FWL_EVENTFLAG > nFlag, const CFX_PointF &point, const CFX_Vector &delta) override
void DrawThisAppearance(CFX_RenderDevice *pDevice, const CFX_Matrix &mtUser2Device) override
bool OnChar(uint16_t nChar, Mask< FWL_EVENTFLAG > nFlag) override
void OnCreated() override
WideString GetSelectedText() override
float GetFontSize() const override
void SetLimitChar(int32_t nLimitChar)
FX_Charset GetCharSet() const
bool OnLButtonDown(Mask< FWL_EVENTFLAG > nFlag, const CFX_PointF &point) override
CFX_PointF GetScrollPos() const
bool OnRButtonUp(Mask< FWL_EVENTFLAG > nFlag, const CFX_PointF &point) override
void CreateChildWnd(const CreateParams &cp) override
void OnDestroy() override
bool CanSelectAll() const
CreateParams(CFX_Timer::HandlerIface *timer_handler, IPWL_FillerNotify *filler_notify, ProviderIface *provider)
virtual ByteString GetPDFFontAlias(int32_t nFontIndex)=0
ByteString & operator+=(const ByteString &str)
ByteString & operator=(const ByteString &that)
ByteString & operator=(ByteString &&that) noexcept
WideString & operator=(WideString &&that) noexcept
CharType operator[](const size_t index) const
WideString & operator=(const WideString &that)
#define FXSYS_IsFloatBigger(fa, fb)
#define FXSYS_IsFloatZero(f)
ByteString operator+(const ByteString &str1, const ByteString &str2)
CFX_Color operator/(float fColorDivide) const
CFX_Color operator-(float fColorSub) const
CFX_Color & operator=(const CFX_Color &that)=default
constexpr CFX_Color(Type type=CFX_Color::Type::kTransparent, float color1=0.0f, float color2=0.0f, float color3=0.0f, float color4=0.0f)
int32_t LineCmp(const CPVT_WordPlace &wp) const
CPWL_Dash(int32_t dash, int32_t gap, int32_t phase)