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>
26
27namespace com::sun::star::uno { class Any; }
28struct SystemParentData;
29
30
31// Presentation Flags
33{
34 NONE = 0x0000,
35 HideAllApps = 0x0001,
36};
37
38namespace o3tl
39{
40 template<> struct typed_flags<PresentationFlags> : is_typed_flags<PresentationFlags, 0x0001> {};
41}
42
43
45{
46private:
52
53 SAL_DLLPRIVATE void ImplInitWorkWindowData();
54 SAL_DLLPRIVATE void ImplInit( vcl::Window* pParent, WinBits nStyle, const css::uno::Any& aSystemWorkWindowToken );
55
56private:
57 WorkWindow( const WorkWindow& rWin ) = delete;
58 WorkWindow& operator =( const WorkWindow& rWin ) = delete;
59
60protected:
61 explicit WorkWindow( WindowType nType );
62 SAL_DLLPRIVATE void ImplInit( vcl::Window* pParent, WinBits nStyle, SystemParentData* pSystemParentData = nullptr );
63 SAL_DLLPRIVATE void ImplSetFrameState(vcl::WindowState);
64
65public:
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: */
virtual bool Close()
Definition: syswin.cxx:262
virtual void dispose() override
This is intended to be used to clear any locally held references to other Window-subclass objects.
Definition: syswin.cxx:103
friend class WorkWindow
Definition: syswin.hxx:96
VclReferenceBase & operator=(const VclReferenceBase &)=delete
bool IsPresentationMode() const
Definition: wrkwin.hxx:89
bool mbPresentationMode
Definition: wrkwin.hxx:48
bool mbPresentationVisible
Definition: wrkwin.hxx:49
PresentationFlags mnPresentationFlags
Definition: wrkwin.hxx:47
bool mbPresentationFull
Definition: wrkwin.hxx:50
bool IsFullScreenMode() const
Definition: wrkwin.hxx:80
WorkWindow(const WorkWindow &rWin)=delete
bool mbFullScreenMode
Definition: wrkwin.hxx:51
SAL_DLLPRIVATE void ImplInit(vcl::Window *pParent, WinBits nStyle, SystemParentData *pSystemParentData)
Definition: window.cxx:941
#define VCL_DLLPUBLIC
Definition: dllapi.h:29
NONE
WindowState
Definition: windowstate.hxx:28
BOOL IsMinimized(HWND hWnd)
Definition: wincomp.hxx:117
BOOL IsMaximized(HWND hWnd)
Definition: wincomp.hxx:122
sal_Int64 WinBits
Definition: wintypes.hxx:109
WindowType
Definition: wintypes.hxx:27
WinBits const WB_STDWORK
Definition: wintypes.hxx:213
PresentationFlags
Definition: wrkwin.hxx:33