| OLD | NEW | 
|---|
| 1 // Copyright 2014 PDFium Authors. All rights reserved. | 1 // Copyright 2014 PDFium Authors. All rights reserved. | 
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be | 
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. | 
| 4 | 4 | 
| 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com | 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com | 
| 6 | 6 | 
| 7 #include "xfa/fwl/core/cfwl_widget.h" | 7 #include "xfa/fwl/cfwl_widget.h" | 
| 8 | 8 | 
| 9 #include <algorithm> | 9 #include <algorithm> | 
| 10 #include <utility> | 10 #include <utility> | 
| 11 | 11 | 
| 12 #include "xfa/fde/tto/fde_textout.h" | 12 #include "xfa/fde/tto/fde_textout.h" | 
| 13 #include "xfa/fwl/core/cfwl_app.h" | 13 #include "xfa/fwl/cfwl_app.h" | 
| 14 #include "xfa/fwl/core/cfwl_combobox.h" | 14 #include "xfa/fwl/cfwl_combobox.h" | 
| 15 #include "xfa/fwl/core/cfwl_event.h" | 15 #include "xfa/fwl/cfwl_event.h" | 
| 16 #include "xfa/fwl/core/cfwl_evtmouse.h" | 16 #include "xfa/fwl/cfwl_eventmouse.h" | 
| 17 #include "xfa/fwl/core/cfwl_form.h" | 17 #include "xfa/fwl/cfwl_form.h" | 
| 18 #include "xfa/fwl/core/cfwl_msgkey.h" | 18 #include "xfa/fwl/cfwl_messagekey.h" | 
| 19 #include "xfa/fwl/core/cfwl_msgkillfocus.h" | 19 #include "xfa/fwl/cfwl_messagekillfocus.h" | 
| 20 #include "xfa/fwl/core/cfwl_msgmouse.h" | 20 #include "xfa/fwl/cfwl_messagemouse.h" | 
| 21 #include "xfa/fwl/core/cfwl_msgmousewheel.h" | 21 #include "xfa/fwl/cfwl_messagemousewheel.h" | 
| 22 #include "xfa/fwl/core/cfwl_msgsetfocus.h" | 22 #include "xfa/fwl/cfwl_messagesetfocus.h" | 
| 23 #include "xfa/fwl/core/cfwl_notedriver.h" | 23 #include "xfa/fwl/cfwl_notedriver.h" | 
| 24 #include "xfa/fwl/core/cfwl_themebackground.h" | 24 #include "xfa/fwl/cfwl_themebackground.h" | 
| 25 #include "xfa/fwl/core/cfwl_themepart.h" | 25 #include "xfa/fwl/cfwl_themepart.h" | 
| 26 #include "xfa/fwl/core/cfwl_themetext.h" | 26 #include "xfa/fwl/cfwl_themetext.h" | 
| 27 #include "xfa/fwl/core/cfwl_widgetmgr.h" | 27 #include "xfa/fwl/cfwl_widgetmgr.h" | 
| 28 #include "xfa/fwl/core/ifwl_themeprovider.h" | 28 #include "xfa/fwl/ifwl_themeprovider.h" | 
| 29 #include "xfa/fxfa/xfa_ffapp.h" | 29 #include "xfa/fxfa/xfa_ffapp.h" | 
| 30 | 30 | 
| 31 #define FWL_STYLEEXT_MNU_Vert (1L << 0) | 31 #define FWL_STYLEEXT_MNU_Vert (1L << 0) | 
| 32 #define FWL_WGT_CalcHeight 2048 | 32 #define FWL_WGT_CalcHeight 2048 | 
| 33 #define FWL_WGT_CalcWidth 2048 | 33 #define FWL_WGT_CalcWidth 2048 | 
| 34 #define FWL_WGT_CalcMultiLineDefWidth 120.0f | 34 #define FWL_WGT_CalcMultiLineDefWidth 120.0f | 
| 35 | 35 | 
| 36 CFWL_Widget::CFWL_Widget(const CFWL_App* app, | 36 CFWL_Widget::CFWL_Widget(const CFWL_App* app, | 
| 37                          std::unique_ptr<CFWL_WidgetProperties> properties, | 37                          std::unique_ptr<CFWL_WidgetProperties> properties, | 
| 38                          CFWL_Widget* pOuter) | 38                          CFWL_Widget* pOuter) | 
| (...skipping 665 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 704   return false; | 704   return false; | 
| 705 } | 705 } | 
| 706 | 706 | 
| 707 void CFWL_Widget::OnProcessMessage(CFWL_Message* pMessage) { | 707 void CFWL_Widget::OnProcessMessage(CFWL_Message* pMessage) { | 
| 708   if (!pMessage->m_pDstTarget) | 708   if (!pMessage->m_pDstTarget) | 
| 709     return; | 709     return; | 
| 710 | 710 | 
| 711   CFWL_Widget* pWidget = pMessage->m_pDstTarget; | 711   CFWL_Widget* pWidget = pMessage->m_pDstTarget; | 
| 712   switch (pMessage->GetType()) { | 712   switch (pMessage->GetType()) { | 
| 713     case CFWL_Message::Type::Mouse: { | 713     case CFWL_Message::Type::Mouse: { | 
| 714       CFWL_MsgMouse* pMsgMouse = static_cast<CFWL_MsgMouse*>(pMessage); | 714       CFWL_MessageMouse* pMsgMouse = static_cast<CFWL_MessageMouse*>(pMessage); | 
| 715 | 715 | 
| 716       CFWL_EvtMouse evt(pWidget, pWidget); | 716       CFWL_EventMouse evt(pWidget, pWidget); | 
| 717       evt.m_dwCmd = pMsgMouse->m_dwCmd; | 717       evt.m_dwCmd = pMsgMouse->m_dwCmd; | 
| 718       pWidget->DispatchEvent(&evt); | 718       pWidget->DispatchEvent(&evt); | 
| 719       break; | 719       break; | 
| 720     } | 720     } | 
| 721     default: | 721     default: | 
| 722       break; | 722       break; | 
| 723   } | 723   } | 
| 724 } | 724 } | 
| 725 | 725 | 
| 726 void CFWL_Widget::OnProcessEvent(CFWL_Event* pEvent) {} | 726 void CFWL_Widget::OnProcessEvent(CFWL_Event* pEvent) {} | 
| 727 | 727 | 
| 728 void CFWL_Widget::OnDrawWidget(CFX_Graphics* pGraphics, | 728 void CFWL_Widget::OnDrawWidget(CFX_Graphics* pGraphics, | 
| 729                                const CFX_Matrix* pMatrix) {} | 729                                const CFX_Matrix* pMatrix) {} | 
| OLD | NEW | 
|---|