summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/vcl/SceneGraph.hxx69
-rw-r--r--include/vcl/outdev.hxx10
-rw-r--r--include/vcl/window.hxx3
3 files changed, 82 insertions, 0 deletions
diff --git a/include/vcl/SceneGraph.hxx b/include/vcl/SceneGraph.hxx
new file mode 100644
index 000000000000..3c2a0581a21b
--- /dev/null
+++ b/include/vcl/SceneGraph.hxx
@@ -0,0 +1,69 @@
+/* -*- 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/.
+ *
+ */
+
+#ifndef INCLUDED_VCL_INC_SCENEGRAPH_HXX
+#define INCLUDED_VCL_INC_SCENEGRAPH_HXX
+
+#include <rtl/ustring.hxx>
+#include <vector>
+#include <memory>
+
+namespace vcl
+{
+namespace sg
+{
+
+enum class NodeType
+{
+ ROOT,
+ CLIPPING,
+ TRANSFORM,
+ GEOMETRY,
+};
+
+class VCL_DLLPUBLIC NodePrivate
+{
+public:
+ NodePrivate() = default;
+
+ virtual ~NodePrivate()
+ {}
+};
+
+class VCL_DLLPUBLIC Node
+{
+public:
+ OUString msID;
+ NodeType meType;
+ std::vector<std::unique_ptr<Node>> mChildren;
+ std::unique_ptr<NodePrivate> mPrivate;
+
+ Node(OUString sID, NodeType eType)
+ : msID(sID)
+ , meType(eType)
+ {}
+
+ virtual ~Node()
+ {}
+};
+
+class VCL_DLLPUBLIC RootNode : public Node
+{
+public:
+ RootNode(OUString sID)
+ : Node(sID, NodeType::ROOT)
+ {}
+};
+
+}} // end vcl::sg namespace
+
+#endif // INCLUDED_VCL_INC_SCENEGRAPH_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/vcl/outdev.hxx b/include/vcl/outdev.hxx
index 1811e8b7f4e2..6898d4c647e6 100644
--- a/include/vcl/outdev.hxx
+++ b/include/vcl/outdev.hxx
@@ -46,6 +46,8 @@
#include <basegfx/vector/b2enums.hxx>
#include <basegfx/polygon/b2dpolypolygon.hxx>
+#include <vcl/SceneGraph.hxx>
+
#include <unotools/fontdefs.hxx>
#include <com/sun/star/drawing/LineCap.hpp>
@@ -413,6 +415,9 @@ private:
*/
///@{
+public:
+ vcl::sg::RootNode maSceneGraphRootNode;
+
protected:
OutputDevice();
virtual ~OutputDevice() override;
@@ -420,6 +425,11 @@ protected:
public:
+ vcl::sg::RootNode& getSceneGraphRoot();
+
+ bool renderSceneGraph();
+
+
/** Get the graphic context that the output device uses to draw on.
If no graphics device exists, then initialize it.
diff --git a/include/vcl/window.hxx b/include/vcl/window.hxx
index 8c82fa9d6720..7653210f609e 100644
--- a/include/vcl/window.hxx
+++ b/include/vcl/window.hxx
@@ -1568,6 +1568,9 @@ public:
virtual Selection GetSurroundingTextSelection() const;
virtual FactoryFunction GetUITestFactory() const;
+
+ bool useSceneGraph();
+ void setUseSceneGraph(bool bUseSceneGraph);
};
}