update dev300-m58
[ooovba.git] / sd / source / ui / inc / FrameView.hxx
blobb78a298962000af15c38bf5f2cbf763766c51136
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: FrameView.hxx,v $
10 * $Revision: 1.9.108.1 $
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_FRAME_VIEW_HXX
32 #define SD_FRAME_VIEW_HXX
34 #include "ViewShell.hxx"
35 #include <svx/svdview.hxx>
36 #include "pres.hxx"
38 class SdDrawDocument;
39 class SdOptions;
41 namespace sd {
43 /*************************************************************************
45 |* View fuer den MDIFrame
47 \************************************************************************/
48 class FrameView
49 : public SdrView
51 public:
52 SD_DLLPUBLIC FrameView(SdDrawDocument* pDrawDoc, FrameView* pFrameView = NULL );
53 FrameView(const FrameView& rFrameView);
54 virtual ~FrameView();
56 void Connect();
57 void Disconnect();
59 void Update(SdOptions* pOptions);
61 void SetStandardHelpLines(const SdrHelpLineList& rHelpLines)
62 { maStandardHelpLines = rHelpLines; }
63 const SdrHelpLineList& GetStandardHelpLines() { return maStandardHelpLines; }
64 void SetNotesHelpLines(const SdrHelpLineList& rHelpLines)
65 { maNotesHelpLines = rHelpLines; }
66 const SdrHelpLineList& GetNotesHelpLines() { return maNotesHelpLines; }
67 void SetHandoutHelpLines(const SdrHelpLineList& rHelpLines)
68 { maHandoutHelpLines = rHelpLines; }
69 const SdrHelpLineList& GetHandoutHelpLines() { return maHandoutHelpLines; }
71 void SetVisibleLayers(const SetOfByte& rVisibleLayers)
72 { maVisibleLayers = rVisibleLayers; }
73 const SetOfByte& GetVisibleLayers() { return maVisibleLayers; }
75 void SetLockedLayers(const SetOfByte& rLockedLayers)
76 { maLockedLayers = rLockedLayers; }
77 const SetOfByte& GetLockedLayers() { return maLockedLayers; }
79 void SetPrintableLayers(const SetOfByte& rPrintableLayers)
80 { maPrintableLayers = rPrintableLayers; }
81 const SetOfByte& GetPrintableLayers() { return maPrintableLayers; }
83 void SetRuler(const BOOL bRulerOn)
84 { mbRuler = bRulerOn; }
85 BOOL HasRuler() const { return mbRuler; }
87 void SetNoColors(const BOOL bNoCol)
88 { mbNoColors = bNoCol; }
89 BOOL IsNoColors() const { return mbNoColors; }
91 void SetNoAttribs(const BOOL bNoAttr)
92 { mbNoAttribs = bNoAttr; }
93 BOOL IsNoAttribs() const { return mbNoAttribs; }
95 void SetVisArea(const Rectangle& rVisArea)
96 { maVisArea = rVisArea; }
97 const Rectangle GetVisArea() { return maVisArea; }
99 void SetPageKind(PageKind eKind) { mePageKind = eKind; }
100 PageKind GetPageKind() const { return mePageKind; }
102 /** is used in FrameView::ReadUserDataSequence() only to store the
103 page kind that was selected while last saving this document */
104 void SetPageKindOnLoad(PageKind eKind) { mePageKindOnLoad = eKind; }
106 /** can be used to get the page kind that was selected on last save of this document */
107 PageKind GetPageKindOnLoad() const { return mePageKindOnLoad; }
109 SD_DLLPUBLIC void SetSelectedPage (USHORT nPage);
110 USHORT GetSelectedPage () const;
112 /** is used in FrameView::ReadUserDataSequence() only to store the
113 page that was selected while last saving this document */
114 void SetSelectedPageOnLoad (USHORT nPage) { mnSelectedPageOnLoad = nPage; }
116 /** can be used to get the page that was selected on last save of this document */
117 USHORT GetSelectedPageOnLoad () const { return mnSelectedPageOnLoad; }
119 SD_DLLPUBLIC void SetViewShEditMode(EditMode eMode, PageKind eKind);
120 EditMode GetViewShEditMode (PageKind eKind);
122 /** Remember the edit mode of the main view shell at the time when the
123 document is loaded.
125 void SetViewShEditModeOnLoad (const EditMode eMode);
127 /** Return the value of the edit mode as it was when the document was
128 loaded.
130 EditMode GetViewShEditModeOnLoad (void) const;
132 void SetLayerMode(BOOL bMode)
133 { mbLayerMode = bMode; }
134 BOOL IsLayerMode() const { return mbLayerMode; }
136 void SetQuickEdit(BOOL bQEdit)
137 { mbQuickEdit = bQEdit; }
138 BOOL IsQuickEdit() const { return mbQuickEdit; }
140 void SetBigHandles( BOOL bOn = TRUE ) { mbBigHandles = bOn; }
141 BOOL IsBigHandles() const { return mbBigHandles; }
143 void SetDoubleClickTextEdit( BOOL bOn = TRUE ) { mbDoubleClickTextEdit = bOn; }
144 BOOL IsDoubleClickTextEdit() const { return mbDoubleClickTextEdit; }
146 void SetClickChangeRotation( BOOL bOn = TRUE ) { mbClickChangeRotation = bOn; }
147 BOOL IsClickChangeRotation() const { return mbClickChangeRotation; }
149 /** Remember the type of the view shell that was (or soon will be)
150 previously associated with this frame view.
151 @param eType
152 The type of the previous view shell or ViewShell::ST_NONE to
153 indicate that there is no previous view shell.
155 void SetPreviousViewShellType (ViewShell::ShellType eType);
157 /** Return the type of the view shell previously associated with this
158 frame view.
160 ViewShell::ShellType GetPreviousViewShellType (void) const;
162 /** Remember the type of the view shell at the time when the document is
163 loaded or, rather, when the ViewShellBase is constructed.
165 void SetViewShellTypeOnLoad (ViewShell::ShellType eType);
167 ViewShell::ShellType GetViewShellTypeOnLoad (void) const;
169 void SetPresentationViewShellId(USHORT nId)
170 { mnPresViewShellId = nId; }
171 USHORT GetPresentationViewShellId() const { return mnPresViewShellId; }
173 void SetSlotId(USHORT nId) { mnSlotId = nId; }
174 USHORT GetSlotId() const { return mnSlotId; }
176 void SetSlidesPerRow(USHORT nSlides) { mnSlidesPerRow = nSlides; }
177 USHORT GetSlidesPerRow() const { return mnSlidesPerRow; }
179 void SetDrawMode(ULONG nNewDrawMode) { mnDrawMode = nNewDrawMode; };
180 ULONG GetDrawMode() const { return mnDrawMode; };
182 void SetTabCtrlPercent( double nPercent ) { mnTabCtrlPercent = nPercent; }
183 double GetTabCtrlPercent() const { return mnTabCtrlPercent; }
185 void SetIsNavigatorShowingAllShapes (const bool bIsNavigatorShowingAllShapes);
186 bool IsNavigatorShowingAllShapes (void) const;
188 virtual void WriteUserDataSequence ( ::com::sun::star::uno::Sequence < ::com::sun::star::beans::PropertyValue >&, sal_Bool bBrowse = sal_False );
189 virtual void ReadUserDataSequence ( const ::com::sun::star::uno::Sequence < ::com::sun::star::beans::PropertyValue >&, sal_Bool bBrowse = sal_False );
191 private:
192 USHORT mnRefCount;
193 VirtualDevice* mpVDev;
194 BOOL mbRuler;
195 SetOfByte maVisibleLayers;
196 SetOfByte maLockedLayers;
197 SetOfByte maPrintableLayers;
198 SdrHelpLineList maStandardHelpLines;
199 SdrHelpLineList maNotesHelpLines;
200 SdrHelpLineList maHandoutHelpLines;
201 BOOL mbNoColors; // Gliederungsmodus
202 BOOL mbNoAttribs; // Gliederungsmodus
203 Rectangle maVisArea; // Sichtbarer Bereich
204 PageKind mePageKind; // Seitentyp (Standard, Notizen, Handzettel)
205 USHORT mnSelectedPage; // Selektierte Seite
206 PageKind mePageKindOnLoad;
207 USHORT mnSelectedPageOnLoad;
208 EditMode meStandardEditMode; // Editmode im Zeichenmodus (Page/MasterPage)
209 EditMode meNotesEditMode; // Editmode im Notizen-Modus (Page/MasterPage)
210 EditMode meHandoutEditMode; // Editmode im Handzettel-Modus (Page/MasterPage)
211 EditMode meEditModeOnLoad;
212 BOOL mbLayerMode; // Layer an/aus
213 BOOL mbQuickEdit; // QuickEdit an/aus
214 BOOL mbBigHandles; // Grosse Handles
215 BOOL mbDoubleClickTextEdit; // Textmodus nach Doppelklick
216 BOOL mbClickChangeRotation; // Einfachklick wechselt Selektions-/Rotationsmodus
217 USHORT mnPresViewShellId; // ViewShell aus der die Pres. gestartet wurde
218 USHORT mnSlotId; // SlotId, welche initial ausgefuehrt wird
219 USHORT mnSlidesPerRow; // Dias pro Reihe auf dem Diatisch
220 ULONG mnDrawMode; // Drawmode fuer das normale Fenster
221 double mnTabCtrlPercent;
222 /** Remember whether the navigator shows all shapes (<TRUE/>) or only
223 the names ones (<FALSE/>). Not persistent.
225 bool mbIsNavigatorShowingAllShapes;
227 /** The type of the previous view shell. The (default) value
228 ViewShell::ST_NONE indicates that there was no previous view shell.
229 Note that this value is used only temporarily and is not saved or
230 restored.
232 ViewShell::ShellType mePreviousViewShellType;
234 ViewShell::ShellType meViewShellTypeOnLoad;
237 } // end of namespace sd
239 #endif