LibreOffice Module vcl (master)  1
wrkwin.hxx
Go to the documentation of this file.
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 INCLUDED_VCL_WRKWIN_HXX
21 #define INCLUDED_VCL_WRKWIN_HXX
22 
23 #include <vcl/dllapi.h>
24 #include <vcl/syswin.hxx>
25 #include <o3tl/typed_flags_set.hxx>
26 
27 namespace com { namespace sun { namespace star { namespace uno { class Any; }}}}
28 struct SystemParentData;
29 
30 
31 // Presentation Flags
33 {
34  NONE = 0x0000,
35  HideAllApps = 0x0001,
36 };
37 
38 namespace o3tl
39 {
40  template<> struct typed_flags<PresentationFlags> : is_typed_flags<PresentationFlags, 0x0001> {};
41 }
42 
43 
45 {
46 private:
48  bool mbPresentationMode:1,
49  mbPresentationVisible:1,
50  mbPresentationFull:1,
51  mbFullScreenMode:1;
52 
53  SAL_DLLPRIVATE void ImplInitWorkWindowData();
54  SAL_DLLPRIVATE void ImplInit( vcl::Window* pParent, WinBits nStyle, const css::uno::Any& aSystemWorkWindowToken );
55 
56 private:
57  WorkWindow( const WorkWindow& rWin ) = delete;
58  WorkWindow& operator =( const WorkWindow& rWin ) = delete;
59 
60 protected:
61  explicit WorkWindow( WindowType nType );
62  SAL_DLLPRIVATE void ImplInit( vcl::Window* pParent, WinBits nStyle, SystemParentData* pSystemParentData = nullptr );
63  SAL_DLLPRIVATE void ImplSetFrameState( WindowStateState aFrameState );
64 
65 public:
66  explicit WorkWindow( vcl::Window* pParent, WinBits nStyle = WB_STDWORK );
67  explicit WorkWindow( vcl::Window* pParent, const css::uno::Any& aSystemWorkWindowToken, WinBits nStyle = WB_STDWORK );
68  explicit WorkWindow( SystemParentData* pParent ); // Not in the REMOTE-Version
69  virtual ~WorkWindow() override;
70  virtual void dispose() override;
71 
72  virtual bool Close() override;
73 
74  void ShowFullScreenMode( bool bFullScreenMode,
75  sal_Int32 nDisplayScreen );
79  void ShowFullScreenMode( bool bFullScreenMode );
80  bool IsFullScreenMode() const { return mbFullScreenMode; }
81 
82  void StartPresentationMode( bool bPresentation,
83  PresentationFlags nFlags,
84  sal_Int32 nDisplayScreen );
88  void StartPresentationMode( PresentationFlags nFlags );
89  bool IsPresentationMode() const { return mbPresentationMode; }
90 
91  bool IsMinimized() const;
92 
93  void SetPluginParent( SystemParentData* pParent );
94 
95  void Minimize();
96  void Restore();
97 
98  void Maximize( bool bMaximize = true );
99  bool IsMaximized() const;
100 };
101 
102 #endif // INCLUDED_VCL_WRKWIN_HXX
103 
104 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
#define VCL_DLLPUBLIC
Definition: dllapi.h:29
sal_Int64 WinBits
BOOL IsMinimized(HWND hWnd)
Definition: wincomp.hxx:118
virtual bool Close()
Definition: syswin.cxx:264
BOOL IsMaximized(HWND hWnd)
Definition: wincomp.hxx:123
friend class WorkWindow
Definition: syswin.hxx:63
bool IsPresentationMode() const
Definition: wrkwin.hxx:89
PresentationFlags
Definition: wrkwin.hxx:32
bool IsFullScreenMode() const
Definition: wrkwin.hxx:80
SAL_DLLPRIVATE void ImplInit(vcl::Window *pParent, WinBits nStyle, SystemParentData *pSystemParentData)
Definition: window.cxx:932
virtual void dispose() override
This is intended to be used to clear any locally held references to other Window-subclass objects...
Definition: syswin.cxx:99
WindowType
PresentationFlags mnPresentationFlags
Definition: wrkwin.hxx:47
OutputDevice & operator=(const OutputDevice &)=delete
WindowStateState
Definition: vclenum.hxx:301