From 2c489cc41023a40648dfde988d11b8ec2b66c7d0 Mon Sep 17 00:00:00 2001 From: dsinclair Date: Wed, 23 Nov 2016 16:17:20 -0800 Subject: Merge IFWL and CFWL classes. This CL merges the IFWL hierarchy into the CFWL hierachy. All CFWL proxy methods have been replaced by the IFWL implementations. Review-Url: https://codereview.chromium.org/2524173002 --- xfa/fxfa/app/xfa_ffcheckbutton.cpp | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'xfa/fxfa/app/xfa_ffcheckbutton.cpp') diff --git a/xfa/fxfa/app/xfa_ffcheckbutton.cpp b/xfa/fxfa/app/xfa_ffcheckbutton.cpp index a99b7b1cb4..06e3b2c8b8 100644 --- a/xfa/fxfa/app/xfa_ffcheckbutton.cpp +++ b/xfa/fxfa/app/xfa_ffcheckbutton.cpp @@ -28,13 +28,12 @@ CXFA_FFCheckButton::~CXFA_FFCheckButton() {} bool CXFA_FFCheckButton::LoadWidget() { CFWL_CheckBox* pCheckBox = new CFWL_CheckBox(GetFWLApp()); - pCheckBox->Initialize(); m_pNormalWidget = pCheckBox; m_pNormalWidget->SetLayoutItem(this); - IFWL_Widget* pWidget = m_pNormalWidget->GetWidget(); - CFWL_NoteDriver* pNoteDriver = pWidget->GetOwnerApp()->GetNoteDriver(); - pNoteDriver->RegisterEventTarget(pWidget, pWidget); + CFWL_NoteDriver* pNoteDriver = + m_pNormalWidget->GetOwnerApp()->GetNoteDriver(); + pNoteDriver->RegisterEventTarget(m_pNormalWidget, m_pNormalWidget); m_pOldDelegate = m_pNormalWidget->GetDelegate(); m_pNormalWidget->SetDelegate(this); @@ -238,8 +237,7 @@ void CXFA_FFCheckButton::RenderWidget(CFX_Graphics* pGS, CFX_Matrix mt; mt.Set(1, 0, 0, 1, m_rtCheckBox.left, m_rtCheckBox.top); mt.Concat(mtRotate); - GetApp()->GetWidgetMgrDelegate()->OnDrawWidget(m_pNormalWidget->GetWidget(), - pGS, &mt); + GetApp()->GetWidgetMgrDelegate()->OnDrawWidget(m_pNormalWidget, pGS, &mt); } bool CXFA_FFCheckButton::OnLButtonUp(uint32_t dwFlags, FX_FLOAT fx, @@ -254,7 +252,7 @@ bool CXFA_FFCheckButton::OnLButtonUp(uint32_t dwFlags, ms.m_fx = fx; ms.m_fy = fy; FWLToClient(ms.m_fx, ms.m_fy); - ms.m_pDstTarget = m_pNormalWidget->GetWidget(); + ms.m_pDstTarget = m_pNormalWidget; TranslateFWLMessage(&ms); return true; } -- cgit v1.2.3