OLD | NEW |
1 // Copyright 2014 PDFium Authors. All rights reserved. | 1 // Copyrig 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_XFA_FFPAGEVIEW_H_ | 7 #ifndef XFA_FXFA_XFA_FFPAGEVIEW_H_ |
8 #define XFA_FXFA_XFA_FFPAGEVIEW_H_ | 8 #define XFA_FXFA_XFA_FFPAGEVIEW_H_ |
9 | 9 |
| 10 #include <vector> |
| 11 |
10 #include "xfa/fxfa/parser/cxfa_containerlayoutitem.h" | 12 #include "xfa/fxfa/parser/cxfa_containerlayoutitem.h" |
11 #include "xfa/fxfa/parser/cxfa_contentlayoutitem.h" | 13 #include "xfa/fxfa/parser/cxfa_contentlayoutitem.h" |
12 #include "xfa/fxfa/parser/cxfa_traversestrategy_layoutitem.h" | 14 #include "xfa/fxfa/parser/cxfa_traversestrategy_layoutitem.h" |
13 | 15 |
14 class CXFA_FFWidget; | 16 class CXFA_FFWidget; |
15 class CXFA_FFDocView; | 17 class CXFA_FFDocView; |
16 | 18 |
17 class CXFA_FFPageView : public CXFA_ContainerLayoutItem { | 19 class CXFA_FFPageView : public CXFA_ContainerLayoutItem { |
18 public: | 20 public: |
19 CXFA_FFPageView(CXFA_FFDocView* pDocView, CXFA_Node* pPageArea); | 21 CXFA_FFPageView(CXFA_FFDocView* pDocView, CXFA_Node* pPageArea); |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
52 | 54 |
53 protected: | 55 protected: |
54 CXFA_FFWidget* GetWidget(CXFA_LayoutItem* pLayoutItem); | 56 CXFA_FFWidget* GetWidget(CXFA_LayoutItem* pLayoutItem); |
55 | 57 |
56 CXFA_FFPageView* m_pPageView; | 58 CXFA_FFPageView* m_pPageView; |
57 CXFA_FFWidget* m_hCurWidget; | 59 CXFA_FFWidget* m_hCurWidget; |
58 uint32_t m_dwFilter; | 60 uint32_t m_dwFilter; |
59 bool m_bIgnorerelevant; | 61 bool m_bIgnorerelevant; |
60 CXFA_LayoutItemIterator m_sIterator; | 62 CXFA_LayoutItemIterator m_sIterator; |
61 }; | 63 }; |
62 typedef CFX_ArrayTemplate<CXFA_FFWidget*> CXFA_WidgetArray; | |
63 | 64 |
64 class CXFA_TabParam { | 65 class CXFA_TabParam { |
65 public: | 66 public: |
66 CXFA_TabParam(); | 67 CXFA_TabParam(); |
67 ~CXFA_TabParam(); | 68 ~CXFA_TabParam(); |
68 | 69 |
69 CXFA_FFWidget* m_pWidget; | 70 CXFA_FFWidget* m_pWidget; |
70 CXFA_WidgetArray m_Children; | 71 std::vector<CXFA_FFWidget*> m_Children; |
71 }; | 72 }; |
72 | 73 |
73 class CXFA_FFTabOrderPageWidgetIterator : public IXFA_WidgetIterator { | 74 class CXFA_FFTabOrderPageWidgetIterator : public IXFA_WidgetIterator { |
74 public: | 75 public: |
75 CXFA_FFTabOrderPageWidgetIterator(CXFA_FFPageView* pPageView, | 76 CXFA_FFTabOrderPageWidgetIterator(CXFA_FFPageView* pPageView, |
76 uint32_t dwFilter); | 77 uint32_t dwFilter); |
77 ~CXFA_FFTabOrderPageWidgetIterator() override; | 78 ~CXFA_FFTabOrderPageWidgetIterator() override; |
78 | 79 |
79 void Reset() override; | 80 void Reset() override; |
80 CXFA_FFWidget* MoveToFirst() override; | 81 CXFA_FFWidget* MoveToFirst() override; |
81 CXFA_FFWidget* MoveToLast() override; | 82 CXFA_FFWidget* MoveToLast() override; |
82 CXFA_FFWidget* MoveToNext() override; | 83 CXFA_FFWidget* MoveToNext() override; |
83 CXFA_FFWidget* MoveToPrevious() override; | 84 CXFA_FFWidget* MoveToPrevious() override; |
84 CXFA_FFWidget* GetCurrentWidget() override; | 85 CXFA_FFWidget* GetCurrentWidget() override; |
85 bool SetCurrentWidget(CXFA_FFWidget* hWidget) override; | 86 bool SetCurrentWidget(CXFA_FFWidget* hWidget) override; |
86 | 87 |
87 protected: | 88 protected: |
88 CXFA_FFWidget* GetTraverseWidget(CXFA_FFWidget* pWidget); | 89 CXFA_FFWidget* GetTraverseWidget(CXFA_FFWidget* pWidget); |
89 CXFA_FFWidget* FindWidgetByName(const CFX_WideString& wsWidgetName, | 90 CXFA_FFWidget* FindWidgetByName(const CFX_WideString& wsWidgetName, |
90 CXFA_FFWidget* pRefWidget); | 91 CXFA_FFWidget* pRefWidget); |
91 void CreateTabOrderWidgetArray(); | 92 void CreateTabOrderWidgetArray(); |
92 void CreateSpaceOrderWidgetArray(CXFA_WidgetArray& WidgetArray); | 93 void CreateSpaceOrderWidgetArray(std::vector<CXFA_FFWidget*>* WidgetArray); |
93 CXFA_FFWidget* GetWidget(CXFA_LayoutItem* pLayoutItem); | 94 CXFA_FFWidget* GetWidget(CXFA_LayoutItem* pLayoutItem); |
94 void OrderContainer(CXFA_LayoutItemIterator* sIterator, | 95 void OrderContainer(CXFA_LayoutItemIterator* sIterator, |
95 CXFA_LayoutItem* pContainerItem, | 96 CXFA_LayoutItem* pContainerItem, |
96 CXFA_TabParam* pContainer, | 97 CXFA_TabParam* pContainer, |
97 bool& bCurrentItem, | 98 bool& bCurrentItem, |
98 bool& bContentArea, | 99 bool& bContentArea, |
99 bool bMarsterPage = false); | 100 bool bMarsterPage = false); |
100 | 101 |
101 CXFA_WidgetArray m_TabOrderWidgetArray; | 102 std::vector<CXFA_FFWidget*> m_TabOrderWidgetArray; |
102 CXFA_FFPageView* m_pPageView; | 103 CXFA_FFPageView* m_pPageView; |
103 uint32_t m_dwFilter; | 104 uint32_t m_dwFilter; |
104 int32_t m_iCurWidget; | 105 int32_t m_iCurWidget; |
105 bool m_bIgnorerelevant; | 106 bool m_bIgnorerelevant; |
106 }; | 107 }; |
107 | 108 |
108 #endif // XFA_FXFA_XFA_FFPAGEVIEW_H_ | 109 #endif // XFA_FXFA_XFA_FFPAGEVIEW_H_ |
OLD | NEW |