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 SDEXT_PRESENTER_VIEW_HELPER_HXX
25 #define SDEXT_PRESENTER_VIEW_HELPER_HXX
26 
27 #include <com/sun/star/graphic/XGraphic.hpp>
28 #include <com/sun/star/frame/XController.hpp>
29 #include <com/sun/star/presentation/XSlideShowController.hpp>
30 #include <com/sun/star/uno/XComponentContext.hpp>
31 #include <boost/noncopyable.hpp>
32 
33 namespace css = ::com::sun::star;
34 
35 namespace sdext { namespace presenter {
36 
37 /** Collection of helper functions that do not fit in anywhere else.
38     Provide access to frequently used strings of the drawing framework.
39 */
40 class PresenterHelper
41     : ::boost::noncopyable
42 {
43 public:
44     static const ::rtl::OUString msPaneURLPrefix;
45     static const ::rtl::OUString msCenterPaneURL;
46     static const ::rtl::OUString msFullScreenPaneURL;
47 
48     static const ::rtl::OUString msViewURLPrefix;
49     static const ::rtl::OUString msPresenterScreenURL;
50     static const ::rtl::OUString msSlideSorterURL;
51 
52     static const ::rtl::OUString msResourceActivationEvent;
53     static const ::rtl::OUString msResourceDeactivationEvent;
54 
55     static const ::rtl::OUString msDefaultPaneStyle;
56     static const ::rtl::OUString msDefaultViewStyle;
57 
58     /** Return the slide show controller of a running presentation that has
59         the same document as the given framework controller.
60         @return
61             When no presentation is running this method returns an empty reference.
62     */
63     static css::uno::Reference<css::presentation::XSlideShowController> GetSlideShowController (
64         const css::uno::Reference<css::frame::XController>& rxController);
65 
66 private:
67     PresenterHelper (void);
68     ~PresenterHelper (void);
69 };
70 
71 } } // end of namespace presenter
72 
73 #endif
74