OutlineItemCollection.h
1 #pragma once
2 // Copyright (c) 2001-2024 Aspose Pty Ltd. All Rights Reserved.
3 //using System.Diagnostics.PerformanceData;
4 
5 #include <system/array.h>
6 #include <drawing/color.h>
7 
8 #include "Aspose.PDF.Cpp/Outlines/Outlines.h"
9 #include "Aspose.PDF.Cpp/aspose_pdf_api_defs.h"
10 
11 namespace Aspose
12 {
13 namespace Pdf
14 {
15 namespace Annotations
16 {
17 class IAppointment;
18 class PdfAction;
19 } // namespace Annotations
20 namespace Engine
21 {
22 namespace Data
23 {
24 class IPdfDictionary;
25 class IPdfObject;
26 class ITrailerable;
27 } // namespace Data
28 class IPdfDocument;
29 } // namespace Engine
30 namespace Facades
31 {
32 class Bookmark;
33 class PdfFileEditor;
34 } // namespace Facades
35 class OutlineCollection;
36 namespace Tests
37 {
38 namespace Facades
39 {
40 class PdfBookmarkEditorTests;
41 } // namespace Facades
42 class RegressionTests_v17_12;
43 class RegressionTests_v20_03;
44 class RegressionTests_v21_9;
45 class RegressionTests_v8_0;
46 } // namespace Tests
47 } // namespace Pdf
48 } // namespace Aspose
49 namespace System
50 {
51 namespace Collections
52 {
53 namespace Generic
54 {
55 template <typename> class IEnumerable;
56 template <typename> class IEnumerator;
57 } // namespace Generic
58 } // namespace Collections
59 } // namespace System
60 
61 namespace Aspose {
62 
63 namespace Pdf {
64 
68 class ASPOSE_PDF_SHARED_CLASS OutlineItemCollection final : public Aspose::Pdf::Outlines
69 {
72 
73  typedef ::System::BaseTypesInfo<BaseType> ThisTypeBaseTypesInfo;
74  ASPOSE_PDF_SHARED_RTTI_INFO_DECL();
75 
79  friend class Aspose::Pdf::OutlineCollection;
80  friend class Aspose::Pdf::OutlineCollection;
81  friend class Aspose::Pdf::Tests::RegressionTests_v8_0;
82  friend class Aspose::Pdf::Tests::RegressionTests_v17_12;
83  friend class Aspose::Pdf::Tests::RegressionTests_v20_03;
84  friend class Aspose::Pdf::Tests::RegressionTests_v21_9;
85  friend class Aspose::Pdf::Tests::Facades::PdfBookmarkEditorTests;
86 
87 public:
88 
92  ASPOSE_PDF_SHARED_API System::String get_Title();
96  ASPOSE_PDF_SHARED_API void set_Title(System::String value);
100  ASPOSE_PDF_SHARED_API System::SharedPtr<Annotations::IAppointment> get_Destination();
104  ASPOSE_PDF_SHARED_API void set_Destination(System::SharedPtr<Annotations::IAppointment> value);
108  ASPOSE_PDF_SHARED_API System::SharedPtr<Annotations::PdfAction> get_Action();
112  ASPOSE_PDF_SHARED_API void set_Action(System::SharedPtr<Annotations::PdfAction> value);
116  ASPOSE_PDF_SHARED_API System::Drawing::Color get_Color();
120  ASPOSE_PDF_SHARED_API void set_Color(System::Drawing::Color value);
124  ASPOSE_PDF_SHARED_API bool get_Italic();
128  ASPOSE_PDF_SHARED_API void set_Italic(bool value);
132  ASPOSE_PDF_SHARED_API bool get_Bold();
136  ASPOSE_PDF_SHARED_API void set_Bold(bool value);
140  ASPOSE_PDF_SHARED_API System::SharedPtr<OutlineItemCollection> get_First() const;
144  ASPOSE_PDF_SHARED_API System::SharedPtr<OutlineItemCollection> get_Last();
148  ASPOSE_PDF_SHARED_API System::SharedPtr<OutlineItemCollection> get_Prev();
152  ASPOSE_PDF_SHARED_API System::SharedPtr<OutlineItemCollection> get_Next();
156  ASPOSE_PDF_SHARED_API bool get_HasNext();
160  ASPOSE_PDF_SHARED_API System::SharedPtr<Outlines> get_Parent();
164  ASPOSE_PDF_SHARED_API int32_t get_VisibleCount() override;
168  ASPOSE_PDF_SHARED_API bool get_IsSynchronized();
172  ASPOSE_PDF_SHARED_API System::SharedPtr<System::Object> get_SyncRoot() const;
176  ASPOSE_PDF_SHARED_API bool get_IsReadOnly() const override;
180  ASPOSE_PDF_SHARED_API bool get_Open();
184  ASPOSE_PDF_SHARED_API void set_Open(bool value);
188  ASPOSE_PDF_SHARED_API int32_t get_Count() const override;
192  ASPOSE_PDF_SHARED_API int32_t get_Level();
193 
197  ASPOSE_PDF_SHARED_API void Delete();
198 
203  ASPOSE_PDF_SHARED_API OutlineItemCollection(System::SharedPtr<OutlineCollection> outlines);
204 
209  ASPOSE_PDF_SHARED_API void Delete(System::String name);
215  ASPOSE_PDF_SHARED_API void CopyTo(System::ArrayPtr<System::SharedPtr<OutlineItemCollection>> array, int32_t index) override;
233  ASPOSE_PDF_SHARED_API void Add(const System::SharedPtr<OutlineItemCollection>& outline) override;
239  ASPOSE_PDF_SHARED_API void Insert(int32_t index, System::SharedPtr<OutlineItemCollection> outline);
243  ASPOSE_PDF_SHARED_API void Clear() override;
249  ASPOSE_PDF_SHARED_API bool Contains(const System::SharedPtr<OutlineItemCollection>& item) const override;
255  ASPOSE_PDF_SHARED_API bool Remove(const System::SharedPtr<OutlineItemCollection>& item) override;
260  ASPOSE_PDF_SHARED_API void Remove(int32_t index);
261 
267  ASPOSE_PDF_SHARED_API System::SharedPtr<OutlineItemCollection> idx_get(int32_t index);
268 
269 protected:
270 
272 
274 
279 
280  ASPOSE_PDF_SHARED_API void UpdateVisibleCount() override;
281 
287 
288  MEMBER_FUNCTION_MAKE_OBJECT_DECLARATION(OutlineItemCollection, CODEPORTING_ARGS(System::SharedPtr<Engine::Data::IPdfObject> outline));
295  void SetParent(System::SharedPtr<OutlineCollection> parent);
296  void SetParent(System::SharedPtr<OutlineItemCollection> parent);
301  void setPrev(System::SharedPtr<OutlineItemCollection> prev);
312 
313  virtual ASPOSE_PDF_SHARED_API ~OutlineItemCollection();
314 
315 private:
316 
317  static const int32_t _Italic;
318  static const int32_t _Bold;
322  bool italic;
323  bool bold;
324  int32_t _increment;
326 
327  int32_t get_InnerCount() const;
328 
329  void Close(System::SharedPtr<OutlineItemCollection> outline);
330  int32_t CalculateVisibleCount();
336  int32_t Increment();
337  int32_t FindItem(System::SharedPtr<OutlineItemCollection> item) const;
339 
340 };
341 
342 } // namespace Pdf
343 } // namespace Aspose
344 
345 
String class used across the library. Is a substitute for C# System.String when translating code...
Definition: string.h:121
Represents document outline hierarchy.
Definition: OutlineCollection.h:50
Definition: Artifact.h:67
Represents outline entry in outline hierarchy of PDF document.
Definition: OutlineItemCollection.h:68
Definition: signed_info.h:13
Represents a bookmark.
Definition: Bookmark.h:39
System::SharedPtr< Engine::Data::IPdfObject > _engineObj
Internal engine object of outline entry.
Definition: OutlineItemCollection.h:278
Pointer class to wrap types being allocated on heap. Use it to manage memory for classes inheriting O...
Definition: fwd.h:22
System::SharedPtr< Engine::IPdfDocument > document
Definition: OutlineItemCollection.h:271
Definition: AFRelationship.h:4
Represents a color. This type should be allocated on stack and passed to functions by value or by ref...
Definition: color.h:23
Class describes collection of outlines.
Definition: Outlines.h:35
Implements operations with PDF file: concatenation, splitting, extracting pages, making booklet...
Definition: PdfFileEditor.h:105
Interface of object providing enumerator on contained elements.
Definition: Document.h:593
Whole PDF file will be submitted.