root/trunk/tests/DumbDocumentObserver.h

Revision 156, 2.7 kB (checked in by jordi, 2 years ago)

The FindPter? can now search new matches in forward directions (i.e., Find Next.)

Line 
1// ePDFView - Dumb Test Document Observer.
2// Copyright (C) 2006 Emma's Software.
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 of the License, or
7// (at your option) 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., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
17
18#if !defined (__DUMB_DOCUMENT_OBSERVER_H__)
19#define __DUMB_DOCUMENT_OBSERVER_H__
20
21namespace ePDFView
22{
23    class DumbDocumentObserver: public IDocumentObserver
24    {
25        public:
26            DumbDocumentObserver (void);
27            ~DumbDocumentObserver (void);
28
29            void notifyFindChanged (DocumentRectangle *matchRect);
30            void notifyFindFinished (void);
31            void notifyFindStarted (void);
32            void notifyLoad (void);
33            void notifyLoadError (const GError *error);
34            void notifyLoadPassword (const gchar *fileName, gboolean reload,
35                                     const GError *error);
36            void notifyPageChanged (gint pageNum);
37            void notifyPageRotated (gint rotation);
38            void notifyPageZoomed (gdouble zoom);
39            void notifyReload (void);
40
41            // Functions for test only purposes.
42            gint getCurrentPage (void);
43            DocumentRectangle *getFindMatchRect (void);
44            const GError *getLoadError (void);
45            gdouble getZoom (void);
46            gboolean isStillSearching (void);
47            gboolean loadFinished (void);
48            gboolean notifiedError (void);
49            gboolean notifiedLoaded (void);
50            gboolean notifiedPassword (void);
51            gboolean notifiedRotation (void);
52            gboolean notifiedZoom (void);
53            void setLoadError (const GError *error);
54
55        protected:
56            gint m_CurrentPage;
57            GError *m_Error;
58            DocumentRectangle *m_FindMatchRect;
59            gboolean m_NotifiedError;
60            gboolean m_NotifiedLoad;
61            gboolean m_NotifiedPassword;
62            gboolean m_NotifiedPageRotated;
63            gboolean m_NotifiedPageZoomed;
64            gboolean m_NotifiedReload;
65            volatile gboolean m_Searching;
66            gdouble m_Zoom;
67    };
68}
69
70#endif // !__DUMB_DOCUMENT_OBSERVER_H__
Note: See TracBrowser for help on using the browser.