| 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/fwl_formimp.h" | 7 #include "xfa/fwl/core/fwl_formimp.h" |
| 8 | 8 |
| 9 #include "xfa/fde/tto/fde_textout.h" | 9 #include "xfa/fde/tto/fde_textout.h" |
| 10 #include "xfa/fwl/basewidget/fwl_formproxyimp.h" | 10 #include "xfa/fwl/basewidget/fwl_formproxyimp.h" |
| (...skipping 453 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 464 if (!pWidgetMgr) | 464 if (!pWidgetMgr) |
| 465 return; | 465 return; |
| 466 IFWL_Widget* pChild = | 466 IFWL_Widget* pChild = |
| 467 pWidgetMgr->GetWidget(pParent, FWL_WGTRELATION_FirstChild); | 467 pWidgetMgr->GetWidget(pParent, FWL_WGTRELATION_FirstChild); |
| 468 while (pChild) { | 468 while (pChild) { |
| 469 pWidgetMgr->ShowWidget_Native(pChild); | 469 pWidgetMgr->ShowWidget_Native(pChild); |
| 470 ShowChildWidget(pChild); | 470 ShowChildWidget(pChild); |
| 471 pChild = pWidgetMgr->GetWidget(pChild, FWL_WGTRELATION_NextSibling); | 471 pChild = pWidgetMgr->GetWidget(pChild, FWL_WGTRELATION_NextSibling); |
| 472 } | 472 } |
| 473 } | 473 } |
| 474 |
| 474 void CFWL_FormImp::RemoveSysButtons() { | 475 void CFWL_FormImp::RemoveSysButtons() { |
| 475 m_rtCaption.Reset(); | 476 m_rtCaption.Reset(); |
| 476 if (m_pCloseBox) { | 477 delete m_pCloseBox; |
| 477 delete m_pCloseBox; | 478 m_pCloseBox = nullptr; |
| 478 m_pCloseBox = NULL; | 479 delete m_pMinBox; |
| 479 } | 480 m_pMinBox = nullptr; |
| 480 if (m_pMinBox) { | 481 delete m_pMaxBox; |
| 481 delete m_pMinBox; | 482 m_pMaxBox = nullptr; |
| 482 m_pMinBox = NULL; | 483 delete m_pCaptionBox; |
| 483 } | 484 m_pCaptionBox = nullptr; |
| 484 if (m_pMaxBox) { | |
| 485 delete m_pMaxBox; | |
| 486 m_pMaxBox = NULL; | |
| 487 } | |
| 488 if (m_pCaptionBox) { | |
| 489 delete m_pCaptionBox; | |
| 490 m_pCaptionBox = NULL; | |
| 491 } | |
| 492 } | 485 } |
| 486 |
| 493 void CFWL_FormImp::CalcContentRect(CFX_RectF& rtContent) { | 487 void CFWL_FormImp::CalcContentRect(CFX_RectF& rtContent) { |
| 494 #ifdef FWL_UseMacSystemBorder | 488 #ifdef FWL_UseMacSystemBorder |
| 495 rtContent = m_rtRelative; | 489 rtContent = m_rtRelative; |
| 496 #else | 490 #else |
| 497 GetEdgeRect(rtContent); | 491 GetEdgeRect(rtContent); |
| 498 if (HasEdge()) { | 492 if (HasEdge()) { |
| 499 FX_FLOAT fEdge = GetEdgeWidth(); | 493 FX_FLOAT fEdge = GetEdgeWidth(); |
| 500 rtContent.Deflate(fEdge, fEdge); | 494 rtContent.Deflate(fEdge, fEdge); |
| 501 } | 495 } |
| 502 #endif | 496 #endif |
| (...skipping 655 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1158 } | 1152 } |
| 1159 void CFWL_FormImpDelegate::OnWindowMove(CFWL_MsgWindowMove* pMsg) { | 1153 void CFWL_FormImpDelegate::OnWindowMove(CFWL_MsgWindowMove* pMsg) { |
| 1160 m_pOwner->m_pProperties->m_rtWidget.left = pMsg->m_fx; | 1154 m_pOwner->m_pProperties->m_rtWidget.left = pMsg->m_fx; |
| 1161 m_pOwner->m_pProperties->m_rtWidget.top = pMsg->m_fy; | 1155 m_pOwner->m_pProperties->m_rtWidget.top = pMsg->m_fy; |
| 1162 } | 1156 } |
| 1163 void CFWL_FormImpDelegate::OnClose(CFWL_MsgClose* pMsg) { | 1157 void CFWL_FormImpDelegate::OnClose(CFWL_MsgClose* pMsg) { |
| 1164 CFWL_EvtClose eClose; | 1158 CFWL_EvtClose eClose; |
| 1165 eClose.m_pSrcTarget = m_pOwner->m_pInterface; | 1159 eClose.m_pSrcTarget = m_pOwner->m_pInterface; |
| 1166 m_pOwner->DispatchEvent(&eClose); | 1160 m_pOwner->DispatchEvent(&eClose); |
| 1167 } | 1161 } |
| OLD | NEW |