/src/libreoffice/sd/source/ui/inc/NotesPanelView.hxx
Line | Count | Source |
1 | | /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */ |
2 | | /* |
3 | | * This file is part of the LibreOffice project. |
4 | | * |
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/. |
8 | | */ |
9 | | |
10 | | #pragma once |
11 | | |
12 | | #include "OutlineView.hxx" |
13 | | #include <Outliner.hxx> |
14 | | |
15 | | class SdrTextObj; |
16 | | |
17 | | namespace sdtools |
18 | | { |
19 | | class EventMultiplexerEvent; |
20 | | } |
21 | | |
22 | | namespace sd |
23 | | { |
24 | | class DrawDocShell; |
25 | | class NotesPanelViewShell; |
26 | | |
27 | | /** |
28 | | * Derivative of ::sd::SimpleOutlinerView for the notes panel |
29 | | |* |
30 | | \************************************************************************/ |
31 | | |
32 | | class NotesPanelView final : public ::sd::SimpleOutlinerView |
33 | | { |
34 | | NotesPanelViewShell& mrNotesPanelViewShell; |
35 | | SdOutliner maOutliner; |
36 | | OutlinerView maOutlinerView; |
37 | | |
38 | | Idle aModifyIdle; |
39 | | |
40 | | bool mbInFocus = false; |
41 | | |
42 | | void getNotesFromDoc(); |
43 | | void setNotesToDoc(); |
44 | | SdrTextObj* getNotesTextObj(); |
45 | | |
46 | | public: |
47 | | NotesPanelView(DrawDocShell& rDocSh, vcl::Window* pWindow, |
48 | | NotesPanelViewShell& rNotesPanelViewSh); |
49 | | virtual ~NotesPanelView() override; |
50 | | |
51 | | void Paint(const ::tools::Rectangle& rRect, ::sd::Window const* pWin); |
52 | | void onResize(); |
53 | | void onGrabFocus(); |
54 | | void onLoseFocus(); |
55 | | |
56 | | OutlinerView* GetOutlinerView(); |
57 | | OutlinerView* GetViewByWindow(vcl::Window const* pWin) const override; |
58 | | |
59 | 0 | SdOutliner& GetOutliner() { return maOutliner; } |
60 | | |
61 | | void FillOutliner(); |
62 | | void onUpdateStyleSettings(); |
63 | | virtual SvtScriptType GetScriptType() const override; |
64 | | |
65 | | void SetLinks(); |
66 | | void ResetLinks(); |
67 | | |
68 | | virtual void GetAttributes(SfxItemSet& rTargetSet, bool bOnlyHardAttr = false) const override; |
69 | | virtual bool SetAttributes(const SfxItemSet& rSet, bool bReplaceAll = false, |
70 | | bool bSlide = false, bool bMaster = false) override; |
71 | | |
72 | | // SdrObjEditView's Outliner access overrides to use TextObjectBar implementations. |
73 | 0 | virtual const SdrOutliner* GetTextEditOutliner() const override { return &maOutliner; } |
74 | 0 | virtual SdrOutliner* GetTextEditOutliner() override { return &maOutliner; } |
75 | 0 | virtual const OutlinerView* GetTextEditOutlinerView() const override { return &maOutlinerView; } |
76 | 0 | virtual OutlinerView* GetTextEditOutlinerView() override { return &maOutlinerView; } |
77 | | |
78 | | virtual sal_Int8 AcceptDrop(const AcceptDropEvent& rEvt, DropTargetHelper& rTargetHelper, |
79 | | SdrLayerID nLayer) override; |
80 | | virtual sal_Int8 ExecuteDrop(const ExecuteDropEvent& rEvt, ::sd::Window* pTargetWindow, |
81 | | sal_uInt16 nPage, SdrLayerID nLayer) override; |
82 | | |
83 | | DECL_LINK(StatusEventHdl, EditStatus&, void); |
84 | | DECL_LINK(EditModifiedHdl, LinkParamNone*, void); |
85 | | DECL_LINK(ModifyTimerHdl, Timer*, void); |
86 | | DECL_LINK(EventMultiplexerListener, sdtools::EventMultiplexerEvent&, void); |
87 | | }; |
88 | | } |
89 | | |
90 | | /* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */ |