| 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_INCLUDE_FXFA_XFA_FFWIDGETHANDLER_H_ | 7 #ifndef XFA_INCLUDE_FXFA_XFA_FFWIDGETHANDLER_H_ |
| 8 #define XFA_INCLUDE_FXFA_XFA_FFWIDGETHANDLER_H_ | 8 #define XFA_INCLUDE_FXFA_XFA_FFWIDGETHANDLER_H_ |
| 9 | 9 |
| 10 #include <vector> | 10 #include <vector> |
| 11 | 11 |
| 12 #include "xfa/fxfa/parser/xfa_document.h" | 12 #include "xfa/fxfa/parser/xfa_document.h" |
| 13 #include "xfa/include/fxfa/fxfa.h" | 13 #include "xfa/include/fxfa/fxfa.h" |
| 14 | 14 |
| 15 class CXFA_FFDocView; | 15 class CXFA_FFDocView; |
| 16 | 16 |
| 17 class CXFA_FFWidgetHandler { | 17 class CXFA_FFWidgetHandler { |
| 18 public: | 18 public: |
| 19 CXFA_FFWidgetHandler(CXFA_FFDocView* pDocView); | 19 CXFA_FFWidgetHandler(CXFA_FFDocView* pDocView); |
| 20 ~CXFA_FFWidgetHandler(); | 20 ~CXFA_FFWidgetHandler(); |
| 21 |
| 21 CXFA_FFWidget* CreateWidget(CXFA_FFWidget* hParent, | 22 CXFA_FFWidget* CreateWidget(CXFA_FFWidget* hParent, |
| 22 XFA_WIDGETTYPE eType, | 23 XFA_WIDGETTYPE eType, |
| 23 CXFA_FFWidget* hBefore = NULL); | 24 CXFA_FFWidget* hBefore = NULL); |
| 24 CXFA_FFPageView* GetPageView(CXFA_FFWidget* hWidget); | 25 |
| 25 void GetRect(CXFA_FFWidget* hWidget, CFX_RectF& rt); | |
| 26 uint32_t GetStatus(CXFA_FFWidget* hWidget); | |
| 27 FX_BOOL GetBBox(CXFA_FFWidget* hWidget, | |
| 28 CFX_RectF& rtBox, | |
| 29 uint32_t dwStatus, | |
| 30 FX_BOOL bDrawFocus = FALSE); | |
| 31 CXFA_WidgetAcc* GetDataAcc(CXFA_FFWidget* hWidget); | |
| 32 void GetName(CXFA_FFWidget* hWidget, | |
| 33 CFX_WideString& wsName, | |
| 34 int32_t iNameType = 0); | |
| 35 FX_BOOL GetToolTip(CXFA_FFWidget* hWidget, CFX_WideString& wsToolTip); | |
| 36 void SetPrivateData(CXFA_FFWidget* hWidget, | |
| 37 void* module_id, | |
| 38 void* pData, | |
| 39 PD_CALLBACK_FREEDATA callback); | |
| 40 void* GetPrivateData(CXFA_FFWidget* hWidget, void* module_id); | |
| 41 FX_BOOL OnMouseEnter(CXFA_FFWidget* hWidget); | 26 FX_BOOL OnMouseEnter(CXFA_FFWidget* hWidget); |
| 42 FX_BOOL OnMouseExit(CXFA_FFWidget* hWidget); | 27 FX_BOOL OnMouseExit(CXFA_FFWidget* hWidget); |
| 43 FX_BOOL OnLButtonDown(CXFA_FFWidget* hWidget, | 28 FX_BOOL OnLButtonDown(CXFA_FFWidget* hWidget, |
| 44 uint32_t dwFlags, | 29 uint32_t dwFlags, |
| 45 FX_FLOAT fx, | 30 FX_FLOAT fx, |
| 46 FX_FLOAT fy); | 31 FX_FLOAT fy); |
| 47 FX_BOOL OnLButtonUp(CXFA_FFWidget* hWidget, | 32 FX_BOOL OnLButtonUp(CXFA_FFWidget* hWidget, |
| 48 uint32_t dwFlags, | 33 uint32_t dwFlags, |
| 49 FX_FLOAT fx, | 34 FX_FLOAT fx, |
| 50 FX_FLOAT fy); | 35 FX_FLOAT fy); |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 132 CXFA_Node* CreateMarginNode(CXFA_Node* pParent, | 117 CXFA_Node* CreateMarginNode(CXFA_Node* pParent, |
| 133 uint32_t dwFlags, | 118 uint32_t dwFlags, |
| 134 FX_FLOAT fInsets[4]) const; | 119 FX_FLOAT fInsets[4]) const; |
| 135 CXFA_Node* CreateValueNode(XFA_ELEMENT eValue, CXFA_Node* pParent) const; | 120 CXFA_Node* CreateValueNode(XFA_ELEMENT eValue, CXFA_Node* pParent) const; |
| 136 CXFA_Document* GetObjFactory() const; | 121 CXFA_Document* GetObjFactory() const; |
| 137 CXFA_Document* GetXFADoc() const; | 122 CXFA_Document* GetXFADoc() const; |
| 138 | 123 |
| 139 CXFA_FFDocView* m_pDocView; | 124 CXFA_FFDocView* m_pDocView; |
| 140 }; | 125 }; |
| 141 | 126 |
| 142 class CXFA_FFMenuHandler { | |
| 143 public: | |
| 144 CXFA_FFMenuHandler(); | |
| 145 ~CXFA_FFMenuHandler(); | |
| 146 | |
| 147 FX_BOOL CanCopy(CXFA_FFWidget* hWidget); | |
| 148 FX_BOOL CanCut(CXFA_FFWidget* hWidget); | |
| 149 FX_BOOL CanPaste(CXFA_FFWidget* hWidget); | |
| 150 FX_BOOL CanSelectAll(CXFA_FFWidget* hWidget); | |
| 151 FX_BOOL CanDelete(CXFA_FFWidget* hWidget); | |
| 152 FX_BOOL CanDeSelect(CXFA_FFWidget* hWidget); | |
| 153 FX_BOOL Copy(CXFA_FFWidget* hWidget, CFX_WideString& wsText); | |
| 154 FX_BOOL Cut(CXFA_FFWidget* hWidget, CFX_WideString& wsText); | |
| 155 FX_BOOL Paste(CXFA_FFWidget* hWidget, const CFX_WideString& wsText); | |
| 156 FX_BOOL SelectAll(CXFA_FFWidget* hWidget); | |
| 157 FX_BOOL Delete(CXFA_FFWidget* hWidget); | |
| 158 FX_BOOL DeSelect(CXFA_FFWidget* hWidget); | |
| 159 FX_BOOL CanUndo(CXFA_FFWidget* hWidget); | |
| 160 FX_BOOL CanRedo(CXFA_FFWidget* hWidget); | |
| 161 FX_BOOL Undo(CXFA_FFWidget* hWidget); | |
| 162 FX_BOOL Redo(CXFA_FFWidget* hWidget); | |
| 163 FX_BOOL GetSuggestWords(CXFA_FFWidget* hWidget, | |
| 164 CFX_PointF pointf, | |
| 165 std::vector<CFX_ByteString>& sSuggest); | |
| 166 FX_BOOL ReplaceSpellCheckWord(CXFA_FFWidget* hWidget, | |
| 167 CFX_PointF pointf, | |
| 168 const CFX_ByteStringC& bsReplace); | |
| 169 }; | |
| 170 | |
| 171 #endif // XFA_INCLUDE_FXFA_XFA_FFWIDGETHANDLER_H_ | 127 #endif // XFA_INCLUDE_FXFA_XFA_FFWIDGETHANDLER_H_ |
| OLD | NEW |