source: trunk/Lucide/gui/lucide.h @ 399

Last change on this file since 399 was 399, checked in by dmik, 11 years ago

Renamed "Full screen" mode to "Presentation" mode (activated by F5 now) and renamed "Maximized view" mode to "Full screen" mode (same F11 shortcut), for clarity and similarity with other applications (fixes ticket:176).

File size: 4.5 KB
Line 
1/* ***** BEGIN LICENSE BLOCK *****
2 * Version: CDDL 1.0/LGPL 2.1
3 *
4 * The contents of this file are subject to the COMMON DEVELOPMENT AND
5 * DISTRIBUTION LICENSE (CDDL) Version 1.0 (the "License"); you may not use
6 * this file except in compliance with the License. You may obtain a copy of
7 * the License at http://www.sun.com/cddl/
8 *
9 * Software distributed under the License is distributed on an "AS IS" basis,
10 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
11 * for the specific language governing rights and limitations under the
12 * License.
13 *
14 * The Initial Developer of the Original Code is
15 * Eugene Romanenko, netlabs.org.
16 * Portions created by the Initial Developer are Copyright (C) 2006
17 * the Initial Developer. All Rights Reserved.
18 *
19 * Contributor(s):
20 *
21 * Alternatively, the contents of this file may be used under the terms of
22 * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
23 * in which case the provisions of the LGPL are applicable instead of those
24 * above. If you wish to allow use of your version of this file only under the
25 * terms of the LGPL, and not to allow others to use your version of this file
26 * under the terms of the CDDL, indicate your decision by deleting the
27 * provisions above and replace them with the notice and other provisions
28 * required by the LGPL. If you do not delete the provisions above, a recipient
29 * may use your version of this file under the terms of any one of the CDDL
30 * or the LGPL.
31 *
32 * ***** END LICENSE BLOCK ***** */
33
34
35#ifndef __LUCIDE_H
36#define __LUCIDE_H
37
38#include "globals.h"
39
40// debug support
41#ifdef USE_PMPRINT
42#ifdef __TEST__
43#define   _PMPRINTF_
44#endif
45#include  "PMPRINTF.H"
46#endif
47
48class LuDocument;
49class ProgressDlg;
50
51enum PgLayout { SinglePage = 0, Continuous = 1, TwoPages = 2 };
52enum ActiveWindow { AwIndex, AwView };
53enum FileList { ListFirst, ListPrevious, ListNext, ListLast };
54
55struct LuWindowPos
56{
57    SWP    Swp;
58    USHORT XRestore;
59    USHORT YRestore;
60    USHORT CXRestore;
61    USHORT CYRestore;
62    USHORT XMinimize;
63    USHORT YMinimize;
64};
65
66class Lucide
67{
68    private:
69
70        static ProgressDlg *loadProgressDlg;
71        static char docFullName[ CCHMAXPATH ];
72        static char docDirName[ CCHMAXPATHCOMP ];
73        static char *password;
74        static bool docLoaded;
75        static long loadErrorCode;
76        static char *loadError;
77        static bool isFullscreen;
78        static bool isPresentation;
79        static LuWindowPos winPos;
80
81        static void setOfPages( long pages );
82        static void enableZoomMenus();
83        static void setZoomChecks( SHORT cmd, SHORT cbind, double zoom );
84        static void loadthread( void *p );
85        static void readMask( const char *mask );
86        static void loadFileList();
87
88        static char *thumbnailData;
89        static int thumbnailDataLen;
90
91    public:
92        static char docFileName[ CCHMAXPATHCOMP ];
93        static bool dontSwitchPage;
94        static SHORT splitterPos;
95        static bool showIndex;
96        static ActiveWindow activeWindow;
97
98        static void newWindow( char *file, bool addDir );
99        static void openDocument();
100        static bool closeDocument( bool force = false );
101        static void loadDocument( const char *fn );
102        static bool saveDocumentAs();
103        static void setDocument( LuDocument *_doc );
104        static void checkNavigationMenus();
105        static void checkZoomMenus();
106        static void checkMenus( bool initial );
107        static void checkNavpane();
108        static void goToPage( long page );
109        static void setZoom( double zoom );
110        static void toggleZoom();
111        static void enableCopy( bool enable );
112        static void setPageLayout( PgLayout layout );
113        static void toggleFullscreen() { toggleFullscreenEx( false ); }
114        static void togglePresentation() { toggleFullscreenEx( true ); }
115        static void toggleFullscreenEx( bool presentation, bool atStartup = false );
116        static void focusDocview();
117        static void focusIndex();
118        static void cmdMinimize();
119        static void cmdSwitchToPresentation();
120        static void cmdSwitchWindow();
121        static void createThumbnail( LuDocument *_doc );
122        static bool isThumbNeeded( const char *fn );
123        static void writeThumbnail( const char *fn );
124        static void gotoFile( FileList file );
125        static void savePosition();
126        static void restorePosition();
127};
128
129#endif // __LUCIDE_H
130
Note: See TracBrowser for help on using the repository browser.