update dev300-m58
[ooovba.git] / sd / source / ui / inc / SdUnoDrawView.hxx
blob7bbae3e79b66e269c47a0f5e30c2ec700e9cc983
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: SdUnoDrawView.hxx,v $
10 * $Revision: 1.16 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 #ifndef SD_UNO_DRAW_VIEW_HXX
32 #define SD_UNO_DRAW_VIEW_HXX
34 #include "DrawSubController.hxx"
35 #include "DrawController.hxx"
36 #include "DrawViewShell.hxx"
37 #include <cppuhelper/basemutex.hxx>
39 class SdXImpressDocument;
40 class SdPage;
42 namespace css = ::com::sun::star;
44 namespace com { namespace sun { namespace star { namespace drawing {
45 class XLayer;
46 } } } }
48 namespace sd {
50 class DrawController;
51 class DrawViewShell;
53 /** This class implements the DrawViewShell specific part of the controller.
55 class SdUnoDrawView
56 : private cppu::BaseMutex,
57 public DrawSubControllerInterfaceBase
59 public:
60 SdUnoDrawView (
61 DrawController& rController,
62 DrawViewShell& rViewShell,
63 View& rView) throw();
64 virtual ~SdUnoDrawView (void) throw();
66 // XSelectionSupplier
68 virtual sal_Bool SAL_CALL select (
69 const css::uno::Any& aSelection)
70 throw(css::lang::IllegalArgumentException,
71 css::uno::RuntimeException);
73 virtual css::uno::Any SAL_CALL getSelection (void)
74 throw(css::uno::RuntimeException);
76 virtual void SAL_CALL addSelectionChangeListener (
77 const css::uno::Reference<css::view::XSelectionChangeListener>& rxListener)
78 throw(css::uno::RuntimeException);
80 virtual void SAL_CALL removeSelectionChangeListener (
81 const css::uno::Reference<css::view::XSelectionChangeListener>& rxListener)
82 throw(css::uno::RuntimeException);
85 // XDrawView
87 virtual void SAL_CALL setCurrentPage (
88 const css::uno::Reference<css::drawing::XDrawPage >& xPage)
89 throw(css::uno::RuntimeException);
91 virtual css::uno::Reference<css::drawing::XDrawPage> SAL_CALL getCurrentPage (void)
92 throw(css::uno::RuntimeException);
95 // XFastPropertySet
97 virtual void SAL_CALL setFastPropertyValue (
98 sal_Int32 nHandle,
99 const css::uno::Any& rValue)
100 throw(css::beans::UnknownPropertyException,
101 css::beans::PropertyVetoException,
102 css::lang::IllegalArgumentException,
103 css::lang::WrappedTargetException,
104 css::uno::RuntimeException);
106 virtual css::uno::Any SAL_CALL getFastPropertyValue (
107 sal_Int32 nHandle)
108 throw(css::beans::UnknownPropertyException,
109 css::lang::WrappedTargetException,
110 css::uno::RuntimeException);
112 protected:
113 sal_Bool getMasterPageMode(void) const throw();
114 void setMasterPageMode(sal_Bool MasterPageMode_) throw();
115 sal_Bool getLayerMode(void) const throw();
116 void setLayerMode(sal_Bool LayerMode_) throw();
118 /** Return a reference to the active layer object.
119 @return
120 The returned value may be empty when the internal state of this
121 view is not valid (like during destruction.)
123 ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XLayer> getActiveLayer (void) throw ();
125 /** Make the specified object the active layer.
126 @param rxLayer
127 The new layer object.
129 void setActiveLayer (const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XLayer>& rxLayer) throw ();
131 void SetZoom( sal_Int16 nZoom );
132 sal_Int16 GetZoom(void) const;
134 void SetViewOffset(const com::sun::star::awt::Point& rWinPos );
135 com::sun::star::awt::Point GetViewOffset() const;
137 void SetZoomType( sal_Int16 nType );
139 private:
140 DrawController& mrController;
141 DrawViewShell& mrDrawViewShell;
142 sd::View& mrView;
144 SdXImpressDocument* GetModel (void) const throw();
147 } // end of namespace sd
149 #endif