source: trunk/Lucide/SOURCE/gui/lucide.h @ 266

Last change on this file since 266 was 266, checked in by Eugene Romanenko, 12 years ago

small changes

File size: 4.1 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
41class LuDocument;
42class ProgressDlg;
43
44enum PgLayout { SinglePage = 0, Continuous = 1, TwoPages = 2 };
45enum ActiveWindow { AwIndex, AwView };
46enum FileList { ListFirst, ListPrevious, ListNext, ListLast };
47
48struct LuWindowPos
49{
50    SWP    Swp;
51    USHORT XRestore;
52    USHORT YRestore;
53    USHORT CXRestore;
54    USHORT CYRestore;
55    USHORT XMinimize;
56    USHORT YMinimize;
57};
58
59class Lucide
60{
61    private:
62   
63                static ProgressDlg *loadProgressDlg;
64                static char docFullName[ CCHMAXPATH ];
65                static char docDirName[ CCHMAXPATHCOMP ];
66                static char *password;
67                static bool docLoaded;
68                static long loadErrorCode;
69                static char *loadError;
70                static bool isMaxview;
71                static bool isFullscreen;
72                static LuWindowPos winPos;
73   
74        static void setOfPages( long pages );
75        static void enableZoomMenus();
76        static void setZoomChecks( SHORT cmd, SHORT cbind, double zoom );
77        static void loadthread( void *p );
78        static void readMask( const char *mask );
79        static void loadFileList();
80       
81        static void *thumbnailData;
82        static int thumbnailDataLen;
83
84    public:
85                static char docFileName[ CCHMAXPATHCOMP ];
86        static bool dontSwitchPage;
87        static SHORT splitterPos;
88        static bool showIndex;
89                static ActiveWindow activeWindow;
90       
91        static void newWindow( char *file, bool addDir );
92        static void openDocument();
93        static void closeDocument();
94        static void loadDocument( const char *fn );
95        static void saveDocumentAs();
96        static void setDocument( LuDocument *_doc );
97        static void checkNavigationMenus();
98        static void checkZoomMenus();
99        static void checkMenus( bool initial );
100        static void checkNavpane();
101        static void goToPage( long page );
102        static void setZoom( double zoom );
103        static void toggleZoom();
104        static void enableCopy( bool enable );
105        static void setPageLayout( PgLayout layout );
106        static void toggleMaxview();
107        static void toggleFullscreen();
108        static void focusDocview();
109        static void focusIndex();
110        static void cmdMinimize();
111        static void cmdSwitchToFullscreen();
112        static void cmdSwitchWindow();
113        static void createThumbnail( LuDocument *_doc );
114        static bool isThumbNeeded( const char *fn );
115        static void writeThumbnail( const char *fn );
116        static void gotoFile( FileList file );
117};
118
119#endif // __LUCIDE_H
120
Note: See TracBrowser for help on using the repository browser.