| 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/cfwl_form.h" | 7 #include "xfa/fwl/cfwl_form.h" |
| 8 | 8 |
| 9 #include <utility> | 9 #include <utility> |
| 10 | 10 |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 92 param.m_pWidget = this; | 92 param.m_pWidget = this; |
| 93 param.m_dwStates = CFWL_PartState_Normal; | 93 param.m_dwStates = CFWL_PartState_Normal; |
| 94 param.m_pGraphics = pGraphics; | 94 param.m_pGraphics = pGraphics; |
| 95 param.m_rtPart = m_rtRelative; | 95 param.m_rtPart = m_rtRelative; |
| 96 if (pMatrix) | 96 if (pMatrix) |
| 97 param.m_matrix.Concat(*pMatrix); | 97 param.m_matrix.Concat(*pMatrix); |
| 98 if (m_pProperties->m_dwStyles & FWL_WGTSTYLE_Border) { | 98 if (m_pProperties->m_dwStyles & FWL_WGTSTYLE_Border) { |
| 99 param.m_iPart = CFWL_Part::Border; | 99 param.m_iPart = CFWL_Part::Border; |
| 100 pTheme->DrawBackground(¶m); | 100 pTheme->DrawBackground(¶m); |
| 101 } | 101 } |
| 102 if ((m_pProperties->m_dwStyleExes & FWL_WGTSTYLE_EdgeMask) != | |
| 103 FWL_WGTSTYLE_EdgeNone) { | |
| 104 param.m_iPart = CFWL_Part::Edge; | |
| 105 param.m_rtPart = GetEdgeRect(); | |
| 106 param.m_dwStates = CFWL_PartState_Normal; | |
| 107 pTheme->DrawBackground(¶m); | |
| 108 } | |
| 109 } | 102 } |
| 110 | 103 |
| 111 CFWL_Widget* CFWL_Form::DoModal() { | 104 CFWL_Widget* CFWL_Form::DoModal() { |
| 112 const CFWL_App* pApp = GetOwnerApp(); | 105 const CFWL_App* pApp = GetOwnerApp(); |
| 113 if (!pApp) | 106 if (!pApp) |
| 114 return nullptr; | 107 return nullptr; |
| 115 | 108 |
| 116 CFWL_NoteDriver* pDriver = pApp->GetNoteDriver(); | 109 CFWL_NoteDriver* pDriver = pApp->GetNoteDriver(); |
| 117 if (!pDriver) | 110 if (!pDriver) |
| 118 return nullptr; | 111 return nullptr; |
| (...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 252 DrawWidget(pGraphics, pMatrix); | 245 DrawWidget(pGraphics, pMatrix); |
| 253 } | 246 } |
| 254 | 247 |
| 255 void CFWL_Form::OnLButtonDown(CFWL_MessageMouse* pMsg) { | 248 void CFWL_Form::OnLButtonDown(CFWL_MessageMouse* pMsg) { |
| 256 SetGrab(true); | 249 SetGrab(true); |
| 257 } | 250 } |
| 258 | 251 |
| 259 void CFWL_Form::OnLButtonUp(CFWL_MessageMouse* pMsg) { | 252 void CFWL_Form::OnLButtonUp(CFWL_MessageMouse* pMsg) { |
| 260 SetGrab(false); | 253 SetGrab(false); |
| 261 } | 254 } |
| OLD | NEW |