-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathbkdjvu.h
95 lines (74 loc) · 2.39 KB
/
bkdjvu.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
/*
* bkdjvu: djvu extension for bookr
* Copyright (C) 2007 Yang.Hu (findreams at gmail dot com)
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifndef BKDJVU_H
#define BKDJVU_H
#include <string>
#include "fzscreen.h"
#include "fzfont.h"
using namespace std;
#include "bkdocument.h"
struct DJVUContext;
class BKDJVU : public BKDocument {
DJVUContext* ctx;
string fileName;
int panX;
int panY;
bool loadNewPage;
bool pageError;
void panBuffer(int nx, int ny);
void clipCoords(float& nx, float& ny);
void redrawBuffer();
int prePan(int x, int y);
string title;
protected:
BKDJVU(string& f);
~BKDJVU();
public:
virtual int updateContent();
virtual int resume();
virtual void renderContent();
virtual void getFileName(string&);
virtual void getTitle(string&);
virtual void getType(string&);
virtual bool isPaginated();
virtual int getTotalPages();
virtual int getCurrentPage();
virtual int setCurrentPage(int);
virtual bool isZoomable();
virtual void getZoomLevels(vector<BKDocument::ZoomLevel>& v);
virtual int getCurrentZoomLevel();
virtual int setZoomLevel(int);
virtual bool hasZoomToFit();
virtual int setZoomToFitWidth();
virtual int setZoomToFitHeight();
virtual int pan(int, int);
virtual int screenUp();
virtual int screenDown();
virtual int screenLeft();
virtual int screenRight();
virtual bool isRotable();
virtual int getRotation();
virtual int setRotation(int, bool bForce=false);
virtual bool isBookmarkable();
virtual void getBookmarkPosition(map<string, int>&);
virtual int setBookmarkPosition(map<string, int>&);
static BKDJVU* create(string& file);
static bool isDJVU(string& file);
};
#endif