Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
cfwl_eventvalidate.h
Go to the documentation of this file.
1// Copyright 2016 The PDFium Authors
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
6
7#ifndef XFA_FWL_CFWL_EVENTVALIDATE_H_
8#define XFA_FWL_CFWL_EVENTVALIDATE_H_
9
10#include "core/fxcrt/widestring.h"
11#include "xfa/fwl/cfwl_event.h"
12
13namespace pdfium {
14
15class CFWL_EventValidate final : public CFWL_Event {
16 public:
17 CFWL_EventValidate(CFWL_Widget* pSrcTarget, const WideString& wsInsert);
18 ~CFWL_EventValidate() override;
19
20 WideString GetInsert() const { return m_wsInsert; }
21 bool GetValidate() const { return m_bValidate; }
22 void SetValidate(bool bValidate) { m_bValidate = bValidate; }
23
24 protected:
26 bool m_bValidate = true;
27};
28
29} // namespace pdfium
30
31// TODO(crbug.com/42271761): Remove.
32using pdfium::CFWL_EventValidate;
33
34#endif // XFA_FWL_CFWL_EVENTVALIDATE_H_
@ CFX_TxtLineAlignment_Justified
@ CFX_TxtLineAlignment_Right
@ CFX_TxtLineAlignment_Center
@ CFX_TxtLineAlignment_Left
#define FWL_STYLEEXT_EDT_MultiLine
Definition cfwl_edit.h:24
#define FWL_STYLEEXT_EDT_HFar
Definition cfwl_edit.h:34
#define FWL_STYLEEXT_EDT_VAlignMask
Definition cfwl_edit.h:40
#define FWL_STYLEEXT_EDT_HAlignModeMask
Definition cfwl_edit.h:41
#define FWL_STYLEEXT_EDT_HAlignMask
Definition cfwl_edit.h:39
#define FWL_STYLEEXT_EDT_ShowScrollbarFocus
Definition cfwl_edit.h:42
#define FWL_STYLEEXT_EDT_WantReturn
Definition cfwl_edit.h:25
#define FWL_STYLEEXT_EDT_VCenter
Definition cfwl_edit.h:36
#define FWL_STYLEEXT_EDT_OuterScrollbar
Definition cfwl_edit.h:43
#define FWL_STYLEEXT_EDT_AutoHScroll
Definition cfwl_edit.h:26
#define FWL_STYLEEXT_EDT_ReadOnly
Definition cfwl_edit.h:23
#define FWL_STYLEEXT_EDT_VFar
Definition cfwl_edit.h:37
#define FWL_STYLEEXT_EDT_AutoVScroll
Definition cfwl_edit.h:27
#define FWL_STYLEEXT_EDT_Validate
Definition cfwl_edit.h:28
#define FWL_STYLEEXT_EDT_HNear
Definition cfwl_edit.h:32
#define FWL_STYLEEXT_EDT_Password
Definition cfwl_edit.h:29
#define FWL_STYLEEXT_EDT_Justified
Definition cfwl_edit.h:38
#define FWL_STYLEEXT_EDT_CombText
Definition cfwl_edit.h:31
#define FWL_STYLEEXT_EDT_HCenter
Definition cfwl_edit.h:33
#define FWL_STYLEEXT_SCB_Vert
#define FWL_STATE_WGT_Invisible
Definition cfwl_widget.h:45
#define FWL_STYLE_WGT_VScroll
Definition cfwl_widget.h:39
#define FWL_STATE_WGT_Focused
Definition cfwl_widget.h:44
#define FWL_STATE_WGT_Disabled
Definition cfwl_widget.h:43
#define DCHECK
Definition check.h:33
StateRestorer(CFGAS_GEGraphics *graphics)
CFX_RenderDevice * GetRenderDevice()
void SetClipRect(const CFX_RectF &rect)
void AddLine(const CFX_PointF &p1, const CFX_PointF &p2)
CFX_Matrix & operator=(const CFX_Matrix &other)=default
CFX_RectF TransformRect(const CFX_RectF &rect) const
CFX_Matrix GetInverse() const
constexpr CFX_Matrix(float a1, float b1, float c1, float d1, float e1, float f1)
void Concat(const CFX_Matrix &right)
void Offset(float dx, float dy)
constexpr CFX_RectF()=default
bool IsEmpty() const
bool Contains(const CFX_RectF &rt) const
void Intersect(const CFX_RectF &rt)
FX_RECT GetOuterRect() const
void Deflate(float off_left, float off_top, float off_right, float off_bottom)
CFX_RectF & operator=(const CFX_RectF &other)=default
float bottom() const
bool Contains(const PointType &p) const
float right() const
constexpr CFX_RectF(float dst_left, float dst_top, float dst_width, float dst_height)
void Union(const CFX_RectF &rt)
bool SetClip_Rect(const FX_RECT &pRect)
int GetHeight() const
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
void OnDrawWidget(CFGAS_GEGraphics *pGraphics, const CFX_Matrix &matrix) override
CFX_RectF GetWidgetRect() override
Definition cfwl_edit.cpp:79
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
Definition cfwl_edit.cpp:69
bool Paste(const WideString &wsPaste)
void NotifyTextFull() override
void Update() override
void OnTextChanged() override
CFWL_Edit(CFWL_App *app, const Properties &properties, CFWL_Widget *pOuter)
Definition cfwl_edit.cpp:52
void OnSelChanged() override
~CFWL_Edit() override
int32_t GetLimit() 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
Definition cfwl_edit.cpp:75
void SetLimit(int32_t nLimit)
CFX_RectF GetAutosizedWidgetRect() override
Definition cfwl_edit.cpp:91
void ShowCaret(CFX_RectF *pRect)
void HideCaret(CFX_RectF *pRect)
void PreFinalize() override
Definition cfwl_edit.cpp:62
virtual void SetText(const WideString &wsText)
void OnCaretChanged() override
void OnProcessEvent(CFWL_Event *pEvent) override
void SetSelectionEnd(size_t selection_end)
void SetSelectionStart(size_t selection_start)
void SetChangeText(const WideString &change_text)
CFWL_EventTextWillChange(CFWL_Widget *pSrcTarget, const WideString &change_text, const WideString &previous_text, size_t selection_start, size_t selection_end)
void SetPreviousText(const WideString &previous_text)
CFWL_EventValidate(CFWL_Widget *pSrcTarget, const WideString &wsInsert)
void SetValidate(bool bValidate)
Type GetType() const
Definition cfwl_event.h:41
CFWL_Widget * GetSrcTarget() const
Definition cfwl_event.h:42
const uint32_t m_dwKeyCodeOrChar
const KeyCommand m_dwCmd
Type GetType() const
CFWL_Widget * GetDstTarget() const
void SetTrackPos(float fTrackPos)
void SetPos(float fPos)
float GetPageSize() const
float GetStepSize() const
void GetRange(float *fMin, float *fMax) const
void SetPath(const CFGAS_GEPath *pPath)
virtual void DisplayCaret(bool bVisible, const CFX_RectF *pRtAnchor)=0
virtual CFX_Matrix GetRotateMatrix()=0
void OnProcessMessage(CFWL_Message *pMessage) override
virtual CFX_RectF GetWidgetRect()
void RepaintRect(const CFX_RectF &pRect)
bool HasBorder() const
void DispatchEvent(CFWL_Event *pEvent)
CFWL_Widget * GetOuter() const
void SetGrab(bool bSet)
CFWL_Widget(CFWL_App *app, const Properties &properties, CFWL_Widget *pOuter)
AdapterIface * GetAdapterIface() const
void DrawBorder(CFGAS_GEGraphics *pGraphics, CFWL_ThemePart::Part iPartBorder, const CFX_Matrix &pMatrix)
virtual void PreFinalize()
virtual CFX_RectF GetClientRect()
IFWL_ThemeProvider * GetThemeProvider() const
bool IsLocked() const
void InflateWidgetRect(CFX_RectF &rect)
Properties m_Properties
virtual void SetStates(uint32_t dwStates)
virtual float GetScrollBarWidth() const =0
virtual float GetFontSize(const CFWL_ThemePart &pThemePart) const =0
virtual CFX_RectF GetUIMargin(const CFWL_ThemePart &pThemePart) const =0
CFX_PTemplate< float > CFX_PointF
CFX_STemplate< float > CFX_SizeF
@ XFA_FWL_VKEY_Insert
@ XFA_FWL_VKEY_Tab
@ XFA_FWL_VKEY_Delete
@ XFA_FWL_VKEY_F2
fxcrt::WideString WideString
Definition widestring.h:207