1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*************************************************************************
4 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
6 * Copyright 2000, 2010 Oracle and/or its affiliates.
8 * OpenOffice.org - a multi-platform office productivity suite
10 * This file is part of OpenOffice.org.
12 * OpenOffice.org is free software: you can redistribute it and/or modify
13 * it under the terms of the GNU Lesser General Public License version 3
14 * only, as published by the Free Software Foundation.
16 * OpenOffice.org is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU Lesser General Public License version 3 for more details
20 * (a copy is included in the LICENSE file that accompanied this code).
22 * You should have received a copy of the GNU Lesser General Public License
23 * version 3 along with OpenOffice.org. If not, see
24 * <http://www.openoffice.org/license.html>
25 * for a copy of the LGPLv3 License.
27 ************************************************************************/
29 #ifndef SD_FRAME_VIEW_HXX
30 #define SD_FRAME_VIEW_HXX
32 #include "ViewShell.hxx"
33 #include <svx/svdview.hxx>
41 /*************************************************************************
43 |* View fuer den MDIFrame
45 \************************************************************************/
50 SD_DLLPUBLIC
FrameView(SdDrawDocument
* pDrawDoc
, FrameView
* pFrameView
= NULL
);
51 FrameView(const FrameView
& rFrameView
);
57 void Update(SdOptions
* pOptions
);
59 void SetStandardHelpLines(const SdrHelpLineList
& rHelpLines
)
60 { maStandardHelpLines
= rHelpLines
; }
61 const SdrHelpLineList
& GetStandardHelpLines() { return maStandardHelpLines
; }
62 void SetNotesHelpLines(const SdrHelpLineList
& rHelpLines
)
63 { maNotesHelpLines
= rHelpLines
; }
64 const SdrHelpLineList
& GetNotesHelpLines() { return maNotesHelpLines
; }
65 void SetHandoutHelpLines(const SdrHelpLineList
& rHelpLines
)
66 { maHandoutHelpLines
= rHelpLines
; }
67 const SdrHelpLineList
& GetHandoutHelpLines() { return maHandoutHelpLines
; }
69 void SetVisibleLayers(const SetOfByte
& rVisibleLayers
)
70 { maVisibleLayers
= rVisibleLayers
; }
71 const SetOfByte
& GetVisibleLayers() { return maVisibleLayers
; }
73 void SetLockedLayers(const SetOfByte
& rLockedLayers
)
74 { maLockedLayers
= rLockedLayers
; }
75 const SetOfByte
& GetLockedLayers() { return maLockedLayers
; }
77 void SetPrintableLayers(const SetOfByte
& rPrintableLayers
)
78 { maPrintableLayers
= rPrintableLayers
; }
79 const SetOfByte
& GetPrintableLayers() { return maPrintableLayers
; }
81 void SetRuler(const BOOL bRulerOn
)
82 { mbRuler
= bRulerOn
; }
83 BOOL
HasRuler() const { return mbRuler
; }
85 void SetNoColors(const BOOL bNoCol
)
86 { mbNoColors
= bNoCol
; }
87 BOOL
IsNoColors() const { return mbNoColors
; }
89 void SetNoAttribs(const BOOL bNoAttr
)
90 { mbNoAttribs
= bNoAttr
; }
91 BOOL
IsNoAttribs() const { return mbNoAttribs
; }
93 void SetVisArea(const Rectangle
& rVisArea
)
94 { maVisArea
= rVisArea
; }
95 const Rectangle
GetVisArea() { return maVisArea
; }
97 void SetPageKind(PageKind eKind
) { mePageKind
= eKind
; }
98 PageKind
GetPageKind() const { return mePageKind
; }
100 /** is used in FrameView::ReadUserDataSequence() only to store the
101 page kind that was selected while last saving this document */
102 void SetPageKindOnLoad(PageKind eKind
) { mePageKindOnLoad
= eKind
; }
104 /** can be used to get the page kind that was selected on last save of this document */
105 PageKind
GetPageKindOnLoad() const { return mePageKindOnLoad
; }
107 SD_DLLPUBLIC
void SetSelectedPage (USHORT nPage
);
108 USHORT
GetSelectedPage () const;
110 /** is used in FrameView::ReadUserDataSequence() only to store the
111 page that was selected while last saving this document */
112 void SetSelectedPageOnLoad (USHORT nPage
) { mnSelectedPageOnLoad
= nPage
; }
114 /** can be used to get the page that was selected on last save of this document */
115 USHORT
GetSelectedPageOnLoad () const { return mnSelectedPageOnLoad
; }
117 SD_DLLPUBLIC
void SetViewShEditMode(EditMode eMode
, PageKind eKind
);
118 EditMode
GetViewShEditMode (PageKind eKind
);
120 /** Remember the edit mode of the main view shell at the time when the
123 void SetViewShEditModeOnLoad (const EditMode eMode
);
125 /** Return the value of the edit mode as it was when the document was
128 EditMode
GetViewShEditModeOnLoad (void) const;
130 void SetLayerMode(BOOL bMode
)
131 { mbLayerMode
= bMode
; }
132 BOOL
IsLayerMode() const { return mbLayerMode
; }
134 void SetQuickEdit(BOOL bQEdit
)
135 { mbQuickEdit
= bQEdit
; }
136 BOOL
IsQuickEdit() const { return mbQuickEdit
; }
138 void SetBigHandles( BOOL bOn
= TRUE
) { mbBigHandles
= bOn
; }
139 BOOL
IsBigHandles() const { return mbBigHandles
; }
141 void SetDoubleClickTextEdit( BOOL bOn
= TRUE
) { mbDoubleClickTextEdit
= bOn
; }
142 BOOL
IsDoubleClickTextEdit() const { return mbDoubleClickTextEdit
; }
144 void SetClickChangeRotation( BOOL bOn
= TRUE
) { mbClickChangeRotation
= bOn
; }
145 BOOL
IsClickChangeRotation() const { return mbClickChangeRotation
; }
147 /** Remember the type of the view shell that was (or soon will be)
148 previously associated with this frame view.
150 The type of the previous view shell or ViewShell::ST_NONE to
151 indicate that there is no previous view shell.
153 void SetPreviousViewShellType (ViewShell::ShellType eType
);
155 /** Return the type of the view shell previously associated with this
158 ViewShell::ShellType
GetPreviousViewShellType (void) const;
160 /** Remember the type of the view shell at the time when the document is
161 loaded or, rather, when the ViewShellBase is constructed.
163 void SetViewShellTypeOnLoad (ViewShell::ShellType eType
);
165 ViewShell::ShellType
GetViewShellTypeOnLoad (void) const;
167 void SetPresentationViewShellId(USHORT nId
)
168 { mnPresViewShellId
= nId
; }
169 USHORT
GetPresentationViewShellId() const { return mnPresViewShellId
; }
171 void SetSlotId(USHORT nId
) { mnSlotId
= nId
; }
172 USHORT
GetSlotId() const { return mnSlotId
; }
174 void SetSlidesPerRow(USHORT nSlides
) { mnSlidesPerRow
= nSlides
; }
175 USHORT
GetSlidesPerRow() const { return mnSlidesPerRow
; }
177 void SetDrawMode(ULONG nNewDrawMode
) { mnDrawMode
= nNewDrawMode
; };
178 ULONG
GetDrawMode() const { return mnDrawMode
; };
180 void SetTabCtrlPercent( double nPercent
) { mnTabCtrlPercent
= nPercent
; }
181 double GetTabCtrlPercent() const { return mnTabCtrlPercent
; }
183 void SetIsNavigatorShowingAllShapes (const bool bIsNavigatorShowingAllShapes
);
184 bool IsNavigatorShowingAllShapes (void) const;
186 virtual void WriteUserDataSequence ( ::com::sun::star::uno::Sequence
< ::com::sun::star::beans::PropertyValue
>&, sal_Bool bBrowse
= sal_False
);
187 virtual void ReadUserDataSequence ( const ::com::sun::star::uno::Sequence
< ::com::sun::star::beans::PropertyValue
>&, sal_Bool bBrowse
= sal_False
);
191 VirtualDevice
* mpVDev
;
193 SetOfByte maVisibleLayers
;
194 SetOfByte maLockedLayers
;
195 SetOfByte maPrintableLayers
;
196 SdrHelpLineList maStandardHelpLines
;
197 SdrHelpLineList maNotesHelpLines
;
198 SdrHelpLineList maHandoutHelpLines
;
199 BOOL mbNoColors
; // Gliederungsmodus
200 BOOL mbNoAttribs
; // Gliederungsmodus
201 Rectangle maVisArea
; // Sichtbarer Bereich
202 PageKind mePageKind
; // Seitentyp (Standard, Notizen, Handzettel)
203 USHORT mnSelectedPage
; // Selektierte Seite
204 PageKind mePageKindOnLoad
;
205 USHORT mnSelectedPageOnLoad
;
206 EditMode meStandardEditMode
; // Editmode im Zeichenmodus (Page/MasterPage)
207 EditMode meNotesEditMode
; // Editmode im Notizen-Modus (Page/MasterPage)
208 EditMode meHandoutEditMode
; // Editmode im Handzettel-Modus (Page/MasterPage)
209 EditMode meEditModeOnLoad
;
210 BOOL mbLayerMode
; // Layer an/aus
211 BOOL mbQuickEdit
; // QuickEdit an/aus
212 BOOL mbBigHandles
; // Grosse Handles
213 BOOL mbDoubleClickTextEdit
; // Textmodus nach Doppelklick
214 BOOL mbClickChangeRotation
; // Einfachklick wechselt Selektions-/Rotationsmodus
215 USHORT mnPresViewShellId
; // ViewShell aus der die Pres. gestartet wurde
216 USHORT mnSlotId
; // SlotId, welche initial ausgefuehrt wird
217 USHORT mnSlidesPerRow
; // Dias pro Reihe auf dem Diatisch
218 ULONG mnDrawMode
; // Drawmode fuer das normale Fenster
219 double mnTabCtrlPercent
;
220 /** Remember whether the navigator shows all shapes (<TRUE/>) or only
221 the names ones (<FALSE/>). Not persistent.
223 bool mbIsNavigatorShowingAllShapes
;
225 /** The type of the previous view shell. The (default) value
226 ViewShell::ST_NONE indicates that there was no previous view shell.
227 Note that this value is used only temporarily and is not saved or
230 ViewShell::ShellType mePreviousViewShellType
;
232 ViewShell::ShellType meViewShellTypeOnLoad
;
235 } // end of namespace sd
239 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */