summaryrefslogtreecommitdiff
path: root/xfa/src/fwl/basewidget/fwl_formproxyimp.cpp
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2016-03-08 12:16:00 -0500
committerDan Sinclair <dsinclair@chromium.org>2016-03-08 12:16:00 -0500
commit6f6388fee1fdb4bec57549fe87a0833b2b20bebe (patch)
tree425b282da710e43904ebc68bf098a88cd2676397 /xfa/src/fwl/basewidget/fwl_formproxyimp.cpp
parent71568591f4df8cc2d02fbd5544b0b0cc2b8f55e8 (diff)
downloadpdfium-6f6388fee1fdb4bec57549fe87a0833b2b20bebe.tar.xz
Remove xfa/src/fwl/src and move code up a level.
This Cl moves the xfa/src/fwl/src code up to the previously empty parent directory and removes xfa/src/fwl/src. R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1770953004 .
Diffstat (limited to 'xfa/src/fwl/basewidget/fwl_formproxyimp.cpp')
-rw-r--r--xfa/src/fwl/basewidget/fwl_formproxyimp.cpp55
1 files changed, 55 insertions, 0 deletions
diff --git a/xfa/src/fwl/basewidget/fwl_formproxyimp.cpp b/xfa/src/fwl/basewidget/fwl_formproxyimp.cpp
new file mode 100644
index 0000000000..3985f00b77
--- /dev/null
+++ b/xfa/src/fwl/basewidget/fwl_formproxyimp.cpp
@@ -0,0 +1,55 @@
+// 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/src/fwl/basewidget/fwl_formproxyimp.h"
+
+#include "xfa/src/fwl/core/fwl_formimp.h"
+#include "xfa/src/fwl/core/fwl_noteimp.h"
+#include "xfa/src/fwl/core/fwl_panelimp.h"
+#include "xfa/src/fwl/core/fwl_targetimp.h"
+#include "xfa/src/fwl/core/fwl_widgetimp.h"
+
+CFWL_FormProxyImp::CFWL_FormProxyImp(const CFWL_WidgetImpProperties& properties,
+ IFWL_Widget* pOuter)
+ : CFWL_FormImp(properties, pOuter) {}
+CFWL_FormProxyImp::~CFWL_FormProxyImp() {}
+FWL_ERR CFWL_FormProxyImp::GetClassName(CFX_WideString& wsClass) const {
+ wsClass = FWL_CLASS_FormProxy;
+ return FWL_ERR_Succeeded;
+}
+FX_DWORD CFWL_FormProxyImp::GetClassID() const {
+ return FWL_CLASSHASH_FormProxy;
+}
+FX_BOOL CFWL_FormProxyImp::IsInstance(const CFX_WideStringC& wsClass) const {
+ if (wsClass == CFX_WideStringC(FWL_CLASS_FormProxy)) {
+ return TRUE;
+ }
+ return CFWL_FormImp::IsInstance(wsClass);
+}
+FWL_ERR CFWL_FormProxyImp::Initialize() {
+ if (CFWL_WidgetImp::Initialize() != FWL_ERR_Succeeded)
+ return FWL_ERR_Indefinite;
+ m_pDelegate = new CFWL_FormProxyImpDelegate(this);
+ return FWL_ERR_Succeeded;
+}
+FWL_ERR CFWL_FormProxyImp::Finalize() {
+ delete m_pDelegate;
+ m_pDelegate = nullptr;
+ return CFWL_WidgetImp::Finalize();
+}
+FWL_ERR CFWL_FormProxyImp::Update() {
+ return FWL_ERR_Succeeded;
+}
+FWL_ERR CFWL_FormProxyImp::DrawWidget(CFX_Graphics* pGraphics,
+ const CFX_Matrix* pMatrix) {
+ return FWL_ERR_Succeeded;
+}
+CFWL_FormProxyImpDelegate::CFWL_FormProxyImpDelegate(CFWL_FormProxyImp* pOwner)
+ : m_pOwner(pOwner) {}
+int32_t CFWL_FormProxyImpDelegate::OnProcessMessage(CFWL_Message* pMessage) {
+ IFWL_WidgetDelegate* pDelegate = m_pOwner->m_pOuter->SetDelegate(NULL);
+ return pDelegate->OnProcessMessage(pMessage);
+}