reintroduce ScCaptionPtr
[LibreOffice.git] / sc / source / ui / inc / notemark.hxx
blob81f1d7cb205676dd7f8a9f57c0ffb47ae0543c65
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_SC_SOURCE_UI_INC_NOTEMARK_HXX
21 #define INCLUDED_SC_SOURCE_UI_INC_NOTEMARK_HXX
23 #include <vcl/mapmod.hxx>
24 #include <vcl/timer.hxx>
25 #include <vcl/vclptr.hxx>
26 #include <tools/gen.hxx>
27 #include <address.hxx>
28 #include <postit.hxx>
30 namespace vcl { class Window; }
32 class SdrModel;
33 class SdrCaptionObj;
35 class ScNoteMarker
37 private:
38 VclPtr<vcl::Window> m_pWindow;
39 VclPtr<vcl::Window> m_pRightWin;
40 VclPtr<vcl::Window> m_pBottomWin;
41 VclPtr<vcl::Window> m_pDiagWin;
42 ScDocument* m_pDoc;
43 ScAddress const m_aDocPos;
44 OUString const m_aUserText;
45 tools::Rectangle m_aVisRect;
46 Timer m_aTimer;
47 MapMode const m_aMapMode;
48 bool const m_bLeft;
49 bool const m_bByKeyboard;
51 tools::Rectangle m_aRect;
52 std::unique_ptr<SdrModel> m_pModel;
53 ScCaptionPtr m_xObject;
54 bool m_bVisible;
55 DECL_LINK( TimeHdl, Timer*, void );
57 public:
58 ScNoteMarker( vcl::Window* pWin, vcl::Window* pRight, vcl::Window* pBottom, vcl::Window* pDiagonal,
59 ScDocument* pD, const ScAddress& aPos, const OUString& rUser,
60 const MapMode& rMap, bool bLeftEdge, bool bForce, bool bKeyboard);
61 ~ScNoteMarker();
63 void Draw();
64 void InvalidateWin();
66 const ScAddress& GetDocPos() const { return m_aDocPos; }
67 bool IsByKeyboard() const { return m_bByKeyboard; }
70 #endif
72 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */