summaryrefslogtreecommitdiff
path: root/xfa/fwl/core/ifwl_comboboxproxy.h
diff options
context:
space:
mode:
authordsinclair <dsinclair@chromium.org>2016-11-02 14:51:25 -0700
committerCommit bot <commit-bot@chromium.org>2016-11-02 14:51:25 -0700
commit3b3ce1a242f8445848d3f23d6c35ba01d7c645f4 (patch)
tree365d9ee7f8eec1103fb9fce0986e23d9f548ecae /xfa/fwl/core/ifwl_comboboxproxy.h
parent4cf551577856f89103e162edc761def44ffb96fc (diff)
downloadpdfium-3b3ce1a242f8445848d3f23d6c35ba01d7c645f4.tar.xz
Merge delegates into IFWL_* classes.
This Cl removes ownership of the delgates from IFWL_Widget and puts it in the hand of the creating classes. In doing so, merge the delegates back into the IFWL_* classes to simplify logic. Review-Url: https://codereview.chromium.org/2467993003
Diffstat (limited to 'xfa/fwl/core/ifwl_comboboxproxy.h')
-rw-r--r--xfa/fwl/core/ifwl_comboboxproxy.h41
1 files changed, 41 insertions, 0 deletions
diff --git a/xfa/fwl/core/ifwl_comboboxproxy.h b/xfa/fwl/core/ifwl_comboboxproxy.h
new file mode 100644
index 0000000000..1cf7a06ccb
--- /dev/null
+++ b/xfa/fwl/core/ifwl_comboboxproxy.h
@@ -0,0 +1,41 @@
+// Copyright 2016 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_COMBOBOXPROXY_H_
+#define XFA_FWL_CORE_IFWL_COMBOBOXPROXY_H_
+
+#include "xfa/fwl/core/ifwl_formproxy.h"
+
+class IFWL_ComboBox;
+
+class IFWL_ComboBoxProxy : public IFWL_FormProxy {
+ public:
+ IFWL_ComboBoxProxy(IFWL_ComboBox* pCombobBox,
+ const IFWL_App* app,
+ const CFWL_WidgetImpProperties& properties,
+ IFWL_Widget* pOuter);
+ ~IFWL_ComboBoxProxy() override;
+
+ // IFWL_FormProxy
+ void OnProcessMessage(CFWL_Message* pMessage) override;
+ void OnDrawWidget(CFX_Graphics* pGraphics,
+ const CFX_Matrix* pMatrix) override;
+
+ void Reset() { m_bLButtonUpSelf = FALSE; }
+
+ private:
+ void OnLButtonDown(CFWL_MsgMouse* pMsg);
+ void OnLButtonUp(CFWL_MsgMouse* pMsg);
+ void OnDeactive(CFWL_MsgDeactivate* pMsg);
+ void OnFocusChanged(CFWL_MsgKillFocus* pMsg, FX_BOOL bSet);
+
+ FX_BOOL m_bLButtonDown;
+ FX_BOOL m_bLButtonUpSelf;
+
+ IFWL_ComboBox* m_pComboBox;
+};
+
+#endif // XFA_FWL_CORE_IFWL_COMBOBOXPROXY_H_