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

Side by Side Diff: xfa/include/fxfa/xfa_ffpageview.h

Issue 1846993002: Remove IXFA_* interfaces. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 4 years, 8 months 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
« no previous file with comments | « xfa/include/fxfa/xfa_ffdocview.h ('k') | xfa/include/fxfa/xfa_ffwidgethandler.h » ('j') | 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 #ifndef XFA_FXFA_APP_XFA_FFPAGEVIEW_H_ 7 #ifndef XFA_INCLUDE_FXFA_XFA_FFPAGEVIEW_H_
8 #define XFA_FXFA_APP_XFA_FFPAGEVIEW_H_ 8 #define XFA_INCLUDE_FXFA_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 class CXFA_FFPageView : public CXFA_ContainerLayoutItem, public IXFA_PageView { 14 class CXFA_FFPageView : public CXFA_ContainerLayoutItem {
15 public: 15 public:
16 CXFA_FFPageView(CXFA_FFDocView* pDocView, CXFA_Node* pPageArea); 16 CXFA_FFPageView(CXFA_FFDocView* pDocView, CXFA_Node* pPageArea);
17 ~CXFA_FFPageView() override; 17 ~CXFA_FFPageView() override;
18 18
19 // IFXA_PageView: 19 CXFA_FFDocView* GetDocView();
20 IXFA_DocView* GetDocView() override; 20 int32_t GetPageViewIndex();
21 int32_t GetPageViewIndex() override; 21 void GetPageViewRect(CFX_RectF& rtPage);
22 void GetPageViewRect(CFX_RectF& rtPage) override;
23 void GetDisplayMatrix(CFX_Matrix& mt, 22 void GetDisplayMatrix(CFX_Matrix& mt,
24 const CFX_Rect& rtDisp, 23 const CFX_Rect& rtDisp,
25 int32_t iRotate) override; 24 int32_t iRotate);
26 int32_t LoadPageView(IFX_Pause* pPause = NULL) override; 25 int32_t LoadPageView(IFX_Pause* pPause = NULL);
27 void UnloadPageView() override; 26 void UnloadPageView();
28 IXFA_Widget* GetWidgetByPos(FX_FLOAT fx, FX_FLOAT fy) override; 27 CXFA_FFWidget* GetWidgetByPos(FX_FLOAT fx, FX_FLOAT fy);
29 IXFA_WidgetIterator* CreateWidgetIterator( 28 IXFA_WidgetIterator* CreateWidgetIterator(
30 uint32_t dwTraverseWay = XFA_TRAVERSEWAY_Form, 29 uint32_t dwTraverseWay = XFA_TRAVERSEWAY_Form,
31 uint32_t dwWidgetFilter = XFA_WIDGETFILTER_Visible | 30 uint32_t dwWidgetFilter = XFA_WIDGETFILTER_Visible |
32 XFA_WIDGETFILTER_Viewable | 31 XFA_WIDGETFILTER_Viewable |
33 XFA_WIDGETFILTER_AllType) override; 32 XFA_WIDGETFILTER_AllType);
34 33
35 FX_BOOL IsPageViewLoaded(); 34 FX_BOOL IsPageViewLoaded();
36 35
37 protected: 36 protected:
38 CXFA_FFDocView* m_pDocView; 37 CXFA_FFDocView* m_pDocView;
39 FX_BOOL m_bLoaded; 38 FX_BOOL m_bLoaded;
40 }; 39 };
41 typedef CXFA_NodeIteratorTemplate<CXFA_LayoutItem, 40 typedef CXFA_NodeIteratorTemplate<CXFA_LayoutItem,
42 CXFA_TraverseStrategy_LayoutItem> 41 CXFA_TraverseStrategy_LayoutItem>
43 CXFA_LayoutItemIterator; 42 CXFA_LayoutItemIterator;
44 class CXFA_FFPageWidgetIterator : public IXFA_WidgetIterator { 43 class CXFA_FFPageWidgetIterator : public IXFA_WidgetIterator {
45 public: 44 public:
46 CXFA_FFPageWidgetIterator(CXFA_FFPageView* pPageView, uint32_t dwFilter); 45 CXFA_FFPageWidgetIterator(CXFA_FFPageView* pPageView, uint32_t dwFilter);
47 virtual ~CXFA_FFPageWidgetIterator(); 46 virtual ~CXFA_FFPageWidgetIterator();
48 virtual void Release() { delete this; }
49 47
50 virtual void Reset(); 48 void Release() override { delete this; }
51 virtual IXFA_Widget* MoveToFirst(); 49
52 virtual IXFA_Widget* MoveToLast(); 50 void Reset() override;
53 virtual IXFA_Widget* MoveToNext(); 51 CXFA_FFWidget* MoveToFirst() override;
54 virtual IXFA_Widget* MoveToPrevious(); 52 CXFA_FFWidget* MoveToLast() override;
55 virtual IXFA_Widget* GetCurrentWidget(); 53 CXFA_FFWidget* MoveToNext() override;
56 virtual FX_BOOL SetCurrentWidget(IXFA_Widget* hWidget); 54 CXFA_FFWidget* MoveToPrevious() override;
55 CXFA_FFWidget* GetCurrentWidget() override;
56 FX_BOOL SetCurrentWidget(CXFA_FFWidget* hWidget) override;
57 57
58 protected: 58 protected:
59 IXFA_Widget* GetWidget(CXFA_LayoutItem* pLayoutItem); 59 CXFA_FFWidget* GetWidget(CXFA_LayoutItem* pLayoutItem);
60
60 CXFA_FFPageView* m_pPageView; 61 CXFA_FFPageView* m_pPageView;
61 IXFA_Widget* m_hCurWidget; 62 CXFA_FFWidget* m_hCurWidget;
62 uint32_t m_dwFilter; 63 uint32_t m_dwFilter;
63 FX_BOOL m_bIgnorerelevant; 64 FX_BOOL m_bIgnorerelevant;
64 CXFA_LayoutItemIterator m_sIterator; 65 CXFA_LayoutItemIterator m_sIterator;
65 }; 66 };
66 typedef CFX_ArrayTemplate<CXFA_FFWidget*> CXFA_WidgetArray; 67 typedef CFX_ArrayTemplate<CXFA_FFWidget*> CXFA_WidgetArray;
67 class CXFA_TabParam { 68 class CXFA_TabParam {
68 public: 69 public:
69 CXFA_TabParam() : m_pWidget(NULL) {} 70 CXFA_TabParam() : m_pWidget(NULL) {}
70 ~CXFA_TabParam() {} 71 ~CXFA_TabParam() {}
71 72
72 CXFA_FFWidget* m_pWidget; 73 CXFA_FFWidget* m_pWidget;
73 CXFA_WidgetArray m_Children; 74 CXFA_WidgetArray m_Children;
74 }; 75 };
75 class CXFA_FFTabOrderPageWidgetIterator : public IXFA_WidgetIterator { 76 class CXFA_FFTabOrderPageWidgetIterator : public IXFA_WidgetIterator {
76 public: 77 public:
77 CXFA_FFTabOrderPageWidgetIterator(CXFA_FFPageView* pPageView, 78 CXFA_FFTabOrderPageWidgetIterator(CXFA_FFPageView* pPageView,
78 uint32_t dwFilter); 79 uint32_t dwFilter);
79 virtual ~CXFA_FFTabOrderPageWidgetIterator(); 80 virtual ~CXFA_FFTabOrderPageWidgetIterator();
80 81
81 virtual void Release(); 82 void Release() override;
82 83
83 virtual void Reset(); 84 void Reset() override;
84 virtual IXFA_Widget* MoveToFirst(); 85 CXFA_FFWidget* MoveToFirst() override;
85 virtual IXFA_Widget* MoveToLast(); 86 CXFA_FFWidget* MoveToLast() override;
86 virtual IXFA_Widget* MoveToNext(); 87 CXFA_FFWidget* MoveToNext() override;
87 virtual IXFA_Widget* MoveToPrevious(); 88 CXFA_FFWidget* MoveToPrevious() override;
88 virtual IXFA_Widget* GetCurrentWidget(); 89 CXFA_FFWidget* GetCurrentWidget() override;
89 virtual FX_BOOL SetCurrentWidget(IXFA_Widget* hWidget); 90 FX_BOOL SetCurrentWidget(CXFA_FFWidget* hWidget) override;
90 91
91 protected: 92 protected:
92 CXFA_WidgetArray m_TabOrderWidgetArray;
93 CXFA_FFPageView* m_pPageView;
94 uint32_t m_dwFilter;
95 int32_t m_iCurWidget;
96 FX_BOOL m_bIgnorerelevant;
97 CXFA_FFWidget* GetTraverseWidget(CXFA_FFWidget* pWidget); 93 CXFA_FFWidget* GetTraverseWidget(CXFA_FFWidget* pWidget);
98 CXFA_FFWidget* FindWidgetByName(const CFX_WideStringC& wsWidgetName, 94 CXFA_FFWidget* FindWidgetByName(const CFX_WideStringC& wsWidgetName,
99 CXFA_FFWidget* pRefWidget); 95 CXFA_FFWidget* pRefWidget);
100 void CreateTabOrderWidgetArray(); 96 void CreateTabOrderWidgetArray();
101 void CreateSpaceOrderWidgetArray(CXFA_WidgetArray& WidgetArray); 97 void CreateSpaceOrderWidgetArray(CXFA_WidgetArray& WidgetArray);
102 CXFA_FFWidget* GetWidget(CXFA_LayoutItem* pLayoutItem); 98 CXFA_FFWidget* GetWidget(CXFA_LayoutItem* pLayoutItem);
103 void OrderContainer(CXFA_LayoutItemIterator* sIterator, 99 void OrderContainer(CXFA_LayoutItemIterator* sIterator,
104 CXFA_LayoutItem* pContainerItem, 100 CXFA_LayoutItem* pContainerItem,
105 CXFA_TabParam* pContainer, 101 CXFA_TabParam* pContainer,
106 FX_BOOL& bCurrentItem, 102 FX_BOOL& bCurrentItem,
107 FX_BOOL& bContentArea, 103 FX_BOOL& bContentArea,
108 FX_BOOL bMarsterPage = FALSE); 104 FX_BOOL bMarsterPage = FALSE);
105
106 CXFA_WidgetArray m_TabOrderWidgetArray;
107 CXFA_FFPageView* m_pPageView;
108 uint32_t m_dwFilter;
109 int32_t m_iCurWidget;
110 FX_BOOL m_bIgnorerelevant;
109 }; 111 };
110 112
111 #endif // XFA_FXFA_APP_XFA_FFPAGEVIEW_H_ 113 #endif // XFA_INCLUDE_FXFA_XFA_FFPAGEVIEW_H_
OLDNEW
« no previous file with comments | « xfa/include/fxfa/xfa_ffdocview.h ('k') | xfa/include/fxfa/xfa_ffwidgethandler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698