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/fxfa/xfa_ffwidget.h" | 7 #include "xfa/fxfa/xfa_ffwidget.h" |
8 | 8 |
9 #include <algorithm> | 9 #include <algorithm> |
10 #include <memory> | 10 #include <memory> |
(...skipping 26 matching lines...) Expand all Loading... |
37 m_pDataAcc(pDataAcc) { | 37 m_pDataAcc(pDataAcc) { |
38 m_rtWidget.Set(0, 0, 0, 0); | 38 m_rtWidget.Set(0, 0, 0, 0); |
39 } | 39 } |
40 CXFA_FFWidget::~CXFA_FFWidget() {} | 40 CXFA_FFWidget::~CXFA_FFWidget() {} |
41 CXFA_FFPageView* CXFA_FFWidget::GetPageView() { | 41 CXFA_FFPageView* CXFA_FFWidget::GetPageView() { |
42 return m_pPageView; | 42 return m_pPageView; |
43 } | 43 } |
44 void CXFA_FFWidget::SetPageView(CXFA_FFPageView* pPageView) { | 44 void CXFA_FFWidget::SetPageView(CXFA_FFPageView* pPageView) { |
45 m_pPageView = pPageView; | 45 m_pPageView = pPageView; |
46 } | 46 } |
| 47 |
| 48 const IFWL_App* CXFA_FFWidget::GetFWLApp() { |
| 49 return GetPageView()->GetDocView()->GetDoc()->GetApp()->GetFWLApp(); |
| 50 } |
| 51 |
47 void CXFA_FFWidget::GetWidgetRect(CFX_RectF& rtWidget) { | 52 void CXFA_FFWidget::GetWidgetRect(CFX_RectF& rtWidget) { |
48 if ((m_dwStatus & XFA_WidgetStatus_RectCached) == 0) { | 53 if ((m_dwStatus & XFA_WidgetStatus_RectCached) == 0) { |
49 m_dwStatus |= XFA_WidgetStatus_RectCached; | 54 m_dwStatus |= XFA_WidgetStatus_RectCached; |
50 GetRect(m_rtWidget); | 55 GetRect(m_rtWidget); |
51 } | 56 } |
52 rtWidget = m_rtWidget; | 57 rtWidget = m_rtWidget; |
53 } | 58 } |
54 CFX_RectF CXFA_FFWidget::ReCacheWidgetRect() { | 59 CFX_RectF CXFA_FFWidget::ReCacheWidgetRect() { |
55 m_dwStatus |= XFA_WidgetStatus_RectCached; | 60 m_dwStatus |= XFA_WidgetStatus_RectCached; |
56 GetRect(m_rtWidget); | 61 GetRect(m_rtWidget); |
(...skipping 1988 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2045 } | 2050 } |
2046 XFA_BOX_Fill(box, strokes, pGS, rtWidget, pMatrix, dwFlags); | 2051 XFA_BOX_Fill(box, strokes, pGS, rtWidget, pMatrix, dwFlags); |
2047 XFA_BOX_Stroke(box, strokes, pGS, rtWidget, pMatrix, dwFlags); | 2052 XFA_BOX_Stroke(box, strokes, pGS, rtWidget, pMatrix, dwFlags); |
2048 } | 2053 } |
2049 | 2054 |
2050 CXFA_CalcData::CXFA_CalcData() : m_iRefCount(0) {} | 2055 CXFA_CalcData::CXFA_CalcData() : m_iRefCount(0) {} |
2051 | 2056 |
2052 CXFA_CalcData::~CXFA_CalcData() { | 2057 CXFA_CalcData::~CXFA_CalcData() { |
2053 m_Globals.RemoveAll(); | 2058 m_Globals.RemoveAll(); |
2054 } | 2059 } |
OLD | NEW |