root/trunk/tests/DumbMainView.h

Revision 253, 6.3 kB (checked in by jordi, 2 years ago)

Applied Enrico Tröger's patch for full screen support. This closes ticket #33.

Line 
1// ePDFView - Dumb Test Main View.
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_MAIN_VIEW_H__)
19#define __DUMB_MAIN_VIEW_H__
20
21namespace ePDFView
22{
23    // Forward declarations.
24    class DumbFindView;
25    class DumbPageView;
26
27    class DumbMainView: public IMainView
28    {
29        public:
30            // Interface methods.
31            DumbMainView (MainPter *pter);
32            ~DumbMainView ();
33
34            void activeZoomFit (gboolean active);
35            void activeZoomWidth (gboolean active);
36            IFindView *getFindView (void);
37            IPageView *getPageView (void);
38#if defined (HAVE_CUPS)
39            IPrintView *getPrintView (void);
40#endif // HAVE_CUPS
41            IPreferencesView *getPreferencesView (void);
42            const gchar *getZoomText (void);
43            gchar *openFileDialog (const gchar *lastFolder);
44            gchar *promptPasswordDialog (void);
45            char *saveFileDialog (const gchar *lastFolder);
46            void sensitiveFind (gboolean sensitive);
47            void sensitiveGoToFirstPage (gboolean sensitive);
48            void sensitiveGoToLastPage (gboolean sensitive);
49            void sensitiveGoToNextPage (gboolean sensitive);
50            void sensitiveGoToPage (gboolean sensitive);
51            void sensitiveGoToPreviousPage (gboolean sensitive);
52            void sensitiveOpen (gboolean sensitive);
53            void sensitivePrint (gboolean sensitive);
54            void sensitiveReload (gboolean sensitive);
55            void sensitiveRotateLeft (gboolean sensitive);
56            void sensitiveRotateRight (gboolean sensitive);
57            void sensitiveSave (gboolean sensitive);
58            void sensitiveZoom (gboolean sensitive);
59            void sensitiveZoomIn (gboolean sensitive);
60            void sensitiveZoomOut (gboolean sensitive);
61            void sensitiveZoomFit (gboolean sensitive);
62            void sensitiveZoomWidth (gboolean sensitive);
63            const gchar *getGoToPageText (void);
64            void setCursor (ViewCursor cursorType);
65            void setFullScreen (gboolean fullScreen);
66            void setNumberOfPagesText (const gchar *text);
67            void setGoToPageText (const gchar *text);
68            void setTitle (const gchar *title);
69            void setOutline (DocumentOutline *outline);
70            void setStatusBarText (const gchar *text);
71            void setZoomText (const gchar *text);
72            void show (void);
73            void showErrorMessage (const gchar *title, const gchar *body);
74            void showIndex (gboolean show);
75            void showStatusbar (gboolean show);
76            void showToolbar (gboolean show);
77
78            // Methods for test purposes.
79            gint countTimesShownPasswordPrompt (void);
80            gint getCurrentPage (void);
81            const gchar *getLastOpenFileFolder (void);
82            const gchar *getLastSaveFileFolder (void);
83            DocumentOutline *getOutline (void);
84            const gchar *getTitle (void);
85            gboolean isShown (void);
86            gboolean isSensitiveFind (void);
87            gboolean isSensitiveGoToFirstPage (void);
88            gboolean isSensitiveGoToLastPage (void);
89            gboolean isSensitiveGoToNextPage (void);
90            gboolean isSensitiveGoToPage (void);
91            gboolean isSensitiveGoToPreviousPage (void);
92            gboolean isSensitivePrint (void);
93            gboolean isSensitiveReload (void);
94            gboolean isSensitiveRotateLeft (void);
95            gboolean isSensitiveRotateRight (void);
96            gboolean isSensitiveSave (void);
97            gboolean isSensitiveZoom (void);
98            gboolean isSensitiveZoomIn (void);
99            gboolean isSensitiveZoomOut (void);
100            gboolean isSensitiveZoomFit (void);
101            gboolean isSensitiveZoomWidth (void);
102            gboolean isShownIndex (void);
103            gboolean isShownStatusbar (void);
104            gboolean isShownToolbar (void);
105            gboolean isZoomToFitActive (void);
106            gboolean isZoomToWidthActive (void);
107            void setOpenFileName (const gchar *fileName);
108            void setPassword (const gchar *password);
109            void setSaveFileName (const gchar *fileName);
110            gboolean shownError (void);
111
112        protected:
113            gint m_CurrentPage;
114            DumbFindView *m_FindView;
115            gchar *m_NumberOfPages;
116            gchar *m_GoToPageText;
117            gchar *m_LastOpenFileFolder;
118            gchar *m_LastSaveFileFolder;
119            gchar *m_OpenFileName;
120            DocumentOutline *m_Outline;
121            DumbPageView *m_PageView;
122            gchar *m_Password;
123            gchar *m_SaveFileName;
124            gboolean m_SensitiveFind;
125            gboolean m_SensitiveGoToFirstPage;
126            gboolean m_SensitiveGoToLastPage;
127            gboolean m_SensitiveGoToNextPage;
128            gboolean m_SensitiveGoToPage;
129            gboolean m_SensitiveGoToPreviousPage;
130            gboolean m_SensitivePrint;
131            gboolean m_SensitiveReload;
132            gboolean m_SensitiveRotateLeft;
133            gboolean m_SensitiveRotateRight;
134            gboolean m_SensitiveSave;
135            gboolean m_SensitiveZoom;
136            gboolean m_SensitiveZoomIn;
137            gboolean m_SensitiveZoomOut;
138            gboolean m_SensitiveZoomFit;
139            gboolean m_SensitiveZoomWidth;
140            gboolean m_Shown;
141            gboolean m_ShownError;
142            gboolean m_ShownIndex;
143            gboolean m_ShownStatusbar;
144            gboolean m_ShownToolbar;
145            gint m_TimesShownPassword;
146            gchar *m_Title;
147            gchar *m_ZoomText;
148            gboolean m_ZoomToFit;
149            gboolean m_ZoomToWidth;
150    };
151}
152
153#endif // !__DUMB_MAIN_VIEW_H__
Note: See TracBrowser for help on using the browser.