Version 7.6.3.2-android, tag libreoffice-7.6.3.2-android
[LibreOffice.git] / sw / source / core / inc / DocumentDrawModelManager.hxx
blob26fd603a67e9681f9682877f5cf01ee20993ba77
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 #ifndef INCLUDED_SW_SOURCE_CORE_INC_DOCUMENTDRAWMODELMANAGER_HXX
21 #define INCLUDED_SW_SOURCE_CORE_INC_DOCUMENTDRAWMODELMANAGER_HXX
23 #include <IDocumentDrawModelAccess.hxx>
24 #include <svx/svdtypes.hxx>
25 #include <memory>
26 #include <drawdoc.hxx>
28 class SdrPageView;
29 class SwDoc;
31 namespace sw
33 class DocumentDrawModelManager final : public IDocumentDrawModelAccess
35 public:
36 DocumentDrawModelManager(SwDoc& i_rSwdoc);
38 void InitDrawModel();
39 void ReleaseDrawModel();
40 void DrawNotifyUndoHdl();
42 //IDocumentDrawModelAccess
43 virtual const SwDrawModel* GetDrawModel() const override;
44 virtual SwDrawModel* GetDrawModel() override;
45 virtual SwDrawModel* MakeDrawModel_() override;
46 virtual SwDrawModel* GetOrCreateDrawModel() override;
47 virtual SdrLayerID GetHeavenId() const override;
48 virtual SdrLayerID GetHellId() const override;
49 virtual SdrLayerID GetControlsId() const override;
50 virtual SdrLayerID GetInvisibleHeavenId() const override;
51 virtual SdrLayerID GetInvisibleHellId() const override;
52 virtual SdrLayerID GetInvisibleControlsId() const override;
54 virtual void NotifyInvisibleLayers(SdrPageView& _rSdrPageView) override;
56 virtual bool IsVisibleLayerId(SdrLayerID _nLayerId) const override;
58 virtual SdrLayerID GetInvisibleLayerIdByVisibleOne(SdrLayerID _nVisibleLayerId) override;
60 virtual bool Search(const SwPaM& rPaM, const SvxSearchItem& rSearchItem) override;
62 private:
63 DocumentDrawModelManager(DocumentDrawModelManager const&) = delete;
64 DocumentDrawModelManager& operator=(DocumentDrawModelManager const&) = delete;
66 SwDoc& m_rDoc;
68 std::unique_ptr<SwDrawModel> mpDrawModel;
70 /** Draw Model Layer IDs
71 * LayerIds, Heaven == above document
72 * Hell == below document
73 * Controls == at the very top
75 SdrLayerID mnHeaven;
76 SdrLayerID mnHell;
77 SdrLayerID mnControls;
78 SdrLayerID mnInvisibleHeaven;
79 SdrLayerID mnInvisibleHell;
80 SdrLayerID mnInvisibleControls;
84 #endif
86 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */