1 /*************************************************************************
2  *
3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4  *
5  * Copyright 2000, 2010 Oracle and/or its affiliates.
6  *
7  * OpenOffice.org - a multi-platform office productivity suite
8  *
9  * This file is part of OpenOffice.org.
10  *
11  * OpenOffice.org is free software: you can redistribute it and/or modify
12  * it under the terms of the GNU Lesser General Public License version 3
13  * only, as published by the Free Software Foundation.
14  *
15  * OpenOffice.org is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18  * GNU Lesser General Public License version 3 for more details
19  * (a copy is included in the LICENSE file that accompanied this code).
20  *
21  * You should have received a copy of the GNU Lesser General Public License
22  * version 3 along with OpenOffice.org.  If not, see
23  * <http://www.openoffice.org/license.html>
24  * for a copy of the LGPLv3 License.
25  *
26  ************************************************************************/
27 
28 #ifndef SD_FRAMEWORK_FULL_SCREEN_PANE_HXX
29 #define SD_FRAMEWORK_FULL_SCREEN_PANE_HXX
30 
31 #include "FrameWindowPane.hxx"
32 #include <com/sun/star/frame/XLayoutManager.hpp>
33 #include <com/sun/star/uno/XComponentContext.hpp>
34 #include <vcl/vclevent.hxx>
35 #include <boost/scoped_ptr.hpp>
36 
37 namespace css = ::com::sun::star;
38 
39 class WorkWindow;
40 
41 namespace sd { class ViewShellBase; }
42 
43 namespace sd { namespace framework {
44 
45 /** The full screen pane creates a pane that covers the complete application
46     window, i.e. that hides menu bar, tool bars, status bars.
47 */
48 class FullScreenPane
49     : public FrameWindowPane
50 {
51 public:
52     /** Create a new full screen pane.
53         @param rxComponentContext
54             Used for creating a new canvas.
55         @param rxPaneId
56             The resource id of the new pane.
57         @param pViewShellWindow
58             The top-level parent of this window is used to obtain title and
59             icon for the new top-level window.
60     */
61 	FullScreenPane (
62         const css::uno::Reference<css::uno::XComponentContext>& rxComponentContext,
63         const css::uno::Reference<css::drawing::framework::XResourceId>& rxPaneId,
64         const ::Window* pViewShellWindow);
65     virtual ~FullScreenPane (void) throw();
66 
67     virtual void SAL_CALL disposing (void);
68 
69     //----- XPane -------------------------------------------------------------
70 
71     virtual sal_Bool SAL_CALL isVisible (void)
72         throw (cssu::RuntimeException);
73 
74     virtual void SAL_CALL setVisible (sal_Bool bIsVisible)
75         throw (cssu::RuntimeException);
76 
77     virtual cssu::Reference<css::accessibility::XAccessible> SAL_CALL getAccessible (void)
78         throw (cssu::RuntimeException);
79 
80     virtual void SAL_CALL setAccessible (
81         const cssu::Reference<css::accessibility::XAccessible>& rxAccessible)
82         throw (cssu::RuntimeException);
83 
84 
85     //-------------------------------------------------------------------------
86 
87     DECL_LINK(WindowEventHandler, VclWindowEvent*);
88 
89 protected:
90     virtual ::com::sun::star::uno::Reference<com::sun::star::rendering::XCanvas>
91         CreateCanvas (void)
92         throw (::com::sun::star::uno::RuntimeException);
93 
94 private:
95     css::uno::Reference<css::uno::XComponentContext> mxComponentContext;
96     ::boost::scoped_ptr<WorkWindow> mpWorkWindow;
97 
98     void ExtractArguments (
99         const css::uno::Reference<css::drawing::framework::XResourceId>& rxPaneId,
100         sal_Int32& rnScreenNumberReturnValue);
101 };
102 
103 } } // end of namespace sd::framework
104 
105 #endif
106