1 | /* |
2 | * Copyright (C) 2019, Masamichi Hosoda <trueroad@trueroad.jp> |
3 | * Copyright (C) 2019, 2021, Albert Astals Cid <aacid@kde.org> |
4 | * Copyright (C) 2022, Oliver Sander <oliver.sander@tu-dresden.de> |
5 | * |
6 | * This program is free software; you can redistribute it and/or modify |
7 | * it under the terms of the GNU General Public License as published by |
8 | * the Free Software Foundation; either version 2, or (at your option) |
9 | * any later version. |
10 | * |
11 | * This program is distributed in the hope that it will be useful, |
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
14 | * GNU General Public License for more details. |
15 | * |
16 | * You should have received a copy of the GNU General Public License |
17 | * along with this program; if not, write to the Free Software |
18 | * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. |
19 | */ |
20 | |
21 | #ifndef POPPLER_DESTINATION_H |
22 | #define POPPLER_DESTINATION_H |
23 | |
24 | #include <memory> |
25 | #include "poppler-global.h" |
26 | |
27 | namespace poppler { |
28 | class destination_private; |
29 | |
30 | class POPPLER_CPP_EXPORT destination : public poppler::noncopyable |
31 | { |
32 | public: |
33 | enum type_enum |
34 | { |
35 | unknown, |
36 | xyz, |
37 | fit, |
38 | fit_h, |
39 | fit_v, |
40 | fit_r, |
41 | fit_b, |
42 | fit_b_h, |
43 | fit_b_v |
44 | }; |
45 | |
46 | ~destination(); |
47 | destination(destination &&other) noexcept; |
48 | |
49 | type_enum type() const; |
50 | int page_number() const; |
51 | double left() const; |
52 | double bottom() const; |
53 | double right() const; |
54 | double top() const; |
55 | double zoom() const; |
56 | bool is_change_left() const; |
57 | bool is_change_top() const; |
58 | bool is_change_zoom() const; |
59 | |
60 | destination &operator=(destination &&other) noexcept; |
61 | |
62 | private: |
63 | explicit destination(destination_private *dd); |
64 | |
65 | std::unique_ptr<destination_private> d; |
66 | friend class document; |
67 | }; |
68 | |
69 | } |
70 | |
71 | #endif |
72 | |