From 7322343b9322b93d97077575f95a00dcca3f0451 Mon Sep 17 00:00:00 2001 From: dsinclair Date: Thu, 28 Apr 2016 10:51:13 -0700 Subject: More FWL interface cleanup. This CL merges the IFWL_Target class into IFWL_Widget and IFWL_Thread into IFWL_App. The IFWL_WidgetMgrDelegate, IFWL_NoteDriver and IFWL_NotThread are removed in favour of their concrete classes. Review-Url: https://codereview.chromium.org/1921853006 --- xfa/fwl/basewidget/fwl_barcodeimp.cpp | 1 - xfa/fwl/basewidget/fwl_caretimp.cpp | 1 - xfa/fwl/basewidget/fwl_checkboximp.cpp | 1 - xfa/fwl/basewidget/fwl_comboboximp.cpp | 22 +++++++++++----------- xfa/fwl/basewidget/fwl_datetimepickerimp.cpp | 1 - xfa/fwl/basewidget/fwl_editimp.cpp | 2 -- xfa/fwl/basewidget/fwl_formproxyimp.cpp | 1 - xfa/fwl/basewidget/fwl_listboximp.cpp | 1 - xfa/fwl/basewidget/fwl_monthcalendarimp.cpp | 1 - xfa/fwl/basewidget/fwl_pictureboximp.cpp | 1 - xfa/fwl/basewidget/fwl_pushbuttonimp.cpp | 1 - xfa/fwl/basewidget/fwl_scrollbarimp.cpp | 1 - xfa/fwl/basewidget/fwl_spinbuttonimp.cpp | 1 - xfa/fwl/basewidget/fwl_tooltipctrlimp.cpp | 1 - 14 files changed, 11 insertions(+), 25 deletions(-) (limited to 'xfa/fwl/basewidget') diff --git a/xfa/fwl/basewidget/fwl_barcodeimp.cpp b/xfa/fwl/basewidget/fwl_barcodeimp.cpp index cc0bd62257..d4589e39c1 100644 --- a/xfa/fwl/basewidget/fwl_barcodeimp.cpp +++ b/xfa/fwl/basewidget/fwl_barcodeimp.cpp @@ -10,7 +10,6 @@ #include "xfa/fwl/basewidget/fxmath_barcodeimp.h" #include "xfa/fwl/core/cfwl_themepart.h" #include "xfa/fwl/core/fwl_noteimp.h" -#include "xfa/fwl/core/fwl_targetimp.h" #include "xfa/fwl/core/fwl_widgetimp.h" #include "xfa/fwl/core/ifwl_themeprovider.h" diff --git a/xfa/fwl/basewidget/fwl_caretimp.cpp b/xfa/fwl/basewidget/fwl_caretimp.cpp index 959398cbd2..3cb2ed60f7 100644 --- a/xfa/fwl/basewidget/fwl_caretimp.cpp +++ b/xfa/fwl/basewidget/fwl_caretimp.cpp @@ -9,7 +9,6 @@ #include "xfa/fwl/basewidget/ifwl_caret.h" #include "xfa/fwl/core/cfwl_themebackground.h" #include "xfa/fwl/core/fwl_noteimp.h" -#include "xfa/fwl/core/fwl_targetimp.h" #include "xfa/fwl/core/fwl_widgetimp.h" #include "xfa/fwl/core/ifwl_themeprovider.h" diff --git a/xfa/fwl/basewidget/fwl_checkboximp.cpp b/xfa/fwl/basewidget/fwl_checkboximp.cpp index e511b8e444..76d5b8f421 100644 --- a/xfa/fwl/basewidget/fwl_checkboximp.cpp +++ b/xfa/fwl/basewidget/fwl_checkboximp.cpp @@ -14,7 +14,6 @@ #include "xfa/fwl/core/cfwl_themebackground.h" #include "xfa/fwl/core/cfwl_themetext.h" #include "xfa/fwl/core/fwl_noteimp.h" -#include "xfa/fwl/core/fwl_targetimp.h" #include "xfa/fwl/core/fwl_widgetimp.h" #include "xfa/fwl/core/fwl_widgetmgrimp.h" #include "xfa/fwl/core/ifwl_themeprovider.h" diff --git a/xfa/fwl/basewidget/fwl_comboboximp.cpp b/xfa/fwl/basewidget/fwl_comboboximp.cpp index d04c641fa3..60794da476 100644 --- a/xfa/fwl/basewidget/fwl_comboboximp.cpp +++ b/xfa/fwl/basewidget/fwl_comboboximp.cpp @@ -18,12 +18,10 @@ #include "xfa/fwl/core/fwl_appimp.h" #include "xfa/fwl/core/fwl_formimp.h" #include "xfa/fwl/core/fwl_noteimp.h" -#include "xfa/fwl/core/fwl_targetimp.h" -#include "xfa/fwl/core/fwl_threadimp.h" #include "xfa/fwl/core/fwl_widgetimp.h" #include "xfa/fwl/core/fwl_widgetmgrimp.h" +#include "xfa/fwl/core/ifwl_app.h" #include "xfa/fwl/core/ifwl_themeprovider.h" -#include "xfa/fwl/core/ifwl_thread.h" // static IFWL_ComboBox* IFWL_ComboBox::Create( @@ -1457,8 +1455,8 @@ FWL_ERR CFWL_ComboBoxImpDelegate::OnDrawWidget(CFX_Graphics* pGraphics, } void CFWL_ComboBoxImpDelegate::OnFocusChanged(CFWL_Message* pMsg, FX_BOOL bSet) { - IFWL_Target* pDstTarget = pMsg->m_pDstTarget; - IFWL_Target* pSrcTarget = pMsg->m_pSrcTarget; + IFWL_Widget* pDstTarget = pMsg->m_pDstTarget; + IFWL_Widget* pSrcTarget = pMsg->m_pSrcTarget; FX_BOOL bDropDown = m_pOwner->IsDropDownStyle(); if (bSet) { m_pOwner->m_pProperties->m_dwStates |= FWL_WGTSTATE_Focused; @@ -1803,11 +1801,12 @@ FWL_ERR CFWL_ComboProxyImpDelegate::OnDrawWidget(CFX_Graphics* pGraphics, return FWL_ERR_Succeeded; } void CFWL_ComboProxyImpDelegate::OnLButtonDown(CFWL_MsgMouse* pMsg) { - IFWL_Thread* pThread = m_pForm->GetOwnerThread(); - if (!pThread) + IFWL_App* pApp = m_pForm->GetOwnerApp(); + if (!pApp) return; + CFWL_NoteDriver* pDriver = - static_cast(pThread->GetNoteDriver()); + static_cast(pApp->GetNoteDriver()); CFX_RectF rtWidget; m_pForm->GetWidgetRect(rtWidget); rtWidget.left = rtWidget.top = 0; @@ -1822,11 +1821,12 @@ void CFWL_ComboProxyImpDelegate::OnLButtonDown(CFWL_MsgMouse* pMsg) { } void CFWL_ComboProxyImpDelegate::OnLButtonUp(CFWL_MsgMouse* pMsg) { m_bLButtonDown = FALSE; - IFWL_Thread* pThread = m_pForm->GetOwnerThread(); - if (!pThread) + IFWL_App* pApp = m_pForm->GetOwnerApp(); + if (!pApp) return; + CFWL_NoteDriver* pDriver = - static_cast(pThread->GetNoteDriver()); + static_cast(pApp->GetNoteDriver()); pDriver->SetGrab(m_pForm, FALSE); if (m_bLButtonUpSelf) { CFX_RectF rect; diff --git a/xfa/fwl/basewidget/fwl_datetimepickerimp.cpp b/xfa/fwl/basewidget/fwl_datetimepickerimp.cpp index 94fa549fe4..941b222789 100644 --- a/xfa/fwl/basewidget/fwl_datetimepickerimp.cpp +++ b/xfa/fwl/basewidget/fwl_datetimepickerimp.cpp @@ -14,7 +14,6 @@ #include "xfa/fwl/core/cfwl_themebackground.h" #include "xfa/fwl/core/fwl_formimp.h" #include "xfa/fwl/core/fwl_noteimp.h" -#include "xfa/fwl/core/fwl_targetimp.h" #include "xfa/fwl/core/fwl_widgetimp.h" #include "xfa/fwl/core/fwl_widgetmgrimp.h" #include "xfa/fwl/core/ifwl_themeprovider.h" diff --git a/xfa/fwl/basewidget/fwl_editimp.cpp b/xfa/fwl/basewidget/fwl_editimp.cpp index 74db0c96af..86c6fe8874 100644 --- a/xfa/fwl/basewidget/fwl_editimp.cpp +++ b/xfa/fwl/basewidget/fwl_editimp.cpp @@ -22,8 +22,6 @@ #include "xfa/fwl/core/cfwl_themepart.h" #include "xfa/fwl/core/fwl_appimp.h" #include "xfa/fwl/core/fwl_noteimp.h" -#include "xfa/fwl/core/fwl_targetimp.h" -#include "xfa/fwl/core/fwl_threadimp.h" #include "xfa/fwl/core/fwl_widgetimp.h" #include "xfa/fwl/core/fwl_widgetmgrimp.h" #include "xfa/fwl/core/ifwl_themeprovider.h" diff --git a/xfa/fwl/basewidget/fwl_formproxyimp.cpp b/xfa/fwl/basewidget/fwl_formproxyimp.cpp index b86f287cee..0a5bb67aec 100644 --- a/xfa/fwl/basewidget/fwl_formproxyimp.cpp +++ b/xfa/fwl/basewidget/fwl_formproxyimp.cpp @@ -8,7 +8,6 @@ #include "xfa/fwl/core/fwl_formimp.h" #include "xfa/fwl/core/fwl_noteimp.h" -#include "xfa/fwl/core/fwl_targetimp.h" #include "xfa/fwl/core/fwl_widgetimp.h" CFWL_FormProxyImp::CFWL_FormProxyImp(const CFWL_WidgetImpProperties& properties, diff --git a/xfa/fwl/basewidget/fwl_listboximp.cpp b/xfa/fwl/basewidget/fwl_listboximp.cpp index 49d5d41d87..9b5d2fc424 100644 --- a/xfa/fwl/basewidget/fwl_listboximp.cpp +++ b/xfa/fwl/basewidget/fwl_listboximp.cpp @@ -14,7 +14,6 @@ #include "xfa/fwl/core/cfwl_themepart.h" #include "xfa/fwl/core/cfwl_themetext.h" #include "xfa/fwl/core/fwl_noteimp.h" -#include "xfa/fwl/core/fwl_targetimp.h" #include "xfa/fwl/core/fwl_widgetimp.h" #include "xfa/fwl/core/ifwl_themeprovider.h" diff --git a/xfa/fwl/basewidget/fwl_monthcalendarimp.cpp b/xfa/fwl/basewidget/fwl_monthcalendarimp.cpp index 32cec6d2e7..4b7f342bf7 100644 --- a/xfa/fwl/basewidget/fwl_monthcalendarimp.cpp +++ b/xfa/fwl/basewidget/fwl_monthcalendarimp.cpp @@ -14,7 +14,6 @@ #include "xfa/fwl/core/cfwl_themebackground.h" #include "xfa/fwl/core/cfwl_themetext.h" #include "xfa/fwl/core/fwl_noteimp.h" -#include "xfa/fwl/core/fwl_targetimp.h" #include "xfa/fwl/core/fwl_widgetimp.h" #include "xfa/fwl/core/ifwl_themeprovider.h" diff --git a/xfa/fwl/basewidget/fwl_pictureboximp.cpp b/xfa/fwl/basewidget/fwl_pictureboximp.cpp index e61dae3b2b..4495a495ba 100644 --- a/xfa/fwl/basewidget/fwl_pictureboximp.cpp +++ b/xfa/fwl/basewidget/fwl_pictureboximp.cpp @@ -7,7 +7,6 @@ #include "xfa/fwl/basewidget/fwl_pictureboximp.h" #include "xfa/fwl/core/fwl_noteimp.h" -#include "xfa/fwl/core/fwl_targetimp.h" #include "xfa/fwl/core/fwl_widgetimp.h" #include "xfa/fwl/lightwidget/cfwl_picturebox.h" diff --git a/xfa/fwl/basewidget/fwl_pushbuttonimp.cpp b/xfa/fwl/basewidget/fwl_pushbuttonimp.cpp index 167d8f3c1f..9d6e3b19a9 100644 --- a/xfa/fwl/basewidget/fwl_pushbuttonimp.cpp +++ b/xfa/fwl/basewidget/fwl_pushbuttonimp.cpp @@ -12,7 +12,6 @@ #include "xfa/fwl/core/cfwl_themebackground.h" #include "xfa/fwl/core/cfwl_themetext.h" #include "xfa/fwl/core/fwl_noteimp.h" -#include "xfa/fwl/core/fwl_targetimp.h" #include "xfa/fwl/core/fwl_widgetimp.h" #include "xfa/fwl/core/ifwl_themeprovider.h" diff --git a/xfa/fwl/basewidget/fwl_scrollbarimp.cpp b/xfa/fwl/basewidget/fwl_scrollbarimp.cpp index fed93fbc07..69c28959d9 100644 --- a/xfa/fwl/basewidget/fwl_scrollbarimp.cpp +++ b/xfa/fwl/basewidget/fwl_scrollbarimp.cpp @@ -11,7 +11,6 @@ #include "xfa/fwl/core/cfwl_themebackground.h" #include "xfa/fwl/core/cfwl_themepart.h" #include "xfa/fwl/core/fwl_noteimp.h" -#include "xfa/fwl/core/fwl_targetimp.h" #include "xfa/fwl/core/fwl_widgetimp.h" #include "xfa/fwl/core/ifwl_themeprovider.h" diff --git a/xfa/fwl/basewidget/fwl_spinbuttonimp.cpp b/xfa/fwl/basewidget/fwl_spinbuttonimp.cpp index 6d60d81e81..434f6ddacf 100644 --- a/xfa/fwl/basewidget/fwl_spinbuttonimp.cpp +++ b/xfa/fwl/basewidget/fwl_spinbuttonimp.cpp @@ -11,7 +11,6 @@ #include "xfa/fwl/core/cfwl_themebackground.h" #include "xfa/fwl/core/cfwl_widgetimpproperties.h" #include "xfa/fwl/core/fwl_noteimp.h" -#include "xfa/fwl/core/fwl_targetimp.h" #include "xfa/fwl/core/fwl_widgetimp.h" #include "xfa/fwl/core/ifwl_themeprovider.h" #include "xfa/fwl/core/ifwl_themeprovider.h" diff --git a/xfa/fwl/basewidget/fwl_tooltipctrlimp.cpp b/xfa/fwl/basewidget/fwl_tooltipctrlimp.cpp index 36751b637d..2ce52c65a4 100644 --- a/xfa/fwl/basewidget/fwl_tooltipctrlimp.cpp +++ b/xfa/fwl/basewidget/fwl_tooltipctrlimp.cpp @@ -13,7 +13,6 @@ #include "xfa/fwl/core/cfwl_themetext.h" #include "xfa/fwl/core/fwl_formimp.h" #include "xfa/fwl/core/fwl_noteimp.h" -#include "xfa/fwl/core/fwl_targetimp.h" #include "xfa/fwl/core/fwl_widgetimp.h" #include "xfa/fwl/core/ifwl_themeprovider.h" #include "xfa/fwl/core/ifwl_tooltiptarget.h" -- cgit v1.2.3