Branch data Line data Source code
1 : : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 : : /*************************************************************************
3 : : *
4 : : * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 : : *
6 : : * Copyright 2000, 2010 Oracle and/or its affiliates.
7 : : *
8 : : * OpenOffice.org - a multi-platform office productivity suite
9 : : *
10 : : * This file is part of OpenOffice.org.
11 : : *
12 : : * OpenOffice.org is free software: you can redistribute it and/or modify
13 : : * it under the terms of the GNU Lesser General Public License version 3
14 : : * only, as published by the Free Software Foundation.
15 : : *
16 : : * OpenOffice.org is distributed in the hope that it will be useful,
17 : : * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 : : * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 : : * GNU Lesser General Public License version 3 for more details
20 : : * (a copy is included in the LICENSE file that accompanied this code).
21 : : *
22 : : * You should have received a copy of the GNU Lesser General Public License
23 : : * version 3 along with OpenOffice.org. If not, see
24 : : * <http://www.openoffice.org/license.html>
25 : : * for a copy of the LGPLv3 License.
26 : : *
27 : : ************************************************************************/
28 : :
29 : : #ifndef _SV_WRKWIN_HXX
30 : : #define _SV_WRKWIN_HXX
31 : :
32 : : #include <tools/solar.h>
33 : : #include <vcl/dllapi.h>
34 : : #include <vcl/syswin.hxx>
35 : :
36 : : namespace com { namespace sun { namespace star { namespace uno { class Any; }}}}
37 : : struct SystemParentData;
38 : :
39 : : // ----------------------
40 : : // - WorkWindow - Types -
41 : : // ----------------------
42 : :
43 : : // Presentation Flags
44 : : #define PRESENTATION_HIDEALLAPPS ((sal_uInt16)0x0001)
45 : : #define PRESENTATION_NOFULLSCREEN ((sal_uInt16)0x0002)
46 : : #define PRESENTATION_NOAUTOSHOW ((sal_uInt16)0x0004)
47 : :
48 : : // --------------
49 : : // - WorkWindow -
50 : : // --------------
51 : :
52 : : class VCL_DLLPUBLIC WorkWindow : public SystemWindow
53 : : {
54 : : private:
55 : : sal_uInt16 mnPresentationFlags;
56 : : sal_Bool mbPresentationMode:1,
57 : : mbPresentationVisible:1,
58 : : mbPresentationFull:1,
59 : : mbFullScreenMode:1;
60 : :
61 : : SAL_DLLPRIVATE void ImplInitWorkWindowData();
62 : : SAL_DLLPRIVATE void ImplInit( Window* pParent, WinBits nStyle, const ::com::sun::star::uno::Any& aSystemWorkWindowToken );
63 : :
64 : : private:
65 : : SAL_DLLPRIVATE WorkWindow( const WorkWindow& rWin );
66 : : SAL_DLLPRIVATE WorkWindow& operator =( const WorkWindow& rWin );
67 : :
68 : : protected:
69 : : WorkWindow( WindowType nType );
70 : : SAL_DLLPRIVATE void ImplInit( Window* pParent, WinBits nStyle, SystemParentData* pSystemParentData = NULL );
71 : : SAL_DLLPRIVATE void ImplLoadRes( const ResId& rResId );
72 : : SAL_DLLPRIVATE void ImplSetFrameState( sal_uLong aFrameState );
73 : :
74 : : public:
75 : : WorkWindow( Window* pParent, const ResId& rResId );
76 : : WorkWindow( Window* pParent, WinBits nStyle = WB_STDWORK );
77 : : WorkWindow( Window* pParent, const ::com::sun::star::uno::Any& aSystemWorkWindowToken, WinBits nStyle = WB_STDWORK );
78 : : WorkWindow( SystemParentData* pParent ); // Not in the REMOTE-Version
79 : : ~WorkWindow();
80 : :
81 : : virtual sal_Bool Close();
82 : :
83 : : /** The default value of nDisplayScreen = -1 means "don't care" and
84 : : allows to backends to use any screen they like (most probably
85 : : the current one).
86 : :
87 : : NOTE: The default value cannot be 0, because 0 is a legitimate
88 : : Display Screen number.
89 : : */
90 : : void ShowFullScreenMode( sal_Bool bFullScreenMode = sal_True,
91 : : sal_Int32 nDisplayScreen = -1 );
92 : 0 : void EndFullScreenMode() { ShowFullScreenMode( sal_False ); }
93 : 37 : sal_Bool IsFullScreenMode() const { return mbFullScreenMode; }
94 : :
95 : : void StartPresentationMode( sal_Bool bPresentation = sal_True,
96 : : sal_uInt16 nFlags = 0,
97 : : sal_Int32 nDisplayScreen = 0 );
98 : : void EndPresentationMode() { StartPresentationMode( sal_False ); }
99 : 1752 : sal_Bool IsPresentationMode() const { return mbPresentationMode; }
100 : :
101 : : sal_Bool IsMinimized() const;
102 : :
103 : : sal_Bool SetPluginParent( SystemParentData* pParent );
104 : :
105 : : void Minimize();
106 : : void Restore();
107 : :
108 : : void Maximize( sal_Bool bMaximize = sal_True );
109 : : sal_Bool IsMaximized() const;
110 : : };
111 : :
112 : : #endif // _SV_WRKWIN_HXX
113 : :
114 : : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|