1 // Copyright 2016 The PDFium Authors 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_PAGELABEL_H_ 8 #define CORE_FPDFDOC_CPDF_PAGELABEL_H_ 9 10 #include <optional> 11 12 #include "core/fxcrt/unowned_ptr.h" 13 #include "core/fxcrt/widestring.h" 14 15 class CPDF_Document; 16 17 class CPDF_PageLabel { 18 public: 19 explicit CPDF_PageLabel(CPDF_Document* doc); 20 ~CPDF_PageLabel(); 21 22 std::optional<WideString> GetLabel(int page_index) const; 23 24 private: 25 UnownedPtr<CPDF_Document> const doc_; 26 }; 27 28 #endif // CORE_FPDFDOC_CPDF_PAGELABEL_H_ 29