1 /*
2  * Copyright (C) 2009-2010, Pino Toscano <pino@kde.org>
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation; either version 2, or (at your option)
7  * any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program; if not, write to the Free Software
16  * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
17  */
18 
19 #ifndef POPPLER_PAGE_H
20 #define POPPLER_PAGE_H
21 
22 #include "poppler-global.h"
23 #include "poppler-rectangle.h"
24 
25 namespace poppler
26 {
27 
28 class document;
29 class document_private;
30 class page_private;
31 class page_transition;
32 
33 class POPPLER_CPP_EXPORT page : public poppler::noncopyable
34 {
35 public:
36     enum orientation_enum {
37         landscape,
38         portrait,
39         seascape,
40         upside_down
41     };
42     enum search_direction_enum {
43         search_from_top,
44         search_next_result,
45         search_previous_result
46     };
47     enum text_layout_enum {
48         physical_layout,
49         raw_order_layout
50     };
51 
52     ~page();
53 
54     orientation_enum orientation() const;
55     double duration() const;
56     rectf page_rect(page_box_enum box = crop_box) const;
57     ustring label() const;
58 
59     page_transition* transition() const;
60 
61     bool search(const ustring &text, rectf &r, search_direction_enum direction,
62                 case_sensitivity_enum case_sensitivity, rotation_enum rotation = rotate_0) const;
63     ustring text(const rectf &rect = rectf()) const;
64     ustring text(const rectf &rect, text_layout_enum layout_mode) const;
65 
66 private:
67     page(document_private *doc, int index);
68 
69     page_private *d;
70     friend class page_private;
71     friend class document;
72 };
73 
74 }
75 
76 #endif
77