Line data Source code
1 : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 : /*
3 : * This file is part of the LibreOffice project.
4 : *
5 : * This Source Code Form is subject to the terms of the Mozilla Public
6 : * License, v. 2.0. If a copy of the MPL was not distributed with this
7 : * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 : *
9 : * This file incorporates work covered by the following license notice:
10 : *
11 : * Licensed to the Apache Software Foundation (ASF) under one or more
12 : * contributor license agreements. See the NOTICE file distributed
13 : * with this work for additional information regarding copyright
14 : * ownership. The ASF licenses this file to you under the Apache
15 : * License, Version 2.0 (the "License"); you may not use this file
16 : * except in compliance with the License. You may obtain a copy of
17 : * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18 : */
19 :
20 : #ifndef _SV_WRKWIN_HXX
21 : #define _SV_WRKWIN_HXX
22 :
23 : #include <tools/solar.h>
24 : #include <vcl/dllapi.h>
25 : #include <vcl/syswin.hxx>
26 :
27 : namespace com { namespace sun { namespace star { namespace uno { class Any; }}}}
28 : struct SystemParentData;
29 :
30 : // ----------------------
31 : // - WorkWindow - Types -
32 : // ----------------------
33 :
34 : // Presentation Flags
35 : #define PRESENTATION_HIDEALLAPPS ((sal_uInt16)0x0001)
36 : #define PRESENTATION_NOFULLSCREEN ((sal_uInt16)0x0002)
37 : #define PRESENTATION_NOAUTOSHOW ((sal_uInt16)0x0004)
38 :
39 : // --------------
40 : // - WorkWindow -
41 : // --------------
42 :
43 : class VCL_DLLPUBLIC WorkWindow : public SystemWindow
44 : {
45 : private:
46 : sal_uInt16 mnPresentationFlags;
47 : sal_Bool mbPresentationMode:1,
48 : mbPresentationVisible:1,
49 : mbPresentationFull:1,
50 : mbFullScreenMode:1;
51 :
52 : SAL_DLLPRIVATE void ImplInitWorkWindowData();
53 : SAL_DLLPRIVATE void ImplInit( Window* pParent, WinBits nStyle, const ::com::sun::star::uno::Any& aSystemWorkWindowToken );
54 :
55 : private:
56 : SAL_DLLPRIVATE WorkWindow( const WorkWindow& rWin );
57 : SAL_DLLPRIVATE WorkWindow& operator =( const WorkWindow& rWin );
58 :
59 : protected:
60 : WorkWindow( WindowType nType );
61 : SAL_DLLPRIVATE void ImplInit( Window* pParent, WinBits nStyle, SystemParentData* pSystemParentData = NULL );
62 : SAL_DLLPRIVATE void ImplSetFrameState( sal_uLong aFrameState );
63 :
64 : public:
65 : WorkWindow( Window* pParent, WinBits nStyle = WB_STDWORK );
66 : WorkWindow( Window* pParent, const ::com::sun::star::uno::Any& aSystemWorkWindowToken, WinBits nStyle = WB_STDWORK );
67 : WorkWindow( SystemParentData* pParent ); // Not in the REMOTE-Version
68 : ~WorkWindow();
69 :
70 : virtual sal_Bool Close();
71 :
72 : void ShowFullScreenMode( sal_Bool bFullScreenMode,
73 : sal_Int32 nDisplayScreen );
74 : /**
75 : @overload Calls ShowFullScreenMode( bFullScreenMode, GetScreenNumber()).
76 : */
77 : void ShowFullScreenMode( sal_Bool bFullScreenMode = sal_True );
78 0 : void EndFullScreenMode() { ShowFullScreenMode( sal_False ); }
79 0 : sal_Bool IsFullScreenMode() const { return mbFullScreenMode; }
80 :
81 : void StartPresentationMode( sal_Bool bPresentation,
82 : sal_uInt16 nFlags,
83 : sal_Int32 nDisplayScreen );
84 : /**
85 : @overload Calls StartPresentationMode( bFullScreenMode, nFlags, GetScreenNumber()).
86 : */
87 : void StartPresentationMode( sal_Bool bPresentation = sal_True,
88 : sal_uInt16 nFlags = 0 );
89 : void EndPresentationMode() { StartPresentationMode( sal_False ); }
90 236 : sal_Bool IsPresentationMode() const { return mbPresentationMode; }
91 :
92 : sal_Bool IsMinimized() const;
93 :
94 : sal_Bool SetPluginParent( SystemParentData* pParent );
95 :
96 : void Minimize();
97 : void Restore();
98 :
99 : void Maximize( sal_Bool bMaximize = sal_True );
100 : sal_Bool IsMaximized() const;
101 : };
102 :
103 : #endif // _SV_WRKWIN_HXX
104 :
105 : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|