Version 7.6.3.2-android, tag libreoffice-7.6.3.2-android
[LibreOffice.git] / include / sfx2 / devtools / DevelopmentToolDockingWindow.hxx
blobde576e797ae17a9bb5444bc7072ec6d96afc78a5
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 */
11 #pragma once
13 #include <sfx2/dllapi.h>
14 #include <sfx2/dockwin.hxx>
15 #include <vcl/weld.hxx>
17 #include <sfx2/devtools/ObjectInspectorWidgets.hxx>
18 #include <sfx2/devtools/DocumentModelTreeHandler.hxx>
19 #include <sfx2/devtools/ObjectInspectorTreeHandler.hxx>
21 #include <com/sun/star/uno/XInterface.hpp>
22 #include <com/sun/star/uno/Reference.hxx>
23 #include <com/sun/star/view/XSelectionChangeListener.hpp>
24 #include <com/sun/star/view/XSelectionSupplier.hpp>
26 /** Development tool main docking window
28 * Contains two sides. Left side contains the simplified DOM tree and
29 * the right side the object inspector tree.
31 class SFX2_DLLPUBLIC DevelopmentToolDockingWindow final : public SfxDockingWindow
33 private:
34 std::unique_ptr<ObjectInspectorWidgets> mpObjectInspectorWidgets;
35 std::unique_ptr<weld::TreeView> mpDocumentModelTreeView;
36 std::unique_ptr<weld::Toolbar> mpDomToolbar;
38 // Reference to the root object for the current document
39 css::uno::Reference<css::uno::XInterface> mxRoot;
40 // Stores the current selected object in the document
41 css::uno::Reference<css::uno::XInterface> mxCurrentSelection;
42 css::uno::Reference<css::view::XSelectionChangeListener> mxSelectionListener;
43 css::uno::Reference<css::view::XSelectionSupplier> mxSelectionSupplier;
45 // Handler for the DOM tree
46 DocumentModelTreeHandler maDocumentModelTreeHandler;
47 // Handler for the object inspector tree
48 ObjectInspectorTreeHandler maObjectInspectorTreeHandler;
50 DECL_DLLPRIVATE_LINK(DocumentModelTreeViewSelectionHandler, weld::TreeView&, void);
51 DECL_DLLPRIVATE_LINK(DomToolbarButtonClicked, const OUString&, void);
53 void updateSelection();
55 public:
56 DevelopmentToolDockingWindow(SfxBindings* pBindings, SfxChildWindow* pChildWindow,
57 vcl::Window* pParent);
59 virtual ~DevelopmentToolDockingWindow() override;
61 void dispose() override;
63 void ToggleFloatingMode() override;
65 // Signals that the selected object in the document changes
66 void selectionChanged(css::uno::Reference<css::uno::XInterface> const& xInterface);
68 // Signals to change to the current selected object in the object inspector
69 void changeToCurrentSelection();
72 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */