~ubuntu-branches/ubuntu/vivid/fbreader/vivid-proposed

« back to all changes in this revision

Viewing changes to fbreader/src/fbreader/BookTextView.h

  • Committer: Bazaar Package Importer
  • Author(s): Joey Hess
  • Date: 2008-01-23 16:51:07 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20080123165107-5q19etahzd72c33a
Tags: 0.8.12-3
* Add libzlui-maemo which allows using fbreader on the maemo platform, on
  Debian. Thanks, Riku Voipio. Closes: #462299
* makefiles/arch/maemo.mk: Don't build with -thumb. (Riku)
* Loosen dependency versions some more, so it only depends on the current
  upstream version or higher, ignoring the Debian revision.
* Use binary:Version instead of deprecated Source-Version.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*
2
 
 * FBReader -- electronic book reader
3
 
 * Copyright (C) 2004-2007 Nikolay Pultsin <geometer@mawhrin.net>
4
 
 * Copyright (C) 2005 Mikhail Sobolev <mss@mawhrin.net>
 
2
 * Copyright (C) 2004-2008 Geometer Plus <contact@geometerplus.com>
5
3
 *
6
4
 * This program is free software; you can redistribute it and/or modify
7
5
 * it under the terms of the GNU General Public License as published by
37
35
        BookTextView(FBReader &reader, shared_ptr<ZLPaintContext> context);
38
36
        ~BookTextView();
39
37
 
40
 
        void setModel(shared_ptr<ZLTextModel> model, const std::string &name);
 
38
        void setModel(shared_ptr<ZLTextModel> model, const std::string &fileName);
41
39
        void setContentsModel(shared_ptr<ZLTextModel> contentsModel);
42
40
        void saveState();
43
41
 
47
45
        bool canRedoPageMove();
48
46
        void redoPageMove();
49
47
 
 
48
        void scrollToHome();
 
49
 
50
50
        bool _onStylusPress(int x, int y);
51
51
        bool onStylusMove(int x, int y);
52
52
 
53
53
private:
54
 
        void pushCurrentPositionIntoStack();
 
54
        typedef std::pair<int,int> Position;
 
55
        Position cursorPosition(const ZLTextWordCursor &cursor) const;
 
56
        bool pushCurrentPositionIntoStack(bool doPushSamePosition = true);
55
57
        void replaceCurrentPositionInStack();
56
58
 
57
59
        void preparePaintInfo();
75
77
private:
76
78
        shared_ptr<ZLTextModel> myContentsModel;
77
79
 
78
 
        typedef std::pair<int,int> Position;
 
80
        std::string myFileName;
 
81
 
79
82
        typedef std::deque<Position> PositionStack;
80
83
        PositionStack myPositionStack;
81
84
        unsigned int myCurrentPointInStack;