diff options
Diffstat (limited to 'xfa/fxfa/cxfa_ffpushbutton.h')
-rw-r--r-- | xfa/fxfa/cxfa_ffpushbutton.h | 30 |
1 files changed, 16 insertions, 14 deletions
diff --git a/xfa/fxfa/cxfa_ffpushbutton.h b/xfa/fxfa/cxfa_ffpushbutton.h index e4b34b5fc..9c0771441 100644 --- a/xfa/fxfa/cxfa_ffpushbutton.h +++ b/xfa/fxfa/cxfa_ffpushbutton.h @@ -1,4 +1,4 @@ -// Copyright 2014 PDFium Authors. All rights reserved. +// Copyright 2014 The PDFium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -7,9 +7,7 @@ #ifndef XFA_FXFA_CXFA_FFPUSHBUTTON_H_ #define XFA_FXFA_CXFA_FFPUSHBUTTON_H_ -#include <memory> - -#include "core/fxcrt/unowned_ptr.h" +#include "v8/include/cppgc/member.h" #include "xfa/fxfa/cxfa_fffield.h" #define XFA_FWL_PSBSTYLEEXT_HiliteInverted (1L << 0) @@ -22,11 +20,13 @@ class CXFA_TextProvider; class CXFA_FFPushButton final : public CXFA_FFField { public: - CXFA_FFPushButton(CXFA_Node* pNode, CXFA_Button* button); + CONSTRUCT_VIA_MAKE_GARBAGE_COLLECTED; ~CXFA_FFPushButton() override; + void Trace(cppgc::Visitor* visitor) const override; + // CXFA_FFField - void RenderWidget(CXFA_Graphics* pGS, + void RenderWidget(CFGAS_GEGraphics* pGS, const CFX_Matrix& matrix, HighlightOption highlight) override; bool LoadWidget() override; @@ -34,24 +34,26 @@ class CXFA_FFPushButton final : public CXFA_FFField { void UpdateWidgetProperty() override; void OnProcessMessage(CFWL_Message* pMessage) override; void OnProcessEvent(CFWL_Event* pEvent) override; - void OnDrawWidget(CXFA_Graphics* pGraphics, + void OnDrawWidget(CFGAS_GEGraphics* pGraphics, const CFX_Matrix& matrix) override; FormFieldType GetFormFieldType() override; private: + CXFA_FFPushButton(CXFA_Node* pNode, CXFA_Button* button); + void LoadHighlightCaption(); void LayoutHighlightCaption(); - void RenderHighlightCaption(CXFA_Graphics* pGS, CFX_Matrix* pMatrix); + void RenderHighlightCaption(CFGAS_GEGraphics* pGS, CFX_Matrix* pMatrix); float GetLineWidth(); FX_ARGB GetLineColor(); FX_ARGB GetFillColor(); - std::unique_ptr<CXFA_TextLayout> m_pRolloverTextLayout; - std::unique_ptr<CXFA_TextLayout> m_pDownTextLayout; - std::unique_ptr<CXFA_TextProvider> m_pRollProvider; - std::unique_ptr<CXFA_TextProvider> m_pDownProvider; - UnownedPtr<IFWL_WidgetDelegate> m_pOldDelegate; - UnownedPtr<CXFA_Button> const button_; + cppgc::Member<CXFA_TextLayout> m_pRolloverTextLayout; + cppgc::Member<CXFA_TextLayout> m_pDownTextLayout; + cppgc::Member<CXFA_TextProvider> m_pRollProvider; + cppgc::Member<CXFA_TextProvider> m_pDownProvider; + cppgc::Member<IFWL_WidgetDelegate> m_pOldDelegate; + cppgc::Member<CXFA_Button> const button_; }; #endif // XFA_FXFA_CXFA_FFPUSHBUTTON_H_ |