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 SD_FRAMEWORK_FULL_SCREEN_PANE_HXX
25 #define SD_FRAMEWORK_FULL_SCREEN_PANE_HXX
26 
27 #include "FrameWindowPane.hxx"
28 #include <com/sun/star/frame/XLayoutManager.hpp>
29 #include <com/sun/star/uno/XComponentContext.hpp>
30 #include <vcl/vclevent.hxx>
31 #include <boost/scoped_ptr.hpp>
32 
33 namespace css = ::com::sun::star;
34 
35 class WorkWindow;
36 
37 namespace sd { class ViewShellBase; }
38 
39 namespace sd { namespace framework {
40 
41 /** The full screen pane creates a pane that covers the complete application
42     window, i.e. that hides menu bar, tool bars, status bars.
43 */
44 class FullScreenPane
45     : public FrameWindowPane
46 {
47 public:
48     /** Create a new full screen pane.
49         @param rxComponentContext
50             Used for creating a new canvas.
51         @param rxPaneId
52             The resource id of the new pane.
53         @param pViewShellWindow
54             The top-level parent of this window is used to obtain title and
55             icon for the new top-level window.
56     */
57 	FullScreenPane (
58         const css::uno::Reference<css::uno::XComponentContext>& rxComponentContext,
59         const css::uno::Reference<css::drawing::framework::XResourceId>& rxPaneId,
60         const ::Window* pViewShellWindow);
61     virtual ~FullScreenPane (void) throw();
62 
63     virtual void SAL_CALL disposing (void);
64 
65     //----- XPane -------------------------------------------------------------
66 
67     virtual sal_Bool SAL_CALL isVisible (void)
68         throw (cssu::RuntimeException);
69 
70     virtual void SAL_CALL setVisible (sal_Bool bIsVisible)
71         throw (cssu::RuntimeException);
72 
73     virtual cssu::Reference<css::accessibility::XAccessible> SAL_CALL getAccessible (void)
74         throw (cssu::RuntimeException);
75 
76     virtual void SAL_CALL setAccessible (
77         const cssu::Reference<css::accessibility::XAccessible>& rxAccessible)
78         throw (cssu::RuntimeException);
79 
80 
81     //-------------------------------------------------------------------------
82 
83     DECL_LINK(WindowEventHandler, VclWindowEvent*);
84 
85 protected:
86     virtual ::com::sun::star::uno::Reference<com::sun::star::rendering::XCanvas>
87         CreateCanvas (void)
88         throw (::com::sun::star::uno::RuntimeException);
89 
90 private:
91     css::uno::Reference<css::uno::XComponentContext> mxComponentContext;
92     ::boost::scoped_ptr<WorkWindow> mpWorkWindow;
93 
94     void ExtractArguments (
95         const css::uno::Reference<css::drawing::framework::XResourceId>& rxPaneId,
96         sal_Int32& rnScreenNumberReturnValue);
97 };
98 
99 } } // end of namespace sd::framework
100 
101 #endif
102