1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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/.
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
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.
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
);
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: */