From 1a7534a1a477323f7b8497e359f6af6e9bd54cd5 Mon Sep 17 00:00:00 2001 From: dsinclair Date: Tue, 22 Nov 2016 15:56:11 -0800 Subject: Rename IFWL_App to CFWL_App This class is not an interface but a concrete implementation. Rename to match. Review-Url: https://codereview.chromium.org/2521303002 --- BUILD.gn | 4 ++-- fpdfsdk/cpdfsdk_xfawidgethandler.cpp | 2 +- xfa/fwl/core/cfwl_app.cpp | 22 ++++++++++++++++++ xfa/fwl/core/cfwl_app.h | 45 ++++++++++++++++++++++++++++++++++++ xfa/fwl/core/cfwl_barcode.cpp | 2 +- xfa/fwl/core/cfwl_barcode.h | 2 +- xfa/fwl/core/cfwl_checkbox.cpp | 2 +- xfa/fwl/core/cfwl_checkbox.h | 2 +- xfa/fwl/core/cfwl_combobox.cpp | 2 +- xfa/fwl/core/cfwl_combobox.h | 2 +- xfa/fwl/core/cfwl_datetimepicker.cpp | 2 +- xfa/fwl/core/cfwl_datetimepicker.h | 2 +- xfa/fwl/core/cfwl_edit.cpp | 2 +- xfa/fwl/core/cfwl_edit.h | 2 +- xfa/fwl/core/cfwl_listbox.cpp | 2 +- xfa/fwl/core/cfwl_listbox.h | 2 +- xfa/fwl/core/cfwl_notedriver.cpp | 2 +- xfa/fwl/core/cfwl_picturebox.cpp | 2 +- xfa/fwl/core/cfwl_picturebox.h | 2 +- xfa/fwl/core/cfwl_pushbutton.cpp | 2 +- xfa/fwl/core/cfwl_pushbutton.h | 2 +- xfa/fwl/core/cfwl_timer.cpp | 4 ++-- xfa/fwl/core/cfwl_widget.cpp | 4 ++-- xfa/fwl/core/cfwl_widget.h | 4 ++-- xfa/fwl/core/cfwl_widgetmgr.cpp | 4 ++-- xfa/fwl/core/ifwl_app.cpp | 22 ------------------ xfa/fwl/core/ifwl_app.h | 45 ------------------------------------ xfa/fwl/core/ifwl_barcode.cpp | 2 +- xfa/fwl/core/ifwl_barcode.h | 2 +- xfa/fwl/core/ifwl_caret.cpp | 2 +- xfa/fwl/core/ifwl_caret.h | 2 +- xfa/fwl/core/ifwl_checkbox.cpp | 4 ++-- xfa/fwl/core/ifwl_checkbox.h | 2 +- xfa/fwl/core/ifwl_combobox.cpp | 4 ++-- xfa/fwl/core/ifwl_combobox.h | 2 +- xfa/fwl/core/ifwl_comboboxproxy.cpp | 8 +++---- xfa/fwl/core/ifwl_comboboxproxy.h | 2 +- xfa/fwl/core/ifwl_comboedit.cpp | 2 +- xfa/fwl/core/ifwl_comboedit.h | 2 +- xfa/fwl/core/ifwl_combolist.cpp | 2 +- xfa/fwl/core/ifwl_combolist.h | 2 +- xfa/fwl/core/ifwl_datetimeedit.cpp | 2 +- xfa/fwl/core/ifwl_datetimeedit.h | 2 +- xfa/fwl/core/ifwl_datetimepicker.cpp | 2 +- xfa/fwl/core/ifwl_datetimepicker.h | 2 +- xfa/fwl/core/ifwl_edit.cpp | 4 ++-- xfa/fwl/core/ifwl_edit.h | 2 +- xfa/fwl/core/ifwl_form.cpp | 12 +++++----- xfa/fwl/core/ifwl_form.h | 2 +- xfa/fwl/core/ifwl_formproxy.cpp | 2 +- xfa/fwl/core/ifwl_formproxy.h | 2 +- xfa/fwl/core/ifwl_listbox.cpp | 4 ++-- xfa/fwl/core/ifwl_listbox.h | 2 +- xfa/fwl/core/ifwl_monthcalendar.cpp | 2 +- xfa/fwl/core/ifwl_monthcalendar.h | 2 +- xfa/fwl/core/ifwl_picturebox.cpp | 2 +- xfa/fwl/core/ifwl_picturebox.h | 2 +- xfa/fwl/core/ifwl_pushbutton.cpp | 2 +- xfa/fwl/core/ifwl_pushbutton.h | 2 +- xfa/fwl/core/ifwl_scrollbar.cpp | 2 +- xfa/fwl/core/ifwl_scrollbar.h | 2 +- xfa/fwl/core/ifwl_spinbutton.cpp | 2 +- xfa/fwl/core/ifwl_spinbutton.h | 2 +- xfa/fwl/core/ifwl_widget.cpp | 16 ++++++------- xfa/fwl/core/ifwl_widget.h | 8 +++---- xfa/fxfa/app/xfa_ffapp.cpp | 3 +-- xfa/fxfa/app/xfa_ffbarcode.cpp | 2 +- xfa/fxfa/app/xfa_ffchoicelist.cpp | 2 +- xfa/fxfa/app/xfa_ffimageedit.cpp | 2 +- xfa/fxfa/app/xfa_ffwidget.cpp | 2 +- xfa/fxfa/xfa_ffapp.h | 6 ++--- xfa/fxfa/xfa_ffwidget.h | 4 ++-- 72 files changed, 165 insertions(+), 166 deletions(-) create mode 100644 xfa/fwl/core/cfwl_app.cpp create mode 100644 xfa/fwl/core/cfwl_app.h delete mode 100644 xfa/fwl/core/ifwl_app.cpp delete mode 100644 xfa/fwl/core/ifwl_app.h diff --git a/BUILD.gn b/BUILD.gn index 9e58f5a8ac..6ce0545677 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -1180,6 +1180,8 @@ if (pdf_enable_xfa) { "xfa/fgas/localization/fgas_locale.cpp", "xfa/fgas/localization/fgas_locale.h", "xfa/fgas/localization/fgas_localeimp.h", + "xfa/fwl/core/cfwl_app.cpp", + "xfa/fwl/core/cfwl_app.h", "xfa/fwl/core/cfwl_barcode.cpp", "xfa/fwl/core/cfwl_barcode.h", "xfa/fwl/core/cfwl_checkbox.cpp", @@ -1276,8 +1278,6 @@ if (pdf_enable_xfa) { "xfa/fwl/core/fwl_widgetdef.h", "xfa/fwl/core/fwl_widgethit.h", "xfa/fwl/core/ifwl_adaptertimermgr.h", - "xfa/fwl/core/ifwl_app.cpp", - "xfa/fwl/core/ifwl_app.h", "xfa/fwl/core/ifwl_barcode.cpp", "xfa/fwl/core/ifwl_barcode.h", "xfa/fwl/core/ifwl_caret.cpp", diff --git a/fpdfsdk/cpdfsdk_xfawidgethandler.cpp b/fpdfsdk/cpdfsdk_xfawidgethandler.cpp index 2401a6fefa..11c560b53f 100644 --- a/fpdfsdk/cpdfsdk_xfawidgethandler.cpp +++ b/fpdfsdk/cpdfsdk_xfawidgethandler.cpp @@ -13,8 +13,8 @@ #include "fpdfsdk/cpdfsdk_pageview.h" #include "fpdfsdk/cpdfsdk_xfawidget.h" #include "fpdfsdk/fpdfxfa/cpdfxfa_context.h" +#include "xfa/fwl/core/cfwl_app.h" #include "xfa/fwl/core/fwl_widgethit.h" -#include "xfa/fwl/core/ifwl_app.h" #include "xfa/fxfa/fxfa_basic.h" #include "xfa/fxfa/xfa_ffdocview.h" #include "xfa/fxfa/xfa_ffpageview.h" diff --git a/xfa/fwl/core/cfwl_app.cpp b/xfa/fwl/core/cfwl_app.cpp new file mode 100644 index 0000000000..4905e2335f --- /dev/null +++ b/xfa/fwl/core/cfwl_app.cpp @@ -0,0 +1,22 @@ +// Copyright 2014 PDFium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com + +#include "xfa/fwl/core/cfwl_app.h" + +#include "third_party/base/ptr_util.h" +#include "xfa/fwl/core/cfwl_notedriver.h" +#include "xfa/fwl/core/cfwl_widgetmgr.h" +#include "xfa/fwl/core/ifwl_widget.h" +#include "xfa/fxfa/app/xfa_fwladapter.h" + +CFWL_App::CFWL_App(CXFA_FFApp* pAdapter) + : m_pAdapterNative(pAdapter), + m_pWidgetMgr(pdfium::MakeUnique(pAdapter)), + m_pNoteDriver(pdfium::MakeUnique()) { + ASSERT(m_pAdapterNative); +} + +CFWL_App::~CFWL_App() {} diff --git a/xfa/fwl/core/cfwl_app.h b/xfa/fwl/core/cfwl_app.h new file mode 100644 index 0000000000..28ed8a46c2 --- /dev/null +++ b/xfa/fwl/core/cfwl_app.h @@ -0,0 +1,45 @@ +// Copyright 2014 PDFium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com + +#ifndef XFA_FWL_CORE_CFWL_APP_H_ +#define XFA_FWL_CORE_CFWL_APP_H_ + +#include + +#include "core/fxcrt/fx_string.h" + +class CFWL_NoteDriver; +class CFWL_WidgetMgr; +class CXFA_FFApp; +class CXFA_FWLAdapterWidgetMgr; +class IFWL_Widget; + +enum FWL_KeyFlag { + FWL_KEYFLAG_Ctrl = 1 << 0, + FWL_KEYFLAG_Alt = 1 << 1, + FWL_KEYFLAG_Shift = 1 << 2, + FWL_KEYFLAG_Command = 1 << 3, + FWL_KEYFLAG_LButton = 1 << 4, + FWL_KEYFLAG_RButton = 1 << 5, + FWL_KEYFLAG_MButton = 1 << 6 +}; + +class CFWL_App { + public: + explicit CFWL_App(CXFA_FFApp* pAdapter); + ~CFWL_App(); + + CXFA_FFApp* GetAdapterNative() const { return m_pAdapterNative; } + CFWL_WidgetMgr* GetWidgetMgr() const { return m_pWidgetMgr.get(); } + CFWL_NoteDriver* GetNoteDriver() const { return m_pNoteDriver.get(); } + + private: + CXFA_FFApp* const m_pAdapterNative; + std::unique_ptr m_pWidgetMgr; + std::unique_ptr m_pNoteDriver; +}; + +#endif // XFA_FWL_CORE_CFWL_APP_H_ diff --git a/xfa/fwl/core/cfwl_barcode.cpp b/xfa/fwl/core/cfwl_barcode.cpp index 00bf82957a..97249c92cf 100644 --- a/xfa/fwl/core/cfwl_barcode.cpp +++ b/xfa/fwl/core/cfwl_barcode.cpp @@ -18,7 +18,7 @@ IFWL_Barcode* ToBarcode(IFWL_Widget* widget) { } // namespace -CFWL_Barcode::CFWL_Barcode(const IFWL_App* app) +CFWL_Barcode::CFWL_Barcode(const CFWL_App* app) : CFWL_Edit(app), m_dwAttributeMask(FWL_BCDATTRIBUTE_NONE) {} CFWL_Barcode::~CFWL_Barcode() {} diff --git a/xfa/fwl/core/cfwl_barcode.h b/xfa/fwl/core/cfwl_barcode.h index 0f52a048b1..90dfdcaebd 100644 --- a/xfa/fwl/core/cfwl_barcode.h +++ b/xfa/fwl/core/cfwl_barcode.h @@ -13,7 +13,7 @@ class CFWL_Barcode : public CFWL_Edit, public IFWL_Barcode::DataProvider { public: - explicit CFWL_Barcode(const IFWL_App* pApp); + explicit CFWL_Barcode(const CFWL_App* pApp); ~CFWL_Barcode() override; void Initialize(); diff --git a/xfa/fwl/core/cfwl_checkbox.cpp b/xfa/fwl/core/cfwl_checkbox.cpp index 8117dfe631..0e757c326a 100644 --- a/xfa/fwl/core/cfwl_checkbox.cpp +++ b/xfa/fwl/core/cfwl_checkbox.cpp @@ -11,7 +11,7 @@ #include "third_party/base/ptr_util.h" #include "xfa/fwl/core/fwl_error.h" -CFWL_CheckBox::CFWL_CheckBox(const IFWL_App* app) +CFWL_CheckBox::CFWL_CheckBox(const CFWL_App* app) : CFWL_Widget(app), m_fBoxHeight(16.0f) {} CFWL_CheckBox::~CFWL_CheckBox() {} diff --git a/xfa/fwl/core/cfwl_checkbox.h b/xfa/fwl/core/cfwl_checkbox.h index 099fe31d28..dd1db68b32 100644 --- a/xfa/fwl/core/cfwl_checkbox.h +++ b/xfa/fwl/core/cfwl_checkbox.h @@ -12,7 +12,7 @@ class CFWL_CheckBox : public CFWL_Widget, public IFWL_CheckBox::DataProvider { public: - explicit CFWL_CheckBox(const IFWL_App* pApp); + explicit CFWL_CheckBox(const CFWL_App* pApp); ~CFWL_CheckBox() override; void Initialize(); diff --git a/xfa/fwl/core/cfwl_combobox.cpp b/xfa/fwl/core/cfwl_combobox.cpp index c1e8a3df67..602e09d4b0 100644 --- a/xfa/fwl/core/cfwl_combobox.cpp +++ b/xfa/fwl/core/cfwl_combobox.cpp @@ -21,7 +21,7 @@ IFWL_ComboBox* ToComboBox(IFWL_Widget* widget) { } // namespace -CFWL_ComboBox::CFWL_ComboBox(const IFWL_App* app) +CFWL_ComboBox::CFWL_ComboBox(const CFWL_App* app) : CFWL_Widget(app), m_fMaxListHeight(0) {} CFWL_ComboBox::~CFWL_ComboBox() {} diff --git a/xfa/fwl/core/cfwl_combobox.h b/xfa/fwl/core/cfwl_combobox.h index 45d571f987..2036b933fd 100644 --- a/xfa/fwl/core/cfwl_combobox.h +++ b/xfa/fwl/core/cfwl_combobox.h @@ -15,7 +15,7 @@ class CFWL_ComboBox : public CFWL_Widget, public IFWL_ComboBox::DataProvider { public: - explicit CFWL_ComboBox(const IFWL_App* pApp); + explicit CFWL_ComboBox(const CFWL_App* pApp); ~CFWL_ComboBox() override; void Initialize(); diff --git a/xfa/fwl/core/cfwl_datetimepicker.cpp b/xfa/fwl/core/cfwl_datetimepicker.cpp index abb85468cf..4f3b510cf0 100644 --- a/xfa/fwl/core/cfwl_datetimepicker.cpp +++ b/xfa/fwl/core/cfwl_datetimepicker.cpp @@ -21,7 +21,7 @@ IFWL_DateTimePicker* ToDateTimePicker(IFWL_Widget* widget) { } // namespace -CFWL_DateTimePicker::CFWL_DateTimePicker(const IFWL_App* app) +CFWL_DateTimePicker::CFWL_DateTimePicker(const CFWL_App* app) : CFWL_Widget(app) {} CFWL_DateTimePicker::~CFWL_DateTimePicker() {} diff --git a/xfa/fwl/core/cfwl_datetimepicker.h b/xfa/fwl/core/cfwl_datetimepicker.h index 8cdc7c10ce..25fb6f8678 100644 --- a/xfa/fwl/core/cfwl_datetimepicker.h +++ b/xfa/fwl/core/cfwl_datetimepicker.h @@ -13,7 +13,7 @@ class CFWL_DateTimePicker : public CFWL_Widget, public IFWL_DateTimePicker::DataProvider { public: - explicit CFWL_DateTimePicker(const IFWL_App* pApp); + explicit CFWL_DateTimePicker(const CFWL_App* pApp); ~CFWL_DateTimePicker() override; void Initialize(); diff --git a/xfa/fwl/core/cfwl_edit.cpp b/xfa/fwl/core/cfwl_edit.cpp index 447dbc8fb2..e404b1de6a 100644 --- a/xfa/fwl/core/cfwl_edit.cpp +++ b/xfa/fwl/core/cfwl_edit.cpp @@ -19,7 +19,7 @@ IFWL_Edit* ToEdit(IFWL_Widget* widget) { } // namespace -CFWL_Edit::CFWL_Edit(const IFWL_App* app) : CFWL_Widget(app) {} +CFWL_Edit::CFWL_Edit(const CFWL_App* app) : CFWL_Widget(app) {} CFWL_Edit::~CFWL_Edit() {} diff --git a/xfa/fwl/core/cfwl_edit.h b/xfa/fwl/core/cfwl_edit.h index f7dc5e7319..4570d57f6e 100644 --- a/xfa/fwl/core/cfwl_edit.h +++ b/xfa/fwl/core/cfwl_edit.h @@ -16,7 +16,7 @@ class IFDE_TxtEdtDoRecord; class CFWL_Edit : public CFWL_Widget { public: - explicit CFWL_Edit(const IFWL_App*); + explicit CFWL_Edit(const CFWL_App*); ~CFWL_Edit() override; void Initialize(); diff --git a/xfa/fwl/core/cfwl_listbox.cpp b/xfa/fwl/core/cfwl_listbox.cpp index 7da49efbb0..cefee8ca87 100644 --- a/xfa/fwl/core/cfwl_listbox.cpp +++ b/xfa/fwl/core/cfwl_listbox.cpp @@ -21,7 +21,7 @@ IFWL_ListBox* ToListBox(IFWL_Widget* widget) { } // namespace -CFWL_ListBox::CFWL_ListBox(const IFWL_App* app) : CFWL_Widget(app) {} +CFWL_ListBox::CFWL_ListBox(const CFWL_App* app) : CFWL_Widget(app) {} CFWL_ListBox::~CFWL_ListBox() {} diff --git a/xfa/fwl/core/cfwl_listbox.h b/xfa/fwl/core/cfwl_listbox.h index 80bc23b2d0..504b1d9804 100644 --- a/xfa/fwl/core/cfwl_listbox.h +++ b/xfa/fwl/core/cfwl_listbox.h @@ -17,7 +17,7 @@ class CFWL_ListBox : public CFWL_Widget, public IFWL_ListBox::DataProvider { public: - explicit CFWL_ListBox(const IFWL_App* pApp); + explicit CFWL_ListBox(const CFWL_App* pApp); ~CFWL_ListBox() override; void Initialize(); diff --git a/xfa/fwl/core/cfwl_notedriver.cpp b/xfa/fwl/core/cfwl_notedriver.cpp index 051619bee2..f4f325f95a 100644 --- a/xfa/fwl/core/cfwl_notedriver.cpp +++ b/xfa/fwl/core/cfwl_notedriver.cpp @@ -11,6 +11,7 @@ #include "core/fxcrt/fx_ext.h" #include "third_party/base/ptr_util.h" #include "third_party/base/stl_util.h" +#include "xfa/fwl/core/cfwl_app.h" #include "xfa/fwl/core/cfwl_eventtarget.h" #include "xfa/fwl/core/cfwl_msgkey.h" #include "xfa/fwl/core/cfwl_msgkillfocus.h" @@ -19,7 +20,6 @@ #include "xfa/fwl/core/cfwl_msgsetfocus.h" #include "xfa/fwl/core/cfwl_noteloop.h" #include "xfa/fwl/core/cfwl_widgetmgr.h" -#include "xfa/fwl/core/ifwl_app.h" #include "xfa/fwl/core/ifwl_form.h" CFWL_NoteDriver::CFWL_NoteDriver() diff --git a/xfa/fwl/core/cfwl_picturebox.cpp b/xfa/fwl/core/cfwl_picturebox.cpp index 3298307a59..c1a331a89f 100644 --- a/xfa/fwl/core/cfwl_picturebox.cpp +++ b/xfa/fwl/core/cfwl_picturebox.cpp @@ -10,7 +10,7 @@ #include "third_party/base/ptr_util.h" -CFWL_PictureBox::CFWL_PictureBox(const IFWL_App* app) : CFWL_Widget(app) {} +CFWL_PictureBox::CFWL_PictureBox(const CFWL_App* app) : CFWL_Widget(app) {} CFWL_PictureBox::~CFWL_PictureBox() {} diff --git a/xfa/fwl/core/cfwl_picturebox.h b/xfa/fwl/core/cfwl_picturebox.h index ce61a34519..e23a6ab2da 100644 --- a/xfa/fwl/core/cfwl_picturebox.h +++ b/xfa/fwl/core/cfwl_picturebox.h @@ -13,7 +13,7 @@ class CFWL_PictureBox : public CFWL_Widget, public IFWL_Widget::DataProvider { public: - explicit CFWL_PictureBox(const IFWL_App* pApp); + explicit CFWL_PictureBox(const CFWL_App* pApp); ~CFWL_PictureBox() override; void Initialize(); diff --git a/xfa/fwl/core/cfwl_pushbutton.cpp b/xfa/fwl/core/cfwl_pushbutton.cpp index 3d98498ea8..33c669822a 100644 --- a/xfa/fwl/core/cfwl_pushbutton.cpp +++ b/xfa/fwl/core/cfwl_pushbutton.cpp @@ -10,7 +10,7 @@ #include "third_party/base/ptr_util.h" -CFWL_PushButton::CFWL_PushButton(const IFWL_App* app) : CFWL_Widget(app) {} +CFWL_PushButton::CFWL_PushButton(const CFWL_App* app) : CFWL_Widget(app) {} CFWL_PushButton::~CFWL_PushButton() {} diff --git a/xfa/fwl/core/cfwl_pushbutton.h b/xfa/fwl/core/cfwl_pushbutton.h index 2d7fa9f075..be8c5ebc43 100644 --- a/xfa/fwl/core/cfwl_pushbutton.h +++ b/xfa/fwl/core/cfwl_pushbutton.h @@ -13,7 +13,7 @@ class CFWL_PushButton : public CFWL_Widget, public IFWL_Widget::DataProvider { public: - explicit CFWL_PushButton(const IFWL_App*); + explicit CFWL_PushButton(const CFWL_App*); ~CFWL_PushButton() override; void Initialize(); diff --git a/xfa/fwl/core/cfwl_timer.cpp b/xfa/fwl/core/cfwl_timer.cpp index 289996e672..2d92e6d61f 100644 --- a/xfa/fwl/core/cfwl_timer.cpp +++ b/xfa/fwl/core/cfwl_timer.cpp @@ -6,14 +6,14 @@ #include "xfa/fwl/core/cfwl_timer.h" +#include "xfa/fwl/core/cfwl_app.h" #include "xfa/fwl/core/cfwl_timerinfo.h" #include "xfa/fwl/core/ifwl_adaptertimermgr.h" -#include "xfa/fwl/core/ifwl_app.h" #include "xfa/fwl/core/ifwl_widget.h" #include "xfa/fxfa/xfa_ffapp.h" CFWL_TimerInfo* CFWL_Timer::StartTimer(uint32_t dwElapse, bool bImmediately) { - const IFWL_App* pApp = m_pWidget->GetOwnerApp(); + const CFWL_App* pApp = m_pWidget->GetOwnerApp(); if (!pApp) return nullptr; diff --git a/xfa/fwl/core/cfwl_widget.cpp b/xfa/fwl/core/cfwl_widget.cpp index 2e08be7817..5914ce58ec 100644 --- a/xfa/fwl/core/cfwl_widget.cpp +++ b/xfa/fwl/core/cfwl_widget.cpp @@ -7,17 +7,17 @@ #include "xfa/fwl/core/cfwl_widget.h" #include "xfa/fde/tto/fde_textout.h" +#include "xfa/fwl/core/cfwl_app.h" #include "xfa/fwl/core/cfwl_notedriver.h" #include "xfa/fwl/core/cfwl_themetext.h" #include "xfa/fwl/core/cfwl_widgetmgr.h" -#include "xfa/fwl/core/ifwl_app.h" #include "xfa/fwl/core/ifwl_themeprovider.h" #define FWL_WGT_CalcHeight 2048 #define FWL_WGT_CalcWidth 2048 #define FWL_WGT_CalcMultiLineDefWidth 120.0f -CFWL_Widget::CFWL_Widget(const IFWL_App* app) : m_pApp(app) {} +CFWL_Widget::CFWL_Widget(const CFWL_App* app) : m_pApp(app) {} CFWL_Widget::~CFWL_Widget() {} diff --git a/xfa/fwl/core/cfwl_widget.h b/xfa/fwl/core/cfwl_widget.h index 7f486585ab..abb8d549bd 100644 --- a/xfa/fwl/core/cfwl_widget.h +++ b/xfa/fwl/core/cfwl_widget.h @@ -20,7 +20,7 @@ class CFWL_WidgetMgr; class CFWL_Widget { public: - explicit CFWL_Widget(const IFWL_App*); + explicit CFWL_Widget(const CFWL_App*); virtual ~CFWL_Widget(); IFWL_Widget* GetWidget() { return m_pIface.get(); } @@ -50,7 +50,7 @@ class CFWL_Widget { protected: void Initialize(); - const IFWL_App* m_pApp; + const CFWL_App* m_pApp; std::unique_ptr m_pIface; }; diff --git a/xfa/fwl/core/cfwl_widgetmgr.cpp b/xfa/fwl/core/cfwl_widgetmgr.cpp index 6c11018893..3d5beb4b6b 100644 --- a/xfa/fwl/core/cfwl_widgetmgr.cpp +++ b/xfa/fwl/core/cfwl_widgetmgr.cpp @@ -9,8 +9,8 @@ #include #include "third_party/base/ptr_util.h" +#include "xfa/fwl/core/cfwl_app.h" #include "xfa/fwl/core/cfwl_notedriver.h" -#include "xfa/fwl/core/ifwl_app.h" #include "xfa/fwl/core/ifwl_form.h" #include "xfa/fxfa/app/xfa_fwladapter.h" #include "xfa/fxfa/xfa_ffapp.h" @@ -472,7 +472,7 @@ void CFWL_WidgetMgr::OnProcessMessageToForm(CFWL_Message* pMessage) { return; IFWL_Widget* pDstWidget = pMessage->m_pDstTarget; - const IFWL_App* pApp = pDstWidget->GetOwnerApp(); + const CFWL_App* pApp = pDstWidget->GetOwnerApp(); if (!pApp) return; diff --git a/xfa/fwl/core/ifwl_app.cpp b/xfa/fwl/core/ifwl_app.cpp deleted file mode 100644 index c4a6dc39ca..0000000000 --- a/xfa/fwl/core/ifwl_app.cpp +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright 2014 PDFium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com - -#include "xfa/fwl/core/ifwl_app.h" - -#include "third_party/base/ptr_util.h" -#include "xfa/fwl/core/cfwl_notedriver.h" -#include "xfa/fwl/core/cfwl_widgetmgr.h" -#include "xfa/fwl/core/ifwl_widget.h" -#include "xfa/fxfa/app/xfa_fwladapter.h" - -IFWL_App::IFWL_App(CXFA_FFApp* pAdapter) - : m_pAdapterNative(pAdapter), - m_pWidgetMgr(pdfium::MakeUnique(pAdapter)), - m_pNoteDriver(pdfium::MakeUnique()) { - ASSERT(m_pAdapterNative); -} - -IFWL_App::~IFWL_App() {} diff --git a/xfa/fwl/core/ifwl_app.h b/xfa/fwl/core/ifwl_app.h deleted file mode 100644 index 307cb0770f..0000000000 --- a/xfa/fwl/core/ifwl_app.h +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright 2014 PDFium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com - -#ifndef XFA_FWL_CORE_IFWL_APP_H_ -#define XFA_FWL_CORE_IFWL_APP_H_ - -#include - -#include "core/fxcrt/fx_string.h" - -class CFWL_NoteDriver; -class CFWL_WidgetMgr; -class CXFA_FFApp; -class CXFA_FWLAdapterWidgetMgr; -class IFWL_Widget; - -enum FWL_KeyFlag { - FWL_KEYFLAG_Ctrl = 1 << 0, - FWL_KEYFLAG_Alt = 1 << 1, - FWL_KEYFLAG_Shift = 1 << 2, - FWL_KEYFLAG_Command = 1 << 3, - FWL_KEYFLAG_LButton = 1 << 4, - FWL_KEYFLAG_RButton = 1 << 5, - FWL_KEYFLAG_MButton = 1 << 6 -}; - -class IFWL_App { - public: - explicit IFWL_App(CXFA_FFApp* pAdapter); - ~IFWL_App(); - - CXFA_FFApp* GetAdapterNative() const { return m_pAdapterNative; } - CFWL_WidgetMgr* GetWidgetMgr() const { return m_pWidgetMgr.get(); } - CFWL_NoteDriver* GetNoteDriver() const { return m_pNoteDriver.get(); } - - private: - CXFA_FFApp* const m_pAdapterNative; - std::unique_ptr m_pWidgetMgr; - std::unique_ptr m_pNoteDriver; -}; - -#endif // XFA_FWL_CORE_IFWL_APP_H_ diff --git a/xfa/fwl/core/ifwl_barcode.cpp b/xfa/fwl/core/ifwl_barcode.cpp index 71346b828b..d5ab17f66b 100644 --- a/xfa/fwl/core/ifwl_barcode.cpp +++ b/xfa/fwl/core/ifwl_barcode.cpp @@ -15,7 +15,7 @@ #include "xfa/fwl/core/cfx_barcode.h" #include "xfa/fwl/core/ifwl_themeprovider.h" -IFWL_Barcode::IFWL_Barcode(const IFWL_App* app, +IFWL_Barcode::IFWL_Barcode(const CFWL_App* app, std::unique_ptr properties) : IFWL_Edit(app, std::move(properties), nullptr), m_dwStatus(0), diff --git a/xfa/fwl/core/ifwl_barcode.h b/xfa/fwl/core/ifwl_barcode.h index 5ff99e85c0..2a4c9d7fd2 100644 --- a/xfa/fwl/core/ifwl_barcode.h +++ b/xfa/fwl/core/ifwl_barcode.h @@ -58,7 +58,7 @@ class IFWL_Barcode : public IFWL_Edit { virtual uint32_t GetBarcodeAttributeMask() const = 0; }; - IFWL_Barcode(const IFWL_App* app, + IFWL_Barcode(const CFWL_App* app, std::unique_ptr properties); ~IFWL_Barcode() override; diff --git a/xfa/fwl/core/ifwl_caret.cpp b/xfa/fwl/core/ifwl_caret.cpp index fb5d5e54a1..6d21ca2f77 100644 --- a/xfa/fwl/core/ifwl_caret.cpp +++ b/xfa/fwl/core/ifwl_caret.cpp @@ -21,7 +21,7 @@ const uint32_t kFrequency = 400; } // namespace -IFWL_Caret::IFWL_Caret(const IFWL_App* app, +IFWL_Caret::IFWL_Caret(const CFWL_App* app, std::unique_ptr properties, IFWL_Widget* pOuter) : IFWL_Widget(app, std::move(properties), pOuter), diff --git a/xfa/fwl/core/ifwl_caret.h b/xfa/fwl/core/ifwl_caret.h index 57d0025a6b..53fe1dd6cb 100644 --- a/xfa/fwl/core/ifwl_caret.h +++ b/xfa/fwl/core/ifwl_caret.h @@ -20,7 +20,7 @@ class IFWL_Widget; class IFWL_Caret : public IFWL_Widget { public: - IFWL_Caret(const IFWL_App* app, + IFWL_Caret(const CFWL_App* app, std::unique_ptr properties, IFWL_Widget* pOuter); ~IFWL_Caret() override; diff --git a/xfa/fwl/core/ifwl_checkbox.cpp b/xfa/fwl/core/ifwl_checkbox.cpp index 4af7cc78fa..5268aceee7 100644 --- a/xfa/fwl/core/ifwl_checkbox.cpp +++ b/xfa/fwl/core/ifwl_checkbox.cpp @@ -12,6 +12,7 @@ #include "third_party/base/ptr_util.h" #include "xfa/fde/tto/fde_textout.h" +#include "xfa/fwl/core/cfwl_app.h" #include "xfa/fwl/core/cfwl_evtcheckstatechanged.h" #include "xfa/fwl/core/cfwl_msgkey.h" #include "xfa/fwl/core/cfwl_msgmouse.h" @@ -19,7 +20,6 @@ #include "xfa/fwl/core/cfwl_themebackground.h" #include "xfa/fwl/core/cfwl_themetext.h" #include "xfa/fwl/core/cfwl_widgetmgr.h" -#include "xfa/fwl/core/ifwl_app.h" #include "xfa/fwl/core/ifwl_themeprovider.h" namespace { @@ -28,7 +28,7 @@ const int kCaptionMargin = 5; } // namespace -IFWL_CheckBox::IFWL_CheckBox(const IFWL_App* app, +IFWL_CheckBox::IFWL_CheckBox(const CFWL_App* app, std::unique_ptr properties) : IFWL_Widget(app, std::move(properties), nullptr), m_dwTTOStyles(FDE_TTOSTYLE_SingleLine), diff --git a/xfa/fwl/core/ifwl_checkbox.h b/xfa/fwl/core/ifwl_checkbox.h index 0c9f3cda12..8d777fc0f5 100644 --- a/xfa/fwl/core/ifwl_checkbox.h +++ b/xfa/fwl/core/ifwl_checkbox.h @@ -55,7 +55,7 @@ class IFWL_CheckBox : public IFWL_Widget { virtual FX_FLOAT GetBoxSize(IFWL_Widget* pWidget) = 0; }; - IFWL_CheckBox(const IFWL_App* app, + IFWL_CheckBox(const CFWL_App* app, std::unique_ptr properties); ~IFWL_CheckBox() override; diff --git a/xfa/fwl/core/ifwl_combobox.cpp b/xfa/fwl/core/ifwl_combobox.cpp index 82d9d3d5e7..f2a85e68bc 100644 --- a/xfa/fwl/core/ifwl_combobox.cpp +++ b/xfa/fwl/core/ifwl_combobox.cpp @@ -13,6 +13,7 @@ #include "third_party/base/ptr_util.h" #include "xfa/fde/cfde_txtedtengine.h" #include "xfa/fde/tto/fde_textout.h" +#include "xfa/fwl/core/cfwl_app.h" #include "xfa/fwl/core/cfwl_evteditchanged.h" #include "xfa/fwl/core/cfwl_evtpostdropdown.h" #include "xfa/fwl/core/cfwl_evtpredropdown.h" @@ -27,12 +28,11 @@ #include "xfa/fwl/core/cfwl_themepart.h" #include "xfa/fwl/core/cfwl_themetext.h" #include "xfa/fwl/core/cfwl_widgetmgr.h" -#include "xfa/fwl/core/ifwl_app.h" #include "xfa/fwl/core/ifwl_formproxy.h" #include "xfa/fwl/core/ifwl_listbox.h" #include "xfa/fwl/core/ifwl_themeprovider.h" -IFWL_ComboBox::IFWL_ComboBox(const IFWL_App* app, +IFWL_ComboBox::IFWL_ComboBox(const CFWL_App* app, std::unique_ptr properties) : IFWL_Widget(app, std::move(properties), nullptr), m_pComboBoxProxy(nullptr), diff --git a/xfa/fwl/core/ifwl_combobox.h b/xfa/fwl/core/ifwl_combobox.h index ad48ec2391..b2fc23de7d 100644 --- a/xfa/fwl/core/ifwl_combobox.h +++ b/xfa/fwl/core/ifwl_combobox.h @@ -54,7 +54,7 @@ class IFWL_ComboBox : public IFWL_Widget { virtual FX_FLOAT GetListHeight(IFWL_Widget* pWidget) = 0; }; - explicit IFWL_ComboBox(const IFWL_App* app, + explicit IFWL_ComboBox(const CFWL_App* app, std::unique_ptr properties); ~IFWL_ComboBox() override; diff --git a/xfa/fwl/core/ifwl_comboboxproxy.cpp b/xfa/fwl/core/ifwl_comboboxproxy.cpp index 53586f4062..35c8a0e025 100644 --- a/xfa/fwl/core/ifwl_comboboxproxy.cpp +++ b/xfa/fwl/core/ifwl_comboboxproxy.cpp @@ -9,15 +9,15 @@ #include #include +#include "xfa/fwl/core/cfwl_app.h" #include "xfa/fwl/core/cfwl_msgkillfocus.h" #include "xfa/fwl/core/cfwl_msgmouse.h" #include "xfa/fwl/core/cfwl_notedriver.h" -#include "xfa/fwl/core/ifwl_app.h" #include "xfa/fwl/core/ifwl_combobox.h" IFWL_ComboBoxProxy::IFWL_ComboBoxProxy( IFWL_ComboBox* pComboBox, - const IFWL_App* app, + const CFWL_App* app, std::unique_ptr properties, IFWL_Widget* pOuter) : IFWL_FormProxy(app, std::move(properties), pOuter), @@ -64,7 +64,7 @@ void IFWL_ComboBoxProxy::OnDrawWidget(CFX_Graphics* pGraphics, } void IFWL_ComboBoxProxy::OnLButtonDown(CFWL_Message* pMessage) { - const IFWL_App* pApp = GetOwnerApp(); + const CFWL_App* pApp = GetOwnerApp(); if (!pApp) return; @@ -87,7 +87,7 @@ void IFWL_ComboBoxProxy::OnLButtonDown(CFWL_Message* pMessage) { void IFWL_ComboBoxProxy::OnLButtonUp(CFWL_Message* pMessage) { m_bLButtonDown = false; - const IFWL_App* pApp = GetOwnerApp(); + const CFWL_App* pApp = GetOwnerApp(); if (!pApp) return; diff --git a/xfa/fwl/core/ifwl_comboboxproxy.h b/xfa/fwl/core/ifwl_comboboxproxy.h index 3425005e81..228045d750 100644 --- a/xfa/fwl/core/ifwl_comboboxproxy.h +++ b/xfa/fwl/core/ifwl_comboboxproxy.h @@ -16,7 +16,7 @@ class IFWL_ComboBox; class IFWL_ComboBoxProxy : public IFWL_FormProxy { public: IFWL_ComboBoxProxy(IFWL_ComboBox* pCombobBox, - const IFWL_App* app, + const CFWL_App* app, std::unique_ptr properties, IFWL_Widget* pOuter); ~IFWL_ComboBoxProxy() override; diff --git a/xfa/fwl/core/ifwl_comboedit.cpp b/xfa/fwl/core/ifwl_comboedit.cpp index 07fe5150ad..7d1260315c 100644 --- a/xfa/fwl/core/ifwl_comboedit.cpp +++ b/xfa/fwl/core/ifwl_comboedit.cpp @@ -14,7 +14,7 @@ #include "xfa/fwl/core/ifwl_combobox.h" IFWL_ComboEdit::IFWL_ComboEdit( - const IFWL_App* app, + const CFWL_App* app, std::unique_ptr properties, IFWL_Widget* pOuter) : IFWL_Edit(app, std::move(properties), pOuter) { diff --git a/xfa/fwl/core/ifwl_comboedit.h b/xfa/fwl/core/ifwl_comboedit.h index 21b9cf90c7..5b71c1e86e 100644 --- a/xfa/fwl/core/ifwl_comboedit.h +++ b/xfa/fwl/core/ifwl_comboedit.h @@ -17,7 +17,7 @@ class IFWL_ComboBox; class IFWL_ComboEdit : public IFWL_Edit { public: - IFWL_ComboEdit(const IFWL_App* app, + IFWL_ComboEdit(const CFWL_App* app, std::unique_ptr properties, IFWL_Widget* pOuter); diff --git a/xfa/fwl/core/ifwl_combolist.cpp b/xfa/fwl/core/ifwl_combolist.cpp index 18612dbc80..320c7fdb3f 100644 --- a/xfa/fwl/core/ifwl_combolist.cpp +++ b/xfa/fwl/core/ifwl_combolist.cpp @@ -18,7 +18,7 @@ #include "xfa/fwl/core/ifwl_listbox.h" IFWL_ComboList::IFWL_ComboList( - const IFWL_App* app, + const CFWL_App* app, std::unique_ptr properties, IFWL_Widget* pOuter) : IFWL_ListBox(app, std::move(properties), pOuter), m_bNotifyOwner(true) { diff --git a/xfa/fwl/core/ifwl_combolist.h b/xfa/fwl/core/ifwl_combolist.h index 360bc20059..48dfb4450d 100644 --- a/xfa/fwl/core/ifwl_combolist.h +++ b/xfa/fwl/core/ifwl_combolist.h @@ -15,7 +15,7 @@ class IFWL_ComboList : public IFWL_ListBox { public: - IFWL_ComboList(const IFWL_App* app, + IFWL_ComboList(const CFWL_App* app, std::unique_ptr properties, IFWL_Widget* pOuter); diff --git a/xfa/fwl/core/ifwl_datetimeedit.cpp b/xfa/fwl/core/ifwl_datetimeedit.cpp index a996dc138e..62ab4f6d19 100644 --- a/xfa/fwl/core/ifwl_datetimeedit.cpp +++ b/xfa/fwl/core/ifwl_datetimeedit.cpp @@ -15,7 +15,7 @@ #include "xfa/fwl/core/ifwl_datetimepicker.h" IFWL_DateTimeEdit::IFWL_DateTimeEdit( - const IFWL_App* app, + const CFWL_App* app, std::unique_ptr properties, IFWL_Widget* pOuter) : IFWL_Edit(app, std::move(properties), pOuter) {} diff --git a/xfa/fwl/core/ifwl_datetimeedit.h b/xfa/fwl/core/ifwl_datetimeedit.h index a814796c5a..1d420b5dcd 100644 --- a/xfa/fwl/core/ifwl_datetimeedit.h +++ b/xfa/fwl/core/ifwl_datetimeedit.h @@ -16,7 +16,7 @@ class IFWL_DateTimeEdit : public IFWL_Edit { public: - IFWL_DateTimeEdit(const IFWL_App* app, + IFWL_DateTimeEdit(const CFWL_App* app, std::unique_ptr properties, IFWL_Widget* pOuter); diff --git a/xfa/fwl/core/ifwl_datetimepicker.cpp b/xfa/fwl/core/ifwl_datetimepicker.cpp index 85acbc4d7d..9662ec0140 100644 --- a/xfa/fwl/core/ifwl_datetimepicker.cpp +++ b/xfa/fwl/core/ifwl_datetimepicker.cpp @@ -29,7 +29,7 @@ const int kDateTimePickerHeight = 20; } // namespace IFWL_DateTimePicker::IFWL_DateTimePicker( - const IFWL_App* app, + const CFWL_App* app, std::unique_ptr properties) : IFWL_Widget(app, std::move(properties), nullptr), m_iBtnState(1), diff --git a/xfa/fwl/core/ifwl_datetimepicker.h b/xfa/fwl/core/ifwl_datetimepicker.h index 67c1c33d7b..2b4be4804d 100644 --- a/xfa/fwl/core/ifwl_datetimepicker.h +++ b/xfa/fwl/core/ifwl_datetimepicker.h @@ -47,7 +47,7 @@ class IFWL_DateTimePicker : public IFWL_Widget, }; explicit IFWL_DateTimePicker( - const IFWL_App* app, + const CFWL_App* app, std::unique_ptr properties); ~IFWL_DateTimePicker() override; diff --git a/xfa/fwl/core/ifwl_edit.cpp b/xfa/fwl/core/ifwl_edit.cpp index 4a95f2c462..f262f85cee 100644 --- a/xfa/fwl/core/ifwl_edit.cpp +++ b/xfa/fwl/core/ifwl_edit.cpp @@ -18,6 +18,7 @@ #include "xfa/fde/fde_render.h" #include "xfa/fde/ifde_txtedtpage.h" #include "xfa/fgas/font/cfgas_gefont.h" +#include "xfa/fwl/core/cfwl_app.h" #include "xfa/fwl/core/cfwl_evtcheckword.h" #include "xfa/fwl/core/cfwl_evttextchanged.h" #include "xfa/fwl/core/cfwl_evttextfull.h" @@ -27,7 +28,6 @@ #include "xfa/fwl/core/cfwl_themebackground.h" #include "xfa/fwl/core/cfwl_themepart.h" #include "xfa/fwl/core/cfwl_widgetmgr.h" -#include "xfa/fwl/core/ifwl_app.h" #include "xfa/fwl/core/ifwl_caret.h" #include "xfa/fwl/core/ifwl_themeprovider.h" #include "xfa/fxfa/xfa_ffdoc.h" @@ -57,7 +57,7 @@ void AddSquigglyPath(CFX_Path* pPathData, } // namespace -IFWL_Edit::IFWL_Edit(const IFWL_App* app, +IFWL_Edit::IFWL_Edit(const CFWL_App* app, std::unique_ptr properties, IFWL_Widget* pOuter) : IFWL_Widget(app, std::move(properties), pOuter), diff --git a/xfa/fwl/core/ifwl_edit.h b/xfa/fwl/core/ifwl_edit.h index 04288a51e4..b695f77a58 100644 --- a/xfa/fwl/core/ifwl_edit.h +++ b/xfa/fwl/core/ifwl_edit.h @@ -59,7 +59,7 @@ class IFWL_Caret; class IFWL_Edit : public IFWL_Widget { public: - IFWL_Edit(const IFWL_App* app, + IFWL_Edit(const CFWL_App* app, std::unique_ptr properties, IFWL_Widget* pOuter); ~IFWL_Edit() override; diff --git a/xfa/fwl/core/ifwl_form.cpp b/xfa/fwl/core/ifwl_form.cpp index 56b98e34d2..535205d81a 100644 --- a/xfa/fwl/core/ifwl_form.cpp +++ b/xfa/fwl/core/ifwl_form.cpp @@ -10,6 +10,7 @@ #include "third_party/base/ptr_util.h" #include "xfa/fde/tto/fde_textout.h" +#include "xfa/fwl/core/cfwl_app.h" #include "xfa/fwl/core/cfwl_evtclose.h" #include "xfa/fwl/core/cfwl_msgmouse.h" #include "xfa/fwl/core/cfwl_notedriver.h" @@ -19,7 +20,6 @@ #include "xfa/fwl/core/cfwl_themepart.h" #include "xfa/fwl/core/cfwl_themetext.h" #include "xfa/fwl/core/cfwl_widgetmgr.h" -#include "xfa/fwl/core/ifwl_app.h" #include "xfa/fwl/core/ifwl_formproxy.h" #include "xfa/fwl/core/ifwl_themeprovider.h" #include "xfa/fwl/theme/cfwl_widgettp.h" @@ -38,7 +38,7 @@ const uint8_t kCornerEnlarge = 10; } // namespace -IFWL_Form::IFWL_Form(const IFWL_App* app, +IFWL_Form::IFWL_Form(const CFWL_App* app, std::unique_ptr properties, IFWL_Widget* pOuter) : IFWL_Widget(app, std::move(properties), pOuter), @@ -268,7 +268,7 @@ void IFWL_Form::DrawWidget(CFX_Graphics* pGraphics, const CFX_Matrix* pMatrix) { } IFWL_Widget* IFWL_Form::DoModal() { - const IFWL_App* pApp = GetOwnerApp(); + const CFWL_App* pApp = GetOwnerApp(); if (!pApp) return nullptr; @@ -300,7 +300,7 @@ void IFWL_Form::EndDoModal() { #if (_FX_OS_ == _FX_MACOSX_) m_pNoteLoop->EndModalLoop(); - const IFWL_App* pApp = GetOwnerApp(); + const CFWL_App* pApp = GetOwnerApp(); if (!pApp) return; @@ -457,7 +457,7 @@ void IFWL_Form::ResetSysBtn() { } void IFWL_Form::RegisterForm() { - const IFWL_App* pApp = GetOwnerApp(); + const CFWL_App* pApp = GetOwnerApp(); if (!pApp) return; @@ -470,7 +470,7 @@ void IFWL_Form::RegisterForm() { } void IFWL_Form::UnRegisterForm() { - const IFWL_App* pApp = GetOwnerApp(); + const CFWL_App* pApp = GetOwnerApp(); if (!pApp) return; diff --git a/xfa/fwl/core/ifwl_form.h b/xfa/fwl/core/ifwl_form.h index 8970a5c81a..5c4c00dbf3 100644 --- a/xfa/fwl/core/ifwl_form.h +++ b/xfa/fwl/core/ifwl_form.h @@ -35,7 +35,7 @@ class CFWL_SysBtn; class IFWL_Form : public IFWL_Widget { public: - IFWL_Form(const IFWL_App* app, + IFWL_Form(const CFWL_App* app, std::unique_ptr properties, IFWL_Widget* pOuter); ~IFWL_Form() override; diff --git a/xfa/fwl/core/ifwl_formproxy.cpp b/xfa/fwl/core/ifwl_formproxy.cpp index 253ed7fb94..521e056c75 100644 --- a/xfa/fwl/core/ifwl_formproxy.cpp +++ b/xfa/fwl/core/ifwl_formproxy.cpp @@ -13,7 +13,7 @@ #include "xfa/fwl/core/cfwl_notedriver.h" IFWL_FormProxy::IFWL_FormProxy( - const IFWL_App* app, + const CFWL_App* app, std::unique_ptr properties, IFWL_Widget* pOuter) : IFWL_Form(app, std::move(properties), pOuter) {} diff --git a/xfa/fwl/core/ifwl_formproxy.h b/xfa/fwl/core/ifwl_formproxy.h index bd2fe893bd..b3c6a10f28 100644 --- a/xfa/fwl/core/ifwl_formproxy.h +++ b/xfa/fwl/core/ifwl_formproxy.h @@ -15,7 +15,7 @@ class CFWL_WidgetProperties; class IFWL_FormProxy : public IFWL_Form { public: - IFWL_FormProxy(const IFWL_App* app, + IFWL_FormProxy(const CFWL_App* app, std::unique_ptr properties, IFWL_Widget* pOuter); ~IFWL_FormProxy() override; diff --git a/xfa/fwl/core/ifwl_listbox.cpp b/xfa/fwl/core/ifwl_listbox.cpp index bcc8040427..d45bdd9c36 100644 --- a/xfa/fwl/core/ifwl_listbox.cpp +++ b/xfa/fwl/core/ifwl_listbox.cpp @@ -12,13 +12,13 @@ #include "third_party/base/ptr_util.h" #include "xfa/fde/tto/fde_textout.h" +#include "xfa/fwl/core/cfwl_app.h" #include "xfa/fwl/core/cfwl_msgkey.h" #include "xfa/fwl/core/cfwl_msgmouse.h" #include "xfa/fwl/core/cfwl_msgmousewheel.h" #include "xfa/fwl/core/cfwl_themebackground.h" #include "xfa/fwl/core/cfwl_themepart.h" #include "xfa/fwl/core/cfwl_themetext.h" -#include "xfa/fwl/core/ifwl_app.h" #include "xfa/fwl/core/ifwl_themeprovider.h" namespace { @@ -27,7 +27,7 @@ const int kItemTextMargin = 2; } // namespace -IFWL_ListBox::IFWL_ListBox(const IFWL_App* app, +IFWL_ListBox::IFWL_ListBox(const CFWL_App* app, std::unique_ptr properties, IFWL_Widget* pOuter) : IFWL_Widget(app, std::move(properties), pOuter), diff --git a/xfa/fwl/core/ifwl_listbox.h b/xfa/fwl/core/ifwl_listbox.h index b6c0b8266b..ea1c54e3a3 100644 --- a/xfa/fwl/core/ifwl_listbox.h +++ b/xfa/fwl/core/ifwl_listbox.h @@ -76,7 +76,7 @@ class IFWL_ListBox : public IFWL_Widget { uint32_t dwCheckState) = 0; }; - IFWL_ListBox(const IFWL_App* app, + IFWL_ListBox(const CFWL_App* app, std::unique_ptr properties, IFWL_Widget* pOuter); ~IFWL_ListBox() override; diff --git a/xfa/fwl/core/ifwl_monthcalendar.cpp b/xfa/fwl/core/ifwl_monthcalendar.cpp index 10ce33a719..0137f195c9 100644 --- a/xfa/fwl/core/ifwl_monthcalendar.cpp +++ b/xfa/fwl/core/ifwl_monthcalendar.cpp @@ -122,7 +122,7 @@ CFX_WideString* GetCapacityForMonth(IFWL_ThemeProvider* pTheme, } // namespace IFWL_MonthCalendar::IFWL_MonthCalendar( - const IFWL_App* app, + const CFWL_App* app, std::unique_ptr properties, IFWL_Widget* pOuter) : IFWL_Widget(app, std::move(properties), pOuter), diff --git a/xfa/fwl/core/ifwl_monthcalendar.h b/xfa/fwl/core/ifwl_monthcalendar.h index f2c072e978..dd58663106 100644 --- a/xfa/fwl/core/ifwl_monthcalendar.h +++ b/xfa/fwl/core/ifwl_monthcalendar.h @@ -35,7 +35,7 @@ class IFWL_MonthCalendar : public IFWL_Widget { virtual int32_t GetCurYear(IFWL_Widget* pWidget) = 0; }; - IFWL_MonthCalendar(const IFWL_App* app, + IFWL_MonthCalendar(const CFWL_App* app, std::unique_ptr properties, IFWL_Widget* pOuter); ~IFWL_MonthCalendar() override; diff --git a/xfa/fwl/core/ifwl_picturebox.cpp b/xfa/fwl/core/ifwl_picturebox.cpp index 9cb3604076..3cffa52970 100644 --- a/xfa/fwl/core/ifwl_picturebox.cpp +++ b/xfa/fwl/core/ifwl_picturebox.cpp @@ -14,7 +14,7 @@ #include "xfa/fwl/core/cfwl_picturebox.h" IFWL_PictureBox::IFWL_PictureBox( - const IFWL_App* app, + const CFWL_App* app, std::unique_ptr properties) : IFWL_Widget(app, std::move(properties), nullptr) { m_rtClient.Reset(); diff --git a/xfa/fwl/core/ifwl_picturebox.h b/xfa/fwl/core/ifwl_picturebox.h index d303992a56..510ab9a026 100644 --- a/xfa/fwl/core/ifwl_picturebox.h +++ b/xfa/fwl/core/ifwl_picturebox.h @@ -32,7 +32,7 @@ class IFWL_Widget; class IFWL_PictureBox : public IFWL_Widget { public: - explicit IFWL_PictureBox(const IFWL_App* app, + explicit IFWL_PictureBox(const CFWL_App* app, std::unique_ptr properties); ~IFWL_PictureBox() override; diff --git a/xfa/fwl/core/ifwl_pushbutton.cpp b/xfa/fwl/core/ifwl_pushbutton.cpp index 9589de1c3c..7eb84129e1 100644 --- a/xfa/fwl/core/ifwl_pushbutton.cpp +++ b/xfa/fwl/core/ifwl_pushbutton.cpp @@ -21,7 +21,7 @@ #include "xfa/fwl/core/ifwl_themeprovider.h" IFWL_PushButton::IFWL_PushButton( - const IFWL_App* app, + const CFWL_App* app, std::unique_ptr properties) : IFWL_Widget(app, std::move(properties), nullptr), m_bBtnDown(false), diff --git a/xfa/fwl/core/ifwl_pushbutton.h b/xfa/fwl/core/ifwl_pushbutton.h index c2c337df55..9a142130d7 100644 --- a/xfa/fwl/core/ifwl_pushbutton.h +++ b/xfa/fwl/core/ifwl_pushbutton.h @@ -34,7 +34,7 @@ class IFWL_Widget; class IFWL_PushButton : public IFWL_Widget { public: - IFWL_PushButton(const IFWL_App* app, + IFWL_PushButton(const CFWL_App* app, std::unique_ptr properties); ~IFWL_PushButton() override; diff --git a/xfa/fwl/core/ifwl_scrollbar.cpp b/xfa/fwl/core/ifwl_scrollbar.cpp index 6732e94a9a..c1feeb847b 100644 --- a/xfa/fwl/core/ifwl_scrollbar.cpp +++ b/xfa/fwl/core/ifwl_scrollbar.cpp @@ -23,7 +23,7 @@ #define FWL_SCROLLBAR_MinThumb 5 IFWL_ScrollBar::IFWL_ScrollBar( - const IFWL_App* app, + const CFWL_App* app, std::unique_ptr properties, IFWL_Widget* pOuter) : IFWL_Widget(app, std::move(properties), pOuter), diff --git a/xfa/fwl/core/ifwl_scrollbar.h b/xfa/fwl/core/ifwl_scrollbar.h index b6f2b02732..a5619b79a4 100644 --- a/xfa/fwl/core/ifwl_scrollbar.h +++ b/xfa/fwl/core/ifwl_scrollbar.h @@ -22,7 +22,7 @@ class IFWL_Widget; class IFWL_ScrollBar : public IFWL_Widget { public: - IFWL_ScrollBar(const IFWL_App* app, + IFWL_ScrollBar(const CFWL_App* app, std::unique_ptr properties, IFWL_Widget* pOuter); ~IFWL_ScrollBar() override; diff --git a/xfa/fwl/core/ifwl_spinbutton.cpp b/xfa/fwl/core/ifwl_spinbutton.cpp index 9706a41461..39da43ec0d 100644 --- a/xfa/fwl/core/ifwl_spinbutton.cpp +++ b/xfa/fwl/core/ifwl_spinbutton.cpp @@ -28,7 +28,7 @@ const int kElapseTime = 200; } // namespace IFWL_SpinButton::IFWL_SpinButton( - const IFWL_App* app, + const CFWL_App* app, std::unique_ptr properties) : IFWL_Widget(app, std::move(properties), nullptr), m_dwUpState(CFWL_PartState_Normal), diff --git a/xfa/fwl/core/ifwl_spinbutton.h b/xfa/fwl/core/ifwl_spinbutton.h index 157c1411db..ab888b1b0c 100644 --- a/xfa/fwl/core/ifwl_spinbutton.h +++ b/xfa/fwl/core/ifwl_spinbutton.h @@ -21,7 +21,7 @@ class CFWL_WidgetProperties; class IFWL_SpinButton : public IFWL_Widget { public: - IFWL_SpinButton(const IFWL_App* app, + IFWL_SpinButton(const CFWL_App* app, std::unique_ptr properties); ~IFWL_SpinButton() override; diff --git a/xfa/fwl/core/ifwl_widget.cpp b/xfa/fwl/core/ifwl_widget.cpp index 102ca2e0f0..040a57f696 100644 --- a/xfa/fwl/core/ifwl_widget.cpp +++ b/xfa/fwl/core/ifwl_widget.cpp @@ -10,6 +10,7 @@ #include #include "xfa/fde/tto/fde_textout.h" +#include "xfa/fwl/core/cfwl_app.h" #include "xfa/fwl/core/cfwl_evtkey.h" #include "xfa/fwl/core/cfwl_evtkillfocus.h" #include "xfa/fwl/core/cfwl_evtmouse.h" @@ -26,7 +27,6 @@ #include "xfa/fwl/core/cfwl_themepart.h" #include "xfa/fwl/core/cfwl_themetext.h" #include "xfa/fwl/core/cfwl_widgetmgr.h" -#include "xfa/fwl/core/ifwl_app.h" #include "xfa/fwl/core/ifwl_combobox.h" #include "xfa/fwl/core/ifwl_form.h" #include "xfa/fwl/core/ifwl_themeprovider.h" @@ -37,7 +37,7 @@ #define FWL_WGT_CalcWidth 2048 #define FWL_WGT_CalcMultiLineDefWidth 120.0f -IFWL_Widget::IFWL_Widget(const IFWL_App* app, +IFWL_Widget::IFWL_Widget(const CFWL_App* app, std::unique_ptr properties, IFWL_Widget* pOuter) : m_pOwnerApp(app), @@ -459,7 +459,7 @@ void IFWL_Widget::SetFocus(bool bFocus) { if (m_pWidgetMgr->IsFormDisabled()) return; - const IFWL_App* pApp = GetOwnerApp(); + const CFWL_App* pApp = GetOwnerApp(); if (!pApp) return; @@ -476,7 +476,7 @@ void IFWL_Widget::SetFocus(bool bFocus) { } void IFWL_Widget::SetGrab(bool bSet) { - const IFWL_App* pApp = GetOwnerApp(); + const CFWL_App* pApp = GetOwnerApp(); if (!pApp) return; @@ -585,7 +585,7 @@ bool IFWL_Widget::GetPopupPosGeneral(FX_FLOAT fMinHeight, } void IFWL_Widget::RegisterEventTarget(IFWL_Widget* pEventSource) { - const IFWL_App* pApp = GetOwnerApp(); + const CFWL_App* pApp = GetOwnerApp(); if (!pApp) return; @@ -597,7 +597,7 @@ void IFWL_Widget::RegisterEventTarget(IFWL_Widget* pEventSource) { } void IFWL_Widget::UnregisterEventTarget() { - const IFWL_App* pApp = GetOwnerApp(); + const CFWL_App* pApp = GetOwnerApp(); if (!pApp) return; @@ -625,7 +625,7 @@ void IFWL_Widget::DispatchEvent(CFWL_Event* pEvent) { m_pOuter->GetDelegate()->OnProcessEvent(pEvent); return; } - const IFWL_App* pApp = GetOwnerApp(); + const CFWL_App* pApp = GetOwnerApp(); if (!pApp) return; @@ -695,7 +695,7 @@ void IFWL_Widget::DrawEdge(CFX_Graphics* pGraphics, } void IFWL_Widget::NotifyDriver() { - const IFWL_App* pApp = GetOwnerApp(); + const CFWL_App* pApp = GetOwnerApp(); if (!pApp) return; diff --git a/xfa/fwl/core/ifwl_widget.h b/xfa/fwl/core/ifwl_widget.h index a7ae8ce590..230ea666d9 100644 --- a/xfa/fwl/core/ifwl_widget.h +++ b/xfa/fwl/core/ifwl_widget.h @@ -57,7 +57,7 @@ class CFWL_MsgKey; class CFWL_Widget; class CFWL_WidgetProperties; class CFWL_WidgetMgr; -class IFWL_App; +class CFWL_App; class IFWL_ThemeProvider; class IFWL_Widget; enum class FWL_Type; @@ -118,7 +118,7 @@ class IFWL_Widget : public IFWL_WidgetDelegate { return m_pDelegate ? m_pDelegate : this; } - const IFWL_App* GetOwnerApp() const { return m_pOwnerApp; } + const CFWL_App* GetOwnerApp() const { return m_pOwnerApp; } uint32_t GetEventKey() const { return m_nEventKey; } void SetEventKey(uint32_t key) { m_nEventKey = key; } @@ -133,7 +133,7 @@ class IFWL_Widget : public IFWL_WidgetDelegate { void Repaint(const CFX_RectF* pRect = nullptr); protected: - IFWL_Widget(const IFWL_App* app, + IFWL_Widget(const CFWL_App* app, std::unique_ptr properties, IFWL_Widget* pOuter); @@ -175,7 +175,7 @@ class IFWL_Widget : public IFWL_WidgetDelegate { IFWL_ThemeProvider* pTheme, const CFX_Matrix* pMatrix = nullptr); - const IFWL_App* const m_pOwnerApp; + const CFWL_App* const m_pOwnerApp; CFWL_WidgetMgr* const m_pWidgetMgr; std::unique_ptr m_pProperties; IFWL_Widget* m_pOuter; diff --git a/xfa/fxfa/app/xfa_ffapp.cpp b/xfa/fxfa/app/xfa_ffapp.cpp index 285194f608..b6b90ab07c 100644 --- a/xfa/fxfa/app/xfa_ffapp.cpp +++ b/xfa/fxfa/app/xfa_ffapp.cpp @@ -75,8 +75,7 @@ void CXFA_FileRead::Release() { CXFA_FFApp::CXFA_FFApp(IXFA_AppProvider* pProvider) : m_pProvider(pProvider), m_pWidgetMgrDelegate(nullptr), - m_pFWLApp(new IFWL_App(this)) { -} + m_pFWLApp(new CFWL_App(this)) {} CXFA_FFApp::~CXFA_FFApp() {} diff --git a/xfa/fxfa/app/xfa_ffbarcode.cpp b/xfa/fxfa/app/xfa_ffbarcode.cpp index bfa8097248..355ab0f0cc 100644 --- a/xfa/fxfa/app/xfa_ffbarcode.cpp +++ b/xfa/fxfa/app/xfa_ffbarcode.cpp @@ -7,9 +7,9 @@ #include "xfa/fxfa/app/xfa_ffbarcode.h" #include "core/fxcrt/fx_ext.h" +#include "xfa/fwl/core/cfwl_app.h" #include "xfa/fwl/core/cfwl_barcode.h" #include "xfa/fwl/core/cfwl_notedriver.h" -#include "xfa/fwl/core/ifwl_app.h" #include "xfa/fxfa/app/xfa_fffield.h" #include "xfa/fxfa/app/xfa_fftextedit.h" #include "xfa/fxfa/app/xfa_fwladapter.h" diff --git a/xfa/fxfa/app/xfa_ffchoicelist.cpp b/xfa/fxfa/app/xfa_ffchoicelist.cpp index da433aeeed..eec4947425 100644 --- a/xfa/fxfa/app/xfa_ffchoicelist.cpp +++ b/xfa/fxfa/app/xfa_ffchoicelist.cpp @@ -6,11 +6,11 @@ #include "xfa/fxfa/app/xfa_ffchoicelist.h" +#include "xfa/fwl/core/cfwl_app.h" #include "xfa/fwl/core/cfwl_combobox.h" #include "xfa/fwl/core/cfwl_evtselectchanged.h" #include "xfa/fwl/core/cfwl_listbox.h" #include "xfa/fwl/core/cfwl_notedriver.h" -#include "xfa/fwl/core/ifwl_app.h" #include "xfa/fwl/core/ifwl_combobox.h" #include "xfa/fwl/core/ifwl_edit.h" #include "xfa/fwl/core/ifwl_listbox.h" diff --git a/xfa/fxfa/app/xfa_ffimageedit.cpp b/xfa/fxfa/app/xfa_ffimageedit.cpp index b88ccb624c..89188b2847 100644 --- a/xfa/fxfa/app/xfa_ffimageedit.cpp +++ b/xfa/fxfa/app/xfa_ffimageedit.cpp @@ -6,10 +6,10 @@ #include "xfa/fxfa/app/xfa_ffimageedit.h" +#include "xfa/fwl/core/cfwl_app.h" #include "xfa/fwl/core/cfwl_msgmouse.h" #include "xfa/fwl/core/cfwl_notedriver.h" #include "xfa/fwl/core/cfwl_picturebox.h" -#include "xfa/fwl/core/ifwl_app.h" #include "xfa/fxfa/app/xfa_fffield.h" #include "xfa/fxfa/xfa_ffdoc.h" #include "xfa/fxfa/xfa_ffdocview.h" diff --git a/xfa/fxfa/app/xfa_ffwidget.cpp b/xfa/fxfa/app/xfa_ffwidget.cpp index afc2a05f6e..e6c0c595b2 100644 --- a/xfa/fxfa/app/xfa_ffwidget.cpp +++ b/xfa/fxfa/app/xfa_ffwidget.cpp @@ -46,7 +46,7 @@ void CXFA_FFWidget::SetPageView(CXFA_FFPageView* pPageView) { m_pPageView = pPageView; } -const IFWL_App* CXFA_FFWidget::GetFWLApp() { +const CFWL_App* CXFA_FFWidget::GetFWLApp() { return GetPageView()->GetDocView()->GetDoc()->GetApp()->GetFWLApp(); } diff --git a/xfa/fxfa/xfa_ffapp.h b/xfa/fxfa/xfa_ffapp.h index 554b7b9328..4b40ba76c8 100644 --- a/xfa/fxfa/xfa_ffapp.h +++ b/xfa/fxfa/xfa_ffapp.h @@ -13,7 +13,7 @@ #include "core/fpdfapi/parser/cpdf_stream.h" #include "core/fpdfapi/parser/cpdf_stream_acc.h" #include "xfa/fgas/font/cfgas_fontmgr.h" -#include "xfa/fwl/core/ifwl_app.h" +#include "xfa/fwl/core/cfwl_app.h" #include "xfa/fxfa/fxfa.h" class CXFA_DefFontMgr; @@ -56,7 +56,7 @@ class CXFA_FFApp { CXFA_FWLTheme* GetFWLTheme(); IXFA_AppProvider* GetAppProvider() const { return m_pProvider; } - const IFWL_App* GetFWLApp() const { return m_pFWLApp.get(); } + const CFWL_App* GetFWLApp() const { return m_pFWLApp.get(); } IFWL_AdapterTimerMgr* GetTimerMgr() const; CXFA_FontMgr* GetXFAFontMgr() const; IFWL_WidgetMgrDelegate* GetWidgetMgrDelegate() const { @@ -91,7 +91,7 @@ class CXFA_FFApp { // |m_pFWLApp| has to be released first, then |m_pFWLTheme| since the former // may refers to theme manager and the latter refers to font manager. std::unique_ptr m_pFWLTheme; - std::unique_ptr m_pFWLApp; + std::unique_ptr m_pFWLApp; }; #endif // XFA_FXFA_XFA_FFAPP_H_ diff --git a/xfa/fxfa/xfa_ffwidget.h b/xfa/fxfa/xfa_ffwidget.h index 3c2af1647c..9e02680a23 100644 --- a/xfa/fxfa/xfa_ffwidget.h +++ b/xfa/fxfa/xfa_ffwidget.h @@ -11,7 +11,7 @@ #include "core/fxcodec/fx_codec_def.h" #include "core/fxge/cfx_graphstatedata.h" -#include "xfa/fwl/core/ifwl_app.h" +#include "xfa/fwl/core/cfwl_app.h" #include "xfa/fxfa/fxfa.h" #include "xfa/fxfa/parser/cxfa_contentlayoutitem.h" @@ -124,7 +124,7 @@ class CXFA_FFWidget : public CXFA_ContentLayoutItem { bool IsLayoutRectEmpty(); CXFA_FFWidget* GetParent(); bool IsAncestorOf(CXFA_FFWidget* pWidget); - const IFWL_App* GetFWLApp(); + const CFWL_App* GetFWLApp(); protected: virtual bool PtInActiveRect(FX_FLOAT fx, FX_FLOAT fy); -- cgit v1.2.3