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 NumberOfActions // Must be last. 39 }; 40 41 explicit CPDF_AAction(CPDF_Dictionary* pDict); 42 CPDF_AAction(const CPDF_AAction& that); 43 ~CPDF_AAction(); 44 45 bool ActionExist(AActionType eType) const; 46 CPDF_Action GetAction(AActionType eType) const; GetDict()47 CPDF_Dictionary* GetDict() const { return m_pDict.Get(); } 48 49 private: 50 UnownedPtr<CPDF_Dictionary> const m_pDict; 51 }; 52 53 #endif // CORE_FPDFDOC_CPDF_AACTION_H_ 54