diff options
author | thestig <thestig@chromium.org> | 2016-04-13 13:18:21 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-04-13 13:18:21 -0700 |
commit | 9f3dbbc54c6981f069b57e6714393ac6c0c64231 (patch) | |
tree | 9f76b6cee117e34a737bd46f146356931786d3cc /xfa/fxfa/include | |
parent | f063abf4d50ab466080714df584660854ceb8709 (diff) | |
download | pdfium-9f3dbbc54c6981f069b57e6714393ac6c0c64231.tar.xz |
Cleanup CPDFXFA_Page.
- Use std::unique_ptr.
- Make dtor protected.
- Simplify logic.
- Remove unused bits from CXFA_FFPageView as well.
Review URL: https://codereview.chromium.org/1878963004
Diffstat (limited to 'xfa/fxfa/include')
-rw-r--r-- | xfa/fxfa/include/xfa_ffpageview.h | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/xfa/fxfa/include/xfa_ffpageview.h b/xfa/fxfa/include/xfa_ffpageview.h index 56d1a7312c..dcac3f1106 100644 --- a/xfa/fxfa/include/xfa_ffpageview.h +++ b/xfa/fxfa/include/xfa_ffpageview.h @@ -11,32 +11,28 @@ class CXFA_FFWidget; class CXFA_FFDocView; + class CXFA_FFPageView : public CXFA_ContainerLayoutItem { public: CXFA_FFPageView(CXFA_FFDocView* pDocView, CXFA_Node* pPageArea); ~CXFA_FFPageView() override; - CXFA_FFDocView* GetDocView(); - int32_t GetPageViewIndex(); - void GetPageViewRect(CFX_RectF& rtPage); + CXFA_FFDocView* GetDocView() const; + int32_t GetPageViewIndex() const; + void GetPageViewRect(CFX_RectF& rtPage) const; void GetDisplayMatrix(CFX_Matrix& mt, const CFX_Rect& rtDisp, - int32_t iRotate); - int32_t LoadPageView(IFX_Pause* pPause = NULL); - void UnloadPageView(); - CXFA_FFWidget* GetWidgetByPos(FX_FLOAT fx, FX_FLOAT fy); + int32_t iRotate) const; IXFA_WidgetIterator* CreateWidgetIterator( uint32_t dwTraverseWay = XFA_TRAVERSEWAY_Form, uint32_t dwWidgetFilter = XFA_WIDGETFILTER_Visible | XFA_WIDGETFILTER_Viewable | XFA_WIDGETFILTER_AllType); - FX_BOOL IsPageViewLoaded(); - protected: - CXFA_FFDocView* m_pDocView; - FX_BOOL m_bLoaded; + CXFA_FFDocView* const m_pDocView; }; + typedef CXFA_NodeIteratorTemplate<CXFA_LayoutItem, CXFA_TraverseStrategy_LayoutItem> CXFA_LayoutItemIterator; |