1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: chwindow.hxx,v $
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 _SCH_SDWINDOW_HXX
32 #define _SCH_SDWINDOW_HXX
35 #ifndef _GEN_HXX //autogen
36 #include <tools/gen.hxx>
38 #ifndef _SV_WINDOW_HXX //autogen
39 #include <vcl/window.hxx>
41 #ifndef _SV_EVENT_HXX //autogen
42 #include <vcl/event.hxx>
44 #ifndef _TRANSFER_HXX //autogen
45 #include <bf_svtools/transfer.hxx>
47 namespace com
{ namespace sun
{ namespace star
{
48 namespace accessibility
{
57 //STRIP008 namespace com { namespace sun { namespace star {
58 //STRIP008 namespace accessibility {
59 //STRIP008 class XAccessible;
63 namespace accessibility
65 class AccessibleDocumentView
;
68 /*************************************************************************
70 |* SchWindow beinhaltet den eigentlichen Arbeitsbereich von
73 \************************************************************************/
74 class SchWindow
: public Window
, public DropTargetHelper
81 SchViewShell
* pViewShell
;
86 /** Create an accessibility object that makes this window accessible.
89 The returned reference is empty if no accessible object could be
96 /// attention: this pointer is only valid, if the weak reference below is valid
97 ::binfilter::accessibility::AccessibleDocumentView
* m_pAccDocumentView
;
98 ::com::sun::star::uno::WeakReference
< ::com::sun::star::accessibility::XAccessible
>
102 SchWindow(Window
* pParent
);
103 virtual ~SchWindow();
105 void SetViewShell(SchViewShell
* pViewSh
) { pViewShell
=pViewSh
; };
108 void SetZoom(long nZoom
);
109 long SetZoomFactor(long nZoom
);
112 { return GetMapMode().GetScaleX().GetNumerator() * 100L /
113 GetMapMode().GetScaleX().GetDenominator(); }
115 void SetWinPos(const Point
& rPos
) { aWinPos
= rPos
; }
116 const Point
& GetWinPos() { return aWinPos
; }
117 void SetViewOrigin(const Point
& rPos
) { aViewOrigin
= rPos
; }
118 const Point
& GetViewOrigin() { return aViewOrigin
; }
119 void SetViewSize(const Size
& rSize
) { aViewSize
= rSize
; }
120 const Size
& GetViewSize() { return aViewSize
; }
129 } //namespace binfilter
130 #endif // _SCH_SDWINDOW_HXX