summaryrefslogtreecommitdiff
path: root/include/sfx2/devtools/DevelopmentToolDockingWindow.hxx
diff options
context:
space:
mode:
authorTomaž Vajngerl <tomaz.vajngerl@collabora.co.uk>2021-02-08 17:11:17 +0900
committerTomaž Vajngerl <quikee@gmail.com>2021-02-11 12:54:10 +0100
commita1ca311061b617b2e4731f6e4c8a5466e8a080f5 (patch)
tree7072b3b6c5fa15df4c79a05bcb70ec7270391411 /include/sfx2/devtools/DevelopmentToolDockingWindow.hxx
parent9afdfc80a39f85b440bf753daa52832532ee1e8c (diff)
devtools: move devtools from svx to sfx2
It's a better suited location for devtools as we can access the classes when we handle the .uno:DevelopmentToolsDockingWindow event. Change-Id: I753ca56808804c9cf6713920f92cd7d313f1f156 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110733 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Diffstat (limited to 'include/sfx2/devtools/DevelopmentToolDockingWindow.hxx')
-rw-r--r--include/sfx2/devtools/DevelopmentToolDockingWindow.hxx67
1 files changed, 67 insertions, 0 deletions
diff --git a/include/sfx2/devtools/DevelopmentToolDockingWindow.hxx b/include/sfx2/devtools/DevelopmentToolDockingWindow.hxx
new file mode 100644
index 000000000000..1ed166239949
--- /dev/null
+++ b/include/sfx2/devtools/DevelopmentToolDockingWindow.hxx
@@ -0,0 +1,67 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ */
+
+#pragma once
+
+#include <sfx2/dllapi.h>
+#include <sfx2/dockwin.hxx>
+#include <vcl/customweld.hxx>
+#include <vcl/weld.hxx>
+
+#include <sfx2/devtools/DocumentModelTreeHandler.hxx>
+
+#include <com/sun/star/uno/XInterface.hpp>
+#include <com/sun/star/uno/Reference.hxx>
+#include <com/sun/star/view/XSelectionChangeListener.hpp>
+#include <com/sun/star/frame/XController.hpp>
+
+#include <unordered_map>
+
+class SFX2_DLLPUBLIC DevelopmentToolDockingWindow final : public SfxDockingWindow
+{
+private:
+ std::unique_ptr<weld::Label> mpClassNameLabel;
+ std::unique_ptr<weld::TreeView> mpClassListBox;
+ std::unique_ptr<weld::TreeView> mpDocumentModelTreeView;
+ std::unique_ptr<weld::ToggleButton> mpSelectionToggle;
+
+ css::uno::Reference<css::uno::XInterface> mxRoot;
+ css::uno::Reference<css::uno::XInterface> mxCurrentSelection;
+ css::uno::Reference<css::view::XSelectionChangeListener> mxSelectionListener;
+
+ DocumentModelTreeHandler maDocumentModelTreeHandler;
+
+ DECL_LINK(DocumentModelTreeViewSelectionHandler, weld::TreeView&, void);
+ DECL_LINK(SelectionToggled, weld::ToggleButton&, void);
+
+ DECL_LINK(ObjectInspectorExpandingHandler, const weld::TreeIter&, bool);
+
+ void inspectDocument();
+ void updateSelection();
+ void inspectSelectionOrRoot(css::uno::Reference<css::frame::XController> const& xController);
+
+ void clearObjectInspectorChildren(weld::TreeIter const& rParent);
+
+public:
+ DevelopmentToolDockingWindow(SfxBindings* pBindings, SfxChildWindow* pChildWindow,
+ vcl::Window* pParent);
+
+ virtual ~DevelopmentToolDockingWindow() override;
+
+ virtual void dispose() override;
+
+ virtual void ToggleFloatingMode() override;
+
+ void introspect(css::uno::Reference<css::uno::XInterface> const& xInterface);
+
+ void selectionChanged(css::uno::Reference<css::uno::XInterface> const& xInterface);
+};
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */