1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #ifndef SD_FRAME_VIEW_HXX
21 #define SD_FRAME_VIEW_HXX
23 #include "ViewShell.hxx"
24 #include <svx/svdview.hxx>
35 class SD_DLLPUBLIC FrameView
39 FrameView(SdDrawDocument
* pDrawDoc
, FrameView
* pFrameView
= NULL
);
40 FrameView(const FrameView
& rFrameView
);
46 void Update(SdOptions
* pOptions
);
48 void SetStandardHelpLines(const SdrHelpLineList
& rHelpLines
)
49 { maStandardHelpLines
= rHelpLines
; }
50 const SdrHelpLineList
& GetStandardHelpLines() { return maStandardHelpLines
; }
51 void SetNotesHelpLines(const SdrHelpLineList
& rHelpLines
)
52 { maNotesHelpLines
= rHelpLines
; }
53 const SdrHelpLineList
& GetNotesHelpLines() { return maNotesHelpLines
; }
54 void SetHandoutHelpLines(const SdrHelpLineList
& rHelpLines
)
55 { maHandoutHelpLines
= rHelpLines
; }
56 const SdrHelpLineList
& GetHandoutHelpLines() { return maHandoutHelpLines
; }
58 void SetVisibleLayers(const SetOfByte
& rVisibleLayers
)
59 { maVisibleLayers
= rVisibleLayers
; }
60 const SetOfByte
& GetVisibleLayers() { return maVisibleLayers
; }
62 void SetLockedLayers(const SetOfByte
& rLockedLayers
)
63 { maLockedLayers
= rLockedLayers
; }
64 const SetOfByte
& GetLockedLayers() { return maLockedLayers
; }
66 void SetPrintableLayers(const SetOfByte
& rPrintableLayers
)
67 { maPrintableLayers
= rPrintableLayers
; }
68 const SetOfByte
& GetPrintableLayers() { return maPrintableLayers
; }
70 void SetRuler(const sal_Bool bRulerOn
)
71 { mbRuler
= bRulerOn
; }
72 sal_Bool
HasRuler() const { return mbRuler
; }
74 void SetNoColors(const sal_Bool bNoCol
)
75 { mbNoColors
= bNoCol
; }
76 sal_Bool
IsNoColors() const { return mbNoColors
; }
78 void SetNoAttribs(const sal_Bool bNoAttr
)
79 { mbNoAttribs
= bNoAttr
; }
80 sal_Bool
IsNoAttribs() const { return mbNoAttribs
; }
82 void SetVisArea(const Rectangle
& rVisArea
)
83 { maVisArea
= rVisArea
; }
84 const Rectangle
GetVisArea() { return maVisArea
; }
86 void SetPageKind(PageKind eKind
) { mePageKind
= eKind
; }
87 PageKind
GetPageKind() const { return mePageKind
; }
89 /** is used in FrameView::ReadUserDataSequence() only to store the
90 page kind that was selected while last saving this document */
91 void SetPageKindOnLoad(PageKind eKind
) { mePageKindOnLoad
= eKind
; }
93 /** can be used to get the page kind that was selected on last save of this document */
94 PageKind
GetPageKindOnLoad() const { return mePageKindOnLoad
; }
96 void SetSelectedPage (sal_uInt16 nPage
);
97 sal_uInt16
GetSelectedPage () const;
99 /** is used in FrameView::ReadUserDataSequence() only to store the
100 page that was selected while last saving this document */
101 void SetSelectedPageOnLoad (sal_uInt16 nPage
) { mnSelectedPageOnLoad
= nPage
; }
103 /** can be used to get the page that was selected on last save of this document */
104 sal_uInt16
GetSelectedPageOnLoad () const { return mnSelectedPageOnLoad
; }
106 void SetViewShEditMode(EditMode eMode
, PageKind eKind
);
107 EditMode
GetViewShEditMode (PageKind eKind
);
109 /** Remember the edit mode of the main view shell at the time when the
112 void SetViewShEditModeOnLoad (const EditMode eMode
);
114 /** Return the value of the edit mode as it was when the document was
117 EditMode
GetViewShEditModeOnLoad (void) const;
119 void SetLayerMode(sal_Bool bMode
)
120 { mbLayerMode
= bMode
; }
121 sal_Bool
IsLayerMode() const { return mbLayerMode
; }
123 void SetQuickEdit(sal_Bool bQEdit
)
124 { mbQuickEdit
= bQEdit
; }
125 sal_Bool
IsQuickEdit() const { return mbQuickEdit
; }
127 void SetDoubleClickTextEdit( sal_Bool bOn
= sal_True
) { mbDoubleClickTextEdit
= bOn
; }
128 sal_Bool
IsDoubleClickTextEdit() const { return mbDoubleClickTextEdit
; }
130 void SetClickChangeRotation( sal_Bool bOn
= sal_True
) { mbClickChangeRotation
= bOn
; }
131 sal_Bool
IsClickChangeRotation() const { return mbClickChangeRotation
; }
133 /** Remember the type of the view shell that was (or soon will be)
134 previously associated with this frame view.
136 The type of the previous view shell or ViewShell::ST_NONE to
137 indicate that there is no previous view shell.
139 void SetPreviousViewShellType (ViewShell::ShellType eType
);
141 /** Return the type of the view shell previously associated with this
144 ViewShell::ShellType
GetPreviousViewShellType (void) const;
146 /** Remember the type of the view shell at the time when the document is
147 loaded or, rather, when the ViewShellBase is constructed.
149 void SetViewShellTypeOnLoad (ViewShell::ShellType eType
);
151 ViewShell::ShellType
GetViewShellTypeOnLoad (void) const;
153 void SetPresentationViewShellId(sal_uInt16 nId
)
154 { mnPresViewShellId
= nId
; }
155 sal_uInt16
GetPresentationViewShellId() const { return mnPresViewShellId
; }
157 void SetSlotId(sal_uInt16 nId
) { mnSlotId
= nId
; }
158 sal_uInt16
GetSlotId() const { return mnSlotId
; }
160 void SetSlidesPerRow(sal_uInt16 nSlides
) { mnSlidesPerRow
= nSlides
; }
161 sal_uInt16
GetSlidesPerRow() const { return mnSlidesPerRow
; }
163 void SetDrawMode(sal_uLong nNewDrawMode
) { mnDrawMode
= nNewDrawMode
; };
164 sal_uLong
GetDrawMode() const { return mnDrawMode
; };
166 void SetTabCtrlPercent( double nPercent
) { mnTabCtrlPercent
= nPercent
; }
167 double GetTabCtrlPercent() const { return mnTabCtrlPercent
; }
169 void SetIsNavigatorShowingAllShapes (const bool bIsNavigatorShowingAllShapes
);
170 bool IsNavigatorShowingAllShapes (void) const;
172 virtual void WriteUserDataSequence ( ::com::sun::star::uno::Sequence
< ::com::sun::star::beans::PropertyValue
>&, sal_Bool bBrowse
= sal_False
);
173 virtual void ReadUserDataSequence ( const ::com::sun::star::uno::Sequence
< ::com::sun::star::beans::PropertyValue
>&, sal_Bool bBrowse
= sal_False
);
176 sal_uInt16 mnRefCount
;
177 VirtualDevice
* mpVDev
;
179 SetOfByte maVisibleLayers
;
180 SetOfByte maLockedLayers
;
181 SetOfByte maPrintableLayers
;
182 SdrHelpLineList maStandardHelpLines
;
183 SdrHelpLineList maNotesHelpLines
;
184 SdrHelpLineList maHandoutHelpLines
;
185 sal_Bool mbNoColors
; ///< structuring mode
186 sal_Bool mbNoAttribs
; ///< structuring mode
187 Rectangle maVisArea
; ///< visible area
188 PageKind mePageKind
; ///< kind of page (standard, notes, handout)
189 sal_uInt16 mnSelectedPage
;
190 PageKind mePageKindOnLoad
;
191 sal_uInt16 mnSelectedPageOnLoad
;
192 EditMode meStandardEditMode
; ///< edit mode in drawing mode (Page/MasterPage)
193 EditMode meNotesEditMode
; ///< edit mode in notes mode (Page/MasterPage)
194 EditMode meHandoutEditMode
; ///< edit mode in handout mode (Page/MasterPage)
195 EditMode meEditModeOnLoad
;
196 sal_Bool mbLayerMode
; ///< layer on/off
197 sal_Bool mbQuickEdit
; ///< QuickEdit on/off
198 sal_Bool mbDoubleClickTextEdit
; ///< text mode after double click
199 sal_Bool mbClickChangeRotation
; ///< single click switches between selection/rotation mode
200 sal_uInt16 mnPresViewShellId
; ///< ViewShell from which the presentation was started
201 sal_uInt16 mnSlotId
; ///< SlotId, which was initial mentioned
202 sal_uInt16 mnSlidesPerRow
; ///< slides per row on the slide-desk
203 sal_uLong mnDrawMode
; ///< draw mode for the normal window
204 double mnTabCtrlPercent
;
205 /** Remember whether the navigator shows all shapes (<TRUE/>) or only
206 the names ones (<FALSE/>). Not persistent.
208 bool mbIsNavigatorShowingAllShapes
;
210 /** The type of the previous view shell. The (default) value
211 ViewShell::ST_NONE indicates that there was no previous view shell.
212 Note that this value is used only temporarily and is not saved or
215 ViewShell::ShellType mePreviousViewShellType
;
217 ViewShell::ShellType meViewShellTypeOnLoad
;
220 } // end of namespace sd
224 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */