sync master with lastest vba changes
[ooovba.git] / binfilter / inc / bf_sch / chwindow.hxx
blob9737727f09d42377185a8dfe1f2bf68726f439f1
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: chwindow.hxx,v $
10 * $Revision: 1.7 $
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>
37 #endif
38 #ifndef _SV_WINDOW_HXX //autogen
39 #include <vcl/window.hxx>
40 #endif
41 #ifndef _SV_EVENT_HXX //autogen
42 #include <vcl/event.hxx>
43 #endif
44 #ifndef _TRANSFER_HXX //autogen
45 #include <bf_svtools/transfer.hxx>
46 #endif
47 namespace com { namespace sun { namespace star {
48 namespace accessibility {
49 class XAccessible;
51 }}}
52 namespace binfilter {
54 class SchViewShell;
55 class ChartModel;
57 //STRIP008 namespace com { namespace sun { namespace star {
58 //STRIP008 namespace accessibility {
59 //STRIP008 class XAccessible;
60 //STRIP008 }
61 //STRIP008 }}}
63 namespace accessibility
65 class AccessibleDocumentView;
68 /*************************************************************************
70 |* SchWindow beinhaltet den eigentlichen Arbeitsbereich von
71 |* SchViewShell
73 \************************************************************************/
74 class SchWindow : public Window, public DropTargetHelper
76 protected:
77 Point aWinPos;
78 Point aViewOrigin;
79 Size aViewSize;
81 SchViewShell* pViewShell;
84 // for quick help
86 /** Create an accessibility object that makes this window accessible.
88 @return
89 The returned reference is empty if no accessible object could be
90 created.
93 private:
94 // for quick help
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 >
99 m_xAccDocumentView;
101 public:
102 SchWindow(Window* pParent);
103 virtual ~SchWindow();
105 void SetViewShell(SchViewShell* pViewSh) { pViewShell=pViewSh; };
108 void SetZoom(long nZoom);
109 long SetZoomFactor(long nZoom);
111 long GetZoom() const
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; }
123 // DropTargetHelper
129 } //namespace binfilter
130 #endif // _SCH_SDWINDOW_HXX