cid#1607171 Data race condition
[LibreOffice.git] / sd / source / ui / inc / view / viewoverlaymanager.hxx
blob3a5c98deb3bd0652a8d2873907ee470a0a0c793a
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 <rtl/ref.hxx>
23 #include <tools/link.hxx>
24 #include <svl/lstner.hxx>
26 #include <vector>
28 namespace sd
30 class SmartTag;
32 namespace sd::tools
34 class EventMultiplexerEvent;
36 namespace sd
38 class ViewShellBase;
40 struct ImplSVEvent;
42 namespace sd
44 typedef std::vector<rtl::Reference<SmartTag>> ViewTagVector;
46 class ViewOverlayManager final : public SfxListener
48 public:
49 ViewOverlayManager(ViewShellBase& rViewShellBase);
50 virtual ~ViewOverlayManager() override;
52 void onZoomChanged();
53 void UpdateTags();
55 DECL_LINK(EventMultiplexerListener, tools::EventMultiplexerEvent&, void);
56 DECL_LINK(UpdateTagsHdl, void*, void);
58 bool CreateTags();
59 bool DisposeTags();
61 virtual void Notify(SfxBroadcaster& rBC, const SfxHint& rHint) override;
63 private:
64 ViewShellBase& mrBase;
65 ImplSVEvent* mnUpdateTagsEvent;
67 ViewTagVector maTagVector;
71 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */