Version 7.6.3.2-android, tag libreoffice-7.6.3.2-android
[LibreOffice.git] / include / sfx2 / devtools / DocumentModelTreeHandler.hxx
blobf26af793c9e8f9181b73235f3ec5558be8f0024b
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 <vcl/weld.hxx>
15 #include <com/sun/star/uno/XInterface.hpp>
16 #include <com/sun/star/uno/Reference.hxx>
18 /** Document model tree handler
20 * Handles the DOM tree part of DevTools, which includes interaction with
21 * the DOM tree view UI elements and the DOM model.
23 class DocumentModelTreeHandler
25 private:
26 std::unique_ptr<weld::TreeView>& mpDocumentModelTree;
27 css::uno::Reference<css::uno::XInterface> mxDocument;
29 // Clears all children of a tree node, where the parent is
30 // identified by the input tree iter.
31 void clearChildren(weld::TreeIter const& rParent);
33 // Clear all tree view nodes.
34 void clearAll();
36 public:
37 DocumentModelTreeHandler(std::unique_ptr<weld::TreeView>& pDocumentModelTree,
38 css::uno::Reference<css::uno::XInterface> xDocument);
40 DECL_LINK(ExpandingHandler, const weld::TreeIter&, bool);
42 void inspectDocument();
44 static css::uno::Reference<css::uno::XInterface> getObjectByID(OUString const& rID);
46 void dispose();
48 // selects the input object if it exists in the DOM tree view
49 void selectObject(css::uno::Reference<css::uno::XInterface> const& xInterface);
52 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */