xref: /trunk/main/vcl/inc/vcl/wrkwin.hxx (revision e1beba7d)
1 /**************************************************************
2  *
3  * Licensed to the Apache Software Foundation (ASF) under one
4  * or more contributor license agreements.  See the NOTICE file
5  * distributed with this work for additional information
6  * regarding copyright ownership.  The ASF licenses this file
7  * to you under the Apache License, Version 2.0 (the
8  * "License"); you may not use this file except in compliance
9  * with the License.  You may obtain a copy of the License at
10  *
11  *   http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing,
14  * software distributed under the License is distributed on an
15  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16  * KIND, either express or implied.  See the License for the
17  * specific language governing permissions and limitations
18  * under the License.
19  *
20  *************************************************************/
21 
22 
23 
24 #ifndef _SV_WRKWIN_HXX
25 #define _SV_WRKWIN_HXX
26 
27 #include <vcl/sv.h>
28 #include <vcl/dllapi.h>
29 #include <vcl/syswin.hxx>
30 
31 namespace com { namespace sun { namespace star { namespace uno { class Any; }}}}
32 struct SystemParentData;
33 
34 // ----------------------
35 // - WorkWindow - Types -
36 // ----------------------
37 
38 // Presentation Flags
39 #define PRESENTATION_HIDEALLAPPS    ((sal_uInt16)0x0001)
40 #define PRESENTATION_NOFULLSCREEN   ((sal_uInt16)0x0002)
41 #define PRESENTATION_NOAUTOSHOW     ((sal_uInt16)0x0004)
42 
43 // --------------
44 // - WorkWindow -
45 // --------------
46 
47 class VCL_DLLPUBLIC WorkWindow : public SystemWindow
48 {
49 private:
50     sal_uInt16          mnPresentationFlags;
51     sal_Bool            mbPresentationMode:1,
52                     mbPresentationVisible:1,
53                     mbPresentationFull:1,
54                     mbFullScreenMode:1;
55 
56     SAL_DLLPRIVATE void ImplInitWorkWindowData();
57     SAL_DLLPRIVATE void ImplInit( Window* pParent, WinBits nStyle, const ::com::sun::star::uno::Any& aSystemWorkWindowToken );
58 
59 private:
60     SAL_DLLPRIVATE              WorkWindow( const WorkWindow& rWin );
61     SAL_DLLPRIVATE WorkWindow&  operator =( const WorkWindow& rWin );
62 
63 protected:
64                         WorkWindow( WindowType nType );
65     SAL_DLLPRIVATE void ImplInit( Window* pParent, WinBits nStyle, SystemParentData* pSystemParentData = NULL );
66     SAL_DLLPRIVATE void ImplLoadRes( const ResId& rResId );
67     SAL_DLLPRIVATE void ImplSetFrameState( sal_uLong aFrameState );
68 
69 public:
70     explicit        WorkWindow( Window* pParent, const ResId& );
71     explicit        WorkWindow( Window* pParent, WinBits nStyle = WB_STDWORK );
72     explicit        WorkWindow( Window* pParent, const ::com::sun::star::uno::Any& aSystemWorkWindowToken, WinBits nStyle = WB_STDWORK );
73     explicit        WorkWindow( SystemParentData* pParent ); // Not in the REMOTE-Version
74     virtual         ~WorkWindow();
75 
76     virtual sal_Bool    Close();
77 
78     /** The default value of nDisplay = -1 means "don't care" and
79         allows to backends to use any screen [** or display? terminology!]
80         they like (most probably the current one).
81 
82         NOTE: The default value cannot be 0, because 0 is a legitimate
83         screen number.
84      */
85     void            ShowFullScreenMode( sal_Bool bFullScreenMode = sal_True, sal_Int32 nDisplay = -1 );
EndFullScreenMode()86 	void            EndFullScreenMode() { ShowFullScreenMode( sal_False ); }
IsFullScreenMode() const87     sal_Bool            IsFullScreenMode() const { return mbFullScreenMode; }
88 
89 	void            StartPresentationMode( sal_Bool bPresentation = sal_True, sal_uInt16 nFlags = 0, sal_Int32 nDisplay = 0 );
EndPresentationMode()90     void            EndPresentationMode() {  StartPresentationMode( sal_False ); }
IsPresentationMode() const91     sal_Bool            IsPresentationMode() const { return mbPresentationMode; }
92 
93     sal_Bool            IsMinimized() const;
94 
95     sal_Bool			SetPluginParent( SystemParentData* pParent );
96 
97     void            Minimize();
98     void            Restore();
99 
100     void			Maximize( sal_Bool bMaximize = sal_True );
101     sal_Bool			IsMaximized() const;
102 };
103 
104 #endif // _SV_WRKWIN_HXX
105 
106