Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(532)

Side by Side Diff: xfa/fwl/core/ifwl_widget.cpp

Issue 2486333004: Remove IFWL methods proxied from CFWL classes (Closed)
Patch Set: Rebase to master Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« xfa/fwl/core/cfwl_listbox.cpp ('K') | « xfa/fwl/core/ifwl_widget.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/ifwl_widget.h" 7 #include "xfa/fwl/core/ifwl_widget.h"
8 8
9 #include <algorithm> 9 #include <algorithm>
10 10
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 } 68 }
69 if (HasBorder()) { 69 if (HasBorder()) {
70 FX_FLOAT fBorder = GetBorderSize(); 70 FX_FLOAT fBorder = GetBorderSize();
71 rect.Inflate(fBorder, fBorder); 71 rect.Inflate(fBorder, fBorder);
72 } 72 }
73 } else { 73 } else {
74 rect = m_pProperties->m_rtWidget; 74 rect = m_pProperties->m_rtWidget;
75 } 75 }
76 } 76 }
77 77
78 void IFWL_Widget::GetGlobalRect(CFX_RectF& rect) {
79 IFWL_Widget* pForm = m_pWidgetMgr->GetSystemFormWidget(this);
80 if (!pForm)
81 return;
82
83 rect.Set(0, 0, m_pProperties->m_rtWidget.width,
84 m_pProperties->m_rtWidget.height);
85 if (pForm == this)
86 return;
87
88 TransformTo(pForm, rect.left, rect.top);
89 }
90
91 void IFWL_Widget::SetWidgetRect(const CFX_RectF& rect) { 78 void IFWL_Widget::SetWidgetRect(const CFX_RectF& rect) {
92 CFX_RectF rtOld = m_pProperties->m_rtWidget; 79 CFX_RectF rtOld = m_pProperties->m_rtWidget;
93 m_pProperties->m_rtWidget = rect; 80 m_pProperties->m_rtWidget = rect;
94 if (IsChild()) { 81 if (IsChild()) {
95 if (FXSYS_fabs(rtOld.width - rect.width) > 0.5f || 82 if (FXSYS_fabs(rtOld.width - rect.width) > 0.5f ||
96 FXSYS_fabs(rtOld.height - rect.height) > 0.5f) { 83 FXSYS_fabs(rtOld.height - rect.height) > 0.5f) {
97 CFWL_EvtSizeChanged ev; 84 CFWL_EvtSizeChanged ev;
98 ev.m_pSrcTarget = this; 85 ev.m_pSrcTarget = this;
99 ev.m_rtOld = rtOld; 86 ev.m_rtOld = rtOld;
100 ev.m_rtNew = rect; 87 ev.m_rtNew = rect;
(...skipping 646 matching lines...) Expand 10 before | Expand all | Expand 10 after
747 } 734 }
748 default: 735 default:
749 break; 736 break;
750 } 737 }
751 } 738 }
752 739
753 void IFWL_Widget::OnProcessEvent(CFWL_Event* pEvent) {} 740 void IFWL_Widget::OnProcessEvent(CFWL_Event* pEvent) {}
754 741
755 void IFWL_Widget::OnDrawWidget(CFX_Graphics* pGraphics, 742 void IFWL_Widget::OnDrawWidget(CFX_Graphics* pGraphics,
756 const CFX_Matrix* pMatrix) {} 743 const CFX_Matrix* pMatrix) {}
OLDNEW
« xfa/fwl/core/cfwl_listbox.cpp ('K') | « xfa/fwl/core/ifwl_widget.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698