summaryrefslogtreecommitdiff
path: root/xfa/fwl/core/ifwl_comboboxproxy.cpp
diff options
context:
space:
mode:
authordsinclair <dsinclair@chromium.org>2016-11-16 14:25:01 -0800
committerCommit bot <commit-bot@chromium.org>2016-11-16 14:25:01 -0800
commit242b95e2a9df3b57dd9aa28adea58ad51f84a221 (patch)
tree001948a117ff48e77af6351c505a9e41951d7a4e /xfa/fwl/core/ifwl_comboboxproxy.cpp
parent058d2d6b7851b77a371bb4d37d5da1148794397a (diff)
downloadpdfium-242b95e2a9df3b57dd9aa28adea58ad51f84a221.tar.xz
Move the message definitions to their own files.chromium/2923
Currently the CFWL messages are created by a macro in the CFWL_Message header file. This Cl splits out the class to their own files and writes them directly instead of using the macro. Review-Url: https://codereview.chromium.org/2510823003
Diffstat (limited to 'xfa/fwl/core/ifwl_comboboxproxy.cpp')
-rw-r--r--xfa/fwl/core/ifwl_comboboxproxy.cpp17
1 files changed, 12 insertions, 5 deletions
diff --git a/xfa/fwl/core/ifwl_comboboxproxy.cpp b/xfa/fwl/core/ifwl_comboboxproxy.cpp
index 4bc1e294d4..03bfca2727 100644
--- a/xfa/fwl/core/ifwl_comboboxproxy.cpp
+++ b/xfa/fwl/core/ifwl_comboboxproxy.cpp
@@ -6,6 +6,8 @@
#include "xfa/fwl/core/ifwl_comboboxproxy.h"
+#include "xfa/fwl/core/cfwl_msgkillfocus.h"
+#include "xfa/fwl/core/cfwl_msgmouse.h"
#include "xfa/fwl/core/fwl_noteimp.h"
#include "xfa/fwl/core/ifwl_app.h"
#include "xfa/fwl/core/ifwl_combobox.h"
@@ -42,10 +44,10 @@ void IFWL_ComboBoxProxy::OnProcessMessage(CFWL_Message* pMessage) {
break;
}
case CFWL_MessageType::KillFocus:
- OnFocusChanged(static_cast<CFWL_MsgKillFocus*>(pMessage), false);
+ OnFocusChanged(pMessage, false);
break;
case CFWL_MessageType::SetFocus:
- OnFocusChanged(static_cast<CFWL_MsgKillFocus*>(pMessage), true);
+ OnFocusChanged(pMessage, true);
break;
default:
break;
@@ -58,7 +60,7 @@ void IFWL_ComboBoxProxy::OnDrawWidget(CFX_Graphics* pGraphics,
m_pComboBox->DrawStretchHandler(pGraphics, pMatrix);
}
-void IFWL_ComboBoxProxy::OnLButtonDown(CFWL_MsgMouse* pMsg) {
+void IFWL_ComboBoxProxy::OnLButtonDown(CFWL_Message* pMessage) {
const IFWL_App* pApp = GetOwnerApp();
if (!pApp)
return;
@@ -68,6 +70,8 @@ void IFWL_ComboBoxProxy::OnLButtonDown(CFWL_MsgMouse* pMsg) {
CFX_RectF rtWidget;
GetWidgetRect(rtWidget);
rtWidget.left = rtWidget.top = 0;
+
+ CFWL_MsgMouse* pMsg = static_cast<CFWL_MsgMouse*>(pMessage);
if (rtWidget.Contains(pMsg->m_fx, pMsg->m_fy)) {
m_bLButtonDown = true;
pDriver->SetGrab(this, true);
@@ -78,7 +82,7 @@ void IFWL_ComboBoxProxy::OnLButtonDown(CFWL_MsgMouse* pMsg) {
}
}
-void IFWL_ComboBoxProxy::OnLButtonUp(CFWL_MsgMouse* pMsg) {
+void IFWL_ComboBoxProxy::OnLButtonUp(CFWL_Message* pMessage) {
m_bLButtonDown = false;
const IFWL_App* pApp = GetOwnerApp();
if (!pApp)
@@ -92,6 +96,7 @@ void IFWL_ComboBoxProxy::OnLButtonUp(CFWL_MsgMouse* pMsg) {
return;
}
+ CFWL_MsgMouse* pMsg = static_cast<CFWL_MsgMouse*>(pMessage);
CFX_RectF rect;
GetWidgetRect(rect);
rect.left = rect.top = 0;
@@ -101,9 +106,11 @@ void IFWL_ComboBoxProxy::OnLButtonUp(CFWL_MsgMouse* pMsg) {
}
}
-void IFWL_ComboBoxProxy::OnFocusChanged(CFWL_MsgKillFocus* pMsg, bool bSet) {
+void IFWL_ComboBoxProxy::OnFocusChanged(CFWL_Message* pMessage, bool bSet) {
if (bSet)
return;
+
+ CFWL_MsgKillFocus* pMsg = static_cast<CFWL_MsgKillFocus*>(pMessage);
if (!pMsg->m_pSetFocus)
m_pComboBox->ShowDropList(false);
}