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
CPWL_Edit Class Referencefinal

#include <cpwl_edit.h>

Inheritance diagram for CPWL_Edit:
Collaboration diagram for CPWL_Edit:

Public Member Functions

 CPWL_Edit (const CreateParams &cp, std::unique_ptr< IPWL_FillerNotify::PerWindowData > pAttachedData)
 ~CPWL_Edit () override
bool RepositionChildWnd () override
CFX_FloatRect GetClientRect () const override
void DrawThisAppearance (CFX_RenderDevice *pDevice, const CFX_Matrix &mtUser2Device) override
bool OnMouseWheel (Mask< FWL_EVENTFLAG > nFlag, const CFX_PointF &point, const CFX_Vector &delta) override
bool OnKeyDown (FWL_VKEYCODE nKeyCode, Mask< FWL_EVENTFLAG > nFlag) override
bool OnChar (uint16_t nChar, Mask< FWL_EVENTFLAG > nFlag) override
CFX_FloatRect GetFocusRect () const override
void OnSetFocus () override
void OnKillFocus () override
void OnCreated () override
void OnDestroy () override
bool OnLButtonDown (Mask< FWL_EVENTFLAG > nFlag, const CFX_PointF &point) override
bool OnLButtonUp (Mask< FWL_EVENTFLAG > nFlag, const CFX_PointF &point) override
bool OnLButtonDblClk (Mask< FWL_EVENTFLAG > nFlag, const CFX_PointF &point) override
bool OnRButtonUp (Mask< FWL_EVENTFLAG > nFlag, const CFX_PointF &point) override
bool OnMouseMove (Mask< FWL_EVENTFLAG > nFlag, const CFX_PointF &point) override
void SetScrollInfo (const PWL_SCROLL_INFO &info) override
void SetScrollPosition (float pos) override
void ScrollWindowVertically (float pos) override
void CreateChildWnd (const CreateParams &cp) override
void SetFontSize (float fFontSize) override
float GetFontSize () const override
void SetCursor () override
WideString GetText () override
WideString GetSelectedText () override
void ReplaceAndKeepSelection (const WideString &text) override
void ReplaceSelection (const WideString &text) override
bool SelectAllText () override
bool CanUndo () override
bool CanRedo () override
bool Undo () override
bool Redo () override
void SetSelection (int32_t nStartChar, int32_t nEndChar)
std::pair< int32_t, int32_t > GetSelection () const
void ClearSelection ()
CFX_PointF GetScrollPos () const
void SetScrollPos (const CFX_PointF &point)
void SetCharSet (FX_Charset nCharSet)
FX_Charset GetCharSet () const
void SetReadyToInput ()
void SetAlignFormatVerticalCenter ()
void SetCharArray (int32_t nCharArray)
void SetLimitChar (int32_t nLimitChar)
bool CanSelectAll () const
bool CanCopy () const
bool CanCut () const
void CutText ()
void SetText (const WideString &csText)
bool IsTextFull () const
bool SetCaret (bool bVisible, const CFX_PointF &ptHead, const CFX_PointF &ptFoot)
Public Member Functions inherited from CPWL_Wnd
 CPWL_Wnd (const CreateParams &cp, std::unique_ptr< IPWL_FillerNotify::PerWindowData > pAttachedData)
virtual ~CPWL_Wnd ()
virtual bool InvalidateRect (const CFX_FloatRect *pRect)
virtual bool OnRButtonDown (Mask< FWL_EVENTFLAG > nFlag, const CFX_PointF &point)
virtual void NotifyLButtonDown (CPWL_Wnd *child, const CFX_PointF &pos)
virtual void NotifyLButtonUp (CPWL_Wnd *child, const CFX_PointF &pos)
virtual void NotifyMouseMove (CPWL_Wnd *child, const CFX_PointF &pos)
virtual void SetFocus ()
virtual void KillFocus ()
virtual bool SetVisible (bool bVisible)
void AddChild (std::unique_ptr< CPWL_Wnd > pWnd)
void RemoveChild (CPWL_Wnd *pWnd)
void Realize ()
void Destroy ()
bool Move (const CFX_FloatRect &rcNew, bool bReset, bool bRefresh)
void InvalidateProvider (ProviderIface *provider)
void DrawAppearance (CFX_RenderDevice *pDevice, const CFX_Matrix &mtUser2Device)
int32_t GetBorderWidth () const
CFX_FloatRect GetWindowRect () const
bool IsVisible () const
bool HasFlag (uint32_t dwFlags) const
void RemoveFlag (uint32_t dwFlags)
void SetClipRect (const CFX_FloatRect &rect)
IPWL_FillerNotify::PerWindowDataGetAttachedData () const
std::unique_ptr< IPWL_FillerNotify::PerWindowDataCloneAttachedData () const
std::vector< UnownedPtr< CPWL_Wnd > > GetAncestors ()
bool WndHitTest (const CFX_PointF &point) const
bool ClientHitTest (const CFX_PointF &point) const
bool IsCaptureMouse () const
bool IsFocused () const
bool IsReadOnly () const
void SetTransparency (int32_t nTransparency)
CFX_Matrix GetWindowMatrix () const
Public Member Functions inherited from fxcrt::Observable
 Observable ()
 Observable (const Observable &that)=delete
Observableoperator= (const Observable &that)=delete
 ~Observable ()
void AddObserver (ObserverIface *pObserver)
void RemoveObserver (ObserverIface *pObserver)
void NotifyObservers ()

Static Public Member Functions

static float GetCharArrayAutoFontSize (const CPDF_Font *pFont, const CFX_FloatRect &rcPlate, int32_t nCharArray)
Static Public Member Functions inherited from CPWL_Wnd
static bool IsSHIFTKeyDown (Mask< FWL_EVENTFLAG > nFlag)
static bool IsCTRLKeyDown (Mask< FWL_EVENTFLAG > nFlag)
static bool IsALTKeyDown (Mask< FWL_EVENTFLAG > nFlag)
static bool IsMETAKeyDown (Mask< FWL_EVENTFLAG > nFlag)
static bool IsPlatformShortcutKey (Mask< FWL_EVENTFLAG > nFlag)

Additional Inherited Members

Static Public Attributes inherited from CPWL_Wnd
static const CFX_Color kDefaultBlackColor
static const CFX_Color kDefaultWhiteColor
Protected Member Functions inherited from CPWL_Wnd
bool IsValid () const
CreateParamsGetCreationParams ()
ProviderIfaceGetProvider () const
CFX_Timer::HandlerIfaceGetTimerHandler () const
IPWL_FillerNotifyGetFillerNotify () const
CPWL_WndGetParentWindow () const
CPWL_ScrollBarGetVScrollBar () const
bool InvalidateRectMove (const CFX_FloatRect &rcOld, const CFX_FloatRect &rcNew)
void SetCapture ()
void ReleaseCapture ()
bool IsWndCaptureMouse (const CPWL_Wnd *pWnd) const
bool IsWndCaptureKeyboard (const CPWL_Wnd *pWnd) const
CFX_Color GetBackgroundColor () const
CFX_Color GetBorderColor () const
CFX_Color GetTextColor () const
CFX_Color GetBorderLeftTopColor (BorderStyle nBorderStyle) const
CFX_Color GetBorderRightBottomColor (BorderStyle nBorderStyle) const
BorderStyle GetBorderStyle () const
const CPWL_DashGetBorderDash () const
int32_t GetTransparency ()
int32_t GetInnerBorderWidth () const
CFX_PointF GetCenterPoint () const
const CFX_FloatRectGetClipRect () const
IPVT_FontMapGetFontMap () const
Protected Member Functions inherited from fxcrt::Observable
size_t ActiveObserversForTesting () const

Detailed Description

Definition at line 29 of file cpwl_edit.h.

Constructor & Destructor Documentation

◆ CPWL_Edit()

CPWL_Edit::CPWL_Edit ( const CreateParams & cp,
std::unique_ptr< IPWL_FillerNotify::PerWindowData > pAttachedData )

Definition at line 32 of file cpwl_edit.cpp.

References CPWL_Edit(), CPWL_Wnd::GetCreationParams(), and IPWL_FillerNotify::kVBeam.

Referenced by CPWL_Edit().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ~CPWL_Edit()

CPWL_Edit::~CPWL_Edit ( )
override

Definition at line 40 of file cpwl_edit.cpp.

Member Function Documentation

◆ CanCopy()

bool CPWL_Edit::CanCopy ( ) const

Definition at line 93 of file cpwl_edit.cpp.

Referenced by CanCut().

Here is the caller graph for this function:

◆ CanCut()

bool CPWL_Edit::CanCut ( ) const

Definition at line 97 of file cpwl_edit.cpp.

References CanCopy(), and CPWL_Wnd::IsReadOnly().

Referenced by CutText().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ CanRedo()

bool CPWL_Edit::CanRedo ( )
overridevirtual

Reimplemented from CPWL_Wnd.

Definition at line 834 of file cpwl_edit.cpp.

◆ CanSelectAll()

bool CPWL_Edit::CanSelectAll ( ) const

Definition at line 89 of file cpwl_edit.cpp.

◆ CanUndo()

bool CPWL_Edit::CanUndo ( )
overridevirtual

Reimplemented from CPWL_Wnd.

Definition at line 830 of file cpwl_edit.cpp.

◆ ClearSelection()

void CPWL_Edit::ClearSelection ( )

Definition at line 793 of file cpwl_edit.cpp.

◆ CreateChildWnd()

void CPWL_Edit::CreateChildWnd ( const CreateParams & cp)
overridevirtual

Reimplemented from CPWL_Wnd.

Definition at line 505 of file cpwl_edit.cpp.

References CPWL_Wnd::IsReadOnly().

Here is the call graph for this function:

◆ CutText()

void CPWL_Edit::CutText ( )

Definition at line 101 of file cpwl_edit.cpp.

References CanCut().

Here is the call graph for this function:

◆ DrawThisAppearance()

void CPWL_Edit::DrawThisAppearance ( CFX_RenderDevice * pDevice,
const CFX_Matrix & mtUser2Device )
overridevirtual

◆ GetCharArrayAutoFontSize()

float CPWL_Edit::GetCharArrayAutoFontSize ( const CPDF_Font * pFont,
const CFX_FloatRect & rcPlate,
int32_t nCharArray )
static

Definition at line 275 of file cpwl_edit.cpp.

References CPDF_Font::GetFontBBox(), CFX_FloatRect::Height(), FX_RECT::Height(), CPDF_Font::IsStandardFont(), CFX_FloatRect::Width(), and FX_RECT::Width().

Referenced by CPDFSDK_AppStream::SetAsTextField(), and SetCharArray().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetCharSet()

FX_Charset CPWL_Edit::GetCharSet ( ) const
inline

Definition at line 82 of file cpwl_edit.h.

◆ GetClientRect()

CFX_FloatRect CPWL_Edit::GetClientRect ( ) const
overridevirtual

Reimplemented from CPWL_Wnd.

Definition at line 75 of file cpwl_edit.cpp.

References CPWL_Wnd::GetBorderWidth(), CPWL_Wnd::GetInnerBorderWidth(), CPWL_Wnd::GetVScrollBar(), CPWL_Wnd::GetWindowRect(), CPWL_Wnd::IsVisible(), CPWL_ScrollBar::kWidth, and CFX_FloatRect::right.

Referenced by DrawThisAppearance(), RepositionChildWnd(), and SetCharArray().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetFocusRect()

CFX_FloatRect CPWL_Edit::GetFocusRect ( ) const
overridevirtual

Reimplemented from CPWL_Wnd.

Definition at line 320 of file cpwl_edit.cpp.

References CFX_FloatRect::CFX_FloatRect().

Here is the call graph for this function:

◆ GetFontSize()

float CPWL_Edit::GetFontSize ( ) const
overridevirtual

Reimplemented from CPWL_Wnd.

Definition at line 532 of file cpwl_edit.cpp.

Referenced by OnMouseWheel().

Here is the caller graph for this function:

◆ GetScrollPos()

CFX_PointF CPWL_Edit::GetScrollPos ( ) const

Definition at line 802 of file cpwl_edit.cpp.

◆ GetSelectedText()

WideString CPWL_Edit::GetSelectedText ( )
overridevirtual

Reimplemented from CPWL_Wnd.

Definition at line 474 of file cpwl_edit.cpp.

◆ GetSelection()

std::pair< int32_t, int32_t > CPWL_Edit::GetSelection ( ) const

Definition at line 789 of file cpwl_edit.cpp.

Referenced by CFFL_ComboBox::GetActionData().

Here is the caller graph for this function:

◆ GetText()

WideString CPWL_Edit::GetText ( )
overridevirtual

Reimplemented from CPWL_Wnd.

Definition at line 781 of file cpwl_edit.cpp.

Referenced by CFFL_ComboBox::GetActionData(), and CFFL_TextField::GetActionData().

Here is the caller graph for this function:

◆ IsTextFull()

bool CPWL_Edit::IsTextFull ( ) const

Definition at line 271 of file cpwl_edit.cpp.

Referenced by CFFL_ComboBox::GetActionData(), and CFFL_TextField::GetActionData().

Here is the caller graph for this function:

◆ OnChar()

bool CPWL_Edit::OnChar ( uint16_t nChar,
Mask< FWL_EVENTFLAG > nFlag )
overridevirtual

Reimplemented from CPWL_Wnd.

Definition at line 396 of file cpwl_edit.cpp.

References IPVT_FontMap::CharSetFromUnicode(), IPWL_FillerNotify::BeforeKeystrokeResult::exit, kDefault, pdfium::ascii::kReturn, fxcrt::WideString::operator+=(), and IPWL_FillerNotify::BeforeKeystrokeResult::rc.

Here is the call graph for this function:

◆ OnCreated()

void CPWL_Edit::OnCreated ( )
overridevirtual

Reimplemented from CPWL_Wnd.

Definition at line 107 of file cpwl_edit.cpp.

References CPWL_Wnd::GetCreationParams(), CPWL_Wnd::GetVScrollBar(), CPWL_Wnd::GetWindowRect(), CPWL_Wnd::RemoveFlag(), SetFontSize(), and CPWL_Wnd::SetTransparency().

Here is the call graph for this function:

◆ OnDestroy()

void CPWL_Edit::OnDestroy ( )
overridevirtual

Reimplemented from CPWL_Wnd.

Definition at line 457 of file cpwl_edit.cpp.

◆ OnKeyDown()

bool CPWL_Edit::OnKeyDown ( FWL_VKEYCODE nKeyCode,
Mask< FWL_EVENTFLAG > nFlag )
overridevirtual

◆ OnKillFocus()

void CPWL_Edit::OnKillFocus ( )
overridevirtual

Reimplemented from CPWL_Wnd.

Definition at line 235 of file cpwl_edit.cpp.

References CPWL_Wnd::IsVisible(), kANSI, and CPWL_Wnd::SetVisible().

Here is the call graph for this function:

◆ OnLButtonDblClk()

bool CPWL_Edit::OnLButtonDblClk ( Mask< FWL_EVENTFLAG > nFlag,
const CFX_PointF & point )
overridevirtual

Reimplemented from CPWL_Wnd.

Definition at line 706 of file cpwl_edit.cpp.

References CPWL_Wnd::OnLButtonDblClk().

Here is the call graph for this function:

◆ OnLButtonDown()

bool CPWL_Edit::OnLButtonDown ( Mask< FWL_EVENTFLAG > nFlag,
const CFX_PointF & point )
overridevirtual

Reimplemented from CPWL_Wnd.

Definition at line 677 of file cpwl_edit.cpp.

References CPWL_Wnd::ClientHitTest(), CPWL_Wnd::HasFlag(), CPWL_Wnd::InvalidateRect(), CPWL_Wnd::OnLButtonDown(), and CPWL_Wnd::SetCapture().

Here is the call graph for this function:

◆ OnLButtonUp()

bool CPWL_Edit::OnLButtonUp ( Mask< FWL_EVENTFLAG > nFlag,
const CFX_PointF & point )
overridevirtual

Reimplemented from CPWL_Wnd.

Definition at line 692 of file cpwl_edit.cpp.

References CPWL_Wnd::ClientHitTest(), CPWL_Wnd::IsFocused(), CPWL_Wnd::OnLButtonUp(), CPWL_Wnd::ReleaseCapture(), and CPWL_Wnd::SetFocus().

Here is the call graph for this function:

◆ OnMouseMove()

bool CPWL_Edit::OnMouseMove ( Mask< FWL_EVENTFLAG > nFlag,
const CFX_PointF & point )
overridevirtual

Reimplemented from CPWL_Wnd.

Definition at line 728 of file cpwl_edit.cpp.

References CPWL_Wnd::OnMouseMove().

Here is the call graph for this function:

◆ OnMouseWheel()

bool CPWL_Edit::OnMouseWheel ( Mask< FWL_EVENTFLAG > nFlag,
const CFX_PointF & point,
const CFX_Vector & delta )
overridevirtual

Reimplemented from CPWL_Wnd.

Definition at line 442 of file cpwl_edit.cpp.

References GetFontSize(), CPWL_Wnd::HasFlag(), and SetScrollPos().

Here is the call graph for this function:

◆ OnRButtonUp()

bool CPWL_Edit::OnRButtonUp ( Mask< FWL_EVENTFLAG > nFlag,
const CFX_PointF & point )
overridevirtual

Reimplemented from CPWL_Wnd.

Definition at line 715 of file cpwl_edit.cpp.

References CPWL_Wnd::ClientHitTest(), CPWL_Wnd::HasFlag(), CPWL_Wnd::OnRButtonUp(), and CPWL_Wnd::SetFocus().

Here is the call graph for this function:

◆ OnSetFocus()

void CPWL_Edit::OnSetFocus ( )
overridevirtual

Reimplemented from CPWL_Wnd.

Definition at line 217 of file cpwl_edit.cpp.

References CPWL_Wnd::ProviderIface::OnSetFocusForEdit().

Here is the call graph for this function:

◆ Redo()

bool CPWL_Edit::Redo ( )
overridevirtual

Reimplemented from CPWL_Wnd.

Definition at line 842 of file cpwl_edit.cpp.

◆ ReplaceAndKeepSelection()

void CPWL_Edit::ReplaceAndKeepSelection ( const WideString & text)
overridevirtual

Reimplemented from CPWL_Wnd.

Definition at line 478 of file cpwl_edit.cpp.

◆ ReplaceSelection()

void CPWL_Edit::ReplaceSelection ( const WideString & text)
overridevirtual

Reimplemented from CPWL_Wnd.

Definition at line 482 of file cpwl_edit.cpp.

Referenced by CFFL_ComboBox::SetActionData(), and CFFL_TextField::SetActionData().

Here is the caller graph for this function:

◆ RepositionChildWnd()

bool CPWL_Edit::RepositionChildWnd ( )
overridevirtual

Reimplemented from CPWL_Wnd.

Definition at line 49 of file cpwl_edit.cpp.

References CFX_FloatRect::CFX_FloatRect(), CFX_FloatRect::bottom, GetClientRect(), CPWL_Wnd::HasFlag(), CFX_FloatRect::Inflate(), CFX_FloatRect::IsEmpty(), CPWL_ScrollBar::kWidth, CPWL_Wnd::Move(), CFX_FloatRect::Normalize(), CFX_FloatRect::right, and CFX_FloatRect::top.

Here is the call graph for this function:

◆ ScrollWindowVertically()

void CPWL_Edit::ScrollWindowVertically ( float pos)
overridevirtual

Reimplemented from CPWL_Wnd.

Definition at line 501 of file cpwl_edit.cpp.

◆ SelectAllText()

bool CPWL_Edit::SelectAllText ( )
overridevirtual

Reimplemented from CPWL_Wnd.

Definition at line 486 of file cpwl_edit.cpp.

◆ SetAlignFormatVerticalCenter()

void CPWL_Edit::SetAlignFormatVerticalCenter ( )

Definition at line 84 of file cpwl_edit.cpp.

◆ SetCaret()

bool CPWL_Edit::SetCaret ( bool bVisible,
const CFX_PointF & ptHead,
const CFX_PointF & ptFoot )

Definition at line 767 of file cpwl_edit.cpp.

◆ SetCharArray()

void CPWL_Edit::SetCharArray ( int32_t nCharArray)

Definition at line 290 of file cpwl_edit.cpp.

References GetCharArrayAutoFontSize(), GetClientRect(), CPWL_Wnd::GetFontMap(), IPVT_FontMap::GetPDFFont(), and CPWL_Wnd::HasFlag().

Here is the call graph for this function:

◆ SetCharSet()

void CPWL_Edit::SetCharSet ( FX_Charset nCharSet)
inline

Definition at line 81 of file cpwl_edit.h.

Referenced by CFFL_ComboBox::OnSetFocusForEdit(), and CFFL_TextField::OnSetFocusForEdit().

Here is the caller graph for this function:

◆ SetCursor()

void CPWL_Edit::SetCursor ( )
overridevirtual

Reimplemented from CPWL_Wnd.

Definition at line 466 of file cpwl_edit.cpp.

References CPWL_Wnd::GetFillerNotify(), CPWL_Wnd::IsValid(), IPWL_FillerNotify::kHBeam, and IPWL_FillerNotify::kVBeam.

Here is the call graph for this function:

◆ SetFontSize()

void CPWL_Edit::SetFontSize ( float fFontSize)
overridevirtual

Reimplemented from CPWL_Wnd.

Definition at line 527 of file cpwl_edit.cpp.

Referenced by OnCreated().

Here is the caller graph for this function:

◆ SetLimitChar()

void CPWL_Edit::SetLimitChar ( int32_t nLimitChar)

Definition at line 315 of file cpwl_edit.cpp.

◆ SetReadyToInput()

void CPWL_Edit::SetReadyToInput ( )

Definition at line 846 of file cpwl_edit.cpp.

References CPWL_Wnd::ReleaseCapture().

Referenced by CFFL_ComboBox::OnSetFocusForEdit(), and CFFL_TextField::OnSetFocusForEdit().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ SetScrollInfo()

void CPWL_Edit::SetScrollInfo ( const PWL_SCROLL_INFO & info)
overridevirtual

Reimplemented from CPWL_Wnd.

Definition at line 491 of file cpwl_edit.cpp.

References CPWL_Wnd::GetVScrollBar(), and CPWL_Wnd::SetScrollInfo().

Here is the call graph for this function:

◆ SetScrollPos()

void CPWL_Edit::SetScrollPos ( const CFX_PointF & point)

Definition at line 798 of file cpwl_edit.cpp.

Referenced by OnMouseWheel().

Here is the caller graph for this function:

◆ SetScrollPosition()

void CPWL_Edit::SetScrollPosition ( float pos)
overridevirtual

Reimplemented from CPWL_Wnd.

Definition at line 496 of file cpwl_edit.cpp.

References CPWL_Wnd::GetVScrollBar(), and CPWL_Wnd::SetScrollPosition().

Here is the call graph for this function:

◆ SetSelection()

void CPWL_Edit::SetSelection ( int32_t nStartChar,
int32_t nEndChar )

Definition at line 785 of file cpwl_edit.cpp.

Referenced by CFFL_ComboBox::SetActionData(), and CFFL_TextField::SetActionData().

Here is the caller graph for this function:

◆ SetText()

void CPWL_Edit::SetText ( const WideString & csText)

Definition at line 44 of file cpwl_edit.cpp.

◆ Undo()

bool CPWL_Edit::Undo ( )
overridevirtual

Reimplemented from CPWL_Wnd.

Definition at line 838 of file cpwl_edit.cpp.


The documentation for this class was generated from the following files: