Revert "tdf#158280 Replace usage of InputDialog with SvxNameDialog"
[LibreOffice.git] / sd / source / ui / inc / FrameView.hxx
blob0675814c3a230ec897f64b41696004de6f29019a
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
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 #pragma once
22 #include "ViewShell.hxx"
23 #include <svx/svdview.hxx>
24 #include <pres.hxx>
26 class SdDrawDocument;
27 class SdOptions;
29 namespace sd {
31 /**
32 * View for MDIFrame
34 class FrameView final
35 : public SdrView
37 public:
38 FrameView(SdDrawDocument* pDrawDoc, FrameView* pFrameView = nullptr );
39 FrameView(const FrameView& rFrameView);
40 virtual ~FrameView() override;
42 void Connect();
43 void Disconnect();
45 void Update(SdOptions const * pOptions);
47 void SetStandardHelpLines(const SdrHelpLineList& rHelpLines)
48 { maStandardHelpLines = rHelpLines; }
49 const SdrHelpLineList& GetStandardHelpLines() const { return maStandardHelpLines; }
50 void SetNotesHelpLines(const SdrHelpLineList& rHelpLines)
51 { maNotesHelpLines = rHelpLines; }
52 const SdrHelpLineList& GetNotesHelpLines() const { return maNotesHelpLines; }
53 void SetHandoutHelpLines(const SdrHelpLineList& rHelpLines)
54 { maHandoutHelpLines = rHelpLines; }
55 const SdrHelpLineList& GetHandoutHelpLines() const { return maHandoutHelpLines; }
57 void SetVisibleLayers(const SdrLayerIDSet& rVisibleLayers)
58 { maVisibleLayers = rVisibleLayers; }
59 const SdrLayerIDSet& GetVisibleLayers() const { return maVisibleLayers; }
61 void SetLockedLayers(const SdrLayerIDSet& rLockedLayers)
62 { maLockedLayers = rLockedLayers; }
63 const SdrLayerIDSet& GetLockedLayers() const { return maLockedLayers; }
65 void SetPrintableLayers(const SdrLayerIDSet& rPrintableLayers)
66 { maPrintableLayers = rPrintableLayers; }
67 const SdrLayerIDSet& GetPrintableLayers() const { return maPrintableLayers; }
69 void SetRuler(const bool bRulerOn)
70 { mbRuler = bRulerOn; }
71 bool HasRuler() const { return mbRuler; }
73 void SetNoColors(const bool bNoCol)
74 { mbNoColors = bNoCol; }
75 bool IsNoColors() const { return mbNoColors; }
77 void SetNoAttribs(const bool bNoAttr)
78 { mbNoAttribs = bNoAttr; }
79 bool IsNoAttribs() const { return mbNoAttribs; }
81 void SetVisArea(const ::tools::Rectangle& rVisArea)
82 { maVisArea = rVisArea; }
83 const ::tools::Rectangle& GetVisArea() const { return maVisArea; }
85 void SetPageKind(PageKind eKind) { mePageKind = eKind; }
86 PageKind GetPageKind() const { return mePageKind; }
88 /** is used in FrameView::ReadUserDataSequence() only to store the
89 page kind that was selected while last saving this document */
90 void SetPageKindOnLoad(PageKind eKind) { mePageKindOnLoad = eKind; }
92 /** can be used to get the page kind that was selected on last save of this document */
93 PageKind GetPageKindOnLoad() const { return mePageKindOnLoad; }
95 void SetSelectedPage (sal_uInt16 nPage);
96 sal_uInt16 GetSelectedPage () const { return mnSelectedPage;}
98 /** is used in FrameView::ReadUserDataSequence() only to store the
99 page that was selected while last saving this document */
100 void SetSelectedPageOnLoad (sal_uInt16 nPage) { mnSelectedPageOnLoad = nPage; }
102 /** can be used to get the page that was selected on last save of this document */
103 sal_uInt16 GetSelectedPageOnLoad () const { return mnSelectedPageOnLoad; }
105 void SetViewShEditMode(EditMode eMode);
106 EditMode GetViewShEditMode () const;
108 /** Remember the edit mode of the main view shell at the time when the
109 document is loaded.
111 void SetViewShEditModeOnLoad (const EditMode eMode);
113 /** Return the value of the edit mode as it was when the document was
114 loaded.
116 EditMode GetViewShEditModeOnLoad() const { return meEditModeOnLoad;}
118 void SetLayerMode(bool bMode)
119 { mbLayerMode = bMode; }
120 bool IsLayerMode() const { return mbLayerMode; }
122 void SetQuickEdit(bool bQEdit)
123 { mbQuickEdit = bQEdit; }
124 bool IsQuickEdit() const { return mbQuickEdit; }
126 void SetDoubleClickTextEdit( bool bOn ) { mbDoubleClickTextEdit = bOn; }
127 bool IsDoubleClickTextEdit() const { return mbDoubleClickTextEdit; }
129 void SetClickChangeRotation( bool bOn ) { mbClickChangeRotation = bOn; }
130 bool IsClickChangeRotation() const { return mbClickChangeRotation; }
132 /** Remember the type of the view shell that was (or soon will be)
133 previously associated with this frame view.
134 @param eType
135 The type of the previous view shell or ViewShell::ST_NONE to
136 indicate that there is no previous view shell.
138 void SetPreviousViewShellType (ViewShell::ShellType eType);
140 /** Return the type of the view shell previously associated with this
141 frame view.
143 ViewShell::ShellType GetPreviousViewShellType() const { return mePreviousViewShellType;}
145 /** Remember the type of the view shell at the time when the document is
146 loaded or, rather, when the ViewShellBase is constructed.
148 void SetViewShellTypeOnLoad (ViewShell::ShellType eType);
150 ViewShell::ShellType GetViewShellTypeOnLoad() const { return meViewShellTypeOnLoad;}
152 void SetPresentationViewShellId(sal_uInt16 nId)
153 { mnPresViewShellId = nId; }
154 sal_uInt16 GetPresentationViewShellId() const { return mnPresViewShellId; }
156 void SetSlidesPerRow(sal_uInt16 nSlides) { mnSlidesPerRow = nSlides; }
157 sal_uInt16 GetSlidesPerRow() const { return mnSlidesPerRow; }
159 void SetDrawMode(DrawModeFlags nNewDrawMode) { mnDrawMode = nNewDrawMode; };
160 DrawModeFlags GetDrawMode() const { return mnDrawMode; };
162 void SetIsNavigatorShowingAllShapes (const bool bIsNavigatorShowingAllShapes);
163 bool IsNavigatorShowingAllShapes() const { return mbIsNavigatorShowingAllShapes;}
165 void WriteUserDataSequence ( css::uno::Sequence < css::beans::PropertyValue >& );
166 void ReadUserDataSequence ( const css::uno::Sequence < css::beans::PropertyValue >& );
168 private:
169 sal_uInt16 mnRefCount;
170 bool mbRuler;
171 SdrLayerIDSet maVisibleLayers;
172 SdrLayerIDSet maLockedLayers;
173 SdrLayerIDSet maPrintableLayers;
174 SdrHelpLineList maStandardHelpLines;
175 SdrHelpLineList maNotesHelpLines;
176 SdrHelpLineList maHandoutHelpLines;
177 bool mbNoColors; ///< structuring mode
178 bool mbNoAttribs; ///< structuring mode
179 ::tools::Rectangle maVisArea; ///< visible area
180 PageKind mePageKind; ///< kind of page (standard, notes, handout)
181 sal_uInt16 mnSelectedPage;
182 PageKind mePageKindOnLoad;
183 sal_uInt16 mnSelectedPageOnLoad;
184 EditMode mePageEditMode; ///< edit mode in drawing mode (Page/MasterPage)
185 // EditMode meStandardEditMode; ///< edit mode in drawing mode (Page/MasterPage)
186 // EditMode meNotesEditMode; ///< edit mode in notes mode (Page/MasterPage)
187 // EditMode meHandoutEditMode; ///< edit mode in handout mode (Page/MasterPage)
188 EditMode meEditModeOnLoad;
189 bool mbLayerMode; ///< layer on/off
190 bool mbQuickEdit; ///< QuickEdit on/off
191 bool mbDoubleClickTextEdit; ///< text mode after double click
192 bool mbClickChangeRotation; ///< single click switches between selection/rotation mode
193 sal_uInt16 mnPresViewShellId; ///< ViewShell from which the presentation was started
194 sal_uInt16 mnSlidesPerRow; ///< slides per row on the slide-desk
195 DrawModeFlags mnDrawMode; ///< draw mode for the normal window
196 /** Remember whether the navigator shows all shapes (<TRUE/>) or only
197 the names ones (<FALSE/>). Not persistent.
199 bool mbIsNavigatorShowingAllShapes;
201 /** The type of the previous view shell. The (default) value
202 ViewShell::ST_NONE indicates that there was no previous view shell.
203 Note that this value is used only temporarily and is not saved or
204 restored.
206 ViewShell::ShellType mePreviousViewShellType;
208 ViewShell::ShellType meViewShellTypeOnLoad;
211 } // end of namespace sd
213 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */