1 // Copyright 2016 PDFium Authors. All rights reserved. 2 // Use of this source code is governed by a BSD-style license that can be 3 // found in the LICENSE file. 4 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com 6 7 #ifndef CORE_FPDFDOC_CPDF_AACTION_H_ 8 #define CORE_FPDFDOC_CPDF_AACTION_H_ 9 10 #include "core/fpdfdoc/cpdf_action.h" 11 #include "core/fxcrt/retain_ptr.h" 12 13 class CPDF_Dictionary; 14 15 class CPDF_AAction { 16 public: 17 enum AActionType { 18 kCursorEnter = 0, 19 kCursorExit, 20 kButtonDown, 21 kButtonUp, 22 kGetFocus, 23 kLoseFocus, 24 kPageOpen, 25 kPageClose, 26 kPageVisible, 27 kPageInvisible, 28 kOpenPage, 29 kClosePage, 30 kKeyStroke, 31 kFormat, 32 kValidate, 33 kCalculate, 34 kCloseDocument, 35 kSaveDocument, 36 kDocumentSaved, 37 kPrintDocument, 38 kDocumentPrinted, 39 kDocumentOpen, 40 kNumberOfActions // Must be last. 41 }; 42 43 explicit CPDF_AAction(const CPDF_Dictionary* pDict); 44 CPDF_AAction(const CPDF_AAction& that); 45 ~CPDF_AAction(); 46 47 bool ActionExist(AActionType eType) const; 48 CPDF_Action GetAction(AActionType eType) const; GetDict()49 const CPDF_Dictionary* GetDict() const { return m_pDict.Get(); } 50 51 static bool IsUserClick(AActionType eType); 52 53 private: 54 RetainPtr<const CPDF_Dictionary> const m_pDict; 55 }; 56 57 #endif // CORE_FPDFDOC_CPDF_AACTION_H_ 58