xref: /trunk/main/sd/source/ui/presenter/PresenterTextView.hxx (revision 91144cd0085a7583d2099b982122deb2184ab956)
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_PRESENTER_TEXT_VIEW_HXX
25 #define SD_PRESENTER_TEXT_VIEW_HXX
26 
27 #include "tools/PropertySet.hxx"
28 #include <com/sun/star/beans/XPropertySet.hpp>
29 #include <com/sun/star/lang/XInitialization.hpp>
30 #include <cppuhelper/basemutex.hxx>
31 #include <cppuhelper/implbase1.hxx>
32 #include <boost/noncopyable.hpp>
33 #include <boost/scoped_ptr.hpp>
34 
35 namespace css = ::com::sun::star;
36 
37 namespace sd { namespace presenter {
38 
39 namespace {
40     typedef ::cppu::ImplInheritanceHelper1 <
41         tools::PropertySet,
42         css::lang::XInitialization
43     > PresenterTextViewInterfaceBase;
44 }
45 
46 
47 /** Render text into bitmaps.  An edit engine is used to render the text.
48     This service is used by the presenter screen to render the notes view.
49 */
50 class PresenterTextView
51     : private ::boost::noncopyable,
52       public PresenterTextViewInterfaceBase
53 {
54 public:
55     explicit PresenterTextView (const css::uno::Reference<css::uno::XComponentContext>& rxContext);
56     virtual ~PresenterTextView (void);
57 
58     // XInitialization
59 
60     virtual void SAL_CALL initialize (const css::uno::Sequence<css::uno::Any>& rArguments);
61 
62 
63 protected:
64     virtual void SAL_CALL disposing (void);
65 
66     virtual css::uno::Any GetPropertyValue (
67         const ::rtl::OUString& rsPropertyName);
68     virtual css::uno::Any SetPropertyValue (
69         const ::rtl::OUString& rsPropertyName,
70         const css::uno::Any& rValue);
71 
72 private:
73     class Implementation;
74     ::boost::scoped_ptr<Implementation> mpImplementation;
75 
76     /** This method throws a DisposedException when the object has already been
77         disposed.
78     */
79     void ThrowIfDisposed (void);
80 };
81 
82 } } // end of namespace ::sd::presenter
83 
84 #endif
85