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 #ifndef XFA_FXFA_INCLUDE_XFA_FFPAGEVIEW_H_ | 7 #ifndef XFA_FXFA_INCLUDE_XFA_FFPAGEVIEW_H_ |
8 #define XFA_FXFA_INCLUDE_XFA_FFPAGEVIEW_H_ | 8 #define XFA_FXFA_INCLUDE_XFA_FFPAGEVIEW_H_ |
9 | 9 |
10 #include "xfa/fxfa/parser/xfa_doclayout.h" | 10 #include "xfa/fxfa/parser/xfa_doclayout.h" |
11 | 11 |
12 class CXFA_FFWidget; | 12 class CXFA_FFWidget; |
13 class CXFA_FFDocView; | 13 class CXFA_FFDocView; |
| 14 |
14 class CXFA_FFPageView : public CXFA_ContainerLayoutItem { | 15 class CXFA_FFPageView : public CXFA_ContainerLayoutItem { |
15 public: | 16 public: |
16 CXFA_FFPageView(CXFA_FFDocView* pDocView, CXFA_Node* pPageArea); | 17 CXFA_FFPageView(CXFA_FFDocView* pDocView, CXFA_Node* pPageArea); |
17 ~CXFA_FFPageView() override; | 18 ~CXFA_FFPageView() override; |
18 | 19 |
19 CXFA_FFDocView* GetDocView(); | 20 CXFA_FFDocView* GetDocView() const; |
20 int32_t GetPageViewIndex(); | 21 int32_t GetPageViewIndex() const; |
21 void GetPageViewRect(CFX_RectF& rtPage); | 22 void GetPageViewRect(CFX_RectF& rtPage) const; |
22 void GetDisplayMatrix(CFX_Matrix& mt, | 23 void GetDisplayMatrix(CFX_Matrix& mt, |
23 const CFX_Rect& rtDisp, | 24 const CFX_Rect& rtDisp, |
24 int32_t iRotate); | 25 int32_t iRotate) const; |
25 int32_t LoadPageView(IFX_Pause* pPause = NULL); | |
26 void UnloadPageView(); | |
27 CXFA_FFWidget* GetWidgetByPos(FX_FLOAT fx, FX_FLOAT fy); | |
28 IXFA_WidgetIterator* CreateWidgetIterator( | 26 IXFA_WidgetIterator* CreateWidgetIterator( |
29 uint32_t dwTraverseWay = XFA_TRAVERSEWAY_Form, | 27 uint32_t dwTraverseWay = XFA_TRAVERSEWAY_Form, |
30 uint32_t dwWidgetFilter = XFA_WIDGETFILTER_Visible | | 28 uint32_t dwWidgetFilter = XFA_WIDGETFILTER_Visible | |
31 XFA_WIDGETFILTER_Viewable | | 29 XFA_WIDGETFILTER_Viewable | |
32 XFA_WIDGETFILTER_AllType); | 30 XFA_WIDGETFILTER_AllType); |
33 | 31 |
34 FX_BOOL IsPageViewLoaded(); | 32 protected: |
| 33 CXFA_FFDocView* const m_pDocView; |
| 34 }; |
35 | 35 |
36 protected: | |
37 CXFA_FFDocView* m_pDocView; | |
38 FX_BOOL m_bLoaded; | |
39 }; | |
40 typedef CXFA_NodeIteratorTemplate<CXFA_LayoutItem, | 36 typedef CXFA_NodeIteratorTemplate<CXFA_LayoutItem, |
41 CXFA_TraverseStrategy_LayoutItem> | 37 CXFA_TraverseStrategy_LayoutItem> |
42 CXFA_LayoutItemIterator; | 38 CXFA_LayoutItemIterator; |
43 class CXFA_FFPageWidgetIterator : public IXFA_WidgetIterator { | 39 class CXFA_FFPageWidgetIterator : public IXFA_WidgetIterator { |
44 public: | 40 public: |
45 CXFA_FFPageWidgetIterator(CXFA_FFPageView* pPageView, uint32_t dwFilter); | 41 CXFA_FFPageWidgetIterator(CXFA_FFPageView* pPageView, uint32_t dwFilter); |
46 virtual ~CXFA_FFPageWidgetIterator(); | 42 virtual ~CXFA_FFPageWidgetIterator(); |
47 | 43 |
48 void Release() override { delete this; } | 44 void Release() override { delete this; } |
49 | 45 |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
104 FX_BOOL bMarsterPage = FALSE); | 100 FX_BOOL bMarsterPage = FALSE); |
105 | 101 |
106 CXFA_WidgetArray m_TabOrderWidgetArray; | 102 CXFA_WidgetArray m_TabOrderWidgetArray; |
107 CXFA_FFPageView* m_pPageView; | 103 CXFA_FFPageView* m_pPageView; |
108 uint32_t m_dwFilter; | 104 uint32_t m_dwFilter; |
109 int32_t m_iCurWidget; | 105 int32_t m_iCurWidget; |
110 FX_BOOL m_bIgnorerelevant; | 106 FX_BOOL m_bIgnorerelevant; |
111 }; | 107 }; |
112 | 108 |
113 #endif // XFA_FXFA_INCLUDE_XFA_FFPAGEVIEW_H_ | 109 #endif // XFA_FXFA_INCLUDE_XFA_FFPAGEVIEW_H_ |
OLD | NEW |