Version 5.4.3.2, tag libreoffice-5.4.3.2
[LibreOffice.git] / include / vcl / wrkwin.hxx
blobef8f28ab01cfefae4c15af3697b365d98ad796a1
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
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/.
9 * This file incorporates work covered by the following license notice:
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 .
20 #ifndef INCLUDED_VCL_WRKWIN_HXX
21 #define INCLUDED_VCL_WRKWIN_HXX
23 #include <tools/solar.h>
24 #include <vcl/dllapi.h>
25 #include <vcl/syswin.hxx>
26 #include <o3tl/typed_flags_set.hxx>
28 namespace com { namespace sun { namespace star { namespace uno { class Any; }}}}
29 struct SystemParentData;
32 // Presentation Flags
33 enum class PresentationFlags
35 NONE = 0x0000,
36 HideAllApps = 0x0001,
37 NoFullScreen = 0x0002,
38 NoAutoShow = 0x0004,
41 namespace o3tl
43 template<> struct typed_flags<PresentationFlags> : is_typed_flags<PresentationFlags, 0x0007> {};
47 class VCL_DLLPUBLIC WorkWindow : public SystemWindow
49 private:
50 PresentationFlags mnPresentationFlags;
51 bool mbPresentationMode:1,
52 mbPresentationVisible:1,
53 mbPresentationFull:1,
54 mbFullScreenMode:1;
56 SAL_DLLPRIVATE void ImplInitWorkWindowData();
57 SAL_DLLPRIVATE void ImplInit( vcl::Window* pParent, WinBits nStyle, const css::uno::Any& aSystemWorkWindowToken );
59 private:
60 WorkWindow( const WorkWindow& rWin ) = delete;
61 WorkWindow& operator =( const WorkWindow& rWin ) = delete;
63 protected:
64 explicit WorkWindow( WindowType nType );
65 SAL_DLLPRIVATE void ImplInit( vcl::Window* pParent, WinBits nStyle, SystemParentData* pSystemParentData = nullptr );
66 SAL_DLLPRIVATE void ImplSetFrameState( WindowStateState aFrameState );
68 public:
69 explicit WorkWindow( vcl::Window* pParent, WinBits nStyle = WB_STDWORK );
70 explicit WorkWindow( vcl::Window* pParent, const css::uno::Any& aSystemWorkWindowToken, WinBits nStyle = WB_STDWORK );
71 explicit WorkWindow( SystemParentData* pParent ); // Not in the REMOTE-Version
72 virtual ~WorkWindow() override;
73 virtual void dispose() override;
75 virtual bool Close() override;
77 void ShowFullScreenMode( bool bFullScreenMode,
78 sal_Int32 nDisplayScreen );
79 /**
80 @overload void ShowFullScreenMode(bool bFullScreenMode, sal_Int32 nDisplayScreen)
82 void ShowFullScreenMode( bool bFullScreenMode = true );
83 bool IsFullScreenMode() const { return mbFullScreenMode; }
85 void StartPresentationMode( bool bPresentation,
86 PresentationFlags nFlags,
87 sal_uInt32 nDisplayScreen );
88 /**
89 @overload void StartPresentationMode( PresentationFlags nFlags, sal_uInt32 nDisplayScreen)
91 void StartPresentationMode( PresentationFlags nFlags );
92 bool IsPresentationMode() const { return mbPresentationMode; }
94 bool IsMinimized() const;
96 bool SetPluginParent( SystemParentData* pParent );
98 void Minimize();
99 void Restore();
101 void Maximize( bool bMaximize = true );
102 bool IsMaximized() const;
105 #endif // INCLUDED_VCL_WRKWIN_HXX
107 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */