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 12 class CPDF_Dictionary; 13 14 class CPDF_AAction { 15 public: 16 enum AActionType { 17 CursorEnter = 0, 18 CursorExit, 19 ButtonDown, 20 ButtonUp, 21 GetFocus, 22 LoseFocus, 23 PageOpen, 24 PageClose, 25 PageVisible, 26 PageInvisible, 27 OpenPage, 28 ClosePage, 29 KeyStroke, 30 Format, 31 Validate, 32 Calculate, 33 CloseDocument, 34 SaveDocument, 35 DocumentSaved, 36 PrintDocument, 37 DocumentPrinted 38 }; 39 CPDF_AAction()40 CPDF_AAction() : m_pDict(nullptr) {} CPDF_AAction(CPDF_Dictionary * pDict)41 explicit CPDF_AAction(CPDF_Dictionary* pDict) : m_pDict(pDict) {} 42 43 bool ActionExist(AActionType eType) const; 44 CPDF_Action GetAction(AActionType eType) const; GetDict()45 CPDF_Dictionary* GetDict() const { return m_pDict; } 46 47 private: 48 CPDF_Dictionary* const m_pDict; 49 }; 50 51 #endif // CORE_FPDFDOC_CPDF_AACTION_H_ 52