diff --git a/CMakeLists.txt b/CMakeLists.txt index f379960..ac10a4b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,6 +1,5 @@ cmake_minimum_required(VERSION 3.5) - set(VERSION_MAJOR 0) set(VERSION_MINOR 0) set(VERSION_PATCH 1) @@ -17,8 +16,8 @@ set(CMAKE_C_STANDARD 23) set(EXECUTABLE_OUTPUT_PATH ${CMAKE_BINARY_DIR}/${CMAKE_SYSTEM_NAME}) set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/${CMAKE_SYSTEM_NAME}) +# Find dependenices find_package(PkgConfig REQUIRED) - find_package(Freetype REQUIRED) find_package(GLEW REQUIRED) find_package(glm REQUIRED) @@ -33,6 +32,9 @@ endif() include_directories(Include) include_directories(External) +# Add External Libraries +add_subdirectory(External/open-cpp-utils) + # Configure ImGui set(IMGUI_BACKEND_SDL2 ON) set(IMGUI_BACKEND_OPENGL ON) @@ -42,6 +44,7 @@ set(IMGUI_FREETYPE ON) # Add ImGui and any extensions add_subdirectory(External/imgui-docking) add_subdirectory(External/imgui-extras) +add_subdirectory(External/imnode-graph) add_executable(OpenShaderDesigner Source/Entry.cpp @@ -71,7 +74,9 @@ target_link_libraries(OpenShaderDesigner PRIVATE GLEW::GLEW OpenGL::GL ${SDL2_LIBRARIES} + imgui-docking imgui-extras + imnode-graph ) # DOXYGEN ============================================================================================================== @@ -80,6 +85,7 @@ target_link_libraries(OpenShaderDesigner PRIVATE find_package(Doxygen) if(DOXYGEN_FOUND) + get_filename_component(DOXYGEN_PROJECT_NAME ${CMAKE_CURRENT_SOURCE_DIR} NAME) set(DOXYGEN_CONFIG_IN ${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.in) set(DOXYGEN_CONFIG_OUT ${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile) @@ -87,14 +93,14 @@ if(DOXYGEN_FOUND) message("Doxygen Build Started.") if(WIN32) - add_custom_target(doxygen ALL + add_custom_target(OpenShaderDesigner-Documentation ALL COMMAND ${DOXYGEN_EXECUTABLE} ${DOXYGEN_CONFIG_OUT} COMMAND start firefox "${CMAKE_CURRENT_SOURCE_DIR}/Documentation/html/index.html" WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} COMMENT "Generating Doxygen Documentation" VERBATIM) else() - add_custom_target(doxygen ALL + add_custom_target(OpenShaderDesigner-Documentation ALL COMMAND ${DOXYGEN_EXECUTABLE} ${DOXYGEN_CONFIG_OUT} COMMAND firefox "${CMAKE_CURRENT_SOURCE_DIR}/Documentation/html/index.html" WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} diff --git a/Documentation/html/_any_8h_source.html b/Documentation/html/_any_8h_source.html new file mode 100644 index 0000000..e9bb0cf --- /dev/null +++ b/Documentation/html/_any_8h_source.html @@ -0,0 +1,162 @@ + + + + + + + +OpenShaderDesigner: Include/Utility/Any.h Source File + + + + + + + + + + + + + +
+
+ + + + + + +
+
OpenShaderDesigner 0.0.1 +
+
+
+ + + + + + + + + + +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ + +
+
+
+
Any.h
+
+
+
1// =====================================================================================================================
+
2// Copyright 2024 Medusa Slockbower
+
3// Licensed under the Apache License, Version 2.0 (the "License");
+
4// you may not use this file except in compliance with the License.
+
5// You may obtain a copy of the License at
+
6//
+
7// http://www.apache.org/licenses/LICENSE-2.0
+
8//
+
9// Unless required by applicable law or agreed to in writing, software
+
10// distributed under the License is distributed on an "AS IS" BASIS,
+
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+
12// See the License for the specific language governing permissions and
+
13// limitations under the License.
+
14// =====================================================================================================================
+
15
+
16#ifndef ANY_H
+
17#define ANY_H
+
18
+ +
20
+
21template<typename...Ts> class Any;
+
22
+
26template<typename T, typename...Rest>
+
+
27class Any<T, Rest...> : public Any<Rest...>
+
28{
+
29 // Ensure each element is unique
+
30 static_assert(IsUnique<Rest...>);
+
31 using ThisType = T;
+
32 using BaseType = Any<Rest...>;
+
33
+
34public:
+
35 Any() : BaseType() , Value() { }
+
36 Any(const ThisType& value, const Rest&...other) : BaseType(other...), Value(value) { }
+
37 Any(ThisType&& value, Rest&&...other) : BaseType(other...), Value(value) { }
+
38 Any(const Any& other) = default;
+
39 Any(Any&& other) = default;
+
40 ~Any() = default;
+
41
+
42 Any& operator=(const Any&) = default;
+
43 Any& operator=(Any&&) = default;
+
44
+
45 operator ThisType () const { return Value; }
+
46 operator ThisType& () { return Value; }
+
47 operator const ThisType& () const { return Value; }
+
48 operator ThisType&&() { return Value; }
+
49 operator ThisType* () { return &Value; }
+
50 operator const ThisType* () const { return &Value; }
+
51
+
52private:
+
53 static constexpr size_t Size = sizeof...(Rest);
+
54 ThisType Value;
+
55};
+
+
56
+
57template<>
+
58class Any<> { };
+
59
+
60#endif //ANY_H
+
Provides compile time evaluation utilities for templates and template packs.
+
Definition Any.h:21
+
+ + +
+ + diff --git a/Documentation/html/_buffer_object_8h_source.html b/Documentation/html/_buffer_object_8h_source.html new file mode 100644 index 0000000..4115335 --- /dev/null +++ b/Documentation/html/_buffer_object_8h_source.html @@ -0,0 +1,260 @@ + + + + + + + +OpenShaderDesigner: Include/OpenGL/BufferObject.h Source File + + + + + + + + + + + + + +
+
+ + + + + + +
+
OpenShaderDesigner 0.0.1 +
+
+
+ + + + + + + + + + +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ + +
+
+
+
BufferObject.h
+
+
+
1// =====================================================================================================================
+
2// Copyright 2024 Medusa Slockbower
+
3// Licensed under the Apache License, Version 2.0 (the "License");
+
4// you may not use this file except in compliance with the License.
+
5// You may obtain a copy of the License at
+
6//
+
7// http://www.apache.org/licenses/LICENSE-2.0
+
8//
+
9// Unless required by applicable law or agreed to in writing, software
+
10// distributed under the License is distributed on an "AS IS" BASIS,
+
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+
12// See the License for the specific language governing permissions and
+
13// limitations under the License.
+
14// =====================================================================================================================
+
15
+
16#ifndef BUFFEROBJECT_H
+
17#define BUFFEROBJECT_H
+
18
+
19#ifndef NULL
+
20#define NULL 0
+
21#endif
+
22
+
23#include <algorithm>
+
24
+
25#include "Enum.h"
+
26#include "Type.h"
+
27
+
28namespace GLW
+
29{
+
30// Definition ==========================================================================================================
+
31
+
32 template<BufferType T, BufferUsage U, BufferStorage S = GPU>
+
+ +
34 {
+
35 public:
+
36 static constexpr BufferType Type = T;
+
37 static constexpr BufferUsage Usage = U;
+
38 static constexpr BufferStorage Storage = S;
+
39
+
45 BufferObject(SizeT size, void* data = nullptr);
+
46
+ +
51
+
55 BufferObject(const BufferObject& other);
+
56
+ +
61
+
65 [[nodiscard]] operator bool() const { return Handle != 0; }
+
66
+
70 BufferObject& operator=(const BufferObject& other);
+
71
+
75 BufferObject& operator=(BufferObject&& other) noexcept;
+
76
+
77 [[nodiscard]] SizeT Size() const { return Size; }
+
78 void Resize(SizeT size);
+
79
+
80 private:
+
81 HandleT Handle;
+
82 SizeT Size;
+
83 void* Mapping;
+
84 };
+
+
85
+
86// Constructors ========================================================================================================
+
87
+
88 template <BufferType T, BufferUsage U, BufferStorage S>
+
+ +
90 : Handle(NULL)
+
91 , Size(size)
+
92 , Mapping(nullptr)
+
93 {
+
94 glGenBuffers(1, &Handle);
+
95
+
96 if(!*this) return;
+
97
+
98 glBindBuffer(Type, Handle);
+
99 glBufferStorage(Type, Size, data, Usage);
+
100 glBindBuffer(Type, 0);
+
101 }
+
+
102
+
103 template <BufferType T, BufferUsage U, BufferStorage S>
+
+ +
105 : Handle(other.Handle)
+
106 , Size(other.Size)
+
107 , Mapping(other.Size)
+
108 {
+
109 other.Handle = NULL;
+
110 other.Size = 0;
+
111 other.Mapping = nullptr;
+
112 }
+
+
113
+
114 template <BufferType T, BufferUsage U, BufferStorage S>
+
+ +
116 : BufferObject(other.Size)
+
117 {
+
118 if(Handle == NULL) return;
+
119 if(other.Handle == NULL) return;
+
120
+
121 glCopyNamedBufferSubData(other.Handle, Handle, 0, 0, Size);
+
122 }
+
+
123
+
124 template <BufferType T, BufferUsage U, BufferStorage S>
+
+ +
126 {
+
127 glDeleteBuffers(1, &Handle);
+
128 }
+
+
129
+
130// Assignment Operators ================================================================================================
+
131
+
132 template <BufferType T, BufferUsage U, BufferStorage S>
+
+ +
134 {
+
135 BufferObject temp(other);
+
136 return (*this = std::move(temp)); // NOLINT(*-unconventional-assign-operator)
+
137 }
+
+
138
+
139 template <BufferType T, BufferUsage U, BufferStorage S>
+
+ +
141 {
+
142 glDeleteBuffers(1, &Handle);
+
143
+
144 Handle = other.Handle;
+
145 Size = other.Size;
+
146 Mapping = other.Mapping;
+
147
+
148 other.Handle = NULL;
+
149 other.Size = 0;
+
150 other.Mapping = nullptr;
+
151
+
152 return *this;
+
153 }
+
+
154
+
155 template <BufferType T, BufferUsage U, BufferStorage S>
+
156 void BufferObject<T, U, S>::Resize(SizeT size)
+
157 {
+
158 BufferObject temp(size);
+
159 glCopyNamedBufferSubData(Handle, temp.Handle, 0, 0, Size);
+
160 *this = std::move(temp);
+
161 }
+
162}
+
163
+
164#endif //BUFFEROBJECT_H
+
Definition BufferObject.h:34
+
BufferObject & operator=(const BufferObject &other)
Copy Assignment.
Definition BufferObject.h:133
+
BufferObject(SizeT size, void *data=nullptr)
BufferObject constructor.
Definition BufferObject.h:89
+
~BufferObject()
Destructor.
Definition BufferObject.h:125
+
+ + +
+ + diff --git a/Documentation/html/_console_8h_source.html b/Documentation/html/_console_8h_source.html new file mode 100644 index 0000000..6142354 --- /dev/null +++ b/Documentation/html/_console_8h_source.html @@ -0,0 +1,273 @@ + + + + + + + +OpenShaderDesigner: Include/Core/Console.h Source File + + + + + + + + + + + + + +
+
+ + + + + + +
+
OpenShaderDesigner 0.0.1 +
+
+
+ + + + + + + + + + +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ + +
+
+
+
Console.h
+
+
+
1// =====================================================================================================================
+
2// Copyright 2024 Medusa Slockbower
+
3// Licensed under the Apache License, Version 2.0 (the "License");
+
4// you may not use this file except in compliance with the License.
+
5// You may obtain a copy of the License at
+
6//
+
7// http://www.apache.org/licenses/LICENSE-2.0
+
8//
+
9// Unless required by applicable law or agreed to in writing, software
+
10// distributed under the License is distributed on an "AS IS" BASIS,
+
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+
12// See the License for the specific language governing permissions and
+
13// limitations under the License.
+
14// =====================================================================================================================
+
15
+
16
+
17#ifndef CONSOLE_H
+
18#define CONSOLE_H
+
19
+
20#include <imgui-docking/imgui.h>
+
21#include <format>
+
22#include <iostream>
+
23#include <sstream>
+
24#include <thread>
+
25#include <list>
+
26#include <mutex>
+
27
+
28namespace OpenShaderDesigner
+
29{
+
+
30 class Console
+
31 {
+
32 public:
+
+ +
37 : uint8_t
+
38 {
+
39 SHOW_TIMESTAMP = 0b00000001
+
40 , SHOW_THREAD = 0b00000010
+
41 , SHOW_SEVERITY = 0b00000100
+
42 , SHOW_FILE_INFO = 0b00001000
+
43 , WRAP_TEXT = 0b00010000
+
44
+
45 , ALL_SETTINGS = 0xFF
+
46 , DEFAULT_SETTINGS = ALL_SETTINGS ^ WRAP_TEXT
+
47 };
+
+
48
+
+
52 inline static const std::string SettingNames[] =
+
53 {
+
54 "Timestamps", "Thread IDs", "Severity", "File Info", "Wrapping"
+
55 };
+
+
56
+
+
60 enum class Severity
+
61 : int
+
62 {
+
63 MESSAGE = 0,
+
64 WARNING,
+
65 ERROR,
+
66 FATAL,
+
67 ALERT,
+
68 COMMAND,
+
69 COUNT,
+
70 DEFAULT = WARNING
+
71 };
+
+
72
+
+
76 static inline const std::string Severities[] =
+
77 {
+
78 "Message", "Warning", "Error", "Fatal", "Alert", "Command"
+
79 };
+
+
80
+
+
86 inline static constexpr ImVec4 ImGuiColor(unsigned int RGB)
+
87 {
+
88 return {
+
89 static_cast<float>((RGB >> 24) & 255) / 255.0f, static_cast<float>((RGB >> 16) & 255) / 255.0f,
+
90 static_cast<float>((RGB >> 8) & 255) / 255.0f, static_cast<float>((RGB >> 0) & 255) / 255.0f
+
91 };
+
92 }
+
+
93
+
+
97 inline static const ImVec4 SeverityColors[] = {
+
98 ImGuiColor(0xA4B9C4FF), ImGuiColor(0xF2C554FF), ImGuiColor(0xE57327FF), ImGuiColor(0xCC211EFF),
+
99 ImGuiColor(0x9CDCFEFF),
+
100 };
+
+
101
+
102 static std::string ThreadID()
+
103 {
+
104 std::stringstream ss;
+
105 ss << std::this_thread::get_id();
+
106 return ss.str();
+
107 }
+
108
+
118 template <typename... Args>
+
119 static void Log(const std::string& file
+
120 , const int line
+
121 , Severity severity = Severity::DEFAULT
+
122 , const std::format_string<Args...>& message = ""
+
123 , Args&&... vargs);
+
124
+
125 static void DrawMenu();
+
126 static void DrawWindow();
+
127
+
128 static inline bool Open = true;
+
129
+
130 private:
+
131 struct LogEntry
+
132 {
+
133 const std::string Message;
+
134 const Severity Severity;
+
135 const std::string File, Timestamp, Thread;
+
136 const int Line;
+
137 };
+
138
+
144 static std::string Format(const LogEntry& entry, Setting settings);
+
145
+
150 static void ProcessCommand(const std::string& command);
+
151
+
152 inline static std::list<LogEntry> EntryLog;
+
153 inline static std::mutex Lock;
+
154 inline static int Filter = static_cast<int>(0xFFFFFFFF);
+
155 inline static Setting Settings = DEFAULT_SETTINGS;
+
156 inline static std::string Command;
+
157 };
+
+
158
+
159 template <typename... Args>
+
+ +
161 const std::string& file
+
162 , const int line
+
163 , Severity severity
+
164 , const std::format_string<Args...>& fmt
+
165 , Args&&... vargs)
+
166 {
+
167 auto t = std::time(nullptr);
+
168#ifdef _MSC_VER
+
169#pragma warning(disable:4996)
+
170#endif
+
171 auto tm = *std::localtime(&t);
+
172
+
173 std::lock_guard guard(Lock);
+
174 LogEntry entry{
+
175 std::vformat(fmt.get(), std::make_format_args(vargs...)), severity, file, std::format(
+
176 "{:0>2}:{:0>2}:{:0>2}", tm.tm_hour, tm.tm_min, tm.tm_sec),
+
177 ThreadID(), line
+
178 };
+
179 EntryLog.push_back(entry);
+
180 std::cout << Format(entry, ALL_SETTINGS) << std::endl;
+
181 }
+
+
182}
+
183
+
184#define Log(...) Log(__FILE__, __LINE__, __VA_ARGS__)
+
185
+
186#endif //CONSOLE_H
+
Definition Console.h:31
+
static const ImVec4 SeverityColors[]
Color for rendering each Severity level text in editor.
Definition Console.h:97
+
static void Log(const std::string &file, const int line, Severity severity=Severity::DEFAULT, const std::format_string< Args... > &message="", Args &&... vargs)
Thread-Safe Log function for debugging.
Definition Console.h:160
+
Setting
Setting for displaying log entries.
Definition Console.h:38
+
static const std::string SettingNames[]
String representations of the settings.
Definition Console.h:52
+
Severity
Severity levels for log entries.
Definition Console.h:62
+
static const std::string Severities[]
String representations of the Severity levels.
Definition Console.h:76
+
static constexpr ImVec4 ImGuiColor(unsigned int RGB)
Integer to floating point color. (ImGui APIVersion)
Definition Console.h:86
+
+ + +
+ + diff --git a/Documentation/html/_console_window_8h_source.html b/Documentation/html/_console_window_8h_source.html new file mode 100644 index 0000000..2c4dd6b --- /dev/null +++ b/Documentation/html/_console_window_8h_source.html @@ -0,0 +1,144 @@ + + + + + + + +OpenShaderDesigner: Include/Editor/ConsoleWindow.h Source File + + + + + + + + + + + + + +
+
+ + + + + + +
+
OpenShaderDesigner 0.0.1 +
+
+
+ + + + + + + + + + +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ + +
+
+
+
ConsoleWindow.h
+
+
+
1// =====================================================================================================================
+
2// Copyright 2024 Medusa Slockbower
+
3// Licensed under the Apache License, Version 2.0 (the "License");
+
4// you may not use this file except in compliance with the License.
+
5// You may obtain a copy of the License at
+
6//
+
7// http://www.apache.org/licenses/LICENSE-2.0
+
8//
+
9// Unless required by applicable law or agreed to in writing, software
+
10// distributed under the License is distributed on an "AS IS" BASIS,
+
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+
12// See the License for the specific language governing permissions and
+
13// limitations under the License.
+
14// =====================================================================================================================
+
15
+
16#ifndef CONSOLEWINDOW_H
+
17#define CONSOLEWINDOW_H
+
18
+
19#include <Editor/EditorSystem.h>
+
20
+
21namespace OpenShaderDesigner
+
22{
+
23
+
+ +
25 {
+
26 public:
+ +
28
+
29 void DrawMenu() override;
+
30 void DrawWindow() override;
+
31
+
32 private:
+
33 };
+
+
34
+
35} // OpenShaderDesigner
+
36
+
37#endif //CONSOLEWINDOW_H
+
Definition ConsoleWindow.h:25
+
void DrawMenu() override
DrawMenu function for when the EditorWindow Menu is being drawn.
Definition ConsoleWindow.cpp:26
+
void DrawWindow() override
DrawWindow function for when the EditorWindow is being drawn.
Definition ConsoleWindow.cpp:31
+
EditorWindow class for wrapping ImGui window functionality.
Definition EditorWindow.h:28
+
+ + +
+ + diff --git a/Documentation/html/_directed_graph_8h_source.html b/Documentation/html/_directed_graph_8h_source.html new file mode 100644 index 0000000..8317286 --- /dev/null +++ b/Documentation/html/_directed_graph_8h_source.html @@ -0,0 +1,389 @@ + + + + + + + +OpenShaderDesigner: Include/Utility/DirectedGraph.h Source File + + + + + + + + + + + + + +
+
+ + + + + + +
+
OpenShaderDesigner 0.0.1 +
+
+
+ + + + + + + + + + +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ + +
+
+
+
DirectedGraph.h
+
+
+
1// =====================================================================================================================
+
2// Copyright 2024 Medusa Slockbower
+
3// Licensed under the Apache License, Version 2.0 (the "License");
+
4// you may not use this file except in compliance with the License.
+
5// You may obtain a copy of the License at
+
6//
+
7// http://www.apache.org/licenses/LICENSE-2.0
+
8//
+
9// Unless required by applicable law or agreed to in writing, software
+
10// distributed under the License is distributed on an "AS IS" BASIS,
+
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+
12// See the License for the specific language governing permissions and
+
13// limitations under the License.
+
14// =====================================================================================================================
+
15
+
16#ifndef DIRECTEDGRAPH_H
+
17#define DIRECTEDGRAPH_H
+
18
+
19#include <deque>
+
20#include <vector>
+
21
+
22template<typename T>
+
+ +
24{
+
25public:
+
26 // Typedefs ========================================================================================================
+
27
+
28 using DataType = T;
+
29 using Node = uint32_t;
+
30 using NodeQueue = std::deque<Node>;
+
31
+
32private:
+
33 // Data Structures =================================================================================================
+
34
+
35 struct Director
+
36 {
+
37 enum Flags
+
38 {
+
39 VALID = 0b00000000000000000000000000000001
+
40 };
+
41
+
42 Node Parent, Child, Sibling;
+
43 uint32_t Flags;
+
44
+
45 Director() : Parent(0), Child(0), Sibling(0), Flags(VALID) { }
+
46 };
+
47
+
48 using Hierarchy = std::vector<Director>;
+
49 using Storage = std::vector<DataType>;
+
50
+
51public:
+
52 // Functions =======================================================================================================
+
53
+
54 DirectedGraph() : Graph{ Director() }, Data{ DataType() }, Freed{ } { }
+
55
+
56 [[nodiscard]] Node Parent(Node node) const { return Graph[node].Parent; }
+
57 [[nodiscard]] Node FirstChild(Node node) const { return Graph[node].Child; }
+
58 [[nodiscard]] Node NextSibling(Node node) const { return Graph[node].Sibling; }
+
59
+
60 [[nodiscard]] Node LeftMost(Node node) const
+
61 {
+
62 Node current = node;
+
63 while(node = FirstChild(current)) current = node;
+
64 return current;
+
65 }
+
66
+
67 [[nodiscard]] uint32_t Depth(Node node) const
+
68 {
+
69 uint32_t depth = 0;
+
70 while (node)
+
71 {
+
72 node = Parent(node);
+
73 ++depth;
+
74 }
+
75 return depth;
+
76 }
+
77
+
78 Node Insert(const DataType& data, Node parent)
+
79 {
+
80 if(Freed.empty())
+
81 {
+
82 Freed.push_back(static_cast<Node>(Graph.size()));
+
83 Graph.push_back(Director()); Data.push_back(DataType());
+
84 }
+
85
+
86 Node next = Freed.front(); Freed.pop_front();
+
87 Director& pnode = Graph[parent];
+
88 Director& node = Graph[next];
+
89
+
90 // Setup Node
+
91 node.Parent = parent;
+
92 node.Sibling = pnode.Child;
+
93 node.Child = 0;
+
94 node.Flags = Director::VALID;
+
95
+
96 // Set parent's child
+
97 pnode.Child = next;
+
98
+
99 Data[next] = data;
+
100
+
101 return next;
+
102 }
+
103
+
104 void Erase(Node node)
+
105 {
+
106 if(node == 0) return;
+
107
+
108 Director& erased = Graph[node];
+
109 erased.Flags &= ~Director::VALID;
+
110 Freed.push_back(node);
+
111
+
112 Graph[erased.Parent].Child = erased.Sibling;
+
113
+
114 NodeQueue stack{ erased.Child };
+
115
+
116 while(stack.empty() == false)
+
117 {
+
118 Node next = stack.front(); stack.pop_front();
+
119 Director& child = Graph[next];
+
120 child.Flags &= ~Director::VALID;
+
121 Freed.push_back(next);
+
122
+
123 if(child.Sibling) stack.push_front(child.Sibling);
+
124 if(child.Child) stack.push_front(child.Child);
+
125 }
+
126 }
+
127
+
128 DataType& operator[](Node node) { return Data[node]; }
+
129 [[nodiscard]] const DataType& operator[](Node node) const { return Data[node]; }
+
130
+
131 template<typename V, typename O>
+
132 void Traverse(V& visitor)
+
133 {
+
134 Traverser<V, O> traverser(*this, visitor);
+
135 traverser();
+
136 }
+
137
+
138private:
+
139 // Variables =======================================================================================================
+
140
+
141 Hierarchy Graph;
+
142 Storage Data;
+
143 NodeQueue Freed;
+
144
+
145public:
+
146 // Navigation ======================================================================================================
+
147
+
148 friend class BreadthFirst;
+
+ +
150 {
+
151 public:
+
152 BreadthFirst(DirectedGraph& graph) : Graph(graph), VisitQueue(0) { }
+
153
+
154 Node operator()(Node node)
+
155 {
+
156 node = VisitQueue.back(); VisitQueue.pop_back();
+
157 Director& current = Graph.Graph[node];
+
158
+
159 if(current.Sibling) VisitQueue.push_back(current.Sibling);
+
160 if(current.Child) VisitQueue.push_front(current.Child);
+
161
+
162 if(VisitQueue.empty()) return 0;
+
163 return node;
+
164 }
+
165
+
166 private:
+
167 DirectedGraph& Graph;
+
168 NodeQueue VisitQueue;
+
169 };
+
+
170
+
171 friend class PreOrder;
+
+ +
173 {
+
174 public:
+
175 PreOrder(DirectedGraph& graph) : Graph(graph) { }
+
176
+
177 Node operator()(Node node)
+
178 {
+
179 Director& current = Graph.Graph[node];
+
180
+
181 if(current.Sibling) VisitQueue.push_front(current.Sibling);
+
182 if(current.Child) VisitQueue.push_front(current.Child);
+
183
+
184 if(VisitQueue.empty()) return 0;
+
185 Node next = VisitQueue.front(); VisitQueue.pop_front();
+
186 return next;
+
187 }
+
188
+
189 private:
+
190 DirectedGraph& Graph;
+
191 NodeQueue VisitQueue;
+
192 };
+
+
193
+
194 friend class InOrder;
+
+ +
196 {
+
197 public:
+
198 InOrder(DirectedGraph& graph) : Graph(graph) { }
+
199
+
200 Node operator()(Node node)
+
201 {
+
202 if(node == 0) VisitQueue.push_back(Graph.LeftMost(node));
+
203
+
204 node = VisitQueue.front(); VisitQueue.pop_front();
+
205 Director& current = Graph.Graph[node];
+
206
+
207 if(current.Sibling)
+
208 {
+
209 if(Graph.NextSibling(current.Sibling)) VisitQueue.push_back(current.Parent);
+
210 VisitQueue.push_back(Graph.LeftMost(current.Sibling));
+
211 }
+
212
+
213 return node;
+
214 }
+
215
+
216 private:
+
217 DirectedGraph& Graph;
+
218 NodeQueue VisitQueue;
+
219 };
+
+
220
+
221 friend class PostOrder;
+
+ +
223 {
+
224 public:
+
225 PostOrder(DirectedGraph& graph) : Graph(graph) { }
+
226
+
227 Node operator()(Node node)
+
228 {
+
229 if(VisitQueue.empty()) VisitQueue.push_back(Graph.LeftMost(node));
+
230
+
231 node = VisitQueue.front(); VisitQueue.pop_front();
+
232 if(node == 0) return node;
+
233 Director& current = Graph.Graph[node];
+
234
+
235 VisitQueue.push_back(current.Sibling ? Graph.LeftMost(current.Sibling) : Graph.Parent(node));
+
236
+
237 return node;
+
238 }
+
239
+
240 private:
+
241 DirectedGraph& Graph;
+
242 NodeQueue VisitQueue;
+
243 };
+
+
244
+
245 template<typename V, typename O>
+
+ +
247 {
+
248 public:
+
249 using VisitorType = V;
+
250 using OrderType = O;
+
251
+
252 Traverser(DirectedGraph& graph, VisitorType& visitor) : Graph(graph), Visitor(visitor), Order(graph) { }
+
253
+
254 void operator()()
+
255 {
+
256 Node node = 0;
+
257 while(node = Order(node))
+
258 {
+
259 if(Visitor(Graph[node], node)) break;
+
260 }
+
261 }
+
262
+
263 private:
+
264 DirectedGraph& Graph;
+
265 VisitorType& Visitor;
+
266 OrderType Order;
+
267 };
+
+
268};
+
+
269
+
270#endif //DIRECTEDGRAPH_H
+
Definition DirectedGraph.h:150
+
Definition DirectedGraph.h:196
+
Definition DirectedGraph.h:223
+
Definition DirectedGraph.h:173
+
Definition DirectedGraph.h:247
+
Definition DirectedGraph.h:24
+
+ + +
+ + diff --git a/Documentation/html/_editor_system_8h_source.html b/Documentation/html/_editor_system_8h_source.html new file mode 100644 index 0000000..1b75ca3 --- /dev/null +++ b/Documentation/html/_editor_system_8h_source.html @@ -0,0 +1,168 @@ + + + + + + + +OpenShaderDesigner: Include/Editor/EditorSystem.h Source File + + + + + + + + + + + + + +
+
+ + + + + + +
+
OpenShaderDesigner 0.0.1 +
+
+
+ + + + + + + + + + +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ + +
+
+
+
EditorSystem.h
+
+
+
1// =====================================================================================================================
+
2// Copyright 2024 Medusa Slockbower
+
3// Licensed under the Apache License, Version 2.0 (the "License");
+
4// you may not use this file except in compliance with the License.
+
5// You may obtain a copy of the License at
+
6//
+
7// http://www.apache.org/licenses/LICENSE-2.0
+
8//
+
9// Unless required by applicable law or agreed to in writing, software
+
10// distributed under the License is distributed on an "AS IS" BASIS,
+
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+
12// See the License for the specific language governing permissions and
+
13// limitations under the License.
+
14// =====================================================================================================================
+
15
+
16#ifndef EDITORSYSTEM_H
+
17#define EDITORSYSTEM_H
+
18
+
19#include <SDL_events.h>
+
20#include <open-cpp-utils/unique_id.h>
+
21#include <unordered_map>
+
22
+
23#include <Editor/EditorWindow.h>
+
24
+
25#define MAX_EDITORS 256
+
26
+
27namespace OpenShaderDesigner
+
28{
+
+ +
30 {
+
31 public:
+
32 using WindowID = uint64_t;
+
33
+
34 template<typename T>
+
35 static WindowID ID() { return open_cpp_utils::unique_id<WindowID, T>(); }
+
36
+
37 template<typename T>
+
38 static T* Open() { T* window; (window = Get<T>())->Open(); return window; }
+
39
+
40 template<typename T>
+
41 static T* Close() { T* window; (window = Get<T>())->Close(); return window; }
+
42
+
43 template<typename T>
+
44 static T* Get()
+
45 {
+
46 T* window = reinterpret_cast<T*>(Windows[ID<T>()]);
+
47 if(window == nullptr) Windows[ID<T>()] = window = new T();
+
48 return window;
+
49 }
+
50
+
51 static void Initialize();
+
52 static void Draw();
+
53 static void Shutdown();
+
54 static void HandleEvents(SDL_Event* event);
+
55
+
56 private:
+
57 inline static EditorWindow* Windows[MAX_EDITORS] { nullptr };
+
58 };
+
+
59}
+
60
+
61
+
62
+
63#endif //EDITORSYSTEM_H
+
Definition EditorSystem.h:30
+
EditorWindow class for wrapping ImGui window functionality.
Definition EditorWindow.h:28
+
+ + +
+ + diff --git a/Documentation/html/_editor_window_8h_source.html b/Documentation/html/_editor_window_8h_source.html new file mode 100644 index 0000000..17675d6 --- /dev/null +++ b/Documentation/html/_editor_window_8h_source.html @@ -0,0 +1,200 @@ + + + + + + + +OpenShaderDesigner: Include/Editor/EditorWindow.h Source File + + + + + + + + + + + + + +
+
+ + + + + + +
+
OpenShaderDesigner 0.0.1 +
+
+
+ + + + + + + + + + +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ + +
+
+
+
EditorWindow.h
+
+
+
1// =====================================================================================================================
+
2// Copyright 2024 Medusa Slockbower
+
3// Licensed under the Apache License, Version 2.0 (the "License");
+
4// you may not use this file except in compliance with the License.
+
5// You may obtain a copy of the License at
+
6//
+
7// http://www.apache.org/licenses/LICENSE-2.0
+
8//
+
9// Unless required by applicable law or agreed to in writing, software
+
10// distributed under the License is distributed on an "AS IS" BASIS,
+
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+
12// See the License for the specific language governing permissions and
+
13// limitations under the License.
+
14// =====================================================================================================================
+
15
+
16#ifndef EDITORWINDOW_H
+
17#define EDITORWINDOW_H
+
18
+
19#include <string>
+
20#include <imgui-docking/imgui.h>
+
21
+
22namespace OpenShaderDesigner
+
23{
+
+ +
28 {
+
29 public:
+
33 void Open();
+
34
+
38 void Draw();
+
39
+
43 void Close();
+
44
+
49 [[nodiscard]] bool IsOpen() const { return bOpen; }
+
50
+
51 const std::string Title;
+
52
+
53 void SetFlags(ImGuiWindowFlags flags) { Flags |= flags; }
+
54 void ClearFlags(ImGuiWindowFlags flags) { Flags &= ~flags; }
+
55 void ToggleFlags(ImGuiWindowFlags flags) { Flags ^= flags; }
+
56 [[nodiscard]] bool CheckFlag(ImGuiWindowFlags flag) const { return Flags & flag; }
+
57
+
58 [[nodiscard]] bool HasMenuBar() const { return CheckFlag(ImGuiWindowFlags_MenuBar); }
+
59
+
60 protected:
+
61 ~EditorWindow() = default;
+
62 EditorWindow(const std::string& title
+
63 , ImGuiWindowFlags flags);
+
64
+
+
68 virtual void OnOpen()
+
69 {
+
70 };
+
+
71
+
+
75 virtual void DrawWindow()
+
76 {
+
77 };
+
+
78
+
+
82 virtual void DrawMenu()
+
83 {
+
84 };
+
+
85
+
+
89 virtual void OnClose()
+
90 {
+
91 };
+
+
92
+
93 private:
+
94 EditorWindow(const EditorWindow&) = delete;
+
95
+
96 EditorWindow(EditorWindow&&) = delete;
+
97
+
98 int Flags;
+
99 bool bOpen;
+
100
+
101 friend class EditorSystem;
+
102 };
+
+
103}
+
104
+
105
+
106#endif //EDITORWINDOW_H
+
Definition EditorSystem.h:30
+
EditorWindow class for wrapping ImGui window functionality.
Definition EditorWindow.h:28
+
virtual void DrawWindow()
DrawWindow function for when the EditorWindow is being drawn.
Definition EditorWindow.h:75
+
const std::string Title
Title for the EditorWindow.
Definition EditorWindow.h:51
+
virtual void OnOpen()
OnOpen callback for when the EditorWindow is opened.
Definition EditorWindow.h:68
+
void Draw()
Draw the EditorWindow.
Definition EditorWindow.cpp:27
+
void Close()
Close the EditorWindow.
Definition EditorWindow.cpp:52
+
virtual void DrawMenu()
DrawMenu function for when the EditorWindow Menu is being drawn.
Definition EditorWindow.h:82
+
virtual void OnClose()
OnClose callback for when the EditorWindow is closed.
Definition EditorWindow.h:89
+
void Open()
Open the EditorWindow.
Definition EditorWindow.cpp:20
+
bool IsOpen() const
Check if the EditorWindow is open.
Definition EditorWindow.h:49
+
+ + +
+ + diff --git a/Documentation/html/_engine_8h_source.html b/Documentation/html/_engine_8h_source.html new file mode 100644 index 0000000..fcde993 --- /dev/null +++ b/Documentation/html/_engine_8h_source.html @@ -0,0 +1,155 @@ + + + + + + + +OpenShaderDesigner: Include/Core/Engine.h Source File + + + + + + + + + + + + + +
+
+ + + + + + +
+
OpenShaderDesigner 0.0.1 +
+
+
+ + + + + + + + + + +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ + +
+
+
+
Engine.h
+
+
+
1// =====================================================================================================================
+
2// Copyright 2024 Medusa Slockbower
+
3// Licensed under the Apache License, Version 2.0 (the "License");
+
4// you may not use this file except in compliance with the License.
+
5// You may obtain a copy of the License at
+
6//
+
7// http://www.apache.org/licenses/LICENSE-2.0
+
8//
+
9// Unless required by applicable law or agreed to in writing, software
+
10// distributed under the License is distributed on an "AS IS" BASIS,
+
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+
12// See the License for the specific language governing permissions and
+
13// limitations under the License.
+
14// =====================================================================================================================
+
15
+
16
+
17#ifndef ENGINE_H
+
18#define ENGINE_H
+
19
+
20#include <Core/Window.h>
+
21#include <Utility/Timer.h>
+
22
+
23namespace OpenShaderDesigner
+
24{
+
+
25 class Engine
+
26 {
+
27 public:
+
28 static void Start(const Window::Configuration& config);
+
29 static void Stop();
+
30
+
31 static Window& GetMainWindow() { return *MainWindow; }
+
32 private:
+
33 static void Initialize();
+
34 static void Shutdown();
+
35 static void Update();
+
36
+
37 inline static Timer Frame;
+
38 inline static double _Delta;
+
39 inline static Window* MainWindow;
+
40
+
41 public:
+
42 inline static const double& Delta = _Delta;
+
43 };
+
+
44}
+
45
+
46
+
47
+
48#endif //ENGINE_H
+
Definition Engine.h:26
+
Definition Timer.h:24
+
Definition Window.h:46
+ +
+ + +
+ + diff --git a/Documentation/html/_enum_8h_source.html b/Documentation/html/_enum_8h_source.html new file mode 100644 index 0000000..2127bfd --- /dev/null +++ b/Documentation/html/_enum_8h_source.html @@ -0,0 +1,168 @@ + + + + + + + +OpenShaderDesigner: Include/OpenGL/Enum.h Source File + + + + + + + + + + + + + +
+
+ + + + + + +
+
OpenShaderDesigner 0.0.1 +
+
+
+ + + + + + + + + + +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ + +
+
+
+
Enum.h
+
+
+
1// =====================================================================================================================
+
2// Copyright 2024 Medusa Slockbower
+
3// Licensed under the Apache License, Version 2.0 (the "License");
+
4// you may not use this file except in compliance with the License.
+
5// You may obtain a copy of the License at
+
6//
+
7// http://www.apache.org/licenses/LICENSE-2.0
+
8//
+
9// Unless required by applicable law or agreed to in writing, software
+
10// distributed under the License is distributed on an "AS IS" BASIS,
+
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+
12// See the License for the specific language governing permissions and
+
13// limitations under the License.
+
14// =====================================================================================================================
+
15
+
16#ifndef ENUM_H
+
17#define ENUM_H
+
18
+
19#include <gl/glew.h>
+
20
+
21namespace GLW
+
22{
+
23 enum Primitive : GLenum
+
24 {
+
25 TRIANGLES = GL_TRIANGLES
+
26 , LINES = GL_LINES
+
27 , POINTS = GL_POINTS
+
28 };
+
29
+
30 enum BufferType : GLenum
+
31 {
+
32 AtomicCounter = GL_ATOMIC_COUNTER_BUFFER
+
33 , ElementArray = GL_ELEMENT_ARRAY_BUFFER
+
34 , IndirectCompute = GL_DISPATCH_INDIRECT_BUFFER
+
35 , IndirectDraw = GL_DRAW_INDIRECT_BUFFER
+
36 , PixelPack = GL_PIXEL_PACK_BUFFER
+
37 , PixelUnpack = GL_PIXEL_UNPACK_BUFFER
+
38 , ShaderStorage = GL_SHADER_STORAGE_BUFFER
+
39 , TransformFeedback = GL_TRANSFORM_FEEDBACK
+
40 , Uniform = GL_UNIFORM_BUFFER
+
41 , VertexArray = GL_ARRAY_BUFFER
+
42 };
+
43
+
44 enum BufferUsage : GLenum
+
45 {
+
49 STATIC = GL_NONE
+
50
+
54 , READ = GL_MAP_READ_BIT
+
55 , WRITE = GL_MAP_WRITE_BIT
+
56 , READ_WRITE = READ | WRITE
+
57
+
61 , DYNAMIC = GL_DYNAMIC_STORAGE_BIT
+
62
+
66 , PERSISTENT = GL_MAP_PERSISTENT_BIT
+
67
+
71 , COHERENT = GL_MAP_PERSISTENT_BIT | PERSISTENT
+
72 };
+
73
+
74 enum BufferStorage : GLenum
+
75 {
+
79 GPU = GL_NONE
+
80
+
84 , CPU = GL_CLIENT_STORAGE_BIT
+
85 };
+
86}
+
87
+
88#endif //ENUM_H
+
+ + +
+ + diff --git a/Documentation/html/_event_system_8h_source.html b/Documentation/html/_event_system_8h_source.html new file mode 100644 index 0000000..d1bd961 --- /dev/null +++ b/Documentation/html/_event_system_8h_source.html @@ -0,0 +1,235 @@ + + + + + + + +OpenShaderDesigner: Include/Core/EventSystem.h Source File + + + + + + + + + + + + + +
+
+ + + + + + +
+
OpenShaderDesigner 0.0.1 +
+
+
+ + + + + + + + + + +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ + +
+
+
+
EventSystem.h
+
+
+
1// =====================================================================================================================
+
2// Copyright 2024 Medusa Slockbower
+
3// Licensed under the Apache License, Version 2.0 (the "License");
+
4// you may not use this file except in compliance with the License.
+
5// You may obtain a copy of the License at
+
6//
+
7// http://www.apache.org/licenses/LICENSE-2.0
+
8//
+
9// Unless required by applicable law or agreed to in writing, software
+
10// distributed under the License is distributed on an "AS IS" BASIS,
+
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+
12// See the License for the specific language governing permissions and
+
13// limitations under the License.
+
14// =====================================================================================================================
+
15
+
16#ifndef ENGINE_EVENTSYSTEM_H
+
17#define ENGINE_EVENTSYSTEM_H
+
18
+
19#include <open-cpp-utils/unique_id.h>
+
20
+
21#include <cstdint>
+
22#include <list>
+
23#include <mutex>
+
24
+
25
+
26#define MAX_EVENT_TYPES 256
+
27
+
28namespace ocu = open_cpp_utils;
+
29
+
30namespace OpenShaderDesigner
+
31{
+
+
35 struct Event
+
36 {
+
37 template<typename T>
+
38 static uint8_t TypeOf() { return static_cast<uint8_t>(ocu::unique_id<uint8_t, T>()); }
+
39
+
44 virtual inline uint8_t GetID() const = 0;
+
45 };
+
+
46
+
47
+
+ +
52 {
+
53 virtual bool _HandleEvent(const Event* event) = 0;
+
54
+
55 friend class EventSystem;
+
56 };
+
+
57
+
62 template<typename EventType>
+
+ +
64 {
+
65 public:
+
66 using HandledType = EventType;
+
67
+
72 virtual bool HandleEvent(const HandledType* event) = 0;
+
73 private:
+
74
+
79 bool _HandleEvent(const Event* event) override;
+
80 };
+
+
81
+
+ +
86 {
+
87 public:
+
91 static void PostEvent(const Event*);
+
92
+
97 template<typename T>
+
98 static void RegisterHandler(EventHandler<T>*);
+
99
+
104 template<typename T>
+ +
106
+
107 private:
+
108 inline static std::list<_ImplEventHandler*> HandlerMap[MAX_EVENT_TYPES];
+
109 inline static std::mutex Lock;
+
110
+
111 EventSystem(const EventSystem&) = delete;
+
112 EventSystem(EventSystem&&) = delete;
+
113 };
+
+
114
+
115 template<typename T>
+
+ +
117 {
+
118 // Thread safe
+
119 std::lock_guard guard(Lock);
+
120 const uint8_t index = T::ID;
+
121 std::erase(HandlerMap[index], reinterpret_cast<_ImplEventHandler*>(handler));
+
122 }
+
+
123
+
124 template<typename T>
+
+ +
126 {
+
127 // Thread safe
+
128 std::lock_guard guard(Lock);
+
129 const uint8_t index = T::ID;
+
130 HandlerMap[index].push_back(reinterpret_cast<_ImplEventHandler*>(handler));
+
131 }
+
+
132
+
133 template<typename EventType>
+ +
135 {
+
136 if(EventType::ID != event->GetID()) return false;
+
137 return HandleEvent(reinterpret_cast<const EventType*>(event));
+
138 }
+
139}
+
140
+
141#define BeginEvent(EVENT) struct EVENT : OpenShaderDesigner::Event \
+
142 { \
+
143 static inline const uint8_t ID = Event::TypeOf<EVENT>(); \
+
144 inline uint8_t GetID() const override { return ID; }
+
145
+
146#define EndEvent };
+
147
+
148#endif //ENGINE_EVENTSYSTEM_H
+
Base EventHandler for abstraction.
Definition EventSystem.h:52
+
EventHandler interface for creating custom EventHandlers.
Definition EventSystem.h:64
+
virtual bool HandleEvent(const HandledType *event)=0
Virtual function for custom EventHandler implementations.
+
EventType HandledType
The type handled by the EventHandler.
Definition EventSystem.h:66
+
EventSystem for posting Events to be handled.
Definition EventSystem.h:86
+
static void UnregisterHandler(EventHandler< T > *)
Unregister an EventHandler with the EventSystem.
Definition EventSystem.h:116
+
static void PostEvent(const Event *)
Post an Event to be Handled.
Definition EventSystem.cpp:23
+
static void RegisterHandler(EventHandler< T > *)
Register an EventHandler with the EventSystem.
Definition EventSystem.h:125
+
Base Event class for sending events to the Engine.
Definition EventSystem.h:36
+
virtual uint8_t GetID() const =0
Get the Event's type ID.
+
+ + +
+ + diff --git a/Documentation/html/_math_8h_source.html b/Documentation/html/_math_8h_source.html new file mode 100644 index 0000000..6e13145 --- /dev/null +++ b/Documentation/html/_math_8h_source.html @@ -0,0 +1,165 @@ + + + + + + + +OpenShaderDesigner: Include/Graph/Nodes/Math.h Source File + + + + + + + + + + + + + +
+
+ + + + + + +
+
OpenShaderDesigner 0.0.1 +
+
+
+ + + + + + + + + + +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ + +
+
+
+
Math.h
+
+
+
1// =====================================================================================================================
+
2// Copyright 2024 Medusa Slockbower
+
3// Licensed under the Apache License, Version 2.0 (the "License");
+
4// you may not use this file except in compliance with the License.
+
5// You may obtain a copy of the License at
+
6//
+
7// http://www.apache.org/licenses/LICENSE-2.0
+
8//
+
9// Unless required by applicable law or agreed to in writing, software
+
10// distributed under the License is distributed on an "AS IS" BASIS,
+
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+
12// See the License for the specific language governing permissions and
+
13// limitations under the License.
+
14// =====================================================================================================================
+
15
+
16#ifndef MATH_H
+
17#define MATH_H
+
18
+
19#include <glm/vec4.hpp>
+
20#include <Graph/ShaderGraph.h>
+
21#include <open-cpp-utils/any.h>
+
22
+
23namespace ocu = open_cpp_utils;
+
24
+
25namespace OpenShaderDesigner::Nodes::Math
+
26{
+
27 inline static constexpr ImColor HeaderColor = ImColor(0x92, 0x16, 0x16);
+
28
+
+
29 struct Constant : public Node
+
30 {
+
31 using ValueType = ocu::any<int, unsigned int, float, glm::vec4>;
+
32
+
33 Constant(ShaderGraph& graph, ImVec2 pos);
+
34 virtual ~Constant() = default;
+
35
+
36 [[nodiscard]] Node* Copy(ShaderGraph& graph) const override;
+
37 void Inspect() override;
+
38
+
39 ValueType Value;
+
40 };
+
+
41
+
42 RegisterNode("Math/Constant", Constant);
+
43
+
+
44 struct Add : public Node
+
45 {
+
46 Add(ShaderGraph& graph, ImVec2 pos);
+
47 virtual ~Add() = default;
+
48
+
49 [[nodiscard]] Node* Copy(ShaderGraph& graph) const override;
+
50 void Inspect() override;
+
51 };
+
+
52
+
53 RegisterNode("Math/Add", Add);
+
54}
+
55
+
56#endif //MATH_H
+
Definition ShaderGraph.h:141
+
Definition ShaderGraph.h:104
+ + +
+ + +
+ + diff --git a/Documentation/html/_optional_8h_source.html b/Documentation/html/_optional_8h_source.html new file mode 100644 index 0000000..a1bb9a9 --- /dev/null +++ b/Documentation/html/_optional_8h_source.html @@ -0,0 +1,171 @@ + + + + + + + +OpenShaderDesigner: Include/Utility/Optional.h Source File + + + + + + + + + + + + + +
+
+ + + + + + +
+
OpenShaderDesigner 0.0.1 +
+
+
+ + + + + + + + + + +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ + +
+
+
+
Optional.h
+
+
+
1// =====================================================================================================================
+
2// Copyright 2024 Medusa Slockbower
+
3// Licensed under the Apache License, Version 2.0 (the "License");
+
4// you may not use this file except in compliance with the License.
+
5// You may obtain a copy of the License at
+
6//
+
7// http://www.apache.org/licenses/LICENSE-2.0
+
8//
+
9// Unless required by applicable law or agreed to in writing, software
+
10// distributed under the License is distributed on an "AS IS" BASIS,
+
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+
12// See the License for the specific language governing permissions and
+
13// limitations under the License.
+
14// =====================================================================================================================
+
15
+
16#ifndef OPTIONAL_H
+
17#define OPTIONAL_H
+
18
+
19template<typename T>
+
+ +
21{
+
22public:
+
23 using Type = T;
+
24
+
25 Optional() : Data(), Valid(false) { }
+
26 Optional(const Type& data) : Data(data), Valid(true) { }
+
27 Optional(Type&& data) : Data(data), Valid(true) { }
+
28 Optional(const Optional& other) = default;
+
29 Optional(Optional&& other) = default;
+
30
+
31 Optional& operator=(const Optional& other) = default;
+
32 Optional& operator=(Optional&& other) = default;
+
33
+
34 Type& operator=(const Type& data) { Data = data; Valid = true; return Data; }
+
35 Type& operator=(Type&& data) { Data = data; Valid = true; return Data; }
+
36
+
37 Type& operator+=(const Type& data) { assert(Valid); Data += data; return Data; }
+
38 Type& operator-=(const Type& data) { assert(Valid); Data += data; return Data; }
+
39 Type& operator*=(const Type& data) { assert(Valid); Data += data; return Data; }
+
40 Type& operator/=(const Type& data) { assert(Valid); Data += data; return Data; }
+
41 Type& operator%=(const Type& data) { assert(Valid); Data += data; return Data; }
+
42
+
43 Type& operator<<=(const Type& data) { assert(Valid); Data <<= data; return Data; }
+
44 Type& operator>>=(const Type& data) { assert(Valid); Data >>= data; return Data; }
+
45 Type& operator|=(const Type& data) { assert(Valid); Data |= data; return Data; }
+
46 Type& operator&=(const Type& data) { assert(Valid); Data &= data; return Data; }
+
47 Type& operator^=(const Type& data) { assert(Valid); Data ^= data; return Data; }
+
48
+
49 [[nodiscard]] bool operator()() const { return Valid; }
+
50
+
51 operator Type&() { assert(Valid); return Data; }
+
52 operator const Type&() const { assert(Valid); return Data; }
+
53
+
54 Type* operator->() { assert(Valid); return &Data; }
+
55 const Type* operator->() const { assert(Valid); return &Data; }
+
56
+
57 Type& operator*() { assert(Valid); return Data; }
+
58 const Type& operator*() const { assert(Valid); return Data; }
+
59
+
60 void Reset() { Valid = false; }
+
61
+
62private:
+
63 Type Data;
+
64 bool Valid;
+
65};
+
+
66
+
67#endif //OPTIONAL_H
+
Definition Optional.h:21
+
+ + +
+ + diff --git a/Documentation/html/_profiler_8h_source.html b/Documentation/html/_profiler_8h_source.html new file mode 100644 index 0000000..3be9f8f --- /dev/null +++ b/Documentation/html/_profiler_8h_source.html @@ -0,0 +1,171 @@ + + + + + + + +OpenShaderDesigner: Include/Editor/Profiler.h Source File + + + + + + + + + + + + + +
+
+ + + + + + +
+
OpenShaderDesigner 0.0.1 +
+
+
+ + + + + + + + + + +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ + +
+
+
+
Profiler.h
+
+
+
1// =====================================================================================================================
+
2// Copyright 2024 Medusa Slockbower
+
3// Licensed under the Apache License, Version 2.0 (the "License");
+
4// you may not use this file except in compliance with the License.
+
5// You may obtain a copy of the License at
+
6//
+
7// http://www.apache.org/licenses/LICENSE-2.0
+
8//
+
9// Unless required by applicable law or agreed to in writing, software
+
10// distributed under the License is distributed on an "AS IS" BASIS,
+
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+
12// See the License for the specific language governing permissions and
+
13// limitations under the License.
+
14// =====================================================================================================================
+
15
+
16#ifndef PROFILER_H
+
17#define PROFILER_H
+
18
+
19#include <Core/EventSystem.h>
+
20#include <Core/Window.h>
+
21#include <Editor/EditorWindow.h>
+
22#include <Utility/Timer.h>
+
23
+
24namespace OpenShaderDesigner
+
25{
+
26
+
+ +
28 : public EditorWindow
+
29 , public EventHandler<BeginFrame>
+
30 , public EventHandler<EndFrame>
+
31 {
+
32 public:
+
33 Profiler();
+
34 ~Profiler();
+
35
+
36 void DrawWindow() override;
+
37
+
38 bool HandleEvent(const EventHandler<BeginFrame>::HandledType* event) override;
+
39 bool HandleEvent(const EventHandler<EndFrame>::HandledType* event) override;
+
40
+
41 private:
+
42 enum
+
43 {
+
44 EVENTS = 0
+
45 , RENDER
+
46 , EDITOR
+
47 , END
+
48
+
49 , COUNT
+
50 , LAST = COUNT - 1
+
51 };
+
52
+
53 uint64_t Frame;
+
54 double Deltas[COUNT];
+ +
56 };
+
+
57
+
58}
+
59
+
60
+
61
+
62#endif //PROFILER_H
+
EditorWindow class for wrapping ImGui window functionality.
Definition EditorWindow.h:28
+
EventHandler interface for creating custom EventHandlers.
Definition EventSystem.h:64
+
EventType HandledType
The type handled by the EventHandler.
Definition EventSystem.h:66
+
Definition Profiler.h:31
+
void DrawWindow() override
DrawWindow function for when the EditorWindow is being drawn.
Definition Profiler.cpp:35
+
Definition Timer.h:24
+
+ + +
+ + diff --git a/Documentation/html/_renderer_8h_source.html b/Documentation/html/_renderer_8h_source.html new file mode 100644 index 0000000..02adf71 --- /dev/null +++ b/Documentation/html/_renderer_8h_source.html @@ -0,0 +1,136 @@ + + + + + + + +OpenShaderDesigner: Include/Core/Renderer.h Source File + + + + + + + + + + + + + +
+
+ + + + + + +
+
OpenShaderDesigner 0.0.1 +
+
+
+ + + + + + + + + + +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ + +
+
+
+
Renderer.h
+
+
+
1// =====================================================================================================================
+
2// Copyright 2024 Medusa Slockbower
+
3// Licensed under the Apache License, Version 2.0 (the "License");
+
4// you may not use this file except in compliance with the License.
+
5// You may obtain a copy of the License at
+
6//
+
7// http://www.apache.org/licenses/LICENSE-2.0
+
8//
+
9// Unless required by applicable law or agreed to in writing, software
+
10// distributed under the License is distributed on an "AS IS" BASIS,
+
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+
12// See the License for the specific language governing permissions and
+
13// limitations under the License.
+
14// =====================================================================================================================
+
15
+
16
+
17#ifndef RENDERER_H
+
18#define RENDERER_H
+
19
+
20
+
21
+
22namespace OpenShaderDesigner
+
23{
+
+ +
25 {
+
26
+
27 };
+
+
28}
+
29
+
30
+
31
+
32#endif //RENDERER_H
+
Definition Renderer.h:25
+
+ + +
+ + diff --git a/Documentation/html/_shader_graph_8h_source.html b/Documentation/html/_shader_graph_8h_source.html new file mode 100644 index 0000000..36205a3 --- /dev/null +++ b/Documentation/html/_shader_graph_8h_source.html @@ -0,0 +1,455 @@ + + + + + + + +OpenShaderDesigner: Include/Graph/ShaderGraph.h Source File + + + + + + + + + + + + + +
+
+ + + + + + +
+
OpenShaderDesigner 0.0.1 +
+
+
+ + + + + + + + + + +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ + +
+
+
+
ShaderGraph.h
+
+
+
1// =====================================================================================================================
+
2// Copyright 2024 Medusa Slockbower
+
3// Licensed under the Apache License, Version 2.0 (the "License");
+
4// you may not use this file except in compliance with the License.
+
5// You may obtain a copy of the License at
+
6//
+
7// http://www.apache.org/licenses/LICENSE-2.0
+
8//
+
9// Unless required by applicable law or agreed to in writing, software
+
10// distributed under the License is distributed on an "AS IS" BASIS,
+
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+
12// See the License for the specific language governing permissions and
+
13// limitations under the License.
+
14// =====================================================================================================================
+
15
+
16#ifndef SHADERGRAPH_H
+
17#define SHADERGRAPH_H
+
18
+
19#include <Editor/EditorWindow.h>
+
20
+
21#include <vector>
+
22#include <unordered_map>
+
23#include <filesystem>
+
24#include <unordered_set>
+
25#include <stack>
+
26
+
27#include <open-cpp-utils/startup.h>
+
28#include <open-cpp-utils/directed_tree.h>
+
29#include <open-cpp-utils/optional.h>
+
30
+
31namespace ocu = open_cpp_utils;
+
32
+
33#define RegisterNode(Name, Type) \
+
34 Node* Create##Type(ShaderGraph& graph, ImVec2 pos) { return new Type(graph, pos); } \
+
35 STARTUP(_Register##Type) { ShaderGraph::Register(Name, Create##Type); }
+
36
+
37namespace OpenShaderDesigner
+
38{
+
39 class ShaderGraph;
+
40 using PinId = uint16_t;
+
41 using NodeId = uint32_t;
+
42
+
+
43 struct PinPtr
+
44 {
+
+
45 struct Hash
+
46 {
+
47 size_t operator()(const PinPtr& p) const
+
48 {
+
49 return p.hash();
+
50 }
+
51 };
+
+
52
+
53 NodeId Node;
+
54 PinId Pin;
+
55 bool Input;
+
56
+
57 size_t hash() const { return (Input ? 0 : 0x8000000) | static_cast<size_t>(Node) << 32 | static_cast<size_t>(Pin & 0x7FFFFFFF); }
+
58
+
59 bool operator<(const PinPtr& o) const { return hash() < o.hash(); }
+
60 bool operator==(const PinPtr& o) const { return hash() == o.hash(); }
+
61 };
+
+
62
+
+
63 struct Pin
+
64 {
+
65 enum PinType
+
66 {
+
67 INT = 0
+
68 , UINT
+
69 , FLOAT
+
70 , VECTOR
+
71
+
72 , ANY
+
73 , COUNT
+
74 };
+
75
+
76 enum PinDirection
+
77 {
+
78 INPUT
+
79 , OUTPUT
+
80 };
+
81
+
82 inline const static ImColor Colors[COUNT] = {
+
83 ImColor(0xB9, 0xF5, 0x94)
+
84 , ImColor(0x8C, 0xC0, 0x8C)
+
85 , ImColor(0x37, 0x95, 0x85)
+
86 , ImColor(0xE3, 0x7D, 0xDC)
+
87// , ImColor(0xD2, 0x6E, 0x46)
+
88 , ImColor(0xD2, 0xD5, 0xD3)
+
89 };
+
90
+
91 inline const static std::string TypeNames[COUNT] = {
+
92 "Int"
+
93 , "Unsigned Int"
+
94 , "Float"
+
95 , "Vector"
+
96 };
+
97
+
98 std::string Name;
+
99 PinType Type;
+
100 PinDirection Direction;
+
101 };
+
+
102
+
+
103 struct Node
+
104 {
+
105 public:
+
106 ImVec2 Position = { 0, 0 };
+
107
+
108 struct
+
109 {
+
110 std::string Title = "Node";
+
111 ImColor Color = Pin::Colors[Pin::VECTOR];
+
112 bool Enabled = true;
+
113 } Header;
+
114
+
115 struct
+
116 {
+
117 std::vector<Pin> Inputs, Outputs;
+
118 bool DynamicInputs = false;
+
119 } IO;
+
120
+
121 struct
+
122 {
+
123 ImVec2 Size;
+
124 bool Const;
+
125 } Info;
+
126
+
127 Node(
+
128 ShaderGraph& graph, ImVec2 pos
+
129 , const std::string& title, ImColor color
+
130 , const std::vector<Pin>& inputs, bool dyn_inputs
+
131 , const std::vector<Pin>& outputs
+
132 , bool constant = false);
+
133 ~Node() = default;
+
134
+
135 virtual Node* Copy(ShaderGraph& graph) const = 0;
+
136 virtual void Inspect() = 0;
+
137 };
+
+
138
+
+ +
140 : public EditorWindow
+
141 {
+
142 private:
+
143 friend Node;
+
144
+
145 using Connection = std::pair<const PinPtr, PinPtr>;
+
146 using ConnectionMap = std::unordered_multimap<PinPtr, PinPtr, PinPtr::Hash>;
+
147
+
148 struct Line
+
149 {
+
150 ImColor Color;
+
151 float Thickness;
+
152 };
+
153
+
154 using ConstructorPtr = Node*(*)(ShaderGraph&, ImVec2);
+
155 struct ContextMenuItem
+
156 {
+
157 std::string Name;
+
158 ConstructorPtr Constructor;
+
159 };
+
160
+
161 struct GraphState
+
162 {
+
163 ShaderGraph& Parent;
+
164 std::vector<Node*> Nodes;
+
165 std::unordered_set<PinId> Erased;
+
166 ConnectionMap Connections;
+
167
+
168 GraphState(ShaderGraph& parent);
+
169 GraphState(const GraphState& other);
+
170 ~GraphState();
+
171
+
172 GraphState& operator=(const GraphState& other);
+
173 };
+
174
+
175 using ContextMenuHierarchy = ocu::directed_tree<ContextMenuItem>;
+
176 using ContextID = ContextMenuHierarchy::node;
+
177 inline static ContextMenuHierarchy ContextMenu;
+
178
+
179 // Helper functions
+
180 float CalculateWidth(Node& node);
+
181 float CalculateHeight(Node& node);
+
182
+
183 // Base Draw and Input functions
+
184 void HandleInput();
+
185 void DrawGrid();
+
186 void DrawNode(Node& node, NodeId id);
+
187 void DrawPin(NodeId node_id, Pin& pin, PinId pin_id, ImVec2 location, bool input);
+
188 void DrawContextMenu();
+
189
+
190 // Connection functions
+
191 void DrawConnections();
+
192 void DrawConnection(const PinPtr& a, const PinPtr& b);
+
193 auto StartConnection(const PinPtr& ptr) -> void;
+
194 void StopConnection();
+
195 void CreateConnection(const PinPtr& a, const PinPtr& b);
+
196 void EraseConnection(const PinPtr& a, const PinPtr& b);
+
197 void EraseConnections(const PinPtr& a);
+
198
+
199 NodeId AddNode(Node* node);
+
200 void RemoveNode(NodeId id);
+
201
+
202 // Clipboard functionality
+
203 void ClearClipboard();
+
204 void Copy();
+
205 void Paste(const ImVec2& location);
+
206 void EraseSelection();
+
207
+
208 // History Functionality
+
209 void PushState();
+
210 void PopState();
+
211
+
212 // Helper functions
+
213 float BezierOffset(const ImVec2& out, const ImVec2& in);
+
214 bool AABB(const ImVec2& a0, const ImVec2& a1, const ImVec2& b0, const ImVec2& b1);
+
215
+
216 ImVec2 GridToScreen(const ImVec2& position);
+
217 ImVec2 ScreenToGrid(const ImVec2& position);
+
218 ImVec2 SnapToGrid(const ImVec2& position);
+
219
+
220 Pin& GetPin(const PinPtr& ptr);
+
221
+
222 public:
+
223 ShaderGraph();
+
224 ~ShaderGraph();
+
225
+
226 void OnOpen() override;
+
227 void DrawWindow() override;
+
228
+
229 static void Register(const std::filesystem::path& path, ConstructorPtr constructor);
+
230
+
231 private:
+
232 GraphState State;
+
233 std::stack<GraphState> History;
+
234
+
235 struct
+
236 {
+
237 struct
+
238 {
+
239 ImColor BackgroundColor;
+
240
+
241 struct
+
242 {
+
243 Line Thin, Thick;
+
244 float Padding;
+
245 } Lines;
+
246 } Grid;
+
247
+
248 struct
+
249 {
+
250 float Rounding;
+
251 Line Border, SelectedBorder;
+
252 ImColor Content;
+
253 ImColor Title;
+
254
+
255 struct
+
256 {
+
257 float Padding;
+
258 float BorderThickness;
+
259 ImColor Background;
+
260 ImColor Text;
+
261 Line Connections;
+
262 } Pins;
+
263 } Nodes;
+
264
+
265 struct
+
266 {
+
267 ImColor Background;
+
268 Line Border;
+
269 } Selection;
+
270
+
271 float FontSize;
+
272 } Style;
+
273
+
274 struct
+
275 {
+
276 struct
+
277 {
+
278 struct
+
279 {
+
280 float Rate, Smoothing;
+
281 } Scroll;
+
282 } Input;
+
283 } Settings;
+
284
+
285 struct
+
286 {
+
287 ImVec2 Location, ScreenLocation, Delta;
+
288 float Scroll;
+
289 bool ClickedSomething;
+
290
+
291 ocu::optional<NodeId> FocusedNode;
+
292 std::unordered_map<NodeId, ImVec2> Locks;
+
293 std::unordered_set<NodeId> DragSelect;
+
294 bool LocksDragged, NodeHovered;
+
295 ocu::optional<PinPtr> NewConnection;
+
296 std::unordered_set<NodeId> Selected;
+
297 } Mouse;
+
298
+
299 struct
+
300 {
+
301 ImVec2 Location;
+
302 float Zoom, Scroll;
+
303 } Camera;
+
304
+
305 struct
+
306 {
+
307 std::vector<Node*> Nodes;
+
308 ConnectionMap Connections;
+
309 } Clipboard;
+
310
+
311 bool Focused;
+
312 ImVec2 ContextMenuPosition;
+
313
+
314 friend class Inspector;
+
315 };
+
+
316
+
+ +
318 : public EditorWindow
+
319 {
+
320 public:
+
321 Inspector();
+
322
+
323 void DrawWindow() override;
+
324
+
325 private:
+
326 ShaderGraph* Graph;
+
327
+
328 friend class ShaderGraph;
+
329 };
+
+
330}
+
331
+
332#endif //SHADERGRAPH_H
+
EditorWindow class for wrapping ImGui window functionality.
Definition EditorWindow.h:28
+
Definition ShaderGraph.h:319
+
void DrawWindow() override
DrawWindow function for when the EditorWindow is being drawn.
Definition ShaderGraph.cpp:1166
+
Definition ShaderGraph.h:141
+
void OnOpen() override
OnOpen callback for when the EditorWindow is opened.
Definition ShaderGraph.cpp:219
+
void DrawWindow() override
DrawWindow function for when the EditorWindow is being drawn.
Definition ShaderGraph.cpp:227
+
Definition ShaderGraph.h:104
+
Definition ShaderGraph.h:64
+
Definition ShaderGraph.h:46
+
Definition ShaderGraph.h:44
+
+ + +
+ + diff --git a/Documentation/html/_startup_8h_source.html b/Documentation/html/_startup_8h_source.html new file mode 100644 index 0000000..10dd1c5 --- /dev/null +++ b/Documentation/html/_startup_8h_source.html @@ -0,0 +1,143 @@ + + + + + + + +OpenShaderDesigner: Include/Utility/Startup.h Source File + + + + + + + + + + + + + +
+
+ + + + + + +
+
OpenShaderDesigner 0.0.1 +
+
+
+ + + + + + + + + + +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ + +
+
+
+
Startup.h
+
+
+
1// =====================================================================================================================
+
2// Copyright 2024 Medusa Slockbower
+
3// Licensed under the Apache License, Version 2.0 (the "License");
+
4// you may not use this file except in compliance with the License.
+
5// You may obtain a copy of the License at
+
6//
+
7// http://www.apache.org/licenses/LICENSE-2.0
+
8//
+
9// Unless required by applicable law or agreed to in writing, software
+
10// distributed under the License is distributed on an "AS IS" BASIS,
+
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+
12// See the License for the specific language governing permissions and
+
13// limitations under the License.
+
14// =====================================================================================================================
+
15
+
16#ifndef STARTUP_H
+
17#define STARTUP_H
+
18
+
19#ifdef __cplusplus
+
20#define STARTUP(f) \
+
21 static void f(void); \
+
22 struct f##_t_ { f##_t_(void) { f(); } }; inline static f##_t_ f##_; \
+
23 static void f(void)
+
24#elif defined(_MSC_VER)
+
25#pragma section(".CRT$XCU",read)
+
26 #define INITIALIZER2_(f,p) \
+
27 static void f(void); \
+
28 __declspec(allocate(".CRT$XCU")) void (*f##_)(void) = f; \
+
29 __pragma(comment(linker,"/include:" p #f "_")) \
+
30 static void f(void)
+
31 #ifdef _WIN64
+
32 #define STARTUP(f) INITIALIZER2_(f,"")
+
33 #else
+
34 #define STARTUP(f) INITIALIZER2_(f,"_")
+
35 #endif
+
36#else
+
37 #define STARTUP(f) \
+
38 static void f(void) __attribute__((constructor)); \
+
39 static void f(void)
+
40#endif
+
41
+
42#endif //STARTUP_H
+
+ + +
+ + diff --git a/Documentation/html/_template_utils_8h.html b/Documentation/html/_template_utils_8h.html new file mode 100644 index 0000000..b3a7a32 --- /dev/null +++ b/Documentation/html/_template_utils_8h.html @@ -0,0 +1,202 @@ + + + + + + + +OpenShaderDesigner: Include/Utility/TemplateUtils.h File Reference + + + + + + + + + + + + + +
+
+ + + + + + +
+
OpenShaderDesigner 0.0.1 +
+
+
+ + + + + + + + + + +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ + +
+
+
+ +
TemplateUtils.h File Reference
+
+
+ +

Provides compile time evaluation utilities for templates and template packs. +More...

+ +

Go to the source code of this file.

+ + + + + + + +

+Classes

struct  ConstantValue< T, V >
 Compile-time constant value. More...
 
struct  GetPackElement< I, T, Ts >
 
+ + + + + + + + + + + +

+Typedefs

template<bool V>
using BoolConstant = ConstantValue<bool, V>
 Compile-time constant boolean value.
 
+using TrueType = BoolConstant<true>
 Constant True Value.
 
+using FalseType = BoolConstant<false>
 Constant False Value.
 
+ + + + + +

+Variables

template<typename T , typename... Ts>
constexpr bool IsUnique< T, Ts... > = BoolConstant<(!IsSame<T, Ts> && ...) && IsUnique<Ts...>>{}
 Check if all types in a template pack are unique.
 
+

Detailed Description

+

Provides compile time evaluation utilities for templates and template packs.

+

Typedef Documentation

+ +

◆ BoolConstant

+ +
+
+
+template<bool V>
+ + + + +
using BoolConstant = ConstantValue<bool, V>
+
+ +

Compile-time constant boolean value.

+
Template Parameters
+ + +
VValue
+
+
+ +
+
+

Variable Documentation

+ +

◆ IsUnique< T, Ts... >

+ +
+
+
+template<typename T , typename... Ts>
+ + + + + +
+ + + + +
bool IsUnique< T, Ts... > = BoolConstant<(!IsSame<T, Ts> && ...) && IsUnique<Ts...>>{}
+
+inlineconstexpr
+
+ +

Check if all types in a template pack are unique.

+
Template Parameters
+ + + +
TFirst element of template pack
TsRest of the template pack
+
+
+ +
+
+
+ + +
+ + diff --git a/Documentation/html/_template_utils_8h_source.html b/Documentation/html/_template_utils_8h_source.html new file mode 100644 index 0000000..2e5e883 --- /dev/null +++ b/Documentation/html/_template_utils_8h_source.html @@ -0,0 +1,160 @@ + + + + + + + +OpenShaderDesigner: Include/Utility/TemplateUtils.h Source File + + + + + + + + + + + + + +
+
+ + + + + + +
+
OpenShaderDesigner 0.0.1 +
+
+
+ + + + + + + + + + +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ + +
+
+
+
TemplateUtils.h
+
+
+Go to the documentation of this file.
1// =====================================================================================================================
+
2// Copyright 2024 Medusa Slockbower
+
3// Licensed under the Apache License, Version 2.0 (the "License");
+
4// you may not use this file except in compliance with the License.
+
5// You may obtain a copy of the License at
+
6//
+
7// http://www.apache.org/licenses/LICENSE-2.0
+
8//
+
9// Unless required by applicable law or agreed to in writing, software
+
10// distributed under the License is distributed on an "AS IS" BASIS,
+
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+
12// See the License for the specific language governing permissions and
+
13// limitations under the License.
+
14// =====================================================================================================================
+
15
+
16#ifndef TEMPLATEUTILS_H
+
17#define TEMPLATEUTILS_H
+
18
+
29template<typename T, T V>
+
+ +
31{
+
32 using Type = T;
+
33 static constexpr Type Value = V;
+
34
+
35 constexpr operator Type() const noexcept { return Value; }
+
36 [[nodiscard]] constexpr Type operator()() const { return Value; }
+
37};
+
+
38
+
43template<bool V>
+ +
45
+ + +
48
+
52template<typename, typename>
+
53inline static constexpr bool IsSame = false;
+
54
+
55template<typename T>
+
56inline static constexpr bool IsSame<T, T> = true;
+
57
+
58template<typename...>
+
59inline static constexpr bool IsUnique = TrueType{};
+
60
+
66template<typename T, typename...Ts>
+
67inline constexpr bool IsUnique<T, Ts...> = BoolConstant<(!IsSame<T, Ts> && ...) && IsUnique<Ts...>>{};
+
68
+
69template<size_t I, typename T, typename...Ts>
+
+ +
71{
+
72 using Type = typename GetPackElement<I - 1, T, Ts...>::Type;
+
73};
+
+
74
+
75#endif //TEMPLATEUTILS_H
+
Compile-time constant value.
Definition TemplateUtils.h:31
+
Definition TemplateUtils.h:71
+
+ + +
+ + diff --git a/Documentation/html/_timer_8h_source.html b/Documentation/html/_timer_8h_source.html new file mode 100644 index 0000000..e8eab3d --- /dev/null +++ b/Documentation/html/_timer_8h_source.html @@ -0,0 +1,141 @@ + + + + + + + +OpenShaderDesigner: Include/Utility/Timer.h Source File + + + + + + + + + + + + + +
+
+ + + + + + +
+
OpenShaderDesigner 0.0.1 +
+
+
+ + + + + + + + + + +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ + +
+
+
+
Timer.h
+
+
+
1// =====================================================================================================================
+
2// Copyright 2024 Medusa Slockbower
+
3// Licensed under the Apache License, Version 2.0 (the "License");
+
4// you may not use this file except in compliance with the License.
+
5// You may obtain a copy of the License at
+
6//
+
7// http://www.apache.org/licenses/LICENSE-2.0
+
8//
+
9// Unless required by applicable law or agreed to in writing, software
+
10// distributed under the License is distributed on an "AS IS" BASIS,
+
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+
12// See the License for the specific language governing permissions and
+
13// limitations under the License.
+
14// =====================================================================================================================
+
15
+
16#ifndef TIMER_H
+
17#define TIMER_H
+
18
+
19#include <chrono>
+
20
+
21namespace OpenShaderDesigner
+
22{
+
+
23 class Timer
+
24 {
+
25 public:
+
26 Timer() : Start(std::chrono::high_resolution_clock::now()) { }
+
27
+
28 void Reset() { Start = std::chrono::high_resolution_clock::now(); }
+
29
+
30 [[nodiscard]] double Poll() const
+
31 { return std::chrono::duration<double>(std::chrono::high_resolution_clock::now() - Start).count(); }
+
32 private:
+
33 std::chrono::high_resolution_clock::time_point Start;
+
34 };
+
+
35}
+
36
+
37#endif //TIMER_H
+
Definition Timer.h:24
+
+ + +
+ + diff --git a/Documentation/html/_type_8h_source.html b/Documentation/html/_type_8h_source.html new file mode 100644 index 0000000..7cb5aa3 --- /dev/null +++ b/Documentation/html/_type_8h_source.html @@ -0,0 +1,131 @@ + + + + + + + +OpenShaderDesigner: Include/OpenGL/Type.h Source File + + + + + + + + + + + + + +
+
+ + + + + + +
+
OpenShaderDesigner 0.0.1 +
+
+
+ + + + + + + + + + +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ + +
+
+
+
Type.h
+
+
+
1// =====================================================================================================================
+
2// Copyright 2024 Medusa Slockbower
+
3// Licensed under the Apache License, Version 2.0 (the "License");
+
4// you may not use this file except in compliance with the License.
+
5// You may obtain a copy of the License at
+
6//
+
7// http://www.apache.org/licenses/LICENSE-2.0
+
8//
+
9// Unless required by applicable law or agreed to in writing, software
+
10// distributed under the License is distributed on an "AS IS" BASIS,
+
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+
12// See the License for the specific language governing permissions and
+
13// limitations under the License.
+
14// =====================================================================================================================
+
15
+
16#ifndef TYPE_H
+
17#define TYPE_H
+
18
+
19#include <gl/glew.h>
+
20
+
21namespace GLW
+
22{
+
23 using OffsetT = GLintptr;
+
24 using SizeT = GLsizeiptr;
+
25 using IndexT = GLuint;
+
26 using FlagT = GLbitfield;
+
27 using HandleT = GLuint;
+
28}
+
29
+
30#endif //TYPE_H
+
+ + +
+ + diff --git a/Documentation/html/_unique_i_d_8h_source.html b/Documentation/html/_unique_i_d_8h_source.html new file mode 100644 index 0000000..b182b9e --- /dev/null +++ b/Documentation/html/_unique_i_d_8h_source.html @@ -0,0 +1,146 @@ + + + + + + + +OpenShaderDesigner: Include/Utility/UniqueID.h Source File + + + + + + + + + + + + + +
+
+ + + + + + +
+
OpenShaderDesigner 0.0.1 +
+
+
+ + + + + + + + + + +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ + +
+
+
+
UniqueID.h
+
+
+
1// =====================================================================================================================
+
2// Copyright 2024 Medusa Slockbower
+
3// Licensed under the Apache License, Version 2.0 (the "License");
+
4// you may not use this file except in compliance with the License.
+
5// You may obtain a copy of the License at
+
6//
+
7// http://www.apache.org/licenses/LICENSE-2.0
+
8//
+
9// Unless required by applicable law or agreed to in writing, software
+
10// distributed under the License is distributed on an "AS IS" BASIS,
+
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+
12// See the License for the specific language governing permissions and
+
13// limitations under the License.
+
14// =====================================================================================================================
+
15
+
16#ifndef ENGINE_UNIQUEID_H
+
17#define ENGINE_UNIQUEID_H
+
18
+
19#include <cstdint>
+
20
+
21#ifdef _MSC_VER
+
22#define COUNTER __declspec(selectany)
+
23#endif
+
24
+
25namespace OpenShaderDesigner
+
26{
+
27 template<typename Base> uint64_t _Increment()
+
28 {
+
29 static uint64_t current = 0;
+
30 return current++;
+
31 }
+
32
+
33 // Unfortunately adds a little bit of overhead at runtime
+
34 template<typename Base, typename Type> uint64_t UniqueID()
+
35 {
+
36 static bool initialized = false;
+
37 static uint64_t id = 0;
+
38
+
39 if(initialized) return id;
+
40 initialized = true;
+
41 return id = _Increment<Base>();
+
42 }
+
43}
+
44
+
45#endif //ENGINE_UNIQUEID_H
+
+ + +
+ + diff --git a/Documentation/html/_window_8h_source.html b/Documentation/html/_window_8h_source.html new file mode 100644 index 0000000..873a2af --- /dev/null +++ b/Documentation/html/_window_8h_source.html @@ -0,0 +1,221 @@ + + + + + + + +OpenShaderDesigner: Include/Core/Window.h Source File + + + + + + + + + + + + + +
+
+ + + + + + +
+
OpenShaderDesigner 0.0.1 +
+
+
+ + + + + + + + + + +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ + +
+
+
+
Window.h
+
+
+
1// =====================================================================================================================
+
2// Copyright 2024 Medusa Slockbower
+
3// Licensed under the Apache License, Version 2.0 (the "License");
+
4// you may not use this file except in compliance with the License.
+
5// You may obtain a copy of the License at
+
6//
+
7// http://www.apache.org/licenses/LICENSE-2.0
+
8//
+
9// Unless required by applicable law or agreed to in writing, software
+
10// distributed under the License is distributed on an "AS IS" BASIS,
+
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+
12// See the License for the specific language governing permissions and
+
13// limitations under the License.
+
14// =====================================================================================================================
+
15
+
16#ifndef WINDOW_H
+
17#define WINDOW_H
+
18
+
19#include <SDL2/SDL.h>
+
20#include <glm/glm.hpp>
+
21#include <string>
+
22#include <Core/EventSystem.h>
+
23
+
24namespace OpenShaderDesigner
+
25{
+
26 BeginEvent(SDLEvent)
+
27 const SDL_Event sdl_event;
+
28
+
29 SDLEvent() : sdl_event() {}
+
30
+
31 explicit SDLEvent(const SDL_Event &event) : sdl_event(event) {}
+
32 EndEvent
+
33
+
34
+
35 BeginEvent(BeginFrame)
+
36 EndEvent;
+
37
+
38 BeginEvent(SDLEventsDone)
+
39 EndEvent;
+
40
+
41 BeginEvent(EndFrame)
+
42 EndEvent;
+
43
+
44
+
+
45 class Window
+
46 {
+
47 public:
+
48 enum class VSyncMode : int
+
49 {
+
50 DISABLED = 0,
+
51 ENABLED = 1,
+
52 ADAPTIVE = -1,
+
53 DEFAULT = DISABLED,
+
54 };
+
55
+
56 enum class FullscreenMode : int
+
57 {
+
58 WINDOWED = 0,
+
59 FULLSCREEN = SDL_WINDOW_FULLSCREEN,
+
60 FULLSCREEN_WINDOW = SDL_WINDOW_FULLSCREEN_DESKTOP,
+
61 };
+
62
+
+ +
64 {
+
65 struct
+
66 {
+
67 std::string Title;
+
68 } Application;
+
69
+
70 struct
+
71 {
+
72 FullscreenMode Fullscreen;
+
73 glm::ivec2 Resolution;
+
74 VSyncMode VSync;
+
75 bool HDR;
+
76 } Video;
+
77
+ +
79 : Application { "App" }
+
80 , Video { FullscreenMode::WINDOWED, glm::ivec2(1280, 720), VSyncMode::DISABLED, false }
+
81 { }
+
82 };
+
+
83
+
84 inline static const Configuration DefaultConfiguration;
+
85
+
86 explicit Window(const Configuration& config);
+
87 ~Window();
+
88
+
89 void HandleEvents();
+
90 void BeginFrame();
+
91 void EndFrame();
+
92
+
93 void Close() { Open = false; }
+
94 [[nodiscard]] bool IsOpen() const { return Open; }
+
95
+
96 SDL_Window* GetHandle() { return Handle; }
+
97 [[nodiscard]] const SDL_Window* GetHandle() const { return Handle; }
+
98
+
99 SDL_GLContext GetContext() { return Context; }
+
100 [[nodiscard]] const SDL_GLContext GetContext() const { return Context; }
+
101
+
102 [[nodiscard]] glm::ivec2 Size() const { return Config.Video.Resolution; }
+
103 private:
+
104 Configuration Config;
+
105 SDL_Window* Handle;
+
106 SDL_GLContext Context;
+
107 bool Open;
+
108 };
+
+
109}
+
110
+
111
+
112
+
113
+
114#endif //WINDOW_H
+
Definition Window.h:46
+ +
+ + +
+ + diff --git a/Documentation/html/annotated.html b/Documentation/html/annotated.html new file mode 100644 index 0000000..7df5e21 --- /dev/null +++ b/Documentation/html/annotated.html @@ -0,0 +1,128 @@ + + + + + + + +OpenShaderDesigner: Class List + + + + + + + + + + + + + +
+
+ + + + + + +
+
OpenShaderDesigner 0.0.1 +
+
+
+ + + + + + + + +
+
+ + +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+
Class List
+
+
+
Here are the classes, structs, unions and interfaces with brief descriptions:
+
[detail level 1234]
+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
 NGLW
 CBufferObject
 NOpenShaderDesigner
 NNodes
 NMath
 CAdd
 CConstant
 C_ImplEventHandlerBase EventHandler for abstraction
 CConsole
 CConsoleWindow
 CEditorSystem
 CEditorWindowEditorWindow class for wrapping ImGui window functionality
 CEngine
 CEventBase Event class for sending events to the Engine
 CEventHandlerEventHandler interface for creating custom EventHandlers
 CEventSystemEventSystem for posting Events to be handled
 CInspector
 CNode
 CPin
 CPinPtr
 CHash
 CProfiler
 CRenderer
 CShaderGraph
 CTimer
 CWindow
 CConfiguration
+
+
+ + +
+ + diff --git a/Documentation/html/bc_s.png b/Documentation/html/bc_s.png new file mode 100644 index 0000000..224b29a Binary files /dev/null and b/Documentation/html/bc_s.png differ diff --git a/Documentation/html/bc_sd.png b/Documentation/html/bc_sd.png new file mode 100644 index 0000000..31ca888 Binary files /dev/null and b/Documentation/html/bc_sd.png differ diff --git a/Documentation/html/class_any.html b/Documentation/html/class_any.html new file mode 100644 index 0000000..0e8c935 --- /dev/null +++ b/Documentation/html/class_any.html @@ -0,0 +1,100 @@ + + + + + + + +OpenShaderDesigner: Any< Ts > Class Template Reference + + + + + + + + + + + + + +
+
+ + + + + + +
+
OpenShaderDesigner 0.0.1 +
+
+
+ + + + + + + + + + +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+
+
+
Any< Ts > Class Template Reference
+
+
+
The documentation for this class was generated from the following file: +
+ + +
+ + diff --git a/Documentation/html/class_any_3_01_t_00_01_rest_8_8_8_01_4-members.html b/Documentation/html/class_any_3_01_t_00_01_rest_8_8_8_01_4-members.html new file mode 100644 index 0000000..5b27735 --- /dev/null +++ b/Documentation/html/class_any_3_01_t_00_01_rest_8_8_8_01_4-members.html @@ -0,0 +1,114 @@ + + + + + + + +OpenShaderDesigner: Member List + + + + + + + + + + + + + +
+
+ + + + + + +
+
OpenShaderDesigner 0.0.1 +
+
+
+ + + + + + + + + + +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+
+
+
Any< T, Rest... > Member List
+
+
+ +

This is the complete list of members for Any< T, Rest... >, including all inherited members.

+ + + + + + + + + + + + + + + +
Any() (defined in Any< T, Rest... >)Any< T, Rest... >inline
Any(const ThisType &value, const Rest &...other) (defined in Any< T, Rest... >)Any< T, Rest... >inline
Any(ThisType &&value, Rest &&...other) (defined in Any< T, Rest... >)Any< T, Rest... >inline
Any(const Any &other)=default (defined in Any< T, Rest... >)Any< T, Rest... >
Any(Any &&other)=default (defined in Any< T, Rest... >)Any< T, Rest... >
operator const ThisType &() const (defined in Any< T, Rest... >)Any< T, Rest... >inline
operator const ThisType *() const (defined in Any< T, Rest... >)Any< T, Rest... >inline
operator ThisType() const (defined in Any< T, Rest... >)Any< T, Rest... >inline
operator ThisType &() (defined in Any< T, Rest... >)Any< T, Rest... >inline
operator ThisType &&() (defined in Any< T, Rest... >)Any< T, Rest... >inline
operator ThisType *() (defined in Any< T, Rest... >)Any< T, Rest... >inline
operator=(const Any &)=default (defined in Any< T, Rest... >)Any< T, Rest... >
operator=(Any &&)=default (defined in Any< T, Rest... >)Any< T, Rest... >
~Any()=default (defined in Any< T, Rest... >)Any< T, Rest... >
+ + +
+ + diff --git a/Documentation/html/class_any_3_01_t_00_01_rest_8_8_8_01_4.html b/Documentation/html/class_any_3_01_t_00_01_rest_8_8_8_01_4.html new file mode 100644 index 0000000..a3d457b --- /dev/null +++ b/Documentation/html/class_any_3_01_t_00_01_rest_8_8_8_01_4.html @@ -0,0 +1,160 @@ + + + + + + + +OpenShaderDesigner: Any< T, Rest... > Class Template Reference + + + + + + + + + + + + + +
+
+ + + + + + +
+
OpenShaderDesigner 0.0.1 +
+
+
+ + + + + + + + + + +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+
+
+ +
Any< T, Rest... > Class Template Reference
+
+
+ +

Package multiple types into a single variable, useful for instances where a value may be multiple types. + More...

+ +

#include <Any.h>

+
+Inheritance diagram for Any< T, Rest... >:
+
+
+ + +Any< Rest... > + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

Any (const ThisType &value, const Rest &...other)
 
Any (ThisType &&value, Rest &&...other)
 
Any (const Any &other)=default
 
Any (Any &&other)=default
 
+Anyoperator= (const Any &)=default
 
+Anyoperator= (Any &&)=default
 
operator ThisType () const
 
operator ThisType & ()
 
operator const ThisType & () const
 
operator ThisType && ()
 
operator ThisType * ()
 
operator const ThisType * () const
 
+

Detailed Description

+
template<typename T, typename... Rest>
+class Any< T, Rest... >

Package multiple types into a single variable, useful for instances where a value may be multiple types.

+

The documentation for this class was generated from the following file: +
+ + +
+ + diff --git a/Documentation/html/class_any_3_01_t_00_01_rest_8_8_8_01_4.png b/Documentation/html/class_any_3_01_t_00_01_rest_8_8_8_01_4.png new file mode 100644 index 0000000..75012aa Binary files /dev/null and b/Documentation/html/class_any_3_01_t_00_01_rest_8_8_8_01_4.png differ diff --git a/Documentation/html/class_any_3_4.html b/Documentation/html/class_any_3_4.html new file mode 100644 index 0000000..4a95662 --- /dev/null +++ b/Documentation/html/class_any_3_4.html @@ -0,0 +1,100 @@ + + + + + + + +OpenShaderDesigner: Any<> Class Reference + + + + + + + + + + + + + +
+
+ + + + + + +
+
OpenShaderDesigner 0.0.1 +
+
+
+ + + + + + + + + + +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+
+
+
Any<> Class Reference
+
+
+
The documentation for this class was generated from the following file: +
+ + +
+ + diff --git a/Documentation/html/class_directed_graph-members.html b/Documentation/html/class_directed_graph-members.html new file mode 100644 index 0000000..2f81bf5 --- /dev/null +++ b/Documentation/html/class_directed_graph-members.html @@ -0,0 +1,118 @@ + + + + + + + +OpenShaderDesigner: Member List + + + + + + + + + + + + + +
+
+ + + + + + +
+
OpenShaderDesigner 0.0.1 +
+
+
+ + + + + + + + + + +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+
+
+
DirectedGraph< T > Member List
+
+
+ +

This is the complete list of members for DirectedGraph< T >, including all inherited members.

+ + + + + + + + + + + + + + + + + + + +
BreadthFirst (defined in DirectedGraph< T >)DirectedGraph< T >friend
DataType typedef (defined in DirectedGraph< T >)DirectedGraph< T >
Depth(Node node) const (defined in DirectedGraph< T >)DirectedGraph< T >inline
DirectedGraph() (defined in DirectedGraph< T >)DirectedGraph< T >inline
Erase(Node node) (defined in DirectedGraph< T >)DirectedGraph< T >inline
FirstChild(Node node) const (defined in DirectedGraph< T >)DirectedGraph< T >inline
InOrder (defined in DirectedGraph< T >)DirectedGraph< T >friend
Insert(const DataType &data, Node parent) (defined in DirectedGraph< T >)DirectedGraph< T >inline
LeftMost(Node node) const (defined in DirectedGraph< T >)DirectedGraph< T >inline
NextSibling(Node node) const (defined in DirectedGraph< T >)DirectedGraph< T >inline
Node typedef (defined in DirectedGraph< T >)DirectedGraph< T >
NodeQueue typedef (defined in DirectedGraph< T >)DirectedGraph< T >
operator[](Node node) (defined in DirectedGraph< T >)DirectedGraph< T >inline
operator[](Node node) const (defined in DirectedGraph< T >)DirectedGraph< T >inline
Parent(Node node) const (defined in DirectedGraph< T >)DirectedGraph< T >inline
PostOrder (defined in DirectedGraph< T >)DirectedGraph< T >friend
PreOrder (defined in DirectedGraph< T >)DirectedGraph< T >friend
Traverse(V &visitor) (defined in DirectedGraph< T >)DirectedGraph< T >inline
+ + +
+ + diff --git a/Documentation/html/class_directed_graph.html b/Documentation/html/class_directed_graph.html new file mode 100644 index 0000000..540b0e4 --- /dev/null +++ b/Documentation/html/class_directed_graph.html @@ -0,0 +1,181 @@ + + + + + + + +OpenShaderDesigner: DirectedGraph< T > Class Template Reference + + + + + + + + + + + + + +
+
+ + + + + + +
+
OpenShaderDesigner 0.0.1 +
+
+
+ + + + + + + + + + +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+
+
+ +
DirectedGraph< T > Class Template Reference
+
+
+ + + + + + + + + + + + +

+Classes

class  BreadthFirst
 
class  InOrder
 
class  PostOrder
 
class  PreOrder
 
class  Traverser
 
+ + + + + + + +

+Public Types

+using DataType = T
 
+using Node = uint32_t
 
+using NodeQueue = std::deque<Node>
 
+ + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

+Node Parent (Node node) const
 
+Node FirstChild (Node node) const
 
+Node NextSibling (Node node) const
 
+Node LeftMost (Node node) const
 
+uint32_t Depth (Node node) const
 
+Node Insert (const DataType &data, Node parent)
 
+void Erase (Node node)
 
+DataType & operator[] (Node node)
 
+const DataType & operator[] (Node node) const
 
+template<typename V , typename O >
void Traverse (V &visitor)
 
+ + + + + + + + + +

+Friends

+class BreadthFirst
 
+class PreOrder
 
+class InOrder
 
+class PostOrder
 
+
The documentation for this class was generated from the following file: +
+ + +
+ + diff --git a/Documentation/html/class_directed_graph_1_1_breadth_first-members.html b/Documentation/html/class_directed_graph_1_1_breadth_first-members.html new file mode 100644 index 0000000..fc46331 --- /dev/null +++ b/Documentation/html/class_directed_graph_1_1_breadth_first-members.html @@ -0,0 +1,106 @@ + + + + + + + +OpenShaderDesigner: Member List + + + + + + + + + + + + + +
+
+ + + + + + +
+
OpenShaderDesigner 0.0.1 +
+
+
+ + + + + + + + + + +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ + +
+
+
+
DirectedGraph< T >::BreadthFirst Member List
+
+
+ +

This is the complete list of members for DirectedGraph< T >::BreadthFirst, including all inherited members.

+ + + +
BreadthFirst(DirectedGraph &graph) (defined in DirectedGraph< T >::BreadthFirst)DirectedGraph< T >::BreadthFirstinline
operator()(Node node) (defined in DirectedGraph< T >::BreadthFirst)DirectedGraph< T >::BreadthFirstinline
+ + +
+ + diff --git a/Documentation/html/class_directed_graph_1_1_breadth_first.html b/Documentation/html/class_directed_graph_1_1_breadth_first.html new file mode 100644 index 0000000..f335f81 --- /dev/null +++ b/Documentation/html/class_directed_graph_1_1_breadth_first.html @@ -0,0 +1,117 @@ + + + + + + + +OpenShaderDesigner: DirectedGraph< T >::BreadthFirst Class Reference + + + + + + + + + + + + + +
+
+ + + + + + +
+
OpenShaderDesigner 0.0.1 +
+
+
+ + + + + + + + + + +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ + +
+
+
+ +
DirectedGraph< T >::BreadthFirst Class Reference
+
+
+ + + + + + +

+Public Member Functions

BreadthFirst (DirectedGraph &graph)
 
+Node operator() (Node node)
 
+
The documentation for this class was generated from the following file: +
+ + +
+ + diff --git a/Documentation/html/class_directed_graph_1_1_in_order-members.html b/Documentation/html/class_directed_graph_1_1_in_order-members.html new file mode 100644 index 0000000..597f7e3 --- /dev/null +++ b/Documentation/html/class_directed_graph_1_1_in_order-members.html @@ -0,0 +1,106 @@ + + + + + + + +OpenShaderDesigner: Member List + + + + + + + + + + + + + +
+
+ + + + + + +
+
OpenShaderDesigner 0.0.1 +
+
+
+ + + + + + + + + + +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ + +
+
+
+
DirectedGraph< T >::InOrder Member List
+
+
+ +

This is the complete list of members for DirectedGraph< T >::InOrder, including all inherited members.

+ + + +
InOrder(DirectedGraph &graph) (defined in DirectedGraph< T >::InOrder)DirectedGraph< T >::InOrderinline
operator()(Node node) (defined in DirectedGraph< T >::InOrder)DirectedGraph< T >::InOrderinline
+ + +
+ + diff --git a/Documentation/html/class_directed_graph_1_1_in_order.html b/Documentation/html/class_directed_graph_1_1_in_order.html new file mode 100644 index 0000000..3410520 --- /dev/null +++ b/Documentation/html/class_directed_graph_1_1_in_order.html @@ -0,0 +1,117 @@ + + + + + + + +OpenShaderDesigner: DirectedGraph< T >::InOrder Class Reference + + + + + + + + + + + + + +
+
+ + + + + + +
+
OpenShaderDesigner 0.0.1 +
+
+
+ + + + + + + + + + +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ + +
+
+
+ +
DirectedGraph< T >::InOrder Class Reference
+
+
+ + + + + + +

+Public Member Functions

InOrder (DirectedGraph &graph)
 
+Node operator() (Node node)
 
+
The documentation for this class was generated from the following file: +
+ + +
+ + diff --git a/Documentation/html/class_directed_graph_1_1_post_order-members.html b/Documentation/html/class_directed_graph_1_1_post_order-members.html new file mode 100644 index 0000000..c188a1a --- /dev/null +++ b/Documentation/html/class_directed_graph_1_1_post_order-members.html @@ -0,0 +1,106 @@ + + + + + + + +OpenShaderDesigner: Member List + + + + + + + + + + + + + +
+
+ + + + + + +
+
OpenShaderDesigner 0.0.1 +
+
+
+ + + + + + + + + + +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ + +
+
+
+
DirectedGraph< T >::PostOrder Member List
+
+
+ +

This is the complete list of members for DirectedGraph< T >::PostOrder, including all inherited members.

+ + + +
operator()(Node node) (defined in DirectedGraph< T >::PostOrder)DirectedGraph< T >::PostOrderinline
PostOrder(DirectedGraph &graph) (defined in DirectedGraph< T >::PostOrder)DirectedGraph< T >::PostOrderinline
+ + +
+ + diff --git a/Documentation/html/class_directed_graph_1_1_post_order.html b/Documentation/html/class_directed_graph_1_1_post_order.html new file mode 100644 index 0000000..c7ffa3d --- /dev/null +++ b/Documentation/html/class_directed_graph_1_1_post_order.html @@ -0,0 +1,117 @@ + + + + + + + +OpenShaderDesigner: DirectedGraph< T >::PostOrder Class Reference + + + + + + + + + + + + + +
+
+ + + + + + +
+
OpenShaderDesigner 0.0.1 +
+
+
+ + + + + + + + + + +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ + +
+
+
+ +
DirectedGraph< T >::PostOrder Class Reference
+
+
+ + + + + + +

+Public Member Functions

PostOrder (DirectedGraph &graph)
 
+Node operator() (Node node)
 
+
The documentation for this class was generated from the following file: +
+ + +
+ + diff --git a/Documentation/html/class_directed_graph_1_1_pre_order-members.html b/Documentation/html/class_directed_graph_1_1_pre_order-members.html new file mode 100644 index 0000000..7a30916 --- /dev/null +++ b/Documentation/html/class_directed_graph_1_1_pre_order-members.html @@ -0,0 +1,106 @@ + + + + + + + +OpenShaderDesigner: Member List + + + + + + + + + + + + + +
+
+ + + + + + +
+
OpenShaderDesigner 0.0.1 +
+
+
+ + + + + + + + + + +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ + +
+
+
+
DirectedGraph< T >::PreOrder Member List
+
+
+ +

This is the complete list of members for DirectedGraph< T >::PreOrder, including all inherited members.

+ + + +
operator()(Node node) (defined in DirectedGraph< T >::PreOrder)DirectedGraph< T >::PreOrderinline
PreOrder(DirectedGraph &graph) (defined in DirectedGraph< T >::PreOrder)DirectedGraph< T >::PreOrderinline
+ + +
+ + diff --git a/Documentation/html/class_directed_graph_1_1_pre_order.html b/Documentation/html/class_directed_graph_1_1_pre_order.html new file mode 100644 index 0000000..5c4098e --- /dev/null +++ b/Documentation/html/class_directed_graph_1_1_pre_order.html @@ -0,0 +1,117 @@ + + + + + + + +OpenShaderDesigner: DirectedGraph< T >::PreOrder Class Reference + + + + + + + + + + + + + +
+
+ + + + + + +
+
OpenShaderDesigner 0.0.1 +
+
+
+ + + + + + + + + + +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ + +
+
+
+ +
DirectedGraph< T >::PreOrder Class Reference
+
+
+ + + + + + +

+Public Member Functions

PreOrder (DirectedGraph &graph)
 
+Node operator() (Node node)
 
+
The documentation for this class was generated from the following file: +
+ + +
+ + diff --git a/Documentation/html/class_directed_graph_1_1_traverser-members.html b/Documentation/html/class_directed_graph_1_1_traverser-members.html new file mode 100644 index 0000000..3506514 --- /dev/null +++ b/Documentation/html/class_directed_graph_1_1_traverser-members.html @@ -0,0 +1,108 @@ + + + + + + + +OpenShaderDesigner: Member List + + + + + + + + + + + + + +
+
+ + + + + + +
+
OpenShaderDesigner 0.0.1 +
+
+
+ + + + + + + + + + +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ + +
+
+
+
DirectedGraph< T >::Traverser< V, O > Member List
+
+
+ +

This is the complete list of members for DirectedGraph< T >::Traverser< V, O >, including all inherited members.

+ + + + + +
operator()() (defined in DirectedGraph< T >::Traverser< V, O >)DirectedGraph< T >::Traverser< V, O >inline
OrderType typedef (defined in DirectedGraph< T >::Traverser< V, O >)DirectedGraph< T >::Traverser< V, O >
Traverser(DirectedGraph &graph, VisitorType &visitor) (defined in DirectedGraph< T >::Traverser< V, O >)DirectedGraph< T >::Traverser< V, O >inline
VisitorType typedef (defined in DirectedGraph< T >::Traverser< V, O >)DirectedGraph< T >::Traverser< V, O >
+ + +
+ + diff --git a/Documentation/html/class_directed_graph_1_1_traverser.html b/Documentation/html/class_directed_graph_1_1_traverser.html new file mode 100644 index 0000000..3bf5e66 --- /dev/null +++ b/Documentation/html/class_directed_graph_1_1_traverser.html @@ -0,0 +1,127 @@ + + + + + + + +OpenShaderDesigner: DirectedGraph< T >::Traverser< V, O > Class Template Reference + + + + + + + + + + + + + +
+
+ + + + + + +
+
OpenShaderDesigner 0.0.1 +
+
+
+ + + + + + + + + + +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ + +
+
+
+ +
DirectedGraph< T >::Traverser< V, O > Class Template Reference
+
+
+ + + + + + +

+Public Types

+using VisitorType = V
 
+using OrderType = O
 
+ + + + + +

+Public Member Functions

Traverser (DirectedGraph &graph, VisitorType &visitor)
 
+void operator() ()
 
+
The documentation for this class was generated from the following file: +
+ + +
+ + diff --git a/Documentation/html/class_g_l_w_1_1_buffer_object-members.html b/Documentation/html/class_g_l_w_1_1_buffer_object-members.html new file mode 100644 index 0000000..91f90e4 --- /dev/null +++ b/Documentation/html/class_g_l_w_1_1_buffer_object-members.html @@ -0,0 +1,116 @@ + + + + + + + +OpenShaderDesigner: Member List + + + + + + + + + + + + + +
+
+ + + + + + +
+
OpenShaderDesigner 0.0.1 +
+
+
+ + + + + + + + + + +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ + +
+
+
+
GLW::BufferObject< T, U, S > Member List
+
+
+ +

This is the complete list of members for GLW::BufferObject< T, U, S >, including all inherited members.

+ + + + + + + + + + + + + +
BufferObject(SizeT size, void *data=nullptr)GLW::BufferObject< T, U, S >
BufferObject(BufferObject &&other)GLW::BufferObject< T, U, S >
BufferObject(const BufferObject &other)GLW::BufferObject< T, U, S >
operator bool() constGLW::BufferObject< T, U, S >inline
operator=(const BufferObject &other)GLW::BufferObject< T, U, S >
operator=(BufferObject &&other) noexceptGLW::BufferObject< T, U, S >
Resize(SizeT size) (defined in GLW::BufferObject< T, U, S >)GLW::BufferObject< T, U, S >
Size() const (defined in GLW::BufferObject< T, U, S >)GLW::BufferObject< T, U, S >inline
Storage (defined in GLW::BufferObject< T, U, S >)GLW::BufferObject< T, U, S >static
Type (defined in GLW::BufferObject< T, U, S >)GLW::BufferObject< T, U, S >static
Usage (defined in GLW::BufferObject< T, U, S >)GLW::BufferObject< T, U, S >static
~BufferObject()GLW::BufferObject< T, U, S >
+ + +
+ + diff --git a/Documentation/html/class_g_l_w_1_1_buffer_object.html b/Documentation/html/class_g_l_w_1_1_buffer_object.html new file mode 100644 index 0000000..0ee8bc9 --- /dev/null +++ b/Documentation/html/class_g_l_w_1_1_buffer_object.html @@ -0,0 +1,190 @@ + + + + + + + +OpenShaderDesigner: GLW::BufferObject< T, U, S > Class Template Reference + + + + + + + + + + + + + +
+
+ + + + + + +
+
OpenShaderDesigner 0.0.1 +
+
+
+ + + + + + + + + + +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ + +
+
+
+ +
GLW::BufferObject< T, U, S > Class Template Reference
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

 BufferObject (SizeT size, void *data=nullptr)
 BufferObject constructor.
 
BufferObject (BufferObject &&other)
 Move Constructor.
 
BufferObject (const BufferObject &other)
 Copy Constructor.
 
~BufferObject ()
 Destructor.
 
operator bool () const
 Validity test.
 
+BufferObjectoperator= (const BufferObject &other)
 Copy Assignment.
 
+BufferObjectoperator= (BufferObject &&other) noexcept
 Move Assignment.
 
+SizeT Size () const
 
+void Resize (SizeT size)
 
+ + + + + + + +

+Static Public Attributes

+static constexpr BufferType Type = T
 
+static constexpr BufferUsage Usage = U
 
+static constexpr BufferStorage Storage = S
 
+

Constructor & Destructor Documentation

+ +

◆ BufferObject()

+ +
+
+
+template<BufferType T, BufferUsage U, BufferStorage S>
+ + + + + + + + + + + +
GLW::BufferObject< T, U, S >::BufferObject (SizeT size,
void * data = nullptr )
+
+ +

BufferObject constructor.

+
Parameters
+ + + +
sizeSize in bytes of the Buffer
dataData to be used as the initial contents of the Buffer
+
+
+ +
+
+
The documentation for this class was generated from the following file: +
+ + +
+ + diff --git a/Documentation/html/class_open_shader_designer_1_1___impl_event_handler-members.html b/Documentation/html/class_open_shader_designer_1_1___impl_event_handler-members.html new file mode 100644 index 0000000..cf4920f --- /dev/null +++ b/Documentation/html/class_open_shader_designer_1_1___impl_event_handler-members.html @@ -0,0 +1,105 @@ + + + + + + + +OpenShaderDesigner: Member List + + + + + + + + + + + + + +
+
+ + + + + + +
+
OpenShaderDesigner 0.0.1 +
+
+
+ + + + + + + + + + +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ + +
+
+
+
OpenShaderDesigner::_ImplEventHandler Member List
+
+
+ +

This is the complete list of members for OpenShaderDesigner::_ImplEventHandler, including all inherited members.

+ + +
EventSystem (defined in OpenShaderDesigner::_ImplEventHandler)OpenShaderDesigner::_ImplEventHandlerfriend
+ + +
+ + diff --git a/Documentation/html/class_open_shader_designer_1_1___impl_event_handler.html b/Documentation/html/class_open_shader_designer_1_1___impl_event_handler.html new file mode 100644 index 0000000..03e487c --- /dev/null +++ b/Documentation/html/class_open_shader_designer_1_1___impl_event_handler.html @@ -0,0 +1,134 @@ + + + + + + + +OpenShaderDesigner: OpenShaderDesigner::_ImplEventHandler Class Reference + + + + + + + + + + + + + +
+
+ + + + + + +
+
OpenShaderDesigner 0.0.1 +
+
+
+ + + + + + + + + + +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ + +
+
+
+ +
OpenShaderDesigner::_ImplEventHandler Class Referenceabstract
+
+
+ +

Base EventHandler for abstraction. + More...

+ +

#include <EventSystem.h>

+
+Inheritance diagram for OpenShaderDesigner::_ImplEventHandler:
+
+
+ + +OpenShaderDesigner::EventHandler< BeginFrame > +OpenShaderDesigner::EventHandler< EndFrame > +OpenShaderDesigner::EventHandler< EventType > +OpenShaderDesigner::Profiler +OpenShaderDesigner::Profiler + +
+ + + + +

+Friends

+class EventSystem
 
+

Detailed Description

+

Base EventHandler for abstraction.

+

The documentation for this class was generated from the following file: +
+ + +
+ + diff --git a/Documentation/html/class_open_shader_designer_1_1___impl_event_handler.png b/Documentation/html/class_open_shader_designer_1_1___impl_event_handler.png new file mode 100644 index 0000000..855766f Binary files /dev/null and b/Documentation/html/class_open_shader_designer_1_1___impl_event_handler.png differ diff --git a/Documentation/html/class_open_shader_designer_1_1_console-members.html b/Documentation/html/class_open_shader_designer_1_1_console-members.html new file mode 100644 index 0000000..0c60bf4 --- /dev/null +++ b/Documentation/html/class_open_shader_designer_1_1_console-members.html @@ -0,0 +1,122 @@ + + + + + + + +OpenShaderDesigner: Member List + + + + + + + + + + + + + +
+
+ + + + + + +
+
OpenShaderDesigner 0.0.1 +
+
+
+ + + + + + + + + + +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ + +
+
+
+
OpenShaderDesigner::Console Member List
+
+
+ +

This is the complete list of members for OpenShaderDesigner::Console, including all inherited members.

+ + + + + + + + + + + + + + + + + + + +
ALL_SETTINGS enum value (defined in OpenShaderDesigner::Console)OpenShaderDesigner::Console
DEFAULT_SETTINGS enum value (defined in OpenShaderDesigner::Console)OpenShaderDesigner::Console
DrawMenu() (defined in OpenShaderDesigner::Console)OpenShaderDesigner::Consolestatic
DrawWindow() (defined in OpenShaderDesigner::Console)OpenShaderDesigner::Consolestatic
ImGuiColor(unsigned int RGB)OpenShaderDesigner::Consoleinlinestatic
Log(const std::string &file, const int line, Severity severity=Severity::DEFAULT, const std::format_string< Args... > &message="", Args &&... vargs)OpenShaderDesigner::Consolestatic
Open (defined in OpenShaderDesigner::Console)OpenShaderDesigner::Consoleinlinestatic
Setting enum nameOpenShaderDesigner::Console
SettingNamesOpenShaderDesigner::Consoleinlinestatic
SeveritiesOpenShaderDesigner::Consoleinlinestatic
Severity enum nameOpenShaderDesigner::Console
SeverityColorsOpenShaderDesigner::Consoleinlinestatic
SHOW_FILE_INFO enum value (defined in OpenShaderDesigner::Console)OpenShaderDesigner::Console
SHOW_SEVERITY enum value (defined in OpenShaderDesigner::Console)OpenShaderDesigner::Console
SHOW_THREAD enum value (defined in OpenShaderDesigner::Console)OpenShaderDesigner::Console
SHOW_TIMESTAMP enum value (defined in OpenShaderDesigner::Console)OpenShaderDesigner::Console
ThreadID() (defined in OpenShaderDesigner::Console)OpenShaderDesigner::Consoleinlinestatic
WRAP_TEXT enum value (defined in OpenShaderDesigner::Console)OpenShaderDesigner::Console
+ + +
+ + diff --git a/Documentation/html/class_open_shader_designer_1_1_console.html b/Documentation/html/class_open_shader_designer_1_1_console.html new file mode 100644 index 0000000..6ceb71f --- /dev/null +++ b/Documentation/html/class_open_shader_designer_1_1_console.html @@ -0,0 +1,360 @@ + + + + + + + +OpenShaderDesigner: OpenShaderDesigner::Console Class Reference + + + + + + + + + + + + + +
+
+ + + + + + +
+
OpenShaderDesigner 0.0.1 +
+
+
+ + + + + + + + + + +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ + +
+
+
+ +
OpenShaderDesigner::Console Class Reference
+
+
+ + + + + + + + +

+Public Types

enum  Setting : uint8_t {
+  SHOW_TIMESTAMP = 0b00000001 +, SHOW_THREAD = 0b00000010 +, SHOW_SEVERITY = 0b00000100 +, SHOW_FILE_INFO = 0b00001000 +,
+  WRAP_TEXT = 0b00010000 +, ALL_SETTINGS = 0xFF +, DEFAULT_SETTINGS = ALL_SETTINGS ^ WRAP_TEXT +
+ }
 Setting for displaying log entries.
 
enum class  Severity : int {
+  MESSAGE = 0 +, WARNING +, ERROR +, FATAL +,
+  ALERT +, COMMAND +, COUNT +, DEFAULT = WARNING +
+ }
 Severity levels for log entries.
 
+ + + + + + + + + + + + + + +

+Static Public Member Functions

static constexpr ImVec4 ImGuiColor (unsigned int RGB)
 Integer to floating point color. (ImGui APIVersion)
 
+static std::string ThreadID ()
 
template<typename... Args>
static void Log (const std::string &file, const int line, Severity severity=Severity::DEFAULT, const std::format_string< Args... > &message="", Args &&... vargs)
 Thread-Safe Log function for debugging.
 
+static void DrawMenu ()
 
+static void DrawWindow ()
 
+ + + + + + + + + + + + +

+Static Public Attributes

static const std::string SettingNames []
 String representations of the settings.
 
static const std::string Severities []
 String representations of the Severity levels.
 
static const ImVec4 SeverityColors []
 Color for rendering each Severity level text in editor.
 
+static bool Open = true
 
+

Member Function Documentation

+ +

◆ ImGuiColor()

+ +
+
+ + + + + +
+ + + + + + + +
static constexpr ImVec4 OpenShaderDesigner::Console::ImGuiColor (unsigned int RGB)
+
+inlinestaticconstexpr
+
+ +

Integer to floating point color. (ImGui APIVersion)

+
Parameters
+ + +
RGBThe Integer color to convert.
+
+
+
Returns
The rgba floating point color.
+ +
+
+ +

◆ Log()

+ +
+
+
+template<typename... Args>
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
void OpenShaderDesigner::Console::Log (const std::string & file,
const int line,
Severity severity = Severity::DEFAULT,
const std::format_string< Args... > & message = "",
Args &&... vargs )
+
+static
+
+ +

Thread-Safe Log function for debugging.

+
Template Parameters
+ + +
ArgsVariadic Arguments template for PixelLayout Parameters
+
+
+
Parameters
+ + + + + + +
fileThe name of the file this was called from.
lineThe line number this was called from.
severityThe severity level of the log entry.
messageA format string for the entry message.
vargsArguments for the format string.
+
+
+ +
+
+

Member Data Documentation

+ +

◆ SettingNames

+ +
+
+ + + + + +
+ + + + +
const std::string OpenShaderDesigner::Console::SettingNames[]
+
+inlinestatic
+
+Initial value:
=
+
{
+
"Timestamps", "Thread IDs", "Severity", "File Info", "Wrapping"
+
}
+
+

String representations of the settings.

+ +
+
+ +

◆ Severities

+ +
+
+ + + + + +
+ + + + +
const std::string OpenShaderDesigner::Console::Severities[]
+
+inlinestatic
+
+Initial value:
=
+
{
+
"Message", "Warning", "Error", "Fatal", "Alert", "Command"
+
}
+
+

String representations of the Severity levels.

+ +
+
+ +

◆ SeverityColors

+ +
+
+ + + + + +
+ + + + +
const ImVec4 OpenShaderDesigner::Console::SeverityColors[]
+
+inlinestatic
+
+Initial value:
= {
+
ImGuiColor(0xA4B9C4FF), ImGuiColor(0xF2C554FF), ImGuiColor(0xE57327FF), ImGuiColor(0xCC211EFF),
+
ImGuiColor(0x9CDCFEFF),
+
}
+
static constexpr ImVec4 ImGuiColor(unsigned int RGB)
Integer to floating point color. (ImGui APIVersion)
Definition Console.h:86
+
+

Color for rendering each Severity level text in editor.

+ +
+
+
The documentation for this class was generated from the following files: +
+ + +
+ + diff --git a/Documentation/html/class_open_shader_designer_1_1_console_window-members.html b/Documentation/html/class_open_shader_designer_1_1_console_window-members.html new file mode 100644 index 0000000..3bdcb87 --- /dev/null +++ b/Documentation/html/class_open_shader_designer_1_1_console_window-members.html @@ -0,0 +1,121 @@ + + + + + + + +OpenShaderDesigner: Member List + + + + + + + + + + + + + +
+
+ + + + + + +
+
OpenShaderDesigner 0.0.1 +
+
+
+ + + + + + + + + + +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ + +
+
+
+
OpenShaderDesigner::ConsoleWindow Member List
+
+
+ +

This is the complete list of members for OpenShaderDesigner::ConsoleWindow, including all inherited members.

+ + + + + + + + + + + + + + + + + + +
CheckFlag(ImGuiWindowFlags flag) const (defined in OpenShaderDesigner::EditorWindow)OpenShaderDesigner::EditorWindowinline
ClearFlags(ImGuiWindowFlags flags) (defined in OpenShaderDesigner::EditorWindow)OpenShaderDesigner::EditorWindowinline
Close()OpenShaderDesigner::EditorWindow
ConsoleWindow() (defined in OpenShaderDesigner::ConsoleWindow)OpenShaderDesigner::ConsoleWindow
Draw()OpenShaderDesigner::EditorWindow
DrawMenu() overrideOpenShaderDesigner::ConsoleWindowvirtual
DrawWindow() overrideOpenShaderDesigner::ConsoleWindowvirtual
EditorWindow(const std::string &title, ImGuiWindowFlags flags) (defined in OpenShaderDesigner::EditorWindow)OpenShaderDesigner::EditorWindowprotected
HasMenuBar() const (defined in OpenShaderDesigner::EditorWindow)OpenShaderDesigner::EditorWindowinline
IsOpen() constOpenShaderDesigner::EditorWindowinline
OnClose()OpenShaderDesigner::EditorWindowinlineprotectedvirtual
OnOpen()OpenShaderDesigner::EditorWindowinlineprotectedvirtual
Open()OpenShaderDesigner::EditorWindow
SetFlags(ImGuiWindowFlags flags) (defined in OpenShaderDesigner::EditorWindow)OpenShaderDesigner::EditorWindowinline
TitleOpenShaderDesigner::EditorWindow
ToggleFlags(ImGuiWindowFlags flags) (defined in OpenShaderDesigner::EditorWindow)OpenShaderDesigner::EditorWindowinline
~EditorWindow()=default (defined in OpenShaderDesigner::EditorWindow)OpenShaderDesigner::EditorWindowprotected
+ + +
+ + diff --git a/Documentation/html/class_open_shader_designer_1_1_console_window.html b/Documentation/html/class_open_shader_designer_1_1_console_window.html new file mode 100644 index 0000000..c0a479c --- /dev/null +++ b/Documentation/html/class_open_shader_designer_1_1_console_window.html @@ -0,0 +1,236 @@ + + + + + + + +OpenShaderDesigner: OpenShaderDesigner::ConsoleWindow Class Reference + + + + + + + + + + + + + +
+
+ + + + + + +
+
OpenShaderDesigner 0.0.1 +
+
+
+ + + + + + + + + + +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ + +
+
+
+ +
OpenShaderDesigner::ConsoleWindow Class Reference
+
+
+
+Inheritance diagram for OpenShaderDesigner::ConsoleWindow:
+
+
+ + +OpenShaderDesigner::EditorWindow + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

void DrawMenu () override
 DrawMenu function for when the EditorWindow Menu is being drawn.
 
void DrawWindow () override
 DrawWindow function for when the EditorWindow is being drawn.
 
- Public Member Functions inherited from OpenShaderDesigner::EditorWindow
+void Open ()
 Open the EditorWindow.
 
+void Draw ()
 Draw the EditorWindow.
 
+void Close ()
 Close the EditorWindow.
 
bool IsOpen () const
 Check if the EditorWindow is open.
 
+void SetFlags (ImGuiWindowFlags flags)
 
+void ClearFlags (ImGuiWindowFlags flags)
 
+void ToggleFlags (ImGuiWindowFlags flags)
 
+bool CheckFlag (ImGuiWindowFlags flag) const
 
+bool HasMenuBar () const
 
+ + + + + + + + + + + + + + +

+Additional Inherited Members

- Public Attributes inherited from OpenShaderDesigner::EditorWindow
+const std::string Title
 Title for the EditorWindow.
 
- Protected Member Functions inherited from OpenShaderDesigner::EditorWindow
EditorWindow (const std::string &title, ImGuiWindowFlags flags)
 
virtual void OnOpen ()
 OnOpen callback for when the EditorWindow is opened.
 
+virtual void OnClose ()
 OnClose callback for when the EditorWindow is closed.
 
+

Member Function Documentation

+ +

◆ DrawMenu()

+ +
+
+ + + + + +
+ + + + + + + +
void ConsoleWindow::DrawMenu ()
+
+overridevirtual
+
+ +

DrawMenu function for when the EditorWindow Menu is being drawn.

+ +

Reimplemented from OpenShaderDesigner::EditorWindow.

+ +
+
+ +

◆ DrawWindow()

+ +
+
+ + + + + +
+ + + + + + + +
void ConsoleWindow::DrawWindow ()
+
+overridevirtual
+
+ +

DrawWindow function for when the EditorWindow is being drawn.

+ +

Reimplemented from OpenShaderDesigner::EditorWindow.

+ +
+
+
The documentation for this class was generated from the following files: +
+ + +
+ + diff --git a/Documentation/html/class_open_shader_designer_1_1_console_window.png b/Documentation/html/class_open_shader_designer_1_1_console_window.png new file mode 100644 index 0000000..eb4b576 Binary files /dev/null and b/Documentation/html/class_open_shader_designer_1_1_console_window.png differ diff --git a/Documentation/html/class_open_shader_designer_1_1_editor_system-members.html b/Documentation/html/class_open_shader_designer_1_1_editor_system-members.html new file mode 100644 index 0000000..b0b0c75 --- /dev/null +++ b/Documentation/html/class_open_shader_designer_1_1_editor_system-members.html @@ -0,0 +1,113 @@ + + + + + + + +OpenShaderDesigner: Member List + + + + + + + + + + + + + +
+
+ + + + + + +
+
OpenShaderDesigner 0.0.1 +
+
+
+ + + + + + + + + + +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ + +
+
+
+
OpenShaderDesigner::EditorSystem Member List
+
+
+ +

This is the complete list of members for OpenShaderDesigner::EditorSystem, including all inherited members.

+ + + + + + + + + + +
Close() (defined in OpenShaderDesigner::EditorSystem)OpenShaderDesigner::EditorSysteminlinestatic
Draw() (defined in OpenShaderDesigner::EditorSystem)OpenShaderDesigner::EditorSystemstatic
Get() (defined in OpenShaderDesigner::EditorSystem)OpenShaderDesigner::EditorSysteminlinestatic
HandleEvents(SDL_Event *event) (defined in OpenShaderDesigner::EditorSystem)OpenShaderDesigner::EditorSystemstatic
ID() (defined in OpenShaderDesigner::EditorSystem)OpenShaderDesigner::EditorSysteminlinestatic
Initialize() (defined in OpenShaderDesigner::EditorSystem)OpenShaderDesigner::EditorSystemstatic
Open() (defined in OpenShaderDesigner::EditorSystem)OpenShaderDesigner::EditorSysteminlinestatic
Shutdown() (defined in OpenShaderDesigner::EditorSystem)OpenShaderDesigner::EditorSystemstatic
WindowID typedef (defined in OpenShaderDesigner::EditorSystem)OpenShaderDesigner::EditorSystem
+ + +
+ + diff --git a/Documentation/html/class_open_shader_designer_1_1_editor_system.html b/Documentation/html/class_open_shader_designer_1_1_editor_system.html new file mode 100644 index 0000000..22b7eb3 --- /dev/null +++ b/Documentation/html/class_open_shader_designer_1_1_editor_system.html @@ -0,0 +1,147 @@ + + + + + + + +OpenShaderDesigner: OpenShaderDesigner::EditorSystem Class Reference + + + + + + + + + + + + + +
+
+ + + + + + +
+
OpenShaderDesigner 0.0.1 +
+
+
+ + + + + + + + + + +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ + +
+
+
+ +
OpenShaderDesigner::EditorSystem Class Reference
+
+
+ + + + +

+Public Types

+using WindowID = uint64_t
 
+ + + + + + + + + + + + + + + + + + + + + +

+Static Public Member Functions

+template<typename T >
static WindowID ID ()
 
+template<typename T >
static T * Open ()
 
+template<typename T >
static T * Close ()
 
+template<typename T >
static T * Get ()
 
+static void Initialize ()
 
+static void Draw ()
 
+static void Shutdown ()
 
+static void HandleEvents (SDL_Event *event)
 
+
The documentation for this class was generated from the following files: +
+ + +
+ + diff --git a/Documentation/html/class_open_shader_designer_1_1_editor_window-members.html b/Documentation/html/class_open_shader_designer_1_1_editor_window-members.html new file mode 100644 index 0000000..e11ded6 --- /dev/null +++ b/Documentation/html/class_open_shader_designer_1_1_editor_window-members.html @@ -0,0 +1,121 @@ + + + + + + + +OpenShaderDesigner: Member List + + + + + + + + + + + + + +
+
+ + + + + + +
+
OpenShaderDesigner 0.0.1 +
+
+
+ + + + + + + + + + +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ + +
+
+
+
OpenShaderDesigner::EditorWindow Member List
+
+
+ +

This is the complete list of members for OpenShaderDesigner::EditorWindow, including all inherited members.

+ + + + + + + + + + + + + + + + + + +
CheckFlag(ImGuiWindowFlags flag) const (defined in OpenShaderDesigner::EditorWindow)OpenShaderDesigner::EditorWindowinline
ClearFlags(ImGuiWindowFlags flags) (defined in OpenShaderDesigner::EditorWindow)OpenShaderDesigner::EditorWindowinline
Close()OpenShaderDesigner::EditorWindow
Draw()OpenShaderDesigner::EditorWindow
DrawMenu()OpenShaderDesigner::EditorWindowinlineprotectedvirtual
DrawWindow()OpenShaderDesigner::EditorWindowinlineprotectedvirtual
EditorSystem (defined in OpenShaderDesigner::EditorWindow)OpenShaderDesigner::EditorWindowfriend
EditorWindow(const std::string &title, ImGuiWindowFlags flags) (defined in OpenShaderDesigner::EditorWindow)OpenShaderDesigner::EditorWindowprotected
HasMenuBar() const (defined in OpenShaderDesigner::EditorWindow)OpenShaderDesigner::EditorWindowinline
IsOpen() constOpenShaderDesigner::EditorWindowinline
OnClose()OpenShaderDesigner::EditorWindowinlineprotectedvirtual
OnOpen()OpenShaderDesigner::EditorWindowinlineprotectedvirtual
Open()OpenShaderDesigner::EditorWindow
SetFlags(ImGuiWindowFlags flags) (defined in OpenShaderDesigner::EditorWindow)OpenShaderDesigner::EditorWindowinline
TitleOpenShaderDesigner::EditorWindow
ToggleFlags(ImGuiWindowFlags flags) (defined in OpenShaderDesigner::EditorWindow)OpenShaderDesigner::EditorWindowinline
~EditorWindow()=default (defined in OpenShaderDesigner::EditorWindow)OpenShaderDesigner::EditorWindowprotected
+ + +
+ + diff --git a/Documentation/html/class_open_shader_designer_1_1_editor_window.html b/Documentation/html/class_open_shader_designer_1_1_editor_window.html new file mode 100644 index 0000000..b695ca8 --- /dev/null +++ b/Documentation/html/class_open_shader_designer_1_1_editor_window.html @@ -0,0 +1,312 @@ + + + + + + + +OpenShaderDesigner: OpenShaderDesigner::EditorWindow Class Reference + + + + + + + + + + + + + +
+
+ + + + + + +
+
OpenShaderDesigner 0.0.1 +
+
+
+ + + + + + + + + + +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ + +
+
+
+ +
OpenShaderDesigner::EditorWindow Class Reference
+
+
+ +

EditorWindow class for wrapping ImGui window functionality. + More...

+ +

#include <EditorWindow.h>

+
+Inheritance diagram for OpenShaderDesigner::EditorWindow:
+
+
+ + +OpenShaderDesigner::ConsoleWindow +OpenShaderDesigner::Inspector +OpenShaderDesigner::Profiler +OpenShaderDesigner::ShaderGraph + +
+ + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

+void Open ()
 Open the EditorWindow.
 
+void Draw ()
 Draw the EditorWindow.
 
+void Close ()
 Close the EditorWindow.
 
bool IsOpen () const
 Check if the EditorWindow is open.
 
+void SetFlags (ImGuiWindowFlags flags)
 
+void ClearFlags (ImGuiWindowFlags flags)
 
+void ToggleFlags (ImGuiWindowFlags flags)
 
+bool CheckFlag (ImGuiWindowFlags flag) const
 
+bool HasMenuBar () const
 
+ + + + +

+Public Attributes

+const std::string Title
 Title for the EditorWindow.
 
+ + + + + + + + + + + + + + + +

+Protected Member Functions

EditorWindow (const std::string &title, ImGuiWindowFlags flags)
 
virtual void OnOpen ()
 OnOpen callback for when the EditorWindow is opened.
 
virtual void DrawWindow ()
 DrawWindow function for when the EditorWindow is being drawn.
 
virtual void DrawMenu ()
 DrawMenu function for when the EditorWindow Menu is being drawn.
 
+virtual void OnClose ()
 OnClose callback for when the EditorWindow is closed.
 
+ + + +

+Friends

+class EditorSystem
 
+

Detailed Description

+

EditorWindow class for wrapping ImGui window functionality.

+

Member Function Documentation

+ +

◆ DrawMenu()

+ +
+
+ + + + + +
+ + + + + + + +
virtual void OpenShaderDesigner::EditorWindow::DrawMenu ()
+
+inlineprotectedvirtual
+
+ +

DrawMenu function for when the EditorWindow Menu is being drawn.

+ +

Reimplemented in OpenShaderDesigner::ConsoleWindow.

+ +
+
+ +

◆ DrawWindow()

+ +
+
+ + + + + +
+ + + + + + + +
virtual void OpenShaderDesigner::EditorWindow::DrawWindow ()
+
+inlineprotectedvirtual
+
+ +

DrawWindow function for when the EditorWindow is being drawn.

+ +

Reimplemented in OpenShaderDesigner::ConsoleWindow, OpenShaderDesigner::Inspector, OpenShaderDesigner::Profiler, and OpenShaderDesigner::ShaderGraph.

+ +
+
+ +

◆ IsOpen()

+ +
+
+ + + + + +
+ + + + + + + +
bool OpenShaderDesigner::EditorWindow::IsOpen () const
+
+inlinenodiscard
+
+ +

Check if the EditorWindow is open.

+
Returns
+ +
+
+ +

◆ OnOpen()

+ +
+
+ + + + + +
+ + + + + + + +
virtual void OpenShaderDesigner::EditorWindow::OnOpen ()
+
+inlineprotectedvirtual
+
+ +

OnOpen callback for when the EditorWindow is opened.

+ +

Reimplemented in OpenShaderDesigner::ShaderGraph.

+ +
+
+
The documentation for this class was generated from the following files: +
+ + +
+ + diff --git a/Documentation/html/class_open_shader_designer_1_1_editor_window.png b/Documentation/html/class_open_shader_designer_1_1_editor_window.png new file mode 100644 index 0000000..3427e8f Binary files /dev/null and b/Documentation/html/class_open_shader_designer_1_1_editor_window.png differ diff --git a/Documentation/html/class_open_shader_designer_1_1_engine-members.html b/Documentation/html/class_open_shader_designer_1_1_engine-members.html new file mode 100644 index 0000000..626480a --- /dev/null +++ b/Documentation/html/class_open_shader_designer_1_1_engine-members.html @@ -0,0 +1,108 @@ + + + + + + + +OpenShaderDesigner: Member List + + + + + + + + + + + + + +
+
+ + + + + + +
+
OpenShaderDesigner 0.0.1 +
+
+
+ + + + + + + + + + +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ + +
+
+
+
OpenShaderDesigner::Engine Member List
+
+
+ +

This is the complete list of members for OpenShaderDesigner::Engine, including all inherited members.

+ + + + + +
Delta (defined in OpenShaderDesigner::Engine)OpenShaderDesigner::Engineinlinestatic
GetMainWindow() (defined in OpenShaderDesigner::Engine)OpenShaderDesigner::Engineinlinestatic
Start(const Window::Configuration &config) (defined in OpenShaderDesigner::Engine)OpenShaderDesigner::Enginestatic
Stop() (defined in OpenShaderDesigner::Engine)OpenShaderDesigner::Enginestatic
+ + +
+ + diff --git a/Documentation/html/class_open_shader_designer_1_1_engine.html b/Documentation/html/class_open_shader_designer_1_1_engine.html new file mode 100644 index 0000000..1748e03 --- /dev/null +++ b/Documentation/html/class_open_shader_designer_1_1_engine.html @@ -0,0 +1,128 @@ + + + + + + + +OpenShaderDesigner: OpenShaderDesigner::Engine Class Reference + + + + + + + + + + + + + +
+
+ + + + + + +
+
OpenShaderDesigner 0.0.1 +
+
+
+ + + + + + + + + + +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ + +
+
+
+ +
OpenShaderDesigner::Engine Class Reference
+
+
+ + + + + + + + +

+Static Public Member Functions

+static void Start (const Window::Configuration &config)
 
+static void Stop ()
 
+static WindowGetMainWindow ()
 
+ + + +

+Static Public Attributes

+static const double & Delta = _Delta
 
+
The documentation for this class was generated from the following files: +
+ + +
+ + diff --git a/Documentation/html/class_open_shader_designer_1_1_event_handler-members.html b/Documentation/html/class_open_shader_designer_1_1_event_handler-members.html new file mode 100644 index 0000000..85464d8 --- /dev/null +++ b/Documentation/html/class_open_shader_designer_1_1_event_handler-members.html @@ -0,0 +1,106 @@ + + + + + + + +OpenShaderDesigner: Member List + + + + + + + + + + + + + +
+
+ + + + + + +
+
OpenShaderDesigner 0.0.1 +
+
+
+ + + + + + + + + + +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ + +
+
+
+
OpenShaderDesigner::EventHandler< EventType > Member List
+
+
+ +

This is the complete list of members for OpenShaderDesigner::EventHandler< EventType >, including all inherited members.

+ + + +
HandledType typedefOpenShaderDesigner::EventHandler< EventType >
HandleEvent(const HandledType *event)=0OpenShaderDesigner::EventHandler< EventType >pure virtual
+ + +
+ + diff --git a/Documentation/html/class_open_shader_designer_1_1_event_handler.html b/Documentation/html/class_open_shader_designer_1_1_event_handler.html new file mode 100644 index 0000000..0d38020 --- /dev/null +++ b/Documentation/html/class_open_shader_designer_1_1_event_handler.html @@ -0,0 +1,181 @@ + + + + + + + +OpenShaderDesigner: OpenShaderDesigner::EventHandler< EventType > Class Template Reference + + + + + + + + + + + + + +
+
+ + + + + + +
+
OpenShaderDesigner 0.0.1 +
+
+
+ + + + + + + + + + +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ + +
+
+
+ +
OpenShaderDesigner::EventHandler< EventType > Class Template Referenceabstract
+
+
+ +

EventHandler interface for creating custom EventHandlers. + More...

+ +

#include <EventSystem.h>

+
+Inheritance diagram for OpenShaderDesigner::EventHandler< EventType >:
+
+
+ + +OpenShaderDesigner::_ImplEventHandler + +
+ + + + + +

+Public Types

+using HandledType = EventType
 The type handled by the EventHandler.
 
+ + + + +

+Public Member Functions

virtual bool HandleEvent (const HandledType *event)=0
 Virtual function for custom EventHandler implementations.
 
+

Detailed Description

+
template<typename EventType>
+class OpenShaderDesigner::EventHandler< EventType >

EventHandler interface for creating custom EventHandlers.

+
Template Parameters
+ + +
EventTypeThe ComponentType of Event handled by the EventHandler
+
+
+

Member Function Documentation

+ +

◆ HandleEvent()

+ +
+
+
+template<typename EventType >
+ + + + + +
+ + + + + + + +
virtual bool OpenShaderDesigner::EventHandler< EventType >::HandleEvent (const HandledType * event)
+
+pure virtual
+
+ +

Virtual function for custom EventHandler implementations.

+
Parameters
+ + +
eventThe Event being handled.
+
+
+ +
+
+
The documentation for this class was generated from the following file: +
+ + +
+ + diff --git a/Documentation/html/class_open_shader_designer_1_1_event_handler.png b/Documentation/html/class_open_shader_designer_1_1_event_handler.png new file mode 100644 index 0000000..4e868fe Binary files /dev/null and b/Documentation/html/class_open_shader_designer_1_1_event_handler.png differ diff --git a/Documentation/html/class_open_shader_designer_1_1_event_system-members.html b/Documentation/html/class_open_shader_designer_1_1_event_system-members.html new file mode 100644 index 0000000..f6d4131 --- /dev/null +++ b/Documentation/html/class_open_shader_designer_1_1_event_system-members.html @@ -0,0 +1,107 @@ + + + + + + + +OpenShaderDesigner: Member List + + + + + + + + + + + + + +
+
+ + + + + + +
+
OpenShaderDesigner 0.0.1 +
+
+
+ + + + + + + + + + +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ + +
+
+
+
OpenShaderDesigner::EventSystem Member List
+
+
+ +

This is the complete list of members for OpenShaderDesigner::EventSystem, including all inherited members.

+ + + + +
PostEvent(const Event *)OpenShaderDesigner::EventSystemstatic
RegisterHandler(EventHandler< T > *)OpenShaderDesigner::EventSystemstatic
UnregisterHandler(EventHandler< T > *)OpenShaderDesigner::EventSystemstatic
+ + +
+ + diff --git a/Documentation/html/class_open_shader_designer_1_1_event_system.html b/Documentation/html/class_open_shader_designer_1_1_event_system.html new file mode 100644 index 0000000..395fa48 --- /dev/null +++ b/Documentation/html/class_open_shader_designer_1_1_event_system.html @@ -0,0 +1,202 @@ + + + + + + + +OpenShaderDesigner: OpenShaderDesigner::EventSystem Class Reference + + + + + + + + + + + + + +
+
+ + + + + + +
+
OpenShaderDesigner 0.0.1 +
+
+
+ + + + + + + + + + +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ + +
+
+
+ +
OpenShaderDesigner::EventSystem Class Reference
+
+
+ +

EventSystem for posting Events to be handled. + More...

+ +

#include <EventSystem.h>

+ + + + + + + + + + + + + +

+Static Public Member Functions

+static void PostEvent (const Event *)
 Post an Event to be Handled.
 
template<typename T >
static void RegisterHandler (EventHandler< T > *)
 Register an EventHandler with the EventSystem.
 
template<typename T >
static void UnregisterHandler (EventHandler< T > *)
 Unregister an EventHandler with the EventSystem.
 
+

Detailed Description

+

EventSystem for posting Events to be handled.

+

Member Function Documentation

+ +

◆ RegisterHandler()

+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + +
void OpenShaderDesigner::EventSystem::RegisterHandler (EventHandler< T > * handler)
+
+static
+
+ +

Register an EventHandler with the EventSystem.

+
Template Parameters
+ + +
TComponentType of Event handled by the EventHandler.
+
+
+ +
+
+ +

◆ UnregisterHandler()

+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + +
void OpenShaderDesigner::EventSystem::UnregisterHandler (EventHandler< T > * handler)
+
+static
+
+ +

Unregister an EventHandler with the EventSystem.

+
Template Parameters
+ + +
TComponentType of Event handled by the EventHandler.
+
+
+ +
+
+
The documentation for this class was generated from the following files: +
+ + +
+ + diff --git a/Documentation/html/class_open_shader_designer_1_1_inspector-members.html b/Documentation/html/class_open_shader_designer_1_1_inspector-members.html new file mode 100644 index 0000000..1fe8d60 --- /dev/null +++ b/Documentation/html/class_open_shader_designer_1_1_inspector-members.html @@ -0,0 +1,122 @@ + + + + + + + +OpenShaderDesigner: Member List + + + + + + + + + + + + + +
+
+ + + + + + +
+
OpenShaderDesigner 0.0.1 +
+
+
+ + + + + + + + + + +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ + +
+
+
+
OpenShaderDesigner::Inspector Member List
+
+
+ +

This is the complete list of members for OpenShaderDesigner::Inspector, including all inherited members.

+ + + + + + + + + + + + + + + + + + + +
CheckFlag(ImGuiWindowFlags flag) const (defined in OpenShaderDesigner::EditorWindow)OpenShaderDesigner::EditorWindowinline
ClearFlags(ImGuiWindowFlags flags) (defined in OpenShaderDesigner::EditorWindow)OpenShaderDesigner::EditorWindowinline
Close()OpenShaderDesigner::EditorWindow
Draw()OpenShaderDesigner::EditorWindow
DrawMenu()OpenShaderDesigner::EditorWindowinlineprotectedvirtual
DrawWindow() overrideOpenShaderDesigner::Inspectorvirtual
EditorWindow(const std::string &title, ImGuiWindowFlags flags) (defined in OpenShaderDesigner::EditorWindow)OpenShaderDesigner::EditorWindowprotected
HasMenuBar() const (defined in OpenShaderDesigner::EditorWindow)OpenShaderDesigner::EditorWindowinline
Inspector() (defined in OpenShaderDesigner::Inspector)OpenShaderDesigner::Inspector
IsOpen() constOpenShaderDesigner::EditorWindowinline
OnClose()OpenShaderDesigner::EditorWindowinlineprotectedvirtual
OnOpen()OpenShaderDesigner::EditorWindowinlineprotectedvirtual
Open()OpenShaderDesigner::EditorWindow
SetFlags(ImGuiWindowFlags flags) (defined in OpenShaderDesigner::EditorWindow)OpenShaderDesigner::EditorWindowinline
ShaderGraph (defined in OpenShaderDesigner::Inspector)OpenShaderDesigner::Inspectorfriend
TitleOpenShaderDesigner::EditorWindow
ToggleFlags(ImGuiWindowFlags flags) (defined in OpenShaderDesigner::EditorWindow)OpenShaderDesigner::EditorWindowinline
~EditorWindow()=default (defined in OpenShaderDesigner::EditorWindow)OpenShaderDesigner::EditorWindowprotected
+ + +
+ + diff --git a/Documentation/html/class_open_shader_designer_1_1_inspector.html b/Documentation/html/class_open_shader_designer_1_1_inspector.html new file mode 100644 index 0000000..3c39b7d --- /dev/null +++ b/Documentation/html/class_open_shader_designer_1_1_inspector.html @@ -0,0 +1,214 @@ + + + + + + + +OpenShaderDesigner: OpenShaderDesigner::Inspector Class Reference + + + + + + + + + + + + + +
+
+ + + + + + +
+
OpenShaderDesigner 0.0.1 +
+
+
+ + + + + + + + + + +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ + +
+
+
+ +
OpenShaderDesigner::Inspector Class Reference
+
+
+
+Inheritance diagram for OpenShaderDesigner::Inspector:
+
+
+ + +OpenShaderDesigner::EditorWindow + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

void DrawWindow () override
 DrawWindow function for when the EditorWindow is being drawn.
 
- Public Member Functions inherited from OpenShaderDesigner::EditorWindow
+void Open ()
 Open the EditorWindow.
 
+void Draw ()
 Draw the EditorWindow.
 
+void Close ()
 Close the EditorWindow.
 
bool IsOpen () const
 Check if the EditorWindow is open.
 
+void SetFlags (ImGuiWindowFlags flags)
 
+void ClearFlags (ImGuiWindowFlags flags)
 
+void ToggleFlags (ImGuiWindowFlags flags)
 
+bool CheckFlag (ImGuiWindowFlags flag) const
 
+bool HasMenuBar () const
 
+ + + +

+Friends

+class ShaderGraph
 
+ + + + + + + + + + + + + + + + + +

+Additional Inherited Members

- Public Attributes inherited from OpenShaderDesigner::EditorWindow
+const std::string Title
 Title for the EditorWindow.
 
- Protected Member Functions inherited from OpenShaderDesigner::EditorWindow
EditorWindow (const std::string &title, ImGuiWindowFlags flags)
 
virtual void OnOpen ()
 OnOpen callback for when the EditorWindow is opened.
 
virtual void DrawMenu ()
 DrawMenu function for when the EditorWindow Menu is being drawn.
 
+virtual void OnClose ()
 OnClose callback for when the EditorWindow is closed.
 
+

Member Function Documentation

+ +

◆ DrawWindow()

+ +
+
+ + + + + +
+ + + + + + + +
void Inspector::DrawWindow ()
+
+overridevirtual
+
+ +

DrawWindow function for when the EditorWindow is being drawn.

+ +

Reimplemented from OpenShaderDesigner::EditorWindow.

+ +
+
+
The documentation for this class was generated from the following files: +
+ + +
+ + diff --git a/Documentation/html/class_open_shader_designer_1_1_inspector.png b/Documentation/html/class_open_shader_designer_1_1_inspector.png new file mode 100644 index 0000000..9f3505e Binary files /dev/null and b/Documentation/html/class_open_shader_designer_1_1_inspector.png differ diff --git a/Documentation/html/class_open_shader_designer_1_1_profiler-members.html b/Documentation/html/class_open_shader_designer_1_1_profiler-members.html new file mode 100644 index 0000000..e7aa7d5 --- /dev/null +++ b/Documentation/html/class_open_shader_designer_1_1_profiler-members.html @@ -0,0 +1,128 @@ + + + + + + + +OpenShaderDesigner: Member List + + + + + + + + + + + + + +
+
+ + + + + + +
+
OpenShaderDesigner 0.0.1 +
+
+
+ + + + + + + + + + +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ + +
+
+
+
OpenShaderDesigner::Profiler Member List
+
+
+ +

This is the complete list of members for OpenShaderDesigner::Profiler, including all inherited members.

+ + + + + + + + + + + + + + + + + + + + + + + + + +
CheckFlag(ImGuiWindowFlags flag) const (defined in OpenShaderDesigner::EditorWindow)OpenShaderDesigner::EditorWindowinline
ClearFlags(ImGuiWindowFlags flags) (defined in OpenShaderDesigner::EditorWindow)OpenShaderDesigner::EditorWindowinline
Close()OpenShaderDesigner::EditorWindow
Draw()OpenShaderDesigner::EditorWindow
DrawMenu()OpenShaderDesigner::EditorWindowinlineprotectedvirtual
DrawWindow() overrideOpenShaderDesigner::Profilervirtual
EditorWindow(const std::string &title, ImGuiWindowFlags flags) (defined in OpenShaderDesigner::EditorWindow)OpenShaderDesigner::EditorWindowprotected
OpenShaderDesigner::HandledType typedefOpenShaderDesigner::EventHandler< BeginFrame >
OpenShaderDesigner::EventHandler< EndFrame >::HandledType typedefOpenShaderDesigner::EventHandler< EndFrame >
HandleEvent(const EventHandler< BeginFrame >::HandledType *event) override (defined in OpenShaderDesigner::Profiler)OpenShaderDesigner::Profiler
HandleEvent(const EventHandler< EndFrame >::HandledType *event) override (defined in OpenShaderDesigner::Profiler)OpenShaderDesigner::Profiler
OpenShaderDesigner::EventHandler< BeginFrame >::HandleEvent(const HandledType *event)=0OpenShaderDesigner::EventHandler< BeginFrame >pure virtual
OpenShaderDesigner::EventHandler< EndFrame >::HandleEvent(const HandledType *event)=0OpenShaderDesigner::EventHandler< EndFrame >pure virtual
HasMenuBar() const (defined in OpenShaderDesigner::EditorWindow)OpenShaderDesigner::EditorWindowinline
IsOpen() constOpenShaderDesigner::EditorWindowinline
OnClose()OpenShaderDesigner::EditorWindowinlineprotectedvirtual
OnOpen()OpenShaderDesigner::EditorWindowinlineprotectedvirtual
Open()OpenShaderDesigner::EditorWindow
Profiler() (defined in OpenShaderDesigner::Profiler)OpenShaderDesigner::Profiler
SetFlags(ImGuiWindowFlags flags) (defined in OpenShaderDesigner::EditorWindow)OpenShaderDesigner::EditorWindowinline
TitleOpenShaderDesigner::EditorWindow
ToggleFlags(ImGuiWindowFlags flags) (defined in OpenShaderDesigner::EditorWindow)OpenShaderDesigner::EditorWindowinline
~EditorWindow()=default (defined in OpenShaderDesigner::EditorWindow)OpenShaderDesigner::EditorWindowprotected
~Profiler() (defined in OpenShaderDesigner::Profiler)OpenShaderDesigner::Profiler
+ + +
+ + diff --git a/Documentation/html/class_open_shader_designer_1_1_profiler.html b/Documentation/html/class_open_shader_designer_1_1_profiler.html new file mode 100644 index 0000000..20cd507 --- /dev/null +++ b/Documentation/html/class_open_shader_designer_1_1_profiler.html @@ -0,0 +1,235 @@ + + + + + + + +OpenShaderDesigner: OpenShaderDesigner::Profiler Class Reference + + + + + + + + + + + + + +
+
+ + + + + + +
+
OpenShaderDesigner 0.0.1 +
+
+
+ + + + + + + + + + +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ + +
+
+
+ +
OpenShaderDesigner::Profiler Class Reference
+
+
+
+Inheritance diagram for OpenShaderDesigner::Profiler:
+
+
+ + +OpenShaderDesigner::EditorWindow +OpenShaderDesigner::EventHandler< BeginFrame > +OpenShaderDesigner::EventHandler< EndFrame > +OpenShaderDesigner::_ImplEventHandler +OpenShaderDesigner::_ImplEventHandler + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

void DrawWindow () override
 DrawWindow function for when the EditorWindow is being drawn.
 
+bool HandleEvent (const EventHandler< BeginFrame >::HandledType *event) override
 
+bool HandleEvent (const EventHandler< EndFrame >::HandledType *event) override
 
- Public Member Functions inherited from OpenShaderDesigner::EditorWindow
+void Open ()
 Open the EditorWindow.
 
+void Draw ()
 Draw the EditorWindow.
 
+void Close ()
 Close the EditorWindow.
 
bool IsOpen () const
 Check if the EditorWindow is open.
 
+void SetFlags (ImGuiWindowFlags flags)
 
+void ClearFlags (ImGuiWindowFlags flags)
 
+void ToggleFlags (ImGuiWindowFlags flags)
 
+bool CheckFlag (ImGuiWindowFlags flag) const
 
+bool HasMenuBar () const
 
- Public Member Functions inherited from OpenShaderDesigner::EventHandler< BeginFrame >
virtual bool HandleEvent (const HandledType *event)=0
 Virtual function for custom EventHandler implementations.
 
- Public Member Functions inherited from OpenShaderDesigner::EventHandler< EndFrame >
virtual bool HandleEvent (const HandledType *event)=0
 Virtual function for custom EventHandler implementations.
 
+ + + + + + + + + + + + + + + + + + + + + + + + + +

+Additional Inherited Members

- Public Types inherited from OpenShaderDesigner::EventHandler< BeginFrame >
+using HandledType
 The type handled by the EventHandler.
 
- Public Types inherited from OpenShaderDesigner::EventHandler< EndFrame >
+using HandledType
 The type handled by the EventHandler.
 
- Public Attributes inherited from OpenShaderDesigner::EditorWindow
+const std::string Title
 Title for the EditorWindow.
 
- Protected Member Functions inherited from OpenShaderDesigner::EditorWindow
EditorWindow (const std::string &title, ImGuiWindowFlags flags)
 
virtual void OnOpen ()
 OnOpen callback for when the EditorWindow is opened.
 
virtual void DrawMenu ()
 DrawMenu function for when the EditorWindow Menu is being drawn.
 
+virtual void OnClose ()
 OnClose callback for when the EditorWindow is closed.
 
+

Member Function Documentation

+ +

◆ DrawWindow()

+ +
+
+ + + + + +
+ + + + + + + +
void Profiler::DrawWindow ()
+
+overridevirtual
+
+ +

DrawWindow function for when the EditorWindow is being drawn.

+ +

Reimplemented from OpenShaderDesigner::EditorWindow.

+ +
+
+
The documentation for this class was generated from the following files: +
+ + +
+ + diff --git a/Documentation/html/class_open_shader_designer_1_1_profiler.png b/Documentation/html/class_open_shader_designer_1_1_profiler.png new file mode 100644 index 0000000..6ab3af5 Binary files /dev/null and b/Documentation/html/class_open_shader_designer_1_1_profiler.png differ diff --git a/Documentation/html/class_open_shader_designer_1_1_renderer.html b/Documentation/html/class_open_shader_designer_1_1_renderer.html new file mode 100644 index 0000000..4df4b85 --- /dev/null +++ b/Documentation/html/class_open_shader_designer_1_1_renderer.html @@ -0,0 +1,104 @@ + + + + + + + +OpenShaderDesigner: OpenShaderDesigner::Renderer Class Reference + + + + + + + + + + + + + +
+
+ + + + + + +
+
OpenShaderDesigner 0.0.1 +
+
+
+ + + + + + + + + + +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ + +
+
+
+
OpenShaderDesigner::Renderer Class Reference
+
+
+
The documentation for this class was generated from the following file: +
+ + +
+ + diff --git a/Documentation/html/class_open_shader_designer_1_1_shader_graph-members.html b/Documentation/html/class_open_shader_designer_1_1_shader_graph-members.html new file mode 100644 index 0000000..1cb6766 --- /dev/null +++ b/Documentation/html/class_open_shader_designer_1_1_shader_graph-members.html @@ -0,0 +1,161 @@ + + + + + + + +OpenShaderDesigner: Member List + + + + + + + + + + + + + +
+
+ + + + + + +
+
OpenShaderDesigner 0.0.1 +
+
+
+ + + + + + + + + + +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ + +
+
+
+
OpenShaderDesigner::ShaderGraph Member List
+
+
+ +

This is the complete list of members for OpenShaderDesigner::ShaderGraph, including all inherited members.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Background (defined in OpenShaderDesigner::ShaderGraph)OpenShaderDesigner::ShaderGraph
BackgroundColor (defined in OpenShaderDesigner::ShaderGraph)OpenShaderDesigner::ShaderGraph
Border (defined in OpenShaderDesigner::ShaderGraph)OpenShaderDesigner::ShaderGraph
BorderThickness (defined in OpenShaderDesigner::ShaderGraph)OpenShaderDesigner::ShaderGraph
CheckFlag(ImGuiWindowFlags flag) const (defined in OpenShaderDesigner::EditorWindow)OpenShaderDesigner::EditorWindowinline
ClearFlags(ImGuiWindowFlags flags) (defined in OpenShaderDesigner::EditorWindow)OpenShaderDesigner::EditorWindowinline
ClickedSomething (defined in OpenShaderDesigner::ShaderGraph)OpenShaderDesigner::ShaderGraph
Close()OpenShaderDesigner::EditorWindow
Connections (defined in OpenShaderDesigner::ShaderGraph)OpenShaderDesigner::ShaderGraph
Connections (defined in OpenShaderDesigner::ShaderGraph)OpenShaderDesigner::ShaderGraph
Content (defined in OpenShaderDesigner::ShaderGraph)OpenShaderDesigner::ShaderGraph
Delta (defined in OpenShaderDesigner::ShaderGraph)OpenShaderDesigner::ShaderGraph
DragSelect (defined in OpenShaderDesigner::ShaderGraph)OpenShaderDesigner::ShaderGraph
Draw()OpenShaderDesigner::EditorWindow
DrawMenu()OpenShaderDesigner::EditorWindowinlineprotectedvirtual
DrawWindow() overrideOpenShaderDesigner::ShaderGraphvirtual
EditorWindow(const std::string &title, ImGuiWindowFlags flags) (defined in OpenShaderDesigner::EditorWindow)OpenShaderDesigner::EditorWindowprotected
FocusedNode (defined in OpenShaderDesigner::ShaderGraph)OpenShaderDesigner::ShaderGraph
FontSize (defined in OpenShaderDesigner::ShaderGraph)OpenShaderDesigner::ShaderGraph
Grid (defined in OpenShaderDesigner::ShaderGraph)OpenShaderDesigner::ShaderGraph
HasMenuBar() const (defined in OpenShaderDesigner::EditorWindow)OpenShaderDesigner::EditorWindowinline
Input (defined in OpenShaderDesigner::ShaderGraph)OpenShaderDesigner::ShaderGraph
Inspector (defined in OpenShaderDesigner::ShaderGraph)OpenShaderDesigner::ShaderGraphfriend
IsOpen() constOpenShaderDesigner::EditorWindowinline
Lines (defined in OpenShaderDesigner::ShaderGraph)OpenShaderDesigner::ShaderGraph
Location (defined in OpenShaderDesigner::ShaderGraph)OpenShaderDesigner::ShaderGraph
Locks (defined in OpenShaderDesigner::ShaderGraph)OpenShaderDesigner::ShaderGraph
LocksDragged (defined in OpenShaderDesigner::ShaderGraph)OpenShaderDesigner::ShaderGraph
NewConnection (defined in OpenShaderDesigner::ShaderGraph)OpenShaderDesigner::ShaderGraph
NodeHovered (defined in OpenShaderDesigner::ShaderGraph)OpenShaderDesigner::ShaderGraph
Nodes (defined in OpenShaderDesigner::ShaderGraph)OpenShaderDesigner::ShaderGraph
Nodes (defined in OpenShaderDesigner::ShaderGraph)OpenShaderDesigner::ShaderGraph
OnClose()OpenShaderDesigner::EditorWindowinlineprotectedvirtual
OnOpen() overrideOpenShaderDesigner::ShaderGraphvirtual
Open()OpenShaderDesigner::EditorWindow
Padding (defined in OpenShaderDesigner::ShaderGraph)OpenShaderDesigner::ShaderGraph
Pins (defined in OpenShaderDesigner::ShaderGraph)OpenShaderDesigner::ShaderGraph
Rate (defined in OpenShaderDesigner::ShaderGraph)OpenShaderDesigner::ShaderGraph
Register(const std::filesystem::path &path, ConstructorPtr constructor) (defined in OpenShaderDesigner::ShaderGraph)OpenShaderDesigner::ShaderGraphstatic
Rounding (defined in OpenShaderDesigner::ShaderGraph)OpenShaderDesigner::ShaderGraph
ScreenLocation (defined in OpenShaderDesigner::ShaderGraph)OpenShaderDesigner::ShaderGraph
Scroll (defined in OpenShaderDesigner::ShaderGraph)OpenShaderDesigner::ShaderGraph
Scroll (defined in OpenShaderDesigner::ShaderGraph)OpenShaderDesigner::ShaderGraph
Selected (defined in OpenShaderDesigner::ShaderGraph)OpenShaderDesigner::ShaderGraph
SelectedBorder (defined in OpenShaderDesigner::ShaderGraph)OpenShaderDesigner::ShaderGraph
Selection (defined in OpenShaderDesigner::ShaderGraph)OpenShaderDesigner::ShaderGraph
SetFlags(ImGuiWindowFlags flags) (defined in OpenShaderDesigner::EditorWindow)OpenShaderDesigner::EditorWindowinline
ShaderGraph() (defined in OpenShaderDesigner::ShaderGraph)OpenShaderDesigner::ShaderGraph
Smoothing (defined in OpenShaderDesigner::ShaderGraph)OpenShaderDesigner::ShaderGraph
Text (defined in OpenShaderDesigner::ShaderGraph)OpenShaderDesigner::ShaderGraph
Thick (defined in OpenShaderDesigner::ShaderGraph)OpenShaderDesigner::ShaderGraph
Thin (defined in OpenShaderDesigner::ShaderGraph)OpenShaderDesigner::ShaderGraph
Title (defined in OpenShaderDesigner::ShaderGraph)OpenShaderDesigner::ShaderGraph
ToggleFlags(ImGuiWindowFlags flags) (defined in OpenShaderDesigner::EditorWindow)OpenShaderDesigner::EditorWindowinline
Zoom (defined in OpenShaderDesigner::ShaderGraph)OpenShaderDesigner::ShaderGraph
~EditorWindow()=default (defined in OpenShaderDesigner::EditorWindow)OpenShaderDesigner::EditorWindowprotected
~ShaderGraph() (defined in OpenShaderDesigner::ShaderGraph)OpenShaderDesigner::ShaderGraph
+ + +
+ + diff --git a/Documentation/html/class_open_shader_designer_1_1_shader_graph.html b/Documentation/html/class_open_shader_designer_1_1_shader_graph.html new file mode 100644 index 0000000..c868875 --- /dev/null +++ b/Documentation/html/class_open_shader_designer_1_1_shader_graph.html @@ -0,0 +1,250 @@ + + + + + + + +OpenShaderDesigner: OpenShaderDesigner::ShaderGraph Class Reference + + + + + + + + + + + + + +
+
+ + + + + + +
+
OpenShaderDesigner 0.0.1 +
+
+
+ + + + + + + + + + +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ + +
+
+
+ +
OpenShaderDesigner::ShaderGraph Class Reference
+
+
+
+Inheritance diagram for OpenShaderDesigner::ShaderGraph:
+
+
+ + +OpenShaderDesigner::EditorWindow + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

void OnOpen () override
 OnOpen callback for when the EditorWindow is opened.
 
void DrawWindow () override
 DrawWindow function for when the EditorWindow is being drawn.
 
- Public Member Functions inherited from OpenShaderDesigner::EditorWindow
+void Open ()
 Open the EditorWindow.
 
+void Draw ()
 Draw the EditorWindow.
 
+void Close ()
 Close the EditorWindow.
 
bool IsOpen () const
 Check if the EditorWindow is open.
 
+void SetFlags (ImGuiWindowFlags flags)
 
+void ClearFlags (ImGuiWindowFlags flags)
 
+void ToggleFlags (ImGuiWindowFlags flags)
 
+bool CheckFlag (ImGuiWindowFlags flag) const
 
+bool HasMenuBar () const
 
+ + + +

+Static Public Member Functions

+static void Register (const std::filesystem::path &path, ConstructorPtr constructor)
 
+ + + +

+Friends

+class Inspector
 
+ + + + + + + + + + + + + + +

+Additional Inherited Members

- Public Attributes inherited from OpenShaderDesigner::EditorWindow
+const std::string Title
 Title for the EditorWindow.
 
- Protected Member Functions inherited from OpenShaderDesigner::EditorWindow
EditorWindow (const std::string &title, ImGuiWindowFlags flags)
 
virtual void DrawMenu ()
 DrawMenu function for when the EditorWindow Menu is being drawn.
 
+virtual void OnClose ()
 OnClose callback for when the EditorWindow is closed.
 
+

Member Function Documentation

+ +

◆ DrawWindow()

+ +
+
+ + + + + +
+ + + + + + + +
void ShaderGraph::DrawWindow ()
+
+overridevirtual
+
+ +

DrawWindow function for when the EditorWindow is being drawn.

+ +

Reimplemented from OpenShaderDesigner::EditorWindow.

+ +
+
+ +

◆ OnOpen()

+ +
+
+ + + + + +
+ + + + + + + +
void ShaderGraph::OnOpen ()
+
+overridevirtual
+
+ +

OnOpen callback for when the EditorWindow is opened.

+ +

Reimplemented from OpenShaderDesigner::EditorWindow.

+ +
+
+
The documentation for this class was generated from the following files: +
+ + +
+ + diff --git a/Documentation/html/class_open_shader_designer_1_1_shader_graph.png b/Documentation/html/class_open_shader_designer_1_1_shader_graph.png new file mode 100644 index 0000000..7564bde Binary files /dev/null and b/Documentation/html/class_open_shader_designer_1_1_shader_graph.png differ diff --git a/Documentation/html/class_open_shader_designer_1_1_timer-members.html b/Documentation/html/class_open_shader_designer_1_1_timer-members.html new file mode 100644 index 0000000..680ca15 --- /dev/null +++ b/Documentation/html/class_open_shader_designer_1_1_timer-members.html @@ -0,0 +1,107 @@ + + + + + + + +OpenShaderDesigner: Member List + + + + + + + + + + + + + +
+
+ + + + + + +
+
OpenShaderDesigner 0.0.1 +
+
+
+ + + + + + + + + + +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ + +
+
+
+
OpenShaderDesigner::Timer Member List
+
+
+ +

This is the complete list of members for OpenShaderDesigner::Timer, including all inherited members.

+ + + + +
Poll() const (defined in OpenShaderDesigner::Timer)OpenShaderDesigner::Timerinline
Reset() (defined in OpenShaderDesigner::Timer)OpenShaderDesigner::Timerinline
Timer() (defined in OpenShaderDesigner::Timer)OpenShaderDesigner::Timerinline
+ + +
+ + diff --git a/Documentation/html/class_open_shader_designer_1_1_timer.html b/Documentation/html/class_open_shader_designer_1_1_timer.html new file mode 100644 index 0000000..de9d07f --- /dev/null +++ b/Documentation/html/class_open_shader_designer_1_1_timer.html @@ -0,0 +1,117 @@ + + + + + + + +OpenShaderDesigner: OpenShaderDesigner::Timer Class Reference + + + + + + + + + + + + + +
+
+ + + + + + +
+
OpenShaderDesigner 0.0.1 +
+
+
+ + + + + + + + + + +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ + +
+
+
+ +
OpenShaderDesigner::Timer Class Reference
+
+
+ + + + + + +

+Public Member Functions

+void Reset ()
 
+double Poll () const
 
+
The documentation for this class was generated from the following file: +
+ + +
+ + diff --git a/Documentation/html/class_open_shader_designer_1_1_window-members.html b/Documentation/html/class_open_shader_designer_1_1_window-members.html new file mode 100644 index 0000000..c6e8859 --- /dev/null +++ b/Documentation/html/class_open_shader_designer_1_1_window-members.html @@ -0,0 +1,119 @@ + + + + + + + +OpenShaderDesigner: Member List + + + + + + + + + + + + + +
+
+ + + + + + +
+
OpenShaderDesigner 0.0.1 +
+
+
+ + + + + + + + + + +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ + +
+
+
+
OpenShaderDesigner::Window Member List
+
+
+ +

This is the complete list of members for OpenShaderDesigner::Window, including all inherited members.

+ + + + + + + + + + + + + + + + +
BeginFrame() (defined in OpenShaderDesigner::Window)OpenShaderDesigner::Window
Close() (defined in OpenShaderDesigner::Window)OpenShaderDesigner::Windowinline
DefaultConfiguration (defined in OpenShaderDesigner::Window)OpenShaderDesigner::Windowinlinestatic
EndFrame() (defined in OpenShaderDesigner::Window)OpenShaderDesigner::Window
FullscreenMode enum name (defined in OpenShaderDesigner::Window)OpenShaderDesigner::Window
GetContext() (defined in OpenShaderDesigner::Window)OpenShaderDesigner::Windowinline
GetContext() const (defined in OpenShaderDesigner::Window)OpenShaderDesigner::Windowinline
GetHandle() (defined in OpenShaderDesigner::Window)OpenShaderDesigner::Windowinline
GetHandle() const (defined in OpenShaderDesigner::Window)OpenShaderDesigner::Windowinline
HandleEvents() (defined in OpenShaderDesigner::Window)OpenShaderDesigner::Window
IsOpen() const (defined in OpenShaderDesigner::Window)OpenShaderDesigner::Windowinline
Size() const (defined in OpenShaderDesigner::Window)OpenShaderDesigner::Windowinline
VSyncMode enum name (defined in OpenShaderDesigner::Window)OpenShaderDesigner::Window
Window(const Configuration &config) (defined in OpenShaderDesigner::Window)OpenShaderDesigner::Windowexplicit
~Window() (defined in OpenShaderDesigner::Window)OpenShaderDesigner::Window
+ + +
+ + diff --git a/Documentation/html/class_open_shader_designer_1_1_window.html b/Documentation/html/class_open_shader_designer_1_1_window.html new file mode 100644 index 0000000..5567c6d --- /dev/null +++ b/Documentation/html/class_open_shader_designer_1_1_window.html @@ -0,0 +1,173 @@ + + + + + + + +OpenShaderDesigner: OpenShaderDesigner::Window Class Reference + + + + + + + + + + + + + +
+
+ + + + + + +
+
OpenShaderDesigner 0.0.1 +
+
+
+ + + + + + + + + + +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ + +
+
+
+ +
OpenShaderDesigner::Window Class Reference
+
+
+ + + + +

+Classes

struct  Configuration
 
+ + + + + +

+Public Types

enum class  VSyncMode : int { DISABLED = 0 +, ENABLED = 1 +, ADAPTIVE = -1 +, DEFAULT = DISABLED + }
 
enum class  FullscreenMode : int { WINDOWED = 0 +, FULLSCREEN = SDL_WINDOW_FULLSCREEN +, FULLSCREEN_WINDOW = SDL_WINDOW_FULLSCREEN_DESKTOP + }
 
+ + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

Window (const Configuration &config)
 
+void HandleEvents ()
 
+void BeginFrame ()
 
+void EndFrame ()
 
+void Close ()
 
+bool IsOpen () const
 
+SDL_Window * GetHandle ()
 
+const SDL_Window * GetHandle () const
 
+SDL_GLContext GetContext ()
 
+const SDL_GLContext GetContext () const
 
+glm::ivec2 Size () const
 
+ + + +

+Static Public Attributes

+static const Configuration DefaultConfiguration
 
+
The documentation for this class was generated from the following files: +
+ + +
+ + diff --git a/Documentation/html/class_optional-members.html b/Documentation/html/class_optional-members.html new file mode 100644 index 0000000..d7691e9 --- /dev/null +++ b/Documentation/html/class_optional-members.html @@ -0,0 +1,128 @@ + + + + + + + +OpenShaderDesigner: Member List + + + + + + + + + + + + + +
+
+ + + + + + +
+
OpenShaderDesigner 0.0.1 +
+
+
+ + + + + + + + + + +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+
+
+
Optional< T > Member List
+
+
+ +

This is the complete list of members for Optional< T >, including all inherited members.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
operator const Type &() const (defined in Optional< T >)Optional< T >inline
operator Type &() (defined in Optional< T >)Optional< T >inline
operator%=(const Type &data) (defined in Optional< T >)Optional< T >inline
operator&=(const Type &data) (defined in Optional< T >)Optional< T >inline
operator()() const (defined in Optional< T >)Optional< T >inline
operator*() (defined in Optional< T >)Optional< T >inline
operator*() const (defined in Optional< T >)Optional< T >inline
operator*=(const Type &data) (defined in Optional< T >)Optional< T >inline
operator+=(const Type &data) (defined in Optional< T >)Optional< T >inline
operator-=(const Type &data) (defined in Optional< T >)Optional< T >inline
operator->() (defined in Optional< T >)Optional< T >inline
operator->() const (defined in Optional< T >)Optional< T >inline
operator/=(const Type &data) (defined in Optional< T >)Optional< T >inline
operator<<=(const Type &data) (defined in Optional< T >)Optional< T >inline
operator=(const Optional &other)=default (defined in Optional< T >)Optional< T >
operator=(Optional &&other)=default (defined in Optional< T >)Optional< T >
operator=(const Type &data) (defined in Optional< T >)Optional< T >inline
operator=(Type &&data) (defined in Optional< T >)Optional< T >inline
operator>>=(const Type &data) (defined in Optional< T >)Optional< T >inline
operator^=(const Type &data) (defined in Optional< T >)Optional< T >inline
operator|=(const Type &data) (defined in Optional< T >)Optional< T >inline
Optional() (defined in Optional< T >)Optional< T >inline
Optional(const Type &data) (defined in Optional< T >)Optional< T >inline
Optional(Type &&data) (defined in Optional< T >)Optional< T >inline
Optional(const Optional &other)=default (defined in Optional< T >)Optional< T >
Optional(Optional &&other)=default (defined in Optional< T >)Optional< T >
Reset() (defined in Optional< T >)Optional< T >inline
Type typedef (defined in Optional< T >)Optional< T >
+ + +
+ + diff --git a/Documentation/html/class_optional.html b/Documentation/html/class_optional.html new file mode 100644 index 0000000..5abc699 --- /dev/null +++ b/Documentation/html/class_optional.html @@ -0,0 +1,192 @@ + + + + + + + +OpenShaderDesigner: Optional< T > Class Template Reference + + + + + + + + + + + + + +
+
+ + + + + + +
+
OpenShaderDesigner 0.0.1 +
+
+
+ + + + + + + + + + +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+
+
+ +
Optional< T > Class Template Reference
+
+
+ + + + +

+Public Types

+using Type = T
 
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

Optional (const Type &data)
 
Optional (Type &&data)
 
Optional (const Optional &other)=default
 
Optional (Optional &&other)=default
 
+Optionaloperator= (const Optional &other)=default
 
+Optionaloperator= (Optional &&other)=default
 
+Type & operator= (const Type &data)
 
+Type & operator= (Type &&data)
 
+Type & operator+= (const Type &data)
 
+Type & operator-= (const Type &data)
 
+Type & operator*= (const Type &data)
 
+Type & operator/= (const Type &data)
 
+Type & operator%= (const Type &data)
 
+Type & operator<<= (const Type &data)
 
+Type & operator>>= (const Type &data)
 
+Type & operator|= (const Type &data)
 
+Type & operator&= (const Type &data)
 
+Type & operator^= (const Type &data)
 
+bool operator() () const
 
operator Type & ()
 
operator const Type & () const
 
+Type * operator-> ()
 
+const Type * operator-> () const
 
+Type & operator* ()
 
+const Type & operator* () const
 
+void Reset ()
 
+
The documentation for this class was generated from the following file: +
+ + +
+ + diff --git a/Documentation/html/classes.html b/Documentation/html/classes.html new file mode 100644 index 0000000..965b00b --- /dev/null +++ b/Documentation/html/classes.html @@ -0,0 +1,139 @@ + + + + + + + +OpenShaderDesigner: Class Index + + + + + + + + + + + + + +
+
+ + + + + + +
+
OpenShaderDesigner 0.0.1 +
+
+
+ + + + + + + + +
+
+ + +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+
Class Index
+
+
+
A | B | C | E | H | I | N | P | R | S | T | W | _
+
+
+
A
+
Add (OpenShaderDesigner::Nodes::Math)
+
+
B
+
BufferObject (GLW)
+
+
C
+
Window::Configuration (OpenShaderDesigner)
Console (OpenShaderDesigner)
ConsoleWindow (OpenShaderDesigner)
Constant (OpenShaderDesigner::Nodes::Math)
+
+
E
+
EditorSystem (OpenShaderDesigner)
EditorWindow (OpenShaderDesigner)
Engine (OpenShaderDesigner)
Event (OpenShaderDesigner)
EventHandler (OpenShaderDesigner)
EventSystem (OpenShaderDesigner)
+
+
H
+
PinPtr::Hash (OpenShaderDesigner)
+
+
I
+
Inspector (OpenShaderDesigner)
+
+
N
+
Node (OpenShaderDesigner)
+
+
P
+
Pin (OpenShaderDesigner)
PinPtr (OpenShaderDesigner)
Profiler (OpenShaderDesigner)
+
+
R
+
Renderer (OpenShaderDesigner)
+
+
S
+
ShaderGraph (OpenShaderDesigner)
+
+
T
+
Timer (OpenShaderDesigner)
+
+
W
+
Window (OpenShaderDesigner)
+
+
_
+
_ImplEventHandler (OpenShaderDesigner)
+
+
+ + +
+ + diff --git a/Documentation/html/clipboard.js b/Documentation/html/clipboard.js new file mode 100644 index 0000000..42c1fb0 --- /dev/null +++ b/Documentation/html/clipboard.js @@ -0,0 +1,61 @@ +/** + +The code below is based on the Doxygen Awesome project, see +https://github.com/jothepro/doxygen-awesome-css + +MIT License + +Copyright (c) 2021 - 2022 jothepro + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +*/ + +let clipboard_title = "Copy to clipboard" +let clipboard_icon = `` +let clipboard_successIcon = `` +let clipboard_successDuration = 1000 + +$(function() { + if(navigator.clipboard) { + const fragments = document.getElementsByClassName("fragment") + for(const fragment of fragments) { + const clipboard_div = document.createElement("div") + clipboard_div.classList.add("clipboard") + clipboard_div.innerHTML = clipboard_icon + clipboard_div.title = clipboard_title + $(clipboard_div).click(function() { + const content = this.parentNode.cloneNode(true) + // filter out line number and folded fragments from file listings + content.querySelectorAll(".lineno, .ttc, .foldclosed").forEach((node) => { node.remove() }) + let text = content.textContent + // remove trailing newlines and trailing spaces from empty lines + text = text.replace(/^\s*\n/gm,'\n').replace(/\n*$/,'') + navigator.clipboard.writeText(text); + this.classList.add("success") + this.innerHTML = clipboard_successIcon + window.setTimeout(() => { // switch back to normal icon after timeout + this.classList.remove("success") + this.innerHTML = clipboard_icon + }, clipboard_successDuration); + }) + fragment.insertBefore(clipboard_div, fragment.firstChild) + } + } +}) diff --git a/Documentation/html/closed.png b/Documentation/html/closed.png new file mode 100644 index 0000000..98cc2c9 Binary files /dev/null and b/Documentation/html/closed.png differ diff --git a/Documentation/html/cookie.js b/Documentation/html/cookie.js new file mode 100644 index 0000000..53ad21d --- /dev/null +++ b/Documentation/html/cookie.js @@ -0,0 +1,58 @@ +/*! + Cookie helper functions + Copyright (c) 2023 Dimitri van Heesch + Released under MIT license. +*/ +let Cookie = { + cookie_namespace: 'doxygen_', + + readSetting(cookie,defVal) { + if (window.chrome) { + const val = localStorage.getItem(this.cookie_namespace+cookie) || + sessionStorage.getItem(this.cookie_namespace+cookie); + if (val) return val; + } else { + let myCookie = this.cookie_namespace+cookie+"="; + if (document.cookie) { + const index = document.cookie.indexOf(myCookie); + if (index != -1) { + const valStart = index + myCookie.length; + let valEnd = document.cookie.indexOf(";", valStart); + if (valEnd == -1) { + valEnd = document.cookie.length; + } + return document.cookie.substring(valStart, valEnd); + } + } + } + return defVal; + }, + + writeSetting(cookie,val,days=10*365) { // default days='forever', 0=session cookie, -1=delete + if (window.chrome) { + if (days==0) { + sessionStorage.setItem(this.cookie_namespace+cookie,val); + } else { + localStorage.setItem(this.cookie_namespace+cookie,val); + } + } else { + let date = new Date(); + date.setTime(date.getTime()+(days*24*60*60*1000)); + const expiration = days!=0 ? "expires="+date.toGMTString()+";" : ""; + document.cookie = this.cookie_namespace + cookie + "=" + + val + "; SameSite=Lax;" + expiration + "path=/"; + } + }, + + eraseSetting(cookie) { + if (window.chrome) { + if (localStorage.getItem(this.cookie_namespace+cookie)) { + localStorage.removeItem(this.cookie_namespace+cookie); + } else if (sessionStorage.getItem(this.cookie_namespace+cookie)) { + sessionStorage.removeItem(this.cookie_namespace+cookie); + } + } else { + this.writeSetting(cookie,'',-1); + } + }, +} diff --git a/Documentation/html/dir_0599d141b1a2e9e9007ecef8e4a97773.html b/Documentation/html/dir_0599d141b1a2e9e9007ecef8e4a97773.html new file mode 100644 index 0000000..c2cab11 --- /dev/null +++ b/Documentation/html/dir_0599d141b1a2e9e9007ecef8e4a97773.html @@ -0,0 +1,115 @@ + + + + + + + +OpenShaderDesigner: Include/Core Directory Reference + + + + + + + + + + + + + +
+
+ + + + + + +
+
OpenShaderDesigner 0.0.1 +
+
+
+ + + + + + + + + + +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ + +
+
+
+
Core Directory Reference
+
+
+ + + + + + + + + + + + +

+Files

 Console.h
 
 Engine.h
 
 EventSystem.h
 
 Renderer.h
 
 Window.h
 
+
+ + +
+ + diff --git a/Documentation/html/dir_1ad6433457b0067ef8f54a4fa85f5c9a.html b/Documentation/html/dir_1ad6433457b0067ef8f54a4fa85f5c9a.html new file mode 100644 index 0000000..a65ef92 --- /dev/null +++ b/Documentation/html/dir_1ad6433457b0067ef8f54a4fa85f5c9a.html @@ -0,0 +1,101 @@ + + + + + + + +OpenShaderDesigner: Source/Core Directory Reference + + + + + + + + + + + + + +
+
+ + + + + + +
+
OpenShaderDesigner 0.0.1 +
+
+
+ + + + + + + + + + +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ + +
+
+
+
Core Directory Reference
+
+
+
+ + +
+ + diff --git a/Documentation/html/dir_4f5feaaad4dfcdccc287056ff5aa4e6a.html b/Documentation/html/dir_4f5feaaad4dfcdccc287056ff5aa4e6a.html new file mode 100644 index 0000000..9d38a61 --- /dev/null +++ b/Documentation/html/dir_4f5feaaad4dfcdccc287056ff5aa4e6a.html @@ -0,0 +1,111 @@ + + + + + + + +OpenShaderDesigner: Include/OpenGL Directory Reference + + + + + + + + + + + + + +
+
+ + + + + + +
+
OpenShaderDesigner 0.0.1 +
+
+
+ + + + + + + + + + +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ + +
+
+
+
OpenGL Directory Reference
+
+
+ + + + + + + + +

+Files

 BufferObject.h
 
 Enum.h
 
 Type.h
 
+
+ + +
+ + diff --git a/Documentation/html/dir_59cb74542cbc54ecc57ab960eb401481.html b/Documentation/html/dir_59cb74542cbc54ecc57ab960eb401481.html new file mode 100644 index 0000000..3b492d1 --- /dev/null +++ b/Documentation/html/dir_59cb74542cbc54ecc57ab960eb401481.html @@ -0,0 +1,112 @@ + + + + + + + +OpenShaderDesigner: Include/Graph Directory Reference + + + + + + + + + + + + + +
+
+ + + + + + +
+
OpenShaderDesigner 0.0.1 +
+
+
+ + + + + + + + + + +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ + +
+
+
+
Graph Directory Reference
+
+
+ + + + +

+Directories

 Nodes
 
+ + + +

+Files

 ShaderGraph.h
 
+
+ + +
+ + diff --git a/Documentation/html/dir_5b2485f711efe5ec78073fbbbdb4a57f.html b/Documentation/html/dir_5b2485f711efe5ec78073fbbbdb4a57f.html new file mode 100644 index 0000000..68fe59f --- /dev/null +++ b/Documentation/html/dir_5b2485f711efe5ec78073fbbbdb4a57f.html @@ -0,0 +1,101 @@ + + + + + + + +OpenShaderDesigner: Source/Graph/Nodes Directory Reference + + + + + + + + + + + + + +
+
+ + + + + + +
+
OpenShaderDesigner 0.0.1 +
+
+
+ + + + + + + + + + +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ + +
+
+
+
Nodes Directory Reference
+
+
+
+ + +
+ + diff --git a/Documentation/html/dir_74389ed8173ad57b461b9d623a1f3867.html b/Documentation/html/dir_74389ed8173ad57b461b9d623a1f3867.html new file mode 100644 index 0000000..c59760b --- /dev/null +++ b/Documentation/html/dir_74389ed8173ad57b461b9d623a1f3867.html @@ -0,0 +1,111 @@ + + + + + + + +OpenShaderDesigner: Source Directory Reference + + + + + + + + + + + + + +
+
+ + + + + + +
+
OpenShaderDesigner 0.0.1 +
+
+
+ + + + + + + + + + +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ + +
+
+
+
Source Directory Reference
+
+
+ + + + + + + + +

+Directories

 Core
 
 Editor
 
 Graph
 
+
+ + +
+ + diff --git a/Documentation/html/dir_856524284ebe840938865dc061f982fb.html b/Documentation/html/dir_856524284ebe840938865dc061f982fb.html new file mode 100644 index 0000000..5fd4ee8 --- /dev/null +++ b/Documentation/html/dir_856524284ebe840938865dc061f982fb.html @@ -0,0 +1,115 @@ + + + + + + + +OpenShaderDesigner: Include Directory Reference + + + + + + + + + + + + + +
+
+ + + + + + +
+
OpenShaderDesigner 0.0.1 +
+
+
+ + + + + + + + + + +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ + +
+
+
+
Include Directory Reference
+
+
+ + + + + + + + + + + + +

+Directories

 Core
 
 Editor
 
 Graph
 
 OpenGL
 
 Utility
 
+
+ + +
+ + diff --git a/Documentation/html/dir_a0b83d6dfe57b92b7b2b82b6da22a396.html b/Documentation/html/dir_a0b83d6dfe57b92b7b2b82b6da22a396.html new file mode 100644 index 0000000..a22c07b --- /dev/null +++ b/Documentation/html/dir_a0b83d6dfe57b92b7b2b82b6da22a396.html @@ -0,0 +1,107 @@ + + + + + + + +OpenShaderDesigner: Source/Graph Directory Reference + + + + + + + + + + + + + +
+
+ + + + + + +
+
OpenShaderDesigner 0.0.1 +
+
+
+ + + + + + + + + + +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ + +
+
+
+
Graph Directory Reference
+
+
+ + + + +

+Directories

 Nodes
 
+
+ + +
+ + diff --git a/Documentation/html/dir_b26507eead720464ba2ac6bbc6dcec5f.html b/Documentation/html/dir_b26507eead720464ba2ac6bbc6dcec5f.html new file mode 100644 index 0000000..a365b62 --- /dev/null +++ b/Documentation/html/dir_b26507eead720464ba2ac6bbc6dcec5f.html @@ -0,0 +1,101 @@ + + + + + + + +OpenShaderDesigner: Source/Editor Directory Reference + + + + + + + + + + + + + +
+
+ + + + + + +
+
OpenShaderDesigner 0.0.1 +
+
+
+ + + + + + + + + + +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ + +
+
+
+
Editor Directory Reference
+
+
+
+ + +
+ + diff --git a/Documentation/html/dir_bd45b750fe5d9d69196d2087bb9244ca.html b/Documentation/html/dir_bd45b750fe5d9d69196d2087bb9244ca.html new file mode 100644 index 0000000..854e399 --- /dev/null +++ b/Documentation/html/dir_bd45b750fe5d9d69196d2087bb9244ca.html @@ -0,0 +1,113 @@ + + + + + + + +OpenShaderDesigner: Include/Editor Directory Reference + + + + + + + + + + + + + +
+
+ + + + + + +
+
OpenShaderDesigner 0.0.1 +
+
+
+ + + + + + + + + + +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ + +
+
+
+
Editor Directory Reference
+
+
+ + + + + + + + + + +

+Files

 ConsoleWindow.h
 
 EditorSystem.h
 
 EditorWindow.h
 
 Profiler.h
 
+
+ + +
+ + diff --git a/Documentation/html/dir_bf9b41161bb047acdfe721c17f042d81.html b/Documentation/html/dir_bf9b41161bb047acdfe721c17f042d81.html new file mode 100644 index 0000000..df29293 --- /dev/null +++ b/Documentation/html/dir_bf9b41161bb047acdfe721c17f042d81.html @@ -0,0 +1,107 @@ + + + + + + + +OpenShaderDesigner: Include/Utility Directory Reference + + + + + + + + + + + + + +
+
+ + + + + + +
+
OpenShaderDesigner 0.0.1 +
+
+
+ + + + + + + + + + +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ + +
+
+
+
Utility Directory Reference
+
+
+ + + + +

+Files

 Timer.h
 
+
+ + +
+ + diff --git a/Documentation/html/dir_c4fdeaf00d8f0a3f0e6e3e16a5c7d0d7.html b/Documentation/html/dir_c4fdeaf00d8f0a3f0e6e3e16a5c7d0d7.html new file mode 100644 index 0000000..13aa63a --- /dev/null +++ b/Documentation/html/dir_c4fdeaf00d8f0a3f0e6e3e16a5c7d0d7.html @@ -0,0 +1,107 @@ + + + + + + + +OpenShaderDesigner: Include/Graph/Nodes Directory Reference + + + + + + + + + + + + + +
+
+ + + + + + +
+
OpenShaderDesigner 0.0.1 +
+
+
+ + + + + + + + + + +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ + +
+
+
+
Nodes Directory Reference
+
+
+ + + + +

+Files

 Math.h
 
+
+ + +
+ + diff --git a/Documentation/html/doc.svg b/Documentation/html/doc.svg new file mode 100644 index 0000000..0b928a5 --- /dev/null +++ b/Documentation/html/doc.svg @@ -0,0 +1,12 @@ + + + + + + + + + + + diff --git a/Documentation/html/docd.svg b/Documentation/html/docd.svg new file mode 100644 index 0000000..ac18b27 --- /dev/null +++ b/Documentation/html/docd.svg @@ -0,0 +1,12 @@ + + + + + + + + + + + diff --git a/Documentation/html/doxygen.css b/Documentation/html/doxygen.css new file mode 100644 index 0000000..209912c --- /dev/null +++ b/Documentation/html/doxygen.css @@ -0,0 +1,2244 @@ +/* The standard CSS for doxygen 1.11.0*/ + +html { +/* page base colors */ +--page-background-color: white; +--page-foreground-color: black; +--page-link-color: #3D578C; +--page-visited-link-color: #4665A2; + +/* index */ +--index-odd-item-bg-color: #F8F9FC; +--index-even-item-bg-color: white; +--index-header-color: black; +--index-separator-color: #A0A0A0; + +/* header */ +--header-background-color: #F9FAFC; +--header-separator-color: #C4CFE5; +--header-gradient-image: url('nav_h.png'); +--group-header-separator-color: #879ECB; +--group-header-color: #354C7B; +--inherit-header-color: gray; + +--footer-foreground-color: #2A3D61; +--footer-logo-width: 104px; +--citation-label-color: #334975; +--glow-color: cyan; + +--title-background-color: white; +--title-separator-color: #5373B4; +--directory-separator-color: #9CAFD4; +--separator-color: #4A6AAA; + +--blockquote-background-color: #F7F8FB; +--blockquote-border-color: #9CAFD4; + +--scrollbar-thumb-color: #9CAFD4; +--scrollbar-background-color: #F9FAFC; + +--icon-background-color: #728DC1; +--icon-foreground-color: white; +--icon-doc-image: url('doc.svg'); +--icon-folder-open-image: url('folderopen.svg'); +--icon-folder-closed-image: url('folderclosed.svg'); + +/* brief member declaration list */ +--memdecl-background-color: #F9FAFC; +--memdecl-separator-color: #DEE4F0; +--memdecl-foreground-color: #555; +--memdecl-template-color: #4665A2; + +/* detailed member list */ +--memdef-border-color: #A8B8D9; +--memdef-title-background-color: #E2E8F2; +--memdef-title-gradient-image: url('nav_f.png'); +--memdef-proto-background-color: #DFE5F1; +--memdef-proto-text-color: #253555; +--memdef-proto-text-shadow: 0px 1px 1px rgba(255, 255, 255, 0.9); +--memdef-doc-background-color: white; +--memdef-param-name-color: #602020; +--memdef-template-color: #4665A2; + +/* tables */ +--table-cell-border-color: #2D4068; +--table-header-background-color: #374F7F; +--table-header-foreground-color: #FFFFFF; + +/* labels */ +--label-background-color: #728DC1; +--label-left-top-border-color: #5373B4; +--label-right-bottom-border-color: #C4CFE5; +--label-foreground-color: white; + +/** navigation bar/tree/menu */ +--nav-background-color: #F9FAFC; +--nav-foreground-color: #364D7C; +--nav-gradient-image: url('tab_b.png'); +--nav-gradient-hover-image: url('tab_h.png'); +--nav-gradient-active-image: url('tab_a.png'); +--nav-gradient-active-image-parent: url("../tab_a.png"); +--nav-separator-image: url('tab_s.png'); +--nav-breadcrumb-image: url('bc_s.png'); +--nav-breadcrumb-border-color: #C2CDE4; +--nav-splitbar-image: url('splitbar.png'); +--nav-font-size-level1: 13px; +--nav-font-size-level2: 10px; +--nav-font-size-level3: 9px; +--nav-text-normal-color: #283A5D; +--nav-text-hover-color: white; +--nav-text-active-color: white; +--nav-text-normal-shadow: 0px 1px 1px rgba(255, 255, 255, 0.9); +--nav-text-hover-shadow: 0px 1px 1px rgba(0, 0, 0, 1.0); +--nav-text-active-shadow: 0px 1px 1px rgba(0, 0, 0, 1.0); +--nav-menu-button-color: #364D7C; +--nav-menu-background-color: white; +--nav-menu-foreground-color: #555555; +--nav-menu-toggle-color: rgba(255, 255, 255, 0.5); +--nav-arrow-color: #9CAFD4; +--nav-arrow-selected-color: #9CAFD4; + +/* table of contents */ +--toc-background-color: #F4F6FA; +--toc-border-color: #D8DFEE; +--toc-header-color: #4665A2; +--toc-down-arrow-image: url("data:image/svg+xml;utf8,&%238595;"); + +/** search field */ +--search-background-color: white; +--search-foreground-color: #909090; +--search-magnification-image: url('mag.svg'); +--search-magnification-select-image: url('mag_sel.svg'); +--search-active-color: black; +--search-filter-background-color: #F9FAFC; +--search-filter-foreground-color: black; +--search-filter-border-color: #90A5CE; +--search-filter-highlight-text-color: white; +--search-filter-highlight-bg-color: #3D578C; +--search-results-foreground-color: #425E97; +--search-results-background-color: #EEF1F7; +--search-results-border-color: black; +--search-box-shadow: inset 0.5px 0.5px 3px 0px #555; + +/** code fragments */ +--code-keyword-color: #008000; +--code-type-keyword-color: #604020; +--code-flow-keyword-color: #E08000; +--code-comment-color: #800000; +--code-preprocessor-color: #806020; +--code-string-literal-color: #002080; +--code-char-literal-color: #008080; +--code-xml-cdata-color: black; +--code-vhdl-digit-color: #FF00FF; +--code-vhdl-char-color: #000000; +--code-vhdl-keyword-color: #700070; +--code-vhdl-logic-color: #FF0000; +--code-link-color: #4665A2; +--code-external-link-color: #4665A2; +--fragment-foreground-color: black; +--fragment-background-color: #FBFCFD; +--fragment-border-color: #C4CFE5; +--fragment-lineno-border-color: #00FF00; +--fragment-lineno-background-color: #E8E8E8; +--fragment-lineno-foreground-color: black; +--fragment-lineno-link-fg-color: #4665A2; +--fragment-lineno-link-bg-color: #D8D8D8; +--fragment-lineno-link-hover-fg-color: #4665A2; +--fragment-lineno-link-hover-bg-color: #C8C8C8; +--fragment-copy-ok-color: #2EC82E; +--tooltip-foreground-color: black; +--tooltip-background-color: white; +--tooltip-border-color: gray; +--tooltip-doc-color: grey; +--tooltip-declaration-color: #006318; +--tooltip-link-color: #4665A2; +--tooltip-shadow: 1px 1px 7px gray; +--fold-line-color: #808080; +--fold-minus-image: url('minus.svg'); +--fold-plus-image: url('plus.svg'); +--fold-minus-image-relpath: url('../../minus.svg'); +--fold-plus-image-relpath: url('../../plus.svg'); + +/** font-family */ +--font-family-normal: Roboto,sans-serif; +--font-family-monospace: 'JetBrains Mono',Consolas,Monaco,'Andale Mono','Ubuntu Mono',monospace,fixed; +--font-family-nav: 'Lucida Grande',Geneva,Helvetica,Arial,sans-serif; +--font-family-title: Tahoma,Arial,sans-serif; +--font-family-toc: Verdana,'DejaVu Sans',Geneva,sans-serif; +--font-family-search: Arial,Verdana,sans-serif; +--font-family-icon: Arial,Helvetica; +--font-family-tooltip: Roboto,sans-serif; + +/** special sections */ +--warning-color-bg: #f8d1cc; +--warning-color-hl: #b61825; +--warning-color-text: #75070f; +--note-color-bg: #faf3d8; +--note-color-hl: #f3a600; +--note-color-text: #5f4204; +--todo-color-bg: #e4f3ff; +--todo-color-hl: #1879C4; +--todo-color-text: #274a5c; +--test-color-bg: #e8e8ff; +--test-color-hl: #3939C4; +--test-color-text: #1a1a5c; +--deprecated-color-bg: #ecf0f3; +--deprecated-color-hl: #5b6269; +--deprecated-color-text: #43454a; +--bug-color-bg: #e4dafd; +--bug-color-hl: #5b2bdd; +--bug-color-text: #2a0d72; +--invariant-color-bg: #d8f1e3; +--invariant-color-hl: #44b86f; +--invariant-color-text: #265532; +} + +@media (prefers-color-scheme: dark) { + html:not(.dark-mode) { + color-scheme: dark; + +/* page base colors */ +--page-background-color: black; +--page-foreground-color: #C9D1D9; +--page-link-color: #90A5CE; +--page-visited-link-color: #A3B4D7; + +/* index */ +--index-odd-item-bg-color: #0B101A; +--index-even-item-bg-color: black; +--index-header-color: #C4CFE5; +--index-separator-color: #334975; + +/* header */ +--header-background-color: #070B11; +--header-separator-color: #141C2E; +--header-gradient-image: url('nav_hd.png'); +--group-header-separator-color: #283A5D; +--group-header-color: #90A5CE; +--inherit-header-color: #A0A0A0; + +--footer-foreground-color: #5B7AB7; +--footer-logo-width: 60px; +--citation-label-color: #90A5CE; +--glow-color: cyan; + +--title-background-color: #090D16; +--title-separator-color: #354C79; +--directory-separator-color: #283A5D; +--separator-color: #283A5D; + +--blockquote-background-color: #101826; +--blockquote-border-color: #283A5D; + +--scrollbar-thumb-color: #283A5D; +--scrollbar-background-color: #070B11; + +--icon-background-color: #334975; +--icon-foreground-color: #C4CFE5; +--icon-doc-image: url('docd.svg'); +--icon-folder-open-image: url('folderopend.svg'); +--icon-folder-closed-image: url('folderclosedd.svg'); + +/* brief member declaration list */ +--memdecl-background-color: #0B101A; +--memdecl-separator-color: #2C3F65; +--memdecl-foreground-color: #BBB; +--memdecl-template-color: #7C95C6; + +/* detailed member list */ +--memdef-border-color: #233250; +--memdef-title-background-color: #1B2840; +--memdef-title-gradient-image: url('nav_fd.png'); +--memdef-proto-background-color: #19243A; +--memdef-proto-text-color: #9DB0D4; +--memdef-proto-text-shadow: 0px 1px 1px rgba(0, 0, 0, 0.9); +--memdef-doc-background-color: black; +--memdef-param-name-color: #D28757; +--memdef-template-color: #7C95C6; + +/* tables */ +--table-cell-border-color: #283A5D; +--table-header-background-color: #283A5D; +--table-header-foreground-color: #C4CFE5; + +/* labels */ +--label-background-color: #354C7B; +--label-left-top-border-color: #4665A2; +--label-right-bottom-border-color: #283A5D; +--label-foreground-color: #CCCCCC; + +/** navigation bar/tree/menu */ +--nav-background-color: #101826; +--nav-foreground-color: #364D7C; +--nav-gradient-image: url('tab_bd.png'); +--nav-gradient-hover-image: url('tab_hd.png'); +--nav-gradient-active-image: url('tab_ad.png'); +--nav-gradient-active-image-parent: url("../tab_ad.png"); +--nav-separator-image: url('tab_sd.png'); +--nav-breadcrumb-image: url('bc_sd.png'); +--nav-breadcrumb-border-color: #2A3D61; +--nav-splitbar-image: url('splitbard.png'); +--nav-font-size-level1: 13px; +--nav-font-size-level2: 10px; +--nav-font-size-level3: 9px; +--nav-text-normal-color: #B6C4DF; +--nav-text-hover-color: #DCE2EF; +--nav-text-active-color: #DCE2EF; +--nav-text-normal-shadow: 0px 1px 1px black; +--nav-text-hover-shadow: 0px 1px 1px rgba(0, 0, 0, 1.0); +--nav-text-active-shadow: 0px 1px 1px rgba(0, 0, 0, 1.0); +--nav-menu-button-color: #B6C4DF; +--nav-menu-background-color: #05070C; +--nav-menu-foreground-color: #BBBBBB; +--nav-menu-toggle-color: rgba(255, 255, 255, 0.2); +--nav-arrow-color: #334975; +--nav-arrow-selected-color: #90A5CE; + +/* table of contents */ +--toc-background-color: #151E30; +--toc-border-color: #202E4A; +--toc-header-color: #A3B4D7; +--toc-down-arrow-image: url("data:image/svg+xml;utf8,&%238595;"); + +/** search field */ +--search-background-color: black; +--search-foreground-color: #C5C5C5; +--search-magnification-image: url('mag_d.svg'); +--search-magnification-select-image: url('mag_seld.svg'); +--search-active-color: #C5C5C5; +--search-filter-background-color: #101826; +--search-filter-foreground-color: #90A5CE; +--search-filter-border-color: #7C95C6; +--search-filter-highlight-text-color: #BCC9E2; +--search-filter-highlight-bg-color: #283A5D; +--search-results-background-color: #101826; +--search-results-foreground-color: #90A5CE; +--search-results-border-color: #7C95C6; +--search-box-shadow: inset 0.5px 0.5px 3px 0px #2F436C; + +/** code fragments */ +--code-keyword-color: #CC99CD; +--code-type-keyword-color: #AB99CD; +--code-flow-keyword-color: #E08000; +--code-comment-color: #717790; +--code-preprocessor-color: #65CABE; +--code-string-literal-color: #7EC699; +--code-char-literal-color: #00E0F0; +--code-xml-cdata-color: #C9D1D9; +--code-vhdl-digit-color: #FF00FF; +--code-vhdl-char-color: #C0C0C0; +--code-vhdl-keyword-color: #CF53C9; +--code-vhdl-logic-color: #FF0000; +--code-link-color: #79C0FF; +--code-external-link-color: #79C0FF; +--fragment-foreground-color: #C9D1D9; +--fragment-background-color: #090D16; +--fragment-border-color: #30363D; +--fragment-lineno-border-color: #30363D; +--fragment-lineno-background-color: black; +--fragment-lineno-foreground-color: #6E7681; +--fragment-lineno-link-fg-color: #6E7681; +--fragment-lineno-link-bg-color: #303030; +--fragment-lineno-link-hover-fg-color: #8E96A1; +--fragment-lineno-link-hover-bg-color: #505050; +--fragment-copy-ok-color: #0EA80E; +--tooltip-foreground-color: #C9D1D9; +--tooltip-background-color: #202020; +--tooltip-border-color: #C9D1D9; +--tooltip-doc-color: #D9E1E9; +--tooltip-declaration-color: #20C348; +--tooltip-link-color: #79C0FF; +--tooltip-shadow: none; +--fold-line-color: #808080; +--fold-minus-image: url('minusd.svg'); +--fold-plus-image: url('plusd.svg'); +--fold-minus-image-relpath: url('../../minusd.svg'); +--fold-plus-image-relpath: url('../../plusd.svg'); + +/** font-family */ +--font-family-normal: Roboto,sans-serif; +--font-family-monospace: 'JetBrains Mono',Consolas,Monaco,'Andale Mono','Ubuntu Mono',monospace,fixed; +--font-family-nav: 'Lucida Grande',Geneva,Helvetica,Arial,sans-serif; +--font-family-title: Tahoma,Arial,sans-serif; +--font-family-toc: Verdana,'DejaVu Sans',Geneva,sans-serif; +--font-family-search: Arial,Verdana,sans-serif; +--font-family-icon: Arial,Helvetica; +--font-family-tooltip: Roboto,sans-serif; + +/** special sections */ +--warning-color-bg: #2e1917; +--warning-color-hl: #ad2617; +--warning-color-text: #f5b1aa; +--note-color-bg: #3b2e04; +--note-color-hl: #f1b602; +--note-color-text: #ceb670; +--todo-color-bg: #163750; +--todo-color-hl: #1982D2; +--todo-color-text: #dcf0fa; +--test-color-bg: #121258; +--test-color-hl: #4242cf; +--test-color-text: #c0c0da; +--deprecated-color-bg: #2e323b; +--deprecated-color-hl: #738396; +--deprecated-color-text: #abb0bd; +--bug-color-bg: #2a2536; +--bug-color-hl: #7661b3; +--bug-color-text: #ae9ed6; +--invariant-color-bg: #303a35; +--invariant-color-hl: #76ce96; +--invariant-color-text: #cceed5; +}} +body { + background-color: var(--page-background-color); + color: var(--page-foreground-color); +} + +body, table, div, p, dl { + font-weight: 400; + font-size: 14px; + font-family: var(--font-family-normal); + line-height: 22px; +} + +/* @group Heading Levels */ + +.title { + font-family: var(--font-family-normal); + line-height: 28px; + font-size: 150%; + font-weight: bold; + margin: 10px 2px; +} + +h1.groupheader { + font-size: 150%; +} + +h2.groupheader { + border-bottom: 1px solid var(--group-header-separator-color); + color: var(--group-header-color); + font-size: 150%; + font-weight: normal; + margin-top: 1.75em; + padding-top: 8px; + padding-bottom: 4px; + width: 100%; +} + +h3.groupheader { + font-size: 100%; +} + +h1, h2, h3, h4, h5, h6 { + -webkit-transition: text-shadow 0.5s linear; + -moz-transition: text-shadow 0.5s linear; + -ms-transition: text-shadow 0.5s linear; + -o-transition: text-shadow 0.5s linear; + transition: text-shadow 0.5s linear; + margin-right: 15px; +} + +h1.glow, h2.glow, h3.glow, h4.glow, h5.glow, h6.glow { + text-shadow: 0 0 15px var(--glow-color); +} + +dt { + font-weight: bold; +} + +p.startli, p.startdd { + margin-top: 2px; +} + +th p.starttd, th p.intertd, th p.endtd { + font-size: 100%; + font-weight: 700; +} + +p.starttd { + margin-top: 0px; +} + +p.endli { + margin-bottom: 0px; +} + +p.enddd { + margin-bottom: 4px; +} + +p.endtd { + margin-bottom: 2px; +} + +p.interli { +} + +p.interdd { +} + +p.intertd { +} + +/* @end */ + +caption { + font-weight: bold; +} + +span.legend { + font-size: 70%; + text-align: center; +} + +h3.version { + font-size: 90%; + text-align: center; +} + +div.navtab { + padding-right: 15px; + text-align: right; + line-height: 110%; +} + +div.navtab table { + border-spacing: 0; +} + +td.navtab { + padding-right: 6px; + padding-left: 6px; +} + +td.navtabHL { + background-image: var(--nav-gradient-active-image); + background-repeat:repeat-x; + padding-right: 6px; + padding-left: 6px; +} + +td.navtabHL a, td.navtabHL a:visited { + color: var(--nav-text-hover-color); + text-shadow: var(--nav-text-hover-shadow); +} + +a.navtab { + font-weight: bold; +} + +div.qindex{ + text-align: center; + width: 100%; + line-height: 140%; + font-size: 130%; + color: var(--index-separator-color); +} + +#main-menu a:focus { + outline: auto; + z-index: 10; + position: relative; +} + +dt.alphachar{ + font-size: 180%; + font-weight: bold; +} + +.alphachar a{ + color: var(--index-header-color); +} + +.alphachar a:hover, .alphachar a:visited{ + text-decoration: none; +} + +.classindex dl { + padding: 25px; + column-count:1 +} + +.classindex dd { + display:inline-block; + margin-left: 50px; + width: 90%; + line-height: 1.15em; +} + +.classindex dl.even { + background-color: var(--index-even-item-bg-color); +} + +.classindex dl.odd { + background-color: var(--index-odd-item-bg-color); +} + +@media(min-width: 1120px) { + .classindex dl { + column-count:2 + } +} + +@media(min-width: 1320px) { + .classindex dl { + column-count:3 + } +} + + +/* @group Link Styling */ + +a { + color: var(--page-link-color); + font-weight: normal; + text-decoration: none; +} + +.contents a:visited { + color: var(--page-visited-link-color); +} + +a:hover { + text-decoration: none; + background: linear-gradient(to bottom, transparent 0,transparent calc(100% - 1px), currentColor 100%); +} + +a:hover > span.arrow { + text-decoration: none; + background : var(--nav-background-color); +} + +a.el { + font-weight: bold; +} + +a.elRef { +} + +a.code, a.code:visited, a.line, a.line:visited { + color: var(--code-link-color); +} + +a.codeRef, a.codeRef:visited, a.lineRef, a.lineRef:visited { + color: var(--code-external-link-color); +} + +a.code.hl_class { /* style for links to class names in code snippets */ } +a.code.hl_struct { /* style for links to struct names in code snippets */ } +a.code.hl_union { /* style for links to union names in code snippets */ } +a.code.hl_interface { /* style for links to interface names in code snippets */ } +a.code.hl_protocol { /* style for links to protocol names in code snippets */ } +a.code.hl_category { /* style for links to category names in code snippets */ } +a.code.hl_exception { /* style for links to exception names in code snippets */ } +a.code.hl_service { /* style for links to service names in code snippets */ } +a.code.hl_singleton { /* style for links to singleton names in code snippets */ } +a.code.hl_concept { /* style for links to concept names in code snippets */ } +a.code.hl_namespace { /* style for links to namespace names in code snippets */ } +a.code.hl_package { /* style for links to package names in code snippets */ } +a.code.hl_define { /* style for links to macro names in code snippets */ } +a.code.hl_function { /* style for links to function names in code snippets */ } +a.code.hl_variable { /* style for links to variable names in code snippets */ } +a.code.hl_typedef { /* style for links to typedef names in code snippets */ } +a.code.hl_enumvalue { /* style for links to enum value names in code snippets */ } +a.code.hl_enumeration { /* style for links to enumeration names in code snippets */ } +a.code.hl_signal { /* style for links to Qt signal names in code snippets */ } +a.code.hl_slot { /* style for links to Qt slot names in code snippets */ } +a.code.hl_friend { /* style for links to friend names in code snippets */ } +a.code.hl_dcop { /* style for links to KDE3 DCOP names in code snippets */ } +a.code.hl_property { /* style for links to property names in code snippets */ } +a.code.hl_event { /* style for links to event names in code snippets */ } +a.code.hl_sequence { /* style for links to sequence names in code snippets */ } +a.code.hl_dictionary { /* style for links to dictionary names in code snippets */ } + +/* @end */ + +dl.el { + margin-left: -1cm; +} + +ul.check { + list-style:none; + text-indent: -16px; + padding-left: 38px; +} +li.unchecked:before { + content: "\2610\A0"; +} +li.checked:before { + content: "\2611\A0"; +} + +ol { + text-indent: 0px; +} + +ul { + text-indent: 0px; + overflow: visible; +} + +ul.multicol { + -moz-column-gap: 1em; + -webkit-column-gap: 1em; + column-gap: 1em; + -moz-column-count: 3; + -webkit-column-count: 3; + column-count: 3; + list-style-type: none; +} + +#side-nav ul { + overflow: visible; /* reset ul rule for scroll bar in GENERATE_TREEVIEW window */ +} + +#main-nav ul { + overflow: visible; /* reset ul rule for the navigation bar drop down lists */ +} + +.fragment { + text-align: left; + direction: ltr; + overflow-x: auto; + overflow-y: hidden; + position: relative; + min-height: 12px; + margin: 10px 0px; + padding: 10px 10px; + border: 1px solid var(--fragment-border-color); + border-radius: 4px; + background-color: var(--fragment-background-color); + color: var(--fragment-foreground-color); +} + +pre.fragment { + word-wrap: break-word; + font-size: 10pt; + line-height: 125%; + font-family: var(--font-family-monospace); +} + +.clipboard { + width: 24px; + height: 24px; + right: 5px; + top: 5px; + opacity: 0; + position: absolute; + display: inline; + overflow: auto; + fill: var(--fragment-foreground-color); + justify-content: center; + align-items: center; + cursor: pointer; +} + +.clipboard.success { + border: 1px solid var(--fragment-foreground-color); + border-radius: 4px; +} + +.fragment:hover .clipboard, .clipboard.success { + opacity: .28; +} + +.clipboard:hover, .clipboard.success { + opacity: 1 !important; +} + +.clipboard:active:not([class~=success]) svg { + transform: scale(.91); +} + +.clipboard.success svg { + fill: var(--fragment-copy-ok-color); +} + +.clipboard.success { + border-color: var(--fragment-copy-ok-color); +} + +div.line { + font-family: var(--font-family-monospace); + font-size: 13px; + min-height: 13px; + line-height: 1.2; + text-wrap: unrestricted; + white-space: -moz-pre-wrap; /* Moz */ + white-space: -pre-wrap; /* Opera 4-6 */ + white-space: -o-pre-wrap; /* Opera 7 */ + white-space: pre-wrap; /* CSS3 */ + word-wrap: break-word; /* IE 5.5+ */ + text-indent: -53px; + padding-left: 53px; + padding-bottom: 0px; + margin: 0px; + -webkit-transition-property: background-color, box-shadow; + -webkit-transition-duration: 0.5s; + -moz-transition-property: background-color, box-shadow; + -moz-transition-duration: 0.5s; + -ms-transition-property: background-color, box-shadow; + -ms-transition-duration: 0.5s; + -o-transition-property: background-color, box-shadow; + -o-transition-duration: 0.5s; + transition-property: background-color, box-shadow; + transition-duration: 0.5s; +} + +div.line:after { + content:"\000A"; + white-space: pre; +} + +div.line.glow { + background-color: var(--glow-color); + box-shadow: 0 0 10px var(--glow-color); +} + +span.fold { + margin-left: 5px; + margin-right: 1px; + margin-top: 0px; + margin-bottom: 0px; + padding: 0px; + display: inline-block; + width: 12px; + height: 12px; + background-repeat:no-repeat; + background-position:center; +} + +span.lineno { + padding-right: 4px; + margin-right: 9px; + text-align: right; + border-right: 2px solid var(--fragment-lineno-border-color); + color: var(--fragment-lineno-foreground-color); + background-color: var(--fragment-lineno-background-color); + white-space: pre; +} +span.lineno a, span.lineno a:visited { + color: var(--fragment-lineno-link-fg-color); + background-color: var(--fragment-lineno-link-bg-color); +} + +span.lineno a:hover { + color: var(--fragment-lineno-link-hover-fg-color); + background-color: var(--fragment-lineno-link-hover-bg-color); +} + +.lineno { + -webkit-touch-callout: none; + -webkit-user-select: none; + -khtml-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; +} + +div.classindex ul { + list-style: none; + padding-left: 0; +} + +div.classindex span.ai { + display: inline-block; +} + +div.groupHeader { + margin-left: 16px; + margin-top: 12px; + font-weight: bold; +} + +div.groupText { + margin-left: 16px; + font-style: italic; +} + +body { + color: var(--page-foreground-color); + margin: 0; +} + +div.contents { + margin-top: 10px; + margin-left: 12px; + margin-right: 8px; +} + +p.formulaDsp { + text-align: center; +} + +img.dark-mode-visible { + display: none; +} +img.light-mode-visible { + display: none; +} + +img.formulaInl, img.inline { + vertical-align: middle; +} + +div.center { + text-align: center; + margin-top: 0px; + margin-bottom: 0px; + padding: 0px; +} + +div.center img { + border: 0px; +} + +address.footer { + text-align: right; + padding-right: 12px; +} + +img.footer { + border: 0px; + vertical-align: middle; + width: var(--footer-logo-width); +} + +.compoundTemplParams { + color: var(--memdecl-template-color); + font-size: 80%; + line-height: 120%; +} + +/* @group Code Colorization */ + +span.keyword { + color: var(--code-keyword-color); +} + +span.keywordtype { + color: var(--code-type-keyword-color); +} + +span.keywordflow { + color: var(--code-flow-keyword-color); +} + +span.comment { + color: var(--code-comment-color); +} + +span.preprocessor { + color: var(--code-preprocessor-color); +} + +span.stringliteral { + color: var(--code-string-literal-color); +} + +span.charliteral { + color: var(--code-char-literal-color); +} + +span.xmlcdata { + color: var(--code-xml-cdata-color); +} + +span.vhdldigit { + color: var(--code-vhdl-digit-color); +} + +span.vhdlchar { + color: var(--code-vhdl-char-color); +} + +span.vhdlkeyword { + color: var(--code-vhdl-keyword-color); +} + +span.vhdllogic { + color: var(--code-vhdl-logic-color); +} + +blockquote { + background-color: var(--blockquote-background-color); + border-left: 2px solid var(--blockquote-border-color); + margin: 0 24px 0 4px; + padding: 0 12px 0 16px; +} + +/* @end */ + +td.tiny { + font-size: 75%; +} + +.dirtab { + padding: 4px; + border-collapse: collapse; + border: 1px solid var(--table-cell-border-color); +} + +th.dirtab { + background-color: var(--table-header-background-color); + color: var(--table-header-foreground-color); + font-weight: bold; +} + +hr { + height: 0px; + border: none; + border-top: 1px solid var(--separator-color); +} + +hr.footer { + height: 1px; +} + +/* @group Member Descriptions */ + +table.memberdecls { + border-spacing: 0px; + padding: 0px; +} + +.memberdecls td, .fieldtable tr { + -webkit-transition-property: background-color, box-shadow; + -webkit-transition-duration: 0.5s; + -moz-transition-property: background-color, box-shadow; + -moz-transition-duration: 0.5s; + -ms-transition-property: background-color, box-shadow; + -ms-transition-duration: 0.5s; + -o-transition-property: background-color, box-shadow; + -o-transition-duration: 0.5s; + transition-property: background-color, box-shadow; + transition-duration: 0.5s; +} + +.memberdecls td.glow, .fieldtable tr.glow { + background-color: var(--glow-color); + box-shadow: 0 0 15px var(--glow-color); +} + +.mdescLeft, .mdescRight, +.memItemLeft, .memItemRight, +.memTemplItemLeft, .memTemplItemRight, .memTemplParams { + background-color: var(--memdecl-background-color); + border: none; + margin: 4px; + padding: 1px 0 0 8px; +} + +.mdescLeft, .mdescRight { + padding: 0px 8px 4px 8px; + color: var(--memdecl-foreground-color); +} + +.memSeparator { + border-bottom: 1px solid var(--memdecl-separator-color); + line-height: 1px; + margin: 0px; + padding: 0px; +} + +.memItemLeft, .memTemplItemLeft { + white-space: nowrap; +} + +.memItemRight, .memTemplItemRight { + width: 100%; +} + +.memTemplParams { + color: var(--memdecl-template-color); + white-space: nowrap; + font-size: 80%; +} + +/* @end */ + +/* @group Member Details */ + +/* Styles for detailed member documentation */ + +.memtitle { + padding: 8px; + border-top: 1px solid var(--memdef-border-color); + border-left: 1px solid var(--memdef-border-color); + border-right: 1px solid var(--memdef-border-color); + border-top-right-radius: 4px; + border-top-left-radius: 4px; + margin-bottom: -1px; + background-image: var(--memdef-title-gradient-image); + background-repeat: repeat-x; + background-color: var(--memdef-title-background-color); + line-height: 1.25; + font-weight: 300; + float:left; +} + +.permalink +{ + font-size: 65%; + display: inline-block; + vertical-align: middle; +} + +.memtemplate { + font-size: 80%; + color: var(--memdef-template-color); + font-weight: normal; + margin-left: 9px; +} + +.mempage { + width: 100%; +} + +.memitem { + padding: 0; + margin-bottom: 10px; + margin-right: 5px; + -webkit-transition: box-shadow 0.5s linear; + -moz-transition: box-shadow 0.5s linear; + -ms-transition: box-shadow 0.5s linear; + -o-transition: box-shadow 0.5s linear; + transition: box-shadow 0.5s linear; + display: table !important; + width: 100%; +} + +.memitem.glow { + box-shadow: 0 0 15px var(--glow-color); +} + +.memname { + font-weight: 400; + margin-left: 6px; +} + +.memname td { + vertical-align: bottom; +} + +.memproto, dl.reflist dt { + border-top: 1px solid var(--memdef-border-color); + border-left: 1px solid var(--memdef-border-color); + border-right: 1px solid var(--memdef-border-color); + padding: 6px 0px 6px 0px; + color: var(--memdef-proto-text-color); + font-weight: bold; + text-shadow: var(--memdef-proto-text-shadow); + background-color: var(--memdef-proto-background-color); + box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); + border-top-right-radius: 4px; +} + +.overload { + font-family: var(--font-family-monospace); + font-size: 65%; +} + +.memdoc, dl.reflist dd { + border-bottom: 1px solid var(--memdef-border-color); + border-left: 1px solid var(--memdef-border-color); + border-right: 1px solid var(--memdef-border-color); + padding: 6px 10px 2px 10px; + border-top-width: 0; + background-image:url('nav_g.png'); + background-repeat:repeat-x; + background-color: var(--memdef-doc-background-color); + /* opera specific markup */ + border-bottom-left-radius: 4px; + border-bottom-right-radius: 4px; + box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); + /* firefox specific markup */ + -moz-border-radius-bottomleft: 4px; + -moz-border-radius-bottomright: 4px; + -moz-box-shadow: rgba(0, 0, 0, 0.15) 5px 5px 5px; + /* webkit specific markup */ + -webkit-border-bottom-left-radius: 4px; + -webkit-border-bottom-right-radius: 4px; + -webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); +} + +dl.reflist dt { + padding: 5px; +} + +dl.reflist dd { + margin: 0px 0px 10px 0px; + padding: 5px; +} + +.paramkey { + text-align: right; +} + +.paramtype { + white-space: nowrap; + padding: 0px; + padding-bottom: 1px; +} + +.paramname { + white-space: nowrap; + padding: 0px; + padding-bottom: 1px; + margin-left: 2px; +} + +.paramname em { + color: var(--memdef-param-name-color); + font-style: normal; + margin-right: 1px; +} + +.paramname .paramdefval { + font-family: var(--font-family-monospace); +} + +.params, .retval, .exception, .tparams { + margin-left: 0px; + padding-left: 0px; +} + +.params .paramname, .retval .paramname, .tparams .paramname, .exception .paramname { + font-weight: bold; + vertical-align: top; +} + +.params .paramtype, .tparams .paramtype { + font-style: italic; + vertical-align: top; +} + +.params .paramdir, .tparams .paramdir { + font-family: var(--font-family-monospace); + vertical-align: top; +} + +table.mlabels { + border-spacing: 0px; +} + +td.mlabels-left { + width: 100%; + padding: 0px; +} + +td.mlabels-right { + vertical-align: bottom; + padding: 0px; + white-space: nowrap; +} + +span.mlabels { + margin-left: 8px; +} + +span.mlabel { + background-color: var(--label-background-color); + border-top:1px solid var(--label-left-top-border-color); + border-left:1px solid var(--label-left-top-border-color); + border-right:1px solid var(--label-right-bottom-border-color); + border-bottom:1px solid var(--label-right-bottom-border-color); + text-shadow: none; + color: var(--label-foreground-color); + margin-right: 4px; + padding: 2px 3px; + border-radius: 3px; + font-size: 7pt; + white-space: nowrap; + vertical-align: middle; +} + + + +/* @end */ + +/* these are for tree view inside a (index) page */ + +div.directory { + margin: 10px 0px; + border-top: 1px solid var(--directory-separator-color); + border-bottom: 1px solid var(--directory-separator-color); + width: 100%; +} + +.directory table { + border-collapse:collapse; +} + +.directory td { + margin: 0px; + padding: 0px; + vertical-align: top; +} + +.directory td.entry { + white-space: nowrap; + padding-right: 6px; + padding-top: 3px; +} + +.directory td.entry a { + outline:none; +} + +.directory td.entry a img { + border: none; +} + +.directory td.desc { + width: 100%; + padding-left: 6px; + padding-right: 6px; + padding-top: 3px; + border-left: 1px solid rgba(0,0,0,0.05); +} + +.directory tr.odd { + padding-left: 6px; + background-color: var(--index-odd-item-bg-color); +} + +.directory tr.even { + padding-left: 6px; + background-color: var(--index-even-item-bg-color); +} + +.directory img { + vertical-align: -30%; +} + +.directory .levels { + white-space: nowrap; + width: 100%; + text-align: right; + font-size: 9pt; +} + +.directory .levels span { + cursor: pointer; + padding-left: 2px; + padding-right: 2px; + color: var(--page-link-color); +} + +.arrow { + color: var(--nav-arrow-color); + -webkit-user-select: none; + -khtml-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; + cursor: pointer; + font-size: 80%; + display: inline-block; + width: 16px; + height: 22px; +} + +.icon { + font-family: var(--font-family-icon); + line-height: normal; + font-weight: bold; + font-size: 12px; + height: 14px; + width: 16px; + display: inline-block; + background-color: var(--icon-background-color); + color: var(--icon-foreground-color); + text-align: center; + border-radius: 4px; + margin-left: 2px; + margin-right: 2px; +} + +.icona { + width: 24px; + height: 22px; + display: inline-block; +} + +.iconfopen { + width: 24px; + height: 18px; + margin-bottom: 4px; + background-image:var(--icon-folder-open-image); + background-repeat: repeat-y; + vertical-align:top; + display: inline-block; +} + +.iconfclosed { + width: 24px; + height: 18px; + margin-bottom: 4px; + background-image:var(--icon-folder-closed-image); + background-repeat: repeat-y; + vertical-align:top; + display: inline-block; +} + +.icondoc { + width: 24px; + height: 18px; + margin-bottom: 4px; + background-image:var(--icon-doc-image); + background-position: 0px -4px; + background-repeat: repeat-y; + vertical-align:top; + display: inline-block; +} + +/* @end */ + +div.dynheader { + margin-top: 8px; + -webkit-touch-callout: none; + -webkit-user-select: none; + -khtml-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; +} + +address { + font-style: normal; + color: var(--footer-foreground-color); +} + +table.doxtable caption { + caption-side: top; +} + +table.doxtable { + border-collapse:collapse; + margin-top: 4px; + margin-bottom: 4px; +} + +table.doxtable td, table.doxtable th { + border: 1px solid var(--table-cell-border-color); + padding: 3px 7px 2px; +} + +table.doxtable th { + background-color: var(--table-header-background-color); + color: var(--table-header-foreground-color); + font-size: 110%; + padding-bottom: 4px; + padding-top: 5px; +} + +table.fieldtable { + margin-bottom: 10px; + border: 1px solid var(--memdef-border-color); + border-spacing: 0px; + border-radius: 4px; + box-shadow: 2px 2px 2px rgba(0, 0, 0, 0.15); +} + +.fieldtable td, .fieldtable th { + padding: 3px 7px 2px; +} + +.fieldtable td.fieldtype, .fieldtable td.fieldname { + white-space: nowrap; + border-right: 1px solid var(--memdef-border-color); + border-bottom: 1px solid var(--memdef-border-color); + vertical-align: top; +} + +.fieldtable td.fieldname { + padding-top: 3px; +} + +.fieldtable td.fielddoc { + border-bottom: 1px solid var(--memdef-border-color); +} + +.fieldtable td.fielddoc p:first-child { + margin-top: 0px; +} + +.fieldtable td.fielddoc p:last-child { + margin-bottom: 2px; +} + +.fieldtable tr:last-child td { + border-bottom: none; +} + +.fieldtable th { + background-image: var(--memdef-title-gradient-image); + background-repeat:repeat-x; + background-color: var(--memdef-title-background-color); + font-size: 90%; + color: var(--memdef-proto-text-color); + padding-bottom: 4px; + padding-top: 5px; + text-align:left; + font-weight: 400; + border-top-left-radius: 4px; + border-top-right-radius: 4px; + border-bottom: 1px solid var(--memdef-border-color); +} + + +.tabsearch { + top: 0px; + left: 10px; + height: 36px; + background-image: var(--nav-gradient-image); + z-index: 101; + overflow: hidden; + font-size: 13px; +} + +.navpath ul +{ + font-size: 11px; + background-image: var(--nav-gradient-image); + background-repeat:repeat-x; + background-position: 0 -5px; + height:30px; + line-height:30px; + color:var(--nav-text-normal-color); + border:solid 1px var(--nav-breadcrumb-border-color); + overflow:hidden; + margin:0px; + padding:0px; +} + +.navpath li +{ + list-style-type:none; + float:left; + padding-left:10px; + padding-right:15px; + background-image:var(--nav-breadcrumb-image); + background-repeat:no-repeat; + background-position:right; + color: var(--nav-foreground-color); +} + +.navpath li.navelem a +{ + height:32px; + display:block; + outline: none; + color: var(--nav-text-normal-color); + font-family: var(--font-family-nav); + text-shadow: var(--nav-text-normal-shadow); + text-decoration: none; +} + +.navpath li.navelem a:hover +{ + color: var(--nav-text-hover-color); + text-shadow: var(--nav-text-hover-shadow); +} + +.navpath li.footer +{ + list-style-type:none; + float:right; + padding-left:10px; + padding-right:15px; + background-image:none; + background-repeat:no-repeat; + background-position:right; + color: var(--footer-foreground-color); + font-size: 8pt; +} + + +div.summary +{ + float: right; + font-size: 8pt; + padding-right: 5px; + width: 50%; + text-align: right; +} + +div.summary a +{ + white-space: nowrap; +} + +table.classindex +{ + margin: 10px; + white-space: nowrap; + margin-left: 3%; + margin-right: 3%; + width: 94%; + border: 0; + border-spacing: 0; + padding: 0; +} + +div.ingroups +{ + font-size: 8pt; + width: 50%; + text-align: left; +} + +div.ingroups a +{ + white-space: nowrap; +} + +div.header +{ + background-image: var(--header-gradient-image); + background-repeat:repeat-x; + background-color: var(--header-background-color); + margin: 0px; + border-bottom: 1px solid var(--header-separator-color); +} + +div.headertitle +{ + padding: 5px 5px 5px 10px; +} + +.PageDocRTL-title div.headertitle { + text-align: right; + direction: rtl; +} + +dl { + padding: 0 0 0 0; +} + +/* + +dl.section { + margin-left: 0px; + padding-left: 0px; +} + +dl.note { + margin-left: -7px; + padding-left: 3px; + border-left: 4px solid; + border-color: #D0C000; +} + +dl.warning, dl.attention, dl.important { + margin-left: -7px; + padding-left: 3px; + border-left: 4px solid; + border-color: #FF0000; +} + +dl.pre, dl.post, dl.invariant { + margin-left: -7px; + padding-left: 3px; + border-left: 4px solid; + border-color: #00D000; +} + +dl.deprecated { + margin-left: -7px; + padding-left: 3px; + border-left: 4px solid; + border-color: #505050; +} + +dl.todo { + margin-left: -7px; + padding-left: 3px; + border-left: 4px solid; + border-color: #00C0E0; +} + +dl.test { + margin-left: -7px; + padding-left: 3px; + border-left: 4px solid; + border-color: #3030E0; +} + +dl.bug { + margin-left: -7px; + padding-left: 3px; + border-left: 4px solid; + border-color: #C08050; +} + +*/ + +dl.bug dt a, dl.deprecated dt a, dl.todo dt a, dl.test a { + font-weight: bold !important; +} + +dl.warning, dl.attention, dl.important, dl.note, dl.deprecated, dl.bug, +dl.invariant, dl.pre, dl.post, dl.todo, dl.test, dl.remark { + padding: 10px; + margin: 10px 0px; + overflow: hidden; + margin-left: 0; + border-radius: 4px; +} + +dl.section dd { + margin-bottom: 2px; +} + +dl.warning, dl.attention, dl.important { + background: var(--warning-color-bg); + border-left: 8px solid var(--warning-color-hl); + color: var(--warning-color-text); +} + +dl.warning dt, dl.attention dt, dl.important dt { + color: var(--warning-color-hl); +} + +dl.note, dl.remark { + background: var(--note-color-bg); + border-left: 8px solid var(--note-color-hl); + color: var(--note-color-text); +} + +dl.note dt, dl.remark dt { + color: var(--note-color-hl); +} + +dl.todo { + background: var(--todo-color-bg); + border-left: 8px solid var(--todo-color-hl); + color: var(--todo-color-text); +} + +dl.todo dt { + color: var(--todo-color-hl); +} + +dl.test { + background: var(--test-color-bg); + border-left: 8px solid var(--test-color-hl); + color: var(--test-color-text); +} + +dl.test dt { + color: var(--test-color-hl); +} + +dl.bug dt a { + color: var(--bug-color-hl) !important; +} + +dl.bug { + background: var(--bug-color-bg); + border-left: 8px solid var(--bug-color-hl); + color: var(--bug-color-text); +} + +dl.bug dt a { + color: var(--bug-color-hl) !important; +} + +dl.deprecated { + background: var(--deprecated-color-bg); + border-left: 8px solid var(--deprecated-color-hl); + color: var(--deprecated-color-text); +} + +dl.deprecated dt a { + color: var(--deprecated-color-hl) !important; +} + +dl.note dd, dl.warning dd, dl.pre dd, dl.post dd, +dl.remark dd, dl.attention dd, dl.important dd, dl.invariant dd, +dl.bug dd, dl.deprecated dd, dl.todo dd, dl.test dd { + margin-inline-start: 0px; +} + +dl.invariant, dl.pre, dl.post { + background: var(--invariant-color-bg); + border-left: 8px solid var(--invariant-color-hl); + color: var(--invariant-color-text); +} + +dl.invariant dt, dl.pre dt, dl.post dt { + color: var(--invariant-color-hl); +} + + +#projectrow +{ + height: 56px; +} + +#projectlogo +{ + text-align: center; + vertical-align: bottom; + border-collapse: separate; +} + +#projectlogo img +{ + border: 0px none; +} + +#projectalign +{ + vertical-align: middle; + padding-left: 0.5em; +} + +#projectname +{ + font-size: 200%; + font-family: var(--font-family-title); + margin: 0px; + padding: 2px 0px; +} + +#projectbrief +{ + font-size: 90%; + font-family: var(--font-family-title); + margin: 0px; + padding: 0px; +} + +#projectnumber +{ + font-size: 50%; + font-family: 50% var(--font-family-title); + margin: 0px; + padding: 0px; +} + +#titlearea +{ + padding: 0px; + margin: 0px; + width: 100%; + border-bottom: 1px solid var(--title-separator-color); + background-color: var(--title-background-color); +} + +.image +{ + text-align: center; +} + +.dotgraph +{ + text-align: center; +} + +.mscgraph +{ + text-align: center; +} + +.plantumlgraph +{ + text-align: center; +} + +.diagraph +{ + text-align: center; +} + +.caption +{ + font-weight: bold; +} + +dl.citelist { + margin-bottom:50px; +} + +dl.citelist dt { + color:var(--citation-label-color); + float:left; + font-weight:bold; + margin-right:10px; + padding:5px; + text-align:right; + width:52px; +} + +dl.citelist dd { + margin:2px 0 2px 72px; + padding:5px 0; +} + +div.toc { + padding: 14px 25px; + background-color: var(--toc-background-color); + border: 1px solid var(--toc-border-color); + border-radius: 7px 7px 7px 7px; + float: right; + height: auto; + margin: 0 8px 10px 10px; + width: 200px; +} + +div.toc li { + background: var(--toc-down-arrow-image) no-repeat scroll 0 5px transparent; + font: 10px/1.2 var(--font-family-toc); + margin-top: 5px; + padding-left: 10px; + padding-top: 2px; +} + +div.toc h3 { + font: bold 12px/1.2 var(--font-family-toc); + color: var(--toc-header-color); + border-bottom: 0 none; + margin: 0; +} + +div.toc ul { + list-style: none outside none; + border: medium none; + padding: 0px; +} + +div.toc li.level1 { + margin-left: 0px; +} + +div.toc li.level2 { + margin-left: 15px; +} + +div.toc li.level3 { + margin-left: 15px; +} + +div.toc li.level4 { + margin-left: 15px; +} + +span.emoji { + /* font family used at the site: https://unicode.org/emoji/charts/full-emoji-list.html + * font-family: "Noto Color Emoji", "Apple Color Emoji", "Segoe UI Emoji", Times, Symbola, Aegyptus, Code2000, Code2001, Code2002, Musica, serif, LastResort; + */ +} + +span.obfuscator { + display: none; +} + +.inherit_header { + font-weight: bold; + color: var(--inherit-header-color); + cursor: pointer; + -webkit-touch-callout: none; + -webkit-user-select: none; + -khtml-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; +} + +.inherit_header td { + padding: 6px 0px 2px 5px; +} + +.inherit { + display: none; +} + +tr.heading h2 { + margin-top: 12px; + margin-bottom: 4px; +} + +/* tooltip related style info */ + +.ttc { + position: absolute; + display: none; +} + +#powerTip { + cursor: default; + /*white-space: nowrap;*/ + color: var(--tooltip-foreground-color); + background-color: var(--tooltip-background-color); + border: 1px solid var(--tooltip-border-color); + border-radius: 4px 4px 4px 4px; + box-shadow: var(--tooltip-shadow); + display: none; + font-size: smaller; + max-width: 80%; + opacity: 0.9; + padding: 1ex 1em 1em; + position: absolute; + z-index: 2147483647; +} + +#powerTip div.ttdoc { + color: var(--tooltip-doc-color); + font-style: italic; +} + +#powerTip div.ttname a { + font-weight: bold; +} + +#powerTip a { + color: var(--tooltip-link-color); +} + +#powerTip div.ttname { + font-weight: bold; +} + +#powerTip div.ttdeci { + color: var(--tooltip-declaration-color); +} + +#powerTip div { + margin: 0px; + padding: 0px; + font-size: 12px; + font-family: var(--font-family-tooltip); + line-height: 16px; +} + +#powerTip:before, #powerTip:after { + content: ""; + position: absolute; + margin: 0px; +} + +#powerTip.n:after, #powerTip.n:before, +#powerTip.s:after, #powerTip.s:before, +#powerTip.w:after, #powerTip.w:before, +#powerTip.e:after, #powerTip.e:before, +#powerTip.ne:after, #powerTip.ne:before, +#powerTip.se:after, #powerTip.se:before, +#powerTip.nw:after, #powerTip.nw:before, +#powerTip.sw:after, #powerTip.sw:before { + border: solid transparent; + content: " "; + height: 0; + width: 0; + position: absolute; +} + +#powerTip.n:after, #powerTip.s:after, +#powerTip.w:after, #powerTip.e:after, +#powerTip.nw:after, #powerTip.ne:after, +#powerTip.sw:after, #powerTip.se:after { + border-color: rgba(255, 255, 255, 0); +} + +#powerTip.n:before, #powerTip.s:before, +#powerTip.w:before, #powerTip.e:before, +#powerTip.nw:before, #powerTip.ne:before, +#powerTip.sw:before, #powerTip.se:before { + border-color: rgba(128, 128, 128, 0); +} + +#powerTip.n:after, #powerTip.n:before, +#powerTip.ne:after, #powerTip.ne:before, +#powerTip.nw:after, #powerTip.nw:before { + top: 100%; +} + +#powerTip.n:after, #powerTip.ne:after, #powerTip.nw:after { + border-top-color: var(--tooltip-background-color); + border-width: 10px; + margin: 0px -10px; +} +#powerTip.n:before, #powerTip.ne:before, #powerTip.nw:before { + border-top-color: var(--tooltip-border-color); + border-width: 11px; + margin: 0px -11px; +} +#powerTip.n:after, #powerTip.n:before { + left: 50%; +} + +#powerTip.nw:after, #powerTip.nw:before { + right: 14px; +} + +#powerTip.ne:after, #powerTip.ne:before { + left: 14px; +} + +#powerTip.s:after, #powerTip.s:before, +#powerTip.se:after, #powerTip.se:before, +#powerTip.sw:after, #powerTip.sw:before { + bottom: 100%; +} + +#powerTip.s:after, #powerTip.se:after, #powerTip.sw:after { + border-bottom-color: var(--tooltip-background-color); + border-width: 10px; + margin: 0px -10px; +} + +#powerTip.s:before, #powerTip.se:before, #powerTip.sw:before { + border-bottom-color: var(--tooltip-border-color); + border-width: 11px; + margin: 0px -11px; +} + +#powerTip.s:after, #powerTip.s:before { + left: 50%; +} + +#powerTip.sw:after, #powerTip.sw:before { + right: 14px; +} + +#powerTip.se:after, #powerTip.se:before { + left: 14px; +} + +#powerTip.e:after, #powerTip.e:before { + left: 100%; +} +#powerTip.e:after { + border-left-color: var(--tooltip-border-color); + border-width: 10px; + top: 50%; + margin-top: -10px; +} +#powerTip.e:before { + border-left-color: var(--tooltip-border-color); + border-width: 11px; + top: 50%; + margin-top: -11px; +} + +#powerTip.w:after, #powerTip.w:before { + right: 100%; +} +#powerTip.w:after { + border-right-color: var(--tooltip-border-color); + border-width: 10px; + top: 50%; + margin-top: -10px; +} +#powerTip.w:before { + border-right-color: var(--tooltip-border-color); + border-width: 11px; + top: 50%; + margin-top: -11px; +} + +@media print +{ + #top { display: none; } + #side-nav { display: none; } + #nav-path { display: none; } + body { overflow:visible; } + h1, h2, h3, h4, h5, h6 { page-break-after: avoid; } + .summary { display: none; } + .memitem { page-break-inside: avoid; } + #doc-content + { + margin-left:0 !important; + height:auto !important; + width:auto !important; + overflow:inherit; + display:inline; + } +} + +/* @group Markdown */ + +table.markdownTable { + border-collapse:collapse; + margin-top: 4px; + margin-bottom: 4px; +} + +table.markdownTable td, table.markdownTable th { + border: 1px solid var(--table-cell-border-color); + padding: 3px 7px 2px; +} + +table.markdownTable tr { +} + +th.markdownTableHeadLeft, th.markdownTableHeadRight, th.markdownTableHeadCenter, th.markdownTableHeadNone { + background-color: var(--table-header-background-color); + color: var(--table-header-foreground-color); + font-size: 110%; + padding-bottom: 4px; + padding-top: 5px; +} + +th.markdownTableHeadLeft, td.markdownTableBodyLeft { + text-align: left +} + +th.markdownTableHeadRight, td.markdownTableBodyRight { + text-align: right +} + +th.markdownTableHeadCenter, td.markdownTableBodyCenter { + text-align: center +} + +tt, code, kbd, samp +{ + display: inline-block; +} +/* @end */ + +u { + text-decoration: underline; +} + +details>summary { + list-style-type: none; +} + +details > summary::-webkit-details-marker { + display: none; +} + +details>summary::before { + content: "\25ba"; + padding-right:4px; + font-size: 80%; +} + +details[open]>summary::before { + content: "\25bc"; + padding-right:4px; + font-size: 80%; +} + +body { + scrollbar-color: var(--scrollbar-thumb-color) var(--scrollbar-background-color); +} + +::-webkit-scrollbar { + background-color: var(--scrollbar-background-color); + height: 12px; + width: 12px; +} +::-webkit-scrollbar-thumb { + border-radius: 6px; + box-shadow: inset 0 0 12px 12px var(--scrollbar-thumb-color); + border: solid 2px transparent; +} +::-webkit-scrollbar-corner { + background-color: var(--scrollbar-background-color); +} + diff --git a/Documentation/html/doxygen.svg b/Documentation/html/doxygen.svg new file mode 100644 index 0000000..79a7635 --- /dev/null +++ b/Documentation/html/doxygen.svg @@ -0,0 +1,28 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Documentation/html/doxygen_crawl.html b/Documentation/html/doxygen_crawl.html new file mode 100644 index 0000000..33a16f6 --- /dev/null +++ b/Documentation/html/doxygen_crawl.html @@ -0,0 +1,227 @@ + + + +Validator / crawler helper + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Documentation/html/dynsections.js b/Documentation/html/dynsections.js new file mode 100644 index 0000000..b05f4c8 --- /dev/null +++ b/Documentation/html/dynsections.js @@ -0,0 +1,198 @@ +/* + @licstart The following is the entire license notice for the JavaScript code in this file. + + The MIT License (MIT) + + Copyright (C) 1997-2020 by Dimitri van Heesch + + Permission is hereby granted, free of charge, to any person obtaining a copy of this software + and associated documentation files (the "Software"), to deal in the Software without restriction, + including without limitation the rights to use, copy, modify, merge, publish, distribute, + sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all copies or + substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING + BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, + DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + @licend The above is the entire license notice for the JavaScript code in this file + */ + +function toggleVisibility(linkObj) { + return dynsection.toggleVisibility(linkObj); +} + +let dynsection = { + + // helper function + updateStripes : function() { + $('table.directory tr'). + removeClass('even').filter(':visible:even').addClass('even'); + $('table.directory tr'). + removeClass('odd').filter(':visible:odd').addClass('odd'); + }, + + toggleVisibility : function(linkObj) { + const base = $(linkObj).attr('id'); + const summary = $('#'+base+'-summary'); + const content = $('#'+base+'-content'); + const trigger = $('#'+base+'-trigger'); + const src=$(trigger).attr('src'); + if (content.is(':visible')===true) { + content.hide(); + summary.show(); + $(linkObj).addClass('closed').removeClass('opened'); + $(trigger).attr('src',src.substring(0,src.length-8)+'closed.png'); + } else { + content.show(); + summary.hide(); + $(linkObj).removeClass('closed').addClass('opened'); + $(trigger).attr('src',src.substring(0,src.length-10)+'open.png'); + } + return false; + }, + + toggleLevel : function(level) { + $('table.directory tr').each(function() { + const l = this.id.split('_').length-1; + const i = $('#img'+this.id.substring(3)); + const a = $('#arr'+this.id.substring(3)); + if (l'); + // add vertical lines to other rows + $('span[class=lineno]').not(':eq(0)').append(''); + // add toggle controls to lines with fold divs + $('div[class=foldopen]').each(function() { + // extract specific id to use + const id = $(this).attr('id').replace('foldopen',''); + // extract start and end foldable fragment attributes + const start = $(this).attr('data-start'); + const end = $(this).attr('data-end'); + // replace normal fold span with controls for the first line of a foldable fragment + $(this).find('span[class=fold]:first').replaceWith(''); + // append div for folded (closed) representation + $(this).after(''); + // extract the first line from the "open" section to represent closed content + const line = $(this).children().first().clone(); + // remove any glow that might still be active on the original line + $(line).removeClass('glow'); + if (start) { + // if line already ends with a start marker (e.g. trailing {), remove it + $(line).html($(line).html().replace(new RegExp('\\s*'+start+'\\s*$','g'),'')); + } + // replace minus with plus symbol + $(line).find('span[class=fold]').css('background-image',codefold.plusImg[relPath]); + // append ellipsis + $(line).append(' '+start+''+end); + // insert constructed line into closed div + $('#foldclosed'+id).html(line); + }); + }, +}; +/* @license-end */ diff --git a/Documentation/html/files.html b/Documentation/html/files.html new file mode 100644 index 0000000..b0f89af --- /dev/null +++ b/Documentation/html/files.html @@ -0,0 +1,123 @@ + + + + + + + +OpenShaderDesigner: File List + + + + + + + + + + + + + +
+
+ + + + + + +
+
OpenShaderDesigner 0.0.1 +
+
+
+ + + + + + + + +
+
+ + +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+
File List
+
+
+
Here is a list of all documented files with brief descriptions:
+
[detail level 1234]
+ + + + + + + + + + + + + + + + + + + + + + +
  Include
  Core
 Console.h
 Engine.h
 EventSystem.h
 Renderer.h
 Window.h
  Editor
 ConsoleWindow.h
 EditorSystem.h
 EditorWindow.h
 Profiler.h
  Graph
  Nodes
 Math.h
 ShaderGraph.h
  OpenGL
 BufferObject.h
 Enum.h
 Type.h
  Utility
 Timer.h
+
+
+ + +
+ + diff --git a/Documentation/html/folderclosed.svg b/Documentation/html/folderclosed.svg new file mode 100644 index 0000000..b04bed2 --- /dev/null +++ b/Documentation/html/folderclosed.svg @@ -0,0 +1,11 @@ + + + + + + + + + + diff --git a/Documentation/html/folderclosedd.svg b/Documentation/html/folderclosedd.svg new file mode 100644 index 0000000..52f0166 --- /dev/null +++ b/Documentation/html/folderclosedd.svg @@ -0,0 +1,11 @@ + + + + + + + + + + diff --git a/Documentation/html/folderopen.svg b/Documentation/html/folderopen.svg new file mode 100644 index 0000000..f6896dd --- /dev/null +++ b/Documentation/html/folderopen.svg @@ -0,0 +1,17 @@ + + + + + + + + + + diff --git a/Documentation/html/folderopend.svg b/Documentation/html/folderopend.svg new file mode 100644 index 0000000..2d1f06e --- /dev/null +++ b/Documentation/html/folderopend.svg @@ -0,0 +1,12 @@ + + + + + + + + + + + diff --git a/Documentation/html/functions.html b/Documentation/html/functions.html new file mode 100644 index 0000000..eb7cea6 --- /dev/null +++ b/Documentation/html/functions.html @@ -0,0 +1,176 @@ + + + + + + + +OpenShaderDesigner: Class Members + + + + + + + + + + + + + +
+
+ + + + + + +
+
OpenShaderDesigner 0.0.1 +
+
+
+ + + + + + + + +
+
+ + +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+
Here is a list of all documented class members with links to the class documentation for each member:
+ +

- b -

+ + +

- c -

+ + +

- d -

+ + +

- g -

+ + +

- h -

+ + +

- i -

+ + +

- l -

+ + +

- o -

+ + +

- p -

+ + +

- r -

+ + +

- s -

+ + +

- t -

+ + +

- u -

+ + +

- ~ -

+
+ + +
+ + diff --git a/Documentation/html/functions_enum.html b/Documentation/html/functions_enum.html new file mode 100644 index 0000000..ee12404 --- /dev/null +++ b/Documentation/html/functions_enum.html @@ -0,0 +1,98 @@ + + + + + + + +OpenShaderDesigner: Class Members - Enumerations + + + + + + + + + + + + + +
+
+ + + + + + +
+
OpenShaderDesigner 0.0.1 +
+
+
+ + + + + + + + +
+
+ + +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+
Here is a list of all documented enums with links to the class documentation for each member:
+
+ + +
+ + diff --git a/Documentation/html/functions_func.html b/Documentation/html/functions_func.html new file mode 100644 index 0000000..2b943cd --- /dev/null +++ b/Documentation/html/functions_func.html @@ -0,0 +1,115 @@ + + + + + + + +OpenShaderDesigner: Class Members - Functions + + + + + + + + + + + + + +
+
+ + + + + + +
+
OpenShaderDesigner 0.0.1 +
+
+
+ + + + + + + + +
+
+ + +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+
Here is a list of all documented functions with links to the class documentation for each member:
+
+ + +
+ + diff --git a/Documentation/html/functions_type.html b/Documentation/html/functions_type.html new file mode 100644 index 0000000..26cf58a --- /dev/null +++ b/Documentation/html/functions_type.html @@ -0,0 +1,97 @@ + + + + + + + +OpenShaderDesigner: Class Members - Typedefs + + + + + + + + + + + + + +
+
+ + + + + + +
+
OpenShaderDesigner 0.0.1 +
+
+
+ + + + + + + + +
+
+ + +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+
Here is a list of all documented typedefs with links to the class documentation for each member:
+
+ + +
+ + diff --git a/Documentation/html/functions_vars.html b/Documentation/html/functions_vars.html new file mode 100644 index 0000000..fe5f33f --- /dev/null +++ b/Documentation/html/functions_vars.html @@ -0,0 +1,100 @@ + + + + + + + +OpenShaderDesigner: Class Members - Variables + + + + + + + + + + + + + +
+
+ + + + + + +
+
OpenShaderDesigner 0.0.1 +
+
+
+ + + + + + + + +
+
+ + +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+
Here is a list of all documented variables with links to the class documentation for each member:
+
+ + +
+ + diff --git a/Documentation/html/globals.html b/Documentation/html/globals.html new file mode 100644 index 0000000..a8c3c8e --- /dev/null +++ b/Documentation/html/globals.html @@ -0,0 +1,100 @@ + + + + + + + +OpenShaderDesigner: File Members + + + + + + + + + + + + + +
+
+ + + + + + +
+
OpenShaderDesigner 0.0.1 +
+
+
+ + + + + + + + +
+
+ + +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+
Here is a list of all documented file members with links to the documentation:
+
+ + +
+ + diff --git a/Documentation/html/globals_type.html b/Documentation/html/globals_type.html new file mode 100644 index 0000000..3f169f6 --- /dev/null +++ b/Documentation/html/globals_type.html @@ -0,0 +1,99 @@ + + + + + + + +OpenShaderDesigner: File Members + + + + + + + + + + + + + +
+
+ + + + + + +
+
OpenShaderDesigner 0.0.1 +
+
+
+ + + + + + + + +
+
+ + +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+
Here is a list of all documented typedefs with links to the documentation:
+
+ + +
+ + diff --git a/Documentation/html/globals_vars.html b/Documentation/html/globals_vars.html new file mode 100644 index 0000000..492f6b5 --- /dev/null +++ b/Documentation/html/globals_vars.html @@ -0,0 +1,97 @@ + + + + + + + +OpenShaderDesigner: File Members + + + + + + + + + + + + + +
+
+ + + + + + +
+
OpenShaderDesigner 0.0.1 +
+
+
+ + + + + + + + +
+
+ + +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+
Here is a list of all documented variables with links to the documentation:
+
+ + +
+ + diff --git a/Documentation/html/hierarchy.html b/Documentation/html/hierarchy.html new file mode 100644 index 0000000..415b414 --- /dev/null +++ b/Documentation/html/hierarchy.html @@ -0,0 +1,128 @@ + + + + + + + +OpenShaderDesigner: Class Hierarchy + + + + + + + + + + + + + +
+
+ + + + + + +
+
OpenShaderDesigner 0.0.1 +
+
+
+ + + + + + + + +
+
+ + +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+
Class Hierarchy
+
+
+
This inheritance list is sorted roughly, but not completely, alphabetically:
+
+ + +
+ + diff --git a/Documentation/html/index.html b/Documentation/html/index.html new file mode 100644 index 0000000..3737b1f --- /dev/null +++ b/Documentation/html/index.html @@ -0,0 +1,98 @@ + + + + + + + +OpenShaderDesigner: Main Page + + + + + + + + + + + + + +
+
+ + + + + + +
+
OpenShaderDesigner 0.0.1 +
+
+
+ + + + + + + + +
+
+ + +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+
OpenShaderDesigner Documentation
+
+
+ +
+ + +
+ + diff --git a/Documentation/html/jquery.js b/Documentation/html/jquery.js new file mode 100644 index 0000000..1dffb65 --- /dev/null +++ b/Documentation/html/jquery.js @@ -0,0 +1,34 @@ +/*! jQuery v3.6.0 | (c) OpenJS Foundation and other contributors | jquery.org/license */ +!function(e,t){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(C,e){"use strict";var t=[],r=Object.getPrototypeOf,s=t.slice,g=t.flat?function(e){return t.flat.call(e)}:function(e){return t.concat.apply([],e)},u=t.push,i=t.indexOf,n={},o=n.toString,v=n.hasOwnProperty,a=v.toString,l=a.call(Object),y={},m=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType&&"function"!=typeof e.item},x=function(e){return null!=e&&e===e.window},E=C.document,c={type:!0,src:!0,nonce:!0,noModule:!0};function b(e,t,n){var r,i,o=(n=n||E).createElement("script");if(o.text=e,t)for(r in c)(i=t[r]||t.getAttribute&&t.getAttribute(r))&&o.setAttribute(r,i);n.head.appendChild(o).parentNode.removeChild(o)}function w(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?n[o.call(e)]||"object":typeof e}var f="3.6.0",S=function(e,t){return new S.fn.init(e,t)};function p(e){var t=!!e&&"length"in e&&e.length,n=w(e);return!m(e)&&!x(e)&&("array"===n||0===t||"number"==typeof t&&0+~]|"+M+")"+M+"*"),U=new RegExp(M+"|>"),X=new RegExp(F),V=new RegExp("^"+I+"$"),G={ID:new RegExp("^#("+I+")"),CLASS:new RegExp("^\\.("+I+")"),TAG:new RegExp("^("+I+"|[*])"),ATTR:new RegExp("^"+W),PSEUDO:new RegExp("^"+F),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+M+"*(even|odd|(([+-]|)(\\d*)n|)"+M+"*(?:([+-]|)"+M+"*(\\d+)|))"+M+"*\\)|)","i"),bool:new RegExp("^(?:"+R+")$","i"),needsContext:new RegExp("^"+M+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+M+"*((?:-\\d)?\\d*)"+M+"*\\)|)(?=[^-]|$)","i")},Y=/HTML$/i,Q=/^(?:input|select|textarea|button)$/i,J=/^h\d$/i,K=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ee=/[+~]/,te=new RegExp("\\\\[\\da-fA-F]{1,6}"+M+"?|\\\\([^\\r\\n\\f])","g"),ne=function(e,t){var n="0x"+e.slice(1)-65536;return t||(n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320))},re=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,ie=function(e,t){return t?"\0"===e?"\ufffd":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},oe=function(){T()},ae=be(function(e){return!0===e.disabled&&"fieldset"===e.nodeName.toLowerCase()},{dir:"parentNode",next:"legend"});try{H.apply(t=O.call(p.childNodes),p.childNodes),t[p.childNodes.length].nodeType}catch(e){H={apply:t.length?function(e,t){L.apply(e,O.call(t))}:function(e,t){var n=e.length,r=0;while(e[n++]=t[r++]);e.length=n-1}}}function se(t,e,n,r){var i,o,a,s,u,l,c,f=e&&e.ownerDocument,p=e?e.nodeType:9;if(n=n||[],"string"!=typeof t||!t||1!==p&&9!==p&&11!==p)return n;if(!r&&(T(e),e=e||C,E)){if(11!==p&&(u=Z.exec(t)))if(i=u[1]){if(9===p){if(!(a=e.getElementById(i)))return n;if(a.id===i)return n.push(a),n}else if(f&&(a=f.getElementById(i))&&y(e,a)&&a.id===i)return n.push(a),n}else{if(u[2])return H.apply(n,e.getElementsByTagName(t)),n;if((i=u[3])&&d.getElementsByClassName&&e.getElementsByClassName)return H.apply(n,e.getElementsByClassName(i)),n}if(d.qsa&&!N[t+" "]&&(!v||!v.test(t))&&(1!==p||"object"!==e.nodeName.toLowerCase())){if(c=t,f=e,1===p&&(U.test(t)||z.test(t))){(f=ee.test(t)&&ye(e.parentNode)||e)===e&&d.scope||((s=e.getAttribute("id"))?s=s.replace(re,ie):e.setAttribute("id",s=S)),o=(l=h(t)).length;while(o--)l[o]=(s?"#"+s:":scope")+" "+xe(l[o]);c=l.join(",")}try{return H.apply(n,f.querySelectorAll(c)),n}catch(e){N(t,!0)}finally{s===S&&e.removeAttribute("id")}}}return g(t.replace($,"$1"),e,n,r)}function ue(){var r=[];return function e(t,n){return r.push(t+" ")>b.cacheLength&&delete e[r.shift()],e[t+" "]=n}}function le(e){return e[S]=!0,e}function ce(e){var t=C.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function fe(e,t){var n=e.split("|"),r=n.length;while(r--)b.attrHandle[n[r]]=t}function pe(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(r)return r;if(n)while(n=n.nextSibling)if(n===t)return-1;return e?1:-1}function de(t){return function(e){return"input"===e.nodeName.toLowerCase()&&e.type===t}}function he(n){return function(e){var t=e.nodeName.toLowerCase();return("input"===t||"button"===t)&&e.type===n}}function ge(t){return function(e){return"form"in e?e.parentNode&&!1===e.disabled?"label"in e?"label"in e.parentNode?e.parentNode.disabled===t:e.disabled===t:e.isDisabled===t||e.isDisabled!==!t&&ae(e)===t:e.disabled===t:"label"in e&&e.disabled===t}}function ve(a){return le(function(o){return o=+o,le(function(e,t){var n,r=a([],e.length,o),i=r.length;while(i--)e[n=r[i]]&&(e[n]=!(t[n]=e[n]))})})}function ye(e){return e&&"undefined"!=typeof e.getElementsByTagName&&e}for(e in d=se.support={},i=se.isXML=function(e){var t=e&&e.namespaceURI,n=e&&(e.ownerDocument||e).documentElement;return!Y.test(t||n&&n.nodeName||"HTML")},T=se.setDocument=function(e){var t,n,r=e?e.ownerDocument||e:p;return r!=C&&9===r.nodeType&&r.documentElement&&(a=(C=r).documentElement,E=!i(C),p!=C&&(n=C.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",oe,!1):n.attachEvent&&n.attachEvent("onunload",oe)),d.scope=ce(function(e){return a.appendChild(e).appendChild(C.createElement("div")),"undefined"!=typeof e.querySelectorAll&&!e.querySelectorAll(":scope fieldset div").length}),d.attributes=ce(function(e){return e.className="i",!e.getAttribute("className")}),d.getElementsByTagName=ce(function(e){return e.appendChild(C.createComment("")),!e.getElementsByTagName("*").length}),d.getElementsByClassName=K.test(C.getElementsByClassName),d.getById=ce(function(e){return a.appendChild(e).id=S,!C.getElementsByName||!C.getElementsByName(S).length}),d.getById?(b.filter.ID=function(e){var t=e.replace(te,ne);return function(e){return e.getAttribute("id")===t}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n=t.getElementById(e);return n?[n]:[]}}):(b.filter.ID=function(e){var n=e.replace(te,ne);return function(e){var t="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return t&&t.value===n}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n,r,i,o=t.getElementById(e);if(o){if((n=o.getAttributeNode("id"))&&n.value===e)return[o];i=t.getElementsByName(e),r=0;while(o=i[r++])if((n=o.getAttributeNode("id"))&&n.value===e)return[o]}return[]}}),b.find.TAG=d.getElementsByTagName?function(e,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e):d.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){while(n=o[i++])1===n.nodeType&&r.push(n);return r}return o},b.find.CLASS=d.getElementsByClassName&&function(e,t){if("undefined"!=typeof t.getElementsByClassName&&E)return t.getElementsByClassName(e)},s=[],v=[],(d.qsa=K.test(C.querySelectorAll))&&(ce(function(e){var t;a.appendChild(e).innerHTML="",e.querySelectorAll("[msallowcapture^='']").length&&v.push("[*^$]="+M+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||v.push("\\["+M+"*(?:value|"+R+")"),e.querySelectorAll("[id~="+S+"-]").length||v.push("~="),(t=C.createElement("input")).setAttribute("name",""),e.appendChild(t),e.querySelectorAll("[name='']").length||v.push("\\["+M+"*name"+M+"*="+M+"*(?:''|\"\")"),e.querySelectorAll(":checked").length||v.push(":checked"),e.querySelectorAll("a#"+S+"+*").length||v.push(".#.+[+~]"),e.querySelectorAll("\\\f"),v.push("[\\r\\n\\f]")}),ce(function(e){e.innerHTML="";var t=C.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&v.push("name"+M+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&v.push(":enabled",":disabled"),a.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&v.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),v.push(",.*:")})),(d.matchesSelector=K.test(c=a.matches||a.webkitMatchesSelector||a.mozMatchesSelector||a.oMatchesSelector||a.msMatchesSelector))&&ce(function(e){d.disconnectedMatch=c.call(e,"*"),c.call(e,"[s!='']:x"),s.push("!=",F)}),v=v.length&&new RegExp(v.join("|")),s=s.length&&new RegExp(s.join("|")),t=K.test(a.compareDocumentPosition),y=t||K.test(a.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)while(t=t.parentNode)if(t===e)return!0;return!1},j=t?function(e,t){if(e===t)return l=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)==(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!d.sortDetached&&t.compareDocumentPosition(e)===n?e==C||e.ownerDocument==p&&y(p,e)?-1:t==C||t.ownerDocument==p&&y(p,t)?1:u?P(u,e)-P(u,t):0:4&n?-1:1)}:function(e,t){if(e===t)return l=!0,0;var n,r=0,i=e.parentNode,o=t.parentNode,a=[e],s=[t];if(!i||!o)return e==C?-1:t==C?1:i?-1:o?1:u?P(u,e)-P(u,t):0;if(i===o)return pe(e,t);n=e;while(n=n.parentNode)a.unshift(n);n=t;while(n=n.parentNode)s.unshift(n);while(a[r]===s[r])r++;return r?pe(a[r],s[r]):a[r]==p?-1:s[r]==p?1:0}),C},se.matches=function(e,t){return se(e,null,null,t)},se.matchesSelector=function(e,t){if(T(e),d.matchesSelector&&E&&!N[t+" "]&&(!s||!s.test(t))&&(!v||!v.test(t)))try{var n=c.call(e,t);if(n||d.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(e){N(t,!0)}return 0":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(te,ne),e[3]=(e[3]||e[4]||e[5]||"").replace(te,ne),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||se.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&se.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return G.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&X.test(n)&&(t=h(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(te,ne).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=m[e+" "];return t||(t=new RegExp("(^|"+M+")"+e+"("+M+"|$)"))&&m(e,function(e){return t.test("string"==typeof e.className&&e.className||"undefined"!=typeof e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(n,r,i){return function(e){var t=se.attr(e,n);return null==t?"!="===r:!r||(t+="","="===r?t===i:"!="===r?t!==i:"^="===r?i&&0===t.indexOf(i):"*="===r?i&&-1:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function j(e,n,r){return m(n)?S.grep(e,function(e,t){return!!n.call(e,t,e)!==r}):n.nodeType?S.grep(e,function(e){return e===n!==r}):"string"!=typeof n?S.grep(e,function(e){return-1)[^>]*|#([\w-]+))$/;(S.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||D,"string"==typeof e){if(!(r="<"===e[0]&&">"===e[e.length-1]&&3<=e.length?[null,e,null]:q.exec(e))||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof S?t[0]:t,S.merge(this,S.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:E,!0)),N.test(r[1])&&S.isPlainObject(t))for(r in t)m(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return(i=E.getElementById(r[2]))&&(this[0]=i,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):m(e)?void 0!==n.ready?n.ready(e):e(S):S.makeArray(e,this)}).prototype=S.fn,D=S(E);var L=/^(?:parents|prev(?:Until|All))/,H={children:!0,contents:!0,next:!0,prev:!0};function O(e,t){while((e=e[t])&&1!==e.nodeType);return e}S.fn.extend({has:function(e){var t=S(e,this),n=t.length;return this.filter(function(){for(var e=0;e\x20\t\r\n\f]*)/i,he=/^$|^module$|\/(?:java|ecma)script/i;ce=E.createDocumentFragment().appendChild(E.createElement("div")),(fe=E.createElement("input")).setAttribute("type","radio"),fe.setAttribute("checked","checked"),fe.setAttribute("name","t"),ce.appendChild(fe),y.checkClone=ce.cloneNode(!0).cloneNode(!0).lastChild.checked,ce.innerHTML="",y.noCloneChecked=!!ce.cloneNode(!0).lastChild.defaultValue,ce.innerHTML="",y.option=!!ce.lastChild;var ge={thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};function ve(e,t){var n;return n="undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t||"*"):"undefined"!=typeof e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&A(e,t)?S.merge([e],n):n}function ye(e,t){for(var n=0,r=e.length;n",""]);var me=/<|&#?\w+;/;function xe(e,t,n,r,i){for(var o,a,s,u,l,c,f=t.createDocumentFragment(),p=[],d=0,h=e.length;d\s*$/g;function je(e,t){return A(e,"table")&&A(11!==t.nodeType?t:t.firstChild,"tr")&&S(e).children("tbody")[0]||e}function De(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function qe(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Le(e,t){var n,r,i,o,a,s;if(1===t.nodeType){if(Y.hasData(e)&&(s=Y.get(e).events))for(i in Y.remove(t,"handle events"),s)for(n=0,r=s[i].length;n").attr(n.scriptAttrs||{}).prop({charset:n.scriptCharset,src:n.url}).on("load error",i=function(e){r.remove(),i=null,e&&t("error"===e.type?404:200,e.type)}),E.head.appendChild(r[0])},abort:function(){i&&i()}}});var _t,zt=[],Ut=/(=)\?(?=&|$)|\?\?/;S.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=zt.pop()||S.expando+"_"+wt.guid++;return this[e]=!0,e}}),S.ajaxPrefilter("json jsonp",function(e,t,n){var r,i,o,a=!1!==e.jsonp&&(Ut.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&Ut.test(e.data)&&"data");if(a||"jsonp"===e.dataTypes[0])return r=e.jsonpCallback=m(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,a?e[a]=e[a].replace(Ut,"$1"+r):!1!==e.jsonp&&(e.url+=(Tt.test(e.url)?"&":"?")+e.jsonp+"="+r),e.converters["script json"]=function(){return o||S.error(r+" was not called"),o[0]},e.dataTypes[0]="json",i=C[r],C[r]=function(){o=arguments},n.always(function(){void 0===i?S(C).removeProp(r):C[r]=i,e[r]&&(e.jsonpCallback=t.jsonpCallback,zt.push(r)),o&&m(i)&&i(o[0]),o=i=void 0}),"script"}),y.createHTMLDocument=((_t=E.implementation.createHTMLDocument("").body).innerHTML="
",2===_t.childNodes.length),S.parseHTML=function(e,t,n){return"string"!=typeof e?[]:("boolean"==typeof t&&(n=t,t=!1),t||(y.createHTMLDocument?((r=(t=E.implementation.createHTMLDocument("")).createElement("base")).href=E.location.href,t.head.appendChild(r)):t=E),o=!n&&[],(i=N.exec(e))?[t.createElement(i[1])]:(i=xe([e],t,o),o&&o.length&&S(o).remove(),S.merge([],i.childNodes)));var r,i,o},S.fn.load=function(e,t,n){var r,i,o,a=this,s=e.indexOf(" ");return-1").append(S.parseHTML(e)).find(r):e)}).always(n&&function(e,t){a.each(function(){n.apply(this,o||[e.responseText,t,e])})}),this},S.expr.pseudos.animated=function(t){return S.grep(S.timers,function(e){return t===e.elem}).length},S.offset={setOffset:function(e,t,n){var r,i,o,a,s,u,l=S.css(e,"position"),c=S(e),f={};"static"===l&&(e.style.position="relative"),s=c.offset(),o=S.css(e,"top"),u=S.css(e,"left"),("absolute"===l||"fixed"===l)&&-1<(o+u).indexOf("auto")?(a=(r=c.position()).top,i=r.left):(a=parseFloat(o)||0,i=parseFloat(u)||0),m(t)&&(t=t.call(e,n,S.extend({},s))),null!=t.top&&(f.top=t.top-s.top+a),null!=t.left&&(f.left=t.left-s.left+i),"using"in t?t.using.call(e,f):c.css(f)}},S.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each(function(e){S.offset.setOffset(this,t,e)});var e,n,r=this[0];return r?r.getClientRects().length?(e=r.getBoundingClientRect(),n=r.ownerDocument.defaultView,{top:e.top+n.pageYOffset,left:e.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,n,r=this[0],i={top:0,left:0};if("fixed"===S.css(r,"position"))t=r.getBoundingClientRect();else{t=this.offset(),n=r.ownerDocument,e=r.offsetParent||n.documentElement;while(e&&(e===n.body||e===n.documentElement)&&"static"===S.css(e,"position"))e=e.parentNode;e&&e!==r&&1===e.nodeType&&((i=S(e).offset()).top+=S.css(e,"borderTopWidth",!0),i.left+=S.css(e,"borderLeftWidth",!0))}return{top:t.top-i.top-S.css(r,"marginTop",!0),left:t.left-i.left-S.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var e=this.offsetParent;while(e&&"static"===S.css(e,"position"))e=e.offsetParent;return e||re})}}),S.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,i){var o="pageYOffset"===i;S.fn[t]=function(e){return $(this,function(e,t,n){var r;if(x(e)?r=e:9===e.nodeType&&(r=e.defaultView),void 0===n)return r?r[i]:e[t];r?r.scrollTo(o?r.pageXOffset:n,o?n:r.pageYOffset):e[t]=n},t,e,arguments.length)}}),S.each(["top","left"],function(e,n){S.cssHooks[n]=Fe(y.pixelPosition,function(e,t){if(t)return t=We(e,n),Pe.test(t)?S(e).position()[n]+"px":t})}),S.each({Height:"height",Width:"width"},function(a,s){S.each({padding:"inner"+a,content:s,"":"outer"+a},function(r,o){S.fn[o]=function(e,t){var n=arguments.length&&(r||"boolean"!=typeof e),i=r||(!0===e||!0===t?"margin":"border");return $(this,function(e,t,n){var r;return x(e)?0===o.indexOf("outer")?e["inner"+a]:e.document.documentElement["client"+a]:9===e.nodeType?(r=e.documentElement,Math.max(e.body["scroll"+a],r["scroll"+a],e.body["offset"+a],r["offset"+a],r["client"+a])):void 0===n?S.css(e,t,i):S.style(e,t,n,i)},s,n?e:void 0,n)}})}),S.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){S.fn[t]=function(e){return this.on(t,e)}}),S.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)},hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),S.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(e,n){S.fn[n]=function(e,t){return 0",options:{classes:{},disabled:!1,create:null},_createWidget:function(t,e){e=y(e||this.defaultElement||this)[0],this.element=y(e),this.uuid=i++,this.eventNamespace="."+this.widgetName+this.uuid,this.bindings=y(),this.hoverable=y(),this.focusable=y(),this.classesElementLookup={},e!==this&&(y.data(e,this.widgetFullName,this),this._on(!0,this.element,{remove:function(t){t.target===e&&this.destroy()}}),this.document=y(e.style?e.ownerDocument:e.document||e),this.window=y(this.document[0].defaultView||this.document[0].parentWindow)),this.options=y.widget.extend({},this.options,this._getCreateOptions(),t),this._create(),this.options.disabled&&this._setOptionDisabled(this.options.disabled),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:function(){return{}},_getCreateEventData:y.noop,_create:y.noop,_init:y.noop,destroy:function(){var i=this;this._destroy(),y.each(this.classesElementLookup,function(t,e){i._removeClass(e,t)}),this.element.off(this.eventNamespace).removeData(this.widgetFullName),this.widget().off(this.eventNamespace).removeAttr("aria-disabled"),this.bindings.off(this.eventNamespace)},_destroy:y.noop,widget:function(){return this.element},option:function(t,e){var i,s,n,o=t;if(0===arguments.length)return y.widget.extend({},this.options);if("string"==typeof t)if(o={},t=(i=t.split(".")).shift(),i.length){for(s=o[t]=y.widget.extend({},this.options[t]),n=0;n
"),i=e.children()[0];return y("body").append(e),t=i.offsetWidth,e.css("overflow","scroll"),t===(i=i.offsetWidth)&&(i=e[0].clientWidth),e.remove(),s=t-i},getScrollInfo:function(t){var e=t.isWindow||t.isDocument?"":t.element.css("overflow-x"),i=t.isWindow||t.isDocument?"":t.element.css("overflow-y"),e="scroll"===e||"auto"===e&&t.widthx(D(s),D(n))?o.important="horizontal":o.important="vertical",p.using.call(this,t,o)}),h.offset(y.extend(l,{using:t}))})},y.ui.position={fit:{left:function(t,e){var i=e.within,s=i.isWindow?i.scrollLeft:i.offset.left,n=i.width,o=t.left-e.collisionPosition.marginLeft,h=s-o,a=o+e.collisionWidth-n-s;e.collisionWidth>n?0n?0=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return!0}}),y.ui.plugin={add:function(t,e,i){var s,n=y.ui[t].prototype;for(s in i)n.plugins[s]=n.plugins[s]||[],n.plugins[s].push([e,i[s]])},call:function(t,e,i,s){var n,o=t.plugins[e];if(o&&(s||t.element[0].parentNode&&11!==t.element[0].parentNode.nodeType))for(n=0;n").css({overflow:"hidden",position:this.element.css("position"),width:this.element.outerWidth(),height:this.element.outerHeight(),top:this.element.css("top"),left:this.element.css("left")})),this.element=this.element.parent().data("ui-resizable",this.element.resizable("instance")),this.elementIsWrapper=!0,t={marginTop:this.originalElement.css("marginTop"),marginRight:this.originalElement.css("marginRight"),marginBottom:this.originalElement.css("marginBottom"),marginLeft:this.originalElement.css("marginLeft")},this.element.css(t),this.originalElement.css("margin",0),this.originalResizeStyle=this.originalElement.css("resize"),this.originalElement.css("resize","none"),this._proportionallyResizeElements.push(this.originalElement.css({position:"static",zoom:1,display:"block"})),this.originalElement.css(t),this._proportionallyResize()),this._setupHandles(),e.autoHide&&y(this.element).on("mouseenter",function(){e.disabled||(i._removeClass("ui-resizable-autohide"),i._handles.show())}).on("mouseleave",function(){e.disabled||i.resizing||(i._addClass("ui-resizable-autohide"),i._handles.hide())}),this._mouseInit()},_destroy:function(){this._mouseDestroy(),this._addedHandles.remove();function t(t){y(t).removeData("resizable").removeData("ui-resizable").off(".resizable")}var e;return this.elementIsWrapper&&(t(this.element),e=this.element,this.originalElement.css({position:e.css("position"),width:e.outerWidth(),height:e.outerHeight(),top:e.css("top"),left:e.css("left")}).insertAfter(e),e.remove()),this.originalElement.css("resize",this.originalResizeStyle),t(this.originalElement),this},_setOption:function(t,e){switch(this._super(t,e),t){case"handles":this._removeHandles(),this._setupHandles();break;case"aspectRatio":this._aspectRatio=!!e}},_setupHandles:function(){var t,e,i,s,n,o=this.options,h=this;if(this.handles=o.handles||(y(".ui-resizable-handle",this.element).length?{n:".ui-resizable-n",e:".ui-resizable-e",s:".ui-resizable-s",w:".ui-resizable-w",se:".ui-resizable-se",sw:".ui-resizable-sw",ne:".ui-resizable-ne",nw:".ui-resizable-nw"}:"e,s,se"),this._handles=y(),this._addedHandles=y(),this.handles.constructor===String)for("all"===this.handles&&(this.handles="n,e,s,w,se,sw,ne,nw"),i=this.handles.split(","),this.handles={},e=0;e"),this._addClass(n,"ui-resizable-handle "+s),n.css({zIndex:o.zIndex}),this.handles[t]=".ui-resizable-"+t,this.element.children(this.handles[t]).length||(this.element.append(n),this._addedHandles=this._addedHandles.add(n));this._renderAxis=function(t){var e,i,s;for(e in t=t||this.element,this.handles)this.handles[e].constructor===String?this.handles[e]=this.element.children(this.handles[e]).first().show():(this.handles[e].jquery||this.handles[e].nodeType)&&(this.handles[e]=y(this.handles[e]),this._on(this.handles[e],{mousedown:h._mouseDown})),this.elementIsWrapper&&this.originalElement[0].nodeName.match(/^(textarea|input|select|button)$/i)&&(i=y(this.handles[e],this.element),s=/sw|ne|nw|se|n|s/.test(e)?i.outerHeight():i.outerWidth(),i=["padding",/ne|nw|n/.test(e)?"Top":/se|sw|s/.test(e)?"Bottom":/^e$/.test(e)?"Right":"Left"].join(""),t.css(i,s),this._proportionallyResize()),this._handles=this._handles.add(this.handles[e])},this._renderAxis(this.element),this._handles=this._handles.add(this.element.find(".ui-resizable-handle")),this._handles.disableSelection(),this._handles.on("mouseover",function(){h.resizing||(this.className&&(n=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i)),h.axis=n&&n[1]?n[1]:"se")}),o.autoHide&&(this._handles.hide(),this._addClass("ui-resizable-autohide"))},_removeHandles:function(){this._addedHandles.remove()},_mouseCapture:function(t){var e,i,s=!1;for(e in this.handles)(i=y(this.handles[e])[0])!==t.target&&!y.contains(i,t.target)||(s=!0);return!this.options.disabled&&s},_mouseStart:function(t){var e,i,s=this.options,n=this.element;return this.resizing=!0,this._renderProxy(),e=this._num(this.helper.css("left")),i=this._num(this.helper.css("top")),s.containment&&(e+=y(s.containment).scrollLeft()||0,i+=y(s.containment).scrollTop()||0),this.offset=this.helper.offset(),this.position={left:e,top:i},this.size=this._helper?{width:this.helper.width(),height:this.helper.height()}:{width:n.width(),height:n.height()},this.originalSize=this._helper?{width:n.outerWidth(),height:n.outerHeight()}:{width:n.width(),height:n.height()},this.sizeDiff={width:n.outerWidth()-n.width(),height:n.outerHeight()-n.height()},this.originalPosition={left:e,top:i},this.originalMousePosition={left:t.pageX,top:t.pageY},this.aspectRatio="number"==typeof s.aspectRatio?s.aspectRatio:this.originalSize.width/this.originalSize.height||1,s=y(".ui-resizable-"+this.axis).css("cursor"),y("body").css("cursor","auto"===s?this.axis+"-resize":s),this._addClass("ui-resizable-resizing"),this._propagate("start",t),!0},_mouseDrag:function(t){var e=this.originalMousePosition,i=this.axis,s=t.pageX-e.left||0,e=t.pageY-e.top||0,i=this._change[i];return this._updatePrevProperties(),i&&(e=i.apply(this,[t,s,e]),this._updateVirtualBoundaries(t.shiftKey),(this._aspectRatio||t.shiftKey)&&(e=this._updateRatio(e,t)),e=this._respectSize(e,t),this._updateCache(e),this._propagate("resize",t),e=this._applyChanges(),!this._helper&&this._proportionallyResizeElements.length&&this._proportionallyResize(),y.isEmptyObject(e)||(this._updatePrevProperties(),this._trigger("resize",t,this.ui()),this._applyChanges())),!1},_mouseStop:function(t){this.resizing=!1;var e,i,s,n=this.options,o=this;return this._helper&&(s=(e=(i=this._proportionallyResizeElements).length&&/textarea/i.test(i[0].nodeName))&&this._hasScroll(i[0],"left")?0:o.sizeDiff.height,i=e?0:o.sizeDiff.width,e={width:o.helper.width()-i,height:o.helper.height()-s},i=parseFloat(o.element.css("left"))+(o.position.left-o.originalPosition.left)||null,s=parseFloat(o.element.css("top"))+(o.position.top-o.originalPosition.top)||null,n.animate||this.element.css(y.extend(e,{top:s,left:i})),o.helper.height(o.size.height),o.helper.width(o.size.width),this._helper&&!n.animate&&this._proportionallyResize()),y("body").css("cursor","auto"),this._removeClass("ui-resizable-resizing"),this._propagate("stop",t),this._helper&&this.helper.remove(),!1},_updatePrevProperties:function(){this.prevPosition={top:this.position.top,left:this.position.left},this.prevSize={width:this.size.width,height:this.size.height}},_applyChanges:function(){var t={};return this.position.top!==this.prevPosition.top&&(t.top=this.position.top+"px"),this.position.left!==this.prevPosition.left&&(t.left=this.position.left+"px"),this.size.width!==this.prevSize.width&&(t.width=this.size.width+"px"),this.size.height!==this.prevSize.height&&(t.height=this.size.height+"px"),this.helper.css(t),t},_updateVirtualBoundaries:function(t){var e,i,s=this.options,n={minWidth:this._isNumber(s.minWidth)?s.minWidth:0,maxWidth:this._isNumber(s.maxWidth)?s.maxWidth:1/0,minHeight:this._isNumber(s.minHeight)?s.minHeight:0,maxHeight:this._isNumber(s.maxHeight)?s.maxHeight:1/0};(this._aspectRatio||t)&&(e=n.minHeight*this.aspectRatio,i=n.minWidth/this.aspectRatio,s=n.maxHeight*this.aspectRatio,t=n.maxWidth/this.aspectRatio,e>n.minWidth&&(n.minWidth=e),i>n.minHeight&&(n.minHeight=i),st.width,h=this._isNumber(t.height)&&e.minHeight&&e.minHeight>t.height,a=this.originalPosition.left+this.originalSize.width,r=this.originalPosition.top+this.originalSize.height,l=/sw|nw|w/.test(i),i=/nw|ne|n/.test(i);return o&&(t.width=e.minWidth),h&&(t.height=e.minHeight),s&&(t.width=e.maxWidth),n&&(t.height=e.maxHeight),o&&l&&(t.left=a-e.minWidth),s&&l&&(t.left=a-e.maxWidth),h&&i&&(t.top=r-e.minHeight),n&&i&&(t.top=r-e.maxHeight),t.width||t.height||t.left||!t.top?t.width||t.height||t.top||!t.left||(t.left=null):t.top=null,t},_getPaddingPlusBorderDimensions:function(t){for(var e=0,i=[],s=[t.css("borderTopWidth"),t.css("borderRightWidth"),t.css("borderBottomWidth"),t.css("borderLeftWidth")],n=[t.css("paddingTop"),t.css("paddingRight"),t.css("paddingBottom"),t.css("paddingLeft")];e<4;e++)i[e]=parseFloat(s[e])||0,i[e]+=parseFloat(n[e])||0;return{height:i[0]+i[2],width:i[1]+i[3]}},_proportionallyResize:function(){if(this._proportionallyResizeElements.length)for(var t,e=0,i=this.helper||this.element;e").css({overflow:"hidden"}),this._addClass(this.helper,this._helper),this.helper.css({width:this.element.outerWidth(),height:this.element.outerHeight(),position:"absolute",left:this.elementOffset.left+"px",top:this.elementOffset.top+"px",zIndex:++e.zIndex}),this.helper.appendTo("body").disableSelection()):this.helper=this.element},_change:{e:function(t,e){return{width:this.originalSize.width+e}},w:function(t,e){var i=this.originalSize;return{left:this.originalPosition.left+e,width:i.width-e}},n:function(t,e,i){var s=this.originalSize;return{top:this.originalPosition.top+i,height:s.height-i}},s:function(t,e,i){return{height:this.originalSize.height+i}},se:function(t,e,i){return y.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[t,e,i]))},sw:function(t,e,i){return y.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[t,e,i]))},ne:function(t,e,i){return y.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[t,e,i]))},nw:function(t,e,i){return y.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[t,e,i]))}},_propagate:function(t,e){y.ui.plugin.call(this,t,[e,this.ui()]),"resize"!==t&&this._trigger(t,e,this.ui())},plugins:{},ui:function(){return{originalElement:this.originalElement,element:this.element,helper:this.helper,position:this.position,size:this.size,originalSize:this.originalSize,originalPosition:this.originalPosition}}}),y.ui.plugin.add("resizable","animate",{stop:function(e){var i=y(this).resizable("instance"),t=i.options,s=i._proportionallyResizeElements,n=s.length&&/textarea/i.test(s[0].nodeName),o=n&&i._hasScroll(s[0],"left")?0:i.sizeDiff.height,h=n?0:i.sizeDiff.width,n={width:i.size.width-h,height:i.size.height-o},h=parseFloat(i.element.css("left"))+(i.position.left-i.originalPosition.left)||null,o=parseFloat(i.element.css("top"))+(i.position.top-i.originalPosition.top)||null;i.element.animate(y.extend(n,o&&h?{top:o,left:h}:{}),{duration:t.animateDuration,easing:t.animateEasing,step:function(){var t={width:parseFloat(i.element.css("width")),height:parseFloat(i.element.css("height")),top:parseFloat(i.element.css("top")),left:parseFloat(i.element.css("left"))};s&&s.length&&y(s[0]).css({width:t.width,height:t.height}),i._updateCache(t),i._propagate("resize",e)}})}}),y.ui.plugin.add("resizable","containment",{start:function(){var i,s,n=y(this).resizable("instance"),t=n.options,e=n.element,o=t.containment,h=o instanceof y?o.get(0):/parent/.test(o)?e.parent().get(0):o;h&&(n.containerElement=y(h),/document/.test(o)||o===document?(n.containerOffset={left:0,top:0},n.containerPosition={left:0,top:0},n.parentData={element:y(document),left:0,top:0,width:y(document).width(),height:y(document).height()||document.body.parentNode.scrollHeight}):(i=y(h),s=[],y(["Top","Right","Left","Bottom"]).each(function(t,e){s[t]=n._num(i.css("padding"+e))}),n.containerOffset=i.offset(),n.containerPosition=i.position(),n.containerSize={height:i.innerHeight()-s[3],width:i.innerWidth()-s[1]},t=n.containerOffset,e=n.containerSize.height,o=n.containerSize.width,o=n._hasScroll(h,"left")?h.scrollWidth:o,e=n._hasScroll(h)?h.scrollHeight:e,n.parentData={element:h,left:t.left,top:t.top,width:o,height:e}))},resize:function(t){var e=y(this).resizable("instance"),i=e.options,s=e.containerOffset,n=e.position,o=e._aspectRatio||t.shiftKey,h={top:0,left:0},a=e.containerElement,t=!0;a[0]!==document&&/static/.test(a.css("position"))&&(h=s),n.left<(e._helper?s.left:0)&&(e.size.width=e.size.width+(e._helper?e.position.left-s.left:e.position.left-h.left),o&&(e.size.height=e.size.width/e.aspectRatio,t=!1),e.position.left=i.helper?s.left:0),n.top<(e._helper?s.top:0)&&(e.size.height=e.size.height+(e._helper?e.position.top-s.top:e.position.top),o&&(e.size.width=e.size.height*e.aspectRatio,t=!1),e.position.top=e._helper?s.top:0),i=e.containerElement.get(0)===e.element.parent().get(0),n=/relative|absolute/.test(e.containerElement.css("position")),i&&n?(e.offset.left=e.parentData.left+e.position.left,e.offset.top=e.parentData.top+e.position.top):(e.offset.left=e.element.offset().left,e.offset.top=e.element.offset().top),n=Math.abs(e.sizeDiff.width+(e._helper?e.offset.left-h.left:e.offset.left-s.left)),s=Math.abs(e.sizeDiff.height+(e._helper?e.offset.top-h.top:e.offset.top-s.top)),n+e.size.width>=e.parentData.width&&(e.size.width=e.parentData.width-n,o&&(e.size.height=e.size.width/e.aspectRatio,t=!1)),s+e.size.height>=e.parentData.height&&(e.size.height=e.parentData.height-s,o&&(e.size.width=e.size.height*e.aspectRatio,t=!1)),t||(e.position.left=e.prevPosition.left,e.position.top=e.prevPosition.top,e.size.width=e.prevSize.width,e.size.height=e.prevSize.height)},stop:function(){var t=y(this).resizable("instance"),e=t.options,i=t.containerOffset,s=t.containerPosition,n=t.containerElement,o=y(t.helper),h=o.offset(),a=o.outerWidth()-t.sizeDiff.width,o=o.outerHeight()-t.sizeDiff.height;t._helper&&!e.animate&&/relative/.test(n.css("position"))&&y(this).css({left:h.left-s.left-i.left,width:a,height:o}),t._helper&&!e.animate&&/static/.test(n.css("position"))&&y(this).css({left:h.left-s.left-i.left,width:a,height:o})}}),y.ui.plugin.add("resizable","alsoResize",{start:function(){var t=y(this).resizable("instance").options;y(t.alsoResize).each(function(){var t=y(this);t.data("ui-resizable-alsoresize",{width:parseFloat(t.width()),height:parseFloat(t.height()),left:parseFloat(t.css("left")),top:parseFloat(t.css("top"))})})},resize:function(t,i){var e=y(this).resizable("instance"),s=e.options,n=e.originalSize,o=e.originalPosition,h={height:e.size.height-n.height||0,width:e.size.width-n.width||0,top:e.position.top-o.top||0,left:e.position.left-o.left||0};y(s.alsoResize).each(function(){var t=y(this),s=y(this).data("ui-resizable-alsoresize"),n={},e=t.parents(i.originalElement[0]).length?["width","height"]:["width","height","top","left"];y.each(e,function(t,e){var i=(s[e]||0)+(h[e]||0);i&&0<=i&&(n[e]=i||null)}),t.css(n)})},stop:function(){y(this).removeData("ui-resizable-alsoresize")}}),y.ui.plugin.add("resizable","ghost",{start:function(){var t=y(this).resizable("instance"),e=t.size;t.ghost=t.originalElement.clone(),t.ghost.css({opacity:.25,display:"block",position:"relative",height:e.height,width:e.width,margin:0,left:0,top:0}),t._addClass(t.ghost,"ui-resizable-ghost"),!1!==y.uiBackCompat&&"string"==typeof t.options.ghost&&t.ghost.addClass(this.options.ghost),t.ghost.appendTo(t.helper)},resize:function(){var t=y(this).resizable("instance");t.ghost&&t.ghost.css({position:"relative",height:t.size.height,width:t.size.width})},stop:function(){var t=y(this).resizable("instance");t.ghost&&t.helper&&t.helper.get(0).removeChild(t.ghost.get(0))}}),y.ui.plugin.add("resizable","grid",{resize:function(){var t,e=y(this).resizable("instance"),i=e.options,s=e.size,n=e.originalSize,o=e.originalPosition,h=e.axis,a="number"==typeof i.grid?[i.grid,i.grid]:i.grid,r=a[0]||1,l=a[1]||1,u=Math.round((s.width-n.width)/r)*r,p=Math.round((s.height-n.height)/l)*l,d=n.width+u,c=n.height+p,f=i.maxWidth&&i.maxWidthd,s=i.minHeight&&i.minHeight>c;i.grid=a,m&&(d+=r),s&&(c+=l),f&&(d-=r),g&&(c-=l),/^(se|s|e)$/.test(h)?(e.size.width=d,e.size.height=c):/^(ne)$/.test(h)?(e.size.width=d,e.size.height=c,e.position.top=o.top-p):/^(sw)$/.test(h)?(e.size.width=d,e.size.height=c,e.position.left=o.left-u):((c-l<=0||d-r<=0)&&(t=e._getPaddingPlusBorderDimensions(this)),0=f[g]?0:Math.min(f[g],n));!a&&1-1){targetElements.on(evt+EVENT_NAMESPACE,function elementToggle(event){$.powerTip.toggle(this,event)})}else{targetElements.on(evt+EVENT_NAMESPACE,function elementOpen(event){$.powerTip.show(this,event)})}});$.each(options.closeEvents,function(idx,evt){if($.inArray(evt,options.openEvents)<0){targetElements.on(evt+EVENT_NAMESPACE,function elementClose(event){$.powerTip.hide(this,!isMouseEvent(event))})}});targetElements.on("keydown"+EVENT_NAMESPACE,function elementKeyDown(event){if(event.keyCode===27){$.powerTip.hide(this,true)}})}return targetElements};$.fn.powerTip.defaults={fadeInTime:200,fadeOutTime:100,followMouse:false,popupId:"powerTip",popupClass:null,intentSensitivity:7,intentPollInterval:100,closeDelay:100,placement:"n",smartPlacement:false,offset:10,mouseOnToPopup:false,manual:false,openEvents:["mouseenter","focus"],closeEvents:["mouseleave","blur"]};$.fn.powerTip.smartPlacementLists={n:["n","ne","nw","s"],e:["e","ne","se","w","nw","sw","n","s","e"],s:["s","se","sw","n"],w:["w","nw","sw","e","ne","se","n","s","w"],nw:["nw","w","sw","n","s","se","nw"],ne:["ne","e","se","n","s","sw","ne"],sw:["sw","w","nw","s","n","ne","sw"],se:["se","e","ne","s","n","nw","se"],"nw-alt":["nw-alt","n","ne-alt","sw-alt","s","se-alt","w","e"],"ne-alt":["ne-alt","n","nw-alt","se-alt","s","sw-alt","e","w"],"sw-alt":["sw-alt","s","se-alt","nw-alt","n","ne-alt","w","e"],"se-alt":["se-alt","s","sw-alt","ne-alt","n","nw-alt","e","w"]};$.powerTip={show:function apiShowTip(element,event){if(isMouseEvent(event)){trackMouse(event);session.previousX=event.pageX;session.previousY=event.pageY;$(element).data(DATA_DISPLAYCONTROLLER).show()}else{$(element).first().data(DATA_DISPLAYCONTROLLER).show(true,true)}return element},reposition:function apiResetPosition(element){$(element).first().data(DATA_DISPLAYCONTROLLER).resetPosition();return element},hide:function apiCloseTip(element,immediate){var displayController;immediate=element?immediate:true;if(element){displayController=$(element).first().data(DATA_DISPLAYCONTROLLER)}else if(session.activeHover){displayController=session.activeHover.data(DATA_DISPLAYCONTROLLER)}if(displayController){displayController.hide(immediate)}return element},toggle:function apiToggle(element,event){if(session.activeHover&&session.activeHover.is(element)){$.powerTip.hide(element,!isMouseEvent(event))}else{$.powerTip.show(element,event)}return element}};$.powerTip.showTip=$.powerTip.show;$.powerTip.closeTip=$.powerTip.hide;function CSSCoordinates(){var me=this;me.top="auto";me.left="auto";me.right="auto";me.bottom="auto";me.set=function(property,value){if($.isNumeric(value)){me[property]=Math.round(value)}}}function DisplayController(element,options,tipController){var hoverTimer=null,myCloseDelay=null;function openTooltip(immediate,forceOpen){cancelTimer();if(!element.data(DATA_HASACTIVEHOVER)){if(!immediate){session.tipOpenImminent=true;hoverTimer=setTimeout(function intentDelay(){hoverTimer=null;checkForIntent()},options.intentPollInterval)}else{if(forceOpen){element.data(DATA_FORCEDOPEN,true)}closeAnyDelayed();tipController.showTip(element)}}else{cancelClose()}}function closeTooltip(disableDelay){if(myCloseDelay){myCloseDelay=session.closeDelayTimeout=clearTimeout(myCloseDelay);session.delayInProgress=false}cancelTimer();session.tipOpenImminent=false;if(element.data(DATA_HASACTIVEHOVER)){element.data(DATA_FORCEDOPEN,false);if(!disableDelay){session.delayInProgress=true;session.closeDelayTimeout=setTimeout(function closeDelay(){session.closeDelayTimeout=null;tipController.hideTip(element);session.delayInProgress=false;myCloseDelay=null},options.closeDelay);myCloseDelay=session.closeDelayTimeout}else{tipController.hideTip(element)}}}function checkForIntent(){var xDifference=Math.abs(session.previousX-session.currentX),yDifference=Math.abs(session.previousY-session.currentY),totalDifference=xDifference+yDifference;if(totalDifference",{id:options.popupId});if($body.length===0){$body=$("body")}$body.append(tipElement);session.tooltips=session.tooltips?session.tooltips.add(tipElement):tipElement}if(options.followMouse){if(!tipElement.data(DATA_HASMOUSEMOVE)){$document.on("mousemove"+EVENT_NAMESPACE,positionTipOnCursor);$window.on("scroll"+EVENT_NAMESPACE,positionTipOnCursor);tipElement.data(DATA_HASMOUSEMOVE,true)}}function beginShowTip(element){element.data(DATA_HASACTIVEHOVER,true);tipElement.queue(function queueTipInit(next){showTip(element);next()})}function showTip(element){var tipContent;if(!element.data(DATA_HASACTIVEHOVER)){return}if(session.isTipOpen){if(!session.isClosing){hideTip(session.activeHover)}tipElement.delay(100).queue(function queueTipAgain(next){showTip(element);next()});return}element.trigger("powerTipPreRender");tipContent=getTooltipContent(element);if(tipContent){tipElement.empty().append(tipContent)}else{return}element.trigger("powerTipRender");session.activeHover=element;session.isTipOpen=true;tipElement.data(DATA_MOUSEONTOTIP,options.mouseOnToPopup);tipElement.addClass(options.popupClass);if(!options.followMouse||element.data(DATA_FORCEDOPEN)){positionTipOnElement(element);session.isFixedTipOpen=true}else{positionTipOnCursor()}if(!element.data(DATA_FORCEDOPEN)&&!options.followMouse){$document.on("click"+EVENT_NAMESPACE,function documentClick(event){var target=event.target;if(target!==element[0]){if(options.mouseOnToPopup){if(target!==tipElement[0]&&!$.contains(tipElement[0],target)){$.powerTip.hide()}}else{$.powerTip.hide()}}})}if(options.mouseOnToPopup&&!options.manual){tipElement.on("mouseenter"+EVENT_NAMESPACE,function tipMouseEnter(){if(session.activeHover){session.activeHover.data(DATA_DISPLAYCONTROLLER).cancel()}});tipElement.on("mouseleave"+EVENT_NAMESPACE,function tipMouseLeave(){if(session.activeHover){session.activeHover.data(DATA_DISPLAYCONTROLLER).hide()}})}tipElement.fadeIn(options.fadeInTime,function fadeInCallback(){if(!session.desyncTimeout){session.desyncTimeout=setInterval(closeDesyncedTip,500)}element.trigger("powerTipOpen")})}function hideTip(element){session.isClosing=true;session.isTipOpen=false;session.desyncTimeout=clearInterval(session.desyncTimeout);element.data(DATA_HASACTIVEHOVER,false);element.data(DATA_FORCEDOPEN,false);$document.off("click"+EVENT_NAMESPACE);tipElement.off(EVENT_NAMESPACE);tipElement.fadeOut(options.fadeOutTime,function fadeOutCallback(){var coords=new CSSCoordinates;session.activeHover=null;session.isClosing=false;session.isFixedTipOpen=false;tipElement.removeClass();coords.set("top",session.currentY+options.offset);coords.set("left",session.currentX+options.offset);tipElement.css(coords);element.trigger("powerTipClose")})}function positionTipOnCursor(){var tipWidth,tipHeight,coords,collisions,collisionCount;if(!session.isFixedTipOpen&&(session.isTipOpen||session.tipOpenImminent&&tipElement.data(DATA_HASMOUSEMOVE))){tipWidth=tipElement.outerWidth();tipHeight=tipElement.outerHeight();coords=new CSSCoordinates;coords.set("top",session.currentY+options.offset);coords.set("left",session.currentX+options.offset);collisions=getViewportCollisions(coords,tipWidth,tipHeight);if(collisions!==Collision.none){collisionCount=countFlags(collisions);if(collisionCount===1){if(collisions===Collision.right){coords.set("left",session.scrollLeft+session.windowWidth-tipWidth)}else if(collisions===Collision.bottom){coords.set("top",session.scrollTop+session.windowHeight-tipHeight)}}else{coords.set("left",session.currentX-tipWidth-options.offset);coords.set("top",session.currentY-tipHeight-options.offset)}}tipElement.css(coords)}}function positionTipOnElement(element){var priorityList,finalPlacement;if(options.smartPlacement||options.followMouse&&element.data(DATA_FORCEDOPEN)){priorityList=$.fn.powerTip.smartPlacementLists[options.placement];$.each(priorityList,function(idx,pos){var collisions=getViewportCollisions(placeTooltip(element,pos),tipElement.outerWidth(),tipElement.outerHeight());finalPlacement=pos;return collisions!==Collision.none})}else{placeTooltip(element,options.placement);finalPlacement=options.placement}tipElement.removeClass("w nw sw e ne se n s w se-alt sw-alt ne-alt nw-alt");tipElement.addClass(finalPlacement)}function placeTooltip(element,placement){var iterationCount=0,tipWidth,tipHeight,coords=new CSSCoordinates;coords.set("top",0);coords.set("left",0);tipElement.css(coords);do{tipWidth=tipElement.outerWidth();tipHeight=tipElement.outerHeight();coords=placementCalculator.compute(element,placement,tipWidth,tipHeight,options.offset);tipElement.css(coords)}while(++iterationCount<=5&&(tipWidth!==tipElement.outerWidth()||tipHeight!==tipElement.outerHeight()));return coords}function closeDesyncedTip(){var isDesynced=false,hasDesyncableCloseEvent=$.grep(["mouseleave","mouseout","blur","focusout"],function(eventType){return $.inArray(eventType,options.closeEvents)!==-1}).length>0;if(session.isTipOpen&&!session.isClosing&&!session.delayInProgress&&hasDesyncableCloseEvent){if(session.activeHover.data(DATA_HASACTIVEHOVER)===false||session.activeHover.is(":disabled")){isDesynced=true}else if(!isMouseOver(session.activeHover)&&!session.activeHover.is(":focus")&&!session.activeHover.data(DATA_FORCEDOPEN)){if(tipElement.data(DATA_MOUSEONTOTIP)){if(!isMouseOver(tipElement)){isDesynced=true}}else{isDesynced=true}}if(isDesynced){hideTip(session.activeHover)}}}this.showTip=beginShowTip;this.hideTip=hideTip;this.resetPosition=positionTipOnElement}function isSvgElement(element){return Boolean(window.SVGElement&&element[0]instanceof SVGElement)}function isMouseEvent(event){return Boolean(event&&$.inArray(event.type,MOUSE_EVENTS)>-1&&typeof event.pageX==="number")}function initTracking(){if(!session.mouseTrackingActive){session.mouseTrackingActive=true;getViewportDimensions();$(getViewportDimensions);$document.on("mousemove"+EVENT_NAMESPACE,trackMouse);$window.on("resize"+EVENT_NAMESPACE,trackResize);$window.on("scroll"+EVENT_NAMESPACE,trackScroll)}}function getViewportDimensions(){session.scrollLeft=$window.scrollLeft();session.scrollTop=$window.scrollTop();session.windowWidth=$window.width();session.windowHeight=$window.height()}function trackResize(){session.windowWidth=$window.width();session.windowHeight=$window.height()}function trackScroll(){var x=$window.scrollLeft(),y=$window.scrollTop();if(x!==session.scrollLeft){session.currentX+=x-session.scrollLeft;session.scrollLeft=x}if(y!==session.scrollTop){session.currentY+=y-session.scrollTop;session.scrollTop=y}}function trackMouse(event){session.currentX=event.pageX;session.currentY=event.pageY}function isMouseOver(element){var elementPosition=element.offset(),elementBox=element[0].getBoundingClientRect(),elementWidth=elementBox.right-elementBox.left,elementHeight=elementBox.bottom-elementBox.top;return session.currentX>=elementPosition.left&&session.currentX<=elementPosition.left+elementWidth&&session.currentY>=elementPosition.top&&session.currentY<=elementPosition.top+elementHeight}function getTooltipContent(element){var tipText=element.data(DATA_POWERTIP),tipObject=element.data(DATA_POWERTIPJQ),tipTarget=element.data(DATA_POWERTIPTARGET),targetElement,content;if(tipText){if($.isFunction(tipText)){tipText=tipText.call(element[0])}content=tipText}else if(tipObject){if($.isFunction(tipObject)){tipObject=tipObject.call(element[0])}if(tipObject.length>0){content=tipObject.clone(true,true)}}else if(tipTarget){targetElement=$("#"+tipTarget);if(targetElement.length>0){content=targetElement.html()}}return content}function getViewportCollisions(coords,elementWidth,elementHeight){var viewportTop=session.scrollTop,viewportLeft=session.scrollLeft,viewportBottom=viewportTop+session.windowHeight,viewportRight=viewportLeft+session.windowWidth,collisions=Collision.none;if(coords.topviewportBottom||Math.abs(coords.bottom-session.windowHeight)>viewportBottom){collisions|=Collision.bottom}if(coords.leftviewportRight){collisions|=Collision.left}if(coords.left+elementWidth>viewportRight||coords.right1)){a.preventDefault();var c=a.originalEvent.changedTouches[0],d=document.createEvent("MouseEvents");d.initMouseEvent(b,!0,!0,window,1,c.screenX,c.screenY,c.clientX,c.clientY,!1,!1,!1,!1,0,null),a.target.dispatchEvent(d)}}if(a.support.touch="ontouchend"in document,a.support.touch){var e,b=a.ui.mouse.prototype,c=b._mouseInit,d=b._mouseDestroy;b._touchStart=function(a){var b=this;!e&&b._mouseCapture(a.originalEvent.changedTouches[0])&&(e=!0,b._touchMoved=!1,f(a,"mouseover"),f(a,"mousemove"),f(a,"mousedown"))},b._touchMove=function(a){e&&(this._touchMoved=!0,f(a,"mousemove"))},b._touchEnd=function(a){e&&(f(a,"mouseup"),f(a,"mouseout"),this._touchMoved||f(a,"click"),e=!1)},b._mouseInit=function(){var b=this;b.element.bind({touchstart:a.proxy(b,"_touchStart"),touchmove:a.proxy(b,"_touchMove"),touchend:a.proxy(b,"_touchEnd")}),c.call(b)},b._mouseDestroy=function(){var b=this;b.element.unbind({touchstart:a.proxy(b,"_touchStart"),touchmove:a.proxy(b,"_touchMove"),touchend:a.proxy(b,"_touchEnd")}),d.call(b)}}}(jQuery);/*! SmartMenus jQuery Plugin - v1.1.0 - September 17, 2017 + * http://www.smartmenus.org/ + * Copyright Vasil Dinkov, Vadikom Web Ltd. http://vadikom.com; Licensed MIT */(function(t){"function"==typeof define&&define.amd?define(["jquery"],t):"object"==typeof module&&"object"==typeof module.exports?module.exports=t(require("jquery")):t(jQuery)})(function($){function initMouseDetection(t){var e=".smartmenus_mouse";if(mouseDetectionEnabled||t)mouseDetectionEnabled&&t&&($(document).off(e),mouseDetectionEnabled=!1);else{var i=!0,s=null,o={mousemove:function(t){var e={x:t.pageX,y:t.pageY,timeStamp:(new Date).getTime()};if(s){var o=Math.abs(s.x-e.x),a=Math.abs(s.y-e.y);if((o>0||a>0)&&2>=o&&2>=a&&300>=e.timeStamp-s.timeStamp&&(mouse=!0,i)){var n=$(t.target).closest("a");n.is("a")&&$.each(menuTrees,function(){return $.contains(this.$root[0],n[0])?(this.itemEnter({currentTarget:n[0]}),!1):void 0}),i=!1}}s=e}};o[touchEvents?"touchstart":"pointerover pointermove pointerout MSPointerOver MSPointerMove MSPointerOut"]=function(t){isTouchEvent(t.originalEvent)&&(mouse=!1)},$(document).on(getEventsNS(o,e)),mouseDetectionEnabled=!0}}function isTouchEvent(t){return!/^(4|mouse)$/.test(t.pointerType)}function getEventsNS(t,e){e||(e="");var i={};for(var s in t)i[s.split(" ").join(e+" ")+e]=t[s];return i}var menuTrees=[],mouse=!1,touchEvents="ontouchstart"in window,mouseDetectionEnabled=!1,requestAnimationFrame=window.requestAnimationFrame||function(t){return setTimeout(t,1e3/60)},cancelAnimationFrame=window.cancelAnimationFrame||function(t){clearTimeout(t)},canAnimate=!!$.fn.animate;return $.SmartMenus=function(t,e){this.$root=$(t),this.opts=e,this.rootId="",this.accessIdPrefix="",this.$subArrow=null,this.activatedItems=[],this.visibleSubMenus=[],this.showTimeout=0,this.hideTimeout=0,this.scrollTimeout=0,this.clickActivated=!1,this.focusActivated=!1,this.zIndexInc=0,this.idInc=0,this.$firstLink=null,this.$firstSub=null,this.disabled=!1,this.$disableOverlay=null,this.$touchScrollingSub=null,this.cssTransforms3d="perspective"in t.style||"webkitPerspective"in t.style,this.wasCollapsible=!1,this.init()},$.extend($.SmartMenus,{hideAll:function(){$.each(menuTrees,function(){this.menuHideAll()})},destroy:function(){for(;menuTrees.length;)menuTrees[0].destroy();initMouseDetection(!0)},prototype:{init:function(t){var e=this;if(!t){menuTrees.push(this),this.rootId=((new Date).getTime()+Math.random()+"").replace(/\D/g,""),this.accessIdPrefix="sm-"+this.rootId+"-",this.$root.hasClass("sm-rtl")&&(this.opts.rightToLeftSubMenus=!0);var i=".smartmenus";this.$root.data("smartmenus",this).attr("data-smartmenus-id",this.rootId).dataSM("level",1).on(getEventsNS({"mouseover focusin":$.proxy(this.rootOver,this),"mouseout focusout":$.proxy(this.rootOut,this),keydown:$.proxy(this.rootKeyDown,this)},i)).on(getEventsNS({mouseenter:$.proxy(this.itemEnter,this),mouseleave:$.proxy(this.itemLeave,this),mousedown:$.proxy(this.itemDown,this),focus:$.proxy(this.itemFocus,this),blur:$.proxy(this.itemBlur,this),click:$.proxy(this.itemClick,this)},i),"a"),i+=this.rootId,this.opts.hideOnClick&&$(document).on(getEventsNS({touchstart:$.proxy(this.docTouchStart,this),touchmove:$.proxy(this.docTouchMove,this),touchend:$.proxy(this.docTouchEnd,this),click:$.proxy(this.docClick,this)},i)),$(window).on(getEventsNS({"resize orientationchange":$.proxy(this.winResize,this)},i)),this.opts.subIndicators&&(this.$subArrow=$("").addClass("sub-arrow"),this.opts.subIndicatorsText&&this.$subArrow.html(this.opts.subIndicatorsText)),initMouseDetection()}if(this.$firstSub=this.$root.find("ul").each(function(){e.menuInit($(this))}).eq(0),this.$firstLink=this.$root.find("a").eq(0),this.opts.markCurrentItem){var s=/(index|default)\.[^#\?\/]*/i,o=/#.*/,a=window.location.href.replace(s,""),n=a.replace(o,"");this.$root.find("a").each(function(){var t=this.href.replace(s,""),i=$(this);(t==a||t==n)&&(i.addClass("current"),e.opts.markCurrentTree&&i.parentsUntil("[data-smartmenus-id]","ul").each(function(){$(this).dataSM("parent-a").addClass("current")}))})}this.wasCollapsible=this.isCollapsible()},destroy:function(t){if(!t){var e=".smartmenus";this.$root.removeData("smartmenus").removeAttr("data-smartmenus-id").removeDataSM("level").off(e),e+=this.rootId,$(document).off(e),$(window).off(e),this.opts.subIndicators&&(this.$subArrow=null)}this.menuHideAll();var i=this;this.$root.find("ul").each(function(){var t=$(this);t.dataSM("scroll-arrows")&&t.dataSM("scroll-arrows").remove(),t.dataSM("shown-before")&&((i.opts.subMenusMinWidth||i.opts.subMenusMaxWidth)&&t.css({width:"",minWidth:"",maxWidth:""}).removeClass("sm-nowrap"),t.dataSM("scroll-arrows")&&t.dataSM("scroll-arrows").remove(),t.css({zIndex:"",top:"",left:"",marginLeft:"",marginTop:"",display:""})),0==(t.attr("id")||"").indexOf(i.accessIdPrefix)&&t.removeAttr("id")}).removeDataSM("in-mega").removeDataSM("shown-before").removeDataSM("scroll-arrows").removeDataSM("parent-a").removeDataSM("level").removeDataSM("beforefirstshowfired").removeAttr("role").removeAttr("aria-hidden").removeAttr("aria-labelledby").removeAttr("aria-expanded"),this.$root.find("a.has-submenu").each(function(){var t=$(this);0==t.attr("id").indexOf(i.accessIdPrefix)&&t.removeAttr("id")}).removeClass("has-submenu").removeDataSM("sub").removeAttr("aria-haspopup").removeAttr("aria-controls").removeAttr("aria-expanded").closest("li").removeDataSM("sub"),this.opts.subIndicators&&this.$root.find("span.sub-arrow").remove(),this.opts.markCurrentItem&&this.$root.find("a.current").removeClass("current"),t||(this.$root=null,this.$firstLink=null,this.$firstSub=null,this.$disableOverlay&&(this.$disableOverlay.remove(),this.$disableOverlay=null),menuTrees.splice($.inArray(this,menuTrees),1))},disable:function(t){if(!this.disabled){if(this.menuHideAll(),!t&&!this.opts.isPopup&&this.$root.is(":visible")){var e=this.$root.offset();this.$disableOverlay=$('
').css({position:"absolute",top:e.top,left:e.left,width:this.$root.outerWidth(),height:this.$root.outerHeight(),zIndex:this.getStartZIndex(!0),opacity:0}).appendTo(document.body)}this.disabled=!0}},docClick:function(t){return this.$touchScrollingSub?(this.$touchScrollingSub=null,void 0):((this.visibleSubMenus.length&&!$.contains(this.$root[0],t.target)||$(t.target).closest("a").length)&&this.menuHideAll(),void 0)},docTouchEnd:function(){if(this.lastTouch){if(!(!this.visibleSubMenus.length||void 0!==this.lastTouch.x2&&this.lastTouch.x1!=this.lastTouch.x2||void 0!==this.lastTouch.y2&&this.lastTouch.y1!=this.lastTouch.y2||this.lastTouch.target&&$.contains(this.$root[0],this.lastTouch.target))){this.hideTimeout&&(clearTimeout(this.hideTimeout),this.hideTimeout=0);var t=this;this.hideTimeout=setTimeout(function(){t.menuHideAll()},350)}this.lastTouch=null}},docTouchMove:function(t){if(this.lastTouch){var e=t.originalEvent.touches[0];this.lastTouch.x2=e.pageX,this.lastTouch.y2=e.pageY}},docTouchStart:function(t){var e=t.originalEvent.touches[0];this.lastTouch={x1:e.pageX,y1:e.pageY,target:e.target}},enable:function(){this.disabled&&(this.$disableOverlay&&(this.$disableOverlay.remove(),this.$disableOverlay=null),this.disabled=!1)},getClosestMenu:function(t){for(var e=$(t).closest("ul");e.dataSM("in-mega");)e=e.parent().closest("ul");return e[0]||null},getHeight:function(t){return this.getOffset(t,!0)},getOffset:function(t,e){var i;"none"==t.css("display")&&(i={position:t[0].style.position,visibility:t[0].style.visibility},t.css({position:"absolute",visibility:"hidden"}).show());var s=t[0].getBoundingClientRect&&t[0].getBoundingClientRect(),o=s&&(e?s.height||s.bottom-s.top:s.width||s.right-s.left);return o||0===o||(o=e?t[0].offsetHeight:t[0].offsetWidth),i&&t.hide().css(i),o},getStartZIndex:function(t){var e=parseInt(this[t?"$root":"$firstSub"].css("z-index"));return!t&&isNaN(e)&&(e=parseInt(this.$root.css("z-index"))),isNaN(e)?1:e},getTouchPoint:function(t){return t.touches&&t.touches[0]||t.changedTouches&&t.changedTouches[0]||t},getViewport:function(t){var e=t?"Height":"Width",i=document.documentElement["client"+e],s=window["inner"+e];return s&&(i=Math.min(i,s)),i},getViewportHeight:function(){return this.getViewport(!0)},getViewportWidth:function(){return this.getViewport()},getWidth:function(t){return this.getOffset(t)},handleEvents:function(){return!this.disabled&&this.isCSSOn()},handleItemEvents:function(t){return this.handleEvents()&&!this.isLinkInMegaMenu(t)},isCollapsible:function(){return"static"==this.$firstSub.css("position")},isCSSOn:function(){return"inline"!=this.$firstLink.css("display")},isFixed:function(){var t="fixed"==this.$root.css("position");return t||this.$root.parentsUntil("body").each(function(){return"fixed"==$(this).css("position")?(t=!0,!1):void 0}),t},isLinkInMegaMenu:function(t){return $(this.getClosestMenu(t[0])).hasClass("mega-menu")},isTouchMode:function(){return!mouse||this.opts.noMouseOver||this.isCollapsible()},itemActivate:function(t,e){var i=t.closest("ul"),s=i.dataSM("level");if(s>1&&(!this.activatedItems[s-2]||this.activatedItems[s-2][0]!=i.dataSM("parent-a")[0])){var o=this;$(i.parentsUntil("[data-smartmenus-id]","ul").get().reverse()).add(i).each(function(){o.itemActivate($(this).dataSM("parent-a"))})}if((!this.isCollapsible()||e)&&this.menuHideSubMenus(this.activatedItems[s-1]&&this.activatedItems[s-1][0]==t[0]?s:s-1),this.activatedItems[s-1]=t,this.$root.triggerHandler("activate.smapi",t[0])!==!1){var a=t.dataSM("sub");a&&(this.isTouchMode()||!this.opts.showOnClick||this.clickActivated)&&this.menuShow(a)}},itemBlur:function(t){var e=$(t.currentTarget);this.handleItemEvents(e)&&this.$root.triggerHandler("blur.smapi",e[0])},itemClick:function(t){var e=$(t.currentTarget);if(this.handleItemEvents(e)){if(this.$touchScrollingSub&&this.$touchScrollingSub[0]==e.closest("ul")[0])return this.$touchScrollingSub=null,t.stopPropagation(),!1;if(this.$root.triggerHandler("click.smapi",e[0])===!1)return!1;var i=$(t.target).is(".sub-arrow"),s=e.dataSM("sub"),o=s?2==s.dataSM("level"):!1,a=this.isCollapsible(),n=/toggle$/.test(this.opts.collapsibleBehavior),r=/link$/.test(this.opts.collapsibleBehavior),h=/^accordion/.test(this.opts.collapsibleBehavior);if(s&&!s.is(":visible")){if((!r||!a||i)&&(this.opts.showOnClick&&o&&(this.clickActivated=!0),this.itemActivate(e,h),s.is(":visible")))return this.focusActivated=!0,!1}else if(a&&(n||i))return this.itemActivate(e,h),this.menuHide(s),n&&(this.focusActivated=!1),!1;return this.opts.showOnClick&&o||e.hasClass("disabled")||this.$root.triggerHandler("select.smapi",e[0])===!1?!1:void 0}},itemDown:function(t){var e=$(t.currentTarget);this.handleItemEvents(e)&&e.dataSM("mousedown",!0)},itemEnter:function(t){var e=$(t.currentTarget);if(this.handleItemEvents(e)){if(!this.isTouchMode()){this.showTimeout&&(clearTimeout(this.showTimeout),this.showTimeout=0);var i=this;this.showTimeout=setTimeout(function(){i.itemActivate(e)},this.opts.showOnClick&&1==e.closest("ul").dataSM("level")?1:this.opts.showTimeout)}this.$root.triggerHandler("mouseenter.smapi",e[0])}},itemFocus:function(t){var e=$(t.currentTarget);this.handleItemEvents(e)&&(!this.focusActivated||this.isTouchMode()&&e.dataSM("mousedown")||this.activatedItems.length&&this.activatedItems[this.activatedItems.length-1][0]==e[0]||this.itemActivate(e,!0),this.$root.triggerHandler("focus.smapi",e[0]))},itemLeave:function(t){var e=$(t.currentTarget);this.handleItemEvents(e)&&(this.isTouchMode()||(e[0].blur(),this.showTimeout&&(clearTimeout(this.showTimeout),this.showTimeout=0)),e.removeDataSM("mousedown"),this.$root.triggerHandler("mouseleave.smapi",e[0]))},menuHide:function(t){if(this.$root.triggerHandler("beforehide.smapi",t[0])!==!1&&(canAnimate&&t.stop(!0,!0),"none"!=t.css("display"))){var e=function(){t.css("z-index","")};this.isCollapsible()?canAnimate&&this.opts.collapsibleHideFunction?this.opts.collapsibleHideFunction.call(this,t,e):t.hide(this.opts.collapsibleHideDuration,e):canAnimate&&this.opts.hideFunction?this.opts.hideFunction.call(this,t,e):t.hide(this.opts.hideDuration,e),t.dataSM("scroll")&&(this.menuScrollStop(t),t.css({"touch-action":"","-ms-touch-action":"","-webkit-transform":"",transform:""}).off(".smartmenus_scroll").removeDataSM("scroll").dataSM("scroll-arrows").hide()),t.dataSM("parent-a").removeClass("highlighted").attr("aria-expanded","false"),t.attr({"aria-expanded":"false","aria-hidden":"true"});var i=t.dataSM("level");this.activatedItems.splice(i-1,1),this.visibleSubMenus.splice($.inArray(t,this.visibleSubMenus),1),this.$root.triggerHandler("hide.smapi",t[0])}},menuHideAll:function(){this.showTimeout&&(clearTimeout(this.showTimeout),this.showTimeout=0);for(var t=this.opts.isPopup?1:0,e=this.visibleSubMenus.length-1;e>=t;e--)this.menuHide(this.visibleSubMenus[e]);this.opts.isPopup&&(canAnimate&&this.$root.stop(!0,!0),this.$root.is(":visible")&&(canAnimate&&this.opts.hideFunction?this.opts.hideFunction.call(this,this.$root):this.$root.hide(this.opts.hideDuration))),this.activatedItems=[],this.visibleSubMenus=[],this.clickActivated=!1,this.focusActivated=!1,this.zIndexInc=0,this.$root.triggerHandler("hideAll.smapi")},menuHideSubMenus:function(t){for(var e=this.activatedItems.length-1;e>=t;e--){var i=this.activatedItems[e].dataSM("sub");i&&this.menuHide(i)}},menuInit:function(t){if(!t.dataSM("in-mega")){t.hasClass("mega-menu")&&t.find("ul").dataSM("in-mega",!0);for(var e=2,i=t[0];(i=i.parentNode.parentNode)!=this.$root[0];)e++;var s=t.prevAll("a").eq(-1);s.length||(s=t.prevAll().find("a").eq(-1)),s.addClass("has-submenu").dataSM("sub",t),t.dataSM("parent-a",s).dataSM("level",e).parent().dataSM("sub",t);var o=s.attr("id")||this.accessIdPrefix+ ++this.idInc,a=t.attr("id")||this.accessIdPrefix+ ++this.idInc;s.attr({id:o,"aria-haspopup":"true","aria-controls":a,"aria-expanded":"false"}),t.attr({id:a,role:"group","aria-hidden":"true","aria-labelledby":o,"aria-expanded":"false"}),this.opts.subIndicators&&s[this.opts.subIndicatorsPos](this.$subArrow.clone())}},menuPosition:function(t){var e,i,s=t.dataSM("parent-a"),o=s.closest("li"),a=o.parent(),n=t.dataSM("level"),r=this.getWidth(t),h=this.getHeight(t),u=s.offset(),l=u.left,c=u.top,d=this.getWidth(s),m=this.getHeight(s),p=$(window),f=p.scrollLeft(),v=p.scrollTop(),b=this.getViewportWidth(),S=this.getViewportHeight(),g=a.parent().is("[data-sm-horizontal-sub]")||2==n&&!a.hasClass("sm-vertical"),M=this.opts.rightToLeftSubMenus&&!o.is("[data-sm-reverse]")||!this.opts.rightToLeftSubMenus&&o.is("[data-sm-reverse]"),w=2==n?this.opts.mainMenuSubOffsetX:this.opts.subMenusSubOffsetX,T=2==n?this.opts.mainMenuSubOffsetY:this.opts.subMenusSubOffsetY;if(g?(e=M?d-r-w:w,i=this.opts.bottomToTopSubMenus?-h-T:m+T):(e=M?w-r:d-w,i=this.opts.bottomToTopSubMenus?m-T-h:T),this.opts.keepInViewport){var y=l+e,I=c+i;if(M&&f>y?e=g?f-y+e:d-w:!M&&y+r>f+b&&(e=g?f+b-r-y+e:w-r),g||(S>h&&I+h>v+S?i+=v+S-h-I:(h>=S||v>I)&&(i+=v-I)),g&&(I+h>v+S+.49||v>I)||!g&&h>S+.49){var x=this;t.dataSM("scroll-arrows")||t.dataSM("scroll-arrows",$([$('')[0],$('')[0]]).on({mouseenter:function(){t.dataSM("scroll").up=$(this).hasClass("scroll-up"),x.menuScroll(t)},mouseleave:function(e){x.menuScrollStop(t),x.menuScrollOut(t,e)},"mousewheel DOMMouseScroll":function(t){t.preventDefault()}}).insertAfter(t));var A=".smartmenus_scroll";if(t.dataSM("scroll",{y:this.cssTransforms3d?0:i-m,step:1,itemH:m,subH:h,arrowDownH:this.getHeight(t.dataSM("scroll-arrows").eq(1))}).on(getEventsNS({mouseover:function(e){x.menuScrollOver(t,e)},mouseout:function(e){x.menuScrollOut(t,e)},"mousewheel DOMMouseScroll":function(e){x.menuScrollMousewheel(t,e)}},A)).dataSM("scroll-arrows").css({top:"auto",left:"0",marginLeft:e+(parseInt(t.css("border-left-width"))||0),width:r-(parseInt(t.css("border-left-width"))||0)-(parseInt(t.css("border-right-width"))||0),zIndex:t.css("z-index")}).eq(g&&this.opts.bottomToTopSubMenus?0:1).show(),this.isFixed()){var C={};C[touchEvents?"touchstart touchmove touchend":"pointerdown pointermove pointerup MSPointerDown MSPointerMove MSPointerUp"]=function(e){x.menuScrollTouch(t,e)},t.css({"touch-action":"none","-ms-touch-action":"none"}).on(getEventsNS(C,A))}}}t.css({top:"auto",left:"0",marginLeft:e,marginTop:i-m})},menuScroll:function(t,e,i){var s,o=t.dataSM("scroll"),a=t.dataSM("scroll-arrows"),n=o.up?o.upEnd:o.downEnd;if(!e&&o.momentum){if(o.momentum*=.92,s=o.momentum,.5>s)return this.menuScrollStop(t),void 0}else s=i||(e||!this.opts.scrollAccelerate?this.opts.scrollStep:Math.floor(o.step));var r=t.dataSM("level");if(this.activatedItems[r-1]&&this.activatedItems[r-1].dataSM("sub")&&this.activatedItems[r-1].dataSM("sub").is(":visible")&&this.menuHideSubMenus(r-1),o.y=o.up&&o.y>=n||!o.up&&n>=o.y?o.y:Math.abs(n-o.y)>s?o.y+(o.up?s:-s):n,t.css(this.cssTransforms3d?{"-webkit-transform":"translate3d(0, "+o.y+"px, 0)",transform:"translate3d(0, "+o.y+"px, 0)"}:{marginTop:o.y}),mouse&&(o.up&&o.y>o.downEnd||!o.up&&o.y0;t.dataSM("scroll-arrows").eq(i?0:1).is(":visible")&&(t.dataSM("scroll").up=i,this.menuScroll(t,!0))}e.preventDefault()},menuScrollOut:function(t,e){mouse&&(/^scroll-(up|down)/.test((e.relatedTarget||"").className)||(t[0]==e.relatedTarget||$.contains(t[0],e.relatedTarget))&&this.getClosestMenu(e.relatedTarget)==t[0]||t.dataSM("scroll-arrows").css("visibility","hidden"))},menuScrollOver:function(t,e){if(mouse&&!/^scroll-(up|down)/.test(e.target.className)&&this.getClosestMenu(e.target)==t[0]){this.menuScrollRefreshData(t);var i=t.dataSM("scroll"),s=$(window).scrollTop()-t.dataSM("parent-a").offset().top-i.itemH;t.dataSM("scroll-arrows").eq(0).css("margin-top",s).end().eq(1).css("margin-top",s+this.getViewportHeight()-i.arrowDownH).end().css("visibility","visible")}},menuScrollRefreshData:function(t){var e=t.dataSM("scroll"),i=$(window).scrollTop()-t.dataSM("parent-a").offset().top-e.itemH;this.cssTransforms3d&&(i=-(parseFloat(t.css("margin-top"))-i)),$.extend(e,{upEnd:i,downEnd:i+this.getViewportHeight()-e.subH})},menuScrollStop:function(t){return this.scrollTimeout?(cancelAnimationFrame(this.scrollTimeout),this.scrollTimeout=0,t.dataSM("scroll").step=1,!0):void 0},menuScrollTouch:function(t,e){if(e=e.originalEvent,isTouchEvent(e)){var i=this.getTouchPoint(e);if(this.getClosestMenu(i.target)==t[0]){var s=t.dataSM("scroll");if(/(start|down)$/i.test(e.type))this.menuScrollStop(t)?(e.preventDefault(),this.$touchScrollingSub=t):this.$touchScrollingSub=null,this.menuScrollRefreshData(t),$.extend(s,{touchStartY:i.pageY,touchStartTime:e.timeStamp});else if(/move$/i.test(e.type)){var o=void 0!==s.touchY?s.touchY:s.touchStartY;if(void 0!==o&&o!=i.pageY){this.$touchScrollingSub=t;var a=i.pageY>o;void 0!==s.up&&s.up!=a&&$.extend(s,{touchStartY:i.pageY,touchStartTime:e.timeStamp}),$.extend(s,{up:a,touchY:i.pageY}),this.menuScroll(t,!0,Math.abs(i.pageY-o))}e.preventDefault()}else void 0!==s.touchY&&((s.momentum=15*Math.pow(Math.abs(i.pageY-s.touchStartY)/(e.timeStamp-s.touchStartTime),2))&&(this.menuScrollStop(t),this.menuScroll(t),e.preventDefault()),delete s.touchY)}}},menuShow:function(t){if((t.dataSM("beforefirstshowfired")||(t.dataSM("beforefirstshowfired",!0),this.$root.triggerHandler("beforefirstshow.smapi",t[0])!==!1))&&this.$root.triggerHandler("beforeshow.smapi",t[0])!==!1&&(t.dataSM("shown-before",!0),canAnimate&&t.stop(!0,!0),!t.is(":visible"))){var e=t.dataSM("parent-a"),i=this.isCollapsible();if((this.opts.keepHighlighted||i)&&e.addClass("highlighted"),i)t.removeClass("sm-nowrap").css({zIndex:"",width:"auto",minWidth:"",maxWidth:"",top:"",left:"",marginLeft:"",marginTop:""});else{if(t.css("z-index",this.zIndexInc=(this.zIndexInc||this.getStartZIndex())+1),(this.opts.subMenusMinWidth||this.opts.subMenusMaxWidth)&&(t.css({width:"auto",minWidth:"",maxWidth:""}).addClass("sm-nowrap"),this.opts.subMenusMinWidth&&t.css("min-width",this.opts.subMenusMinWidth),this.opts.subMenusMaxWidth)){var s=this.getWidth(t);t.css("max-width",this.opts.subMenusMaxWidth),s>this.getWidth(t)&&t.removeClass("sm-nowrap").css("width",this.opts.subMenusMaxWidth)}this.menuPosition(t)}var o=function(){t.css("overflow","")};i?canAnimate&&this.opts.collapsibleShowFunction?this.opts.collapsibleShowFunction.call(this,t,o):t.show(this.opts.collapsibleShowDuration,o):canAnimate&&this.opts.showFunction?this.opts.showFunction.call(this,t,o):t.show(this.opts.showDuration,o),e.attr("aria-expanded","true"),t.attr({"aria-expanded":"true","aria-hidden":"false"}),this.visibleSubMenus.push(t),this.$root.triggerHandler("show.smapi",t[0])}},popupHide:function(t){this.hideTimeout&&(clearTimeout(this.hideTimeout),this.hideTimeout=0);var e=this;this.hideTimeout=setTimeout(function(){e.menuHideAll()},t?1:this.opts.hideTimeout)},popupShow:function(t,e){if(!this.opts.isPopup)return alert('SmartMenus jQuery Error:\n\nIf you want to show this menu via the "popupShow" method, set the isPopup:true option.'),void 0;if(this.hideTimeout&&(clearTimeout(this.hideTimeout),this.hideTimeout=0),this.$root.dataSM("shown-before",!0),canAnimate&&this.$root.stop(!0,!0),!this.$root.is(":visible")){this.$root.css({left:t,top:e});var i=this,s=function(){i.$root.css("overflow","")};canAnimate&&this.opts.showFunction?this.opts.showFunction.call(this,this.$root,s):this.$root.show(this.opts.showDuration,s),this.visibleSubMenus[0]=this.$root}},refresh:function(){this.destroy(!0),this.init(!0)},rootKeyDown:function(t){if(this.handleEvents())switch(t.keyCode){case 27:var e=this.activatedItems[0];if(e){this.menuHideAll(),e[0].focus();var i=e.dataSM("sub");i&&this.menuHide(i)}break;case 32:var s=$(t.target);if(s.is("a")&&this.handleItemEvents(s)){var i=s.dataSM("sub");i&&!i.is(":visible")&&(this.itemClick({currentTarget:t.target}),t.preventDefault())}}},rootOut:function(t){if(this.handleEvents()&&!this.isTouchMode()&&t.target!=this.$root[0]&&(this.hideTimeout&&(clearTimeout(this.hideTimeout),this.hideTimeout=0),!this.opts.showOnClick||!this.opts.hideOnClick)){var e=this;this.hideTimeout=setTimeout(function(){e.menuHideAll()},this.opts.hideTimeout)}},rootOver:function(t){this.handleEvents()&&!this.isTouchMode()&&t.target!=this.$root[0]&&this.hideTimeout&&(clearTimeout(this.hideTimeout),this.hideTimeout=0)},winResize:function(t){if(this.handleEvents()){if(!("onorientationchange"in window)||"orientationchange"==t.type){var e=this.isCollapsible();this.wasCollapsible&&e||(this.activatedItems.length&&this.activatedItems[this.activatedItems.length-1][0].blur(),this.menuHideAll()),this.wasCollapsible=e}}else if(this.$disableOverlay){var i=this.$root.offset();this.$disableOverlay.css({top:i.top,left:i.left,width:this.$root.outerWidth(),height:this.$root.outerHeight()})}}}}),$.fn.dataSM=function(t,e){return e?this.data(t+"_smartmenus",e):this.data(t+"_smartmenus")},$.fn.removeDataSM=function(t){return this.removeData(t+"_smartmenus")},$.fn.smartmenus=function(options){if("string"==typeof options){var args=arguments,method=options;return Array.prototype.shift.call(args),this.each(function(){var t=$(this).data("smartmenus");t&&t[method]&&t[method].apply(t,args)})}return this.each(function(){var dataOpts=$(this).data("sm-options")||null;if(dataOpts)try{dataOpts=eval("("+dataOpts+")")}catch(e){dataOpts=null,alert('ERROR\n\nSmartMenus jQuery init:\nInvalid "data-sm-options" attribute value syntax.')}new $.SmartMenus(this,$.extend({},$.fn.smartmenus.defaults,options,dataOpts))})},$.fn.smartmenus.defaults={isPopup:!1,mainMenuSubOffsetX:0,mainMenuSubOffsetY:0,subMenusSubOffsetX:0,subMenusSubOffsetY:0,subMenusMinWidth:"10em",subMenusMaxWidth:"20em",subIndicators:!0,subIndicatorsPos:"append",subIndicatorsText:"",scrollStep:30,scrollAccelerate:!0,showTimeout:250,hideTimeout:500,showDuration:0,showFunction:null,hideDuration:0,hideFunction:function(t,e){t.fadeOut(200,e)},collapsibleShowDuration:0,collapsibleShowFunction:function(t,e){t.slideDown(200,e)},collapsibleHideDuration:0,collapsibleHideFunction:function(t,e){t.slideUp(200,e)},showOnClick:!1,hideOnClick:!0,noMouseOver:!1,keepInViewport:!0,keepHighlighted:!0,markCurrentItem:!1,markCurrentTree:!0,rightToLeftSubMenus:!1,bottomToTopSubMenus:!1,collapsibleBehavior:"default"},$}); \ No newline at end of file diff --git a/Documentation/html/md__r_e_a_d_m_e.html b/Documentation/html/md__r_e_a_d_m_e.html new file mode 100644 index 0000000..7c32d19 --- /dev/null +++ b/Documentation/html/md__r_e_a_d_m_e.html @@ -0,0 +1,99 @@ + + + + + + + +OpenShaderDesigner: OpenShaderDesigner + + + + + + + + + + + + + +
+
+ + + + + + +
+
OpenShaderDesigner 0.0.1 +
+
+
+ + + + + + + + + + +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+
+
+
OpenShaderDesigner
+
+
+

+
+
+ + +
+ + diff --git a/Documentation/html/menu.js b/Documentation/html/menu.js new file mode 100644 index 0000000..0fd1e99 --- /dev/null +++ b/Documentation/html/menu.js @@ -0,0 +1,134 @@ +/* + @licstart The following is the entire license notice for the JavaScript code in this file. + + The MIT License (MIT) + + Copyright (C) 1997-2020 by Dimitri van Heesch + + Permission is hereby granted, free of charge, to any person obtaining a copy of this software + and associated documentation files (the "Software"), to deal in the Software without restriction, + including without limitation the rights to use, copy, modify, merge, publish, distribute, + sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all copies or + substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING + BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, + DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + @licend The above is the entire license notice for the JavaScript code in this file + */ +function initMenu(relPath,searchEnabled,serverSide,searchPage,search,treeview) { + function makeTree(data,relPath) { + let result=''; + if ('children' in data) { + result+='
    '; + for (let i in data.children) { + let url; + const link = data.children[i].url; + if (link.substring(0,1)=='^') { + url = link.substring(1); + } else { + url = relPath+link; + } + result+='
  • '+ + data.children[i].text+''+ + makeTree(data.children[i],relPath)+'
  • '; + } + result+='
'; + } + return result; + } + let searchBoxHtml; + if (searchEnabled) { + if (serverSide) { + searchBoxHtml='
'+ + '
'+ + '
 '+ + ''+ + '
'+ + '
'+ + '
'+ + '
'; + } else { + searchBoxHtml='
'+ + ''+ + ' '+ + ''+ + ''+ + ''+ + ''+ + ''+ + '
'; + } + } + + $('#main-nav').before('
'+ + ''+ + ''+ + '
'); + $('#main-nav').append(makeTree(menudata,relPath)); + $('#main-nav').children(':first').addClass('sm sm-dox').attr('id','main-menu'); + if (searchBoxHtml) { + $('#main-menu').append('
  • '); + } + const $mainMenuState = $('#main-menu-state'); + let prevWidth = 0; + if ($mainMenuState.length) { + const initResizableIfExists = function() { + if (typeof initResizable==='function') initResizable(treeview); + } + // animate mobile menu + $mainMenuState.change(function() { + const $menu = $('#main-menu'); + let options = { duration: 250, step: initResizableIfExists }; + if (this.checked) { + options['complete'] = () => $menu.css('display', 'block'); + $menu.hide().slideDown(options); + } else { + options['complete'] = () => $menu.css('display', 'none'); + $menu.show().slideUp(options); + } + }); + // set default menu visibility + const resetState = function() { + const $menu = $('#main-menu'); + const newWidth = $(window).outerWidth(); + if (newWidth!=prevWidth) { + if ($(window).outerWidth()<768) { + $mainMenuState.prop('checked',false); $menu.hide(); + $('#searchBoxPos1').html(searchBoxHtml); + $('#searchBoxPos2').hide(); + } else { + $menu.show(); + $('#searchBoxPos1').empty(); + $('#searchBoxPos2').html(searchBoxHtml); + $('#searchBoxPos2').show(); + } + if (typeof searchBox!=='undefined') { + searchBox.CloseResultsWindow(); + } + prevWidth = newWidth; + } + } + $(window).ready(function() { resetState(); initResizableIfExists(); }); + $(window).resize(resetState); + } + $('#main-menu').smartmenus(); +} +/* @license-end */ diff --git a/Documentation/html/menudata.js b/Documentation/html/menudata.js new file mode 100644 index 0000000..4f10377 --- /dev/null +++ b/Documentation/html/menudata.js @@ -0,0 +1,53 @@ +/* + @licstart The following is the entire license notice for the JavaScript code in this file. + + The MIT License (MIT) + + Copyright (C) 1997-2020 by Dimitri van Heesch + + Permission is hereby granted, free of charge, to any person obtaining a copy of this software + and associated documentation files (the "Software"), to deal in the Software without restriction, + including without limitation the rights to use, copy, modify, merge, publish, distribute, + sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all copies or + substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING + BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, + DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + @licend The above is the entire license notice for the JavaScript code in this file +*/ +var menudata={children:[ +{text:"Main Page",url:"index.html"}, +{text:"Related Pages",url:"pages.html"}, +{text:"Classes",url:"annotated.html",children:[ +{text:"Class List",url:"annotated.html"}, +{text:"Class Index",url:"classes.html"}, +{text:"Class Hierarchy",url:"hierarchy.html"}, +{text:"Class Members",url:"functions.html",children:[ +{text:"All",url:"functions.html",children:[ +{text:"b",url:"functions.html#index_b"}, +{text:"c",url:"functions.html#index_c"}, +{text:"d",url:"functions.html#index_d"}, +{text:"g",url:"functions.html#index_g"}, +{text:"h",url:"functions.html#index_h"}, +{text:"i",url:"functions.html#index_i"}, +{text:"l",url:"functions.html#index_l"}, +{text:"o",url:"functions.html#index_o"}, +{text:"p",url:"functions.html#index_p"}, +{text:"r",url:"functions.html#index_r"}, +{text:"s",url:"functions.html#index_s"}, +{text:"t",url:"functions.html#index_t"}, +{text:"u",url:"functions.html#index_u"}, +{text:"~",url:"functions.html#index__7E"}]}, +{text:"Functions",url:"functions_func.html"}, +{text:"Variables",url:"functions_vars.html"}, +{text:"Typedefs",url:"functions_type.html"}, +{text:"Enumerations",url:"functions_enum.html"}]}]}, +{text:"Files",url:"files.html",children:[ +{text:"File List",url:"files.html"}]}]} diff --git a/Documentation/html/minus.svg b/Documentation/html/minus.svg new file mode 100644 index 0000000..f70d0c1 --- /dev/null +++ b/Documentation/html/minus.svg @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/Documentation/html/minusd.svg b/Documentation/html/minusd.svg new file mode 100644 index 0000000..5f8e879 --- /dev/null +++ b/Documentation/html/minusd.svg @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/Documentation/html/nav_f.png b/Documentation/html/nav_f.png new file mode 100644 index 0000000..72a58a5 Binary files /dev/null and b/Documentation/html/nav_f.png differ diff --git a/Documentation/html/nav_fd.png b/Documentation/html/nav_fd.png new file mode 100644 index 0000000..032fbdd Binary files /dev/null and b/Documentation/html/nav_fd.png differ diff --git a/Documentation/html/nav_g.png b/Documentation/html/nav_g.png new file mode 100644 index 0000000..2093a23 Binary files /dev/null and b/Documentation/html/nav_g.png differ diff --git a/Documentation/html/nav_h.png b/Documentation/html/nav_h.png new file mode 100644 index 0000000..33389b1 Binary files /dev/null and b/Documentation/html/nav_h.png differ diff --git a/Documentation/html/nav_hd.png b/Documentation/html/nav_hd.png new file mode 100644 index 0000000..de80f18 Binary files /dev/null and b/Documentation/html/nav_hd.png differ diff --git a/Documentation/html/navtree.css b/Documentation/html/navtree.css new file mode 100644 index 0000000..69211d4 --- /dev/null +++ b/Documentation/html/navtree.css @@ -0,0 +1,149 @@ +#nav-tree .children_ul { + margin:0; + padding:4px; +} + +#nav-tree ul { + list-style:none outside none; + margin:0px; + padding:0px; +} + +#nav-tree li { + white-space:nowrap; + margin:0px; + padding:0px; +} + +#nav-tree .plus { + margin:0px; +} + +#nav-tree .selected { + background-image: url('tab_a.png'); + background-repeat:repeat-x; + color: var(--nav-text-active-color); + text-shadow: var(--nav-text-active-shadow); +} + +#nav-tree .selected .arrow { + color: var(--nav-arrow-selected-color); + text-shadow: none; +} + +#nav-tree img { + margin:0px; + padding:0px; + border:0px; + vertical-align: middle; +} + +#nav-tree a { + text-decoration:none; + padding:0px; + margin:0px; +} + +#nav-tree .label { + margin:0px; + padding:0px; + font: 12px var(--font-family-nav); +} + +#nav-tree .label a { + padding:2px; +} + +#nav-tree .selected a { + text-decoration:none; + color:var(--nav-text-active-color); +} + +#nav-tree .children_ul { + margin:0px; + padding:0px; +} + +#nav-tree .item { + margin:0px; + padding:0px; +} + +#nav-tree { + padding: 0px 0px; + font-size:14px; + overflow:auto; +} + +#doc-content { + overflow:auto; + display:block; + padding:0px; + margin:0px; + -webkit-overflow-scrolling : touch; /* iOS 5+ */ +} + +#side-nav { + padding:0 6px 0 0; + margin: 0px; + display:block; + position: absolute; + left: 0px; + width: $width; + overflow : hidden; +} + +.ui-resizable .ui-resizable-handle { + display:block; +} + +.ui-resizable-e { + background-image:var(--nav-splitbar-image); + background-size:100%; + background-repeat:repeat-y; + background-attachment: scroll; + cursor:ew-resize; + height:100%; + right:0; + top:0; + width:6px; +} + +.ui-resizable-handle { + display:none; + font-size:0.1px; + position:absolute; + z-index:1; +} + +#nav-tree-contents { + margin: 6px 0px 0px 0px; +} + +#nav-tree { + background-repeat:repeat-x; + background-color: var(--nav-background-color); + -webkit-overflow-scrolling : touch; /* iOS 5+ */ +} + +#nav-sync { + position:absolute; + top:5px; + right:24px; + z-index:0; +} + +#nav-sync img { + opacity:0.3; +} + +#nav-sync img:hover { + opacity:0.9; +} + +@media print +{ + #nav-tree { display: none; } + div.ui-resizable-handle { display: none; position: relative; } +} + diff --git a/Documentation/html/open.png b/Documentation/html/open.png new file mode 100644 index 0000000..30f75c7 Binary files /dev/null and b/Documentation/html/open.png differ diff --git a/Documentation/html/pages.html b/Documentation/html/pages.html new file mode 100644 index 0000000..c573981 --- /dev/null +++ b/Documentation/html/pages.html @@ -0,0 +1,102 @@ + + + + + + + +OpenShaderDesigner: Related Pages + + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    OpenShaderDesigner 0.0.1 +
    +
    +
    + + + + + + + + +
    +
    + + +
    +
    + + +
    +
    +
    +
    +
    +
    Loading...
    +
    Searching...
    +
    No Matches
    +
    +
    +
    +
    + +
    +
    Related Pages
    +
    +
    +
    Here is a list of all related documentation pages:
    +
    + + +
    + + diff --git a/Documentation/html/plus.svg b/Documentation/html/plus.svg new file mode 100644 index 0000000..0752016 --- /dev/null +++ b/Documentation/html/plus.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/Documentation/html/plusd.svg b/Documentation/html/plusd.svg new file mode 100644 index 0000000..0c65bfe --- /dev/null +++ b/Documentation/html/plusd.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/Documentation/html/resize.js b/Documentation/html/resize.js new file mode 100644 index 0000000..7d8cdc7 --- /dev/null +++ b/Documentation/html/resize.js @@ -0,0 +1,145 @@ +/* + @licstart The following is the entire license notice for the JavaScript code in this file. + + The MIT License (MIT) + + Copyright (C) 1997-2020 by Dimitri van Heesch + + Permission is hereby granted, free of charge, to any person obtaining a copy of this software + and associated documentation files (the "Software"), to deal in the Software without restriction, + including without limitation the rights to use, copy, modify, merge, publish, distribute, + sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all copies or + substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING + BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, + DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + @licend The above is the entire license notice for the JavaScript code in this file + */ + +function initResizable(treeview) { + let sidenav,navtree,content,header,footer,barWidth=6; + const RESIZE_COOKIE_NAME = ''+'width'; + + function resizeWidth() { + const sidenavWidth = $(sidenav).outerWidth(); + content.css({marginLeft:parseInt(sidenavWidth)+"px"}); + if (typeof page_layout!=='undefined' && page_layout==1) { + footer.css({marginLeft:parseInt(sidenavWidth)+"px"}); + } + Cookie.writeSetting(RESIZE_COOKIE_NAME,sidenavWidth-barWidth); + } + + function restoreWidth(navWidth) { + content.css({marginLeft:parseInt(navWidth)+barWidth+"px"}); + if (typeof page_layout!=='undefined' && page_layout==1) { + footer.css({marginLeft:parseInt(navWidth)+barWidth+"px"}); + } + sidenav.css({width:navWidth + "px"}); + } + + function resizeHeight(treeview) { + const headerHeight = header.outerHeight(); + const windowHeight = $(window).height(); + let contentHeight; + if (treeview) + { + const footerHeight = footer.outerHeight(); + let navtreeHeight,sideNavHeight; + if (typeof page_layout==='undefined' || page_layout==0) { /* DISABLE_INDEX=NO */ + contentHeight = windowHeight - headerHeight - footerHeight; + navtreeHeight = contentHeight; + sideNavHeight = contentHeight; + } else if (page_layout==1) { /* DISABLE_INDEX=YES */ + contentHeight = windowHeight - footerHeight; + navtreeHeight = windowHeight - headerHeight; + sideNavHeight = windowHeight; + } + navtree.css({height:navtreeHeight + "px"}); + sidenav.css({height:sideNavHeight + "px"}); + } + else + { + contentHeight = windowHeight - headerHeight; + } + content.css({height:contentHeight + "px"}); + if (location.hash.slice(1)) { + (document.getElementById(location.hash.slice(1))||document.body).scrollIntoView(); + } + } + + function collapseExpand() { + let newWidth; + if (sidenav.width()>0) { + newWidth=0; + } else { + const width = Cookie.readSetting(RESIZE_COOKIE_NAME,250); + newWidth = (width>250 && width<$(window).width()) ? width : 250; + } + restoreWidth(newWidth); + const sidenavWidth = $(sidenav).outerWidth(); + Cookie.writeSetting(RESIZE_COOKIE_NAME,sidenavWidth-barWidth); + } + + header = $("#top"); + content = $("#doc-content"); + footer = $("#nav-path"); + sidenav = $("#side-nav"); + if (!treeview) { +// title = $("#titlearea"); +// titleH = $(title).height(); +// let animating = false; +// content.on("scroll", function() { +// slideOpts = { duration: 200, +// step: function() { +// contentHeight = $(window).height() - header.outerHeight(); +// content.css({ height : contentHeight + "px" }); +// }, +// done: function() { animating=false; } +// }; +// if (content.scrollTop()>titleH && title.css('display')!='none' && !animating) { +// title.slideUp(slideOpts); +// animating=true; +// } else if (content.scrollTop()<=titleH && title.css('display')=='none' && !animating) { +// title.slideDown(slideOpts); +// animating=true; +// } +// }); + } else { + navtree = $("#nav-tree"); + $(".side-nav-resizable").resizable({resize: function(e, ui) { resizeWidth(); } }); + $(sidenav).resizable({ minWidth: 0 }); + } + $(window).resize(function() { resizeHeight(treeview); }); + if (treeview) + { + const device = navigator.userAgent.toLowerCase(); + const touch_device = device.match(/(iphone|ipod|ipad|android)/); + if (touch_device) { /* wider split bar for touch only devices */ + $(sidenav).css({ paddingRight:'20px' }); + $('.ui-resizable-e').css({ width:'20px' }); + $('#nav-sync').css({ right:'34px' }); + barWidth=20; + } + const width = Cookie.readSetting(RESIZE_COOKIE_NAME,250); + if (width) { restoreWidth(width); } else { resizeWidth(); } + } + resizeHeight(treeview); + const url = location.href; + const i=url.indexOf("#"); + if (i>=0) window.location.hash=url.substr(i); + const _preventDefault = function(evt) { evt.preventDefault(); }; + if (treeview) + { + $("#splitbar").bind("dragstart", _preventDefault).bind("selectstart", _preventDefault); + $(".ui-resizable-handle").dblclick(collapseExpand); + } + $(window).on('load',resizeHeight); +} +/* @license-end */ diff --git a/Documentation/html/search/all_0.js b/Documentation/html/search/all_0.js new file mode 100644 index 0000000..9270ee0 --- /dev/null +++ b/Documentation/html/search/all_0.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['_5fimpleventhandler_0',['_ImplEventHandler',['../class_open_shader_designer_1_1___impl_event_handler.html',1,'OpenShaderDesigner']]] +]; diff --git a/Documentation/html/search/all_1.js b/Documentation/html/search/all_1.js new file mode 100644 index 0000000..3f0e091 --- /dev/null +++ b/Documentation/html/search/all_1.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['add_0',['Add',['../struct_open_shader_designer_1_1_nodes_1_1_math_1_1_add.html',1,'OpenShaderDesigner::Nodes::Math']]] +]; diff --git a/Documentation/html/search/all_10.js b/Documentation/html/search/all_10.js new file mode 100644 index 0000000..78b83fa --- /dev/null +++ b/Documentation/html/search/all_10.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['unregisterhandler_0',['UnregisterHandler',['../class_open_shader_designer_1_1_event_system.html#a46be97970de801727824e3ac8cc93872',1,'OpenShaderDesigner::EventSystem']]] +]; diff --git a/Documentation/html/search/all_11.js b/Documentation/html/search/all_11.js new file mode 100644 index 0000000..8286971 --- /dev/null +++ b/Documentation/html/search/all_11.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['window_0',['Window',['../class_open_shader_designer_1_1_window.html',1,'OpenShaderDesigner']]] +]; diff --git a/Documentation/html/search/all_12.js b/Documentation/html/search/all_12.js new file mode 100644 index 0000000..7fd0b7c --- /dev/null +++ b/Documentation/html/search/all_12.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['_7ebufferobject_0',['~BufferObject',['../class_g_l_w_1_1_buffer_object.html#aa9eedd875b7ea8f657e58452f61e643d',1,'GLW::BufferObject']]] +]; diff --git a/Documentation/html/search/all_13.js b/Documentation/html/search/all_13.js new file mode 100644 index 0000000..7fd0b7c --- /dev/null +++ b/Documentation/html/search/all_13.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['_7ebufferobject_0',['~BufferObject',['../class_g_l_w_1_1_buffer_object.html#aa9eedd875b7ea8f657e58452f61e643d',1,'GLW::BufferObject']]] +]; diff --git a/Documentation/html/search/all_2.js b/Documentation/html/search/all_2.js new file mode 100644 index 0000000..eb6ca40 --- /dev/null +++ b/Documentation/html/search/all_2.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['bufferobject_0',['BufferObject',['../class_g_l_w_1_1_buffer_object.html',1,'GLW::BufferObject< T, U, S >'],['../class_g_l_w_1_1_buffer_object.html#a965f2c34ca5291ae351bb32226a1bed8',1,'GLW::BufferObject::BufferObject(SizeT size, void *data=nullptr)'],['../class_g_l_w_1_1_buffer_object.html#a57351dac9127dc4dab26ab1b991ec79f',1,'GLW::BufferObject::BufferObject(BufferObject &&other)'],['../class_g_l_w_1_1_buffer_object.html#a16dc15b38a5c5d47b36c449d5945bd7a',1,'GLW::BufferObject::BufferObject(const BufferObject &other)']]] +]; diff --git a/Documentation/html/search/all_3.js b/Documentation/html/search/all_3.js new file mode 100644 index 0000000..3c55651 --- /dev/null +++ b/Documentation/html/search/all_3.js @@ -0,0 +1,8 @@ +var searchData= +[ + ['close_0',['Close',['../class_open_shader_designer_1_1_editor_window.html#a5df4621355612a487578521525029aa6',1,'OpenShaderDesigner::EditorWindow']]], + ['configuration_1',['Configuration',['../struct_open_shader_designer_1_1_window_1_1_configuration.html',1,'OpenShaderDesigner::Window']]], + ['console_2',['Console',['../class_open_shader_designer_1_1_console.html',1,'OpenShaderDesigner']]], + ['consolewindow_3',['ConsoleWindow',['../class_open_shader_designer_1_1_console_window.html',1,'OpenShaderDesigner']]], + ['constant_4',['Constant',['../struct_open_shader_designer_1_1_nodes_1_1_math_1_1_constant.html',1,'OpenShaderDesigner::Nodes::Math']]] +]; diff --git a/Documentation/html/search/all_4.js b/Documentation/html/search/all_4.js new file mode 100644 index 0000000..abcccc5 --- /dev/null +++ b/Documentation/html/search/all_4.js @@ -0,0 +1,6 @@ +var searchData= +[ + ['draw_0',['Draw',['../class_open_shader_designer_1_1_editor_window.html#a501528be936bdf479359021308fb0d31',1,'OpenShaderDesigner::EditorWindow']]], + ['drawmenu_1',['DrawMenu',['../class_open_shader_designer_1_1_console_window.html#a14ecc944c576eeb9f3ae4d524be62b52',1,'OpenShaderDesigner::ConsoleWindow::DrawMenu()'],['../class_open_shader_designer_1_1_editor_window.html#a6c229ca70221f672315f9a4f0c7be0c0',1,'OpenShaderDesigner::EditorWindow::DrawMenu()']]], + ['drawwindow_2',['DrawWindow',['../class_open_shader_designer_1_1_console_window.html#aa4f7904f19e843905b02c1ee399a0e15',1,'OpenShaderDesigner::ConsoleWindow::DrawWindow()'],['../class_open_shader_designer_1_1_editor_window.html#a058742ce762d782440f595497e5bfbff',1,'OpenShaderDesigner::EditorWindow::DrawWindow()'],['../class_open_shader_designer_1_1_profiler.html#a26186e7726d5811f423c9cee06aec1d5',1,'OpenShaderDesigner::Profiler::DrawWindow()'],['../class_open_shader_designer_1_1_shader_graph.html#af028ed8ea55d12a1bb2bcf51c817398b',1,'OpenShaderDesigner::ShaderGraph::DrawWindow()'],['../class_open_shader_designer_1_1_inspector.html#a69fb8726df2442514a65dc29a9660c24',1,'OpenShaderDesigner::Inspector::DrawWindow()']]] +]; diff --git a/Documentation/html/search/all_5.js b/Documentation/html/search/all_5.js new file mode 100644 index 0000000..85f39e6 --- /dev/null +++ b/Documentation/html/search/all_5.js @@ -0,0 +1,11 @@ +var searchData= +[ + ['editorsystem_0',['EditorSystem',['../class_open_shader_designer_1_1_editor_system.html',1,'OpenShaderDesigner']]], + ['editorwindow_1',['EditorWindow',['../class_open_shader_designer_1_1_editor_window.html',1,'OpenShaderDesigner']]], + ['engine_2',['Engine',['../class_open_shader_designer_1_1_engine.html',1,'OpenShaderDesigner']]], + ['event_3',['Event',['../struct_open_shader_designer_1_1_event.html',1,'OpenShaderDesigner']]], + ['eventhandler_4',['EventHandler',['../class_open_shader_designer_1_1_event_handler.html',1,'OpenShaderDesigner']]], + ['eventhandler_3c_20beginframe_20_3e_5',['EventHandler< BeginFrame >',['../class_open_shader_designer_1_1_event_handler.html',1,'OpenShaderDesigner']]], + ['eventhandler_3c_20endframe_20_3e_6',['EventHandler< EndFrame >',['../class_open_shader_designer_1_1_event_handler.html',1,'OpenShaderDesigner']]], + ['eventsystem_7',['EventSystem',['../class_open_shader_designer_1_1_event_system.html',1,'OpenShaderDesigner']]] +]; diff --git a/Documentation/html/search/all_6.js b/Documentation/html/search/all_6.js new file mode 100644 index 0000000..63f6c4b --- /dev/null +++ b/Documentation/html/search/all_6.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['getid_0',['GetID',['../struct_open_shader_designer_1_1_event.html#a1920b3e03c8e47a463f403cd7c29dc26',1,'OpenShaderDesigner::Event']]] +]; diff --git a/Documentation/html/search/all_7.js b/Documentation/html/search/all_7.js new file mode 100644 index 0000000..1d52b24 --- /dev/null +++ b/Documentation/html/search/all_7.js @@ -0,0 +1,6 @@ +var searchData= +[ + ['handledtype_0',['HandledType',['../class_open_shader_designer_1_1_event_handler.html#ac7326c1ee1a04cf764475dc7c74dc021',1,'OpenShaderDesigner::EventHandler']]], + ['handleevent_1',['HandleEvent',['../class_open_shader_designer_1_1_event_handler.html#a3f8d4130cfbb6c7b1f6be52d0d6e1fae',1,'OpenShaderDesigner::EventHandler']]], + ['hash_2',['Hash',['../struct_open_shader_designer_1_1_pin_ptr_1_1_hash.html',1,'OpenShaderDesigner::PinPtr']]] +]; diff --git a/Documentation/html/search/all_8.js b/Documentation/html/search/all_8.js new file mode 100644 index 0000000..b865583 --- /dev/null +++ b/Documentation/html/search/all_8.js @@ -0,0 +1,6 @@ +var searchData= +[ + ['imguicolor_0',['ImGuiColor',['../class_open_shader_designer_1_1_console.html#abc25e7d9ad33fdcc95fe11df9a9c3fc4',1,'OpenShaderDesigner::Console']]], + ['inspector_1',['Inspector',['../class_open_shader_designer_1_1_inspector.html',1,'OpenShaderDesigner']]], + ['isopen_2',['IsOpen',['../class_open_shader_designer_1_1_editor_window.html#af3ea05326684e2f58d54805ce10570a6',1,'OpenShaderDesigner::EditorWindow']]] +]; diff --git a/Documentation/html/search/all_9.js b/Documentation/html/search/all_9.js new file mode 100644 index 0000000..a55986a --- /dev/null +++ b/Documentation/html/search/all_9.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['log_0',['Log',['../class_open_shader_designer_1_1_console.html#a4b0e458b796c898279bcb8fedf960920',1,'OpenShaderDesigner::Console']]] +]; diff --git a/Documentation/html/search/all_a.js b/Documentation/html/search/all_a.js new file mode 100644 index 0000000..65ed005 --- /dev/null +++ b/Documentation/html/search/all_a.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['node_0',['Node',['../struct_open_shader_designer_1_1_node.html',1,'OpenShaderDesigner']]] +]; diff --git a/Documentation/html/search/all_b.js b/Documentation/html/search/all_b.js new file mode 100644 index 0000000..b67abdc --- /dev/null +++ b/Documentation/html/search/all_b.js @@ -0,0 +1,9 @@ +var searchData= +[ + ['onclose_0',['OnClose',['../class_open_shader_designer_1_1_editor_window.html#a6dc0b192488187ddbde44d7f0b5fc0f7',1,'OpenShaderDesigner::EditorWindow']]], + ['onopen_1',['OnOpen',['../class_open_shader_designer_1_1_editor_window.html#a2e68f7186c2ceb3ea3dd5618045c6ab7',1,'OpenShaderDesigner::EditorWindow::OnOpen()'],['../class_open_shader_designer_1_1_shader_graph.html#ab165317b9a0b95648df1e7009c220a04',1,'OpenShaderDesigner::ShaderGraph::OnOpen()']]], + ['open_2',['Open',['../class_open_shader_designer_1_1_editor_window.html#a858a412f2f8c652773885d217410d332',1,'OpenShaderDesigner::EditorWindow']]], + ['openshaderdesigner_3',['OpenShaderDesigner',['../md__r_e_a_d_m_e.html',1,'']]], + ['operator_20bool_4',['operator bool',['../class_g_l_w_1_1_buffer_object.html#a5d780b73c735d1a17dddd5bf67c8c0df',1,'GLW::BufferObject']]], + ['operator_3d_5',['operator=',['../class_g_l_w_1_1_buffer_object.html#a837d2b9cf2b2b4eaffa20d5c984ec1b0',1,'GLW::BufferObject::operator=(const BufferObject &other)'],['../class_g_l_w_1_1_buffer_object.html#a5911e71647b4b45831751f4e150ff032',1,'GLW::BufferObject::operator=(BufferObject &&other) noexcept']]] +]; diff --git a/Documentation/html/search/all_c.js b/Documentation/html/search/all_c.js new file mode 100644 index 0000000..836ae03 --- /dev/null +++ b/Documentation/html/search/all_c.js @@ -0,0 +1,7 @@ +var searchData= +[ + ['pin_0',['Pin',['../struct_open_shader_designer_1_1_pin.html',1,'OpenShaderDesigner']]], + ['pinptr_1',['PinPtr',['../struct_open_shader_designer_1_1_pin_ptr.html',1,'OpenShaderDesigner']]], + ['postevent_2',['PostEvent',['../class_open_shader_designer_1_1_event_system.html#a55942d1d9b1d427c40aeade3b0ee8600',1,'OpenShaderDesigner::EventSystem']]], + ['profiler_3',['Profiler',['../class_open_shader_designer_1_1_profiler.html',1,'OpenShaderDesigner']]] +]; diff --git a/Documentation/html/search/all_d.js b/Documentation/html/search/all_d.js new file mode 100644 index 0000000..8252daa --- /dev/null +++ b/Documentation/html/search/all_d.js @@ -0,0 +1,5 @@ +var searchData= +[ + ['registerhandler_0',['RegisterHandler',['../class_open_shader_designer_1_1_event_system.html#ad7aaf19637c81922d02dafe92ff1982d',1,'OpenShaderDesigner::EventSystem']]], + ['renderer_1',['Renderer',['../class_open_shader_designer_1_1_renderer.html',1,'OpenShaderDesigner']]] +]; diff --git a/Documentation/html/search/all_e.js b/Documentation/html/search/all_e.js new file mode 100644 index 0000000..edc81cd --- /dev/null +++ b/Documentation/html/search/all_e.js @@ -0,0 +1,9 @@ +var searchData= +[ + ['setting_0',['Setting',['../class_open_shader_designer_1_1_console.html#a4da63ca14b9e8f7a582df081623b6406',1,'OpenShaderDesigner::Console']]], + ['settingnames_1',['SettingNames',['../class_open_shader_designer_1_1_console.html#a858d18576b3e7e542d4723316ae71e21',1,'OpenShaderDesigner::Console']]], + ['severities_2',['Severities',['../class_open_shader_designer_1_1_console.html#abac05fdca9513434894c10df2473d8b9',1,'OpenShaderDesigner::Console']]], + ['severity_3',['Severity',['../class_open_shader_designer_1_1_console.html#a880eae5d076afe686248bbb0f6a83771',1,'OpenShaderDesigner::Console']]], + ['severitycolors_4',['SeverityColors',['../class_open_shader_designer_1_1_console.html#a1a476dcb9b07e3ad0d54e08775118b35',1,'OpenShaderDesigner::Console']]], + ['shadergraph_5',['ShaderGraph',['../class_open_shader_designer_1_1_shader_graph.html',1,'OpenShaderDesigner']]] +]; diff --git a/Documentation/html/search/all_f.js b/Documentation/html/search/all_f.js new file mode 100644 index 0000000..0ec808a --- /dev/null +++ b/Documentation/html/search/all_f.js @@ -0,0 +1,5 @@ +var searchData= +[ + ['timer_0',['Timer',['../class_open_shader_designer_1_1_timer.html',1,'OpenShaderDesigner']]], + ['title_1',['Title',['../class_open_shader_designer_1_1_editor_window.html#a2e557a422d0e4e003f85fb9905b66980',1,'OpenShaderDesigner::EditorWindow']]] +]; diff --git a/Documentation/html/search/classes_0.js b/Documentation/html/search/classes_0.js new file mode 100644 index 0000000..9270ee0 --- /dev/null +++ b/Documentation/html/search/classes_0.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['_5fimpleventhandler_0',['_ImplEventHandler',['../class_open_shader_designer_1_1___impl_event_handler.html',1,'OpenShaderDesigner']]] +]; diff --git a/Documentation/html/search/classes_1.js b/Documentation/html/search/classes_1.js new file mode 100644 index 0000000..3f0e091 --- /dev/null +++ b/Documentation/html/search/classes_1.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['add_0',['Add',['../struct_open_shader_designer_1_1_nodes_1_1_math_1_1_add.html',1,'OpenShaderDesigner::Nodes::Math']]] +]; diff --git a/Documentation/html/search/classes_2.js b/Documentation/html/search/classes_2.js new file mode 100644 index 0000000..3e8db4e --- /dev/null +++ b/Documentation/html/search/classes_2.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['bufferobject_0',['BufferObject',['../class_g_l_w_1_1_buffer_object.html',1,'GLW']]] +]; diff --git a/Documentation/html/search/classes_3.js b/Documentation/html/search/classes_3.js new file mode 100644 index 0000000..8883fe7 --- /dev/null +++ b/Documentation/html/search/classes_3.js @@ -0,0 +1,7 @@ +var searchData= +[ + ['configuration_0',['Configuration',['../struct_open_shader_designer_1_1_window_1_1_configuration.html',1,'OpenShaderDesigner::Window']]], + ['console_1',['Console',['../class_open_shader_designer_1_1_console.html',1,'OpenShaderDesigner']]], + ['consolewindow_2',['ConsoleWindow',['../class_open_shader_designer_1_1_console_window.html',1,'OpenShaderDesigner']]], + ['constant_3',['Constant',['../struct_open_shader_designer_1_1_nodes_1_1_math_1_1_constant.html',1,'OpenShaderDesigner::Nodes::Math']]] +]; diff --git a/Documentation/html/search/classes_4.js b/Documentation/html/search/classes_4.js new file mode 100644 index 0000000..85f39e6 --- /dev/null +++ b/Documentation/html/search/classes_4.js @@ -0,0 +1,11 @@ +var searchData= +[ + ['editorsystem_0',['EditorSystem',['../class_open_shader_designer_1_1_editor_system.html',1,'OpenShaderDesigner']]], + ['editorwindow_1',['EditorWindow',['../class_open_shader_designer_1_1_editor_window.html',1,'OpenShaderDesigner']]], + ['engine_2',['Engine',['../class_open_shader_designer_1_1_engine.html',1,'OpenShaderDesigner']]], + ['event_3',['Event',['../struct_open_shader_designer_1_1_event.html',1,'OpenShaderDesigner']]], + ['eventhandler_4',['EventHandler',['../class_open_shader_designer_1_1_event_handler.html',1,'OpenShaderDesigner']]], + ['eventhandler_3c_20beginframe_20_3e_5',['EventHandler< BeginFrame >',['../class_open_shader_designer_1_1_event_handler.html',1,'OpenShaderDesigner']]], + ['eventhandler_3c_20endframe_20_3e_6',['EventHandler< EndFrame >',['../class_open_shader_designer_1_1_event_handler.html',1,'OpenShaderDesigner']]], + ['eventsystem_7',['EventSystem',['../class_open_shader_designer_1_1_event_system.html',1,'OpenShaderDesigner']]] +]; diff --git a/Documentation/html/search/classes_5.js b/Documentation/html/search/classes_5.js new file mode 100644 index 0000000..3eada92 --- /dev/null +++ b/Documentation/html/search/classes_5.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['hash_0',['Hash',['../struct_open_shader_designer_1_1_pin_ptr_1_1_hash.html',1,'OpenShaderDesigner::PinPtr']]] +]; diff --git a/Documentation/html/search/classes_6.js b/Documentation/html/search/classes_6.js new file mode 100644 index 0000000..5439302 --- /dev/null +++ b/Documentation/html/search/classes_6.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['inspector_0',['Inspector',['../class_open_shader_designer_1_1_inspector.html',1,'OpenShaderDesigner']]] +]; diff --git a/Documentation/html/search/classes_7.js b/Documentation/html/search/classes_7.js new file mode 100644 index 0000000..65ed005 --- /dev/null +++ b/Documentation/html/search/classes_7.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['node_0',['Node',['../struct_open_shader_designer_1_1_node.html',1,'OpenShaderDesigner']]] +]; diff --git a/Documentation/html/search/classes_8.js b/Documentation/html/search/classes_8.js new file mode 100644 index 0000000..151549c --- /dev/null +++ b/Documentation/html/search/classes_8.js @@ -0,0 +1,6 @@ +var searchData= +[ + ['pin_0',['Pin',['../struct_open_shader_designer_1_1_pin.html',1,'OpenShaderDesigner']]], + ['pinptr_1',['PinPtr',['../struct_open_shader_designer_1_1_pin_ptr.html',1,'OpenShaderDesigner']]], + ['profiler_2',['Profiler',['../class_open_shader_designer_1_1_profiler.html',1,'OpenShaderDesigner']]] +]; diff --git a/Documentation/html/search/classes_9.js b/Documentation/html/search/classes_9.js new file mode 100644 index 0000000..f1b5e19 --- /dev/null +++ b/Documentation/html/search/classes_9.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['renderer_0',['Renderer',['../class_open_shader_designer_1_1_renderer.html',1,'OpenShaderDesigner']]] +]; diff --git a/Documentation/html/search/classes_a.js b/Documentation/html/search/classes_a.js new file mode 100644 index 0000000..1121ecf --- /dev/null +++ b/Documentation/html/search/classes_a.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['shadergraph_0',['ShaderGraph',['../class_open_shader_designer_1_1_shader_graph.html',1,'OpenShaderDesigner']]] +]; diff --git a/Documentation/html/search/classes_b.js b/Documentation/html/search/classes_b.js new file mode 100644 index 0000000..a7be346 --- /dev/null +++ b/Documentation/html/search/classes_b.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['timer_0',['Timer',['../class_open_shader_designer_1_1_timer.html',1,'OpenShaderDesigner']]] +]; diff --git a/Documentation/html/search/classes_c.js b/Documentation/html/search/classes_c.js new file mode 100644 index 0000000..8286971 --- /dev/null +++ b/Documentation/html/search/classes_c.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['window_0',['Window',['../class_open_shader_designer_1_1_window.html',1,'OpenShaderDesigner']]] +]; diff --git a/Documentation/html/search/classes_d.js b/Documentation/html/search/classes_d.js new file mode 100644 index 0000000..1121ecf --- /dev/null +++ b/Documentation/html/search/classes_d.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['shadergraph_0',['ShaderGraph',['../class_open_shader_designer_1_1_shader_graph.html',1,'OpenShaderDesigner']]] +]; diff --git a/Documentation/html/search/classes_e.js b/Documentation/html/search/classes_e.js new file mode 100644 index 0000000..84a5f11 --- /dev/null +++ b/Documentation/html/search/classes_e.js @@ -0,0 +1,5 @@ +var searchData= +[ + ['timer_0',['Timer',['../class_open_shader_designer_1_1_timer.html',1,'OpenShaderDesigner']]], + ['traverser_1',['Traverser',['../class_directed_graph_1_1_traverser.html',1,'DirectedGraph']]] +]; diff --git a/Documentation/html/search/classes_f.js b/Documentation/html/search/classes_f.js new file mode 100644 index 0000000..8286971 --- /dev/null +++ b/Documentation/html/search/classes_f.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['window_0',['Window',['../class_open_shader_designer_1_1_window.html',1,'OpenShaderDesigner']]] +]; diff --git a/Documentation/html/search/close.svg b/Documentation/html/search/close.svg new file mode 100644 index 0000000..337d6cc --- /dev/null +++ b/Documentation/html/search/close.svg @@ -0,0 +1,18 @@ + + + + + + diff --git a/Documentation/html/search/enums_0.js b/Documentation/html/search/enums_0.js new file mode 100644 index 0000000..554e786 --- /dev/null +++ b/Documentation/html/search/enums_0.js @@ -0,0 +1,5 @@ +var searchData= +[ + ['setting_0',['Setting',['../class_open_shader_designer_1_1_console.html#a4da63ca14b9e8f7a582df081623b6406',1,'OpenShaderDesigner::Console']]], + ['severity_1',['Severity',['../class_open_shader_designer_1_1_console.html#a880eae5d076afe686248bbb0f6a83771',1,'OpenShaderDesigner::Console']]] +]; diff --git a/Documentation/html/search/files_0.js b/Documentation/html/search/files_0.js new file mode 100644 index 0000000..e43293a --- /dev/null +++ b/Documentation/html/search/files_0.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['templateutils_2eh_0',['template_utils.h',['../_template_utils_8h.html',1,'']]] +]; diff --git a/Documentation/html/search/functions_0.js b/Documentation/html/search/functions_0.js new file mode 100644 index 0000000..33df335 --- /dev/null +++ b/Documentation/html/search/functions_0.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['bufferobject_0',['BufferObject',['../class_g_l_w_1_1_buffer_object.html#a965f2c34ca5291ae351bb32226a1bed8',1,'GLW::BufferObject::BufferObject(SizeT size, void *data=nullptr)'],['../class_g_l_w_1_1_buffer_object.html#a57351dac9127dc4dab26ab1b991ec79f',1,'GLW::BufferObject::BufferObject(BufferObject &&other)'],['../class_g_l_w_1_1_buffer_object.html#a16dc15b38a5c5d47b36c449d5945bd7a',1,'GLW::BufferObject::BufferObject(const BufferObject &other)']]] +]; diff --git a/Documentation/html/search/functions_1.js b/Documentation/html/search/functions_1.js new file mode 100644 index 0000000..ee8dd89 --- /dev/null +++ b/Documentation/html/search/functions_1.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['close_0',['Close',['../class_open_shader_designer_1_1_editor_window.html#a5df4621355612a487578521525029aa6',1,'OpenShaderDesigner::EditorWindow']]] +]; diff --git a/Documentation/html/search/functions_2.js b/Documentation/html/search/functions_2.js new file mode 100644 index 0000000..abcccc5 --- /dev/null +++ b/Documentation/html/search/functions_2.js @@ -0,0 +1,6 @@ +var searchData= +[ + ['draw_0',['Draw',['../class_open_shader_designer_1_1_editor_window.html#a501528be936bdf479359021308fb0d31',1,'OpenShaderDesigner::EditorWindow']]], + ['drawmenu_1',['DrawMenu',['../class_open_shader_designer_1_1_console_window.html#a14ecc944c576eeb9f3ae4d524be62b52',1,'OpenShaderDesigner::ConsoleWindow::DrawMenu()'],['../class_open_shader_designer_1_1_editor_window.html#a6c229ca70221f672315f9a4f0c7be0c0',1,'OpenShaderDesigner::EditorWindow::DrawMenu()']]], + ['drawwindow_2',['DrawWindow',['../class_open_shader_designer_1_1_console_window.html#aa4f7904f19e843905b02c1ee399a0e15',1,'OpenShaderDesigner::ConsoleWindow::DrawWindow()'],['../class_open_shader_designer_1_1_editor_window.html#a058742ce762d782440f595497e5bfbff',1,'OpenShaderDesigner::EditorWindow::DrawWindow()'],['../class_open_shader_designer_1_1_profiler.html#a26186e7726d5811f423c9cee06aec1d5',1,'OpenShaderDesigner::Profiler::DrawWindow()'],['../class_open_shader_designer_1_1_shader_graph.html#af028ed8ea55d12a1bb2bcf51c817398b',1,'OpenShaderDesigner::ShaderGraph::DrawWindow()'],['../class_open_shader_designer_1_1_inspector.html#a69fb8726df2442514a65dc29a9660c24',1,'OpenShaderDesigner::Inspector::DrawWindow()']]] +]; diff --git a/Documentation/html/search/functions_3.js b/Documentation/html/search/functions_3.js new file mode 100644 index 0000000..63f6c4b --- /dev/null +++ b/Documentation/html/search/functions_3.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['getid_0',['GetID',['../struct_open_shader_designer_1_1_event.html#a1920b3e03c8e47a463f403cd7c29dc26',1,'OpenShaderDesigner::Event']]] +]; diff --git a/Documentation/html/search/functions_4.js b/Documentation/html/search/functions_4.js new file mode 100644 index 0000000..9d158ef --- /dev/null +++ b/Documentation/html/search/functions_4.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['handleevent_0',['HandleEvent',['../class_open_shader_designer_1_1_event_handler.html#a3f8d4130cfbb6c7b1f6be52d0d6e1fae',1,'OpenShaderDesigner::EventHandler']]] +]; diff --git a/Documentation/html/search/functions_5.js b/Documentation/html/search/functions_5.js new file mode 100644 index 0000000..56c5bf9 --- /dev/null +++ b/Documentation/html/search/functions_5.js @@ -0,0 +1,5 @@ +var searchData= +[ + ['imguicolor_0',['ImGuiColor',['../class_open_shader_designer_1_1_console.html#abc25e7d9ad33fdcc95fe11df9a9c3fc4',1,'OpenShaderDesigner::Console']]], + ['isopen_1',['IsOpen',['../class_open_shader_designer_1_1_editor_window.html#af3ea05326684e2f58d54805ce10570a6',1,'OpenShaderDesigner::EditorWindow']]] +]; diff --git a/Documentation/html/search/functions_6.js b/Documentation/html/search/functions_6.js new file mode 100644 index 0000000..a55986a --- /dev/null +++ b/Documentation/html/search/functions_6.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['log_0',['Log',['../class_open_shader_designer_1_1_console.html#a4b0e458b796c898279bcb8fedf960920',1,'OpenShaderDesigner::Console']]] +]; diff --git a/Documentation/html/search/functions_7.js b/Documentation/html/search/functions_7.js new file mode 100644 index 0000000..6e68d51 --- /dev/null +++ b/Documentation/html/search/functions_7.js @@ -0,0 +1,8 @@ +var searchData= +[ + ['onclose_0',['OnClose',['../class_open_shader_designer_1_1_editor_window.html#a6dc0b192488187ddbde44d7f0b5fc0f7',1,'OpenShaderDesigner::EditorWindow']]], + ['onopen_1',['OnOpen',['../class_open_shader_designer_1_1_editor_window.html#a2e68f7186c2ceb3ea3dd5618045c6ab7',1,'OpenShaderDesigner::EditorWindow::OnOpen()'],['../class_open_shader_designer_1_1_shader_graph.html#ab165317b9a0b95648df1e7009c220a04',1,'OpenShaderDesigner::ShaderGraph::OnOpen()']]], + ['open_2',['Open',['../class_open_shader_designer_1_1_editor_window.html#a858a412f2f8c652773885d217410d332',1,'OpenShaderDesigner::EditorWindow']]], + ['operator_20bool_3',['operator bool',['../class_g_l_w_1_1_buffer_object.html#a5d780b73c735d1a17dddd5bf67c8c0df',1,'GLW::BufferObject']]], + ['operator_3d_4',['operator=',['../class_g_l_w_1_1_buffer_object.html#a837d2b9cf2b2b4eaffa20d5c984ec1b0',1,'GLW::BufferObject::operator=(const BufferObject &other)'],['../class_g_l_w_1_1_buffer_object.html#a5911e71647b4b45831751f4e150ff032',1,'GLW::BufferObject::operator=(BufferObject &&other) noexcept']]] +]; diff --git a/Documentation/html/search/functions_8.js b/Documentation/html/search/functions_8.js new file mode 100644 index 0000000..26adc70 --- /dev/null +++ b/Documentation/html/search/functions_8.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['postevent_0',['PostEvent',['../class_open_shader_designer_1_1_event_system.html#a55942d1d9b1d427c40aeade3b0ee8600',1,'OpenShaderDesigner::EventSystem']]] +]; diff --git a/Documentation/html/search/functions_9.js b/Documentation/html/search/functions_9.js new file mode 100644 index 0000000..9345cbe --- /dev/null +++ b/Documentation/html/search/functions_9.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['registerhandler_0',['RegisterHandler',['../class_open_shader_designer_1_1_event_system.html#ad7aaf19637c81922d02dafe92ff1982d',1,'OpenShaderDesigner::EventSystem']]] +]; diff --git a/Documentation/html/search/functions_a.js b/Documentation/html/search/functions_a.js new file mode 100644 index 0000000..78b83fa --- /dev/null +++ b/Documentation/html/search/functions_a.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['unregisterhandler_0',['UnregisterHandler',['../class_open_shader_designer_1_1_event_system.html#a46be97970de801727824e3ac8cc93872',1,'OpenShaderDesigner::EventSystem']]] +]; diff --git a/Documentation/html/search/functions_b.js b/Documentation/html/search/functions_b.js new file mode 100644 index 0000000..7fd0b7c --- /dev/null +++ b/Documentation/html/search/functions_b.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['_7ebufferobject_0',['~BufferObject',['../class_g_l_w_1_1_buffer_object.html#aa9eedd875b7ea8f657e58452f61e643d',1,'GLW::BufferObject']]] +]; diff --git a/Documentation/html/search/mag.svg b/Documentation/html/search/mag.svg new file mode 100644 index 0000000..ffb6cf0 --- /dev/null +++ b/Documentation/html/search/mag.svg @@ -0,0 +1,24 @@ + + + + + + + diff --git a/Documentation/html/search/mag_d.svg b/Documentation/html/search/mag_d.svg new file mode 100644 index 0000000..4122773 --- /dev/null +++ b/Documentation/html/search/mag_d.svg @@ -0,0 +1,24 @@ + + + + + + + diff --git a/Documentation/html/search/mag_sel.svg b/Documentation/html/search/mag_sel.svg new file mode 100644 index 0000000..553dba8 --- /dev/null +++ b/Documentation/html/search/mag_sel.svg @@ -0,0 +1,31 @@ + + + + + + + + + diff --git a/Documentation/html/search/mag_seld.svg b/Documentation/html/search/mag_seld.svg new file mode 100644 index 0000000..c906f84 --- /dev/null +++ b/Documentation/html/search/mag_seld.svg @@ -0,0 +1,31 @@ + + + + + + + + + diff --git a/Documentation/html/search/pages_0.js b/Documentation/html/search/pages_0.js new file mode 100644 index 0000000..4c461fa --- /dev/null +++ b/Documentation/html/search/pages_0.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['openshaderdesigner_0',['OpenShaderDesigner',['../md__r_e_a_d_m_e.html',1,'']]] +]; diff --git a/Documentation/html/search/search.css b/Documentation/html/search/search.css new file mode 100644 index 0000000..19f76f9 --- /dev/null +++ b/Documentation/html/search/search.css @@ -0,0 +1,291 @@ +/*---------------- Search Box positioning */ + +#main-menu > li:last-child { + /* This
  • object is the parent of the search bar */ + display: flex; + justify-content: center; + align-items: center; + height: 36px; + margin-right: 1em; +} + +/*---------------- Search box styling */ + +.SRPage * { + font-weight: normal; + line-height: normal; +} + +dark-mode-toggle { + margin-left: 5px; + display: flex; + float: right; +} + +#MSearchBox { + display: inline-block; + white-space : nowrap; + background: var(--search-background-color); + border-radius: 0.65em; + box-shadow: var(--search-box-shadow); + z-index: 102; +} + +#MSearchBox .left { + display: inline-block; + vertical-align: middle; + height: 1.4em; +} + +#MSearchSelect { + display: inline-block; + vertical-align: middle; + width: 20px; + height: 19px; + background-image: var(--search-magnification-select-image); + margin: 0 0 0 0.3em; + padding: 0; +} + +#MSearchSelectExt { + display: inline-block; + vertical-align: middle; + width: 10px; + height: 19px; + background-image: var(--search-magnification-image); + margin: 0 0 0 0.5em; + padding: 0; +} + + +#MSearchField { + display: inline-block; + vertical-align: middle; + width: 7.5em; + height: 19px; + margin: 0 0.15em; + padding: 0; + line-height: 1em; + border:none; + color: var(--search-foreground-color); + outline: none; + font-family: var(--font-family-search); + -webkit-border-radius: 0px; + border-radius: 0px; + background: none; +} + +@media(hover: none) { + /* to avoid zooming on iOS */ + #MSearchField { + font-size: 16px; + } +} + +#MSearchBox .right { + display: inline-block; + vertical-align: middle; + width: 1.4em; + height: 1.4em; +} + +#MSearchClose { + display: none; + font-size: inherit; + background : none; + border: none; + margin: 0; + padding: 0; + outline: none; + +} + +#MSearchCloseImg { + padding: 0.3em; + margin: 0; +} + +.MSearchBoxActive #MSearchField { + color: var(--search-active-color); +} + + + +/*---------------- Search filter selection */ + +#MSearchSelectWindow { + display: none; + position: absolute; + left: 0; top: 0; + border: 1px solid var(--search-filter-border-color); + background-color: var(--search-filter-background-color); + z-index: 10001; + padding-top: 4px; + padding-bottom: 4px; + -moz-border-radius: 4px; + -webkit-border-top-left-radius: 4px; + -webkit-border-top-right-radius: 4px; + -webkit-border-bottom-left-radius: 4px; + -webkit-border-bottom-right-radius: 4px; + -webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); +} + +.SelectItem { + font: 8pt var(--font-family-search); + padding-left: 2px; + padding-right: 12px; + border: 0px; +} + +span.SelectionMark { + margin-right: 4px; + font-family: var(--font-family-monospace); + outline-style: none; + text-decoration: none; +} + +a.SelectItem { + display: block; + outline-style: none; + color: var(--search-filter-foreground-color); + text-decoration: none; + padding-left: 6px; + padding-right: 12px; +} + +a.SelectItem:focus, +a.SelectItem:active { + color: var(--search-filter-foreground-color); + outline-style: none; + text-decoration: none; +} + +a.SelectItem:hover { + color: var(--search-filter-highlight-text-color); + background-color: var(--search-filter-highlight-bg-color); + outline-style: none; + text-decoration: none; + cursor: pointer; + display: block; +} + +/*---------------- Search results window */ + +iframe#MSearchResults { + /*width: 60ex;*/ + height: 15em; +} + +#MSearchResultsWindow { + display: none; + position: absolute; + left: 0; top: 0; + border: 1px solid var(--search-results-border-color); + background-color: var(--search-results-background-color); + z-index:10000; + width: 300px; + height: 400px; + overflow: auto; +} + +/* ----------------------------------- */ + + +#SRIndex { + clear:both; +} + +.SREntry { + font-size: 10pt; + padding-left: 1ex; +} + +.SRPage .SREntry { + font-size: 8pt; + padding: 1px 5px; +} + +div.SRPage { + margin: 5px 2px; + background-color: var(--search-results-background-color); +} + +.SRChildren { + padding-left: 3ex; padding-bottom: .5em +} + +.SRPage .SRChildren { + display: none; +} + +.SRSymbol { + font-weight: bold; + color: var(--search-results-foreground-color); + font-family: var(--font-family-search); + text-decoration: none; + outline: none; +} + +a.SRScope { + display: block; + color: var(--search-results-foreground-color); + font-family: var(--font-family-search); + font-size: 8pt; + text-decoration: none; + outline: none; +} + +a.SRSymbol:focus, a.SRSymbol:active, +a.SRScope:focus, a.SRScope:active { + text-decoration: underline; +} + +span.SRScope { + padding-left: 4px; + font-family: var(--font-family-search); +} + +.SRPage .SRStatus { + padding: 2px 5px; + font-size: 8pt; + font-style: italic; + font-family: var(--font-family-search); +} + +.SRResult { + display: none; +} + +div.searchresults { + margin-left: 10px; + margin-right: 10px; +} + +/*---------------- External search page results */ + +.pages b { + color: white; + padding: 5px 5px 3px 5px; + background-image: var(--nav-gradient-active-image-parent); + background-repeat: repeat-x; + text-shadow: 0 1px 1px #000000; +} + +.pages { + line-height: 17px; + margin-left: 4px; + text-decoration: none; +} + +.hl { + font-weight: bold; +} + +#searchresults { + margin-bottom: 20px; +} + +.searchpages { + margin-top: 10px; +} + diff --git a/Documentation/html/search/search.js b/Documentation/html/search/search.js new file mode 100644 index 0000000..666af01 --- /dev/null +++ b/Documentation/html/search/search.js @@ -0,0 +1,694 @@ +/* + @licstart The following is the entire license notice for the JavaScript code in this file. + + The MIT License (MIT) + + Copyright (C) 1997-2020 by Dimitri van Heesch + + Permission is hereby granted, free of charge, to any person obtaining a copy of this software + and associated documentation files (the "Software"), to deal in the Software without restriction, + including without limitation the rights to use, copy, modify, merge, publish, distribute, + sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all copies or + substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING + BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, + DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + @licend The above is the entire license notice for the JavaScript code in this file + */ +const SEARCH_COOKIE_NAME = ''+'search_grp'; + +const searchResults = new SearchResults(); + +/* A class handling everything associated with the search panel. + + Parameters: + name - The name of the global variable that will be + storing this instance. Is needed to be able to set timeouts. + resultPath - path to use for external files +*/ +function SearchBox(name, resultsPath, extension) { + if (!name || !resultsPath) { alert("Missing parameters to SearchBox."); } + if (!extension || extension == "") { extension = ".html"; } + + function getXPos(item) { + let x = 0; + if (item.offsetWidth) { + while (item && item!=document.body) { + x += item.offsetLeft; + item = item.offsetParent; + } + } + return x; + } + + function getYPos(item) { + let y = 0; + if (item.offsetWidth) { + while (item && item!=document.body) { + y += item.offsetTop; + item = item.offsetParent; + } + } + return y; + } + + // ---------- Instance variables + this.name = name; + this.resultsPath = resultsPath; + this.keyTimeout = 0; + this.keyTimeoutLength = 500; + this.closeSelectionTimeout = 300; + this.lastSearchValue = ""; + this.lastResultsPage = ""; + this.hideTimeout = 0; + this.searchIndex = 0; + this.searchActive = false; + this.extension = extension; + + // ----------- DOM Elements + + this.DOMSearchField = () => document.getElementById("MSearchField"); + this.DOMSearchSelect = () => document.getElementById("MSearchSelect"); + this.DOMSearchSelectWindow = () => document.getElementById("MSearchSelectWindow"); + this.DOMPopupSearchResults = () => document.getElementById("MSearchResults"); + this.DOMPopupSearchResultsWindow = () => document.getElementById("MSearchResultsWindow"); + this.DOMSearchClose = () => document.getElementById("MSearchClose"); + this.DOMSearchBox = () => document.getElementById("MSearchBox"); + + // ------------ Event Handlers + + // Called when focus is added or removed from the search field. + this.OnSearchFieldFocus = function(isActive) { + this.Activate(isActive); + } + + this.OnSearchSelectShow = function() { + const searchSelectWindow = this.DOMSearchSelectWindow(); + const searchField = this.DOMSearchSelect(); + + const left = getXPos(searchField); + const top = getYPos(searchField) + searchField.offsetHeight; + + // show search selection popup + searchSelectWindow.style.display='block'; + searchSelectWindow.style.left = left + 'px'; + searchSelectWindow.style.top = top + 'px'; + + // stop selection hide timer + if (this.hideTimeout) { + clearTimeout(this.hideTimeout); + this.hideTimeout=0; + } + return false; // to avoid "image drag" default event + } + + this.OnSearchSelectHide = function() { + this.hideTimeout = setTimeout(this.CloseSelectionWindow.bind(this), + this.closeSelectionTimeout); + } + + // Called when the content of the search field is changed. + this.OnSearchFieldChange = function(evt) { + if (this.keyTimeout) { // kill running timer + clearTimeout(this.keyTimeout); + this.keyTimeout = 0; + } + + const e = evt ? evt : window.event; // for IE + if (e.keyCode==40 || e.keyCode==13) { + if (e.shiftKey==1) { + this.OnSearchSelectShow(); + const win=this.DOMSearchSelectWindow(); + for (let i=0;i do a search + this.Search(); + } + } + + this.OnSearchSelectKey = function(evt) { + const e = (evt) ? evt : window.event; // for IE + if (e.keyCode==40 && this.searchIndex0) { // Up + this.searchIndex--; + this.OnSelectItem(this.searchIndex); + } else if (e.keyCode==13 || e.keyCode==27) { + e.stopPropagation(); + this.OnSelectItem(this.searchIndex); + this.CloseSelectionWindow(); + this.DOMSearchField().focus(); + } + return false; + } + + // --------- Actions + + // Closes the results window. + this.CloseResultsWindow = function() { + this.DOMPopupSearchResultsWindow().style.display = 'none'; + this.DOMSearchClose().style.display = 'none'; + this.Activate(false); + } + + this.CloseSelectionWindow = function() { + this.DOMSearchSelectWindow().style.display = 'none'; + } + + // Performs a search. + this.Search = function() { + this.keyTimeout = 0; + + // strip leading whitespace + const searchValue = this.DOMSearchField().value.replace(/^ +/, ""); + + const code = searchValue.toLowerCase().charCodeAt(0); + let idxChar = searchValue.substr(0, 1).toLowerCase(); + if ( 0xD800 <= code && code <= 0xDBFF && searchValue > 1) { // surrogate pair + idxChar = searchValue.substr(0, 2); + } + + let jsFile; + let idx = indexSectionsWithContent[this.searchIndex].indexOf(idxChar); + if (idx!=-1) { + const hexCode=idx.toString(16); + jsFile = this.resultsPath + indexSectionNames[this.searchIndex] + '_' + hexCode + '.js'; + } + + const loadJS = function(url, impl, loc) { + const scriptTag = document.createElement('script'); + scriptTag.src = url; + scriptTag.onload = impl; + scriptTag.onreadystatechange = impl; + loc.appendChild(scriptTag); + } + + const domPopupSearchResultsWindow = this.DOMPopupSearchResultsWindow(); + const domSearchBox = this.DOMSearchBox(); + const domPopupSearchResults = this.DOMPopupSearchResults(); + const domSearchClose = this.DOMSearchClose(); + const resultsPath = this.resultsPath; + + const handleResults = function() { + document.getElementById("Loading").style.display="none"; + if (typeof searchData !== 'undefined') { + createResults(resultsPath); + document.getElementById("NoMatches").style.display="none"; + } + + if (idx!=-1) { + searchResults.Search(searchValue); + } else { // no file with search results => force empty search results + searchResults.Search('===='); + } + + if (domPopupSearchResultsWindow.style.display!='block') { + domSearchClose.style.display = 'inline-block'; + let left = getXPos(domSearchBox) + 150; + let top = getYPos(domSearchBox) + 20; + domPopupSearchResultsWindow.style.display = 'block'; + left -= domPopupSearchResults.offsetWidth; + const maxWidth = document.body.clientWidth; + const maxHeight = document.body.clientHeight; + let width = 300; + if (left<10) left=10; + if (width+left+8>maxWidth) width=maxWidth-left-8; + let height = 400; + if (height+top+8>maxHeight) height=maxHeight-top-8; + domPopupSearchResultsWindow.style.top = top + 'px'; + domPopupSearchResultsWindow.style.left = left + 'px'; + domPopupSearchResultsWindow.style.width = width + 'px'; + domPopupSearchResultsWindow.style.height = height + 'px'; + } + } + + if (jsFile) { + loadJS(jsFile, handleResults, this.DOMPopupSearchResultsWindow()); + } else { + handleResults(); + } + + this.lastSearchValue = searchValue; + } + + // -------- Activation Functions + + // Activates or deactivates the search panel, resetting things to + // their default values if necessary. + this.Activate = function(isActive) { + if (isActive || // open it + this.DOMPopupSearchResultsWindow().style.display == 'block' + ) { + this.DOMSearchBox().className = 'MSearchBoxActive'; + this.searchActive = true; + } else if (!isActive) { // directly remove the panel + this.DOMSearchBox().className = 'MSearchBoxInactive'; + this.searchActive = false; + this.lastSearchValue = '' + this.lastResultsPage = ''; + this.DOMSearchField().value = ''; + } + } +} + +// ----------------------------------------------------------------------- + +// The class that handles everything on the search results page. +function SearchResults() { + + function convertToId(search) { + let result = ''; + for (let i=0;i. + this.lastMatchCount = 0; + this.lastKey = 0; + this.repeatOn = false; + + // Toggles the visibility of the passed element ID. + this.FindChildElement = function(id) { + const parentElement = document.getElementById(id); + let element = parentElement.firstChild; + + while (element && element!=parentElement) { + if (element.nodeName.toLowerCase() == 'div' && element.className == 'SRChildren') { + return element; + } + + if (element.nodeName.toLowerCase() == 'div' && element.hasChildNodes()) { + element = element.firstChild; + } else if (element.nextSibling) { + element = element.nextSibling; + } else { + do { + element = element.parentNode; + } + while (element && element!=parentElement && !element.nextSibling); + + if (element && element!=parentElement) { + element = element.nextSibling; + } + } + } + } + + this.Toggle = function(id) { + const element = this.FindChildElement(id); + if (element) { + if (element.style.display == 'block') { + element.style.display = 'none'; + } else { + element.style.display = 'block'; + } + } + } + + // Searches for the passed string. If there is no parameter, + // it takes it from the URL query. + // + // Always returns true, since other documents may try to call it + // and that may or may not be possible. + this.Search = function(search) { + if (!search) { // get search word from URL + search = window.location.search; + search = search.substring(1); // Remove the leading '?' + search = unescape(search); + } + + search = search.replace(/^ +/, ""); // strip leading spaces + search = search.replace(/ +$/, ""); // strip trailing spaces + search = search.toLowerCase(); + search = convertToId(search); + + const resultRows = document.getElementsByTagName("div"); + let matches = 0; + + let i = 0; + while (i < resultRows.length) { + const row = resultRows.item(i); + if (row.className == "SRResult") { + let rowMatchName = row.id.toLowerCase(); + rowMatchName = rowMatchName.replace(/^sr\d*_/, ''); // strip 'sr123_' + + if (search.length<=rowMatchName.length && + rowMatchName.substr(0, search.length)==search) { + row.style.display = 'block'; + matches++; + } else { + row.style.display = 'none'; + } + } + i++; + } + document.getElementById("Searching").style.display='none'; + if (matches == 0) { // no results + document.getElementById("NoMatches").style.display='block'; + } else { // at least one result + document.getElementById("NoMatches").style.display='none'; + } + this.lastMatchCount = matches; + return true; + } + + // return the first item with index index or higher that is visible + this.NavNext = function(index) { + let focusItem; + for (;;) { + const focusName = 'Item'+index; + focusItem = document.getElementById(focusName); + if (focusItem && focusItem.parentNode.parentNode.style.display=='block') { + break; + } else if (!focusItem) { // last element + break; + } + focusItem=null; + index++; + } + return focusItem; + } + + this.NavPrev = function(index) { + let focusItem; + for (;;) { + const focusName = 'Item'+index; + focusItem = document.getElementById(focusName); + if (focusItem && focusItem.parentNode.parentNode.style.display=='block') { + break; + } else if (!focusItem) { // last element + break; + } + focusItem=null; + index--; + } + return focusItem; + } + + this.ProcessKeys = function(e) { + if (e.type == "keydown") { + this.repeatOn = false; + this.lastKey = e.keyCode; + } else if (e.type == "keypress") { + if (!this.repeatOn) { + if (this.lastKey) this.repeatOn = true; + return false; // ignore first keypress after keydown + } + } else if (e.type == "keyup") { + this.lastKey = 0; + this.repeatOn = false; + } + return this.lastKey!=0; + } + + this.Nav = function(evt,itemIndex) { + const e = (evt) ? evt : window.event; // for IE + if (e.keyCode==13) return true; + if (!this.ProcessKeys(e)) return false; + + if (this.lastKey==38) { // Up + const newIndex = itemIndex-1; + let focusItem = this.NavPrev(newIndex); + if (focusItem) { + let child = this.FindChildElement(focusItem.parentNode.parentNode.id); + if (child && child.style.display == 'block') { // children visible + let n=0; + let tmpElem; + for (;;) { // search for last child + tmpElem = document.getElementById('Item'+newIndex+'_c'+n); + if (tmpElem) { + focusItem = tmpElem; + } else { // found it! + break; + } + n++; + } + } + } + if (focusItem) { + focusItem.focus(); + } else { // return focus to search field + document.getElementById("MSearchField").focus(); + } + } else if (this.lastKey==40) { // Down + const newIndex = itemIndex+1; + let focusItem; + const item = document.getElementById('Item'+itemIndex); + const elem = this.FindChildElement(item.parentNode.parentNode.id); + if (elem && elem.style.display == 'block') { // children visible + focusItem = document.getElementById('Item'+itemIndex+'_c0'); + } + if (!focusItem) focusItem = this.NavNext(newIndex); + if (focusItem) focusItem.focus(); + } else if (this.lastKey==39) { // Right + const item = document.getElementById('Item'+itemIndex); + const elem = this.FindChildElement(item.parentNode.parentNode.id); + if (elem) elem.style.display = 'block'; + } else if (this.lastKey==37) { // Left + const item = document.getElementById('Item'+itemIndex); + const elem = this.FindChildElement(item.parentNode.parentNode.id); + if (elem) elem.style.display = 'none'; + } else if (this.lastKey==27) { // Escape + e.stopPropagation(); + searchBox.CloseResultsWindow(); + document.getElementById("MSearchField").focus(); + } else if (this.lastKey==13) { // Enter + return true; + } + return false; + } + + this.NavChild = function(evt,itemIndex,childIndex) { + const e = (evt) ? evt : window.event; // for IE + if (e.keyCode==13) return true; + if (!this.ProcessKeys(e)) return false; + + if (this.lastKey==38) { // Up + if (childIndex>0) { + const newIndex = childIndex-1; + document.getElementById('Item'+itemIndex+'_c'+newIndex).focus(); + } else { // already at first child, jump to parent + document.getElementById('Item'+itemIndex).focus(); + } + } else if (this.lastKey==40) { // Down + const newIndex = childIndex+1; + let elem = document.getElementById('Item'+itemIndex+'_c'+newIndex); + if (!elem) { // last child, jump to parent next parent + elem = this.NavNext(itemIndex+1); + } + if (elem) { + elem.focus(); + } + } else if (this.lastKey==27) { // Escape + e.stopPropagation(); + searchBox.CloseResultsWindow(); + document.getElementById("MSearchField").focus(); + } else if (this.lastKey==13) { // Enter + return true; + } + return false; + } +} + +function createResults(resultsPath) { + + function setKeyActions(elem,action) { + elem.setAttribute('onkeydown',action); + elem.setAttribute('onkeypress',action); + elem.setAttribute('onkeyup',action); + } + + function setClassAttr(elem,attr) { + elem.setAttribute('class',attr); + elem.setAttribute('className',attr); + } + + const results = document.getElementById("SRResults"); + results.innerHTML = ''; + searchData.forEach((elem,index) => { + const id = elem[0]; + const srResult = document.createElement('div'); + srResult.setAttribute('id','SR_'+id); + setClassAttr(srResult,'SRResult'); + const srEntry = document.createElement('div'); + setClassAttr(srEntry,'SREntry'); + const srLink = document.createElement('a'); + srLink.setAttribute('id','Item'+index); + setKeyActions(srLink,'return searchResults.Nav(event,'+index+')'); + setClassAttr(srLink,'SRSymbol'); + srLink.innerHTML = elem[1][0]; + srEntry.appendChild(srLink); + if (elem[1].length==2) { // single result + srLink.setAttribute('href',resultsPath+elem[1][1][0]); + srLink.setAttribute('onclick','searchBox.CloseResultsWindow()'); + if (elem[1][1][1]) { + srLink.setAttribute('target','_parent'); + } else { + srLink.setAttribute('target','_blank'); + } + const srScope = document.createElement('span'); + setClassAttr(srScope,'SRScope'); + srScope.innerHTML = elem[1][1][2]; + srEntry.appendChild(srScope); + } else { // multiple results + srLink.setAttribute('href','javascript:searchResults.Toggle("SR_'+id+'")'); + const srChildren = document.createElement('div'); + setClassAttr(srChildren,'SRChildren'); + for (let c=0; c + + + + + + +OpenShaderDesigner: Member List + + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    OpenShaderDesigner 0.0.1 +
    +
    +
    + + + + + + + + + + +
    +
    + + +
    +
    +
    +
    +
    +
    Loading...
    +
    Searching...
    +
    No Matches
    +
    +
    +
    +
    + +
    +
    +
    +
    ConstantValue< T, V > Member List
    +
    +
    + +

    This is the complete list of members for ConstantValue< T, V >, including all inherited members.

    + + + + + +
    operator Type() const noexcept (defined in ConstantValue< T, V >)ConstantValue< T, V >inline
    operator()() const (defined in ConstantValue< T, V >)ConstantValue< T, V >inline
    Type typedef (defined in ConstantValue< T, V >)ConstantValue< T, V >
    Value (defined in ConstantValue< T, V >)ConstantValue< T, V >static
    + + +
    + + diff --git a/Documentation/html/struct_constant_value.html b/Documentation/html/struct_constant_value.html new file mode 100644 index 0000000..c20431f --- /dev/null +++ b/Documentation/html/struct_constant_value.html @@ -0,0 +1,142 @@ + + + + + + + +OpenShaderDesigner: ConstantValue< T, V > Struct Template Reference + + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    OpenShaderDesigner 0.0.1 +
    +
    +
    + + + + + + + + + + +
    +
    + + +
    +
    +
    +
    +
    +
    Loading...
    +
    Searching...
    +
    No Matches
    +
    +
    +
    +
    + +
    +
    +
    + +
    ConstantValue< T, V > Struct Template Reference
    +
    +
    + +

    Compile-time constant value. + More...

    + +

    #include <TemplateUtils.h>

    + + + + +

    +Public Types

    +using Type = T
     
    + + + + + +

    +Public Member Functions

    +constexpr operator Type () const noexcept
     
    +constexpr Type operator() () const
     
    + + + +

    +Static Public Attributes

    +static constexpr Type Value = V
     
    +

    Detailed Description

    +
    template<typename T, T V>
    +struct ConstantValue< T, V >

    Compile-time constant value.

    +
    Template Parameters
    + + + +
    TType
    VValue
    +
    +
    +

    The documentation for this struct was generated from the following file: +
    + + +
    + + diff --git a/Documentation/html/struct_get_pack_element-members.html b/Documentation/html/struct_get_pack_element-members.html new file mode 100644 index 0000000..3651fa2 --- /dev/null +++ b/Documentation/html/struct_get_pack_element-members.html @@ -0,0 +1,101 @@ + + + + + + + +OpenShaderDesigner: Member List + + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    OpenShaderDesigner 0.0.1 +
    +
    +
    + + + + + + + + + + +
    +
    + + +
    +
    +
    +
    +
    +
    Loading...
    +
    Searching...
    +
    No Matches
    +
    +
    +
    +
    + +
    +
    +
    +
    GetPackElement< I, T, Ts > Member List
    +
    +
    + +

    This is the complete list of members for GetPackElement< I, T, Ts >, including all inherited members.

    + + +
    Type typedef (defined in GetPackElement< I, T, Ts >)GetPackElement< I, T, Ts >
    + + +
    + + diff --git a/Documentation/html/struct_get_pack_element.html b/Documentation/html/struct_get_pack_element.html new file mode 100644 index 0000000..18a7d26 --- /dev/null +++ b/Documentation/html/struct_get_pack_element.html @@ -0,0 +1,110 @@ + + + + + + + +OpenShaderDesigner: GetPackElement< I, T, Ts > Struct Template Reference + + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    OpenShaderDesigner 0.0.1 +
    +
    +
    + + + + + + + + + + +
    +
    + + +
    +
    +
    +
    +
    +
    Loading...
    +
    Searching...
    +
    No Matches
    +
    +
    +
    +
    + +
    +
    +
    + +
    GetPackElement< I, T, Ts > Struct Template Reference
    +
    +
    + + + + +

    +Public Types

    +using Type = typename GetPackElement<I - 1, T, Ts...>::Type
     
    +
    The documentation for this struct was generated from the following file: +
    + + +
    + + diff --git a/Documentation/html/struct_open_shader_designer_1_1_event-members.html b/Documentation/html/struct_open_shader_designer_1_1_event-members.html new file mode 100644 index 0000000..b475c05 --- /dev/null +++ b/Documentation/html/struct_open_shader_designer_1_1_event-members.html @@ -0,0 +1,106 @@ + + + + + + + +OpenShaderDesigner: Member List + + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    OpenShaderDesigner 0.0.1 +
    +
    +
    + + + + + + + + + + +
    +
    + + +
    +
    +
    +
    +
    +
    Loading...
    +
    Searching...
    +
    No Matches
    +
    +
    +
    +
    + + +
    +
    +
    +
    OpenShaderDesigner::Event Member List
    +
    +
    + +

    This is the complete list of members for OpenShaderDesigner::Event, including all inherited members.

    + + + +
    GetID() const =0OpenShaderDesigner::Eventinlinepure virtual
    TypeOf() (defined in OpenShaderDesigner::Event)OpenShaderDesigner::Eventinlinestatic
    + + +
    + + diff --git a/Documentation/html/struct_open_shader_designer_1_1_event.html b/Documentation/html/struct_open_shader_designer_1_1_event.html new file mode 100644 index 0000000..3619ac0 --- /dev/null +++ b/Documentation/html/struct_open_shader_designer_1_1_event.html @@ -0,0 +1,158 @@ + + + + + + + +OpenShaderDesigner: OpenShaderDesigner::Event Struct Reference + + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    OpenShaderDesigner 0.0.1 +
    +
    +
    + + + + + + + + + + +
    +
    + + +
    +
    +
    +
    +
    +
    Loading...
    +
    Searching...
    +
    No Matches
    +
    +
    +
    +
    + + +
    +
    +
    + +
    OpenShaderDesigner::Event Struct Referenceabstract
    +
    +
    + +

    Base Event class for sending events to the Engine. + More...

    + +

    #include <EventSystem.h>

    + + + + + +

    +Public Member Functions

    virtual uint8_t GetID () const =0
     Get the Event's type ID.
     
    + + + + +

    +Static Public Member Functions

    +template<typename T >
    static uint8_t TypeOf ()
     
    +

    Detailed Description

    +

    Base Event class for sending events to the Engine.

    +

    Member Function Documentation

    + +

    ◆ GetID()

    + +
    +
    + + + + + +
    + + + + + + + +
    virtual uint8_t OpenShaderDesigner::Event::GetID () const
    +
    +inlinepure virtual
    +
    + +

    Get the Event's type ID.

    +
    Returns
    A pointer to the Event type ID.
    + +
    +
    +
    The documentation for this struct was generated from the following file: +
    + + +
    + + diff --git a/Documentation/html/struct_open_shader_designer_1_1_node-members.html b/Documentation/html/struct_open_shader_designer_1_1_node-members.html new file mode 100644 index 0000000..ea72bc4 --- /dev/null +++ b/Documentation/html/struct_open_shader_designer_1_1_node-members.html @@ -0,0 +1,120 @@ + + + + + + + +OpenShaderDesigner: Member List + + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    OpenShaderDesigner 0.0.1 +
    +
    +
    + + + + + + + + + + +
    +
    + + +
    +
    +
    +
    +
    +
    Loading...
    +
    Searching...
    +
    No Matches
    +
    +
    +
    +
    + + +
    +
    +
    +
    OpenShaderDesigner::Node Member List
    +
    +
    + +

    This is the complete list of members for OpenShaderDesigner::Node, including all inherited members.

    + + + + + + + + + + + + + + + + + +
    Color (defined in OpenShaderDesigner::Node)OpenShaderDesigner::Node
    Const (defined in OpenShaderDesigner::Node)OpenShaderDesigner::Node
    Copy(ShaderGraph &graph) const =0 (defined in OpenShaderDesigner::Node)OpenShaderDesigner::Nodepure virtual
    DynamicInputs (defined in OpenShaderDesigner::Node)OpenShaderDesigner::Node
    Enabled (defined in OpenShaderDesigner::Node)OpenShaderDesigner::Node
    Header (defined in OpenShaderDesigner::Node)OpenShaderDesigner::Node
    Info (defined in OpenShaderDesigner::Node)OpenShaderDesigner::Node
    Inputs (defined in OpenShaderDesigner::Node)OpenShaderDesigner::Node
    Inspect()=0 (defined in OpenShaderDesigner::Node)OpenShaderDesigner::Nodepure virtual
    IO (defined in OpenShaderDesigner::Node)OpenShaderDesigner::Node
    Node(ShaderGraph &graph, ImVec2 pos, const std::string &title, ImColor color, const std::vector< Pin > &inputs, bool dyn_inputs, const std::vector< Pin > &outputs, bool constant=false) (defined in OpenShaderDesigner::Node)OpenShaderDesigner::Node
    Outputs (defined in OpenShaderDesigner::Node)OpenShaderDesigner::Node
    Position (defined in OpenShaderDesigner::Node)OpenShaderDesigner::Node
    Size (defined in OpenShaderDesigner::Node)OpenShaderDesigner::Node
    Title (defined in OpenShaderDesigner::Node)OpenShaderDesigner::Node
    ~Node()=default (defined in OpenShaderDesigner::Node)OpenShaderDesigner::Node
    + + +
    + + diff --git a/Documentation/html/struct_open_shader_designer_1_1_node.html b/Documentation/html/struct_open_shader_designer_1_1_node.html new file mode 100644 index 0000000..5adb2b3 --- /dev/null +++ b/Documentation/html/struct_open_shader_designer_1_1_node.html @@ -0,0 +1,177 @@ + + + + + + + +OpenShaderDesigner: OpenShaderDesigner::Node Struct Reference + + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    OpenShaderDesigner 0.0.1 +
    +
    +
    + + + + + + + + + + +
    +
    + + +
    +
    +
    +
    +
    +
    Loading...
    +
    Searching...
    +
    No Matches
    +
    +
    +
    +
    + + +
    +
    +
    + +
    OpenShaderDesigner::Node Struct Referenceabstract
    +
    +
    +
    +Inheritance diagram for OpenShaderDesigner::Node:
    +
    +
    + + +OpenShaderDesigner::Nodes::Math::Add +OpenShaderDesigner::Nodes::Math::Constant + +
    + + + + + + + + +

    +Public Member Functions

    Node (ShaderGraph &graph, ImVec2 pos, const std::string &title, ImColor color, const std::vector< Pin > &inputs, bool dyn_inputs, const std::vector< Pin > &outputs, bool constant=false)
     
    +virtual NodeCopy (ShaderGraph &graph) const =0
     
    +virtual void Inspect ()=0
     
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

    +Public Attributes

    +ImVec2 Position = { 0, 0 }
     
    +struct { 
     
    +   std::string   Title = "Node" 
     
    +   ImColor   Color = Pin::Colors[Pin::VECTOR] 
     
    +   bool   Enabled = true 
     
    Header 
     
    +struct { 
     
    +   std::vector< Pin >   Inputs 
     
    +   std::vector< Pin >   Outputs 
     
    +   bool   DynamicInputs = false 
     
    IO 
     
    +struct { 
     
    +   ImVec2   Size 
     
    +   bool   Const 
     
    Info 
     
    +
    The documentation for this struct was generated from the following files: +
    + + +
    + + diff --git a/Documentation/html/struct_open_shader_designer_1_1_node.png b/Documentation/html/struct_open_shader_designer_1_1_node.png new file mode 100644 index 0000000..eb9f556 Binary files /dev/null and b/Documentation/html/struct_open_shader_designer_1_1_node.png differ diff --git a/Documentation/html/struct_open_shader_designer_1_1_nodes_1_1_math_1_1_add-members.html b/Documentation/html/struct_open_shader_designer_1_1_nodes_1_1_math_1_1_add-members.html new file mode 100644 index 0000000..18af380 --- /dev/null +++ b/Documentation/html/struct_open_shader_designer_1_1_nodes_1_1_math_1_1_add-members.html @@ -0,0 +1,122 @@ + + + + + + + +OpenShaderDesigner: Member List + + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    OpenShaderDesigner 0.0.1 +
    +
    +
    + + + + + + + + + + +
    +
    + + +
    +
    +
    +
    +
    +
    Loading...
    +
    Searching...
    +
    No Matches
    +
    +
    +
    +
    + + +
    +
    +
    +
    OpenShaderDesigner::Nodes::Math::Add Member List
    +
    +
    + +

    This is the complete list of members for OpenShaderDesigner::Nodes::Math::Add, including all inherited members.

    + + + + + + + + + + + + + + + + + + + +
    Add(ShaderGraph &graph, ImVec2 pos) (defined in OpenShaderDesigner::Nodes::Math::Add)OpenShaderDesigner::Nodes::Math::Add
    Color (defined in OpenShaderDesigner::Node)OpenShaderDesigner::Node
    Const (defined in OpenShaderDesigner::Node)OpenShaderDesigner::Node
    Copy(ShaderGraph &graph) const override (defined in OpenShaderDesigner::Nodes::Math::Add)OpenShaderDesigner::Nodes::Math::Addvirtual
    DynamicInputs (defined in OpenShaderDesigner::Node)OpenShaderDesigner::Node
    Enabled (defined in OpenShaderDesigner::Node)OpenShaderDesigner::Node
    Header (defined in OpenShaderDesigner::Node)OpenShaderDesigner::Node
    Info (defined in OpenShaderDesigner::Node)OpenShaderDesigner::Node
    Inputs (defined in OpenShaderDesigner::Node)OpenShaderDesigner::Node
    Inspect() override (defined in OpenShaderDesigner::Nodes::Math::Add)OpenShaderDesigner::Nodes::Math::Addvirtual
    IO (defined in OpenShaderDesigner::Node)OpenShaderDesigner::Node
    Node(ShaderGraph &graph, ImVec2 pos, const std::string &title, ImColor color, const std::vector< Pin > &inputs, bool dyn_inputs, const std::vector< Pin > &outputs, bool constant=false) (defined in OpenShaderDesigner::Node)OpenShaderDesigner::Node
    Outputs (defined in OpenShaderDesigner::Node)OpenShaderDesigner::Node
    Position (defined in OpenShaderDesigner::Node)OpenShaderDesigner::Node
    Size (defined in OpenShaderDesigner::Node)OpenShaderDesigner::Node
    Title (defined in OpenShaderDesigner::Node)OpenShaderDesigner::Node
    ~Add()=default (defined in OpenShaderDesigner::Nodes::Math::Add)OpenShaderDesigner::Nodes::Math::Addvirtual
    ~Node()=default (defined in OpenShaderDesigner::Node)OpenShaderDesigner::Node
    + + +
    + + diff --git a/Documentation/html/struct_open_shader_designer_1_1_nodes_1_1_math_1_1_add.html b/Documentation/html/struct_open_shader_designer_1_1_nodes_1_1_math_1_1_add.html new file mode 100644 index 0000000..9351220 --- /dev/null +++ b/Documentation/html/struct_open_shader_designer_1_1_nodes_1_1_math_1_1_add.html @@ -0,0 +1,233 @@ + + + + + + + +OpenShaderDesigner: OpenShaderDesigner::Nodes::Math::Add Struct Reference + + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    OpenShaderDesigner 0.0.1 +
    +
    +
    + + + + + + + + + + +
    +
    + + +
    +
    +
    +
    +
    +
    Loading...
    +
    Searching...
    +
    No Matches
    +
    +
    +
    +
    + + +
    +
    +
    + +
    OpenShaderDesigner::Nodes::Math::Add Struct Reference
    +
    +
    +
    +Inheritance diagram for OpenShaderDesigner::Nodes::Math::Add:
    +
    +
    + + +OpenShaderDesigner::Node + +
    + + + + + + + + + + + +

    +Public Member Functions

    Add (ShaderGraph &graph, ImVec2 pos)
     
    NodeCopy (ShaderGraph &graph) const override
     
    void Inspect () override
     
    - Public Member Functions inherited from OpenShaderDesigner::Node
    Node (ShaderGraph &graph, ImVec2 pos, const std::string &title, ImColor color, const std::vector< Pin > &inputs, bool dyn_inputs, const std::vector< Pin > &outputs, bool constant=false)
     
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

    +Additional Inherited Members

    - Public Attributes inherited from OpenShaderDesigner::Node
    +ImVec2 Position = { 0, 0 }
     
    +struct { 
     
    +   std::string   Title = "Node" 
     
    +   ImColor   Color = Pin::Colors[Pin::VECTOR] 
     
    +   bool   Enabled = true 
     
    Header 
     
    +struct { 
     
    +   std::vector< Pin >   Inputs 
     
    +   std::vector< Pin >   Outputs 
     
    +   bool   DynamicInputs = false 
     
    IO 
     
    +struct { 
     
    +   ImVec2   Size 
     
    +   bool   Const 
     
    Info 
     
    +

    Member Function Documentation

    + +

    ◆ Copy()

    + +
    +
    + + + + + +
    + + + + + + + +
    Node * Add::Copy (ShaderGraph & graph) const
    +
    +nodiscardoverridevirtual
    +
    + +

    Implements OpenShaderDesigner::Node.

    + +
    +
    + +

    ◆ Inspect()

    + +
    +
    + + + + + +
    + + + + + + + +
    void Add::Inspect ()
    +
    +overridevirtual
    +
    + +

    Implements OpenShaderDesigner::Node.

    + +
    +
    +
    The documentation for this struct was generated from the following files:
      +
    • Include/Graph/Nodes/Math.h
    • +
    • Source/Graph/Nodes/Math.cpp
    • +
    +
    + + +
    + + diff --git a/Documentation/html/struct_open_shader_designer_1_1_nodes_1_1_math_1_1_add.png b/Documentation/html/struct_open_shader_designer_1_1_nodes_1_1_math_1_1_add.png new file mode 100644 index 0000000..12ee3ae Binary files /dev/null and b/Documentation/html/struct_open_shader_designer_1_1_nodes_1_1_math_1_1_add.png differ diff --git a/Documentation/html/struct_open_shader_designer_1_1_nodes_1_1_math_1_1_constant-members.html b/Documentation/html/struct_open_shader_designer_1_1_nodes_1_1_math_1_1_constant-members.html new file mode 100644 index 0000000..1b20868 --- /dev/null +++ b/Documentation/html/struct_open_shader_designer_1_1_nodes_1_1_math_1_1_constant-members.html @@ -0,0 +1,124 @@ + + + + + + + +OpenShaderDesigner: Member List + + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    OpenShaderDesigner 0.0.1 +
    +
    +
    + + + + + + + + + + +
    +
    + + +
    +
    +
    +
    +
    +
    Loading...
    +
    Searching...
    +
    No Matches
    +
    +
    +
    +
    + + +
    +
    +
    +
    OpenShaderDesigner::Nodes::Math::Constant Member List
    +
    +
    + +

    This is the complete list of members for OpenShaderDesigner::Nodes::Math::Constant, including all inherited members.

    + + + + + + + + + + + + + + + + + + + + + +
    Color (defined in OpenShaderDesigner::Node)OpenShaderDesigner::Node
    Const (defined in OpenShaderDesigner::Node)OpenShaderDesigner::Node
    Constant(ShaderGraph &graph, ImVec2 pos) (defined in OpenShaderDesigner::Nodes::Math::Constant)OpenShaderDesigner::Nodes::Math::Constant
    Copy(ShaderGraph &graph) const override (defined in OpenShaderDesigner::Nodes::Math::Constant)OpenShaderDesigner::Nodes::Math::Constantvirtual
    DynamicInputs (defined in OpenShaderDesigner::Node)OpenShaderDesigner::Node
    Enabled (defined in OpenShaderDesigner::Node)OpenShaderDesigner::Node
    Header (defined in OpenShaderDesigner::Node)OpenShaderDesigner::Node
    Info (defined in OpenShaderDesigner::Node)OpenShaderDesigner::Node
    Inputs (defined in OpenShaderDesigner::Node)OpenShaderDesigner::Node
    Inspect() override (defined in OpenShaderDesigner::Nodes::Math::Constant)OpenShaderDesigner::Nodes::Math::Constantvirtual
    IO (defined in OpenShaderDesigner::Node)OpenShaderDesigner::Node
    Node(ShaderGraph &graph, ImVec2 pos, const std::string &title, ImColor color, const std::vector< Pin > &inputs, bool dyn_inputs, const std::vector< Pin > &outputs, bool constant=false) (defined in OpenShaderDesigner::Node)OpenShaderDesigner::Node
    Outputs (defined in OpenShaderDesigner::Node)OpenShaderDesigner::Node
    Position (defined in OpenShaderDesigner::Node)OpenShaderDesigner::Node
    Size (defined in OpenShaderDesigner::Node)OpenShaderDesigner::Node
    Title (defined in OpenShaderDesigner::Node)OpenShaderDesigner::Node
    Value (defined in OpenShaderDesigner::Nodes::Math::Constant)OpenShaderDesigner::Nodes::Math::Constant
    ValueType typedef (defined in OpenShaderDesigner::Nodes::Math::Constant)OpenShaderDesigner::Nodes::Math::Constant
    ~Constant()=default (defined in OpenShaderDesigner::Nodes::Math::Constant)OpenShaderDesigner::Nodes::Math::Constantvirtual
    ~Node()=default (defined in OpenShaderDesigner::Node)OpenShaderDesigner::Node
    + + +
    + + diff --git a/Documentation/html/struct_open_shader_designer_1_1_nodes_1_1_math_1_1_constant.html b/Documentation/html/struct_open_shader_designer_1_1_nodes_1_1_math_1_1_constant.html new file mode 100644 index 0000000..b032452 --- /dev/null +++ b/Documentation/html/struct_open_shader_designer_1_1_nodes_1_1_math_1_1_constant.html @@ -0,0 +1,244 @@ + + + + + + + +OpenShaderDesigner: OpenShaderDesigner::Nodes::Math::Constant Struct Reference + + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    OpenShaderDesigner 0.0.1 +
    +
    +
    + + + + + + + + + + +
    +
    + + +
    +
    +
    +
    +
    +
    Loading...
    +
    Searching...
    +
    No Matches
    +
    +
    +
    +
    + + +
    +
    +
    + +
    OpenShaderDesigner::Nodes::Math::Constant Struct Reference
    +
    +
    +
    +Inheritance diagram for OpenShaderDesigner::Nodes::Math::Constant:
    +
    +
    + + +OpenShaderDesigner::Node + +
    + + + + +

    +Public Types

    +using ValueType = ocu::any<int, unsigned int, float, glm::vec4>
     
    + + + + + + + + + + +

    +Public Member Functions

    Constant (ShaderGraph &graph, ImVec2 pos)
     
    NodeCopy (ShaderGraph &graph) const override
     
    void Inspect () override
     
    - Public Member Functions inherited from OpenShaderDesigner::Node
    Node (ShaderGraph &graph, ImVec2 pos, const std::string &title, ImColor color, const std::vector< Pin > &inputs, bool dyn_inputs, const std::vector< Pin > &outputs, bool constant=false)
     
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

    +Public Attributes

    +ValueType Value
     
    - Public Attributes inherited from OpenShaderDesigner::Node
    +ImVec2 Position = { 0, 0 }
     
    +struct { 
     
    +   std::string   Title = "Node" 
     
    +   ImColor   Color = Pin::Colors[Pin::VECTOR] 
     
    +   bool   Enabled = true 
     
    Header 
     
    +struct { 
     
    +   std::vector< Pin >   Inputs 
     
    +   std::vector< Pin >   Outputs 
     
    +   bool   DynamicInputs = false 
     
    IO 
     
    +struct { 
     
    +   ImVec2   Size 
     
    +   bool   Const 
     
    Info 
     
    +

    Member Function Documentation

    + +

    ◆ Copy()

    + +
    +
    + + + + + +
    + + + + + + + +
    Node * Constant::Copy (ShaderGraph & graph) const
    +
    +nodiscardoverridevirtual
    +
    + +

    Implements OpenShaderDesigner::Node.

    + +
    +
    + +

    ◆ Inspect()

    + +
    +
    + + + + + +
    + + + + + + + +
    void Constant::Inspect ()
    +
    +overridevirtual
    +
    + +

    Implements OpenShaderDesigner::Node.

    + +
    +
    +
    The documentation for this struct was generated from the following files:
      +
    • Include/Graph/Nodes/Math.h
    • +
    • Source/Graph/Nodes/Math.cpp
    • +
    +
    + + +
    + + diff --git a/Documentation/html/struct_open_shader_designer_1_1_nodes_1_1_math_1_1_constant.png b/Documentation/html/struct_open_shader_designer_1_1_nodes_1_1_math_1_1_constant.png new file mode 100644 index 0000000..41ae3c4 Binary files /dev/null and b/Documentation/html/struct_open_shader_designer_1_1_nodes_1_1_math_1_1_constant.png differ diff --git a/Documentation/html/struct_open_shader_designer_1_1_pin-members.html b/Documentation/html/struct_open_shader_designer_1_1_pin-members.html new file mode 100644 index 0000000..87cc632 --- /dev/null +++ b/Documentation/html/struct_open_shader_designer_1_1_pin-members.html @@ -0,0 +1,119 @@ + + + + + + + +OpenShaderDesigner: Member List + + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    OpenShaderDesigner 0.0.1 +
    +
    +
    + + + + + + + + + + +
    +
    + + +
    +
    +
    +
    +
    +
    Loading...
    +
    Searching...
    +
    No Matches
    +
    +
    +
    +
    + + +
    +
    +
    +
    OpenShaderDesigner::Pin Member List
    +
    +
    + +

    This is the complete list of members for OpenShaderDesigner::Pin, including all inherited members.

    + + + + + + + + + + + + + + + + +
    ANY enum value (defined in OpenShaderDesigner::Pin)OpenShaderDesigner::Pin
    Colors (defined in OpenShaderDesigner::Pin)OpenShaderDesigner::Pininlinestatic
    COUNT enum value (defined in OpenShaderDesigner::Pin)OpenShaderDesigner::Pin
    Direction (defined in OpenShaderDesigner::Pin)OpenShaderDesigner::Pin
    FLOAT enum value (defined in OpenShaderDesigner::Pin)OpenShaderDesigner::Pin
    INPUT enum value (defined in OpenShaderDesigner::Pin)OpenShaderDesigner::Pin
    INT enum value (defined in OpenShaderDesigner::Pin)OpenShaderDesigner::Pin
    Name (defined in OpenShaderDesigner::Pin)OpenShaderDesigner::Pin
    OUTPUT enum value (defined in OpenShaderDesigner::Pin)OpenShaderDesigner::Pin
    PinDirection enum name (defined in OpenShaderDesigner::Pin)OpenShaderDesigner::Pin
    PinType enum name (defined in OpenShaderDesigner::Pin)OpenShaderDesigner::Pin
    Type (defined in OpenShaderDesigner::Pin)OpenShaderDesigner::Pin
    TypeNames (defined in OpenShaderDesigner::Pin)OpenShaderDesigner::Pininlinestatic
    UINT enum value (defined in OpenShaderDesigner::Pin)OpenShaderDesigner::Pin
    VECTOR enum value (defined in OpenShaderDesigner::Pin)OpenShaderDesigner::Pin
    + + +
    + + diff --git a/Documentation/html/struct_open_shader_designer_1_1_pin.html b/Documentation/html/struct_open_shader_designer_1_1_pin.html new file mode 100644 index 0000000..f9514aa --- /dev/null +++ b/Documentation/html/struct_open_shader_designer_1_1_pin.html @@ -0,0 +1,206 @@ + + + + + + + +OpenShaderDesigner: OpenShaderDesigner::Pin Struct Reference + + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    OpenShaderDesigner 0.0.1 +
    +
    +
    + + + + + + + + + + +
    +
    + + +
    +
    +
    +
    +
    +
    Loading...
    +
    Searching...
    +
    No Matches
    +
    +
    +
    +
    + + +
    +
    +
    + +
    OpenShaderDesigner::Pin Struct Reference
    +
    +
    + + + + + + +

    +Public Types

    enum  PinType {
    +  INT = 0 +, UINT +, FLOAT +, VECTOR +,
    +  ANY +, COUNT +
    + }
     
    enum  PinDirection { INPUT +, OUTPUT + }
     
    + + + + + + + +

    +Public Attributes

    +std::string Name
     
    +PinType Type
     
    +PinDirection Direction
     
    + + + + + +

    +Static Public Attributes

    static const ImColor Colors [COUNT]
     
    static const std::string TypeNames [COUNT]
     
    +

    Member Data Documentation

    + +

    ◆ Colors

    + +
    +
    + + + + + +
    + + + + +
    const ImColor OpenShaderDesigner::Pin::Colors[COUNT]
    +
    +inlinestatic
    +
    +Initial value:
    = {
    +
    ImColor(0xB9, 0xF5, 0x94)
    +
    , ImColor(0x8C, 0xC0, 0x8C)
    +
    , ImColor(0x37, 0x95, 0x85)
    +
    , ImColor(0xE3, 0x7D, 0xDC)
    +
    +
    , ImColor(0xD2, 0xD5, 0xD3)
    +
    }
    +
    +
    +
    + +

    ◆ TypeNames

    + +
    +
    + + + + + +
    + + + + +
    const std::string OpenShaderDesigner::Pin::TypeNames[COUNT]
    +
    +inlinestatic
    +
    +Initial value:
    = {
    +
    "Int"
    +
    , "Unsigned Int"
    +
    , "Float"
    +
    , "Vector"
    +
    }
    +
    +
    +
    +
    The documentation for this struct was generated from the following file: +
    + + +
    + + diff --git a/Documentation/html/struct_open_shader_designer_1_1_pin_ptr-members.html b/Documentation/html/struct_open_shader_designer_1_1_pin_ptr-members.html new file mode 100644 index 0000000..9c3ff48 --- /dev/null +++ b/Documentation/html/struct_open_shader_designer_1_1_pin_ptr-members.html @@ -0,0 +1,110 @@ + + + + + + + +OpenShaderDesigner: Member List + + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    OpenShaderDesigner 0.0.1 +
    +
    +
    + + + + + + + + + + +
    +
    + + +
    +
    +
    +
    +
    +
    Loading...
    +
    Searching...
    +
    No Matches
    +
    +
    +
    +
    + + +
    +
    +
    +
    OpenShaderDesigner::PinPtr Member List
    +
    +
    + +

    This is the complete list of members for OpenShaderDesigner::PinPtr, including all inherited members.

    + + + + + + + +
    hash() const (defined in OpenShaderDesigner::PinPtr)OpenShaderDesigner::PinPtrinline
    Input (defined in OpenShaderDesigner::PinPtr)OpenShaderDesigner::PinPtr
    Node (defined in OpenShaderDesigner::PinPtr)OpenShaderDesigner::PinPtr
    operator<(const PinPtr &o) const (defined in OpenShaderDesigner::PinPtr)OpenShaderDesigner::PinPtrinline
    operator==(const PinPtr &o) const (defined in OpenShaderDesigner::PinPtr)OpenShaderDesigner::PinPtrinline
    Pin (defined in OpenShaderDesigner::PinPtr)OpenShaderDesigner::PinPtr
    + + +
    + + diff --git a/Documentation/html/struct_open_shader_designer_1_1_pin_ptr.html b/Documentation/html/struct_open_shader_designer_1_1_pin_ptr.html new file mode 100644 index 0000000..8137da3 --- /dev/null +++ b/Documentation/html/struct_open_shader_designer_1_1_pin_ptr.html @@ -0,0 +1,139 @@ + + + + + + + +OpenShaderDesigner: OpenShaderDesigner::PinPtr Struct Reference + + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    OpenShaderDesigner 0.0.1 +
    +
    +
    + + + + + + + + + + +
    +
    + + +
    +
    +
    +
    +
    +
    Loading...
    +
    Searching...
    +
    No Matches
    +
    +
    +
    +
    + + +
    +
    +
    + +
    OpenShaderDesigner::PinPtr Struct Reference
    +
    +
    + + + + +

    +Classes

    struct  Hash
     
    + + + + + + + +

    +Public Member Functions

    +size_t hash () const
     
    +bool operator< (const PinPtr &o) const
     
    +bool operator== (const PinPtr &o) const
     
    + + + + + + + +

    +Public Attributes

    +NodeId Node
     
    +PinId Pin
     
    +bool Input
     
    +
    The documentation for this struct was generated from the following file: +
    + + +
    + + diff --git a/Documentation/html/struct_open_shader_designer_1_1_pin_ptr_1_1_hash-members.html b/Documentation/html/struct_open_shader_designer_1_1_pin_ptr_1_1_hash-members.html new file mode 100644 index 0000000..9525818 --- /dev/null +++ b/Documentation/html/struct_open_shader_designer_1_1_pin_ptr_1_1_hash-members.html @@ -0,0 +1,105 @@ + + + + + + + +OpenShaderDesigner: Member List + + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    OpenShaderDesigner 0.0.1 +
    +
    +
    + + + + + + + + + + +
    +
    + + +
    +
    +
    +
    +
    +
    Loading...
    +
    Searching...
    +
    No Matches
    +
    +
    +
    +
    + + +
    +
    +
    +
    OpenShaderDesigner::PinPtr::Hash Member List
    +
    +
    + +

    This is the complete list of members for OpenShaderDesigner::PinPtr::Hash, including all inherited members.

    + + +
    operator()(const PinPtr &p) const (defined in OpenShaderDesigner::PinPtr::Hash)OpenShaderDesigner::PinPtr::Hashinline
    + + +
    + + diff --git a/Documentation/html/struct_open_shader_designer_1_1_pin_ptr_1_1_hash.html b/Documentation/html/struct_open_shader_designer_1_1_pin_ptr_1_1_hash.html new file mode 100644 index 0000000..b46b39c --- /dev/null +++ b/Documentation/html/struct_open_shader_designer_1_1_pin_ptr_1_1_hash.html @@ -0,0 +1,114 @@ + + + + + + + +OpenShaderDesigner: OpenShaderDesigner::PinPtr::Hash Struct Reference + + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    OpenShaderDesigner 0.0.1 +
    +
    +
    + + + + + + + + + + +
    +
    + + +
    +
    +
    +
    +
    +
    Loading...
    +
    Searching...
    +
    No Matches
    +
    +
    +
    +
    + + +
    +
    +
    + +
    OpenShaderDesigner::PinPtr::Hash Struct Reference
    +
    +
    + + + + +

    +Public Member Functions

    +size_t operator() (const PinPtr &p) const
     
    +
    The documentation for this struct was generated from the following file: +
    + + +
    + + diff --git a/Documentation/html/struct_open_shader_designer_1_1_window_1_1_configuration-members.html b/Documentation/html/struct_open_shader_designer_1_1_window_1_1_configuration-members.html new file mode 100644 index 0000000..b2bb5bf --- /dev/null +++ b/Documentation/html/struct_open_shader_designer_1_1_window_1_1_configuration-members.html @@ -0,0 +1,112 @@ + + + + + + + +OpenShaderDesigner: Member List + + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    OpenShaderDesigner 0.0.1 +
    +
    +
    + + + + + + + + + + +
    +
    + + +
    +
    +
    +
    +
    +
    Loading...
    +
    Searching...
    +
    No Matches
    +
    +
    +
    +
    + + +
    + + + diff --git a/Documentation/html/struct_open_shader_designer_1_1_window_1_1_configuration.html b/Documentation/html/struct_open_shader_designer_1_1_window_1_1_configuration.html new file mode 100644 index 0000000..8d9f0a0 --- /dev/null +++ b/Documentation/html/struct_open_shader_designer_1_1_window_1_1_configuration.html @@ -0,0 +1,136 @@ + + + + + + + +OpenShaderDesigner: OpenShaderDesigner::Window::Configuration Struct Reference + + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    OpenShaderDesigner 0.0.1 +
    +
    +
    + + + + + + + + + + +
    +
    + + +
    +
    +
    +
    +
    +
    Loading...
    +
    Searching...
    +
    No Matches
    +
    +
    +
    +
    + + +
    +
    +
    + +
    OpenShaderDesigner::Window::Configuration Struct Reference
    +
    +
    + + + + + + + + + + + + + + + + + + + + +

    +Public Attributes

    +struct { 
     
    +   std::string   Title 
     
    Application 
     
    +struct { 
     
    +   FullscreenMode   Fullscreen 
     
    +   glm::ivec2   Resolution 
     
    +   VSyncMode   VSync 
     
    +   bool   HDR 
     
    Video 
     
    +
    The documentation for this struct was generated from the following file: +
    + + +
    + + diff --git a/Documentation/html/sync_off.png b/Documentation/html/sync_off.png new file mode 100644 index 0000000..3b443fc Binary files /dev/null and b/Documentation/html/sync_off.png differ diff --git a/Documentation/html/sync_on.png b/Documentation/html/sync_on.png new file mode 100644 index 0000000..e08320f Binary files /dev/null and b/Documentation/html/sync_on.png differ diff --git a/Documentation/html/tab_a.png b/Documentation/html/tab_a.png new file mode 100644 index 0000000..3b725c4 Binary files /dev/null and b/Documentation/html/tab_a.png differ diff --git a/Documentation/html/tab_ad.png b/Documentation/html/tab_ad.png new file mode 100644 index 0000000..e34850a Binary files /dev/null and b/Documentation/html/tab_ad.png differ diff --git a/Documentation/html/tab_b.png b/Documentation/html/tab_b.png new file mode 100644 index 0000000..e2b4a86 Binary files /dev/null and b/Documentation/html/tab_b.png differ diff --git a/Documentation/html/tab_bd.png b/Documentation/html/tab_bd.png new file mode 100644 index 0000000..91c2524 Binary files /dev/null and b/Documentation/html/tab_bd.png differ diff --git a/Documentation/html/tab_h.png b/Documentation/html/tab_h.png new file mode 100644 index 0000000..fd5cb70 Binary files /dev/null and b/Documentation/html/tab_h.png differ diff --git a/Documentation/html/tab_hd.png b/Documentation/html/tab_hd.png new file mode 100644 index 0000000..2489273 Binary files /dev/null and b/Documentation/html/tab_hd.png differ diff --git a/Documentation/html/tab_s.png b/Documentation/html/tab_s.png new file mode 100644 index 0000000..ab478c9 Binary files /dev/null and b/Documentation/html/tab_s.png differ diff --git a/Documentation/html/tab_sd.png b/Documentation/html/tab_sd.png new file mode 100644 index 0000000..757a565 Binary files /dev/null and b/Documentation/html/tab_sd.png differ diff --git a/Documentation/html/tabs.css b/Documentation/html/tabs.css new file mode 100644 index 0000000..fe4854a --- /dev/null +++ b/Documentation/html/tabs.css @@ -0,0 +1 @@ +.sm{position:relative;z-index:9999}.sm,.sm ul,.sm li{display:block;list-style:none;margin:0;padding:0;line-height:normal;direction:ltr;text-align:left;-webkit-tap-highlight-color:rgba(0,0,0,0)}.sm-rtl,.sm-rtl ul,.sm-rtl li{direction:rtl;text-align:right}.sm>li>h1,.sm>li>h2,.sm>li>h3,.sm>li>h4,.sm>li>h5,.sm>li>h6{margin:0;padding:0}.sm ul{display:none}.sm li,.sm a{position:relative}.sm a{display:block}.sm a.disabled{cursor:not-allowed}.sm:after{content:"\00a0";display:block;height:0;font:0/0 serif;clear:both;visibility:hidden;overflow:hidden}.sm,.sm *,.sm *:before,.sm *:after{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box}.main-menu-btn{position:relative;display:inline-block;width:36px;height:36px;text-indent:36px;margin-left:8px;white-space:nowrap;overflow:hidden;cursor:pointer;-webkit-tap-highlight-color:rgba(0,0,0,0)}.main-menu-btn-icon,.main-menu-btn-icon:before,.main-menu-btn-icon:after{position:absolute;top:50%;left:2px;height:2px;width:24px;background:var(--nav-menu-button-color);-webkit-transition:all .25s;transition:all .25s}.main-menu-btn-icon:before{content:'';top:-7px;left:0}.main-menu-btn-icon:after{content:'';top:7px;left:0}#main-menu-state:checked ~ .main-menu-btn .main-menu-btn-icon{height:0}#main-menu-state:checked ~ .main-menu-btn .main-menu-btn-icon:before{top:0;-webkit-transform:rotate(-45deg);transform:rotate(-45deg)}#main-menu-state:checked ~ .main-menu-btn .main-menu-btn-icon:after{top:0;-webkit-transform:rotate(45deg);transform:rotate(45deg)}#main-menu-state{position:absolute;width:1px;height:1px;margin:-1px;border:0;padding:0;overflow:hidden;clip:rect(1px,1px,1px,1px)}#main-menu-state:not(:checked) ~ #main-menu{display:none}#main-menu-state:checked ~ #main-menu{display:block}@media(min-width:768px){.main-menu-btn{position:absolute;top:-99999px}#main-menu-state:not(:checked) ~ #main-menu{display:block}}.sm-dox{background-image:var(--nav-gradient-image)}.sm-dox a,.sm-dox a:focus,.sm-dox a:hover,.sm-dox a:active{padding:0 12px;padding-right:43px;font-family:var(--font-family-nav);font-size:13px;font-weight:bold;line-height:36px;text-decoration:none;text-shadow:var(--nav-text-normal-shadow);color:var(--nav-text-normal-color);outline:0}.sm-dox a:hover{background-image:var(--nav-gradient-active-image);background-repeat:repeat-x;color:var(--nav-text-hover-color);text-shadow:var(--nav-text-hover-shadow)}.sm-dox a.current{color:#d23600}.sm-dox a.disabled{color:#bbb}.sm-dox a span.sub-arrow{position:absolute;top:50%;margin-top:-14px;left:auto;right:3px;width:28px;height:28px;overflow:hidden;font:bold 12px/28px monospace !important;text-align:center;text-shadow:none;background:var(--nav-menu-toggle-color);-moz-border-radius:5px;-webkit-border-radius:5px;border-radius:5px}.sm-dox a span.sub-arrow:before{display:block;content:'+'}.sm-dox a.highlighted span.sub-arrow:before{display:block;content:'-'}.sm-dox>li:first-child>a,.sm-dox>li:first-child>:not(ul) a{-moz-border-radius:5px 5px 0 0;-webkit-border-radius:5px;border-radius:5px 5px 0 0}.sm-dox>li:last-child>a,.sm-dox>li:last-child>*:not(ul) a,.sm-dox>li:last-child>ul,.sm-dox>li:last-child>ul>li:last-child>a,.sm-dox>li:last-child>ul>li:last-child>*:not(ul) a,.sm-dox>li:last-child>ul>li:last-child>ul,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>a,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>*:not(ul) a,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>a,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>*:not(ul) a,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>a,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>*:not(ul) a,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul{-moz-border-radius:0 0 5px 5px;-webkit-border-radius:0;border-radius:0 0 5px 5px}.sm-dox>li:last-child>a.highlighted,.sm-dox>li:last-child>*:not(ul) a.highlighted,.sm-dox>li:last-child>ul>li:last-child>a.highlighted,.sm-dox>li:last-child>ul>li:last-child>*:not(ul) a.highlighted,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>a.highlighted,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>*:not(ul) a.highlighted,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>a.highlighted,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>*:not(ul) a.highlighted,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>a.highlighted,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>*:not(ul) a.highlighted{-moz-border-radius:0;-webkit-border-radius:0;border-radius:0}.sm-dox ul{background:var(--nav-menu-background-color)}.sm-dox ul a,.sm-dox ul a:focus,.sm-dox ul a:hover,.sm-dox ul a:active{font-size:12px;border-left:8px solid transparent;line-height:36px;text-shadow:none;background-color:var(--nav-menu-background-color);background-image:none}.sm-dox ul a:hover{background-image:var(--nav-gradient-active-image);background-repeat:repeat-x;color:var(--nav-text-hover-color);text-shadow:0 1px 1px black}.sm-dox ul ul a,.sm-dox ul ul a:hover,.sm-dox ul ul a:focus,.sm-dox ul ul a:active{border-left:16px solid transparent}.sm-dox ul ul ul a,.sm-dox ul ul ul a:hover,.sm-dox ul ul ul a:focus,.sm-dox ul ul ul a:active{border-left:24px solid transparent}.sm-dox ul ul ul ul a,.sm-dox ul ul ul ul a:hover,.sm-dox ul ul ul ul a:focus,.sm-dox ul ul ul ul a:active{border-left:32px solid transparent}.sm-dox ul ul ul ul ul a,.sm-dox ul ul ul ul ul a:hover,.sm-dox ul ul ul ul ul a:focus,.sm-dox ul ul ul ul ul a:active{border-left:40px solid transparent}@media(min-width:768px){.sm-dox ul{position:absolute;width:12em}.sm-dox li{float:left}.sm-dox.sm-rtl li{float:right}.sm-dox ul li,.sm-dox.sm-rtl ul li,.sm-dox.sm-vertical li{float:none}.sm-dox a{white-space:nowrap}.sm-dox ul a,.sm-dox.sm-vertical a{white-space:normal}.sm-dox .sm-nowrap>li>a,.sm-dox .sm-nowrap>li>:not(ul) a{white-space:nowrap}.sm-dox{padding:0 10px;background-image:var(--nav-gradient-image);line-height:36px}.sm-dox a span.sub-arrow{top:50%;margin-top:-2px;right:12px;width:0;height:0;border-width:4px;border-style:solid dashed dashed dashed;border-color:var(--nav-text-normal-color) transparent transparent transparent;background:transparent;-moz-border-radius:0;-webkit-border-radius:0;border-radius:0}.sm-dox a,.sm-dox a:focus,.sm-dox a:active,.sm-dox a:hover,.sm-dox a.highlighted{padding:0 12px;background-image:var(--nav-separator-image);background-repeat:no-repeat;background-position:right;-moz-border-radius:0 !important;-webkit-border-radius:0;border-radius:0 !important}.sm-dox a:hover{background-image:var(--nav-gradient-active-image);background-repeat:repeat-x;color:var(--nav-text-hover-color);text-shadow:var(--nav-text-hover-shadow)}.sm-dox a:hover span.sub-arrow{border-color:var(--nav-text-hover-color) transparent transparent transparent}.sm-dox a.has-submenu{padding-right:24px}.sm-dox li{border-top:0}.sm-dox>li>ul:before,.sm-dox>li>ul:after{content:'';position:absolute;top:-18px;left:30px;width:0;height:0;overflow:hidden;border-width:9px;border-style:dashed dashed solid dashed;border-color:transparent transparent #bbb transparent}.sm-dox>li>ul:after{top:-16px;left:31px;border-width:8px;border-color:transparent transparent var(--nav-menu-background-color) transparent}.sm-dox ul{border:1px solid #bbb;padding:5px 0;background:var(--nav-menu-background-color);-moz-border-radius:5px !important;-webkit-border-radius:5px;border-radius:5px !important;-moz-box-shadow:0 5px 9px rgba(0,0,0,0.2);-webkit-box-shadow:0 5px 9px rgba(0,0,0,0.2);box-shadow:0 5px 9px rgba(0,0,0,0.2)}.sm-dox ul a span.sub-arrow{right:8px;top:50%;margin-top:-5px;border-width:5px;border-color:transparent transparent transparent var(--nav-menu-foreground-color);border-style:dashed dashed dashed solid}.sm-dox ul a,.sm-dox ul a:hover,.sm-dox ul a:focus,.sm-dox ul a:active,.sm-dox ul a.highlighted{color:var(--nav-menu-foreground-color);background-image:none;border:0 !important}.sm-dox ul a:hover{background-image:var(--nav-gradient-active-image);background-repeat:repeat-x;color:var(--nav-text-hover-color);text-shadow:var(--nav-text-hover-shadow)}.sm-dox ul a:hover span.sub-arrow{border-color:transparent transparent transparent var(--nav-text-hover-color)}.sm-dox span.scroll-up,.sm-dox span.scroll-down{position:absolute;display:none;visibility:hidden;overflow:hidden;background:var(--nav-menu-background-color);height:36px}.sm-dox span.scroll-up:hover,.sm-dox span.scroll-down:hover{background:#eee}.sm-dox span.scroll-up:hover span.scroll-up-arrow,.sm-dox span.scroll-up:hover span.scroll-down-arrow{border-color:transparent transparent #d23600 transparent}.sm-dox span.scroll-down:hover span.scroll-down-arrow{border-color:#d23600 transparent transparent transparent}.sm-dox span.scroll-up-arrow,.sm-dox span.scroll-down-arrow{position:absolute;top:0;left:50%;margin-left:-6px;width:0;height:0;overflow:hidden;border-width:6px;border-style:dashed dashed solid dashed;border-color:transparent transparent var(--nav-menu-foreground-color) transparent}.sm-dox span.scroll-down-arrow{top:8px;border-style:solid dashed dashed dashed;border-color:var(--nav-menu-foreground-color) transparent transparent transparent}.sm-dox.sm-rtl a.has-submenu{padding-right:12px;padding-left:24px}.sm-dox.sm-rtl a span.sub-arrow{right:auto;left:12px}.sm-dox.sm-rtl.sm-vertical a.has-submenu{padding:10px 20px}.sm-dox.sm-rtl.sm-vertical a span.sub-arrow{right:auto;left:8px;border-style:dashed solid dashed dashed;border-color:transparent #555 transparent transparent}.sm-dox.sm-rtl>li>ul:before{left:auto;right:30px}.sm-dox.sm-rtl>li>ul:after{left:auto;right:31px}.sm-dox.sm-rtl ul a.has-submenu{padding:10px 20px !important}.sm-dox.sm-rtl ul a span.sub-arrow{right:auto;left:8px;border-style:dashed solid dashed dashed;border-color:transparent #555 transparent transparent}.sm-dox.sm-vertical{padding:10px 0;-moz-border-radius:5px;-webkit-border-radius:5px;border-radius:5px}.sm-dox.sm-vertical a{padding:10px 20px}.sm-dox.sm-vertical a:hover,.sm-dox.sm-vertical a:focus,.sm-dox.sm-vertical a:active,.sm-dox.sm-vertical a.highlighted{background:#fff}.sm-dox.sm-vertical a.disabled{background-image:var(--nav-gradient-image)}.sm-dox.sm-vertical a span.sub-arrow{right:8px;top:50%;margin-top:-5px;border-width:5px;border-style:dashed dashed dashed solid;border-color:transparent transparent transparent #555}.sm-dox.sm-vertical>li>ul:before,.sm-dox.sm-vertical>li>ul:after{display:none}.sm-dox.sm-vertical ul a{padding:10px 20px}.sm-dox.sm-vertical ul a:hover,.sm-dox.sm-vertical ul a:focus,.sm-dox.sm-vertical ul a:active,.sm-dox.sm-vertical ul a.highlighted{background:#eee}.sm-dox.sm-vertical ul a.disabled{background:var(--nav-menu-background-color)}} \ No newline at end of file diff --git a/Documentation/latex/_any_8h_source.tex b/Documentation/latex/_any_8h_source.tex new file mode 100644 index 0000000..2f0492e --- /dev/null +++ b/Documentation/latex/_any_8h_source.tex @@ -0,0 +1,63 @@ +\doxysection{Any.\+h} +\hypertarget{_any_8h_source}{}\label{_any_8h_source}\index{Include/Utility/Any.h@{Include/Utility/Any.h}} + +\begin{DoxyCode}{0} +\DoxyCodeLine{00001\ \textcolor{comment}{//\ =====================================================================================================================}} +\DoxyCodeLine{00002\ \textcolor{comment}{//\ Copyright\ 2024\ Medusa\ Slockbower}} +\DoxyCodeLine{00003\ \textcolor{comment}{//\ Licensed\ under\ the\ Apache\ License,\ Version\ 2.0\ (the\ "{}License"{});}} +\DoxyCodeLine{00004\ \textcolor{comment}{//\ you\ may\ not\ use\ this\ file\ except\ in\ compliance\ with\ the\ License.}} +\DoxyCodeLine{00005\ \textcolor{comment}{//\ You\ may\ obtain\ a\ copy\ of\ the\ License\ at}} +\DoxyCodeLine{00006\ \textcolor{comment}{//}} +\DoxyCodeLine{00007\ \textcolor{comment}{//\ \ http://www.apache.org/licenses/LICENSE-\/2.0}} +\DoxyCodeLine{00008\ \textcolor{comment}{//}} +\DoxyCodeLine{00009\ \textcolor{comment}{//\ Unless\ required\ by\ applicable\ law\ or\ agreed\ to\ in\ writing,\ software}} +\DoxyCodeLine{00010\ \textcolor{comment}{//\ distributed\ under\ the\ License\ is\ distributed\ on\ an\ "{}AS\ IS"{}\ BASIS,}} +\DoxyCodeLine{00011\ \textcolor{comment}{//\ WITHOUT\ WARRANTIES\ OR\ CONDITIONS\ OF\ ANY\ KIND,\ either\ express\ or\ implied.}} +\DoxyCodeLine{00012\ \textcolor{comment}{//\ See\ the\ License\ for\ the\ specific\ language\ governing\ permissions\ and}} +\DoxyCodeLine{00013\ \textcolor{comment}{//\ limitations\ under\ the\ License.}} +\DoxyCodeLine{00014\ \textcolor{comment}{//\ =====================================================================================================================}} +\DoxyCodeLine{00015\ } +\DoxyCodeLine{00016\ \textcolor{preprocessor}{\#ifndef\ ANY\_H}} +\DoxyCodeLine{00017\ \textcolor{preprocessor}{\#define\ ANY\_H}} +\DoxyCodeLine{00018\ } +\DoxyCodeLine{00019\ \textcolor{preprocessor}{\#include\ <\mbox{\hyperlink{_template_utils_8h}{Utility/TemplateUtils.h}}>}} +\DoxyCodeLine{00020\ } +\DoxyCodeLine{00021\ \textcolor{keyword}{template}<\textcolor{keyword}{typename}...Ts>\ \textcolor{keyword}{class\ }\mbox{\hyperlink{class_any}{Any}};} +\DoxyCodeLine{00022\ } +\DoxyCodeLine{00026\ \textcolor{keyword}{template}<\textcolor{keyword}{typename}\ T,\ \textcolor{keyword}{typename}...Rest>} +\DoxyCodeLine{00027\ \textcolor{keyword}{class\ }\mbox{\hyperlink{class_any}{Any}}\ :\ \textcolor{keyword}{public}\ \mbox{\hyperlink{class_any}{Any}}} +\DoxyCodeLine{00028\ \{} +\DoxyCodeLine{00029\ \ \ \ \ \textcolor{comment}{//\ Ensure\ each\ element\ is\ unique}} +\DoxyCodeLine{00030\ \ \ \ \ \textcolor{keyword}{static\_assert}(IsUnique);} +\DoxyCodeLine{00031\ \ \ \ \ \textcolor{keyword}{using\ }ThisType\ =\ T;} +\DoxyCodeLine{00032\ \ \ \ \ \textcolor{keyword}{using\ }\mbox{\hyperlink{class_any}{BaseType}}\ =\ \mbox{\hyperlink{class_any}{Any}};} +\DoxyCodeLine{00033\ } +\DoxyCodeLine{00034\ \textcolor{keyword}{public}:} +\DoxyCodeLine{00035\ \ \ \ \ \mbox{\hyperlink{class_any}{Any}}()\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ :\ \mbox{\hyperlink{class_any}{BaseType}}()\ \ \ \ \ \ \ \ ,\ Value()\ \{\ \}} +\DoxyCodeLine{00036\ \ \ \ \ \mbox{\hyperlink{class_any}{Any}}(\textcolor{keyword}{const}\ ThisType\&\ value,\ \textcolor{keyword}{const}\ Rest\&...other)\ \ \ :\ \mbox{\hyperlink{class_any}{BaseType}}(other...),\ Value(value)\ \{\ \}} +\DoxyCodeLine{00037\ \ \ \ \ \mbox{\hyperlink{class_any}{Any}}(ThisType\&\&\ value,\ Rest\&\&...other)\ \ \ \ \ \ \ \ \ \ \ \ \ :\ \mbox{\hyperlink{class_any}{BaseType}}(other...),\ Value(value)\ \{\ \}} +\DoxyCodeLine{00038\ \ \ \ \ \mbox{\hyperlink{class_any}{Any}}(\textcolor{keyword}{const}\ \mbox{\hyperlink{class_any}{Any}}\&\ other)\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ =\ \textcolor{keywordflow}{default};} +\DoxyCodeLine{00039\ \ \ \ \ \mbox{\hyperlink{class_any}{Any}}(\mbox{\hyperlink{class_any}{Any}}\&\&\ other)\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ =\ \textcolor{keywordflow}{default};} +\DoxyCodeLine{00040\ \ \ \ \ \mbox{\hyperlink{class_any}{\string~Any}}()\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ =\ \textcolor{keywordflow}{default};} +\DoxyCodeLine{00041\ } +\DoxyCodeLine{00042\ \ \ \ \ \mbox{\hyperlink{class_any}{Any}}\&\ operator=(\textcolor{keyword}{const}\ \mbox{\hyperlink{class_any}{Any}}\&)\ =\ \textcolor{keywordflow}{default};} +\DoxyCodeLine{00043\ \ \ \ \ \mbox{\hyperlink{class_any}{Any}}\&\ operator=(\mbox{\hyperlink{class_any}{Any}}\&\&)\ \ \ \ \ \ =\ \textcolor{keywordflow}{default};} +\DoxyCodeLine{00044\ } +\DoxyCodeLine{00045\ \ \ \ \ \textcolor{keyword}{operator}\ \ \ \ \ \ \ ThisType\ \ ()\textcolor{keyword}{\ const\ }\{\ \textcolor{keywordflow}{return}\ \ Value;\ \}} +\DoxyCodeLine{00046\ \ \ \ \ \textcolor{keyword}{operator}\ \ \ \ \ \ \ ThisType\&\ ()\ \ \ \ \ \ \ \{\ \textcolor{keywordflow}{return}\ \ Value;\ \}} +\DoxyCodeLine{00047\ \ \ \ \ \textcolor{keyword}{operator}\ \textcolor{keyword}{const}\ ThisType\&\ ()\ \textcolor{keyword}{const}\ \{\ \textcolor{keywordflow}{return}\ \ Value;\ \}} +\DoxyCodeLine{00048\ \ \ \ \ \textcolor{keyword}{operator}\ \ \ \ \ \ \ ThisType\&\&()\ \ \ \ \ \ \ \{\ \textcolor{keywordflow}{return}\ \ Value;\ \}} +\DoxyCodeLine{00049\ \ \ \ \ \textcolor{keyword}{operator}\ \ \ \ \ \ \ ThisType*\ ()\ \ \ \ \ \ \ \{\ \textcolor{keywordflow}{return}\ \&Value;\ \}} +\DoxyCodeLine{00050\ \ \ \ \ \textcolor{keyword}{operator}\ \textcolor{keyword}{const}\ ThisType*\ ()\ \textcolor{keyword}{const}\ \{\ \textcolor{keywordflow}{return}\ \&Value;\ \}} +\DoxyCodeLine{00051\ } +\DoxyCodeLine{00052\ \textcolor{keyword}{private}:} +\DoxyCodeLine{00053\ \ \ \ \ \textcolor{keyword}{static}\ \textcolor{keyword}{constexpr}\ \textcolor{keywordtype}{size\_t}\ Size\ =\ \textcolor{keyword}{sizeof}...(Rest);} +\DoxyCodeLine{00054\ \ \ \ \ ThisType\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ Value;} +\DoxyCodeLine{00055\ \};} +\DoxyCodeLine{00056\ } +\DoxyCodeLine{00057\ \textcolor{keyword}{template}<>} +\DoxyCodeLine{00058\ \textcolor{keyword}{class\ }\mbox{\hyperlink{class_any}{Any}}<>\ \{\ \};} +\DoxyCodeLine{00059\ } +\DoxyCodeLine{00060\ \textcolor{preprocessor}{\#endif\ }\textcolor{comment}{//ANY\_H}} + +\end{DoxyCode} diff --git a/Documentation/latex/_buffer_object_8h_source.tex b/Documentation/latex/_buffer_object_8h_source.tex new file mode 100644 index 0000000..33ac0d9 --- /dev/null +++ b/Documentation/latex/_buffer_object_8h_source.tex @@ -0,0 +1,147 @@ +\doxysection{Buffer\+Object.\+h} +\hypertarget{_buffer_object_8h_source}{}\label{_buffer_object_8h_source}\index{Include/OpenGL/BufferObject.h@{Include/OpenGL/BufferObject.h}} + +\begin{DoxyCode}{0} +\DoxyCodeLine{00001\ \textcolor{comment}{//\ =====================================================================================================================}} +\DoxyCodeLine{00002\ \textcolor{comment}{//\ Copyright\ 2024\ Medusa\ Slockbower}} +\DoxyCodeLine{00003\ \textcolor{comment}{//\ Licensed\ under\ the\ Apache\ License,\ Version\ 2.0\ (the\ "{}License"{});}} +\DoxyCodeLine{00004\ \textcolor{comment}{//\ you\ may\ not\ use\ this\ file\ except\ in\ compliance\ with\ the\ License.}} +\DoxyCodeLine{00005\ \textcolor{comment}{//\ You\ may\ obtain\ a\ copy\ of\ the\ License\ at}} +\DoxyCodeLine{00006\ \textcolor{comment}{//}} +\DoxyCodeLine{00007\ \textcolor{comment}{//\ \ http://www.apache.org/licenses/LICENSE-\/2.0}} +\DoxyCodeLine{00008\ \textcolor{comment}{//}} +\DoxyCodeLine{00009\ \textcolor{comment}{//\ Unless\ required\ by\ applicable\ law\ or\ agreed\ to\ in\ writing,\ software}} +\DoxyCodeLine{00010\ \textcolor{comment}{//\ distributed\ under\ the\ License\ is\ distributed\ on\ an\ "{}AS\ IS"{}\ BASIS,}} +\DoxyCodeLine{00011\ \textcolor{comment}{//\ WITHOUT\ WARRANTIES\ OR\ CONDITIONS\ OF\ ANY\ KIND,\ either\ express\ or\ implied.}} +\DoxyCodeLine{00012\ \textcolor{comment}{//\ See\ the\ License\ for\ the\ specific\ language\ governing\ permissions\ and}} +\DoxyCodeLine{00013\ \textcolor{comment}{//\ limitations\ under\ the\ License.}} +\DoxyCodeLine{00014\ \textcolor{comment}{//\ =====================================================================================================================}} +\DoxyCodeLine{00015\ } +\DoxyCodeLine{00016\ \textcolor{preprocessor}{\#ifndef\ BUFFEROBJECT\_H}} +\DoxyCodeLine{00017\ \textcolor{preprocessor}{\#define\ BUFFEROBJECT\_H}} +\DoxyCodeLine{00018\ } +\DoxyCodeLine{00019\ \textcolor{preprocessor}{\#ifndef\ NULL}} +\DoxyCodeLine{00020\ \textcolor{preprocessor}{\#define\ NULL\ 0}} +\DoxyCodeLine{00021\ \textcolor{preprocessor}{\#endif}} +\DoxyCodeLine{00022\ } +\DoxyCodeLine{00023\ \textcolor{preprocessor}{\#include\ }} +\DoxyCodeLine{00024\ } +\DoxyCodeLine{00025\ \textcolor{preprocessor}{\#include\ "{}Enum.h"{}}} +\DoxyCodeLine{00026\ \textcolor{preprocessor}{\#include\ "{}Type.h"{}}} +\DoxyCodeLine{00027\ } +\DoxyCodeLine{00028\ \textcolor{keyword}{namespace\ }GLW} +\DoxyCodeLine{00029\ \{} +\DoxyCodeLine{00030\ \textcolor{comment}{//\ Definition\ ==========================================================================================================}} +\DoxyCodeLine{00031\ } +\DoxyCodeLine{00032\ \ \ \ \ \textcolor{keyword}{template}} +\DoxyCodeLine{00033\ \ \ \ \ \textcolor{keyword}{class\ }\mbox{\hyperlink{class_g_l_w_1_1_buffer_object}{BufferObject}}} +\DoxyCodeLine{00034\ \ \ \ \ \{} +\DoxyCodeLine{00035\ \ \ \ \ \textcolor{keyword}{public}:} +\DoxyCodeLine{00036\ \ \ \ \ \ \ \ \ \textcolor{keyword}{static}\ \textcolor{keyword}{constexpr}\ BufferType\ \ \ \ Type\ \ \ \ =\ T;} +\DoxyCodeLine{00037\ \ \ \ \ \ \ \ \ \textcolor{keyword}{static}\ \textcolor{keyword}{constexpr}\ BufferUsage\ \ \ Usage\ \ \ =\ U;} +\DoxyCodeLine{00038\ \ \ \ \ \ \ \ \ \textcolor{keyword}{static}\ \textcolor{keyword}{constexpr}\ BufferStorage\ Storage\ =\ S;} +\DoxyCodeLine{00039\ } +\DoxyCodeLine{00045\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{class_g_l_w_1_1_buffer_object_a965f2c34ca5291ae351bb32226a1bed8}{BufferObject}}(SizeT\ size,\ \textcolor{keywordtype}{void}*\ data\ =\ \textcolor{keyword}{nullptr});} +\DoxyCodeLine{00046\ } +\DoxyCodeLine{00050\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{class_g_l_w_1_1_buffer_object_a965f2c34ca5291ae351bb32226a1bed8}{BufferObject}}(\mbox{\hyperlink{class_g_l_w_1_1_buffer_object}{BufferObject}}\&\&\ other);} +\DoxyCodeLine{00051\ } +\DoxyCodeLine{00055\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{class_g_l_w_1_1_buffer_object_a965f2c34ca5291ae351bb32226a1bed8}{BufferObject}}(\textcolor{keyword}{const}\ \mbox{\hyperlink{class_g_l_w_1_1_buffer_object}{BufferObject}}\&\ other);} +\DoxyCodeLine{00056\ } +\DoxyCodeLine{00060\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{class_g_l_w_1_1_buffer_object_aa9eedd875b7ea8f657e58452f61e643d}{\string~BufferObject}}();} +\DoxyCodeLine{00061\ } +\DoxyCodeLine{00065\ \ \ \ \ \ \ \ \ [[nodiscard]]\ \textcolor{keyword}{operator}\ bool()\textcolor{keyword}{\ const\ }\{\ \textcolor{keywordflow}{return}\ Handle\ !=\ 0;\ \}} +\DoxyCodeLine{00066\ } +\DoxyCodeLine{00070\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{class_g_l_w_1_1_buffer_object}{BufferObject}}\&\ \mbox{\hyperlink{class_g_l_w_1_1_buffer_object_a837d2b9cf2b2b4eaffa20d5c984ec1b0}{operator=}}(\textcolor{keyword}{const}\ \mbox{\hyperlink{class_g_l_w_1_1_buffer_object}{BufferObject}}\&\ other);} +\DoxyCodeLine{00071\ } +\DoxyCodeLine{00075\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{class_g_l_w_1_1_buffer_object}{BufferObject}}\&\ \mbox{\hyperlink{class_g_l_w_1_1_buffer_object_a837d2b9cf2b2b4eaffa20d5c984ec1b0}{operator=}}(\mbox{\hyperlink{class_g_l_w_1_1_buffer_object}{BufferObject}}\&\&\ other)\ \textcolor{keyword}{noexcept};} +\DoxyCodeLine{00076\ } +\DoxyCodeLine{00077\ \ \ \ \ \ \ \ \ [[nodiscard]]\ SizeT\ Size()\textcolor{keyword}{\ const\ }\{\ \textcolor{keywordflow}{return}\ Size;\ \}} +\DoxyCodeLine{00078\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{void}\ Resize(SizeT\ size);} +\DoxyCodeLine{00079\ } +\DoxyCodeLine{00080\ \ \ \ \ \textcolor{keyword}{private}:} +\DoxyCodeLine{00081\ \ \ \ \ \ \ \ \ HandleT\ Handle;} +\DoxyCodeLine{00082\ \ \ \ \ \ \ \ \ SizeT\ \ \ Size;} +\DoxyCodeLine{00083\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{void}*\ \ \ Mapping;} +\DoxyCodeLine{00084\ \ \ \ \ \};} +\DoxyCodeLine{00085\ } +\DoxyCodeLine{00086\ \textcolor{comment}{//\ Constructors\ ========================================================================================================}} +\DoxyCodeLine{00087\ } +\DoxyCodeLine{00088\ \ \ \ \ \textcolor{keyword}{template}\ } +\DoxyCodeLine{00089\ \ \ \ \ \mbox{\hyperlink{class_g_l_w_1_1_buffer_object_a965f2c34ca5291ae351bb32226a1bed8}{BufferObject::BufferObject}}(SizeT\ size,\ \textcolor{keywordtype}{void}*\ data)} +\DoxyCodeLine{00090\ \ \ \ \ \ \ \ \ :\ Handle(NULL)} +\DoxyCodeLine{00091\ \ \ \ \ \ \ \ \ ,\ Size(size)} +\DoxyCodeLine{00092\ \ \ \ \ \ \ \ \ ,\ Mapping(nullptr)} +\DoxyCodeLine{00093\ \ \ \ \ \{} +\DoxyCodeLine{00094\ \ \ \ \ \ \ \ \ glGenBuffers(1,\ \&Handle);} +\DoxyCodeLine{00095\ } +\DoxyCodeLine{00096\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}(!*\textcolor{keyword}{this})\ \textcolor{keywordflow}{return};} +\DoxyCodeLine{00097\ } +\DoxyCodeLine{00098\ \ \ \ \ \ \ \ \ glBindBuffer(Type,\ Handle);} +\DoxyCodeLine{00099\ \ \ \ \ \ \ \ \ glBufferStorage(Type,\ Size,\ data,\ Usage);} +\DoxyCodeLine{00100\ \ \ \ \ \ \ \ \ glBindBuffer(Type,\ 0);} +\DoxyCodeLine{00101\ \ \ \ \ \}} +\DoxyCodeLine{00102\ } +\DoxyCodeLine{00103\ \ \ \ \ \textcolor{keyword}{template}\ } +\DoxyCodeLine{00104\ \ \ \ \ \mbox{\hyperlink{class_g_l_w_1_1_buffer_object_a965f2c34ca5291ae351bb32226a1bed8}{BufferObject::BufferObject}}(\mbox{\hyperlink{class_g_l_w_1_1_buffer_object}{BufferObject}}\&\&\ other)} +\DoxyCodeLine{00105\ \ \ \ \ \ \ \ \ :\ Handle(other.Handle)} +\DoxyCodeLine{00106\ \ \ \ \ \ \ \ \ ,\ Size(other.Size)} +\DoxyCodeLine{00107\ \ \ \ \ \ \ \ \ ,\ Mapping(other.Size)} +\DoxyCodeLine{00108\ \ \ \ \ \{} +\DoxyCodeLine{00109\ \ \ \ \ \ \ \ \ other.Handle\ \ =\ NULL;} +\DoxyCodeLine{00110\ \ \ \ \ \ \ \ \ other.Size\ \ \ \ =\ 0;} +\DoxyCodeLine{00111\ \ \ \ \ \ \ \ \ other.Mapping\ =\ \textcolor{keyword}{nullptr};} +\DoxyCodeLine{00112\ \ \ \ \ \}} +\DoxyCodeLine{00113\ } +\DoxyCodeLine{00114\ \ \ \ \ \textcolor{keyword}{template}\ } +\DoxyCodeLine{00115\ \ \ \ \ \mbox{\hyperlink{class_g_l_w_1_1_buffer_object_a965f2c34ca5291ae351bb32226a1bed8}{BufferObject::BufferObject}}(\textcolor{keyword}{const}\ \mbox{\hyperlink{class_g_l_w_1_1_buffer_object}{BufferObject}}\&\ other)} +\DoxyCodeLine{00116\ \ \ \ \ \ \ \ \ :\ \mbox{\hyperlink{class_g_l_w_1_1_buffer_object}{BufferObject}}(other.Size)} +\DoxyCodeLine{00117\ \ \ \ \ \{} +\DoxyCodeLine{00118\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}(Handle\ ==\ NULL)\ \textcolor{keywordflow}{return};} +\DoxyCodeLine{00119\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}(other.Handle\ ==\ NULL)\ \textcolor{keywordflow}{return};} +\DoxyCodeLine{00120\ } +\DoxyCodeLine{00121\ \ \ \ \ \ \ \ \ glCopyNamedBufferSubData(other.Handle,\ Handle,\ 0,\ 0,\ Size);} +\DoxyCodeLine{00122\ \ \ \ \ \}} +\DoxyCodeLine{00123\ } +\DoxyCodeLine{00124\ \ \ \ \ \textcolor{keyword}{template}\ } +\DoxyCodeLine{00125\ \ \ \ \ \mbox{\hyperlink{class_g_l_w_1_1_buffer_object_aa9eedd875b7ea8f657e58452f61e643d}{BufferObject::\string~BufferObject}}()} +\DoxyCodeLine{00126\ \ \ \ \ \{} +\DoxyCodeLine{00127\ \ \ \ \ \ \ \ \ glDeleteBuffers(1,\ \&Handle);} +\DoxyCodeLine{00128\ \ \ \ \ \}} +\DoxyCodeLine{00129\ } +\DoxyCodeLine{00130\ \textcolor{comment}{//\ Assignment\ Operators\ ================================================================================================}} +\DoxyCodeLine{00131\ } +\DoxyCodeLine{00132\ \ \ \ \ \textcolor{keyword}{template}\ } +\DoxyCodeLine{00133\ \ \ \ \ \mbox{\hyperlink{class_g_l_w_1_1_buffer_object}{BufferObject}}\&\ \mbox{\hyperlink{class_g_l_w_1_1_buffer_object_a837d2b9cf2b2b4eaffa20d5c984ec1b0}{BufferObject::operator=}}(\textcolor{keyword}{const}\ \mbox{\hyperlink{class_g_l_w_1_1_buffer_object}{BufferObject}}\&\ other)} +\DoxyCodeLine{00134\ \ \ \ \ \{} +\DoxyCodeLine{00135\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{class_g_l_w_1_1_buffer_object}{BufferObject}}\ temp(other);} +\DoxyCodeLine{00136\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ (*\textcolor{keyword}{this}\ =\ std::move(temp));\ \textcolor{comment}{//\ NOLINT(*-\/unconventional-\/assign-\/operator)}} +\DoxyCodeLine{00137\ \ \ \ \ \}} +\DoxyCodeLine{00138\ } +\DoxyCodeLine{00139\ \ \ \ \ \textcolor{keyword}{template}\ } +\DoxyCodeLine{00140\ \ \ \ \ \mbox{\hyperlink{class_g_l_w_1_1_buffer_object}{BufferObject}}\&\ \mbox{\hyperlink{class_g_l_w_1_1_buffer_object_a837d2b9cf2b2b4eaffa20d5c984ec1b0}{BufferObject::operator=}}(\mbox{\hyperlink{class_g_l_w_1_1_buffer_object}{BufferObject}}\&\&\ other)\ \textcolor{keyword}{noexcept}} +\DoxyCodeLine{00141\ \ \ \ \ \{} +\DoxyCodeLine{00142\ \ \ \ \ \ \ \ \ glDeleteBuffers(1,\ \&Handle);} +\DoxyCodeLine{00143\ } +\DoxyCodeLine{00144\ \ \ \ \ \ \ \ \ Handle\ \ =\ other.Handle;} +\DoxyCodeLine{00145\ \ \ \ \ \ \ \ \ Size\ \ \ \ =\ other.Size;} +\DoxyCodeLine{00146\ \ \ \ \ \ \ \ \ Mapping\ =\ other.Mapping;} +\DoxyCodeLine{00147\ } +\DoxyCodeLine{00148\ \ \ \ \ \ \ \ \ other.Handle\ \ =\ NULL;} +\DoxyCodeLine{00149\ \ \ \ \ \ \ \ \ other.Size\ \ \ \ =\ 0;} +\DoxyCodeLine{00150\ \ \ \ \ \ \ \ \ other.Mapping\ =\ \textcolor{keyword}{nullptr};} +\DoxyCodeLine{00151\ } +\DoxyCodeLine{00152\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ *\textcolor{keyword}{this};} +\DoxyCodeLine{00153\ \ \ \ \ \}} +\DoxyCodeLine{00154\ } +\DoxyCodeLine{00155\ \ \ \ \ \textcolor{keyword}{template}\ } +\DoxyCodeLine{00156\ \ \ \ \ \textcolor{keywordtype}{void}\ \mbox{\hyperlink{class_g_l_w_1_1_buffer_object}{BufferObject::Resize}}(SizeT\ size)} +\DoxyCodeLine{00157\ \ \ \ \ \{} +\DoxyCodeLine{00158\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{class_g_l_w_1_1_buffer_object}{BufferObject}}\ temp(size);} +\DoxyCodeLine{00159\ \ \ \ \ \ \ \ \ glCopyNamedBufferSubData(Handle,\ temp.Handle,\ 0,\ 0,\ Size);} +\DoxyCodeLine{00160\ \ \ \ \ \ \ \ \ *\textcolor{keyword}{this}\ =\ std::move(temp);} +\DoxyCodeLine{00161\ \ \ \ \ \}} +\DoxyCodeLine{00162\ \}} +\DoxyCodeLine{00163\ } +\DoxyCodeLine{00164\ \textcolor{preprocessor}{\#endif\ }\textcolor{comment}{//BUFFEROBJECT\_H}} + +\end{DoxyCode} diff --git a/Documentation/latex/_console_8h_source.tex b/Documentation/latex/_console_8h_source.tex new file mode 100644 index 0000000..ca76026 --- /dev/null +++ b/Documentation/latex/_console_8h_source.tex @@ -0,0 +1,154 @@ +\doxysection{Console.\+h} +\hypertarget{_console_8h_source}{}\label{_console_8h_source}\index{Include/Core/Console.h@{Include/Core/Console.h}} + +\begin{DoxyCode}{0} +\DoxyCodeLine{00001\ \textcolor{comment}{//\ =====================================================================================================================}} +\DoxyCodeLine{00002\ \textcolor{comment}{//\ Copyright\ 2024\ Medusa\ Slockbower}} +\DoxyCodeLine{00003\ \textcolor{comment}{//\ Licensed\ under\ the\ Apache\ License,\ Version\ 2.0\ (the\ "{}License"{});}} +\DoxyCodeLine{00004\ \textcolor{comment}{//\ you\ may\ not\ use\ this\ file\ except\ in\ compliance\ with\ the\ License.}} +\DoxyCodeLine{00005\ \textcolor{comment}{//\ You\ may\ obtain\ a\ copy\ of\ the\ License\ at}} +\DoxyCodeLine{00006\ \textcolor{comment}{//}} +\DoxyCodeLine{00007\ \textcolor{comment}{//\ \ http://www.apache.org/licenses/LICENSE-\/2.0}} +\DoxyCodeLine{00008\ \textcolor{comment}{//}} +\DoxyCodeLine{00009\ \textcolor{comment}{//\ Unless\ required\ by\ applicable\ law\ or\ agreed\ to\ in\ writing,\ software}} +\DoxyCodeLine{00010\ \textcolor{comment}{//\ distributed\ under\ the\ License\ is\ distributed\ on\ an\ "{}AS\ IS"{}\ BASIS,}} +\DoxyCodeLine{00011\ \textcolor{comment}{//\ WITHOUT\ WARRANTIES\ OR\ CONDITIONS\ OF\ ANY\ KIND,\ either\ express\ or\ implied.}} +\DoxyCodeLine{00012\ \textcolor{comment}{//\ See\ the\ License\ for\ the\ specific\ language\ governing\ permissions\ and}} +\DoxyCodeLine{00013\ \textcolor{comment}{//\ limitations\ under\ the\ License.}} +\DoxyCodeLine{00014\ \textcolor{comment}{//\ =====================================================================================================================}} +\DoxyCodeLine{00015\ } +\DoxyCodeLine{00016\ } +\DoxyCodeLine{00017\ \textcolor{preprocessor}{\#ifndef\ CONSOLE\_H}} +\DoxyCodeLine{00018\ \textcolor{preprocessor}{\#define\ CONSOLE\_H}} +\DoxyCodeLine{00019\ } +\DoxyCodeLine{00020\ \textcolor{preprocessor}{\#include\ }} +\DoxyCodeLine{00021\ \textcolor{preprocessor}{\#include\ }} +\DoxyCodeLine{00022\ \textcolor{preprocessor}{\#include\ }} +\DoxyCodeLine{00023\ \textcolor{preprocessor}{\#include\ }} +\DoxyCodeLine{00024\ \textcolor{preprocessor}{\#include\ }} +\DoxyCodeLine{00025\ \textcolor{preprocessor}{\#include\ }} +\DoxyCodeLine{00026\ \textcolor{preprocessor}{\#include\ }} +\DoxyCodeLine{00027\ } +\DoxyCodeLine{00028\ \textcolor{keyword}{namespace\ }OpenShaderDesigner} +\DoxyCodeLine{00029\ \{} +\DoxyCodeLine{00030\ \ \ \ \ \textcolor{keyword}{class\ }\mbox{\hyperlink{class_open_shader_designer_1_1_console}{Console}}} +\DoxyCodeLine{00031\ \ \ \ \ \{} +\DoxyCodeLine{00032\ \ \ \ \ \textcolor{keyword}{public}:} +\DoxyCodeLine{00036\ \ \ \ \ \ \ \ \ \textcolor{keyword}{enum}\ \mbox{\hyperlink{class_open_shader_designer_1_1_console_a4da63ca14b9e8f7a582df081623b6406}{Setting}}} +\DoxyCodeLine{00037\ \ \ \ \ \ \ \ \ \ \ \ \ :\ uint8\_t} +\DoxyCodeLine{00038\ \ \ \ \ \ \ \ \ \{} +\DoxyCodeLine{00039\ \ \ \ \ \ \ \ \ \ \ \ \ SHOW\_TIMESTAMP\ =\ 0b00000001} +\DoxyCodeLine{00040\ \ \ \ \ \ \ \ \ ,\ \ \ SHOW\_THREAD\ =\ 0b00000010} +\DoxyCodeLine{00041\ \ \ \ \ \ \ \ \ ,\ \ \ SHOW\_SEVERITY\ =\ 0b00000100} +\DoxyCodeLine{00042\ \ \ \ \ \ \ \ \ ,\ \ \ SHOW\_FILE\_INFO\ =\ 0b00001000} +\DoxyCodeLine{00043\ \ \ \ \ \ \ \ \ ,\ \ \ WRAP\_TEXT\ =\ 0b00010000} +\DoxyCodeLine{00044\ } +\DoxyCodeLine{00045\ \ \ \ \ \ \ \ \ ,\ \ \ ALL\_SETTINGS\ \ \ \ \ =\ 0xFF} +\DoxyCodeLine{00046\ \ \ \ \ \ \ \ \ ,\ \ \ DEFAULT\_SETTINGS\ =\ ALL\_SETTINGS\ \string^\ WRAP\_TEXT} +\DoxyCodeLine{00047\ \ \ \ \ \ \ \ \ \};} +\DoxyCodeLine{00048\ } +\DoxyCodeLine{00052\ \ \ \ \ \ \ \ \ \textcolor{keyword}{inline}\ \textcolor{keyword}{static}\ \textcolor{keyword}{const}\ std::string\ \mbox{\hyperlink{class_open_shader_designer_1_1_console_a858d18576b3e7e542d4723316ae71e21}{SettingNames}}[]\ =} +\DoxyCodeLine{00053\ \ \ \ \ \ \ \ \ \{} +\DoxyCodeLine{00054\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{stringliteral}{"{}Timestamps"{}},\ \textcolor{stringliteral}{"{}Thread\ IDs"{}},\ \textcolor{stringliteral}{"{}Severity"{}},\ \textcolor{stringliteral}{"{}File\ Info"{}},\ \textcolor{stringliteral}{"{}Wrapping"{}}} +\DoxyCodeLine{00055\ \ \ \ \ \ \ \ \ \};} +\DoxyCodeLine{00056\ } +\DoxyCodeLine{00060\ \ \ \ \ \ \ \ \ \textcolor{keyword}{enum\ class}\ \mbox{\hyperlink{class_open_shader_designer_1_1_console_a880eae5d076afe686248bbb0f6a83771}{Severity}}} +\DoxyCodeLine{00061\ \ \ \ \ \ \ \ \ \ \ \ \ :\ \textcolor{keywordtype}{int}} +\DoxyCodeLine{00062\ \ \ \ \ \ \ \ \ \{} +\DoxyCodeLine{00063\ \ \ \ \ \ \ \ \ \ \ \ \ MESSAGE\ =\ 0,} +\DoxyCodeLine{00064\ \ \ \ \ \ \ \ \ \ \ \ \ WARNING,} +\DoxyCodeLine{00065\ \ \ \ \ \ \ \ \ \ \ \ \ ERROR,} +\DoxyCodeLine{00066\ \ \ \ \ \ \ \ \ \ \ \ \ FATAL,} +\DoxyCodeLine{00067\ \ \ \ \ \ \ \ \ \ \ \ \ ALERT,} +\DoxyCodeLine{00068\ \ \ \ \ \ \ \ \ \ \ \ \ COMMAND,} +\DoxyCodeLine{00069\ \ \ \ \ \ \ \ \ \ \ \ \ COUNT,} +\DoxyCodeLine{00070\ \ \ \ \ \ \ \ \ \ \ \ \ DEFAULT\ =\ WARNING} +\DoxyCodeLine{00071\ \ \ \ \ \ \ \ \ \};} +\DoxyCodeLine{00072\ } +\DoxyCodeLine{00076\ \ \ \ \ \ \ \ \ \textcolor{keyword}{static}\ \textcolor{keyword}{inline}\ \textcolor{keyword}{const}\ std::string\ \mbox{\hyperlink{class_open_shader_designer_1_1_console_abac05fdca9513434894c10df2473d8b9}{Severities}}[]\ =} +\DoxyCodeLine{00077\ \ \ \ \ \ \ \ \ \{} +\DoxyCodeLine{00078\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{stringliteral}{"{}Message"{}},\ \textcolor{stringliteral}{"{}Warning"{}},\ \textcolor{stringliteral}{"{}Error"{}},\ \textcolor{stringliteral}{"{}Fatal"{}},\ \textcolor{stringliteral}{"{}Alert"{}},\ \textcolor{stringliteral}{"{}Command"{}}} +\DoxyCodeLine{00079\ \ \ \ \ \ \ \ \ \};} +\DoxyCodeLine{00080\ } +\DoxyCodeLine{00086\ \ \ \ \ \ \ \ \ \textcolor{keyword}{inline}\ \textcolor{keyword}{static}\ \textcolor{keyword}{constexpr}\ ImVec4\ \mbox{\hyperlink{class_open_shader_designer_1_1_console_abc25e7d9ad33fdcc95fe11df9a9c3fc4}{ImGuiColor}}(\textcolor{keywordtype}{unsigned}\ \textcolor{keywordtype}{int}\ RGB)} +\DoxyCodeLine{00087\ \ \ \ \ \ \ \ \ \{} +\DoxyCodeLine{00088\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ \{} +\DoxyCodeLine{00089\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keyword}{static\_cast<}\textcolor{keywordtype}{float}\textcolor{keyword}{>}((RGB\ >>\ 24)\ \&\ 255)\ /\ 255.0f,\ \textcolor{keyword}{static\_cast<}\textcolor{keywordtype}{float}\textcolor{keyword}{>}((RGB\ >>\ 16)\ \&\ 255)\ /\ 255.0f,} +\DoxyCodeLine{00090\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keyword}{static\_cast<}\textcolor{keywordtype}{float}\textcolor{keyword}{>}((RGB\ >>\ 8)\ \&\ 255)\ /\ 255.0f,\ \textcolor{keyword}{static\_cast<}\textcolor{keywordtype}{float}\textcolor{keyword}{>}((RGB\ >>\ 0)\ \&\ 255)\ /\ 255.0f} +\DoxyCodeLine{00091\ \ \ \ \ \ \ \ \ \ \ \ \ \};} +\DoxyCodeLine{00092\ \ \ \ \ \ \ \ \ \}} +\DoxyCodeLine{00093\ } +\DoxyCodeLine{00097\ \ \ \ \ \ \ \ \ \textcolor{keyword}{inline}\ \textcolor{keyword}{static}\ \textcolor{keyword}{const}\ ImVec4\ \mbox{\hyperlink{class_open_shader_designer_1_1_console_a1a476dcb9b07e3ad0d54e08775118b35}{SeverityColors}}[]\ =\ \{} +\DoxyCodeLine{00098\ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{class_open_shader_designer_1_1_console_abc25e7d9ad33fdcc95fe11df9a9c3fc4}{ImGuiColor}}(0xA4B9C4FF),\ \mbox{\hyperlink{class_open_shader_designer_1_1_console_abc25e7d9ad33fdcc95fe11df9a9c3fc4}{ImGuiColor}}(0xF2C554FF),\ \mbox{\hyperlink{class_open_shader_designer_1_1_console_abc25e7d9ad33fdcc95fe11df9a9c3fc4}{ImGuiColor}}(0xE57327FF),\ \mbox{\hyperlink{class_open_shader_designer_1_1_console_abc25e7d9ad33fdcc95fe11df9a9c3fc4}{ImGuiColor}}(0xCC211EFF),} +\DoxyCodeLine{00099\ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{class_open_shader_designer_1_1_console_abc25e7d9ad33fdcc95fe11df9a9c3fc4}{ImGuiColor}}(0x9CDCFEFF),} +\DoxyCodeLine{00100\ \ \ \ \ \ \ \ \ \};} +\DoxyCodeLine{00101\ } +\DoxyCodeLine{00102\ \ \ \ \ \ \ \ \ \textcolor{keyword}{static}\ std::string\ ThreadID()} +\DoxyCodeLine{00103\ \ \ \ \ \ \ \ \ \{} +\DoxyCodeLine{00104\ \ \ \ \ \ \ \ \ \ \ \ \ std::stringstream\ ss;} +\DoxyCodeLine{00105\ \ \ \ \ \ \ \ \ \ \ \ \ ss\ <<\ std::this\_thread::get\_id();} +\DoxyCodeLine{00106\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ ss.str();} +\DoxyCodeLine{00107\ \ \ \ \ \ \ \ \ \}} +\DoxyCodeLine{00108\ } +\DoxyCodeLine{00118\ \ \ \ \ \ \ \ \ \textcolor{keyword}{template}\ <\textcolor{keyword}{typename}...\ Args>} +\DoxyCodeLine{00119\ \ \ \ \ \ \ \ \ \textcolor{keyword}{static}\ \textcolor{keywordtype}{void}\ Log(\textcolor{keyword}{const}\ std::string\&\ file} +\DoxyCodeLine{00120\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ ,\ \textcolor{keyword}{const}\ \textcolor{keywordtype}{int}\ line} +\DoxyCodeLine{00121\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ ,\ \mbox{\hyperlink{class_open_shader_designer_1_1_console_a880eae5d076afe686248bbb0f6a83771}{Severity}}\ severity\ =\ Severity::DEFAULT} +\DoxyCodeLine{00122\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ ,\ \textcolor{keyword}{const}\ std::format\_string\&\ message\ =\ \textcolor{stringliteral}{"{}"{}}} +\DoxyCodeLine{00123\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ ,\ Args\&\&...\ vargs);} +\DoxyCodeLine{00124\ } +\DoxyCodeLine{00125\ \ \ \ \ \ \ \ \ \textcolor{keyword}{static}\ \textcolor{keywordtype}{void}\ DrawMenu();} +\DoxyCodeLine{00126\ \ \ \ \ \ \ \ \ \textcolor{keyword}{static}\ \textcolor{keywordtype}{void}\ DrawWindow();} +\DoxyCodeLine{00127\ } +\DoxyCodeLine{00128\ \ \ \ \ \ \ \ \ \textcolor{keyword}{static}\ \textcolor{keyword}{inline}\ \textcolor{keywordtype}{bool}\ Open\ =\ \textcolor{keyword}{true};} +\DoxyCodeLine{00129\ } +\DoxyCodeLine{00130\ \ \ \ \ \textcolor{keyword}{private}:} +\DoxyCodeLine{00131\ \ \ \ \ \ \ \ \ \textcolor{keyword}{struct\ }LogEntry} +\DoxyCodeLine{00132\ \ \ \ \ \ \ \ \ \{} +\DoxyCodeLine{00133\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keyword}{const}\ std::string\ Message;} +\DoxyCodeLine{00134\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keyword}{const}\ Severity\ Severity;} +\DoxyCodeLine{00135\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keyword}{const}\ std::string\ File,\ Timestamp,\ Thread;} +\DoxyCodeLine{00136\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keyword}{const}\ \textcolor{keywordtype}{int}\ Line;} +\DoxyCodeLine{00137\ \ \ \ \ \ \ \ \ \};} +\DoxyCodeLine{00138\ } +\DoxyCodeLine{00144\ \ \ \ \ \ \ \ \ \textcolor{keyword}{static}\ std::string\ Format(\textcolor{keyword}{const}\ LogEntry\&\ entry,\ \mbox{\hyperlink{class_open_shader_designer_1_1_console_a4da63ca14b9e8f7a582df081623b6406}{Setting}}\ settings);} +\DoxyCodeLine{00145\ } +\DoxyCodeLine{00150\ \ \ \ \ \ \ \ \ \textcolor{keyword}{static}\ \textcolor{keywordtype}{void}\ ProcessCommand(\textcolor{keyword}{const}\ std::string\&\ command);} +\DoxyCodeLine{00151\ } +\DoxyCodeLine{00152\ \ \ \ \ \ \ \ \ \textcolor{keyword}{inline}\ \textcolor{keyword}{static}\ std::list\ EntryLog;} +\DoxyCodeLine{00153\ \ \ \ \ \ \ \ \ \textcolor{keyword}{inline}\ \textcolor{keyword}{static}\ std::mutex\ Lock;} +\DoxyCodeLine{00154\ \ \ \ \ \ \ \ \ \textcolor{keyword}{inline}\ \textcolor{keyword}{static}\ \textcolor{keywordtype}{int}\ Filter\ =\ \textcolor{keyword}{static\_cast<}\textcolor{keywordtype}{int}\textcolor{keyword}{>}(0xFFFFFFFF);} +\DoxyCodeLine{00155\ \ \ \ \ \ \ \ \ \textcolor{keyword}{inline}\ \textcolor{keyword}{static}\ \mbox{\hyperlink{class_open_shader_designer_1_1_console_a4da63ca14b9e8f7a582df081623b6406}{Setting}}\ Settings\ =\ DEFAULT\_SETTINGS;} +\DoxyCodeLine{00156\ \ \ \ \ \ \ \ \ \textcolor{keyword}{inline}\ \textcolor{keyword}{static}\ std::string\ Command;} +\DoxyCodeLine{00157\ \ \ \ \ \};} +\DoxyCodeLine{00158\ } +\DoxyCodeLine{00159\ \ \ \ \ \textcolor{keyword}{template}\ <\textcolor{keyword}{typename}...\ Args>} +\DoxyCodeLine{00160\ \ \ \ \ \textcolor{keywordtype}{void}\ \mbox{\hyperlink{class_open_shader_designer_1_1_console_a4b0e458b796c898279bcb8fedf960920}{Console::Log}}(} +\DoxyCodeLine{00161\ \ \ \ \ \ \ \ \ \textcolor{keyword}{const}\ std::string\&\ file} +\DoxyCodeLine{00162\ \ \ \ \ \ \ \ \ ,\ \textcolor{keyword}{const}\ \textcolor{keywordtype}{int}\ line} +\DoxyCodeLine{00163\ \ \ \ \ \ \ \ \ ,\ \mbox{\hyperlink{class_open_shader_designer_1_1_console_a880eae5d076afe686248bbb0f6a83771}{Severity}}\ severity} +\DoxyCodeLine{00164\ \ \ \ \ \ \ \ \ ,\ \textcolor{keyword}{const}\ std::format\_string\&\ fmt} +\DoxyCodeLine{00165\ \ \ \ \ \ \ \ \ ,\ Args\&\&...\ vargs)} +\DoxyCodeLine{00166\ \ \ \ \ \{} +\DoxyCodeLine{00167\ \ \ \ \ \ \ \ \ \textcolor{keyword}{auto}\ t\ =\ std::time(\textcolor{keyword}{nullptr});} +\DoxyCodeLine{00168\ \textcolor{preprocessor}{\#ifdef\ \_MSC\_VER}} +\DoxyCodeLine{00169\ \textcolor{preprocessor}{\#pragma\ warning(disable:4996)}} +\DoxyCodeLine{00170\ \textcolor{preprocessor}{\#endif}} +\DoxyCodeLine{00171\ \ \ \ \ \ \ \ \ \textcolor{keyword}{auto}\ tm\ =\ *std::localtime(\&t);} +\DoxyCodeLine{00172\ } +\DoxyCodeLine{00173\ \ \ \ \ \ \ \ \ std::lock\_guard\ guard(Lock);} +\DoxyCodeLine{00174\ \ \ \ \ \ \ \ \ LogEntry\ entry\{} +\DoxyCodeLine{00175\ \ \ \ \ \ \ \ \ \ \ \ \ std::vformat(fmt.get(),\ std::make\_format\_args(vargs...)),\ severity,\ file,\ std::format(} +\DoxyCodeLine{00176\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{stringliteral}{"{}\{:0>2\}:\{:0>2\}:\{:0>2\}"{}},\ tm.tm\_hour,\ tm.tm\_min,\ tm.tm\_sec),} +\DoxyCodeLine{00177\ \ \ \ \ \ \ \ \ \ \ \ \ ThreadID(),\ line} +\DoxyCodeLine{00178\ \ \ \ \ \ \ \ \ \};} +\DoxyCodeLine{00179\ \ \ \ \ \ \ \ \ EntryLog.push\_back(entry);} +\DoxyCodeLine{00180\ \ \ \ \ \ \ \ \ std::cout\ <<\ Format(entry,\ ALL\_SETTINGS)\ <<\ std::endl;} +\DoxyCodeLine{00181\ \ \ \ \ \}} +\DoxyCodeLine{00182\ \}} +\DoxyCodeLine{00183\ } +\DoxyCodeLine{00184\ \textcolor{preprocessor}{\#define\ Log(...)\ Log(\_\_FILE\_\_,\ \_\_LINE\_\_,\ \_\_VA\_ARGS\_\_)}} +\DoxyCodeLine{00185\ } +\DoxyCodeLine{00186\ \textcolor{preprocessor}{\#endif\ }\textcolor{comment}{//CONSOLE\_H}} + +\end{DoxyCode} diff --git a/Documentation/latex/_console_window_8h_source.tex b/Documentation/latex/_console_window_8h_source.tex new file mode 100644 index 0000000..0c2076f --- /dev/null +++ b/Documentation/latex/_console_window_8h_source.tex @@ -0,0 +1,43 @@ +\doxysection{Console\+Window.\+h} +\hypertarget{_console_window_8h_source}{}\label{_console_window_8h_source}\index{Include/Editor/ConsoleWindow.h@{Include/Editor/ConsoleWindow.h}} + +\begin{DoxyCode}{0} +\DoxyCodeLine{00001\ \textcolor{comment}{//\ =====================================================================================================================}} +\DoxyCodeLine{00002\ \textcolor{comment}{//\ Copyright\ 2024\ Medusa\ Slockbower}} +\DoxyCodeLine{00003\ \textcolor{comment}{//\ Licensed\ under\ the\ Apache\ License,\ Version\ 2.0\ (the\ "{}License"{});}} +\DoxyCodeLine{00004\ \textcolor{comment}{//\ you\ may\ not\ use\ this\ file\ except\ in\ compliance\ with\ the\ License.}} +\DoxyCodeLine{00005\ \textcolor{comment}{//\ You\ may\ obtain\ a\ copy\ of\ the\ License\ at}} +\DoxyCodeLine{00006\ \textcolor{comment}{//}} +\DoxyCodeLine{00007\ \textcolor{comment}{//\ \ http://www.apache.org/licenses/LICENSE-\/2.0}} +\DoxyCodeLine{00008\ \textcolor{comment}{//}} +\DoxyCodeLine{00009\ \textcolor{comment}{//\ Unless\ required\ by\ applicable\ law\ or\ agreed\ to\ in\ writing,\ software}} +\DoxyCodeLine{00010\ \textcolor{comment}{//\ distributed\ under\ the\ License\ is\ distributed\ on\ an\ "{}AS\ IS"{}\ BASIS,}} +\DoxyCodeLine{00011\ \textcolor{comment}{//\ WITHOUT\ WARRANTIES\ OR\ CONDITIONS\ OF\ ANY\ KIND,\ either\ express\ or\ implied.}} +\DoxyCodeLine{00012\ \textcolor{comment}{//\ See\ the\ License\ for\ the\ specific\ language\ governing\ permissions\ and}} +\DoxyCodeLine{00013\ \textcolor{comment}{//\ limitations\ under\ the\ License.}} +\DoxyCodeLine{00014\ \textcolor{comment}{//\ =====================================================================================================================}} +\DoxyCodeLine{00015\ } +\DoxyCodeLine{00016\ \textcolor{preprocessor}{\#ifndef\ CONSOLEWINDOW\_H}} +\DoxyCodeLine{00017\ \textcolor{preprocessor}{\#define\ CONSOLEWINDOW\_H}} +\DoxyCodeLine{00018\ } +\DoxyCodeLine{00019\ \textcolor{preprocessor}{\#include\ }} +\DoxyCodeLine{00020\ } +\DoxyCodeLine{00021\ \textcolor{keyword}{namespace\ }OpenShaderDesigner} +\DoxyCodeLine{00022\ \{} +\DoxyCodeLine{00023\ } +\DoxyCodeLine{00024\ \ \ \ \ \textcolor{keyword}{class\ }\mbox{\hyperlink{class_open_shader_designer_1_1_console_window}{ConsoleWindow}}\ :\ \textcolor{keyword}{public}\ \mbox{\hyperlink{class_open_shader_designer_1_1_editor_window}{EditorWindow}}} +\DoxyCodeLine{00025\ \ \ \ \ \{} +\DoxyCodeLine{00026\ \ \ \ \ \textcolor{keyword}{public}:} +\DoxyCodeLine{00027\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{class_open_shader_designer_1_1_console_window}{ConsoleWindow}}();} +\DoxyCodeLine{00028\ } +\DoxyCodeLine{00029\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{void}\ \mbox{\hyperlink{class_open_shader_designer_1_1_console_window_a14ecc944c576eeb9f3ae4d524be62b52}{DrawMenu}}()\ \textcolor{keyword}{override};} +\DoxyCodeLine{00030\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{void}\ \mbox{\hyperlink{class_open_shader_designer_1_1_console_window_aa4f7904f19e843905b02c1ee399a0e15}{DrawWindow}}()\ \textcolor{keyword}{override};} +\DoxyCodeLine{00031\ } +\DoxyCodeLine{00032\ \ \ \ \ \textcolor{keyword}{private}:} +\DoxyCodeLine{00033\ \ \ \ \ \};} +\DoxyCodeLine{00034\ } +\DoxyCodeLine{00035\ \}\ \textcolor{comment}{//\ OpenShaderDesigner}} +\DoxyCodeLine{00036\ } +\DoxyCodeLine{00037\ \textcolor{preprocessor}{\#endif\ }\textcolor{comment}{//CONSOLEWINDOW\_H}} + +\end{DoxyCode} diff --git a/Documentation/latex/_directed_graph_8h_source.tex b/Documentation/latex/_directed_graph_8h_source.tex new file mode 100644 index 0000000..cf1589b --- /dev/null +++ b/Documentation/latex/_directed_graph_8h_source.tex @@ -0,0 +1,276 @@ +\doxysection{Directed\+Graph.\+h} +\hypertarget{_directed_graph_8h_source}{}\label{_directed_graph_8h_source}\index{Include/Utility/DirectedGraph.h@{Include/Utility/DirectedGraph.h}} + +\begin{DoxyCode}{0} +\DoxyCodeLine{00001\ \textcolor{comment}{//\ =====================================================================================================================}} +\DoxyCodeLine{00002\ \textcolor{comment}{//\ Copyright\ 2024\ Medusa\ Slockbower}} +\DoxyCodeLine{00003\ \textcolor{comment}{//\ Licensed\ under\ the\ Apache\ License,\ Version\ 2.0\ (the\ "{}License"{});}} +\DoxyCodeLine{00004\ \textcolor{comment}{//\ you\ may\ not\ use\ this\ file\ except\ in\ compliance\ with\ the\ License.}} +\DoxyCodeLine{00005\ \textcolor{comment}{//\ You\ may\ obtain\ a\ copy\ of\ the\ License\ at}} +\DoxyCodeLine{00006\ \textcolor{comment}{//}} +\DoxyCodeLine{00007\ \textcolor{comment}{//\ \ http://www.apache.org/licenses/LICENSE-\/2.0}} +\DoxyCodeLine{00008\ \textcolor{comment}{//}} +\DoxyCodeLine{00009\ \textcolor{comment}{//\ Unless\ required\ by\ applicable\ law\ or\ agreed\ to\ in\ writing,\ software}} +\DoxyCodeLine{00010\ \textcolor{comment}{//\ distributed\ under\ the\ License\ is\ distributed\ on\ an\ "{}AS\ IS"{}\ BASIS,}} +\DoxyCodeLine{00011\ \textcolor{comment}{//\ WITHOUT\ WARRANTIES\ OR\ CONDITIONS\ OF\ ANY\ KIND,\ either\ express\ or\ implied.}} +\DoxyCodeLine{00012\ \textcolor{comment}{//\ See\ the\ License\ for\ the\ specific\ language\ governing\ permissions\ and}} +\DoxyCodeLine{00013\ \textcolor{comment}{//\ limitations\ under\ the\ License.}} +\DoxyCodeLine{00014\ \textcolor{comment}{//\ =====================================================================================================================}} +\DoxyCodeLine{00015\ } +\DoxyCodeLine{00016\ \textcolor{preprocessor}{\#ifndef\ DIRECTEDGRAPH\_H}} +\DoxyCodeLine{00017\ \textcolor{preprocessor}{\#define\ DIRECTEDGRAPH\_H}} +\DoxyCodeLine{00018\ } +\DoxyCodeLine{00019\ \textcolor{preprocessor}{\#include\ }} +\DoxyCodeLine{00020\ \textcolor{preprocessor}{\#include\ }} +\DoxyCodeLine{00021\ } +\DoxyCodeLine{00022\ \textcolor{keyword}{template}<\textcolor{keyword}{typename}\ T>} +\DoxyCodeLine{00023\ \textcolor{keyword}{class\ }\mbox{\hyperlink{class_directed_graph}{DirectedGraph}}} +\DoxyCodeLine{00024\ \{} +\DoxyCodeLine{00025\ \textcolor{keyword}{public}:} +\DoxyCodeLine{00026\ \ \ \ \ \textcolor{comment}{//\ Typedefs\ ========================================================================================================}} +\DoxyCodeLine{00027\ } +\DoxyCodeLine{00028\ \ \ \ \ \textcolor{keyword}{using\ }DataType\ =\ T;} +\DoxyCodeLine{00029\ \ \ \ \ \textcolor{keyword}{using\ }Node\ =\ uint32\_t;} +\DoxyCodeLine{00030\ \ \ \ \ \textcolor{keyword}{using\ }NodeQueue\ =\ std::deque;} +\DoxyCodeLine{00031\ } +\DoxyCodeLine{00032\ \textcolor{keyword}{private}:} +\DoxyCodeLine{00033\ \ \ \ \ \textcolor{comment}{//\ Data\ Structures\ =================================================================================================}} +\DoxyCodeLine{00034\ } +\DoxyCodeLine{00035\ \ \ \ \ \textcolor{keyword}{struct\ }Director} +\DoxyCodeLine{00036\ \ \ \ \ \{} +\DoxyCodeLine{00037\ \ \ \ \ \ \ \ \ \textcolor{keyword}{enum}\ Flags} +\DoxyCodeLine{00038\ \ \ \ \ \ \ \ \ \{} +\DoxyCodeLine{00039\ \ \ \ \ \ \ \ \ \ \ \ \ VALID\ =\ 0b00000000000000000000000000000001} +\DoxyCodeLine{00040\ \ \ \ \ \ \ \ \ \};} +\DoxyCodeLine{00041\ } +\DoxyCodeLine{00042\ \ \ \ \ \ \ \ \ Node\ Parent,\ Child,\ Sibling;} +\DoxyCodeLine{00043\ \ \ \ \ \ \ \ \ uint32\_t\ Flags;} +\DoxyCodeLine{00044\ } +\DoxyCodeLine{00045\ \ \ \ \ \ \ \ \ Director()\ :\ Parent(0),\ Child(0),\ Sibling(0),\ Flags(VALID)\ \{\ \}} +\DoxyCodeLine{00046\ \ \ \ \ \};} +\DoxyCodeLine{00047\ } +\DoxyCodeLine{00048\ \ \ \ \ \textcolor{keyword}{using\ }Hierarchy\ =\ std::vector;} +\DoxyCodeLine{00049\ \ \ \ \ \textcolor{keyword}{using\ }Storage\ =\ std::vector;} +\DoxyCodeLine{00050\ } +\DoxyCodeLine{00051\ \textcolor{keyword}{public}:} +\DoxyCodeLine{00052\ \ \ \ \ \textcolor{comment}{//\ Functions\ =======================================================================================================}} +\DoxyCodeLine{00053\ } +\DoxyCodeLine{00054\ \ \ \ \ \mbox{\hyperlink{class_directed_graph}{DirectedGraph}}()\ :\ Graph\{\ Director()\ \},\ Data\{\ DataType()\ \},\ Freed\{\ \}\ \{\ \}} +\DoxyCodeLine{00055\ } +\DoxyCodeLine{00056\ \ \ \ \ [[nodiscard]]\ Node\ Parent(Node\ node)\textcolor{keyword}{\ const\ }\{\ \textcolor{keywordflow}{return}\ Graph[node].Parent;\ \}} +\DoxyCodeLine{00057\ \ \ \ \ [[nodiscard]]\ Node\ FirstChild(Node\ node)\textcolor{keyword}{\ const\ }\{\ \textcolor{keywordflow}{return}\ Graph[node].Child;\ \}} +\DoxyCodeLine{00058\ \ \ \ \ [[nodiscard]]\ Node\ NextSibling(Node\ node)\textcolor{keyword}{\ const\ }\{\ \textcolor{keywordflow}{return}\ Graph[node].Sibling;\ \}} +\DoxyCodeLine{00059\ } +\DoxyCodeLine{00060\ \ \ \ \ [[nodiscard]]\ Node\ LeftMost(Node\ node)\textcolor{keyword}{\ const}} +\DoxyCodeLine{00061\ \textcolor{keyword}{\ \ \ \ }\{} +\DoxyCodeLine{00062\ \ \ \ \ \ \ \ \ Node\ current\ =\ node;} +\DoxyCodeLine{00063\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{while}(node\ =\ FirstChild(current))\ current\ =\ node;} +\DoxyCodeLine{00064\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ current;} +\DoxyCodeLine{00065\ \ \ \ \ \}} +\DoxyCodeLine{00066\ } +\DoxyCodeLine{00067\ \ \ \ \ [[nodiscard]]\ uint32\_t\ Depth(Node\ node)\textcolor{keyword}{\ const}} +\DoxyCodeLine{00068\ \textcolor{keyword}{\ \ \ \ }\{} +\DoxyCodeLine{00069\ \ \ \ \ \ \ \ \ uint32\_t\ depth\ =\ 0;} +\DoxyCodeLine{00070\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{while}\ (node)} +\DoxyCodeLine{00071\ \ \ \ \ \ \ \ \ \{} +\DoxyCodeLine{00072\ \ \ \ \ \ \ \ \ \ \ \ \ node\ =\ Parent(node);} +\DoxyCodeLine{00073\ \ \ \ \ \ \ \ \ \ \ \ \ ++depth;} +\DoxyCodeLine{00074\ \ \ \ \ \ \ \ \ \}} +\DoxyCodeLine{00075\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ depth;} +\DoxyCodeLine{00076\ \ \ \ \ \}} +\DoxyCodeLine{00077\ } +\DoxyCodeLine{00078\ \ \ \ \ Node\ Insert(\textcolor{keyword}{const}\ DataType\&\ data,\ Node\ parent)} +\DoxyCodeLine{00079\ \ \ \ \ \{} +\DoxyCodeLine{00080\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}(Freed.empty())} +\DoxyCodeLine{00081\ \ \ \ \ \ \ \ \ \{} +\DoxyCodeLine{00082\ \ \ \ \ \ \ \ \ \ \ \ \ Freed.push\_back(\textcolor{keyword}{static\_cast<}Node\textcolor{keyword}{>}(Graph.size()));} +\DoxyCodeLine{00083\ \ \ \ \ \ \ \ \ \ \ \ \ Graph.push\_back(Director());\ Data.push\_back(DataType());} +\DoxyCodeLine{00084\ \ \ \ \ \ \ \ \ \}} +\DoxyCodeLine{00085\ } +\DoxyCodeLine{00086\ \ \ \ \ \ \ \ \ Node\ next\ =\ Freed.front();\ Freed.pop\_front();} +\DoxyCodeLine{00087\ \ \ \ \ \ \ \ \ Director\&\ pnode\ =\ Graph[parent];} +\DoxyCodeLine{00088\ \ \ \ \ \ \ \ \ Director\&\ node\ =\ Graph[next];} +\DoxyCodeLine{00089\ } +\DoxyCodeLine{00090\ \ \ \ \ \ \ \ \ \textcolor{comment}{//\ Setup\ Node}} +\DoxyCodeLine{00091\ \ \ \ \ \ \ \ \ node.Parent\ =\ parent;} +\DoxyCodeLine{00092\ \ \ \ \ \ \ \ \ node.Sibling\ =\ pnode.Child;} +\DoxyCodeLine{00093\ \ \ \ \ \ \ \ \ node.Child\ =\ 0;} +\DoxyCodeLine{00094\ \ \ \ \ \ \ \ \ node.Flags\ =\ Director::VALID;} +\DoxyCodeLine{00095\ } +\DoxyCodeLine{00096\ \ \ \ \ \ \ \ \ \textcolor{comment}{//\ Set\ parent's\ child}} +\DoxyCodeLine{00097\ \ \ \ \ \ \ \ \ pnode.Child\ =\ next;} +\DoxyCodeLine{00098\ } +\DoxyCodeLine{00099\ \ \ \ \ \ \ \ \ Data[next]\ =\ data;} +\DoxyCodeLine{00100\ } +\DoxyCodeLine{00101\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ next;} +\DoxyCodeLine{00102\ \ \ \ \ \}} +\DoxyCodeLine{00103\ } +\DoxyCodeLine{00104\ \ \ \ \ \textcolor{keywordtype}{void}\ Erase(Node\ node)} +\DoxyCodeLine{00105\ \ \ \ \ \{} +\DoxyCodeLine{00106\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}(node\ ==\ 0)\ \textcolor{keywordflow}{return};} +\DoxyCodeLine{00107\ } +\DoxyCodeLine{00108\ \ \ \ \ \ \ \ \ Director\&\ erased\ =\ Graph[node];} +\DoxyCodeLine{00109\ \ \ \ \ \ \ \ \ erased.Flags\ \&=\ \string~Director::VALID;} +\DoxyCodeLine{00110\ \ \ \ \ \ \ \ \ Freed.push\_back(node);} +\DoxyCodeLine{00111\ } +\DoxyCodeLine{00112\ \ \ \ \ \ \ \ \ Graph[erased.Parent].Child\ =\ erased.Sibling;} +\DoxyCodeLine{00113\ } +\DoxyCodeLine{00114\ \ \ \ \ \ \ \ \ NodeQueue\ stack\{\ erased.Child\ \};} +\DoxyCodeLine{00115\ } +\DoxyCodeLine{00116\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{while}(stack.empty()\ ==\ \textcolor{keyword}{false})} +\DoxyCodeLine{00117\ \ \ \ \ \ \ \ \ \{} +\DoxyCodeLine{00118\ \ \ \ \ \ \ \ \ \ \ \ \ Node\ next\ =\ stack.front();\ stack.pop\_front();} +\DoxyCodeLine{00119\ \ \ \ \ \ \ \ \ \ \ \ \ Director\&\ child\ =\ Graph[next];} +\DoxyCodeLine{00120\ \ \ \ \ \ \ \ \ \ \ \ \ child.Flags\ \&=\ \string~Director::VALID;} +\DoxyCodeLine{00121\ \ \ \ \ \ \ \ \ \ \ \ \ Freed.push\_back(next);} +\DoxyCodeLine{00122\ } +\DoxyCodeLine{00123\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}(child.Sibling)\ stack.push\_front(child.Sibling);} +\DoxyCodeLine{00124\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}(child.Child)\ stack.push\_front(child.Child);} +\DoxyCodeLine{00125\ \ \ \ \ \ \ \ \ \}} +\DoxyCodeLine{00126\ \ \ \ \ \}} +\DoxyCodeLine{00127\ } +\DoxyCodeLine{00128\ \ \ \ \ DataType\&\ operator[](Node\ node)\ \{\ \textcolor{keywordflow}{return}\ Data[node];\ \}} +\DoxyCodeLine{00129\ \ \ \ \ [[nodiscard]]\ \textcolor{keyword}{const}\ DataType\&\ operator[](Node\ node)\textcolor{keyword}{\ const\ }\{\ \textcolor{keywordflow}{return}\ Data[node];\ \}} +\DoxyCodeLine{00130\ } +\DoxyCodeLine{00131\ \ \ \ \ \textcolor{keyword}{template}<\textcolor{keyword}{typename}\ V,\ \textcolor{keyword}{typename}\ O>} +\DoxyCodeLine{00132\ \ \ \ \ \textcolor{keywordtype}{void}\ Traverse(V\&\ visitor)} +\DoxyCodeLine{00133\ \ \ \ \ \{} +\DoxyCodeLine{00134\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{class_directed_graph_1_1_traverser}{Traverser}}\ traverser(*\textcolor{keyword}{this},\ visitor);} +\DoxyCodeLine{00135\ \ \ \ \ \ \ \ \ traverser();} +\DoxyCodeLine{00136\ \ \ \ \ \}} +\DoxyCodeLine{00137\ } +\DoxyCodeLine{00138\ \textcolor{keyword}{private}:} +\DoxyCodeLine{00139\ \ \ \ \ \textcolor{comment}{//\ Variables\ =======================================================================================================}} +\DoxyCodeLine{00140\ } +\DoxyCodeLine{00141\ \ \ \ \ Hierarchy\ Graph;} +\DoxyCodeLine{00142\ \ \ \ \ Storage\ \ \ Data;} +\DoxyCodeLine{00143\ \ \ \ \ NodeQueue\ Freed;} +\DoxyCodeLine{00144\ } +\DoxyCodeLine{00145\ \textcolor{keyword}{public}:} +\DoxyCodeLine{00146\ \ \ \ \ \textcolor{comment}{//\ Navigation\ ======================================================================================================}} +\DoxyCodeLine{00147\ } +\DoxyCodeLine{00148\ \ \ \ \ \textcolor{keyword}{friend}\ \textcolor{keyword}{class\ }\mbox{\hyperlink{class_directed_graph_1_1_breadth_first}{BreadthFirst}};} +\DoxyCodeLine{00149\ \ \ \ \ \textcolor{keyword}{class\ }\mbox{\hyperlink{class_directed_graph_1_1_breadth_first}{BreadthFirst}}} +\DoxyCodeLine{00150\ \ \ \ \ \{} +\DoxyCodeLine{00151\ \ \ \ \ \textcolor{keyword}{public}:} +\DoxyCodeLine{00152\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{class_directed_graph_1_1_breadth_first}{BreadthFirst}}(\mbox{\hyperlink{class_directed_graph}{DirectedGraph}}\&\ graph)\ :\ Graph(graph),\ VisitQueue(0)\ \{\ \}} +\DoxyCodeLine{00153\ } +\DoxyCodeLine{00154\ \ \ \ \ \ \ \ \ Node\ operator()(Node\ node)} +\DoxyCodeLine{00155\ \ \ \ \ \ \ \ \ \{} +\DoxyCodeLine{00156\ \ \ \ \ \ \ \ \ \ \ \ \ node\ =\ VisitQueue.back();\ VisitQueue.pop\_back();} +\DoxyCodeLine{00157\ \ \ \ \ \ \ \ \ \ \ \ \ Director\&\ current\ =\ Graph.Graph[node];} +\DoxyCodeLine{00158\ } +\DoxyCodeLine{00159\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}(current.Sibling)\ VisitQueue.push\_back(current.Sibling);} +\DoxyCodeLine{00160\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}(current.Child)\ VisitQueue.push\_front(current.Child);} +\DoxyCodeLine{00161\ } +\DoxyCodeLine{00162\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}(VisitQueue.empty())\ \textcolor{keywordflow}{return}\ 0;} +\DoxyCodeLine{00163\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ node;} +\DoxyCodeLine{00164\ \ \ \ \ \ \ \ \ \}} +\DoxyCodeLine{00165\ } +\DoxyCodeLine{00166\ \ \ \ \ \textcolor{keyword}{private}:} +\DoxyCodeLine{00167\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{class_directed_graph}{DirectedGraph}}\&\ Graph;} +\DoxyCodeLine{00168\ \ \ \ \ \ \ \ \ NodeQueue\ \ \ \ \ \ VisitQueue;} +\DoxyCodeLine{00169\ \ \ \ \ \};} +\DoxyCodeLine{00170\ } +\DoxyCodeLine{00171\ \ \ \ \ \textcolor{keyword}{friend}\ \textcolor{keyword}{class\ }\mbox{\hyperlink{class_directed_graph_1_1_pre_order}{PreOrder}};} +\DoxyCodeLine{00172\ \ \ \ \ \textcolor{keyword}{class\ }\mbox{\hyperlink{class_directed_graph_1_1_pre_order}{PreOrder}}} +\DoxyCodeLine{00173\ \ \ \ \ \{} +\DoxyCodeLine{00174\ \ \ \ \ \textcolor{keyword}{public}:} +\DoxyCodeLine{00175\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{class_directed_graph_1_1_pre_order}{PreOrder}}(\mbox{\hyperlink{class_directed_graph}{DirectedGraph}}\&\ graph)\ :\ Graph(graph)\ \{\ \}} +\DoxyCodeLine{00176\ } +\DoxyCodeLine{00177\ \ \ \ \ \ \ \ \ Node\ operator()(Node\ node)} +\DoxyCodeLine{00178\ \ \ \ \ \ \ \ \ \{} +\DoxyCodeLine{00179\ \ \ \ \ \ \ \ \ \ \ \ \ Director\&\ current\ =\ Graph.Graph[node];} +\DoxyCodeLine{00180\ } +\DoxyCodeLine{00181\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}(current.Sibling)\ VisitQueue.push\_front(current.Sibling);} +\DoxyCodeLine{00182\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}(current.Child)\ VisitQueue.push\_front(current.Child);} +\DoxyCodeLine{00183\ } +\DoxyCodeLine{00184\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}(VisitQueue.empty())\ \textcolor{keywordflow}{return}\ 0;} +\DoxyCodeLine{00185\ \ \ \ \ \ \ \ \ \ \ \ \ Node\ next\ =\ VisitQueue.front();\ VisitQueue.pop\_front();} +\DoxyCodeLine{00186\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ next;} +\DoxyCodeLine{00187\ \ \ \ \ \ \ \ \ \}} +\DoxyCodeLine{00188\ } +\DoxyCodeLine{00189\ \ \ \ \ \textcolor{keyword}{private}:} +\DoxyCodeLine{00190\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{class_directed_graph}{DirectedGraph}}\&\ Graph;} +\DoxyCodeLine{00191\ \ \ \ \ \ \ \ \ NodeQueue\ \ \ \ \ \ VisitQueue;} +\DoxyCodeLine{00192\ \ \ \ \ \};} +\DoxyCodeLine{00193\ } +\DoxyCodeLine{00194\ \ \ \ \ \textcolor{keyword}{friend}\ \textcolor{keyword}{class\ }\mbox{\hyperlink{class_directed_graph_1_1_in_order}{InOrder}};} +\DoxyCodeLine{00195\ \ \ \ \ \textcolor{keyword}{class\ }\mbox{\hyperlink{class_directed_graph_1_1_in_order}{InOrder}}} +\DoxyCodeLine{00196\ \ \ \ \ \{} +\DoxyCodeLine{00197\ \ \ \ \ \textcolor{keyword}{public}:} +\DoxyCodeLine{00198\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{class_directed_graph_1_1_in_order}{InOrder}}(\mbox{\hyperlink{class_directed_graph}{DirectedGraph}}\&\ graph)\ :\ Graph(graph)\ \{\ \}} +\DoxyCodeLine{00199\ } +\DoxyCodeLine{00200\ \ \ \ \ \ \ \ \ Node\ operator()(Node\ node)} +\DoxyCodeLine{00201\ \ \ \ \ \ \ \ \ \{} +\DoxyCodeLine{00202\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}(node\ ==\ 0)\ VisitQueue.push\_back(Graph.LeftMost(node));} +\DoxyCodeLine{00203\ } +\DoxyCodeLine{00204\ \ \ \ \ \ \ \ \ \ \ \ \ node\ =\ VisitQueue.front();\ VisitQueue.pop\_front();} +\DoxyCodeLine{00205\ \ \ \ \ \ \ \ \ \ \ \ \ Director\&\ current\ =\ Graph.Graph[node];} +\DoxyCodeLine{00206\ } +\DoxyCodeLine{00207\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}(current.Sibling)} +\DoxyCodeLine{00208\ \ \ \ \ \ \ \ \ \ \ \ \ \{} +\DoxyCodeLine{00209\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}(Graph.NextSibling(current.Sibling))\ VisitQueue.push\_back(current.Parent);} +\DoxyCodeLine{00210\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ VisitQueue.push\_back(Graph.LeftMost(current.Sibling));} +\DoxyCodeLine{00211\ \ \ \ \ \ \ \ \ \ \ \ \ \}} +\DoxyCodeLine{00212\ } +\DoxyCodeLine{00213\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ node;} +\DoxyCodeLine{00214\ \ \ \ \ \ \ \ \ \}} +\DoxyCodeLine{00215\ } +\DoxyCodeLine{00216\ \ \ \ \ \textcolor{keyword}{private}:} +\DoxyCodeLine{00217\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{class_directed_graph}{DirectedGraph}}\&\ Graph;} +\DoxyCodeLine{00218\ \ \ \ \ \ \ \ \ NodeQueue\ \ \ \ \ \ VisitQueue;} +\DoxyCodeLine{00219\ \ \ \ \ \};} +\DoxyCodeLine{00220\ } +\DoxyCodeLine{00221\ \ \ \ \ \textcolor{keyword}{friend}\ \textcolor{keyword}{class\ }\mbox{\hyperlink{class_directed_graph_1_1_post_order}{PostOrder}};} +\DoxyCodeLine{00222\ \ \ \ \ \textcolor{keyword}{class\ }\mbox{\hyperlink{class_directed_graph_1_1_post_order}{PostOrder}}} +\DoxyCodeLine{00223\ \ \ \ \ \{} +\DoxyCodeLine{00224\ \ \ \ \ \textcolor{keyword}{public}:} +\DoxyCodeLine{00225\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{class_directed_graph_1_1_post_order}{PostOrder}}(\mbox{\hyperlink{class_directed_graph}{DirectedGraph}}\&\ graph)\ :\ Graph(graph)\ \{\ \}} +\DoxyCodeLine{00226\ } +\DoxyCodeLine{00227\ \ \ \ \ \ \ \ \ Node\ operator()(Node\ node)} +\DoxyCodeLine{00228\ \ \ \ \ \ \ \ \ \{} +\DoxyCodeLine{00229\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}(VisitQueue.empty())\ VisitQueue.push\_back(Graph.LeftMost(node));} +\DoxyCodeLine{00230\ } +\DoxyCodeLine{00231\ \ \ \ \ \ \ \ \ \ \ \ \ node\ =\ VisitQueue.front();\ VisitQueue.pop\_front();} +\DoxyCodeLine{00232\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}(node\ ==\ 0)\ \textcolor{keywordflow}{return}\ node;} +\DoxyCodeLine{00233\ \ \ \ \ \ \ \ \ \ \ \ \ Director\&\ current\ =\ Graph.Graph[node];} +\DoxyCodeLine{00234\ } +\DoxyCodeLine{00235\ \ \ \ \ \ \ \ \ \ \ \ \ VisitQueue.push\_back(current.Sibling\ ?\ Graph.LeftMost(current.Sibling)\ :\ Graph.Parent(node));} +\DoxyCodeLine{00236\ } +\DoxyCodeLine{00237\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ node;} +\DoxyCodeLine{00238\ \ \ \ \ \ \ \ \ \}} +\DoxyCodeLine{00239\ } +\DoxyCodeLine{00240\ \ \ \ \ \textcolor{keyword}{private}:} +\DoxyCodeLine{00241\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{class_directed_graph}{DirectedGraph}}\&\ Graph;} +\DoxyCodeLine{00242\ \ \ \ \ \ \ \ \ NodeQueue\ \ \ \ \ \ VisitQueue;} +\DoxyCodeLine{00243\ \ \ \ \ \};} +\DoxyCodeLine{00244\ } +\DoxyCodeLine{00245\ \ \ \ \ \textcolor{keyword}{template}<\textcolor{keyword}{typename}\ V,\ \textcolor{keyword}{typename}\ O>} +\DoxyCodeLine{00246\ \ \ \ \ \textcolor{keyword}{class\ }\mbox{\hyperlink{class_directed_graph_1_1_traverser}{Traverser}}} +\DoxyCodeLine{00247\ \ \ \ \ \{} +\DoxyCodeLine{00248\ \ \ \ \ \textcolor{keyword}{public}:} +\DoxyCodeLine{00249\ \ \ \ \ \ \ \ \ \textcolor{keyword}{using\ }VisitorType\ =\ V;} +\DoxyCodeLine{00250\ \ \ \ \ \ \ \ \ \textcolor{keyword}{using\ }OrderType\ =\ O;} +\DoxyCodeLine{00251\ } +\DoxyCodeLine{00252\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{class_directed_graph_1_1_traverser}{Traverser}}(\mbox{\hyperlink{class_directed_graph}{DirectedGraph}}\&\ graph,\ VisitorType\&\ visitor)\ :\ Graph(graph),\ Visitor(visitor),\ Order(graph)\ \{\ \}} +\DoxyCodeLine{00253\ } +\DoxyCodeLine{00254\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{void}\ operator()()} +\DoxyCodeLine{00255\ \ \ \ \ \ \ \ \ \{} +\DoxyCodeLine{00256\ \ \ \ \ \ \ \ \ \ \ \ \ Node\ node\ =\ 0;} +\DoxyCodeLine{00257\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{while}(node\ =\ Order(node))} +\DoxyCodeLine{00258\ \ \ \ \ \ \ \ \ \ \ \ \ \{} +\DoxyCodeLine{00259\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}(Visitor(Graph[node],\ node))\ \textcolor{keywordflow}{break};} +\DoxyCodeLine{00260\ \ \ \ \ \ \ \ \ \ \ \ \ \}} +\DoxyCodeLine{00261\ \ \ \ \ \ \ \ \ \}} +\DoxyCodeLine{00262\ } +\DoxyCodeLine{00263\ \ \ \ \ \textcolor{keyword}{private}:} +\DoxyCodeLine{00264\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{class_directed_graph}{DirectedGraph}}\&\ Graph;} +\DoxyCodeLine{00265\ \ \ \ \ \ \ \ \ VisitorType\&\ \ \ Visitor;} +\DoxyCodeLine{00266\ \ \ \ \ \ \ \ \ OrderType\ \ \ \ \ \ Order;} +\DoxyCodeLine{00267\ \ \ \ \ \};} +\DoxyCodeLine{00268\ \};} +\DoxyCodeLine{00269\ } +\DoxyCodeLine{00270\ \textcolor{preprocessor}{\#endif\ }\textcolor{comment}{//DIRECTEDGRAPH\_H}} + +\end{DoxyCode} diff --git a/Documentation/latex/_editor_system_8h_source.tex b/Documentation/latex/_editor_system_8h_source.tex new file mode 100644 index 0000000..7fcbc7a --- /dev/null +++ b/Documentation/latex/_editor_system_8h_source.tex @@ -0,0 +1,69 @@ +\doxysection{Editor\+System.\+h} +\hypertarget{_editor_system_8h_source}{}\label{_editor_system_8h_source}\index{Include/Editor/EditorSystem.h@{Include/Editor/EditorSystem.h}} + +\begin{DoxyCode}{0} +\DoxyCodeLine{00001\ \textcolor{comment}{//\ =====================================================================================================================}} +\DoxyCodeLine{00002\ \textcolor{comment}{//\ Copyright\ 2024\ Medusa\ Slockbower}} +\DoxyCodeLine{00003\ \textcolor{comment}{//\ Licensed\ under\ the\ Apache\ License,\ Version\ 2.0\ (the\ "{}License"{});}} +\DoxyCodeLine{00004\ \textcolor{comment}{//\ you\ may\ not\ use\ this\ file\ except\ in\ compliance\ with\ the\ License.}} +\DoxyCodeLine{00005\ \textcolor{comment}{//\ You\ may\ obtain\ a\ copy\ of\ the\ License\ at}} +\DoxyCodeLine{00006\ \textcolor{comment}{//}} +\DoxyCodeLine{00007\ \textcolor{comment}{//\ \ http://www.apache.org/licenses/LICENSE-\/2.0}} +\DoxyCodeLine{00008\ \textcolor{comment}{//}} +\DoxyCodeLine{00009\ \textcolor{comment}{//\ Unless\ required\ by\ applicable\ law\ or\ agreed\ to\ in\ writing,\ software}} +\DoxyCodeLine{00010\ \textcolor{comment}{//\ distributed\ under\ the\ License\ is\ distributed\ on\ an\ "{}AS\ IS"{}\ BASIS,}} +\DoxyCodeLine{00011\ \textcolor{comment}{//\ WITHOUT\ WARRANTIES\ OR\ CONDITIONS\ OF\ ANY\ KIND,\ either\ express\ or\ implied.}} +\DoxyCodeLine{00012\ \textcolor{comment}{//\ See\ the\ License\ for\ the\ specific\ language\ governing\ permissions\ and}} +\DoxyCodeLine{00013\ \textcolor{comment}{//\ limitations\ under\ the\ License.}} +\DoxyCodeLine{00014\ \textcolor{comment}{//\ =====================================================================================================================}} +\DoxyCodeLine{00015\ } +\DoxyCodeLine{00016\ \textcolor{preprocessor}{\#ifndef\ EDITORSYSTEM\_H}} +\DoxyCodeLine{00017\ \textcolor{preprocessor}{\#define\ EDITORSYSTEM\_H}} +\DoxyCodeLine{00018\ } +\DoxyCodeLine{00019\ \textcolor{preprocessor}{\#include\ }} +\DoxyCodeLine{00020\ \textcolor{preprocessor}{\#include\ }} +\DoxyCodeLine{00021\ \textcolor{preprocessor}{\#include\ }} +\DoxyCodeLine{00022\ } +\DoxyCodeLine{00023\ \textcolor{preprocessor}{\#include\ }} +\DoxyCodeLine{00024\ } +\DoxyCodeLine{00025\ \textcolor{preprocessor}{\#define\ MAX\_EDITORS\ 256}} +\DoxyCodeLine{00026\ } +\DoxyCodeLine{00027\ \textcolor{keyword}{namespace\ }OpenShaderDesigner} +\DoxyCodeLine{00028\ \{} +\DoxyCodeLine{00029\ \ \ \ \ \textcolor{keyword}{class\ }\mbox{\hyperlink{class_open_shader_designer_1_1_editor_system}{EditorSystem}}} +\DoxyCodeLine{00030\ \ \ \ \ \{} +\DoxyCodeLine{00031\ \ \ \ \ \textcolor{keyword}{public}:} +\DoxyCodeLine{00032\ \ \ \ \ \ \ \ \ \textcolor{keyword}{using\ }WindowID\ =\ uint64\_t;} +\DoxyCodeLine{00033\ } +\DoxyCodeLine{00034\ \ \ \ \ \ \ \ \ \textcolor{keyword}{template}<\textcolor{keyword}{typename}\ T>} +\DoxyCodeLine{00035\ \ \ \ \ \ \ \ \ \textcolor{keyword}{static}\ WindowID\ ID()\ \{\ \textcolor{keywordflow}{return}\ open\_cpp\_utils::unique\_id();\ \}} +\DoxyCodeLine{00036\ } +\DoxyCodeLine{00037\ \ \ \ \ \ \ \ \ \textcolor{keyword}{template}<\textcolor{keyword}{typename}\ T>} +\DoxyCodeLine{00038\ \ \ \ \ \ \ \ \ \textcolor{keyword}{static}\ T*\ Open()\ \{\ T*\ window;\ (window\ =\ Get())-\/>Open();\ \textcolor{keywordflow}{return}\ window;\ \}} +\DoxyCodeLine{00039\ } +\DoxyCodeLine{00040\ \ \ \ \ \ \ \ \ \textcolor{keyword}{template}<\textcolor{keyword}{typename}\ T>} +\DoxyCodeLine{00041\ \ \ \ \ \ \ \ \ \textcolor{keyword}{static}\ T*\ Close()\ \{\ T*\ window;\ (window\ =\ Get())-\/>Close();\ \textcolor{keywordflow}{return}\ window;\ \}} +\DoxyCodeLine{00042\ } +\DoxyCodeLine{00043\ \ \ \ \ \ \ \ \ \textcolor{keyword}{template}<\textcolor{keyword}{typename}\ T>} +\DoxyCodeLine{00044\ \ \ \ \ \ \ \ \ \textcolor{keyword}{static}\ T*\ Get()} +\DoxyCodeLine{00045\ \ \ \ \ \ \ \ \ \{} +\DoxyCodeLine{00046\ \ \ \ \ \ \ \ \ \ \ \ \ T*\ window\ =\ \textcolor{keyword}{reinterpret\_cast<}T*\textcolor{keyword}{>}(Windows[ID()]);} +\DoxyCodeLine{00047\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}(window\ ==\ \textcolor{keyword}{nullptr})\ Windows[ID()]\ =\ window\ =\ \textcolor{keyword}{new}\ T();} +\DoxyCodeLine{00048\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ window;} +\DoxyCodeLine{00049\ \ \ \ \ \ \ \ \ \}} +\DoxyCodeLine{00050\ } +\DoxyCodeLine{00051\ \ \ \ \ \ \ \ \ \textcolor{keyword}{static}\ \textcolor{keywordtype}{void}\ Initialize();} +\DoxyCodeLine{00052\ \ \ \ \ \ \ \ \ \textcolor{keyword}{static}\ \textcolor{keywordtype}{void}\ Draw();} +\DoxyCodeLine{00053\ \ \ \ \ \ \ \ \ \textcolor{keyword}{static}\ \textcolor{keywordtype}{void}\ Shutdown();} +\DoxyCodeLine{00054\ \ \ \ \ \ \ \ \ \textcolor{keyword}{static}\ \textcolor{keywordtype}{void}\ HandleEvents(SDL\_Event*\ event);} +\DoxyCodeLine{00055\ } +\DoxyCodeLine{00056\ \ \ \ \ \textcolor{keyword}{private}:} +\DoxyCodeLine{00057\ \ \ \ \ \ \ \ \ \textcolor{keyword}{inline}\ \textcolor{keyword}{static}\ \mbox{\hyperlink{class_open_shader_designer_1_1_editor_window}{EditorWindow}}*\ Windows[MAX\_EDITORS]\ \{\ \textcolor{keyword}{nullptr}\ \};} +\DoxyCodeLine{00058\ \ \ \ \ \};} +\DoxyCodeLine{00059\ \}} +\DoxyCodeLine{00060\ } +\DoxyCodeLine{00061\ } +\DoxyCodeLine{00062\ } +\DoxyCodeLine{00063\ \textcolor{preprocessor}{\#endif\ }\textcolor{comment}{//EDITORSYSTEM\_H}} + +\end{DoxyCode} diff --git a/Documentation/latex/_editor_window_8h_source.tex b/Documentation/latex/_editor_window_8h_source.tex new file mode 100644 index 0000000..c19beb9 --- /dev/null +++ b/Documentation/latex/_editor_window_8h_source.tex @@ -0,0 +1,84 @@ +\doxysection{Editor\+Window.\+h} +\hypertarget{_editor_window_8h_source}{}\label{_editor_window_8h_source}\index{Include/Editor/EditorWindow.h@{Include/Editor/EditorWindow.h}} + +\begin{DoxyCode}{0} +\DoxyCodeLine{00001\ \textcolor{comment}{//\ =====================================================================================================================}} +\DoxyCodeLine{00002\ \textcolor{comment}{//\ Copyright\ 2024\ Medusa\ Slockbower}} +\DoxyCodeLine{00003\ \textcolor{comment}{//\ Licensed\ under\ the\ Apache\ License,\ Version\ 2.0\ (the\ "{}License"{});}} +\DoxyCodeLine{00004\ \textcolor{comment}{//\ you\ may\ not\ use\ this\ file\ except\ in\ compliance\ with\ the\ License.}} +\DoxyCodeLine{00005\ \textcolor{comment}{//\ You\ may\ obtain\ a\ copy\ of\ the\ License\ at}} +\DoxyCodeLine{00006\ \textcolor{comment}{//}} +\DoxyCodeLine{00007\ \textcolor{comment}{//\ \ http://www.apache.org/licenses/LICENSE-\/2.0}} +\DoxyCodeLine{00008\ \textcolor{comment}{//}} +\DoxyCodeLine{00009\ \textcolor{comment}{//\ Unless\ required\ by\ applicable\ law\ or\ agreed\ to\ in\ writing,\ software}} +\DoxyCodeLine{00010\ \textcolor{comment}{//\ distributed\ under\ the\ License\ is\ distributed\ on\ an\ "{}AS\ IS"{}\ BASIS,}} +\DoxyCodeLine{00011\ \textcolor{comment}{//\ WITHOUT\ WARRANTIES\ OR\ CONDITIONS\ OF\ ANY\ KIND,\ either\ express\ or\ implied.}} +\DoxyCodeLine{00012\ \textcolor{comment}{//\ See\ the\ License\ for\ the\ specific\ language\ governing\ permissions\ and}} +\DoxyCodeLine{00013\ \textcolor{comment}{//\ limitations\ under\ the\ License.}} +\DoxyCodeLine{00014\ \textcolor{comment}{//\ =====================================================================================================================}} +\DoxyCodeLine{00015\ } +\DoxyCodeLine{00016\ \textcolor{preprocessor}{\#ifndef\ EDITORWINDOW\_H}} +\DoxyCodeLine{00017\ \textcolor{preprocessor}{\#define\ EDITORWINDOW\_H}} +\DoxyCodeLine{00018\ } +\DoxyCodeLine{00019\ \textcolor{preprocessor}{\#include\ }} +\DoxyCodeLine{00020\ \textcolor{preprocessor}{\#include\ }} +\DoxyCodeLine{00021\ } +\DoxyCodeLine{00022\ \textcolor{keyword}{namespace\ }OpenShaderDesigner} +\DoxyCodeLine{00023\ \{} +\DoxyCodeLine{00027\ \ \ \ \ \textcolor{keyword}{class\ }\mbox{\hyperlink{class_open_shader_designer_1_1_editor_window}{EditorWindow}}} +\DoxyCodeLine{00028\ \ \ \ \ \{} +\DoxyCodeLine{00029\ \ \ \ \ \textcolor{keyword}{public}:} +\DoxyCodeLine{00033\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{void}\ \mbox{\hyperlink{class_open_shader_designer_1_1_editor_window_a858a412f2f8c652773885d217410d332}{Open}}();} +\DoxyCodeLine{00034\ } +\DoxyCodeLine{00038\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{void}\ \mbox{\hyperlink{class_open_shader_designer_1_1_editor_window_a501528be936bdf479359021308fb0d31}{Draw}}();} +\DoxyCodeLine{00039\ } +\DoxyCodeLine{00043\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{void}\ \mbox{\hyperlink{class_open_shader_designer_1_1_editor_window_a5df4621355612a487578521525029aa6}{Close}}();} +\DoxyCodeLine{00044\ } +\DoxyCodeLine{00049\ \ \ \ \ \ \ \ \ [[nodiscard]]\ \textcolor{keywordtype}{bool}\ \mbox{\hyperlink{class_open_shader_designer_1_1_editor_window_af3ea05326684e2f58d54805ce10570a6}{IsOpen}}()\textcolor{keyword}{\ const\ }\{\ \textcolor{keywordflow}{return}\ bOpen;\ \}} +\DoxyCodeLine{00050\ } +\DoxyCodeLine{00051\ \ \ \ \ \ \ \ \ \textcolor{keyword}{const}\ std::string\ \mbox{\hyperlink{class_open_shader_designer_1_1_editor_window_a2e557a422d0e4e003f85fb9905b66980}{Title}};\ } +\DoxyCodeLine{00052\ } +\DoxyCodeLine{00053\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{void}\ SetFlags(ImGuiWindowFlags\ flags)\ \{\ Flags\ |=\ flags;\ \}} +\DoxyCodeLine{00054\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{void}\ ClearFlags(ImGuiWindowFlags\ flags)\ \{\ Flags\ \&=\ \string~flags;\ \}} +\DoxyCodeLine{00055\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{void}\ ToggleFlags(ImGuiWindowFlags\ flags)\ \{\ Flags\ \string^=\ flags;\ \}} +\DoxyCodeLine{00056\ \ \ \ \ \ \ \ \ [[nodiscard]]\ \textcolor{keywordtype}{bool}\ CheckFlag(ImGuiWindowFlags\ flag)\textcolor{keyword}{\ const\ }\{\ \textcolor{keywordflow}{return}\ Flags\ \&\ flag;\ \}} +\DoxyCodeLine{00057\ } +\DoxyCodeLine{00058\ \ \ \ \ \ \ \ \ [[nodiscard]]\ \textcolor{keywordtype}{bool}\ HasMenuBar()\textcolor{keyword}{\ const\ }\{\ \textcolor{keywordflow}{return}\ CheckFlag(ImGuiWindowFlags\_MenuBar);\ \}} +\DoxyCodeLine{00059\ } +\DoxyCodeLine{00060\ \ \ \ \ \textcolor{keyword}{protected}:} +\DoxyCodeLine{00061\ \ \ \ \ \ \ \ \ \string~EditorWindow()\ =\ \textcolor{keywordflow}{default};} +\DoxyCodeLine{00062\ \ \ \ \ \ \ \ \ EditorWindow(\textcolor{keyword}{const}\ std::string\&\ title} +\DoxyCodeLine{00063\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ ,\ ImGuiWindowFlags\ flags);} +\DoxyCodeLine{00064\ } +\DoxyCodeLine{00068\ \ \ \ \ \ \ \ \ \textcolor{keyword}{virtual}\ \textcolor{keywordtype}{void}\ \mbox{\hyperlink{class_open_shader_designer_1_1_editor_window_a2e68f7186c2ceb3ea3dd5618045c6ab7}{OnOpen}}()} +\DoxyCodeLine{00069\ \ \ \ \ \ \ \ \ \{} +\DoxyCodeLine{00070\ \ \ \ \ \ \ \ \ \};} +\DoxyCodeLine{00071\ } +\DoxyCodeLine{00075\ \ \ \ \ \ \ \ \ \textcolor{keyword}{virtual}\ \textcolor{keywordtype}{void}\ \mbox{\hyperlink{class_open_shader_designer_1_1_editor_window_a058742ce762d782440f595497e5bfbff}{DrawWindow}}()} +\DoxyCodeLine{00076\ \ \ \ \ \ \ \ \ \{} +\DoxyCodeLine{00077\ \ \ \ \ \ \ \ \ \};} +\DoxyCodeLine{00078\ } +\DoxyCodeLine{00082\ \ \ \ \ \ \ \ \ \textcolor{keyword}{virtual}\ \textcolor{keywordtype}{void}\ \mbox{\hyperlink{class_open_shader_designer_1_1_editor_window_a6c229ca70221f672315f9a4f0c7be0c0}{DrawMenu}}()} +\DoxyCodeLine{00083\ \ \ \ \ \ \ \ \ \{} +\DoxyCodeLine{00084\ \ \ \ \ \ \ \ \ \};} +\DoxyCodeLine{00085\ } +\DoxyCodeLine{00089\ \ \ \ \ \ \ \ \ \textcolor{keyword}{virtual}\ \textcolor{keywordtype}{void}\ \mbox{\hyperlink{class_open_shader_designer_1_1_editor_window_a6dc0b192488187ddbde44d7f0b5fc0f7}{OnClose}}()} +\DoxyCodeLine{00090\ \ \ \ \ \ \ \ \ \{} +\DoxyCodeLine{00091\ \ \ \ \ \ \ \ \ \};} +\DoxyCodeLine{00092\ } +\DoxyCodeLine{00093\ \ \ \ \ \textcolor{keyword}{private}:} +\DoxyCodeLine{00094\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{class_open_shader_designer_1_1_editor_window}{EditorWindow}}(\textcolor{keyword}{const}\ \mbox{\hyperlink{class_open_shader_designer_1_1_editor_window}{EditorWindow}}\&)\ =\ \textcolor{keyword}{delete};} +\DoxyCodeLine{00095\ } +\DoxyCodeLine{00096\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{class_open_shader_designer_1_1_editor_window}{EditorWindow}}(\mbox{\hyperlink{class_open_shader_designer_1_1_editor_window}{EditorWindow}}\&\&)\ =\ \textcolor{keyword}{delete};} +\DoxyCodeLine{00097\ } +\DoxyCodeLine{00098\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{int}\ Flags;} +\DoxyCodeLine{00099\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{bool}\ bOpen;} +\DoxyCodeLine{00100\ } +\DoxyCodeLine{00101\ \ \ \ \ \ \ \ \ \textcolor{keyword}{friend}\ \textcolor{keyword}{class\ }\mbox{\hyperlink{class_open_shader_designer_1_1_editor_system}{EditorSystem}};} +\DoxyCodeLine{00102\ \ \ \ \ \};} +\DoxyCodeLine{00103\ \}} +\DoxyCodeLine{00104\ } +\DoxyCodeLine{00105\ } +\DoxyCodeLine{00106\ \textcolor{preprocessor}{\#endif\ }\textcolor{comment}{//EDITORWINDOW\_H}} + +\end{DoxyCode} diff --git a/Documentation/latex/_engine_8h_source.tex b/Documentation/latex/_engine_8h_source.tex new file mode 100644 index 0000000..816bdd2 --- /dev/null +++ b/Documentation/latex/_engine_8h_source.tex @@ -0,0 +1,54 @@ +\doxysection{Engine.\+h} +\hypertarget{_engine_8h_source}{}\label{_engine_8h_source}\index{Include/Core/Engine.h@{Include/Core/Engine.h}} + +\begin{DoxyCode}{0} +\DoxyCodeLine{00001\ \textcolor{comment}{//\ =====================================================================================================================}} +\DoxyCodeLine{00002\ \textcolor{comment}{//\ Copyright\ 2024\ Medusa\ Slockbower}} +\DoxyCodeLine{00003\ \textcolor{comment}{//\ Licensed\ under\ the\ Apache\ License,\ Version\ 2.0\ (the\ "{}License"{});}} +\DoxyCodeLine{00004\ \textcolor{comment}{//\ you\ may\ not\ use\ this\ file\ except\ in\ compliance\ with\ the\ License.}} +\DoxyCodeLine{00005\ \textcolor{comment}{//\ You\ may\ obtain\ a\ copy\ of\ the\ License\ at}} +\DoxyCodeLine{00006\ \textcolor{comment}{//}} +\DoxyCodeLine{00007\ \textcolor{comment}{//\ \ http://www.apache.org/licenses/LICENSE-\/2.0}} +\DoxyCodeLine{00008\ \textcolor{comment}{//}} +\DoxyCodeLine{00009\ \textcolor{comment}{//\ Unless\ required\ by\ applicable\ law\ or\ agreed\ to\ in\ writing,\ software}} +\DoxyCodeLine{00010\ \textcolor{comment}{//\ distributed\ under\ the\ License\ is\ distributed\ on\ an\ "{}AS\ IS"{}\ BASIS,}} +\DoxyCodeLine{00011\ \textcolor{comment}{//\ WITHOUT\ WARRANTIES\ OR\ CONDITIONS\ OF\ ANY\ KIND,\ either\ express\ or\ implied.}} +\DoxyCodeLine{00012\ \textcolor{comment}{//\ See\ the\ License\ for\ the\ specific\ language\ governing\ permissions\ and}} +\DoxyCodeLine{00013\ \textcolor{comment}{//\ limitations\ under\ the\ License.}} +\DoxyCodeLine{00014\ \textcolor{comment}{//\ =====================================================================================================================}} +\DoxyCodeLine{00015\ } +\DoxyCodeLine{00016\ } +\DoxyCodeLine{00017\ \textcolor{preprocessor}{\#ifndef\ ENGINE\_H}} +\DoxyCodeLine{00018\ \textcolor{preprocessor}{\#define\ ENGINE\_H}} +\DoxyCodeLine{00019\ } +\DoxyCodeLine{00020\ \textcolor{preprocessor}{\#include\ }} +\DoxyCodeLine{00021\ \textcolor{preprocessor}{\#include\ }} +\DoxyCodeLine{00022\ } +\DoxyCodeLine{00023\ \textcolor{keyword}{namespace\ }OpenShaderDesigner} +\DoxyCodeLine{00024\ \{} +\DoxyCodeLine{00025\ \ \ \ \ \textcolor{keyword}{class\ }\mbox{\hyperlink{class_open_shader_designer_1_1_engine}{Engine}}} +\DoxyCodeLine{00026\ \ \ \ \ \{} +\DoxyCodeLine{00027\ \ \ \ \ \textcolor{keyword}{public}:} +\DoxyCodeLine{00028\ \ \ \ \ \ \ \ \ \textcolor{keyword}{static}\ \textcolor{keywordtype}{void}\ Start(\textcolor{keyword}{const}\ \mbox{\hyperlink{struct_open_shader_designer_1_1_window_1_1_configuration}{Window::Configuration}}\&\ config);} +\DoxyCodeLine{00029\ \ \ \ \ \ \ \ \ \textcolor{keyword}{static}\ \textcolor{keywordtype}{void}\ Stop();} +\DoxyCodeLine{00030\ } +\DoxyCodeLine{00031\ \ \ \ \ \ \ \ \ \textcolor{keyword}{static}\ \mbox{\hyperlink{class_open_shader_designer_1_1_window}{Window}}\&\ GetMainWindow()\ \{\ \textcolor{keywordflow}{return}\ *MainWindow;\ \}} +\DoxyCodeLine{00032\ \ \ \ \ \textcolor{keyword}{private}:} +\DoxyCodeLine{00033\ \ \ \ \ \ \ \ \ \textcolor{keyword}{static}\ \textcolor{keywordtype}{void}\ Initialize();} +\DoxyCodeLine{00034\ \ \ \ \ \ \ \ \ \textcolor{keyword}{static}\ \textcolor{keywordtype}{void}\ Shutdown();} +\DoxyCodeLine{00035\ \ \ \ \ \ \ \ \ \textcolor{keyword}{static}\ \textcolor{keywordtype}{void}\ Update();} +\DoxyCodeLine{00036\ } +\DoxyCodeLine{00037\ \ \ \ \ \ \ \ \ \textcolor{keyword}{inline}\ \textcolor{keyword}{static}\ \mbox{\hyperlink{class_open_shader_designer_1_1_timer}{Timer}}\ \ \ Frame;} +\DoxyCodeLine{00038\ \ \ \ \ \ \ \ \ \textcolor{keyword}{inline}\ \textcolor{keyword}{static}\ \textcolor{keywordtype}{double}\ \ \_Delta;} +\DoxyCodeLine{00039\ \ \ \ \ \ \ \ \ \textcolor{keyword}{inline}\ \textcolor{keyword}{static}\ \mbox{\hyperlink{class_open_shader_designer_1_1_window}{Window}}*\ MainWindow;} +\DoxyCodeLine{00040\ } +\DoxyCodeLine{00041\ \ \ \ \ \textcolor{keyword}{public}:} +\DoxyCodeLine{00042\ \ \ \ \ \ \ \ \ \textcolor{keyword}{inline}\ \textcolor{keyword}{static}\ \textcolor{keyword}{const}\ \textcolor{keywordtype}{double}\&\ Delta\ =\ \_Delta;} +\DoxyCodeLine{00043\ \ \ \ \ \};} +\DoxyCodeLine{00044\ \}} +\DoxyCodeLine{00045\ } +\DoxyCodeLine{00046\ } +\DoxyCodeLine{00047\ } +\DoxyCodeLine{00048\ \textcolor{preprocessor}{\#endif\ }\textcolor{comment}{//ENGINE\_H}} + +\end{DoxyCode} diff --git a/Documentation/latex/_enum_8h_source.tex b/Documentation/latex/_enum_8h_source.tex new file mode 100644 index 0000000..c52e325 --- /dev/null +++ b/Documentation/latex/_enum_8h_source.tex @@ -0,0 +1,73 @@ +\doxysection{Enum.\+h} +\hypertarget{_enum_8h_source}{}\label{_enum_8h_source}\index{Include/OpenGL/Enum.h@{Include/OpenGL/Enum.h}} + +\begin{DoxyCode}{0} +\DoxyCodeLine{00001\ \textcolor{comment}{//\ =====================================================================================================================}} +\DoxyCodeLine{00002\ \textcolor{comment}{//\ Copyright\ 2024\ Medusa\ Slockbower}} +\DoxyCodeLine{00003\ \textcolor{comment}{//\ Licensed\ under\ the\ Apache\ License,\ Version\ 2.0\ (the\ "{}License"{});}} +\DoxyCodeLine{00004\ \textcolor{comment}{//\ you\ may\ not\ use\ this\ file\ except\ in\ compliance\ with\ the\ License.}} +\DoxyCodeLine{00005\ \textcolor{comment}{//\ You\ may\ obtain\ a\ copy\ of\ the\ License\ at}} +\DoxyCodeLine{00006\ \textcolor{comment}{//}} +\DoxyCodeLine{00007\ \textcolor{comment}{//\ \ http://www.apache.org/licenses/LICENSE-\/2.0}} +\DoxyCodeLine{00008\ \textcolor{comment}{//}} +\DoxyCodeLine{00009\ \textcolor{comment}{//\ Unless\ required\ by\ applicable\ law\ or\ agreed\ to\ in\ writing,\ software}} +\DoxyCodeLine{00010\ \textcolor{comment}{//\ distributed\ under\ the\ License\ is\ distributed\ on\ an\ "{}AS\ IS"{}\ BASIS,}} +\DoxyCodeLine{00011\ \textcolor{comment}{//\ WITHOUT\ WARRANTIES\ OR\ CONDITIONS\ OF\ ANY\ KIND,\ either\ express\ or\ implied.}} +\DoxyCodeLine{00012\ \textcolor{comment}{//\ See\ the\ License\ for\ the\ specific\ language\ governing\ permissions\ and}} +\DoxyCodeLine{00013\ \textcolor{comment}{//\ limitations\ under\ the\ License.}} +\DoxyCodeLine{00014\ \textcolor{comment}{//\ =====================================================================================================================}} +\DoxyCodeLine{00015\ } +\DoxyCodeLine{00016\ \textcolor{preprocessor}{\#ifndef\ ENUM\_H}} +\DoxyCodeLine{00017\ \textcolor{preprocessor}{\#define\ ENUM\_H}} +\DoxyCodeLine{00018\ } +\DoxyCodeLine{00019\ \textcolor{preprocessor}{\#include\ }} +\DoxyCodeLine{00020\ } +\DoxyCodeLine{00021\ \textcolor{keyword}{namespace\ }GLW} +\DoxyCodeLine{00022\ \{} +\DoxyCodeLine{00023\ \ \ \ \ \textcolor{keyword}{enum}\ Primitive\ :\ GLenum} +\DoxyCodeLine{00024\ \ \ \ \ \{} +\DoxyCodeLine{00025\ \ \ \ \ \ \ \ \ TRIANGLES\ =\ GL\_TRIANGLES} +\DoxyCodeLine{00026\ \ \ \ \ ,\ \ \ LINES\ =\ GL\_LINES} +\DoxyCodeLine{00027\ \ \ \ \ ,\ \ \ POINTS\ =\ GL\_POINTS} +\DoxyCodeLine{00028\ \ \ \ \ \};} +\DoxyCodeLine{00029\ } +\DoxyCodeLine{00030\ \ \ \ \ \textcolor{keyword}{enum}\ BufferType\ :\ GLenum} +\DoxyCodeLine{00031\ \ \ \ \ \{} +\DoxyCodeLine{00032\ \ \ \ \ \ \ \ \ AtomicCounter\ =\ GL\_ATOMIC\_COUNTER\_BUFFER} +\DoxyCodeLine{00033\ \ \ \ \ ,\ \ \ ElementArray\ =\ GL\_ELEMENT\_ARRAY\_BUFFER} +\DoxyCodeLine{00034\ \ \ \ \ ,\ \ \ IndirectCompute\ =\ GL\_DISPATCH\_INDIRECT\_BUFFER} +\DoxyCodeLine{00035\ \ \ \ \ ,\ \ \ IndirectDraw\ =\ GL\_DRAW\_INDIRECT\_BUFFER} +\DoxyCodeLine{00036\ \ \ \ \ ,\ \ \ PixelPack\ =\ GL\_PIXEL\_PACK\_BUFFER} +\DoxyCodeLine{00037\ \ \ \ \ ,\ \ \ PixelUnpack\ =\ GL\_PIXEL\_UNPACK\_BUFFER} +\DoxyCodeLine{00038\ \ \ \ \ ,\ \ \ ShaderStorage\ =\ GL\_SHADER\_STORAGE\_BUFFER} +\DoxyCodeLine{00039\ \ \ \ \ ,\ \ \ TransformFeedback\ =\ GL\_TRANSFORM\_FEEDBACK} +\DoxyCodeLine{00040\ \ \ \ \ ,\ \ \ Uniform\ =\ GL\_UNIFORM\_BUFFER} +\DoxyCodeLine{00041\ \ \ \ \ ,\ \ \ VertexArray\ =\ GL\_ARRAY\_BUFFER} +\DoxyCodeLine{00042\ \ \ \ \ \};} +\DoxyCodeLine{00043\ } +\DoxyCodeLine{00044\ \ \ \ \ \textcolor{keyword}{enum}\ BufferUsage\ :\ GLenum} +\DoxyCodeLine{00045\ \ \ \ \ \{} +\DoxyCodeLine{00049\ \ \ \ \ \ \ \ \ STATIC\ \ \ \ \ =\ GL\_NONE} +\DoxyCodeLine{00050\ } +\DoxyCodeLine{00054\ \ \ \ \ ,\ \ \ READ\ \ \ \ \ \ \ =\ GL\_MAP\_READ\_BIT} +\DoxyCodeLine{00055\ \ \ \ \ ,\ \ \ WRITE\ \ \ \ \ \ =\ GL\_MAP\_WRITE\_BIT} +\DoxyCodeLine{00056\ \ \ \ \ ,\ \ \ READ\_WRITE\ =\ READ\ |\ WRITE} +\DoxyCodeLine{00057\ } +\DoxyCodeLine{00061\ \ \ \ \ ,\ \ \ DYNAMIC\ =\ GL\_DYNAMIC\_STORAGE\_BIT} +\DoxyCodeLine{00062\ } +\DoxyCodeLine{00066\ \ \ \ \ ,\ \ \ PERSISTENT\ =\ GL\_MAP\_PERSISTENT\_BIT} +\DoxyCodeLine{00067\ } +\DoxyCodeLine{00071\ \ \ \ \ ,\ \ \ COHERENT\ =\ GL\_MAP\_PERSISTENT\_BIT\ |\ PERSISTENT} +\DoxyCodeLine{00072\ \ \ \ \ \};} +\DoxyCodeLine{00073\ } +\DoxyCodeLine{00074\ \ \ \ \ \textcolor{keyword}{enum}\ BufferStorage\ :\ GLenum} +\DoxyCodeLine{00075\ \ \ \ \ \{} +\DoxyCodeLine{00079\ \ \ \ \ \ \ \ \ GPU\ =\ GL\_NONE} +\DoxyCodeLine{00080\ } +\DoxyCodeLine{00084\ \ \ \ \ ,\ \ \ CPU\ =\ GL\_CLIENT\_STORAGE\_BIT} +\DoxyCodeLine{00085\ \ \ \ \ \};} +\DoxyCodeLine{00086\ \}} +\DoxyCodeLine{00087\ } +\DoxyCodeLine{00088\ \textcolor{preprocessor}{\#endif\ }\textcolor{comment}{//ENUM\_H}} + +\end{DoxyCode} diff --git a/Documentation/latex/_event_system_8h_source.tex b/Documentation/latex/_event_system_8h_source.tex new file mode 100644 index 0000000..cab0d6f --- /dev/null +++ b/Documentation/latex/_event_system_8h_source.tex @@ -0,0 +1,118 @@ +\doxysection{Event\+System.\+h} +\hypertarget{_event_system_8h_source}{}\label{_event_system_8h_source}\index{Include/Core/EventSystem.h@{Include/Core/EventSystem.h}} + +\begin{DoxyCode}{0} +\DoxyCodeLine{00001\ \textcolor{comment}{//\ =====================================================================================================================}} +\DoxyCodeLine{00002\ \textcolor{comment}{//\ Copyright\ 2024\ Medusa\ Slockbower}} +\DoxyCodeLine{00003\ \textcolor{comment}{//\ Licensed\ under\ the\ Apache\ License,\ Version\ 2.0\ (the\ "{}License"{});}} +\DoxyCodeLine{00004\ \textcolor{comment}{//\ you\ may\ not\ use\ this\ file\ except\ in\ compliance\ with\ the\ License.}} +\DoxyCodeLine{00005\ \textcolor{comment}{//\ You\ may\ obtain\ a\ copy\ of\ the\ License\ at}} +\DoxyCodeLine{00006\ \textcolor{comment}{//}} +\DoxyCodeLine{00007\ \textcolor{comment}{//\ \ http://www.apache.org/licenses/LICENSE-\/2.0}} +\DoxyCodeLine{00008\ \textcolor{comment}{//}} +\DoxyCodeLine{00009\ \textcolor{comment}{//\ Unless\ required\ by\ applicable\ law\ or\ agreed\ to\ in\ writing,\ software}} +\DoxyCodeLine{00010\ \textcolor{comment}{//\ distributed\ under\ the\ License\ is\ distributed\ on\ an\ "{}AS\ IS"{}\ BASIS,}} +\DoxyCodeLine{00011\ \textcolor{comment}{//\ WITHOUT\ WARRANTIES\ OR\ CONDITIONS\ OF\ ANY\ KIND,\ either\ express\ or\ implied.}} +\DoxyCodeLine{00012\ \textcolor{comment}{//\ See\ the\ License\ for\ the\ specific\ language\ governing\ permissions\ and}} +\DoxyCodeLine{00013\ \textcolor{comment}{//\ limitations\ under\ the\ License.}} +\DoxyCodeLine{00014\ \textcolor{comment}{//\ =====================================================================================================================}} +\DoxyCodeLine{00015\ } +\DoxyCodeLine{00016\ \textcolor{preprocessor}{\#ifndef\ ENGINE\_EVENTSYSTEM\_H}} +\DoxyCodeLine{00017\ \textcolor{preprocessor}{\#define\ ENGINE\_EVENTSYSTEM\_H}} +\DoxyCodeLine{00018\ } +\DoxyCodeLine{00019\ \textcolor{preprocessor}{\#include\ }} +\DoxyCodeLine{00020\ } +\DoxyCodeLine{00021\ \textcolor{preprocessor}{\#include\ }} +\DoxyCodeLine{00022\ \textcolor{preprocessor}{\#include\ }} +\DoxyCodeLine{00023\ \textcolor{preprocessor}{\#include\ }} +\DoxyCodeLine{00024\ } +\DoxyCodeLine{00025\ } +\DoxyCodeLine{00026\ \textcolor{preprocessor}{\#define\ MAX\_EVENT\_TYPES\ 256}} +\DoxyCodeLine{00027\ } +\DoxyCodeLine{00028\ \textcolor{keyword}{namespace\ }ocu\ =\ open\_cpp\_utils;} +\DoxyCodeLine{00029\ } +\DoxyCodeLine{00030\ \textcolor{keyword}{namespace\ }OpenShaderDesigner} +\DoxyCodeLine{00031\ \{} +\DoxyCodeLine{00035\ \ \ \ \ \textcolor{keyword}{struct\ }\mbox{\hyperlink{struct_open_shader_designer_1_1_event}{Event}}} +\DoxyCodeLine{00036\ \ \ \ \ \{} +\DoxyCodeLine{00037\ \ \ \ \ \ \ \ \ \textcolor{keyword}{template}<\textcolor{keyword}{typename}\ T>} +\DoxyCodeLine{00038\ \ \ \ \ \ \ \ \ \textcolor{keyword}{static}\ uint8\_t\ TypeOf()\ \{\ \textcolor{keywordflow}{return}\ \textcolor{keyword}{static\_cast<}uint8\_t\textcolor{keyword}{>}(ocu::unique\_id());\ \}} +\DoxyCodeLine{00039\ } +\DoxyCodeLine{00044\ \ \ \ \ \ \ \ \ \textcolor{keyword}{virtual}\ \textcolor{keyword}{inline}\ uint8\_t\ \mbox{\hyperlink{struct_open_shader_designer_1_1_event_a1920b3e03c8e47a463f403cd7c29dc26}{GetID}}()\ \textcolor{keyword}{const}\ =\ 0;} +\DoxyCodeLine{00045\ \ \ \ \ \};} +\DoxyCodeLine{00046\ } +\DoxyCodeLine{00047\ } +\DoxyCodeLine{00051\ \ \ \ \ \textcolor{keyword}{class\ }\mbox{\hyperlink{class_open_shader_designer_1_1___impl_event_handler}{\_ImplEventHandler}}} +\DoxyCodeLine{00052\ \ \ \ \ \{} +\DoxyCodeLine{00053\ \ \ \ \ \ \ \ \ \textcolor{keyword}{virtual}\ \textcolor{keywordtype}{bool}\ \_HandleEvent(\textcolor{keyword}{const}\ \mbox{\hyperlink{struct_open_shader_designer_1_1_event}{Event}}*\ event)\ =\ 0;} +\DoxyCodeLine{00054\ } +\DoxyCodeLine{00055\ \ \ \ \ \ \ \ \ \textcolor{keyword}{friend}\ \textcolor{keyword}{class\ }\mbox{\hyperlink{class_open_shader_designer_1_1_event_system}{EventSystem}};} +\DoxyCodeLine{00056\ \ \ \ \ \};} +\DoxyCodeLine{00057\ } +\DoxyCodeLine{00062\ \ \ \ \ \textcolor{keyword}{template}<\textcolor{keyword}{typename}\ EventType>} +\DoxyCodeLine{00063\ \ \ \ \ \textcolor{keyword}{class\ }\mbox{\hyperlink{class_open_shader_designer_1_1_event_handler}{EventHandler}}\ :\ \textcolor{keyword}{private}\ \mbox{\hyperlink{class_open_shader_designer_1_1___impl_event_handler}{\_ImplEventHandler}}} +\DoxyCodeLine{00064\ \ \ \ \ \{} +\DoxyCodeLine{00065\ \ \ \ \ \textcolor{keyword}{public}:} +\DoxyCodeLine{00066\ \ \ \ \ \ \ \ \ \textcolor{keyword}{using\ }\mbox{\hyperlink{class_open_shader_designer_1_1_event_handler_ac7326c1ee1a04cf764475dc7c74dc021}{HandledType}}\ =\ EventType;\ } +\DoxyCodeLine{00067\ } +\DoxyCodeLine{00072\ \ \ \ \ \ \ \ \ \textcolor{keyword}{virtual}\ \textcolor{keywordtype}{bool}\ \mbox{\hyperlink{class_open_shader_designer_1_1_event_handler_a3f8d4130cfbb6c7b1f6be52d0d6e1fae}{HandleEvent}}(\textcolor{keyword}{const}\ \mbox{\hyperlink{class_open_shader_designer_1_1_event_handler_ac7326c1ee1a04cf764475dc7c74dc021}{HandledType}}*\ event)\ =\ 0;} +\DoxyCodeLine{00073\ \ \ \ \ \textcolor{keyword}{private}:} +\DoxyCodeLine{00074\ } +\DoxyCodeLine{00079\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{bool}\ \_HandleEvent(\textcolor{keyword}{const}\ \mbox{\hyperlink{struct_open_shader_designer_1_1_event}{Event}}*\ event)\ \textcolor{keyword}{override};} +\DoxyCodeLine{00080\ \ \ \ \ \};} +\DoxyCodeLine{00081\ } +\DoxyCodeLine{00085\ \ \ \ \ \textcolor{keyword}{class\ }\mbox{\hyperlink{class_open_shader_designer_1_1_event_system}{EventSystem}}} +\DoxyCodeLine{00086\ \ \ \ \ \{} +\DoxyCodeLine{00087\ \ \ \ \ \textcolor{keyword}{public}:} +\DoxyCodeLine{00091\ \ \ \ \ \ \ \ \ \textcolor{keyword}{static}\ \textcolor{keywordtype}{void}\ \mbox{\hyperlink{class_open_shader_designer_1_1_event_system_a55942d1d9b1d427c40aeade3b0ee8600}{PostEvent}}(\textcolor{keyword}{const}\ \mbox{\hyperlink{struct_open_shader_designer_1_1_event}{Event}}*);} +\DoxyCodeLine{00092\ } +\DoxyCodeLine{00097\ \ \ \ \ \ \ \ \ \textcolor{keyword}{template}<\textcolor{keyword}{typename}\ T>} +\DoxyCodeLine{00098\ \ \ \ \ \ \ \ \ \textcolor{keyword}{static}\ \textcolor{keywordtype}{void}\ \mbox{\hyperlink{class_open_shader_designer_1_1_event_system_ad7aaf19637c81922d02dafe92ff1982d}{RegisterHandler}}(\mbox{\hyperlink{class_open_shader_designer_1_1_event_handler}{EventHandler}}*);} +\DoxyCodeLine{00099\ } +\DoxyCodeLine{00104\ \ \ \ \ \ \ \ \ \textcolor{keyword}{template}<\textcolor{keyword}{typename}\ T>} +\DoxyCodeLine{00105\ \ \ \ \ \ \ \ \ \textcolor{keyword}{static}\ \textcolor{keywordtype}{void}\ \mbox{\hyperlink{class_open_shader_designer_1_1_event_system_a46be97970de801727824e3ac8cc93872}{UnregisterHandler}}(\mbox{\hyperlink{class_open_shader_designer_1_1_event_handler}{EventHandler}}*);} +\DoxyCodeLine{00106\ } +\DoxyCodeLine{00107\ \ \ \ \ \textcolor{keyword}{private}:} +\DoxyCodeLine{00108\ \ \ \ \ \ \ \ \ \textcolor{keyword}{inline}\ \textcolor{keyword}{static}\ std::list<\_ImplEventHandler*>\ HandlerMap[MAX\_EVENT\_TYPES];} +\DoxyCodeLine{00109\ \ \ \ \ \ \ \ \ \textcolor{keyword}{inline}\ \textcolor{keyword}{static}\ std::mutex\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ Lock;} +\DoxyCodeLine{00110\ } +\DoxyCodeLine{00111\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{class_open_shader_designer_1_1_event_system}{EventSystem}}(\textcolor{keyword}{const}\ \mbox{\hyperlink{class_open_shader_designer_1_1_event_system}{EventSystem}}\&)\ =\ \textcolor{keyword}{delete};} +\DoxyCodeLine{00112\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{class_open_shader_designer_1_1_event_system}{EventSystem}}(\mbox{\hyperlink{class_open_shader_designer_1_1_event_system}{EventSystem}}\&\&)\ =\ \textcolor{keyword}{delete};} +\DoxyCodeLine{00113\ \ \ \ \ \};} +\DoxyCodeLine{00114\ } +\DoxyCodeLine{00115\ \ \ \ \ \textcolor{keyword}{template}<\textcolor{keyword}{typename}\ T>} +\DoxyCodeLine{00116\ \ \ \ \ \textcolor{keywordtype}{void}\ \mbox{\hyperlink{class_open_shader_designer_1_1_event_system_a46be97970de801727824e3ac8cc93872}{EventSystem::UnregisterHandler}}(\mbox{\hyperlink{class_open_shader_designer_1_1_event_handler}{EventHandler}}*\ handler)} +\DoxyCodeLine{00117\ \ \ \ \ \{} +\DoxyCodeLine{00118\ \ \ \ \ \ \ \ \ \textcolor{comment}{//\ Thread\ safe}} +\DoxyCodeLine{00119\ \ \ \ \ \ \ \ \ std::lock\_guard\ guard(Lock);} +\DoxyCodeLine{00120\ \ \ \ \ \ \ \ \ \textcolor{keyword}{const}\ uint8\_t\ index\ =\ T::ID;} +\DoxyCodeLine{00121\ \ \ \ \ \ \ \ \ std::erase(HandlerMap[index],\ \textcolor{keyword}{reinterpret\_cast<}\mbox{\hyperlink{class_open_shader_designer_1_1___impl_event_handler}{\_ImplEventHandler}}*\textcolor{keyword}{>}(handler));} +\DoxyCodeLine{00122\ \ \ \ \ \}} +\DoxyCodeLine{00123\ } +\DoxyCodeLine{00124\ \ \ \ \ \textcolor{keyword}{template}<\textcolor{keyword}{typename}\ T>} +\DoxyCodeLine{00125\ \ \ \ \ \textcolor{keywordtype}{void}\ \mbox{\hyperlink{class_open_shader_designer_1_1_event_system_ad7aaf19637c81922d02dafe92ff1982d}{EventSystem::RegisterHandler}}(\mbox{\hyperlink{class_open_shader_designer_1_1_event_handler}{EventHandler}}*\ handler)} +\DoxyCodeLine{00126\ \ \ \ \ \{} +\DoxyCodeLine{00127\ \ \ \ \ \ \ \ \ \textcolor{comment}{//\ Thread\ safe}} +\DoxyCodeLine{00128\ \ \ \ \ \ \ \ \ std::lock\_guard\ guard(Lock);} +\DoxyCodeLine{00129\ \ \ \ \ \ \ \ \ \textcolor{keyword}{const}\ uint8\_t\ index\ =\ T::ID;} +\DoxyCodeLine{00130\ \ \ \ \ \ \ \ \ HandlerMap[index].push\_back(\textcolor{keyword}{reinterpret\_cast<}\mbox{\hyperlink{class_open_shader_designer_1_1___impl_event_handler}{\_ImplEventHandler}}*\textcolor{keyword}{>}(handler));} +\DoxyCodeLine{00131\ \ \ \ \ \}} +\DoxyCodeLine{00132\ } +\DoxyCodeLine{00133\ \ \ \ \ \textcolor{keyword}{template}<\textcolor{keyword}{typename}\ EventType>} +\DoxyCodeLine{00134\ \ \ \ \ \textcolor{keywordtype}{bool}\ \mbox{\hyperlink{class_open_shader_designer_1_1_event_handler}{EventHandler::\_HandleEvent}}(\textcolor{keyword}{const}\ \mbox{\hyperlink{struct_open_shader_designer_1_1_event}{Event}}\ *event)} +\DoxyCodeLine{00135\ \ \ \ \ \{} +\DoxyCodeLine{00136\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}(EventType::ID\ !=\ event-\/>\mbox{\hyperlink{struct_open_shader_designer_1_1_event_a1920b3e03c8e47a463f403cd7c29dc26}{GetID}}())\ \textcolor{keywordflow}{return}\ \textcolor{keyword}{false};} +\DoxyCodeLine{00137\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ HandleEvent(\textcolor{keyword}{reinterpret\_cast<}\textcolor{keyword}{const\ }EventType*\textcolor{keyword}{>}(event));} +\DoxyCodeLine{00138\ \ \ \ \ \}} +\DoxyCodeLine{00139\ \}} +\DoxyCodeLine{00140\ } +\DoxyCodeLine{00141\ \textcolor{preprocessor}{\#define\ BeginEvent(EVENT)\ struct\ EVENT\ :\ OpenShaderDesigner::Event\ \(\backslash\)}} +\DoxyCodeLine{00142\ \textcolor{preprocessor}{\ \ \ \ \{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \(\backslash\)}} +\DoxyCodeLine{00143\ \textcolor{preprocessor}{\ \ \ \ static\ inline\ const\ uint8\_t\ ID\ =\ Event::TypeOf();\ \(\backslash\)}} +\DoxyCodeLine{00144\ \textcolor{preprocessor}{\ \ \ \ inline\ uint8\_t\ GetID()\ const\ override\ \{\ return\ ID;\ \}}} +\DoxyCodeLine{00145\ } +\DoxyCodeLine{00146\ \textcolor{preprocessor}{\#define\ EndEvent\ \};}} +\DoxyCodeLine{00147\ } +\DoxyCodeLine{00148\ \textcolor{preprocessor}{\#endif\ }\textcolor{comment}{//ENGINE\_EVENTSYSTEM\_H}} + +\end{DoxyCode} diff --git a/Documentation/latex/_math_8h_source.tex b/Documentation/latex/_math_8h_source.tex new file mode 100644 index 0000000..422ba80 --- /dev/null +++ b/Documentation/latex/_math_8h_source.tex @@ -0,0 +1,62 @@ +\doxysection{Math.\+h} +\hypertarget{_math_8h_source}{}\label{_math_8h_source}\index{Include/Graph/Nodes/Math.h@{Include/Graph/Nodes/Math.h}} + +\begin{DoxyCode}{0} +\DoxyCodeLine{00001\ \textcolor{comment}{//\ =====================================================================================================================}} +\DoxyCodeLine{00002\ \textcolor{comment}{//\ Copyright\ 2024\ Medusa\ Slockbower}} +\DoxyCodeLine{00003\ \textcolor{comment}{//\ Licensed\ under\ the\ Apache\ License,\ Version\ 2.0\ (the\ "{}License"{});}} +\DoxyCodeLine{00004\ \textcolor{comment}{//\ you\ may\ not\ use\ this\ file\ except\ in\ compliance\ with\ the\ License.}} +\DoxyCodeLine{00005\ \textcolor{comment}{//\ You\ may\ obtain\ a\ copy\ of\ the\ License\ at}} +\DoxyCodeLine{00006\ \textcolor{comment}{//}} +\DoxyCodeLine{00007\ \textcolor{comment}{//\ \ http://www.apache.org/licenses/LICENSE-\/2.0}} +\DoxyCodeLine{00008\ \textcolor{comment}{//}} +\DoxyCodeLine{00009\ \textcolor{comment}{//\ Unless\ required\ by\ applicable\ law\ or\ agreed\ to\ in\ writing,\ software}} +\DoxyCodeLine{00010\ \textcolor{comment}{//\ distributed\ under\ the\ License\ is\ distributed\ on\ an\ "{}AS\ IS"{}\ BASIS,}} +\DoxyCodeLine{00011\ \textcolor{comment}{//\ WITHOUT\ WARRANTIES\ OR\ CONDITIONS\ OF\ ANY\ KIND,\ either\ express\ or\ implied.}} +\DoxyCodeLine{00012\ \textcolor{comment}{//\ See\ the\ License\ for\ the\ specific\ language\ governing\ permissions\ and}} +\DoxyCodeLine{00013\ \textcolor{comment}{//\ limitations\ under\ the\ License.}} +\DoxyCodeLine{00014\ \textcolor{comment}{//\ =====================================================================================================================}} +\DoxyCodeLine{00015\ } +\DoxyCodeLine{00016\ \textcolor{preprocessor}{\#ifndef\ MATH\_H}} +\DoxyCodeLine{00017\ \textcolor{preprocessor}{\#define\ MATH\_H}} +\DoxyCodeLine{00018\ } +\DoxyCodeLine{00019\ \textcolor{preprocessor}{\#include\ }} +\DoxyCodeLine{00020\ \textcolor{preprocessor}{\#include\ }} +\DoxyCodeLine{00021\ \textcolor{preprocessor}{\#include\ }} +\DoxyCodeLine{00022\ } +\DoxyCodeLine{00023\ \textcolor{keyword}{namespace\ }ocu\ =\ open\_cpp\_utils;} +\DoxyCodeLine{00024\ } +\DoxyCodeLine{00025\ \textcolor{keyword}{namespace\ }OpenShaderDesigner::Nodes::Math} +\DoxyCodeLine{00026\ \{} +\DoxyCodeLine{00027\ \ \ \ \ \textcolor{keyword}{inline}\ \textcolor{keyword}{static}\ \textcolor{keyword}{constexpr}\ ImColor\ HeaderColor\ =\ ImColor(0x92,\ 0x16,\ 0x16);} +\DoxyCodeLine{00028\ } +\DoxyCodeLine{00029\ \ \ \ \ \textcolor{keyword}{struct\ }\mbox{\hyperlink{struct_open_shader_designer_1_1_nodes_1_1_math_1_1_constant}{Constant}}\ :\ \textcolor{keyword}{public}\ \mbox{\hyperlink{struct_open_shader_designer_1_1_node}{Node}}} +\DoxyCodeLine{00030\ \ \ \ \ \{} +\DoxyCodeLine{00031\ \ \ \ \ \ \ \ \ \textcolor{keyword}{using\ }ValueType\ =\ ocu::any;} +\DoxyCodeLine{00032\ } +\DoxyCodeLine{00033\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{struct_open_shader_designer_1_1_nodes_1_1_math_1_1_constant}{Constant}}(\mbox{\hyperlink{class_open_shader_designer_1_1_shader_graph}{ShaderGraph}}\&\ graph,\ ImVec2\ pos);} +\DoxyCodeLine{00034\ \ \ \ \ \ \ \ \ \textcolor{keyword}{virtual}\ \mbox{\hyperlink{struct_open_shader_designer_1_1_nodes_1_1_math_1_1_constant}{\string~Constant}}()\ =\ \textcolor{keywordflow}{default};} +\DoxyCodeLine{00035\ } +\DoxyCodeLine{00036\ \ \ \ \ \ \ \ \ [[nodiscard]]\ \mbox{\hyperlink{struct_open_shader_designer_1_1_node}{Node}}*\ Copy(\mbox{\hyperlink{class_open_shader_designer_1_1_shader_graph}{ShaderGraph}}\&\ graph)\ \textcolor{keyword}{const\ override};} +\DoxyCodeLine{00037\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{void}\ Inspect()\ \textcolor{keyword}{override};} +\DoxyCodeLine{00038\ } +\DoxyCodeLine{00039\ \ \ \ \ \ \ \ \ ValueType\ \ \ \ Value;} +\DoxyCodeLine{00040\ \ \ \ \ \};} +\DoxyCodeLine{00041\ } +\DoxyCodeLine{00042\ \ \ \ \ RegisterNode(\textcolor{stringliteral}{"{}Math/Constant"{}},\ \mbox{\hyperlink{struct_open_shader_designer_1_1_nodes_1_1_math_1_1_constant}{Constant}});} +\DoxyCodeLine{00043\ } +\DoxyCodeLine{00044\ \ \ \ \ \textcolor{keyword}{struct\ }\mbox{\hyperlink{struct_open_shader_designer_1_1_nodes_1_1_math_1_1_add}{Add}}\ :\ \textcolor{keyword}{public}\ \mbox{\hyperlink{struct_open_shader_designer_1_1_node}{Node}}} +\DoxyCodeLine{00045\ \ \ \ \ \{} +\DoxyCodeLine{00046\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{struct_open_shader_designer_1_1_nodes_1_1_math_1_1_add}{Add}}(\mbox{\hyperlink{class_open_shader_designer_1_1_shader_graph}{ShaderGraph}}\&\ graph,\ ImVec2\ pos);} +\DoxyCodeLine{00047\ \ \ \ \ \ \ \ \ \textcolor{keyword}{virtual}\ \mbox{\hyperlink{struct_open_shader_designer_1_1_nodes_1_1_math_1_1_add}{\string~Add}}()\ =\ \textcolor{keywordflow}{default};} +\DoxyCodeLine{00048\ } +\DoxyCodeLine{00049\ \ \ \ \ \ \ \ \ [[nodiscard]]\ \mbox{\hyperlink{struct_open_shader_designer_1_1_node}{Node}}*\ Copy(\mbox{\hyperlink{class_open_shader_designer_1_1_shader_graph}{ShaderGraph}}\&\ graph)\ \textcolor{keyword}{const\ override};} +\DoxyCodeLine{00050\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{void}\ Inspect()\ \textcolor{keyword}{override};} +\DoxyCodeLine{00051\ \ \ \ \ \};} +\DoxyCodeLine{00052\ } +\DoxyCodeLine{00053\ \ \ \ \ RegisterNode(\textcolor{stringliteral}{"{}Math/Add"{}},\ \mbox{\hyperlink{struct_open_shader_designer_1_1_nodes_1_1_math_1_1_add}{Add}});} +\DoxyCodeLine{00054\ \}} +\DoxyCodeLine{00055\ } +\DoxyCodeLine{00056\ \textcolor{preprocessor}{\#endif\ }\textcolor{comment}{//MATH\_H}} + +\end{DoxyCode} diff --git a/Documentation/latex/_optional_8h_source.tex b/Documentation/latex/_optional_8h_source.tex new file mode 100644 index 0000000..24d3060 --- /dev/null +++ b/Documentation/latex/_optional_8h_source.tex @@ -0,0 +1,73 @@ +\doxysection{Optional.\+h} +\hypertarget{_optional_8h_source}{}\label{_optional_8h_source}\index{Include/Utility/Optional.h@{Include/Utility/Optional.h}} + +\begin{DoxyCode}{0} +\DoxyCodeLine{00001\ \textcolor{comment}{//\ =====================================================================================================================}} +\DoxyCodeLine{00002\ \textcolor{comment}{//\ Copyright\ 2024\ Medusa\ Slockbower}} +\DoxyCodeLine{00003\ \textcolor{comment}{//\ Licensed\ under\ the\ Apache\ License,\ Version\ 2.0\ (the\ "{}License"{});}} +\DoxyCodeLine{00004\ \textcolor{comment}{//\ you\ may\ not\ use\ this\ file\ except\ in\ compliance\ with\ the\ License.}} +\DoxyCodeLine{00005\ \textcolor{comment}{//\ You\ may\ obtain\ a\ copy\ of\ the\ License\ at}} +\DoxyCodeLine{00006\ \textcolor{comment}{//}} +\DoxyCodeLine{00007\ \textcolor{comment}{//\ \ http://www.apache.org/licenses/LICENSE-\/2.0}} +\DoxyCodeLine{00008\ \textcolor{comment}{//}} +\DoxyCodeLine{00009\ \textcolor{comment}{//\ Unless\ required\ by\ applicable\ law\ or\ agreed\ to\ in\ writing,\ software}} +\DoxyCodeLine{00010\ \textcolor{comment}{//\ distributed\ under\ the\ License\ is\ distributed\ on\ an\ "{}AS\ IS"{}\ BASIS,}} +\DoxyCodeLine{00011\ \textcolor{comment}{//\ WITHOUT\ WARRANTIES\ OR\ CONDITIONS\ OF\ ANY\ KIND,\ either\ express\ or\ implied.}} +\DoxyCodeLine{00012\ \textcolor{comment}{//\ See\ the\ License\ for\ the\ specific\ language\ governing\ permissions\ and}} +\DoxyCodeLine{00013\ \textcolor{comment}{//\ limitations\ under\ the\ License.}} +\DoxyCodeLine{00014\ \textcolor{comment}{//\ =====================================================================================================================}} +\DoxyCodeLine{00015\ } +\DoxyCodeLine{00016\ \textcolor{preprocessor}{\#ifndef\ OPTIONAL\_H}} +\DoxyCodeLine{00017\ \textcolor{preprocessor}{\#define\ OPTIONAL\_H}} +\DoxyCodeLine{00018\ } +\DoxyCodeLine{00019\ \textcolor{keyword}{template}<\textcolor{keyword}{typename}\ T>} +\DoxyCodeLine{00020\ \textcolor{keyword}{class\ }\mbox{\hyperlink{class_optional}{Optional}}} +\DoxyCodeLine{00021\ \{} +\DoxyCodeLine{00022\ \textcolor{keyword}{public}:} +\DoxyCodeLine{00023\ \ \ \ \ \textcolor{keyword}{using\ }Type\ =\ T;} +\DoxyCodeLine{00024\ } +\DoxyCodeLine{00025\ \ \ \ \ \mbox{\hyperlink{class_optional}{Optional}}()\ :\ Data(),\ Valid(\textcolor{keyword}{false})\ \{\ \}} +\DoxyCodeLine{00026\ \ \ \ \ \mbox{\hyperlink{class_optional}{Optional}}(\textcolor{keyword}{const}\ Type\&\ data)\ :\ Data(data),\ Valid(\textcolor{keyword}{true})\ \{\ \}} +\DoxyCodeLine{00027\ \ \ \ \ \mbox{\hyperlink{class_optional}{Optional}}(Type\&\&\ data)\ :\ Data(data),\ Valid(\textcolor{keyword}{true})\ \{\ \}} +\DoxyCodeLine{00028\ \ \ \ \ \mbox{\hyperlink{class_optional}{Optional}}(\textcolor{keyword}{const}\ \mbox{\hyperlink{class_optional}{Optional}}\&\ other)\ =\ \textcolor{keywordflow}{default};} +\DoxyCodeLine{00029\ \ \ \ \ \mbox{\hyperlink{class_optional}{Optional}}(\mbox{\hyperlink{class_optional}{Optional}}\&\&\ other)\ =\ \textcolor{keywordflow}{default};} +\DoxyCodeLine{00030\ } +\DoxyCodeLine{00031\ \ \ \ \ \mbox{\hyperlink{class_optional}{Optional}}\&\ operator=(\textcolor{keyword}{const}\ \mbox{\hyperlink{class_optional}{Optional}}\&\ other)\ =\ \textcolor{keywordflow}{default};} +\DoxyCodeLine{00032\ \ \ \ \ \mbox{\hyperlink{class_optional}{Optional}}\&\ operator=(\mbox{\hyperlink{class_optional}{Optional}}\&\&\ other)\ =\ \textcolor{keywordflow}{default};} +\DoxyCodeLine{00033\ } +\DoxyCodeLine{00034\ \ \ \ \ Type\&\ operator=(\textcolor{keyword}{const}\ Type\&\ data)\ \{\ Data\ =\ data;\ Valid\ =\ \textcolor{keyword}{true};\ \textcolor{keywordflow}{return}\ Data;\ \}} +\DoxyCodeLine{00035\ \ \ \ \ Type\&\ operator=(Type\&\&\ data)\ \{\ Data\ =\ data;\ Valid\ =\ \textcolor{keyword}{true};\ \textcolor{keywordflow}{return}\ Data;\ \}} +\DoxyCodeLine{00036\ } +\DoxyCodeLine{00037\ \ \ \ \ Type\&\ operator+=(\textcolor{keyword}{const}\ Type\&\ data)\ \{\ assert(Valid);\ Data\ +=\ data;\ \textcolor{keywordflow}{return}\ Data;\ \}} +\DoxyCodeLine{00038\ \ \ \ \ Type\&\ operator-\/=(\textcolor{keyword}{const}\ Type\&\ data)\ \{\ assert(Valid);\ Data\ +=\ data;\ \textcolor{keywordflow}{return}\ Data;\ \}} +\DoxyCodeLine{00039\ \ \ \ \ Type\&\ operator*=(\textcolor{keyword}{const}\ Type\&\ data)\ \{\ assert(Valid);\ Data\ +=\ data;\ \textcolor{keywordflow}{return}\ Data;\ \}} +\DoxyCodeLine{00040\ \ \ \ \ Type\&\ operator/=(\textcolor{keyword}{const}\ Type\&\ data)\ \{\ assert(Valid);\ Data\ +=\ data;\ \textcolor{keywordflow}{return}\ Data;\ \}} +\DoxyCodeLine{00041\ \ \ \ \ Type\&\ operator\%=(\textcolor{keyword}{const}\ Type\&\ data)\ \{\ assert(Valid);\ Data\ +=\ data;\ \textcolor{keywordflow}{return}\ Data;\ \}} +\DoxyCodeLine{00042\ } +\DoxyCodeLine{00043\ \ \ \ \ Type\&\ operator<<=(\textcolor{keyword}{const}\ Type\&\ data)\ \{\ assert(Valid);\ Data\ <<=\ data;\ \textcolor{keywordflow}{return}\ Data;\ \}} +\DoxyCodeLine{00044\ \ \ \ \ Type\&\ operator>>=(\textcolor{keyword}{const}\ Type\&\ data)\ \{\ assert(Valid);\ Data\ >>=\ data;\ \textcolor{keywordflow}{return}\ Data;\ \}} +\DoxyCodeLine{00045\ \ \ \ \ Type\&\ operator|=(\textcolor{keyword}{const}\ Type\&\ data)\ \ \{\ assert(Valid);\ Data\ |=\ data;\ \ \textcolor{keywordflow}{return}\ Data;\ \}} +\DoxyCodeLine{00046\ \ \ \ \ Type\&\ operator\&=(\textcolor{keyword}{const}\ Type\&\ data)\ \ \{\ assert(Valid);\ Data\ \&=\ data;\ \ \textcolor{keywordflow}{return}\ Data;\ \}} +\DoxyCodeLine{00047\ \ \ \ \ Type\&\ operator\string^=(\textcolor{keyword}{const}\ Type\&\ data)\ \ \{\ assert(Valid);\ Data\ \string^=\ data;\ \ \textcolor{keywordflow}{return}\ Data;\ \}} +\DoxyCodeLine{00048\ } +\DoxyCodeLine{00049\ \ \ \ \ [[nodiscard]]\ \textcolor{keywordtype}{bool}\ operator()()\textcolor{keyword}{\ const\ }\{\ \textcolor{keywordflow}{return}\ Valid;\ \}} +\DoxyCodeLine{00050\ } +\DoxyCodeLine{00051\ \ \ \ \ \textcolor{keyword}{operator}\ Type\&()\ \{\ assert(Valid);\ \textcolor{keywordflow}{return}\ Data;\ \}} +\DoxyCodeLine{00052\ \ \ \ \ \textcolor{keyword}{operator}\ \textcolor{keyword}{const}\ Type\&()\ \textcolor{keyword}{const}\ \{\ assert(Valid);\ \textcolor{keywordflow}{return}\ Data;\ \}} +\DoxyCodeLine{00053\ } +\DoxyCodeLine{00054\ \ \ \ \ Type*\ operator-\/>()\ \{\ assert(Valid);\ \textcolor{keywordflow}{return}\ \&Data;\ \}} +\DoxyCodeLine{00055\ \ \ \ \ \textcolor{keyword}{const}\ Type*\ operator-\/>()\textcolor{keyword}{\ const\ }\{\ assert(Valid);\ \textcolor{keywordflow}{return}\ \&Data;\ \}} +\DoxyCodeLine{00056\ } +\DoxyCodeLine{00057\ \ \ \ \ Type\&\ operator*()\ \ \{\ assert(Valid);\ \textcolor{keywordflow}{return}\ Data;\ \}} +\DoxyCodeLine{00058\ \ \ \ \ \textcolor{keyword}{const}\ Type\&\ operator*()\textcolor{keyword}{\ const\ \ }\{\ assert(Valid);\ \textcolor{keywordflow}{return}\ Data;\ \}} +\DoxyCodeLine{00059\ } +\DoxyCodeLine{00060\ \ \ \ \ \textcolor{keywordtype}{void}\ Reset()\ \{\ Valid\ =\ \textcolor{keyword}{false};\ \}} +\DoxyCodeLine{00061\ } +\DoxyCodeLine{00062\ \textcolor{keyword}{private}:} +\DoxyCodeLine{00063\ \ \ \ \ Type\ Data;} +\DoxyCodeLine{00064\ \ \ \ \ \textcolor{keywordtype}{bool}\ Valid;} +\DoxyCodeLine{00065\ \};} +\DoxyCodeLine{00066\ } +\DoxyCodeLine{00067\ \textcolor{preprocessor}{\#endif\ }\textcolor{comment}{//OPTIONAL\_H}} + +\end{DoxyCode} diff --git a/Documentation/latex/_profiler_8h_source.tex b/Documentation/latex/_profiler_8h_source.tex new file mode 100644 index 0000000..0b74546 --- /dev/null +++ b/Documentation/latex/_profiler_8h_source.tex @@ -0,0 +1,68 @@ +\doxysection{Profiler.\+h} +\hypertarget{_profiler_8h_source}{}\label{_profiler_8h_source}\index{Include/Editor/Profiler.h@{Include/Editor/Profiler.h}} + +\begin{DoxyCode}{0} +\DoxyCodeLine{00001\ \textcolor{comment}{//\ =====================================================================================================================}} +\DoxyCodeLine{00002\ \textcolor{comment}{//\ Copyright\ 2024\ Medusa\ Slockbower}} +\DoxyCodeLine{00003\ \textcolor{comment}{//\ Licensed\ under\ the\ Apache\ License,\ Version\ 2.0\ (the\ "{}License"{});}} +\DoxyCodeLine{00004\ \textcolor{comment}{//\ you\ may\ not\ use\ this\ file\ except\ in\ compliance\ with\ the\ License.}} +\DoxyCodeLine{00005\ \textcolor{comment}{//\ You\ may\ obtain\ a\ copy\ of\ the\ License\ at}} +\DoxyCodeLine{00006\ \textcolor{comment}{//}} +\DoxyCodeLine{00007\ \textcolor{comment}{//\ \ http://www.apache.org/licenses/LICENSE-\/2.0}} +\DoxyCodeLine{00008\ \textcolor{comment}{//}} +\DoxyCodeLine{00009\ \textcolor{comment}{//\ Unless\ required\ by\ applicable\ law\ or\ agreed\ to\ in\ writing,\ software}} +\DoxyCodeLine{00010\ \textcolor{comment}{//\ distributed\ under\ the\ License\ is\ distributed\ on\ an\ "{}AS\ IS"{}\ BASIS,}} +\DoxyCodeLine{00011\ \textcolor{comment}{//\ WITHOUT\ WARRANTIES\ OR\ CONDITIONS\ OF\ ANY\ KIND,\ either\ express\ or\ implied.}} +\DoxyCodeLine{00012\ \textcolor{comment}{//\ See\ the\ License\ for\ the\ specific\ language\ governing\ permissions\ and}} +\DoxyCodeLine{00013\ \textcolor{comment}{//\ limitations\ under\ the\ License.}} +\DoxyCodeLine{00014\ \textcolor{comment}{//\ =====================================================================================================================}} +\DoxyCodeLine{00015\ } +\DoxyCodeLine{00016\ \textcolor{preprocessor}{\#ifndef\ PROFILER\_H}} +\DoxyCodeLine{00017\ \textcolor{preprocessor}{\#define\ PROFILER\_H}} +\DoxyCodeLine{00018\ } +\DoxyCodeLine{00019\ \textcolor{preprocessor}{\#include\ }} +\DoxyCodeLine{00020\ \textcolor{preprocessor}{\#include\ }} +\DoxyCodeLine{00021\ \textcolor{preprocessor}{\#include\ }} +\DoxyCodeLine{00022\ \textcolor{preprocessor}{\#include\ }} +\DoxyCodeLine{00023\ } +\DoxyCodeLine{00024\ \textcolor{keyword}{namespace\ }OpenShaderDesigner} +\DoxyCodeLine{00025\ \{} +\DoxyCodeLine{00026\ } +\DoxyCodeLine{00027\ \ \ \ \ \textcolor{keyword}{class\ }\mbox{\hyperlink{class_open_shader_designer_1_1_profiler}{Profiler}}} +\DoxyCodeLine{00028\ \ \ \ \ \ \ \ \ :\ \textcolor{keyword}{public}\ \mbox{\hyperlink{class_open_shader_designer_1_1_editor_window}{EditorWindow}}} +\DoxyCodeLine{00029\ \ \ \ \ \ \ \ \ ,\ \textcolor{keyword}{public}\ \mbox{\hyperlink{class_open_shader_designer_1_1_event_handler}{EventHandler}}} +\DoxyCodeLine{00030\ \ \ \ \ \ \ \ \ ,\ \textcolor{keyword}{public}\ \mbox{\hyperlink{class_open_shader_designer_1_1_event_handler}{EventHandler}}} +\DoxyCodeLine{00031\ \ \ \ \ \{} +\DoxyCodeLine{00032\ \ \ \ \ \textcolor{keyword}{public}:} +\DoxyCodeLine{00033\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{class_open_shader_designer_1_1_profiler}{Profiler}}();} +\DoxyCodeLine{00034\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{class_open_shader_designer_1_1_profiler}{\string~Profiler}}();} +\DoxyCodeLine{00035\ } +\DoxyCodeLine{00036\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{void}\ \mbox{\hyperlink{class_open_shader_designer_1_1_profiler_a26186e7726d5811f423c9cee06aec1d5}{DrawWindow}}()\ \textcolor{keyword}{override};} +\DoxyCodeLine{00037\ } +\DoxyCodeLine{00038\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{bool}\ HandleEvent(\textcolor{keyword}{const}\ \mbox{\hyperlink{class_open_shader_designer_1_1_event_handler_ac7326c1ee1a04cf764475dc7c74dc021}{EventHandler::HandledType}}*\ event)\ \textcolor{keyword}{override};} +\DoxyCodeLine{00039\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{bool}\ HandleEvent(\textcolor{keyword}{const}\ \mbox{\hyperlink{class_open_shader_designer_1_1_event_handler_ac7326c1ee1a04cf764475dc7c74dc021}{EventHandler::HandledType}}*\ event)\ \textcolor{keyword}{override};} +\DoxyCodeLine{00040\ } +\DoxyCodeLine{00041\ \ \ \ \ \textcolor{keyword}{private}:} +\DoxyCodeLine{00042\ \ \ \ \ \ \ \ \ \textcolor{keyword}{enum}} +\DoxyCodeLine{00043\ \ \ \ \ \ \ \ \ \{} +\DoxyCodeLine{00044\ \ \ \ \ \ \ \ \ \ \ \ \ EVENTS\ =\ 0} +\DoxyCodeLine{00045\ \ \ \ \ \ \ \ \ ,\ \ \ RENDER} +\DoxyCodeLine{00046\ \ \ \ \ \ \ \ \ ,\ \ \ EDITOR} +\DoxyCodeLine{00047\ \ \ \ \ \ \ \ \ ,\ \ \ END} +\DoxyCodeLine{00048\ } +\DoxyCodeLine{00049\ \ \ \ \ \ \ \ \ ,\ \ \ COUNT} +\DoxyCodeLine{00050\ \ \ \ \ \ \ \ \ ,\ \ \ LAST\ =\ COUNT\ -\/\ 1} +\DoxyCodeLine{00051\ \ \ \ \ \ \ \ \ \};} +\DoxyCodeLine{00052\ } +\DoxyCodeLine{00053\ \ \ \ \ \ \ \ \ uint64\_t\ Frame;} +\DoxyCodeLine{00054\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{double}\ \ \ Deltas[COUNT];} +\DoxyCodeLine{00055\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{class_open_shader_designer_1_1_timer}{Timer}}\ \ \ \ \mbox{\hyperlink{class_open_shader_designer_1_1_timer}{Timer}};} +\DoxyCodeLine{00056\ \ \ \ \ \};} +\DoxyCodeLine{00057\ } +\DoxyCodeLine{00058\ \}} +\DoxyCodeLine{00059\ } +\DoxyCodeLine{00060\ } +\DoxyCodeLine{00061\ } +\DoxyCodeLine{00062\ \textcolor{preprocessor}{\#endif\ }\textcolor{comment}{//PROFILER\_H}} + +\end{DoxyCode} diff --git a/Documentation/latex/_renderer_8h_source.tex b/Documentation/latex/_renderer_8h_source.tex new file mode 100644 index 0000000..709862e --- /dev/null +++ b/Documentation/latex/_renderer_8h_source.tex @@ -0,0 +1,38 @@ +\doxysection{Renderer.\+h} +\hypertarget{_renderer_8h_source}{}\label{_renderer_8h_source}\index{Include/Core/Renderer.h@{Include/Core/Renderer.h}} + +\begin{DoxyCode}{0} +\DoxyCodeLine{00001\ \textcolor{comment}{//\ =====================================================================================================================}} +\DoxyCodeLine{00002\ \textcolor{comment}{//\ Copyright\ 2024\ Medusa\ Slockbower}} +\DoxyCodeLine{00003\ \textcolor{comment}{//\ Licensed\ under\ the\ Apache\ License,\ Version\ 2.0\ (the\ "{}License"{});}} +\DoxyCodeLine{00004\ \textcolor{comment}{//\ you\ may\ not\ use\ this\ file\ except\ in\ compliance\ with\ the\ License.}} +\DoxyCodeLine{00005\ \textcolor{comment}{//\ You\ may\ obtain\ a\ copy\ of\ the\ License\ at}} +\DoxyCodeLine{00006\ \textcolor{comment}{//}} +\DoxyCodeLine{00007\ \textcolor{comment}{//\ \ http://www.apache.org/licenses/LICENSE-\/2.0}} +\DoxyCodeLine{00008\ \textcolor{comment}{//}} +\DoxyCodeLine{00009\ \textcolor{comment}{//\ Unless\ required\ by\ applicable\ law\ or\ agreed\ to\ in\ writing,\ software}} +\DoxyCodeLine{00010\ \textcolor{comment}{//\ distributed\ under\ the\ License\ is\ distributed\ on\ an\ "{}AS\ IS"{}\ BASIS,}} +\DoxyCodeLine{00011\ \textcolor{comment}{//\ WITHOUT\ WARRANTIES\ OR\ CONDITIONS\ OF\ ANY\ KIND,\ either\ express\ or\ implied.}} +\DoxyCodeLine{00012\ \textcolor{comment}{//\ See\ the\ License\ for\ the\ specific\ language\ governing\ permissions\ and}} +\DoxyCodeLine{00013\ \textcolor{comment}{//\ limitations\ under\ the\ License.}} +\DoxyCodeLine{00014\ \textcolor{comment}{//\ =====================================================================================================================}} +\DoxyCodeLine{00015\ } +\DoxyCodeLine{00016\ } +\DoxyCodeLine{00017\ \textcolor{preprocessor}{\#ifndef\ RENDERER\_H}} +\DoxyCodeLine{00018\ \textcolor{preprocessor}{\#define\ RENDERER\_H}} +\DoxyCodeLine{00019\ } +\DoxyCodeLine{00020\ } +\DoxyCodeLine{00021\ } +\DoxyCodeLine{00022\ \textcolor{keyword}{namespace\ }OpenShaderDesigner} +\DoxyCodeLine{00023\ \{} +\DoxyCodeLine{00024\ \ \ \ \ \textcolor{keyword}{class\ }\mbox{\hyperlink{class_open_shader_designer_1_1_renderer}{Renderer}}} +\DoxyCodeLine{00025\ \ \ \ \ \{} +\DoxyCodeLine{00026\ } +\DoxyCodeLine{00027\ \ \ \ \ \};} +\DoxyCodeLine{00028\ \}} +\DoxyCodeLine{00029\ } +\DoxyCodeLine{00030\ } +\DoxyCodeLine{00031\ } +\DoxyCodeLine{00032\ \textcolor{preprocessor}{\#endif\ }\textcolor{comment}{//RENDERER\_H}} + +\end{DoxyCode} diff --git a/Documentation/latex/_shader_graph_8h_source.tex b/Documentation/latex/_shader_graph_8h_source.tex new file mode 100644 index 0000000..4b81fc4 --- /dev/null +++ b/Documentation/latex/_shader_graph_8h_source.tex @@ -0,0 +1,338 @@ +\doxysection{Shader\+Graph.\+h} +\hypertarget{_shader_graph_8h_source}{}\label{_shader_graph_8h_source}\index{Include/Graph/ShaderGraph.h@{Include/Graph/ShaderGraph.h}} + +\begin{DoxyCode}{0} +\DoxyCodeLine{00001\ \textcolor{comment}{//\ =====================================================================================================================}} +\DoxyCodeLine{00002\ \textcolor{comment}{//\ Copyright\ 2024\ Medusa\ Slockbower}} +\DoxyCodeLine{00003\ \textcolor{comment}{//\ Licensed\ under\ the\ Apache\ License,\ Version\ 2.0\ (the\ "{}License"{});}} +\DoxyCodeLine{00004\ \textcolor{comment}{//\ you\ may\ not\ use\ this\ file\ except\ in\ compliance\ with\ the\ License.}} +\DoxyCodeLine{00005\ \textcolor{comment}{//\ You\ may\ obtain\ a\ copy\ of\ the\ License\ at}} +\DoxyCodeLine{00006\ \textcolor{comment}{//}} +\DoxyCodeLine{00007\ \textcolor{comment}{//\ \ http://www.apache.org/licenses/LICENSE-\/2.0}} +\DoxyCodeLine{00008\ \textcolor{comment}{//}} +\DoxyCodeLine{00009\ \textcolor{comment}{//\ Unless\ required\ by\ applicable\ law\ or\ agreed\ to\ in\ writing,\ software}} +\DoxyCodeLine{00010\ \textcolor{comment}{//\ distributed\ under\ the\ License\ is\ distributed\ on\ an\ "{}AS\ IS"{}\ BASIS,}} +\DoxyCodeLine{00011\ \textcolor{comment}{//\ WITHOUT\ WARRANTIES\ OR\ CONDITIONS\ OF\ ANY\ KIND,\ either\ express\ or\ implied.}} +\DoxyCodeLine{00012\ \textcolor{comment}{//\ See\ the\ License\ for\ the\ specific\ language\ governing\ permissions\ and}} +\DoxyCodeLine{00013\ \textcolor{comment}{//\ limitations\ under\ the\ License.}} +\DoxyCodeLine{00014\ \textcolor{comment}{//\ =====================================================================================================================}} +\DoxyCodeLine{00015\ } +\DoxyCodeLine{00016\ \textcolor{preprocessor}{\#ifndef\ SHADERGRAPH\_H}} +\DoxyCodeLine{00017\ \textcolor{preprocessor}{\#define\ SHADERGRAPH\_H}} +\DoxyCodeLine{00018\ } +\DoxyCodeLine{00019\ \textcolor{preprocessor}{\#include\ }} +\DoxyCodeLine{00020\ } +\DoxyCodeLine{00021\ \textcolor{preprocessor}{\#include\ }} +\DoxyCodeLine{00022\ \textcolor{preprocessor}{\#include\ }} +\DoxyCodeLine{00023\ \textcolor{preprocessor}{\#include\ }} +\DoxyCodeLine{00024\ \textcolor{preprocessor}{\#include\ }} +\DoxyCodeLine{00025\ \textcolor{preprocessor}{\#include\ }} +\DoxyCodeLine{00026\ } +\DoxyCodeLine{00027\ \textcolor{preprocessor}{\#include\ }} +\DoxyCodeLine{00028\ \textcolor{preprocessor}{\#include\ }} +\DoxyCodeLine{00029\ \textcolor{preprocessor}{\#include\ }} +\DoxyCodeLine{00030\ } +\DoxyCodeLine{00031\ \textcolor{keyword}{namespace\ }ocu\ =\ open\_cpp\_utils;} +\DoxyCodeLine{00032\ } +\DoxyCodeLine{00033\ \textcolor{preprocessor}{\#define\ RegisterNode(Name,\ Type)\ \(\backslash\)}} +\DoxyCodeLine{00034\ \textcolor{preprocessor}{\ \ \ \ Node*\ Create\#\#Type(ShaderGraph\&\ graph,\ ImVec2\ pos)\ \{\ return\ new\ Type(graph,\ pos);\ \}\ \(\backslash\)}} +\DoxyCodeLine{00035\ \textcolor{preprocessor}{\ \ \ \ STARTUP(\_Register\#\#Type)\ \{\ ShaderGraph::Register(Name,\ Create\#\#Type);\ \}}} +\DoxyCodeLine{00036\ } +\DoxyCodeLine{00037\ \textcolor{keyword}{namespace\ }OpenShaderDesigner} +\DoxyCodeLine{00038\ \{} +\DoxyCodeLine{00039\ \ \ \ \ \textcolor{keyword}{class\ }ShaderGraph;} +\DoxyCodeLine{00040\ \ \ \ \ \textcolor{keyword}{using\ }PinId\ =\ uint16\_t;} +\DoxyCodeLine{00041\ \ \ \ \ \textcolor{keyword}{using\ }NodeId\ =\ uint32\_t;} +\DoxyCodeLine{00042\ } +\DoxyCodeLine{00043\ \ \ \ \ \textcolor{keyword}{struct\ }\mbox{\hyperlink{struct_open_shader_designer_1_1_pin_ptr}{PinPtr}}} +\DoxyCodeLine{00044\ \ \ \ \ \{} +\DoxyCodeLine{00045\ \ \ \ \ \ \ \ \ \textcolor{keyword}{struct\ }\mbox{\hyperlink{struct_open_shader_designer_1_1_pin_ptr_1_1_hash}{Hash}}} +\DoxyCodeLine{00046\ \ \ \ \ \ \ \ \ \{} +\DoxyCodeLine{00047\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{size\_t}\ operator()(\textcolor{keyword}{const}\ \mbox{\hyperlink{struct_open_shader_designer_1_1_pin_ptr}{PinPtr}}\&\ p)\textcolor{keyword}{\ const}} +\DoxyCodeLine{00048\ \textcolor{keyword}{\ \ \ \ \ \ \ \ \ \ \ \ }\{} +\DoxyCodeLine{00049\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ p.hash();} +\DoxyCodeLine{00050\ \ \ \ \ \ \ \ \ \ \ \ \ \}} +\DoxyCodeLine{00051\ \ \ \ \ \ \ \ \ \};} +\DoxyCodeLine{00052\ } +\DoxyCodeLine{00053\ \ \ \ \ \ \ \ \ NodeId\ \mbox{\hyperlink{struct_open_shader_designer_1_1_node}{Node}};} +\DoxyCodeLine{00054\ \ \ \ \ \ \ \ \ PinId\ \ \mbox{\hyperlink{struct_open_shader_designer_1_1_pin}{Pin}};} +\DoxyCodeLine{00055\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{bool}\ Input;} +\DoxyCodeLine{00056\ } +\DoxyCodeLine{00057\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{size\_t}\ hash()\textcolor{keyword}{\ const\ }\{\ \textcolor{keywordflow}{return}\ (Input\ ?\ 0\ :\ 0x8000000)\ |\ static\_cast(\mbox{\hyperlink{struct_open_shader_designer_1_1_node}{Node}})\ <<\ 32\ |\ static\_cast(\mbox{\hyperlink{struct_open_shader_designer_1_1_pin}{Pin}}\ \&\ 0x7FFFFFFF);\ \}} +\DoxyCodeLine{00058\ } +\DoxyCodeLine{00059\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{bool}\ operator<(\textcolor{keyword}{const}\ \mbox{\hyperlink{struct_open_shader_designer_1_1_pin_ptr}{PinPtr}}\&\ o)\textcolor{keyword}{\ const\ }\{\ \textcolor{keywordflow}{return}\ hash()\ <\ o.hash();\ \}} +\DoxyCodeLine{00060\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{bool}\ operator==(\textcolor{keyword}{const}\ PinPtr\&\ o)\textcolor{keyword}{\ const\ }\{\ \textcolor{keywordflow}{return}\ hash()\ ==\ o.hash();\ \}} +\DoxyCodeLine{00061\ \ \ \ \ \};} +\DoxyCodeLine{00062\ } +\DoxyCodeLine{00063\ \ \ \ \ \textcolor{keyword}{struct\ }\mbox{\hyperlink{struct_open_shader_designer_1_1_pin}{Pin}}} +\DoxyCodeLine{00064\ \ \ \ \ \{} +\DoxyCodeLine{00065\ \ \ \ \ \ \ \ \ \textcolor{keyword}{enum}\ PinType} +\DoxyCodeLine{00066\ \ \ \ \ \ \ \ \ \{} +\DoxyCodeLine{00067\ \ \ \ \ \ \ \ \ \ \ \ \ INT\ =\ 0} +\DoxyCodeLine{00068\ \ \ \ \ \ \ \ \ ,\ \ \ UINT} +\DoxyCodeLine{00069\ \ \ \ \ \ \ \ \ ,\ \ \ FLOAT} +\DoxyCodeLine{00070\ \ \ \ \ \ \ \ \ ,\ \ \ VECTOR} +\DoxyCodeLine{00071\ } +\DoxyCodeLine{00072\ \ \ \ \ \ \ \ \ ,\ \ \ ANY} +\DoxyCodeLine{00073\ \ \ \ \ \ \ \ \ ,\ \ \ COUNT} +\DoxyCodeLine{00074\ \ \ \ \ \ \ \ \ \};} +\DoxyCodeLine{00075\ } +\DoxyCodeLine{00076\ \ \ \ \ \ \ \ \ \textcolor{keyword}{enum}\ PinDirection} +\DoxyCodeLine{00077\ \ \ \ \ \ \ \ \ \{} +\DoxyCodeLine{00078\ \ \ \ \ \ \ \ \ \ \ \ \ INPUT} +\DoxyCodeLine{00079\ \ \ \ \ \ \ \ \ ,\ \ \ OUTPUT} +\DoxyCodeLine{00080\ \ \ \ \ \ \ \ \ \};} +\DoxyCodeLine{00081\ } +\DoxyCodeLine{00082\ \ \ \ \ \ \ \ \ \textcolor{keyword}{inline}\ \textcolor{keyword}{const}\ \textcolor{keyword}{static}\ ImColor\ Colors[COUNT]\ =\ \{} +\DoxyCodeLine{00083\ \ \ \ \ \ \ \ \ \ \ \ \ ImColor(0xB9,\ 0xF5,\ 0x94)} +\DoxyCodeLine{00084\ \ \ \ \ \ \ \ \ ,\ \ \ ImColor(0x8C,\ 0xC0,\ 0x8C)} +\DoxyCodeLine{00085\ \ \ \ \ \ \ \ \ ,\ \ \ ImColor(0x37,\ 0x95,\ 0x85)} +\DoxyCodeLine{00086\ \ \ \ \ \ \ \ \ ,\ \ \ ImColor(0xE3,\ 0x7D,\ 0xDC)} +\DoxyCodeLine{00087\ \textcolor{comment}{//\ \ \ \ \ \ ,\ \ \ ImColor(0xD2,\ 0x6E,\ 0x46)}} +\DoxyCodeLine{00088\ \ \ \ \ \ \ \ \ ,\ \ \ ImColor(0xD2,\ 0xD5,\ 0xD3)} +\DoxyCodeLine{00089\ \ \ \ \ \ \ \ \ \};} +\DoxyCodeLine{00090\ } +\DoxyCodeLine{00091\ \ \ \ \ \ \ \ \ \textcolor{keyword}{inline}\ \textcolor{keyword}{const}\ \textcolor{keyword}{static}\ std::string\ TypeNames[COUNT]\ =\ \{} +\DoxyCodeLine{00092\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{stringliteral}{"{}Int"{}}} +\DoxyCodeLine{00093\ \ \ \ \ \ \ \ \ ,\ \ \ \textcolor{stringliteral}{"{}Unsigned\ Int"{}}} +\DoxyCodeLine{00094\ \ \ \ \ \ \ \ \ ,\ \ \ \textcolor{stringliteral}{"{}Float"{}}} +\DoxyCodeLine{00095\ \ \ \ \ \ \ \ \ ,\ \ \ \textcolor{stringliteral}{"{}Vector"{}}} +\DoxyCodeLine{00096\ \ \ \ \ \ \ \ \ \};} +\DoxyCodeLine{00097\ } +\DoxyCodeLine{00098\ \ \ \ \ \ \ \ \ std::string\ \ \ Name;} +\DoxyCodeLine{00099\ \ \ \ \ \ \ \ \ PinType\ \ \ \ \ \ \ Type;} +\DoxyCodeLine{00100\ \ \ \ \ \ \ \ \ PinDirection\ \ Direction;} +\DoxyCodeLine{00101\ \ \ \ \ \};} +\DoxyCodeLine{00102\ } +\DoxyCodeLine{00103\ \ \ \ \ \textcolor{keyword}{struct\ }\mbox{\hyperlink{struct_open_shader_designer_1_1_node}{Node}}} +\DoxyCodeLine{00104\ \ \ \ \ \{} +\DoxyCodeLine{00105\ \ \ \ \ \textcolor{keyword}{public}:} +\DoxyCodeLine{00106\ \ \ \ \ \ \ \ \ ImVec2\ Position\ =\ \{\ 0,\ 0\ \};} +\DoxyCodeLine{00107\ } +\DoxyCodeLine{00108\ \ \ \ \ \ \ \ \ \textcolor{keyword}{struct}} +\DoxyCodeLine{00109\ \ \ \ \ \ \ \ \ \{} +\DoxyCodeLine{00110\ \ \ \ \ \ \ \ \ \ \ \ \ std::string\ Title\ =\ \textcolor{stringliteral}{"{}Node"{}};} +\DoxyCodeLine{00111\ \ \ \ \ \ \ \ \ \ \ \ \ ImColor\ \ \ \ \ Color\ =\ Pin::Colors[Pin::VECTOR];} +\DoxyCodeLine{00112\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{bool}\ \ \ \ \ \ \ \ Enabled\ =\ \textcolor{keyword}{true};} +\DoxyCodeLine{00113\ \ \ \ \ \ \ \ \ \}\ Header;} +\DoxyCodeLine{00114\ } +\DoxyCodeLine{00115\ \ \ \ \ \ \ \ \ \textcolor{keyword}{struct}} +\DoxyCodeLine{00116\ \ \ \ \ \ \ \ \ \{} +\DoxyCodeLine{00117\ \ \ \ \ \ \ \ \ \ \ \ \ std::vector\ Inputs,\ Outputs;} +\DoxyCodeLine{00118\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{bool}\ \ \ \ \ \ \ \ \ \ \ \ \ DynamicInputs\ =\ \textcolor{keyword}{false};} +\DoxyCodeLine{00119\ \ \ \ \ \ \ \ \ \}\ IO;} +\DoxyCodeLine{00120\ } +\DoxyCodeLine{00121\ \ \ \ \ \ \ \ \ \textcolor{keyword}{struct}} +\DoxyCodeLine{00122\ \ \ \ \ \ \ \ \ \{} +\DoxyCodeLine{00123\ \ \ \ \ \ \ \ \ \ \ \ \ ImVec2\ Size;} +\DoxyCodeLine{00124\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{bool}\ \ \ Const;} +\DoxyCodeLine{00125\ \ \ \ \ \ \ \ \ \}\ Info;} +\DoxyCodeLine{00126\ } +\DoxyCodeLine{00127\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{struct_open_shader_designer_1_1_node}{Node}}(} +\DoxyCodeLine{00128\ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{class_open_shader_designer_1_1_shader_graph}{ShaderGraph}}\&\ graph,\ ImVec2\ pos} +\DoxyCodeLine{00129\ \ \ \ \ \ \ \ \ ,\ \ \ \textcolor{keyword}{const}\ std::string\&\ title,\ ImColor\ color} +\DoxyCodeLine{00130\ \ \ \ \ \ \ \ \ ,\ \ \ \textcolor{keyword}{const}\ std::vector\&\ inputs,\ \textcolor{keywordtype}{bool}\ dyn\_inputs} +\DoxyCodeLine{00131\ \ \ \ \ \ \ \ \ ,\ \ \ \textcolor{keyword}{const}\ std::vector\&\ outputs} +\DoxyCodeLine{00132\ \ \ \ \ \ \ \ \ ,\ \ \ \textcolor{keywordtype}{bool}\ constant\ =\ \textcolor{keyword}{false});} +\DoxyCodeLine{00133\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{struct_open_shader_designer_1_1_node}{\string~Node}}()\ =\ \textcolor{keywordflow}{default};} +\DoxyCodeLine{00134\ } +\DoxyCodeLine{00135\ \ \ \ \ \ \ \ \ \textcolor{keyword}{virtual}\ \mbox{\hyperlink{struct_open_shader_designer_1_1_node}{Node}}*\ Copy(\mbox{\hyperlink{class_open_shader_designer_1_1_shader_graph}{ShaderGraph}}\&\ graph)\ \textcolor{keyword}{const}\ =\ 0;} +\DoxyCodeLine{00136\ \ \ \ \ \ \ \ \ \textcolor{keyword}{virtual}\ \textcolor{keywordtype}{void}\ Inspect()\ =\ 0;} +\DoxyCodeLine{00137\ \ \ \ \ \};} +\DoxyCodeLine{00138\ } +\DoxyCodeLine{00139\ \ \ \ \ \textcolor{keyword}{class\ }\mbox{\hyperlink{class_open_shader_designer_1_1_shader_graph}{ShaderGraph}}} +\DoxyCodeLine{00140\ \ \ \ \ \ \ \ \ :\ \textcolor{keyword}{public}\ \mbox{\hyperlink{class_open_shader_designer_1_1_editor_window}{EditorWindow}}} +\DoxyCodeLine{00141\ \ \ \ \ \{} +\DoxyCodeLine{00142\ \ \ \ \ \textcolor{keyword}{private}:} +\DoxyCodeLine{00143\ \ \ \ \ \ \ \ \ \textcolor{keyword}{friend}\ \mbox{\hyperlink{struct_open_shader_designer_1_1_node}{Node}};} +\DoxyCodeLine{00144\ } +\DoxyCodeLine{00145\ \ \ \ \ \ \ \ \ \textcolor{keyword}{using\ }Connection\ =\ std::pair;} +\DoxyCodeLine{00146\ \ \ \ \ \ \ \ \ \textcolor{keyword}{using\ }ConnectionMap\ =\ std::unordered\_multimap;} +\DoxyCodeLine{00147\ } +\DoxyCodeLine{00148\ \ \ \ \ \ \ \ \ \textcolor{keyword}{struct\ }Line} +\DoxyCodeLine{00149\ \ \ \ \ \ \ \ \ \{} +\DoxyCodeLine{00150\ \ \ \ \ \ \ \ \ \ \ \ \ ImColor\ Color;} +\DoxyCodeLine{00151\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{float}\ Thickness;} +\DoxyCodeLine{00152\ \ \ \ \ \ \ \ \ \};} +\DoxyCodeLine{00153\ } +\DoxyCodeLine{00154\ \ \ \ \ \ \ \ \ \textcolor{keyword}{using\ }ConstructorPtr\ =\ \mbox{\hyperlink{struct_open_shader_designer_1_1_node}{Node}}*(*)(\mbox{\hyperlink{class_open_shader_designer_1_1_shader_graph}{ShaderGraph}}\&,\ ImVec2);} +\DoxyCodeLine{00155\ \ \ \ \ \ \ \ \ \textcolor{keyword}{struct\ }ContextMenuItem} +\DoxyCodeLine{00156\ \ \ \ \ \ \ \ \ \{} +\DoxyCodeLine{00157\ \ \ \ \ \ \ \ \ \ \ \ \ std::string\ Name;} +\DoxyCodeLine{00158\ \ \ \ \ \ \ \ \ \ \ \ \ ConstructorPtr\ \ \ \ Constructor;} +\DoxyCodeLine{00159\ \ \ \ \ \ \ \ \ \};} +\DoxyCodeLine{00160\ } +\DoxyCodeLine{00161\ \ \ \ \ \ \ \ \ \textcolor{keyword}{struct\ }GraphState} +\DoxyCodeLine{00162\ \ \ \ \ \ \ \ \ \{} +\DoxyCodeLine{00163\ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{class_open_shader_designer_1_1_shader_graph}{ShaderGraph}}\&\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ Parent;} +\DoxyCodeLine{00164\ \ \ \ \ \ \ \ \ \ \ \ \ std::vector\ \ \ \ \ \ \ \ \ Nodes;} +\DoxyCodeLine{00165\ \ \ \ \ \ \ \ \ \ \ \ \ std::unordered\_set\ \ Erased;} +\DoxyCodeLine{00166\ \ \ \ \ \ \ \ \ \ \ \ \ ConnectionMap\ \ \ \ \ \ \ \ \ \ \ \ \ \ Connections;} +\DoxyCodeLine{00167\ } +\DoxyCodeLine{00168\ \ \ \ \ \ \ \ \ \ \ \ \ GraphState(\mbox{\hyperlink{class_open_shader_designer_1_1_shader_graph}{ShaderGraph}}\&\ parent);} +\DoxyCodeLine{00169\ \ \ \ \ \ \ \ \ \ \ \ \ GraphState(\textcolor{keyword}{const}\ GraphState\&\ other);} +\DoxyCodeLine{00170\ \ \ \ \ \ \ \ \ \ \ \ \ \string~GraphState();} +\DoxyCodeLine{00171\ } +\DoxyCodeLine{00172\ \ \ \ \ \ \ \ \ \ \ \ \ GraphState\&\ operator=(\textcolor{keyword}{const}\ GraphState\&\ other);} +\DoxyCodeLine{00173\ \ \ \ \ \ \ \ \ \};} +\DoxyCodeLine{00174\ } +\DoxyCodeLine{00175\ \ \ \ \ \ \ \ \ \textcolor{keyword}{using\ }ContextMenuHierarchy\ =\ ocu::directed\_tree;} +\DoxyCodeLine{00176\ \ \ \ \ \ \ \ \ \textcolor{keyword}{using\ }ContextID\ =\ ContextMenuHierarchy::node;} +\DoxyCodeLine{00177\ \ \ \ \ \ \ \ \ \textcolor{keyword}{inline}\ \textcolor{keyword}{static}\ ContextMenuHierarchy\ ContextMenu;} +\DoxyCodeLine{00178\ } +\DoxyCodeLine{00179\ \ \ \ \ \ \ \ \ \textcolor{comment}{//\ Helper\ functions}} +\DoxyCodeLine{00180\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{float}\ CalculateWidth(\mbox{\hyperlink{struct_open_shader_designer_1_1_node}{Node}}\&\ node);} +\DoxyCodeLine{00181\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{float}\ CalculateHeight(\mbox{\hyperlink{struct_open_shader_designer_1_1_node}{Node}}\&\ node);} +\DoxyCodeLine{00182\ } +\DoxyCodeLine{00183\ \ \ \ \ \ \ \ \ \textcolor{comment}{//\ Base\ Draw\ and\ Input\ functions}} +\DoxyCodeLine{00184\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{void}\ HandleInput();} +\DoxyCodeLine{00185\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{void}\ DrawGrid();} +\DoxyCodeLine{00186\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{void}\ DrawNode(\mbox{\hyperlink{struct_open_shader_designer_1_1_node}{Node}}\&\ node,\ NodeId\ \textcolor{keywordtype}{id});} +\DoxyCodeLine{00187\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{void}\ DrawPin(NodeId\ node\_id,\ \mbox{\hyperlink{struct_open_shader_designer_1_1_pin}{Pin}}\&\ pin,\ PinId\ pin\_id,\ ImVec2\ location,\ \textcolor{keywordtype}{bool}\ input);} +\DoxyCodeLine{00188\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{void}\ DrawContextMenu();} +\DoxyCodeLine{00189\ } +\DoxyCodeLine{00190\ \ \ \ \ \ \ \ \ \textcolor{comment}{//\ Connection\ functions}} +\DoxyCodeLine{00191\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{void}\ DrawConnections();} +\DoxyCodeLine{00192\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{void}\ DrawConnection(\textcolor{keyword}{const}\ \mbox{\hyperlink{struct_open_shader_designer_1_1_pin_ptr}{PinPtr}}\&\ a,\ \textcolor{keyword}{const}\ \mbox{\hyperlink{struct_open_shader_designer_1_1_pin_ptr}{PinPtr}}\&\ b);} +\DoxyCodeLine{00193\ \ \ \ \ \ \ \ \ \textcolor{keyword}{auto}\ StartConnection(\textcolor{keyword}{const}\ \mbox{\hyperlink{struct_open_shader_designer_1_1_pin_ptr}{PinPtr}}\&\ ptr)\ -\/>\ void;} +\DoxyCodeLine{00194\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{void}\ StopConnection();} +\DoxyCodeLine{00195\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{void}\ CreateConnection(\textcolor{keyword}{const}\ \mbox{\hyperlink{struct_open_shader_designer_1_1_pin_ptr}{PinPtr}}\&\ a,\ \textcolor{keyword}{const}\ \mbox{\hyperlink{struct_open_shader_designer_1_1_pin_ptr}{PinPtr}}\&\ b);} +\DoxyCodeLine{00196\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{void}\ EraseConnection(\textcolor{keyword}{const}\ \mbox{\hyperlink{struct_open_shader_designer_1_1_pin_ptr}{PinPtr}}\&\ a,\ \textcolor{keyword}{const}\ \mbox{\hyperlink{struct_open_shader_designer_1_1_pin_ptr}{PinPtr}}\&\ b);} +\DoxyCodeLine{00197\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{void}\ EraseConnections(\textcolor{keyword}{const}\ \mbox{\hyperlink{struct_open_shader_designer_1_1_pin_ptr}{PinPtr}}\&\ a);} +\DoxyCodeLine{00198\ } +\DoxyCodeLine{00199\ \ \ \ \ \ \ \ \ NodeId\ AddNode(\mbox{\hyperlink{struct_open_shader_designer_1_1_node}{Node}}*\ node);} +\DoxyCodeLine{00200\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{void}\ RemoveNode(NodeId\ \textcolor{keywordtype}{id});} +\DoxyCodeLine{00201\ } +\DoxyCodeLine{00202\ \ \ \ \ \ \ \ \ \textcolor{comment}{//\ Clipboard\ functionality}} +\DoxyCodeLine{00203\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{void}\ ClearClipboard();} +\DoxyCodeLine{00204\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{void}\ Copy();} +\DoxyCodeLine{00205\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{void}\ Paste(\textcolor{keyword}{const}\ ImVec2\&\ location);} +\DoxyCodeLine{00206\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{void}\ EraseSelection();} +\DoxyCodeLine{00207\ } +\DoxyCodeLine{00208\ \ \ \ \ \ \ \ \ \textcolor{comment}{//\ History\ Functionality}} +\DoxyCodeLine{00209\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{void}\ PushState();} +\DoxyCodeLine{00210\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{void}\ PopState();} +\DoxyCodeLine{00211\ } +\DoxyCodeLine{00212\ \ \ \ \ \ \ \ \ \textcolor{comment}{//\ Helper\ functions}} +\DoxyCodeLine{00213\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{float}\ BezierOffset(\textcolor{keyword}{const}\ ImVec2\&\ out,\ \textcolor{keyword}{const}\ ImVec2\&\ in);} +\DoxyCodeLine{00214\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{bool}\ AABB(\textcolor{keyword}{const}\ ImVec2\&\ a0,\ \textcolor{keyword}{const}\ ImVec2\&\ a1,\ \textcolor{keyword}{const}\ ImVec2\&\ b0,\ \textcolor{keyword}{const}\ ImVec2\&\ b1);} +\DoxyCodeLine{00215\ } +\DoxyCodeLine{00216\ \ \ \ \ \ \ \ \ ImVec2\ GridToScreen(\textcolor{keyword}{const}\ ImVec2\&\ position);} +\DoxyCodeLine{00217\ \ \ \ \ \ \ \ \ ImVec2\ ScreenToGrid(\textcolor{keyword}{const}\ ImVec2\&\ position);} +\DoxyCodeLine{00218\ \ \ \ \ \ \ \ \ ImVec2\ SnapToGrid(\textcolor{keyword}{const}\ ImVec2\&\ position);} +\DoxyCodeLine{00219\ } +\DoxyCodeLine{00220\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{struct_open_shader_designer_1_1_pin}{Pin}}\&\ GetPin(\textcolor{keyword}{const}\ \mbox{\hyperlink{struct_open_shader_designer_1_1_pin_ptr}{PinPtr}}\&\ ptr);} +\DoxyCodeLine{00221\ } +\DoxyCodeLine{00222\ \ \ \ \ \textcolor{keyword}{public}:} +\DoxyCodeLine{00223\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{class_open_shader_designer_1_1_shader_graph}{ShaderGraph}}();} +\DoxyCodeLine{00224\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{class_open_shader_designer_1_1_shader_graph}{\string~ShaderGraph}}();} +\DoxyCodeLine{00225\ } +\DoxyCodeLine{00226\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{void}\ \mbox{\hyperlink{class_open_shader_designer_1_1_shader_graph_ab165317b9a0b95648df1e7009c220a04}{OnOpen}}()\ \textcolor{keyword}{override};} +\DoxyCodeLine{00227\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{void}\ \mbox{\hyperlink{class_open_shader_designer_1_1_shader_graph_af028ed8ea55d12a1bb2bcf51c817398b}{DrawWindow}}()\ \textcolor{keyword}{override};} +\DoxyCodeLine{00228\ } +\DoxyCodeLine{00229\ \ \ \ \ \ \ \ \ \textcolor{keyword}{static}\ \textcolor{keywordtype}{void}\ Register(\textcolor{keyword}{const}\ std::filesystem::path\&\ path,\ ConstructorPtr\ constructor);} +\DoxyCodeLine{00230\ } +\DoxyCodeLine{00231\ \ \ \ \ \textcolor{keyword}{private}:} +\DoxyCodeLine{00232\ \ \ \ \ \ \ \ \ GraphState\ \ \ \ \ \ \ \ \ \ \ \ \ State;} +\DoxyCodeLine{00233\ \ \ \ \ \ \ \ \ std::stack\ History;} +\DoxyCodeLine{00234\ } +\DoxyCodeLine{00235\ \ \ \ \ \ \ \ \ \textcolor{keyword}{struct}} +\DoxyCodeLine{00236\ \ \ \ \ \ \ \ \ \{} +\DoxyCodeLine{00237\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keyword}{struct}} +\DoxyCodeLine{00238\ \ \ \ \ \ \ \ \ \ \ \ \ \{} +\DoxyCodeLine{00239\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ ImColor\ BackgroundColor;} +\DoxyCodeLine{00240\ } +\DoxyCodeLine{00241\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keyword}{struct}} +\DoxyCodeLine{00242\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \{} +\DoxyCodeLine{00243\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ Line\ Thin,\ Thick;} +\DoxyCodeLine{00244\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{float}\ Padding;} +\DoxyCodeLine{00245\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \}\ Lines;} +\DoxyCodeLine{00246\ \ \ \ \ \ \ \ \ \ \ \ \ \}\ Grid;} +\DoxyCodeLine{00247\ } +\DoxyCodeLine{00248\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keyword}{struct}} +\DoxyCodeLine{00249\ \ \ \ \ \ \ \ \ \ \ \ \ \{} +\DoxyCodeLine{00250\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{float}\ Rounding;} +\DoxyCodeLine{00251\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ Line\ Border,\ SelectedBorder;} +\DoxyCodeLine{00252\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ ImColor\ Content;} +\DoxyCodeLine{00253\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ ImColor\ Title;} +\DoxyCodeLine{00254\ } +\DoxyCodeLine{00255\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keyword}{struct}} +\DoxyCodeLine{00256\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \{} +\DoxyCodeLine{00257\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{float}\ Padding;} +\DoxyCodeLine{00258\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{float}\ BorderThickness;} +\DoxyCodeLine{00259\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ ImColor\ Background;} +\DoxyCodeLine{00260\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ ImColor\ Text;} +\DoxyCodeLine{00261\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ Line\ Connections;} +\DoxyCodeLine{00262\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \}\ Pins;} +\DoxyCodeLine{00263\ \ \ \ \ \ \ \ \ \ \ \ \ \}\ Nodes;} +\DoxyCodeLine{00264\ } +\DoxyCodeLine{00265\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keyword}{struct}} +\DoxyCodeLine{00266\ \ \ \ \ \ \ \ \ \ \ \ \ \{} +\DoxyCodeLine{00267\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ ImColor\ Background;} +\DoxyCodeLine{00268\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ Line\ \ \ \ Border;} +\DoxyCodeLine{00269\ \ \ \ \ \ \ \ \ \ \ \ \ \}\ Selection;} +\DoxyCodeLine{00270\ } +\DoxyCodeLine{00271\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{float}\ FontSize;} +\DoxyCodeLine{00272\ \ \ \ \ \ \ \ \ \}\ Style;} +\DoxyCodeLine{00273\ } +\DoxyCodeLine{00274\ \ \ \ \ \ \ \ \ \textcolor{keyword}{struct}} +\DoxyCodeLine{00275\ \ \ \ \ \ \ \ \ \{} +\DoxyCodeLine{00276\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keyword}{struct}} +\DoxyCodeLine{00277\ \ \ \ \ \ \ \ \ \ \ \ \ \{} +\DoxyCodeLine{00278\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keyword}{struct}} +\DoxyCodeLine{00279\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \{} +\DoxyCodeLine{00280\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{float}\ Rate,\ Smoothing;} +\DoxyCodeLine{00281\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \}\ Scroll;} +\DoxyCodeLine{00282\ \ \ \ \ \ \ \ \ \ \ \ \ \}\ Input;} +\DoxyCodeLine{00283\ \ \ \ \ \ \ \ \ \}\ Settings;} +\DoxyCodeLine{00284\ } +\DoxyCodeLine{00285\ \ \ \ \ \ \ \ \ \textcolor{keyword}{struct}} +\DoxyCodeLine{00286\ \ \ \ \ \ \ \ \ \{} +\DoxyCodeLine{00287\ \ \ \ \ \ \ \ \ \ \ \ \ ImVec2\ \ \ \ \ \ \ \ \ \ \ Location,\ ScreenLocation,\ Delta;} +\DoxyCodeLine{00288\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{float}\ \ \ \ \ \ \ \ \ \ \ \ Scroll;} +\DoxyCodeLine{00289\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{bool}\ \ \ \ \ \ \ \ \ \ \ \ \ ClickedSomething;} +\DoxyCodeLine{00290\ } +\DoxyCodeLine{00291\ \ \ \ \ \ \ \ \ \ \ \ \ ocu::optional\ FocusedNode;} +\DoxyCodeLine{00292\ \ \ \ \ \ \ \ \ \ \ \ \ std::unordered\_map\ Locks;} +\DoxyCodeLine{00293\ \ \ \ \ \ \ \ \ \ \ \ \ std::unordered\_set\ DragSelect;} +\DoxyCodeLine{00294\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{bool}\ LocksDragged,\ NodeHovered;} +\DoxyCodeLine{00295\ \ \ \ \ \ \ \ \ \ \ \ \ ocu::optional\ NewConnection;} +\DoxyCodeLine{00296\ \ \ \ \ \ \ \ \ \ \ \ \ std::unordered\_set\ Selected;} +\DoxyCodeLine{00297\ \ \ \ \ \ \ \ \ \}\ Mouse;} +\DoxyCodeLine{00298\ } +\DoxyCodeLine{00299\ \ \ \ \ \ \ \ \ \textcolor{keyword}{struct}} +\DoxyCodeLine{00300\ \ \ \ \ \ \ \ \ \{} +\DoxyCodeLine{00301\ \ \ \ \ \ \ \ \ \ \ \ \ ImVec2\ Location;} +\DoxyCodeLine{00302\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{float}\ \ Zoom,\ Scroll;} +\DoxyCodeLine{00303\ \ \ \ \ \ \ \ \ \}\ Camera;} +\DoxyCodeLine{00304\ } +\DoxyCodeLine{00305\ \ \ \ \ \ \ \ \ \textcolor{keyword}{struct}} +\DoxyCodeLine{00306\ \ \ \ \ \ \ \ \ \{} +\DoxyCodeLine{00307\ \ \ \ \ \ \ \ \ \ \ \ \ std::vector\ Nodes;} +\DoxyCodeLine{00308\ \ \ \ \ \ \ \ \ \ \ \ \ ConnectionMap\ \ \ \ \ \ Connections;} +\DoxyCodeLine{00309\ \ \ \ \ \ \ \ \ \}\ Clipboard;} +\DoxyCodeLine{00310\ } +\DoxyCodeLine{00311\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{bool}\ Focused;} +\DoxyCodeLine{00312\ \ \ \ \ \ \ \ \ ImVec2\ ContextMenuPosition;} +\DoxyCodeLine{00313\ } +\DoxyCodeLine{00314\ \ \ \ \ \ \ \ \ \textcolor{keyword}{friend}\ \textcolor{keyword}{class\ }\mbox{\hyperlink{class_open_shader_designer_1_1_inspector}{Inspector}};} +\DoxyCodeLine{00315\ \ \ \ \ \};} +\DoxyCodeLine{00316\ } +\DoxyCodeLine{00317\ \ \ \ \ \textcolor{keyword}{class\ }\mbox{\hyperlink{class_open_shader_designer_1_1_inspector}{Inspector}}} +\DoxyCodeLine{00318\ \ \ \ \ \ \ \ \ :\ \textcolor{keyword}{public}\ \mbox{\hyperlink{class_open_shader_designer_1_1_editor_window}{EditorWindow}}} +\DoxyCodeLine{00319\ \ \ \ \ \{} +\DoxyCodeLine{00320\ \ \ \ \ \textcolor{keyword}{public}:} +\DoxyCodeLine{00321\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{class_open_shader_designer_1_1_inspector}{Inspector}}();} +\DoxyCodeLine{00322\ } +\DoxyCodeLine{00323\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{void}\ \mbox{\hyperlink{class_open_shader_designer_1_1_inspector_a69fb8726df2442514a65dc29a9660c24}{DrawWindow}}()\ \textcolor{keyword}{override};} +\DoxyCodeLine{00324\ } +\DoxyCodeLine{00325\ \ \ \ \ \textcolor{keyword}{private}:} +\DoxyCodeLine{00326\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{class_open_shader_designer_1_1_shader_graph}{ShaderGraph}}*\ Graph;} +\DoxyCodeLine{00327\ } +\DoxyCodeLine{00328\ \ \ \ \ \ \ \ \ \textcolor{keyword}{friend}\ \textcolor{keyword}{class\ }\mbox{\hyperlink{class_open_shader_designer_1_1_shader_graph}{ShaderGraph}};} +\DoxyCodeLine{00329\ \ \ \ \ \};} +\DoxyCodeLine{00330\ \}} +\DoxyCodeLine{00331\ } +\DoxyCodeLine{00332\ \textcolor{preprocessor}{\#endif\ }\textcolor{comment}{//SHADERGRAPH\_H}} + +\end{DoxyCode} diff --git a/Documentation/latex/_startup_8h_source.tex b/Documentation/latex/_startup_8h_source.tex new file mode 100644 index 0000000..c8a8c81 --- /dev/null +++ b/Documentation/latex/_startup_8h_source.tex @@ -0,0 +1,48 @@ +\doxysection{Startup.\+h} +\hypertarget{_startup_8h_source}{}\label{_startup_8h_source}\index{Include/Utility/Startup.h@{Include/Utility/Startup.h}} + +\begin{DoxyCode}{0} +\DoxyCodeLine{00001\ \textcolor{comment}{//\ =====================================================================================================================}} +\DoxyCodeLine{00002\ \textcolor{comment}{//\ Copyright\ 2024\ Medusa\ Slockbower}} +\DoxyCodeLine{00003\ \textcolor{comment}{//\ Licensed\ under\ the\ Apache\ License,\ Version\ 2.0\ (the\ "{}License"{});}} +\DoxyCodeLine{00004\ \textcolor{comment}{//\ you\ may\ not\ use\ this\ file\ except\ in\ compliance\ with\ the\ License.}} +\DoxyCodeLine{00005\ \textcolor{comment}{//\ You\ may\ obtain\ a\ copy\ of\ the\ License\ at}} +\DoxyCodeLine{00006\ \textcolor{comment}{//}} +\DoxyCodeLine{00007\ \textcolor{comment}{//\ \ http://www.apache.org/licenses/LICENSE-\/2.0}} +\DoxyCodeLine{00008\ \textcolor{comment}{//}} +\DoxyCodeLine{00009\ \textcolor{comment}{//\ Unless\ required\ by\ applicable\ law\ or\ agreed\ to\ in\ writing,\ software}} +\DoxyCodeLine{00010\ \textcolor{comment}{//\ distributed\ under\ the\ License\ is\ distributed\ on\ an\ "{}AS\ IS"{}\ BASIS,}} +\DoxyCodeLine{00011\ \textcolor{comment}{//\ WITHOUT\ WARRANTIES\ OR\ CONDITIONS\ OF\ ANY\ KIND,\ either\ express\ or\ implied.}} +\DoxyCodeLine{00012\ \textcolor{comment}{//\ See\ the\ License\ for\ the\ specific\ language\ governing\ permissions\ and}} +\DoxyCodeLine{00013\ \textcolor{comment}{//\ limitations\ under\ the\ License.}} +\DoxyCodeLine{00014\ \textcolor{comment}{//\ =====================================================================================================================}} +\DoxyCodeLine{00015\ } +\DoxyCodeLine{00016\ \textcolor{preprocessor}{\#ifndef\ STARTUP\_H}} +\DoxyCodeLine{00017\ \textcolor{preprocessor}{\#define\ STARTUP\_H}} +\DoxyCodeLine{00018\ } +\DoxyCodeLine{00019\ \textcolor{preprocessor}{\#ifdef\ \_\_cplusplus}} +\DoxyCodeLine{00020\ \textcolor{preprocessor}{\#define\ STARTUP(f)\ \(\backslash\)}} +\DoxyCodeLine{00021\ \textcolor{preprocessor}{\ \ \ \ \ \ \ \ static\ void\ f(void);\ \(\backslash\)}} +\DoxyCodeLine{00022\ \textcolor{preprocessor}{\ \ \ \ \ \ \ \ struct\ f\#\#\_t\_\ \{\ f\#\#\_t\_(void)\ \{\ f();\ \}\ \};\ inline\ static\ f\#\#\_t\_\ f\#\#\_;\ \(\backslash\)}} +\DoxyCodeLine{00023\ \textcolor{preprocessor}{\ \ \ \ \ \ \ \ static\ void\ f(void)}} +\DoxyCodeLine{00024\ \textcolor{preprocessor}{\#elif\ defined(\_MSC\_VER)}} +\DoxyCodeLine{00025\ \textcolor{preprocessor}{\#pragma\ section("{}.CRT\$XCU"{},read)}} +\DoxyCodeLine{00026\ \textcolor{preprocessor}{\ \ \ \ \#define\ INITIALIZER2\_(f,p)\ \(\backslash\)}} +\DoxyCodeLine{00027\ \textcolor{preprocessor}{\ \ \ \ \ \ \ \ static\ void\ f(void);\ \(\backslash\)}} +\DoxyCodeLine{00028\ \textcolor{preprocessor}{\ \ \ \ \ \ \ \ \_\_declspec(allocate("{}.CRT\$XCU"{}))\ void\ (*f\#\#\_)(void)\ =\ f;\ \(\backslash\)}} +\DoxyCodeLine{00029\ \textcolor{preprocessor}{\ \ \ \ \ \ \ \ \_\_pragma(comment(linker,"{}/include:"{}\ p\ \#f\ "{}\_"{}))\ \(\backslash\)}} +\DoxyCodeLine{00030\ \textcolor{preprocessor}{\ \ \ \ \ \ \ \ static\ void\ f(void)}} +\DoxyCodeLine{00031\ \textcolor{preprocessor}{\ \ \ \ \#ifdef\ \_WIN64}} +\DoxyCodeLine{00032\ \textcolor{preprocessor}{\ \ \ \ \ \ \ \ \#define\ STARTUP(f)\ INITIALIZER2\_(f,"{}"{})}} +\DoxyCodeLine{00033\ \textcolor{preprocessor}{\ \ \ \ \#else}} +\DoxyCodeLine{00034\ \textcolor{preprocessor}{\ \ \ \ \ \ \ \ \#define\ STARTUP(f)\ INITIALIZER2\_(f,"{}\_"{})}} +\DoxyCodeLine{00035\ \textcolor{preprocessor}{\ \ \ \ \#endif}} +\DoxyCodeLine{00036\ \textcolor{preprocessor}{\#else}} +\DoxyCodeLine{00037\ \textcolor{preprocessor}{\ \ \ \ \#define\ STARTUP(f)\ \(\backslash\)}} +\DoxyCodeLine{00038\ \textcolor{preprocessor}{\ \ \ \ \ \ \ \ static\ void\ f(void)\ \_\_attribute\_\_((constructor));\ \(\backslash\)}} +\DoxyCodeLine{00039\ \textcolor{preprocessor}{\ \ \ \ \ \ \ \ static\ void\ f(void)}} +\DoxyCodeLine{00040\ \textcolor{preprocessor}{\#endif}} +\DoxyCodeLine{00041\ } +\DoxyCodeLine{00042\ \textcolor{preprocessor}{\#endif\ }\textcolor{comment}{//STARTUP\_H}} + +\end{DoxyCode} diff --git a/Documentation/latex/_template_utils_8h.tex b/Documentation/latex/_template_utils_8h.tex new file mode 100644 index 0000000..3759f67 --- /dev/null +++ b/Documentation/latex/_template_utils_8h.tex @@ -0,0 +1,75 @@ +\doxysection{Include/\+Utility/\+Template\+Utils.h File Reference} +\hypertarget{_template_utils_8h}{}\label{_template_utils_8h}\index{Include/Utility/TemplateUtils.h@{Include/Utility/TemplateUtils.h}} + + +Provides compile time evaluation utilities for templates and template packs. + + +\doxysubsubsection*{Classes} +\begin{DoxyCompactItemize} +\item +struct \mbox{\hyperlink{struct_constant_value}{Constant\+Value$<$ T, V $>$}} +\begin{DoxyCompactList}\small\item\em Compile-\/time constant value. \end{DoxyCompactList}\item +struct \mbox{\hyperlink{struct_get_pack_element}{Get\+Pack\+Element$<$ I, T, Ts $>$}} +\end{DoxyCompactItemize} +\doxysubsubsection*{Typedefs} +\begin{DoxyCompactItemize} +\item +{\footnotesize template$<$bool V$>$ }\\using \mbox{\hyperlink{_template_utils_8h_a4ec4c561f8a620b1a281b243abb77390}{Bool\+Constant}} = \mbox{\hyperlink{struct_constant_value}{Constant\+Value}}$<$bool, V$>$ +\begin{DoxyCompactList}\small\item\em Compile-\/time constant boolean value. \end{DoxyCompactList}\item +\Hypertarget{_template_utils_8h_adeed5746027088c5ee9ce594b2dc5f97}\label{_template_utils_8h_adeed5746027088c5ee9ce594b2dc5f97} +using {\bfseries True\+Type} = \mbox{\hyperlink{_template_utils_8h_a4ec4c561f8a620b1a281b243abb77390}{Bool\+Constant}}$<$true$>$ +\begin{DoxyCompactList}\small\item\em Constant True Value. \end{DoxyCompactList}\item +\Hypertarget{_template_utils_8h_a5d03e0d64b76930405274da5a45e8c24}\label{_template_utils_8h_a5d03e0d64b76930405274da5a45e8c24} +using {\bfseries False\+Type} = \mbox{\hyperlink{_template_utils_8h_a4ec4c561f8a620b1a281b243abb77390}{Bool\+Constant}}$<$false$>$ +\begin{DoxyCompactList}\small\item\em Constant False Value. \end{DoxyCompactList}\end{DoxyCompactItemize} +\doxysubsubsection*{Variables} +\begin{DoxyCompactItemize} +\item +{\footnotesize template$<$typename T , typename... Ts$>$ }\\constexpr bool \mbox{\hyperlink{_template_utils_8h_a41b103eb68d30e57aeca48ed2c66e162}{Is\+Unique$<$ T, Ts... $>$}} = \mbox{\hyperlink{_template_utils_8h_a4ec4c561f8a620b1a281b243abb77390}{Bool\+Constant}}$<$(!Is\+Same$<$T, Ts$>$ \&\& ...) \&\& Is\+Unique$<$Ts...$>$$>$\{\} +\begin{DoxyCompactList}\small\item\em Check if all types in a template pack are unique. \end{DoxyCompactList}\end{DoxyCompactItemize} + + +\doxysubsection{Detailed Description} +Provides compile time evaluation utilities for templates and template packs. + + + +\doxysubsection{Typedef Documentation} +\Hypertarget{_template_utils_8h_a4ec4c561f8a620b1a281b243abb77390}\index{TemplateUtils.h@{TemplateUtils.h}!BoolConstant@{BoolConstant}} +\index{BoolConstant@{BoolConstant}!TemplateUtils.h@{TemplateUtils.h}} +\doxysubsubsection{\texorpdfstring{BoolConstant}{BoolConstant}} +{\footnotesize\ttfamily \label{_template_utils_8h_a4ec4c561f8a620b1a281b243abb77390} +template$<$bool V$>$ \\ +using \mbox{\hyperlink{_template_utils_8h_a4ec4c561f8a620b1a281b243abb77390}{Bool\+Constant}} = \mbox{\hyperlink{struct_constant_value}{Constant\+Value}}$<$bool, V$>$} + + + +Compile-\/time constant boolean value. + + +\begin{DoxyTemplParams}{Template Parameters} +{\em V} & Value \\ +\hline +\end{DoxyTemplParams} + + +\doxysubsection{Variable Documentation} +\Hypertarget{_template_utils_8h_a41b103eb68d30e57aeca48ed2c66e162}\index{TemplateUtils.h@{TemplateUtils.h}!IsUnique$<$ T, Ts... $>$@{IsUnique$<$ T, Ts... $>$}} +\index{IsUnique$<$ T, Ts... $>$@{IsUnique$<$ T, Ts... $>$}!TemplateUtils.h@{TemplateUtils.h}} +\doxysubsubsection{\texorpdfstring{IsUnique$<$ T, Ts... $>$}{IsUnique< T, Ts... >}} +{\footnotesize\ttfamily \label{_template_utils_8h_a41b103eb68d30e57aeca48ed2c66e162} +template$<$typename T , typename... Ts$>$ \\ +bool Is\+Unique$<$ T, Ts... $>$ = \mbox{\hyperlink{_template_utils_8h_a4ec4c561f8a620b1a281b243abb77390}{Bool\+Constant}}$<$(!Is\+Same$<$T, Ts$>$ \&\& ...) \&\& Is\+Unique$<$Ts...$>$$>$\{\}\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [constexpr]}} + + + +Check if all types in a template pack are unique. + + +\begin{DoxyTemplParams}{Template Parameters} +{\em T} & First element of template pack \\ +\hline +{\em Ts} & Rest of the template pack \\ +\hline +\end{DoxyTemplParams} diff --git a/Documentation/latex/_template_utils_8h_source.tex b/Documentation/latex/_template_utils_8h_source.tex new file mode 100644 index 0000000..b043d9d --- /dev/null +++ b/Documentation/latex/_template_utils_8h_source.tex @@ -0,0 +1,59 @@ +\doxysection{Template\+Utils.\+h} +\hypertarget{_template_utils_8h_source}{}\label{_template_utils_8h_source}\index{Include/Utility/TemplateUtils.h@{Include/Utility/TemplateUtils.h}} +\mbox{\hyperlink{_template_utils_8h}{Go to the documentation of this file.}} +\begin{DoxyCode}{0} +\DoxyCodeLine{00001\ \textcolor{comment}{//\ =====================================================================================================================}} +\DoxyCodeLine{00002\ \textcolor{comment}{//\ Copyright\ 2024\ Medusa\ Slockbower}} +\DoxyCodeLine{00003\ \textcolor{comment}{//\ Licensed\ under\ the\ Apache\ License,\ Version\ 2.0\ (the\ "{}License"{});}} +\DoxyCodeLine{00004\ \textcolor{comment}{//\ you\ may\ not\ use\ this\ file\ except\ in\ compliance\ with\ the\ License.}} +\DoxyCodeLine{00005\ \textcolor{comment}{//\ You\ may\ obtain\ a\ copy\ of\ the\ License\ at}} +\DoxyCodeLine{00006\ \textcolor{comment}{//}} +\DoxyCodeLine{00007\ \textcolor{comment}{//\ \ http://www.apache.org/licenses/LICENSE-\/2.0}} +\DoxyCodeLine{00008\ \textcolor{comment}{//}} +\DoxyCodeLine{00009\ \textcolor{comment}{//\ Unless\ required\ by\ applicable\ law\ or\ agreed\ to\ in\ writing,\ software}} +\DoxyCodeLine{00010\ \textcolor{comment}{//\ distributed\ under\ the\ License\ is\ distributed\ on\ an\ "{}AS\ IS"{}\ BASIS,}} +\DoxyCodeLine{00011\ \textcolor{comment}{//\ WITHOUT\ WARRANTIES\ OR\ CONDITIONS\ OF\ ANY\ KIND,\ either\ express\ or\ implied.}} +\DoxyCodeLine{00012\ \textcolor{comment}{//\ See\ the\ License\ for\ the\ specific\ language\ governing\ permissions\ and}} +\DoxyCodeLine{00013\ \textcolor{comment}{//\ limitations\ under\ the\ License.}} +\DoxyCodeLine{00014\ \textcolor{comment}{//\ =====================================================================================================================}} +\DoxyCodeLine{00015\ } +\DoxyCodeLine{00016\ \textcolor{preprocessor}{\#ifndef\ TEMPLATEUTILS\_H}} +\DoxyCodeLine{00017\ \textcolor{preprocessor}{\#define\ TEMPLATEUTILS\_H}} +\DoxyCodeLine{00018\ } +\DoxyCodeLine{00029\ \textcolor{keyword}{template}<\textcolor{keyword}{typename}\ T,\ T\ V>} +\DoxyCodeLine{00030\ \textcolor{keyword}{struct\ }\mbox{\hyperlink{struct_constant_value}{ConstantValue}}} +\DoxyCodeLine{00031\ \{} +\DoxyCodeLine{00032\ \ \ \ \ \textcolor{keyword}{using\ }Type\ =\ T;} +\DoxyCodeLine{00033\ \ \ \ \ \textcolor{keyword}{static}\ \textcolor{keyword}{constexpr}\ Type\ Value\ =\ V;} +\DoxyCodeLine{00034\ } +\DoxyCodeLine{00035\ \ \ \ \ \textcolor{keyword}{constexpr}\ \textcolor{keyword}{operator}\ Type()\ \textcolor{keyword}{const}\ \textcolor{keyword}{noexcept}\ \{\ \textcolor{keywordflow}{return}\ Value;\ \}} +\DoxyCodeLine{00036\ \ \ \ \ [[nodiscard]]\ \textcolor{keyword}{constexpr}\ Type\ operator()()\textcolor{keyword}{\ const\ }\{\ \textcolor{keywordflow}{return}\ Value;\ \}} +\DoxyCodeLine{00037\ \};} +\DoxyCodeLine{00038\ } +\DoxyCodeLine{00043\ \textcolor{keyword}{template}<\textcolor{keywordtype}{bool}\ V>} +\DoxyCodeLine{00044\ \textcolor{keyword}{using\ }\mbox{\hyperlink{struct_constant_value}{BoolConstant}}\ =\ \mbox{\hyperlink{struct_constant_value}{ConstantValue}};} +\DoxyCodeLine{00045\ } +\DoxyCodeLine{00046\ \textcolor{keyword}{using\ }\mbox{\hyperlink{struct_constant_value}{TrueType}}\ =\ \mbox{\hyperlink{struct_constant_value}{BoolConstant}};\ } +\DoxyCodeLine{00047\ \textcolor{keyword}{using\ }\mbox{\hyperlink{struct_constant_value}{FalseType}}\ =\ \mbox{\hyperlink{struct_constant_value}{BoolConstant}};\ } +\DoxyCodeLine{00048\ } +\DoxyCodeLine{00052\ \textcolor{keyword}{template}<\textcolor{keyword}{typename},\ \textcolor{keyword}{typename}>} +\DoxyCodeLine{00053\ \textcolor{keyword}{inline}\ \textcolor{keyword}{static}\ \textcolor{keyword}{constexpr}\ \textcolor{keywordtype}{bool}\ IsSame\ =\ \textcolor{keyword}{false};} +\DoxyCodeLine{00054\ } +\DoxyCodeLine{00055\ \textcolor{keyword}{template}<\textcolor{keyword}{typename}\ T>} +\DoxyCodeLine{00056\ \textcolor{keyword}{inline}\ \textcolor{keyword}{static}\ \textcolor{keyword}{constexpr}\ \textcolor{keywordtype}{bool}\ IsSame\ =\ \textcolor{keyword}{true};} +\DoxyCodeLine{00057\ } +\DoxyCodeLine{00058\ \textcolor{keyword}{template}<\textcolor{keyword}{typename}...>} +\DoxyCodeLine{00059\ \textcolor{keyword}{inline}\ \textcolor{keyword}{static}\ \textcolor{keyword}{constexpr}\ \textcolor{keywordtype}{bool}\ IsUnique\ =\ \mbox{\hyperlink{struct_constant_value}{TrueType}}\{\};} +\DoxyCodeLine{00060\ } +\DoxyCodeLine{00066\ \textcolor{keyword}{template}<\textcolor{keyword}{typename}\ T,\ \textcolor{keyword}{typename}...Ts>} +\DoxyCodeLine{00067\ \textcolor{keyword}{inline}\ \textcolor{keyword}{constexpr}\ \textcolor{keywordtype}{bool}\ IsUnique\ =\ \mbox{\hyperlink{struct_constant_value}{BoolConstant}}<(!IsSame\ \&\&\ ...)\ \&\&\ IsUnique>\{\};} +\DoxyCodeLine{00068\ } +\DoxyCodeLine{00069\ \textcolor{keyword}{template}<\textcolor{keywordtype}{size\_t}\ I,\ \textcolor{keyword}{typename}\ T,\ \textcolor{keyword}{typename}...Ts>} +\DoxyCodeLine{00070\ \textcolor{keyword}{struct\ }\mbox{\hyperlink{struct_get_pack_element}{GetPackElement}}} +\DoxyCodeLine{00071\ \{} +\DoxyCodeLine{00072\ \ \ \ \ \textcolor{keyword}{using\ }Type\ =\ \textcolor{keyword}{typename}\ \mbox{\hyperlink{struct_get_pack_element}{GetPackElement}}::Type;} +\DoxyCodeLine{00073\ \};} +\DoxyCodeLine{00074\ } +\DoxyCodeLine{00075\ \textcolor{preprocessor}{\#endif\ }\textcolor{comment}{//TEMPLATEUTILS\_H}} + +\end{DoxyCode} diff --git a/Documentation/latex/_timer_8h_source.tex b/Documentation/latex/_timer_8h_source.tex new file mode 100644 index 0000000..f084a6a --- /dev/null +++ b/Documentation/latex/_timer_8h_source.tex @@ -0,0 +1,43 @@ +\doxysection{Timer.\+h} +\hypertarget{_timer_8h_source}{}\label{_timer_8h_source}\index{Include/Utility/Timer.h@{Include/Utility/Timer.h}} + +\begin{DoxyCode}{0} +\DoxyCodeLine{00001\ \textcolor{comment}{//\ =====================================================================================================================}} +\DoxyCodeLine{00002\ \textcolor{comment}{//\ Copyright\ 2024\ Medusa\ Slockbower}} +\DoxyCodeLine{00003\ \textcolor{comment}{//\ Licensed\ under\ the\ Apache\ License,\ Version\ 2.0\ (the\ "{}License"{});}} +\DoxyCodeLine{00004\ \textcolor{comment}{//\ you\ may\ not\ use\ this\ file\ except\ in\ compliance\ with\ the\ License.}} +\DoxyCodeLine{00005\ \textcolor{comment}{//\ You\ may\ obtain\ a\ copy\ of\ the\ License\ at}} +\DoxyCodeLine{00006\ \textcolor{comment}{//}} +\DoxyCodeLine{00007\ \textcolor{comment}{//\ \ http://www.apache.org/licenses/LICENSE-\/2.0}} +\DoxyCodeLine{00008\ \textcolor{comment}{//}} +\DoxyCodeLine{00009\ \textcolor{comment}{//\ Unless\ required\ by\ applicable\ law\ or\ agreed\ to\ in\ writing,\ software}} +\DoxyCodeLine{00010\ \textcolor{comment}{//\ distributed\ under\ the\ License\ is\ distributed\ on\ an\ "{}AS\ IS"{}\ BASIS,}} +\DoxyCodeLine{00011\ \textcolor{comment}{//\ WITHOUT\ WARRANTIES\ OR\ CONDITIONS\ OF\ ANY\ KIND,\ either\ express\ or\ implied.}} +\DoxyCodeLine{00012\ \textcolor{comment}{//\ See\ the\ License\ for\ the\ specific\ language\ governing\ permissions\ and}} +\DoxyCodeLine{00013\ \textcolor{comment}{//\ limitations\ under\ the\ License.}} +\DoxyCodeLine{00014\ \textcolor{comment}{//\ =====================================================================================================================}} +\DoxyCodeLine{00015\ } +\DoxyCodeLine{00016\ \textcolor{preprocessor}{\#ifndef\ TIMER\_H}} +\DoxyCodeLine{00017\ \textcolor{preprocessor}{\#define\ TIMER\_H}} +\DoxyCodeLine{00018\ } +\DoxyCodeLine{00019\ \textcolor{preprocessor}{\#include\ }} +\DoxyCodeLine{00020\ } +\DoxyCodeLine{00021\ \textcolor{keyword}{namespace\ }OpenShaderDesigner} +\DoxyCodeLine{00022\ \{} +\DoxyCodeLine{00023\ \ \ \ \ \textcolor{keyword}{class\ }\mbox{\hyperlink{class_open_shader_designer_1_1_timer}{Timer}}} +\DoxyCodeLine{00024\ \ \ \ \ \{} +\DoxyCodeLine{00025\ \ \ \ \ \textcolor{keyword}{public}:} +\DoxyCodeLine{00026\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{class_open_shader_designer_1_1_timer}{Timer}}()\ :\ Start(std::chrono::high\_resolution\_clock::now())\ \{\ \}} +\DoxyCodeLine{00027\ } +\DoxyCodeLine{00028\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{void}\ Reset()\ \{\ Start\ =\ std::chrono::high\_resolution\_clock::now();\ \}} +\DoxyCodeLine{00029\ } +\DoxyCodeLine{00030\ \ \ \ \ \ \ \ \ [[nodiscard]]\ \textcolor{keywordtype}{double}\ Poll()\textcolor{keyword}{\ const}} +\DoxyCodeLine{00031\ \textcolor{keyword}{\ \ \ \ \ \ \ \ }\{\ \textcolor{keywordflow}{return}\ std::chrono::duration(std::chrono::high\_resolution\_clock::now()\ -\/\ Start).count();\ \}} +\DoxyCodeLine{00032\ \ \ \ \ \textcolor{keyword}{private}:} +\DoxyCodeLine{00033\ \ \ \ \ \ \ \ \ std::chrono::high\_resolution\_clock::time\_point\ Start;} +\DoxyCodeLine{00034\ \ \ \ \ \};} +\DoxyCodeLine{00035\ \}} +\DoxyCodeLine{00036\ } +\DoxyCodeLine{00037\ \textcolor{preprocessor}{\#endif\ }\textcolor{comment}{//TIMER\_H}} + +\end{DoxyCode} diff --git a/Documentation/latex/_type_8h_source.tex b/Documentation/latex/_type_8h_source.tex new file mode 100644 index 0000000..6e53ed1 --- /dev/null +++ b/Documentation/latex/_type_8h_source.tex @@ -0,0 +1,36 @@ +\doxysection{Type.\+h} +\hypertarget{_type_8h_source}{}\label{_type_8h_source}\index{Include/OpenGL/Type.h@{Include/OpenGL/Type.h}} + +\begin{DoxyCode}{0} +\DoxyCodeLine{00001\ \textcolor{comment}{//\ =====================================================================================================================}} +\DoxyCodeLine{00002\ \textcolor{comment}{//\ Copyright\ 2024\ Medusa\ Slockbower}} +\DoxyCodeLine{00003\ \textcolor{comment}{//\ Licensed\ under\ the\ Apache\ License,\ Version\ 2.0\ (the\ "{}License"{});}} +\DoxyCodeLine{00004\ \textcolor{comment}{//\ you\ may\ not\ use\ this\ file\ except\ in\ compliance\ with\ the\ License.}} +\DoxyCodeLine{00005\ \textcolor{comment}{//\ You\ may\ obtain\ a\ copy\ of\ the\ License\ at}} +\DoxyCodeLine{00006\ \textcolor{comment}{//}} +\DoxyCodeLine{00007\ \textcolor{comment}{//\ \ http://www.apache.org/licenses/LICENSE-\/2.0}} +\DoxyCodeLine{00008\ \textcolor{comment}{//}} +\DoxyCodeLine{00009\ \textcolor{comment}{//\ Unless\ required\ by\ applicable\ law\ or\ agreed\ to\ in\ writing,\ software}} +\DoxyCodeLine{00010\ \textcolor{comment}{//\ distributed\ under\ the\ License\ is\ distributed\ on\ an\ "{}AS\ IS"{}\ BASIS,}} +\DoxyCodeLine{00011\ \textcolor{comment}{//\ WITHOUT\ WARRANTIES\ OR\ CONDITIONS\ OF\ ANY\ KIND,\ either\ express\ or\ implied.}} +\DoxyCodeLine{00012\ \textcolor{comment}{//\ See\ the\ License\ for\ the\ specific\ language\ governing\ permissions\ and}} +\DoxyCodeLine{00013\ \textcolor{comment}{//\ limitations\ under\ the\ License.}} +\DoxyCodeLine{00014\ \textcolor{comment}{//\ =====================================================================================================================}} +\DoxyCodeLine{00015\ } +\DoxyCodeLine{00016\ \textcolor{preprocessor}{\#ifndef\ TYPE\_H}} +\DoxyCodeLine{00017\ \textcolor{preprocessor}{\#define\ TYPE\_H}} +\DoxyCodeLine{00018\ } +\DoxyCodeLine{00019\ \textcolor{preprocessor}{\#include\ }} +\DoxyCodeLine{00020\ } +\DoxyCodeLine{00021\ \textcolor{keyword}{namespace\ }GLW} +\DoxyCodeLine{00022\ \{} +\DoxyCodeLine{00023\ \ \ \ \ \textcolor{keyword}{using\ }OffsetT\ =\ GLintptr;} +\DoxyCodeLine{00024\ \ \ \ \ \textcolor{keyword}{using\ }SizeT\ \ \ =\ GLsizeiptr;} +\DoxyCodeLine{00025\ \ \ \ \ \textcolor{keyword}{using\ }IndexT\ \ =\ GLuint;} +\DoxyCodeLine{00026\ \ \ \ \ \textcolor{keyword}{using\ }FlagT\ \ \ =\ GLbitfield;} +\DoxyCodeLine{00027\ \ \ \ \ \textcolor{keyword}{using\ }HandleT\ =\ GLuint;} +\DoxyCodeLine{00028\ \}} +\DoxyCodeLine{00029\ } +\DoxyCodeLine{00030\ \textcolor{preprocessor}{\#endif\ }\textcolor{comment}{//TYPE\_H}} + +\end{DoxyCode} diff --git a/Documentation/latex/_unique_i_d_8h_source.tex b/Documentation/latex/_unique_i_d_8h_source.tex new file mode 100644 index 0000000..284f3d9 --- /dev/null +++ b/Documentation/latex/_unique_i_d_8h_source.tex @@ -0,0 +1,51 @@ +\doxysection{Unique\+ID.\+h} +\hypertarget{_unique_i_d_8h_source}{}\label{_unique_i_d_8h_source}\index{Include/Utility/UniqueID.h@{Include/Utility/UniqueID.h}} + +\begin{DoxyCode}{0} +\DoxyCodeLine{00001\ \textcolor{comment}{//\ =====================================================================================================================}} +\DoxyCodeLine{00002\ \textcolor{comment}{//\ Copyright\ 2024\ Medusa\ Slockbower}} +\DoxyCodeLine{00003\ \textcolor{comment}{//\ Licensed\ under\ the\ Apache\ License,\ Version\ 2.0\ (the\ "{}License"{});}} +\DoxyCodeLine{00004\ \textcolor{comment}{//\ you\ may\ not\ use\ this\ file\ except\ in\ compliance\ with\ the\ License.}} +\DoxyCodeLine{00005\ \textcolor{comment}{//\ You\ may\ obtain\ a\ copy\ of\ the\ License\ at}} +\DoxyCodeLine{00006\ \textcolor{comment}{//}} +\DoxyCodeLine{00007\ \textcolor{comment}{//\ \ http://www.apache.org/licenses/LICENSE-\/2.0}} +\DoxyCodeLine{00008\ \textcolor{comment}{//}} +\DoxyCodeLine{00009\ \textcolor{comment}{//\ Unless\ required\ by\ applicable\ law\ or\ agreed\ to\ in\ writing,\ software}} +\DoxyCodeLine{00010\ \textcolor{comment}{//\ distributed\ under\ the\ License\ is\ distributed\ on\ an\ "{}AS\ IS"{}\ BASIS,}} +\DoxyCodeLine{00011\ \textcolor{comment}{//\ WITHOUT\ WARRANTIES\ OR\ CONDITIONS\ OF\ ANY\ KIND,\ either\ express\ or\ implied.}} +\DoxyCodeLine{00012\ \textcolor{comment}{//\ See\ the\ License\ for\ the\ specific\ language\ governing\ permissions\ and}} +\DoxyCodeLine{00013\ \textcolor{comment}{//\ limitations\ under\ the\ License.}} +\DoxyCodeLine{00014\ \textcolor{comment}{//\ =====================================================================================================================}} +\DoxyCodeLine{00015\ } +\DoxyCodeLine{00016\ \textcolor{preprocessor}{\#ifndef\ ENGINE\_UNIQUEID\_H}} +\DoxyCodeLine{00017\ \textcolor{preprocessor}{\#define\ ENGINE\_UNIQUEID\_H}} +\DoxyCodeLine{00018\ } +\DoxyCodeLine{00019\ \textcolor{preprocessor}{\#include\ }} +\DoxyCodeLine{00020\ } +\DoxyCodeLine{00021\ \textcolor{preprocessor}{\#ifdef\ \_MSC\_VER}} +\DoxyCodeLine{00022\ \textcolor{preprocessor}{\#define\ COUNTER\ \_\_declspec(selectany)}} +\DoxyCodeLine{00023\ \textcolor{preprocessor}{\#endif}} +\DoxyCodeLine{00024\ } +\DoxyCodeLine{00025\ \textcolor{keyword}{namespace\ }OpenShaderDesigner} +\DoxyCodeLine{00026\ \{} +\DoxyCodeLine{00027\ \ \ \ \ \textcolor{keyword}{template}<\textcolor{keyword}{typename}\ Base>\ uint64\_t\ \_Increment()} +\DoxyCodeLine{00028\ \ \ \ \ \{} +\DoxyCodeLine{00029\ \ \ \ \ \ \ \ \ \textcolor{keyword}{static}\ uint64\_t\ current\ =\ 0;} +\DoxyCodeLine{00030\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ current++;} +\DoxyCodeLine{00031\ \ \ \ \ \}} +\DoxyCodeLine{00032\ } +\DoxyCodeLine{00033\ \ \ \ \ \textcolor{comment}{//\ Unfortunately\ adds\ a\ little\ bit\ of\ overhead\ at\ runtime}} +\DoxyCodeLine{00034\ \ \ \ \ \textcolor{keyword}{template}<\textcolor{keyword}{typename}\ Base,\ \textcolor{keyword}{typename}\ Type>\ uint64\_t\ UniqueID()} +\DoxyCodeLine{00035\ \ \ \ \ \{} +\DoxyCodeLine{00036\ \ \ \ \ \ \ \ \ \textcolor{keyword}{static}\ \textcolor{keywordtype}{bool}\ initialized\ =\ \textcolor{keyword}{false};} +\DoxyCodeLine{00037\ \ \ \ \ \ \ \ \ \textcolor{keyword}{static}\ uint64\_t\ \textcolor{keywordtype}{id}\ =\ 0;} +\DoxyCodeLine{00038\ } +\DoxyCodeLine{00039\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}(initialized)\ \textcolor{keywordflow}{return}\ id;} +\DoxyCodeLine{00040\ \ \ \ \ \ \ \ \ initialized\ =\ \textcolor{keyword}{true};} +\DoxyCodeLine{00041\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ \textcolor{keywordtype}{id}\ =\ \_Increment();} +\DoxyCodeLine{00042\ \ \ \ \ \}} +\DoxyCodeLine{00043\ \}} +\DoxyCodeLine{00044\ } +\DoxyCodeLine{00045\ \textcolor{preprocessor}{\#endif\ }\textcolor{comment}{//ENGINE\_UNIQUEID\_H}} + +\end{DoxyCode} diff --git a/Documentation/latex/_window_8h_source.tex b/Documentation/latex/_window_8h_source.tex new file mode 100644 index 0000000..e12c2a0 --- /dev/null +++ b/Documentation/latex/_window_8h_source.tex @@ -0,0 +1,120 @@ +\doxysection{Window.\+h} +\hypertarget{_window_8h_source}{}\label{_window_8h_source}\index{Include/Core/Window.h@{Include/Core/Window.h}} + +\begin{DoxyCode}{0} +\DoxyCodeLine{00001\ \textcolor{comment}{//\ =====================================================================================================================}} +\DoxyCodeLine{00002\ \textcolor{comment}{//\ Copyright\ 2024\ Medusa\ Slockbower}} +\DoxyCodeLine{00003\ \textcolor{comment}{//\ Licensed\ under\ the\ Apache\ License,\ Version\ 2.0\ (the\ "{}License"{});}} +\DoxyCodeLine{00004\ \textcolor{comment}{//\ you\ may\ not\ use\ this\ file\ except\ in\ compliance\ with\ the\ License.}} +\DoxyCodeLine{00005\ \textcolor{comment}{//\ You\ may\ obtain\ a\ copy\ of\ the\ License\ at}} +\DoxyCodeLine{00006\ \textcolor{comment}{//}} +\DoxyCodeLine{00007\ \textcolor{comment}{//\ \ http://www.apache.org/licenses/LICENSE-\/2.0}} +\DoxyCodeLine{00008\ \textcolor{comment}{//}} +\DoxyCodeLine{00009\ \textcolor{comment}{//\ Unless\ required\ by\ applicable\ law\ or\ agreed\ to\ in\ writing,\ software}} +\DoxyCodeLine{00010\ \textcolor{comment}{//\ distributed\ under\ the\ License\ is\ distributed\ on\ an\ "{}AS\ IS"{}\ BASIS,}} +\DoxyCodeLine{00011\ \textcolor{comment}{//\ WITHOUT\ WARRANTIES\ OR\ CONDITIONS\ OF\ ANY\ KIND,\ either\ express\ or\ implied.}} +\DoxyCodeLine{00012\ \textcolor{comment}{//\ See\ the\ License\ for\ the\ specific\ language\ governing\ permissions\ and}} +\DoxyCodeLine{00013\ \textcolor{comment}{//\ limitations\ under\ the\ License.}} +\DoxyCodeLine{00014\ \textcolor{comment}{//\ =====================================================================================================================}} +\DoxyCodeLine{00015\ } +\DoxyCodeLine{00016\ \textcolor{preprocessor}{\#ifndef\ WINDOW\_H}} +\DoxyCodeLine{00017\ \textcolor{preprocessor}{\#define\ WINDOW\_H}} +\DoxyCodeLine{00018\ } +\DoxyCodeLine{00019\ \textcolor{preprocessor}{\#include\ }} +\DoxyCodeLine{00020\ \textcolor{preprocessor}{\#include\ }} +\DoxyCodeLine{00021\ \textcolor{preprocessor}{\#include\ }} +\DoxyCodeLine{00022\ \textcolor{preprocessor}{\#include\ }} +\DoxyCodeLine{00023\ } +\DoxyCodeLine{00024\ \textcolor{keyword}{namespace\ }OpenShaderDesigner} +\DoxyCodeLine{00025\ \{} +\DoxyCodeLine{00026\ \ \ \ \ BeginEvent(SDLEvent)} +\DoxyCodeLine{00027\ \ \ \ \ \ \ \ \ \textcolor{keyword}{const}\ SDL\_Event\ sdl\_event;} +\DoxyCodeLine{00028\ } +\DoxyCodeLine{00029\ \ \ \ \ \ \ \ \ SDLEvent()\ :\ sdl\_event()\ \{\}} +\DoxyCodeLine{00030\ } +\DoxyCodeLine{00031\ \ \ \ \ \ \ \ \ \textcolor{keyword}{explicit}\ SDLEvent(\textcolor{keyword}{const}\ SDL\_Event\ \&event)\ :\ sdl\_event(event)\ \{\}} +\DoxyCodeLine{00032\ \ \ \ \ EndEvent} +\DoxyCodeLine{00033\ } +\DoxyCodeLine{00034\ } +\DoxyCodeLine{00035\ \ \ \ \ BeginEvent(BeginFrame)} +\DoxyCodeLine{00036\ \ \ \ \ EndEvent;} +\DoxyCodeLine{00037\ } +\DoxyCodeLine{00038\ \ \ \ \ BeginEvent(SDLEventsDone)} +\DoxyCodeLine{00039\ \ \ \ \ EndEvent;} +\DoxyCodeLine{00040\ } +\DoxyCodeLine{00041\ \ \ \ \ BeginEvent(EndFrame)} +\DoxyCodeLine{00042\ \ \ \ \ EndEvent;} +\DoxyCodeLine{00043\ } +\DoxyCodeLine{00044\ } +\DoxyCodeLine{00045\ \ \ \ \ \textcolor{keyword}{class\ }\mbox{\hyperlink{class_open_shader_designer_1_1_window}{Window}}} +\DoxyCodeLine{00046\ \ \ \ \ \{} +\DoxyCodeLine{00047\ \ \ \ \ \textcolor{keyword}{public}:} +\DoxyCodeLine{00048\ \ \ \ \ \ \ \ \ \textcolor{keyword}{enum\ class}\ VSyncMode\ :\ \textcolor{keywordtype}{int}} +\DoxyCodeLine{00049\ \ \ \ \ \ \ \ \ \{} +\DoxyCodeLine{00050\ \ \ \ \ \ \ \ \ \ \ \ \ DISABLED\ =\ 0,} +\DoxyCodeLine{00051\ \ \ \ \ \ \ \ \ \ \ \ \ ENABLED\ =\ 1,} +\DoxyCodeLine{00052\ \ \ \ \ \ \ \ \ \ \ \ \ ADAPTIVE\ =\ -\/1,} +\DoxyCodeLine{00053\ \ \ \ \ \ \ \ \ \ \ \ \ DEFAULT\ =\ DISABLED,} +\DoxyCodeLine{00054\ \ \ \ \ \ \ \ \ \};} +\DoxyCodeLine{00055\ } +\DoxyCodeLine{00056\ \ \ \ \ \ \ \ \ \textcolor{keyword}{enum\ class}\ FullscreenMode\ :\ \textcolor{keywordtype}{int}} +\DoxyCodeLine{00057\ \ \ \ \ \ \ \ \ \{} +\DoxyCodeLine{00058\ \ \ \ \ \ \ \ \ \ \ \ \ WINDOWED\ =\ 0,} +\DoxyCodeLine{00059\ \ \ \ \ \ \ \ \ \ \ \ \ FULLSCREEN\ =\ SDL\_WINDOW\_FULLSCREEN,} +\DoxyCodeLine{00060\ \ \ \ \ \ \ \ \ \ \ \ \ FULLSCREEN\_WINDOW\ =\ SDL\_WINDOW\_FULLSCREEN\_DESKTOP,} +\DoxyCodeLine{00061\ \ \ \ \ \ \ \ \ \};} +\DoxyCodeLine{00062\ } +\DoxyCodeLine{00063\ \ \ \ \ \ \ \ \ \textcolor{keyword}{struct\ }\mbox{\hyperlink{struct_open_shader_designer_1_1_window_1_1_configuration}{Configuration}}} +\DoxyCodeLine{00064\ \ \ \ \ \ \ \ \ \{} +\DoxyCodeLine{00065\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keyword}{struct}} +\DoxyCodeLine{00066\ \ \ \ \ \ \ \ \ \ \ \ \ \{} +\DoxyCodeLine{00067\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ std::string\ Title;} +\DoxyCodeLine{00068\ \ \ \ \ \ \ \ \ \ \ \ \ \}\ Application;} +\DoxyCodeLine{00069\ } +\DoxyCodeLine{00070\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keyword}{struct}} +\DoxyCodeLine{00071\ \ \ \ \ \ \ \ \ \ \ \ \ \{} +\DoxyCodeLine{00072\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ FullscreenMode\ Fullscreen;} +\DoxyCodeLine{00073\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ glm::ivec2\ \ \ \ \ Resolution;} +\DoxyCodeLine{00074\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ VSyncMode\ \ \ \ \ \ VSync;} +\DoxyCodeLine{00075\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{bool}\ \ \ \ \ \ \ \ \ \ \ HDR;} +\DoxyCodeLine{00076\ \ \ \ \ \ \ \ \ \ \ \ \ \}\ Video;} +\DoxyCodeLine{00077\ } +\DoxyCodeLine{00078\ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{struct_open_shader_designer_1_1_window_1_1_configuration}{Configuration}}()} +\DoxyCodeLine{00079\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ :\ Application\ \{\ \textcolor{stringliteral}{"{}App"{}}\ \}} +\DoxyCodeLine{00080\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ ,\ Video\ \{\ FullscreenMode::WINDOWED,\ glm::ivec2(1280,\ 720),\ VSyncMode::DISABLED,\ \textcolor{keyword}{false}\ \}} +\DoxyCodeLine{00081\ \ \ \ \ \ \ \ \ \ \ \ \ \{\ \}} +\DoxyCodeLine{00082\ \ \ \ \ \ \ \ \ \};} +\DoxyCodeLine{00083\ } +\DoxyCodeLine{00084\ \ \ \ \ \ \ \ \ \textcolor{keyword}{inline}\ \textcolor{keyword}{static}\ \textcolor{keyword}{const}\ \mbox{\hyperlink{struct_open_shader_designer_1_1_window_1_1_configuration}{Configuration}}\ DefaultConfiguration;} +\DoxyCodeLine{00085\ } +\DoxyCodeLine{00086\ \ \ \ \ \ \ \ \ \textcolor{keyword}{explicit}\ \mbox{\hyperlink{class_open_shader_designer_1_1_window}{Window}}(\textcolor{keyword}{const}\ \mbox{\hyperlink{struct_open_shader_designer_1_1_window_1_1_configuration}{Configuration}}\&\ config);} +\DoxyCodeLine{00087\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{class_open_shader_designer_1_1_window}{\string~Window}}();} +\DoxyCodeLine{00088\ } +\DoxyCodeLine{00089\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{void}\ HandleEvents();} +\DoxyCodeLine{00090\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{void}\ BeginFrame();} +\DoxyCodeLine{00091\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{void}\ EndFrame();} +\DoxyCodeLine{00092\ } +\DoxyCodeLine{00093\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{void}\ Close()\ \{\ Open\ =\ \textcolor{keyword}{false};\ \}} +\DoxyCodeLine{00094\ \ \ \ \ \ \ \ \ [[nodiscard]]\ \textcolor{keywordtype}{bool}\ IsOpen()\textcolor{keyword}{\ const\ }\{\ \textcolor{keywordflow}{return}\ Open;\ \}} +\DoxyCodeLine{00095\ } +\DoxyCodeLine{00096\ \ \ \ \ \ \ \ \ SDL\_Window*\ GetHandle()\ \{\ \textcolor{keywordflow}{return}\ Handle;\ \}} +\DoxyCodeLine{00097\ \ \ \ \ \ \ \ \ [[nodiscard]]\ \textcolor{keyword}{const}\ SDL\_Window*\ GetHandle()\textcolor{keyword}{\ const\ }\{\ \textcolor{keywordflow}{return}\ Handle;\ \}} +\DoxyCodeLine{00098\ } +\DoxyCodeLine{00099\ \ \ \ \ \ \ \ \ SDL\_GLContext\ GetContext()\ \{\ \textcolor{keywordflow}{return}\ Context;\ \}} +\DoxyCodeLine{00100\ \ \ \ \ \ \ \ \ [[nodiscard]]\ \textcolor{keyword}{const}\ SDL\_GLContext\ GetContext()\textcolor{keyword}{\ const\ }\{\ \textcolor{keywordflow}{return}\ Context;\ \}} +\DoxyCodeLine{00101\ } +\DoxyCodeLine{00102\ \ \ \ \ \ \ \ \ [[nodiscard]]\ glm::ivec2\ Size()\textcolor{keyword}{\ const\ }\{\ \textcolor{keywordflow}{return}\ Config.Video.Resolution;\ \}} +\DoxyCodeLine{00103\ \ \ \ \ \textcolor{keyword}{private}:} +\DoxyCodeLine{00104\ \ \ \ \ \ \ \ \ Configuration\ Config;} +\DoxyCodeLine{00105\ \ \ \ \ \ \ \ \ SDL\_Window*\ \ \ Handle;} +\DoxyCodeLine{00106\ \ \ \ \ \ \ \ \ SDL\_GLContext\ Context;} +\DoxyCodeLine{00107\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{bool}\ \ \ \ \ \ \ \ \ \ Open;} +\DoxyCodeLine{00108\ \ \ \ \ \};} +\DoxyCodeLine{00109\ \}} +\DoxyCodeLine{00110\ } +\DoxyCodeLine{00111\ } +\DoxyCodeLine{00112\ } +\DoxyCodeLine{00113\ } +\DoxyCodeLine{00114\ \textcolor{preprocessor}{\#endif\ }\textcolor{comment}{//WINDOW\_H}} + +\end{DoxyCode} diff --git a/Documentation/latex/annotated.tex b/Documentation/latex/annotated.tex new file mode 100644 index 0000000..2d2e491 --- /dev/null +++ b/Documentation/latex/annotated.tex @@ -0,0 +1,26 @@ +\doxysection{Class List} +Here are the classes, structs, unions and interfaces with brief descriptions\+:\begin{DoxyCompactList} +\item\contentsline{section}{\mbox{\hyperlink{class_open_shader_designer_1_1___impl_event_handler}{Open\+Shader\+Designer\+::\+\_\+\+Impl\+Event\+Handler}} \\*Base \doxylink{class_open_shader_designer_1_1_event_handler}{Event\+Handler} for abstraction }{\pageref{class_open_shader_designer_1_1___impl_event_handler}}{} +\item\contentsline{section}{\mbox{\hyperlink{struct_open_shader_designer_1_1_nodes_1_1_math_1_1_add}{Open\+Shader\+Designer\+::\+Nodes\+::\+Math\+::\+Add}} }{\pageref{struct_open_shader_designer_1_1_nodes_1_1_math_1_1_add}}{} +\item\contentsline{section}{\mbox{\hyperlink{class_g_l_w_1_1_buffer_object}{GLW\+::\+Buffer\+Object$<$ T, U, S $>$}} }{\pageref{class_g_l_w_1_1_buffer_object}}{} +\item\contentsline{section}{\mbox{\hyperlink{struct_open_shader_designer_1_1_window_1_1_configuration}{Open\+Shader\+Designer\+::\+Window\+::\+Configuration}} }{\pageref{struct_open_shader_designer_1_1_window_1_1_configuration}}{} +\item\contentsline{section}{\mbox{\hyperlink{class_open_shader_designer_1_1_console}{Open\+Shader\+Designer\+::\+Console}} }{\pageref{class_open_shader_designer_1_1_console}}{} +\item\contentsline{section}{\mbox{\hyperlink{class_open_shader_designer_1_1_console_window}{Open\+Shader\+Designer\+::\+Console\+Window}} }{\pageref{class_open_shader_designer_1_1_console_window}}{} +\item\contentsline{section}{\mbox{\hyperlink{struct_open_shader_designer_1_1_nodes_1_1_math_1_1_constant}{Open\+Shader\+Designer\+::\+Nodes\+::\+Math\+::\+Constant}} }{\pageref{struct_open_shader_designer_1_1_nodes_1_1_math_1_1_constant}}{} +\item\contentsline{section}{\mbox{\hyperlink{class_open_shader_designer_1_1_editor_system}{Open\+Shader\+Designer\+::\+Editor\+System}} }{\pageref{class_open_shader_designer_1_1_editor_system}}{} +\item\contentsline{section}{\mbox{\hyperlink{class_open_shader_designer_1_1_editor_window}{Open\+Shader\+Designer\+::\+Editor\+Window}} \\*\doxylink{class_open_shader_designer_1_1_editor_window}{Editor\+Window} class for wrapping Im\+Gui window functionality }{\pageref{class_open_shader_designer_1_1_editor_window}}{} +\item\contentsline{section}{\mbox{\hyperlink{class_open_shader_designer_1_1_engine}{Open\+Shader\+Designer\+::\+Engine}} }{\pageref{class_open_shader_designer_1_1_engine}}{} +\item\contentsline{section}{\mbox{\hyperlink{struct_open_shader_designer_1_1_event}{Open\+Shader\+Designer\+::\+Event}} \\*Base \doxylink{struct_open_shader_designer_1_1_event}{Event} class for sending events to the \doxylink{class_open_shader_designer_1_1_engine}{Engine} }{\pageref{struct_open_shader_designer_1_1_event}}{} +\item\contentsline{section}{\mbox{\hyperlink{class_open_shader_designer_1_1_event_handler}{Open\+Shader\+Designer\+::\+Event\+Handler$<$ Event\+Type $>$}} \\*\doxylink{class_open_shader_designer_1_1_event_handler}{Event\+Handler} interface for creating custom Event\+Handlers }{\pageref{class_open_shader_designer_1_1_event_handler}}{} +\item\contentsline{section}{\mbox{\hyperlink{class_open_shader_designer_1_1_event_system}{Open\+Shader\+Designer\+::\+Event\+System}} \\*\doxylink{class_open_shader_designer_1_1_event_system}{Event\+System} for posting Events to be handled }{\pageref{class_open_shader_designer_1_1_event_system}}{} +\item\contentsline{section}{\mbox{\hyperlink{struct_open_shader_designer_1_1_pin_ptr_1_1_hash}{Open\+Shader\+Designer\+::\+Pin\+Ptr\+::\+Hash}} }{\pageref{struct_open_shader_designer_1_1_pin_ptr_1_1_hash}}{} +\item\contentsline{section}{\mbox{\hyperlink{class_open_shader_designer_1_1_inspector}{Open\+Shader\+Designer\+::\+Inspector}} }{\pageref{class_open_shader_designer_1_1_inspector}}{} +\item\contentsline{section}{\mbox{\hyperlink{struct_open_shader_designer_1_1_node}{Open\+Shader\+Designer\+::\+Node}} }{\pageref{struct_open_shader_designer_1_1_node}}{} +\item\contentsline{section}{\mbox{\hyperlink{struct_open_shader_designer_1_1_pin}{Open\+Shader\+Designer\+::\+Pin}} }{\pageref{struct_open_shader_designer_1_1_pin}}{} +\item\contentsline{section}{\mbox{\hyperlink{struct_open_shader_designer_1_1_pin_ptr}{Open\+Shader\+Designer\+::\+Pin\+Ptr}} }{\pageref{struct_open_shader_designer_1_1_pin_ptr}}{} +\item\contentsline{section}{\mbox{\hyperlink{class_open_shader_designer_1_1_profiler}{Open\+Shader\+Designer\+::\+Profiler}} }{\pageref{class_open_shader_designer_1_1_profiler}}{} +\item\contentsline{section}{\mbox{\hyperlink{class_open_shader_designer_1_1_renderer}{Open\+Shader\+Designer\+::\+Renderer}} }{\pageref{class_open_shader_designer_1_1_renderer}}{} +\item\contentsline{section}{\mbox{\hyperlink{class_open_shader_designer_1_1_shader_graph}{Open\+Shader\+Designer\+::\+Shader\+Graph}} }{\pageref{class_open_shader_designer_1_1_shader_graph}}{} +\item\contentsline{section}{\mbox{\hyperlink{class_open_shader_designer_1_1_timer}{Open\+Shader\+Designer\+::\+Timer}} }{\pageref{class_open_shader_designer_1_1_timer}}{} +\item\contentsline{section}{\mbox{\hyperlink{class_open_shader_designer_1_1_window}{Open\+Shader\+Designer\+::\+Window}} }{\pageref{class_open_shader_designer_1_1_window}}{} +\end{DoxyCompactList} diff --git a/Documentation/latex/class_any.tex b/Documentation/latex/class_any.tex new file mode 100644 index 0000000..d6d7d86 --- /dev/null +++ b/Documentation/latex/class_any.tex @@ -0,0 +1,7 @@ +\doxysection{Any\texorpdfstring{$<$}{<} Ts \texorpdfstring{$>$}{>} Class Template Reference} +\hypertarget{class_any}{}\label{class_any}\index{Any$<$ Ts $>$@{Any$<$ Ts $>$}} + + +The documentation for this class was generated from the following file\+:\begin{DoxyCompactItemize} +\item +Include/\+Utility/Any.\+h\end{DoxyCompactItemize} diff --git a/Documentation/latex/class_any_3_01_t_00_01_rest_8_8_8_01_4.eps b/Documentation/latex/class_any_3_01_t_00_01_rest_8_8_8_01_4.eps new file mode 100644 index 0000000..15e4b7e --- /dev/null +++ b/Documentation/latex/class_any_3_01_t_00_01_rest_8_8_8_01_4.eps @@ -0,0 +1,197 @@ +%!PS-Adobe-2.0 EPSF-2.0 +%%Title: ClassName +%%Creator: Doxygen +%%CreationDate: Time +%%For: +%Magnification: 1.00 +%%Orientation: Portrait +%%BoundingBox: 0 0 500 336.134460 +%%Pages: 0 +%%BeginSetup +%%EndSetup +%%EndComments + +% ----- variables ----- + +/boxwidth 0 def +/boxheight 40 def +/fontheight 24 def +/marginwidth 10 def +/distx 20 def +/disty 40 def +/boundaspect 1.487500 def % aspect ratio of the BoundingBox (width/height) +/boundx 500 def +/boundy boundx boundaspect div def +/xspacing 0 def +/yspacing 0 def +/rows 2 def +/cols 1 def +/scalefactor 0 def +/boxfont /Times-Roman findfont fontheight scalefont def + +% ----- procedures ----- + +/dotted { [1 4] 0 setdash } def +/dashed { [5] 0 setdash } def +/solid { [] 0 setdash } def + +/max % result = MAX(arg1,arg2) +{ + /a exch def + /b exch def + a b gt {a} {b} ifelse +} def + +/xoffset % result = MAX(0,(scalefactor-(boxwidth*cols+distx*(cols-1)))/2) +{ + 0 scalefactor boxwidth cols mul distx cols 1 sub mul add sub 2 div max +} def + +/cw % boxwidth = MAX(boxwidth, stringwidth(arg1)) +{ + /str exch def + /boxwidth boxwidth str stringwidth pop max def +} def + +/box % draws a box with text 'arg1' at grid pos (arg2,arg3) +{ gsave + 2 setlinewidth + newpath + exch xspacing mul xoffset add + exch yspacing mul + moveto + boxwidth 0 rlineto + 0 boxheight rlineto + boxwidth neg 0 rlineto + 0 boxheight neg rlineto + closepath + dup stringwidth pop neg boxwidth add 2 div + boxheight fontheight 2 div sub 2 div + rmoveto show stroke + grestore +} def + +/mark +{ newpath + exch xspacing mul xoffset add boxwidth add + exch yspacing mul + moveto + 0 boxheight 4 div rlineto + boxheight neg 4 div boxheight neg 4 div rlineto + closepath + eofill + stroke +} def + +/arrow +{ newpath + moveto + 3 -8 rlineto + -6 0 rlineto + 3 8 rlineto + closepath + eofill + stroke +} def + +/out % draws an output connector for the block at (arg1,arg2) +{ + newpath + exch xspacing mul xoffset add boxwidth 2 div add + exch yspacing mul boxheight add + /y exch def + /x exch def + x y moveto + 0 disty 2 div rlineto + stroke + 1 eq { x y disty 2 div add arrow } if +} def + +/in % draws an input connector for the block at (arg1,arg2) +{ + newpath + exch xspacing mul xoffset add boxwidth 2 div add + exch yspacing mul disty 2 div sub + /y exch def + /x exch def + x y moveto + 0 disty 2 div rlineto + stroke + 1 eq { x y disty 2 div add arrow } if +} def + +/hedge +{ + exch xspacing mul xoffset add boxwidth 2 div add + exch yspacing mul boxheight 2 div sub + /y exch def + /x exch def + newpath + x y moveto + boxwidth 2 div distx add 0 rlineto + stroke + 1 eq + { newpath x boxwidth 2 div distx add add y moveto + -8 3 rlineto + 0 -6 rlineto + 8 3 rlineto + closepath + eofill + stroke + } if +} def + +/vedge +{ + /ye exch def + /ys exch def + /xs exch def + newpath + xs xspacing mul xoffset add boxwidth 2 div add dup + ys yspacing mul boxheight 2 div sub + moveto + ye yspacing mul boxheight 2 div sub + lineto + stroke +} def + +/conn % connections the blocks from col 'arg1' to 'arg2' of row 'arg3' +{ + /ys exch def + /xe exch def + /xs exch def + newpath + xs xspacing mul xoffset add boxwidth 2 div add + ys yspacing mul disty 2 div sub + moveto + xspacing xe xs sub mul 0 + rlineto + stroke +} def + +% ----- main ------ + +boxfont setfont +1 boundaspect scale +(Any< T, Rest... >) cw +(Any< Rest... >) cw +/boxwidth boxwidth marginwidth 2 mul add def +/xspacing boxwidth distx add def +/yspacing boxheight disty add def +/scalefactor + boxwidth cols mul distx cols 1 sub mul add + boxheight rows mul disty rows 1 sub mul add boundaspect mul + max def +boundx scalefactor div boundy scalefactor div scale + +% ----- classes ----- + + (Any< T, Rest... >) 0.000000 0.000000 box + (Any< Rest... >) 0.000000 1.000000 box + +% ----- relations ----- + +solid +0 0.000000 0.000000 out +solid +1 0.000000 1.000000 in diff --git a/Documentation/latex/class_any_3_01_t_00_01_rest_8_8_8_01_4.tex b/Documentation/latex/class_any_3_01_t_00_01_rest_8_8_8_01_4.tex new file mode 100644 index 0000000..9351162 --- /dev/null +++ b/Documentation/latex/class_any_3_01_t_00_01_rest_8_8_8_01_4.tex @@ -0,0 +1,66 @@ +\doxysection{Any\texorpdfstring{$<$}{<} T, Rest... \texorpdfstring{$>$}{>} Class Template Reference} +\hypertarget{class_any_3_01_t_00_01_rest_8_8_8_01_4}{}\label{class_any_3_01_t_00_01_rest_8_8_8_01_4}\index{Any$<$ T, Rest... $>$@{Any$<$ T, Rest... $>$}} + + +Package multiple types into a single variable, useful for instances where a value may be multiple types. + + + + +{\ttfamily \#include $<$Any.\+h$>$} + +Inheritance diagram for Any\texorpdfstring{$<$}{<} T, Rest... \texorpdfstring{$>$}{>}\+:\begin{figure}[H] +\begin{center} +\leavevmode +\includegraphics[height=2.000000cm]{class_any_3_01_t_00_01_rest_8_8_8_01_4} +\end{center} +\end{figure} +\doxysubsubsection*{Public Member Functions} +\begin{DoxyCompactItemize} +\item +\Hypertarget{class_any_3_01_t_00_01_rest_8_8_8_01_4_a516f589e8812eea947648bfb4d33e8b6}\label{class_any_3_01_t_00_01_rest_8_8_8_01_4_a516f589e8812eea947648bfb4d33e8b6} +{\bfseries Any} (const This\+Type \&value, const Rest \&...other) +\item +\Hypertarget{class_any_3_01_t_00_01_rest_8_8_8_01_4_a777fd7faf0b62c3a0117528c227f1d8d}\label{class_any_3_01_t_00_01_rest_8_8_8_01_4_a777fd7faf0b62c3a0117528c227f1d8d} +{\bfseries Any} (This\+Type \&\&value, Rest \&\&...other) +\item +\Hypertarget{class_any_3_01_t_00_01_rest_8_8_8_01_4_a426b897700aff012363ea9200a3776b3}\label{class_any_3_01_t_00_01_rest_8_8_8_01_4_a426b897700aff012363ea9200a3776b3} +{\bfseries Any} (const \mbox{\hyperlink{class_any}{Any}} \&other)=default +\item +\Hypertarget{class_any_3_01_t_00_01_rest_8_8_8_01_4_a57419a9ff5f78e792f332b0701d2717f}\label{class_any_3_01_t_00_01_rest_8_8_8_01_4_a57419a9ff5f78e792f332b0701d2717f} +{\bfseries Any} (\mbox{\hyperlink{class_any}{Any}} \&\&other)=default +\item +\Hypertarget{class_any_3_01_t_00_01_rest_8_8_8_01_4_a3e7c3c9089107c7eff8e00af678df00a}\label{class_any_3_01_t_00_01_rest_8_8_8_01_4_a3e7c3c9089107c7eff8e00af678df00a} +\mbox{\hyperlink{class_any}{Any}} \& {\bfseries operator=} (const \mbox{\hyperlink{class_any}{Any}} \&)=default +\item +\Hypertarget{class_any_3_01_t_00_01_rest_8_8_8_01_4_ad73121e0262892162aa58d33a10d0de6}\label{class_any_3_01_t_00_01_rest_8_8_8_01_4_ad73121e0262892162aa58d33a10d0de6} +\mbox{\hyperlink{class_any}{Any}} \& {\bfseries operator=} (\mbox{\hyperlink{class_any}{Any}} \&\&)=default +\item +\Hypertarget{class_any_3_01_t_00_01_rest_8_8_8_01_4_a61a686f88d35bc2bb418d01271f7837c}\label{class_any_3_01_t_00_01_rest_8_8_8_01_4_a61a686f88d35bc2bb418d01271f7837c} +{\bfseries operator This\+Type} () const +\item +\Hypertarget{class_any_3_01_t_00_01_rest_8_8_8_01_4_a705946411d31067238aa615f64e58fbc}\label{class_any_3_01_t_00_01_rest_8_8_8_01_4_a705946411d31067238aa615f64e58fbc} +{\bfseries operator This\+Type \&} () +\item +\Hypertarget{class_any_3_01_t_00_01_rest_8_8_8_01_4_ae912c7de87c0835463b5439530b60cfb}\label{class_any_3_01_t_00_01_rest_8_8_8_01_4_ae912c7de87c0835463b5439530b60cfb} +{\bfseries operator const This\+Type \&} () const +\item +\Hypertarget{class_any_3_01_t_00_01_rest_8_8_8_01_4_acee4d61d7ab263ea7200663df092d2d2}\label{class_any_3_01_t_00_01_rest_8_8_8_01_4_acee4d61d7ab263ea7200663df092d2d2} +{\bfseries operator This\+Type \&\&} () +\item +\Hypertarget{class_any_3_01_t_00_01_rest_8_8_8_01_4_a194a2d5c210bdb17cf5b4fac7d71fba7}\label{class_any_3_01_t_00_01_rest_8_8_8_01_4_a194a2d5c210bdb17cf5b4fac7d71fba7} +{\bfseries operator This\+Type \texorpdfstring{$\ast$}{*}} () +\item +\Hypertarget{class_any_3_01_t_00_01_rest_8_8_8_01_4_a22a3125c29bea1bc53ab1b3c3499ee8e}\label{class_any_3_01_t_00_01_rest_8_8_8_01_4_a22a3125c29bea1bc53ab1b3c3499ee8e} +{\bfseries operator const This\+Type \texorpdfstring{$\ast$}{*}} () const +\end{DoxyCompactItemize} + + +\doxysubsection{Detailed Description} +\subsubsection*{template$<$typename T, typename... Rest$>$\newline +class Any$<$ T, Rest... $>$} +Package multiple types into a single variable, useful for instances where a value may be multiple types. + +The documentation for this class was generated from the following file\+:\begin{DoxyCompactItemize} +\item +Include/\+Utility/Any.\+h\end{DoxyCompactItemize} diff --git a/Documentation/latex/class_any_3_4.tex b/Documentation/latex/class_any_3_4.tex new file mode 100644 index 0000000..a4d4421 --- /dev/null +++ b/Documentation/latex/class_any_3_4.tex @@ -0,0 +1,7 @@ +\doxysection{Any\texorpdfstring{$<$}{<}\texorpdfstring{$>$}{>} Class Reference} +\hypertarget{class_any_3_4}{}\label{class_any_3_4}\index{Any$<$$>$@{Any$<$$>$}} + + +The documentation for this class was generated from the following file\+:\begin{DoxyCompactItemize} +\item +Include/\+Utility/Any.\+h\end{DoxyCompactItemize} diff --git a/Documentation/latex/class_directed_graph.tex b/Documentation/latex/class_directed_graph.tex new file mode 100644 index 0000000..cfc38af --- /dev/null +++ b/Documentation/latex/class_directed_graph.tex @@ -0,0 +1,80 @@ +\doxysection{Directed\+Graph\texorpdfstring{$<$}{<} T \texorpdfstring{$>$}{>} Class Template Reference} +\hypertarget{class_directed_graph}{}\label{class_directed_graph}\index{DirectedGraph$<$ T $>$@{DirectedGraph$<$ T $>$}} +\doxysubsubsection*{Classes} +\begin{DoxyCompactItemize} +\item +class \mbox{\hyperlink{class_directed_graph_1_1_breadth_first}{Breadth\+First}} +\item +class \mbox{\hyperlink{class_directed_graph_1_1_in_order}{In\+Order}} +\item +class \mbox{\hyperlink{class_directed_graph_1_1_post_order}{Post\+Order}} +\item +class \mbox{\hyperlink{class_directed_graph_1_1_pre_order}{Pre\+Order}} +\item +class \mbox{\hyperlink{class_directed_graph_1_1_traverser}{Traverser}} +\end{DoxyCompactItemize} +\doxysubsubsection*{Public Types} +\begin{DoxyCompactItemize} +\item +\Hypertarget{class_directed_graph_aa809ed501f418a4dbe7b72efddc095ec}\label{class_directed_graph_aa809ed501f418a4dbe7b72efddc095ec} +using {\bfseries Data\+Type} = T +\item +\Hypertarget{class_directed_graph_a5ffe130ff8dad45a955446718f0e1db4}\label{class_directed_graph_a5ffe130ff8dad45a955446718f0e1db4} +using {\bfseries Node} = uint32\+\_\+t +\item +\Hypertarget{class_directed_graph_a738b5e4ca65142a05310ebbfbb9fee3b}\label{class_directed_graph_a738b5e4ca65142a05310ebbfbb9fee3b} +using {\bfseries Node\+Queue} = std\+::deque$<$Node$>$ +\end{DoxyCompactItemize} +\doxysubsubsection*{Public Member Functions} +\begin{DoxyCompactItemize} +\item +\Hypertarget{class_directed_graph_a6d87b77efb284cadb6176d221a493408}\label{class_directed_graph_a6d87b77efb284cadb6176d221a493408} +Node {\bfseries Parent} (Node node) const +\item +\Hypertarget{class_directed_graph_a127158a921ffe739e1202bebde709d38}\label{class_directed_graph_a127158a921ffe739e1202bebde709d38} +Node {\bfseries First\+Child} (Node node) const +\item +\Hypertarget{class_directed_graph_a64501efa2fd518b6c863f39074f4fb8c}\label{class_directed_graph_a64501efa2fd518b6c863f39074f4fb8c} +Node {\bfseries Next\+Sibling} (Node node) const +\item +\Hypertarget{class_directed_graph_afd96f1cf738e23ab2363189680df26a3}\label{class_directed_graph_afd96f1cf738e23ab2363189680df26a3} +Node {\bfseries Left\+Most} (Node node) const +\item +\Hypertarget{class_directed_graph_a2ae8657ce1bf390ff0f0a854d945c524}\label{class_directed_graph_a2ae8657ce1bf390ff0f0a854d945c524} +uint32\+\_\+t {\bfseries Depth} (Node node) const +\item +\Hypertarget{class_directed_graph_a48ac253ed873b53fea69a0f218ccb71b}\label{class_directed_graph_a48ac253ed873b53fea69a0f218ccb71b} +Node {\bfseries Insert} (const Data\+Type \&data, Node parent) +\item +\Hypertarget{class_directed_graph_a8d003103f1a8367a13f39ad75fee1b3a}\label{class_directed_graph_a8d003103f1a8367a13f39ad75fee1b3a} +void {\bfseries Erase} (Node node) +\item +\Hypertarget{class_directed_graph_a1a03e1a70e9f89c4962bac58900f5211}\label{class_directed_graph_a1a03e1a70e9f89c4962bac58900f5211} +Data\+Type \& {\bfseries operator\mbox{[}$\,$\mbox{]}} (Node node) +\item +\Hypertarget{class_directed_graph_acf2b47ac25e3fe4f6712c41822086d41}\label{class_directed_graph_acf2b47ac25e3fe4f6712c41822086d41} +const Data\+Type \& {\bfseries operator\mbox{[}$\,$\mbox{]}} (Node node) const +\item +\Hypertarget{class_directed_graph_a6ea605fcb6884c8fe31c7de9ffd1f764}\label{class_directed_graph_a6ea605fcb6884c8fe31c7de9ffd1f764} +{\footnotesize template$<$typename V , typename O $>$ }\\void {\bfseries Traverse} (V \&visitor) +\end{DoxyCompactItemize} +\doxysubsubsection*{Friends} +\begin{DoxyCompactItemize} +\item +\Hypertarget{class_directed_graph_a286a665c131525fe4b907a4da94634b4}\label{class_directed_graph_a286a665c131525fe4b907a4da94634b4} +class {\bfseries Breadth\+First} +\item +\Hypertarget{class_directed_graph_a017d5b5291951a2705cad0fb52dd231f}\label{class_directed_graph_a017d5b5291951a2705cad0fb52dd231f} +class {\bfseries Pre\+Order} +\item +\Hypertarget{class_directed_graph_a3434ce1356b6d21582e02a0a2ce278f0}\label{class_directed_graph_a3434ce1356b6d21582e02a0a2ce278f0} +class {\bfseries In\+Order} +\item +\Hypertarget{class_directed_graph_a3717c020ac7d256d52e1b5b484433661}\label{class_directed_graph_a3717c020ac7d256d52e1b5b484433661} +class {\bfseries Post\+Order} +\end{DoxyCompactItemize} + + +The documentation for this class was generated from the following file\+:\begin{DoxyCompactItemize} +\item +Include/\+Utility/Directed\+Graph.\+h\end{DoxyCompactItemize} diff --git a/Documentation/latex/class_directed_graph_1_1_breadth_first.tex b/Documentation/latex/class_directed_graph_1_1_breadth_first.tex new file mode 100644 index 0000000..165ced5 --- /dev/null +++ b/Documentation/latex/class_directed_graph_1_1_breadth_first.tex @@ -0,0 +1,16 @@ +\doxysection{Directed\+Graph\texorpdfstring{$<$}{<} T \texorpdfstring{$>$}{>}\+::Breadth\+First Class Reference} +\hypertarget{class_directed_graph_1_1_breadth_first}{}\label{class_directed_graph_1_1_breadth_first}\index{DirectedGraph$<$ T $>$::BreadthFirst@{DirectedGraph$<$ T $>$::BreadthFirst}} +\doxysubsubsection*{Public Member Functions} +\begin{DoxyCompactItemize} +\item +\Hypertarget{class_directed_graph_1_1_breadth_first_a351b555c741dd4a140b95704276a0001}\label{class_directed_graph_1_1_breadth_first_a351b555c741dd4a140b95704276a0001} +{\bfseries Breadth\+First} (\mbox{\hyperlink{class_directed_graph}{Directed\+Graph}} \&graph) +\item +\Hypertarget{class_directed_graph_1_1_breadth_first_aa97246390d5e8033a56f85d72541aa68}\label{class_directed_graph_1_1_breadth_first_aa97246390d5e8033a56f85d72541aa68} +Node {\bfseries operator()} (Node node) +\end{DoxyCompactItemize} + + +The documentation for this class was generated from the following file\+:\begin{DoxyCompactItemize} +\item +Include/\+Utility/Directed\+Graph.\+h\end{DoxyCompactItemize} diff --git a/Documentation/latex/class_directed_graph_1_1_in_order.tex b/Documentation/latex/class_directed_graph_1_1_in_order.tex new file mode 100644 index 0000000..7ab4ed4 --- /dev/null +++ b/Documentation/latex/class_directed_graph_1_1_in_order.tex @@ -0,0 +1,16 @@ +\doxysection{Directed\+Graph\texorpdfstring{$<$}{<} T \texorpdfstring{$>$}{>}\+::In\+Order Class Reference} +\hypertarget{class_directed_graph_1_1_in_order}{}\label{class_directed_graph_1_1_in_order}\index{DirectedGraph$<$ T $>$::InOrder@{DirectedGraph$<$ T $>$::InOrder}} +\doxysubsubsection*{Public Member Functions} +\begin{DoxyCompactItemize} +\item +\Hypertarget{class_directed_graph_1_1_in_order_ae5e4bd25590510fef48e51f9c9458516}\label{class_directed_graph_1_1_in_order_ae5e4bd25590510fef48e51f9c9458516} +{\bfseries In\+Order} (\mbox{\hyperlink{class_directed_graph}{Directed\+Graph}} \&graph) +\item +\Hypertarget{class_directed_graph_1_1_in_order_a9e5a6bff3d68625ab93d9d6f93bbf2c3}\label{class_directed_graph_1_1_in_order_a9e5a6bff3d68625ab93d9d6f93bbf2c3} +Node {\bfseries operator()} (Node node) +\end{DoxyCompactItemize} + + +The documentation for this class was generated from the following file\+:\begin{DoxyCompactItemize} +\item +Include/\+Utility/Directed\+Graph.\+h\end{DoxyCompactItemize} diff --git a/Documentation/latex/class_directed_graph_1_1_post_order.tex b/Documentation/latex/class_directed_graph_1_1_post_order.tex new file mode 100644 index 0000000..2ea4702 --- /dev/null +++ b/Documentation/latex/class_directed_graph_1_1_post_order.tex @@ -0,0 +1,16 @@ +\doxysection{Directed\+Graph\texorpdfstring{$<$}{<} T \texorpdfstring{$>$}{>}\+::Post\+Order Class Reference} +\hypertarget{class_directed_graph_1_1_post_order}{}\label{class_directed_graph_1_1_post_order}\index{DirectedGraph$<$ T $>$::PostOrder@{DirectedGraph$<$ T $>$::PostOrder}} +\doxysubsubsection*{Public Member Functions} +\begin{DoxyCompactItemize} +\item +\Hypertarget{class_directed_graph_1_1_post_order_af66a6ce6d497e8a43981b89beeb5b720}\label{class_directed_graph_1_1_post_order_af66a6ce6d497e8a43981b89beeb5b720} +{\bfseries Post\+Order} (\mbox{\hyperlink{class_directed_graph}{Directed\+Graph}} \&graph) +\item +\Hypertarget{class_directed_graph_1_1_post_order_aa68d9b2f39e572d246a232db70479fe1}\label{class_directed_graph_1_1_post_order_aa68d9b2f39e572d246a232db70479fe1} +Node {\bfseries operator()} (Node node) +\end{DoxyCompactItemize} + + +The documentation for this class was generated from the following file\+:\begin{DoxyCompactItemize} +\item +Include/\+Utility/Directed\+Graph.\+h\end{DoxyCompactItemize} diff --git a/Documentation/latex/class_directed_graph_1_1_pre_order.tex b/Documentation/latex/class_directed_graph_1_1_pre_order.tex new file mode 100644 index 0000000..8472854 --- /dev/null +++ b/Documentation/latex/class_directed_graph_1_1_pre_order.tex @@ -0,0 +1,16 @@ +\doxysection{Directed\+Graph\texorpdfstring{$<$}{<} T \texorpdfstring{$>$}{>}\+::Pre\+Order Class Reference} +\hypertarget{class_directed_graph_1_1_pre_order}{}\label{class_directed_graph_1_1_pre_order}\index{DirectedGraph$<$ T $>$::PreOrder@{DirectedGraph$<$ T $>$::PreOrder}} +\doxysubsubsection*{Public Member Functions} +\begin{DoxyCompactItemize} +\item +\Hypertarget{class_directed_graph_1_1_pre_order_ac31d7f51818b1575c8739105dfdcbcee}\label{class_directed_graph_1_1_pre_order_ac31d7f51818b1575c8739105dfdcbcee} +{\bfseries Pre\+Order} (\mbox{\hyperlink{class_directed_graph}{Directed\+Graph}} \&graph) +\item +\Hypertarget{class_directed_graph_1_1_pre_order_a1f89a2ee5e5a40ec12953296240ddd17}\label{class_directed_graph_1_1_pre_order_a1f89a2ee5e5a40ec12953296240ddd17} +Node {\bfseries operator()} (Node node) +\end{DoxyCompactItemize} + + +The documentation for this class was generated from the following file\+:\begin{DoxyCompactItemize} +\item +Include/\+Utility/Directed\+Graph.\+h\end{DoxyCompactItemize} diff --git a/Documentation/latex/class_directed_graph_1_1_traverser.tex b/Documentation/latex/class_directed_graph_1_1_traverser.tex new file mode 100644 index 0000000..ef58620 --- /dev/null +++ b/Documentation/latex/class_directed_graph_1_1_traverser.tex @@ -0,0 +1,25 @@ +\doxysection{Directed\+Graph\texorpdfstring{$<$}{<} T \texorpdfstring{$>$}{>}\+::Traverser\texorpdfstring{$<$}{<} V, O \texorpdfstring{$>$}{>} Class Template Reference} +\hypertarget{class_directed_graph_1_1_traverser}{}\label{class_directed_graph_1_1_traverser}\index{DirectedGraph$<$ T $>$::Traverser$<$ V, O $>$@{DirectedGraph$<$ T $>$::Traverser$<$ V, O $>$}} +\doxysubsubsection*{Public Types} +\begin{DoxyCompactItemize} +\item +\Hypertarget{class_directed_graph_1_1_traverser_adad6b3bcfd320a46f7a293cfa4daf566}\label{class_directed_graph_1_1_traverser_adad6b3bcfd320a46f7a293cfa4daf566} +using {\bfseries Visitor\+Type} = V +\item +\Hypertarget{class_directed_graph_1_1_traverser_ab6155602c07533263b81175f49b73568}\label{class_directed_graph_1_1_traverser_ab6155602c07533263b81175f49b73568} +using {\bfseries Order\+Type} = O +\end{DoxyCompactItemize} +\doxysubsubsection*{Public Member Functions} +\begin{DoxyCompactItemize} +\item +\Hypertarget{class_directed_graph_1_1_traverser_a707baaa9f5b62eb9aef2a658aaaa3df7}\label{class_directed_graph_1_1_traverser_a707baaa9f5b62eb9aef2a658aaaa3df7} +{\bfseries Traverser} (\mbox{\hyperlink{class_directed_graph}{Directed\+Graph}} \&graph, Visitor\+Type \&visitor) +\item +\Hypertarget{class_directed_graph_1_1_traverser_a1d5dc57bac57dc71aa2341dafc2ca1f9}\label{class_directed_graph_1_1_traverser_a1d5dc57bac57dc71aa2341dafc2ca1f9} +void {\bfseries operator()} () +\end{DoxyCompactItemize} + + +The documentation for this class was generated from the following file\+:\begin{DoxyCompactItemize} +\item +Include/\+Utility/Directed\+Graph.\+h\end{DoxyCompactItemize} diff --git a/Documentation/latex/class_g_l_w_1_1_buffer_object.tex b/Documentation/latex/class_g_l_w_1_1_buffer_object.tex new file mode 100644 index 0000000..abf2715 --- /dev/null +++ b/Documentation/latex/class_g_l_w_1_1_buffer_object.tex @@ -0,0 +1,69 @@ +\doxysection{GLW\+::Buffer\+Object\texorpdfstring{$<$}{<} T, U, S \texorpdfstring{$>$}{>} Class Template Reference} +\hypertarget{class_g_l_w_1_1_buffer_object}{}\label{class_g_l_w_1_1_buffer_object}\index{GLW::BufferObject$<$ T, U, S $>$@{GLW::BufferObject$<$ T, U, S $>$}} +\doxysubsubsection*{Public Member Functions} +\begin{DoxyCompactItemize} +\item +\mbox{\hyperlink{class_g_l_w_1_1_buffer_object_a965f2c34ca5291ae351bb32226a1bed8}{Buffer\+Object}} (SizeT size, void \texorpdfstring{$\ast$}{*}data=nullptr) +\begin{DoxyCompactList}\small\item\em \doxylink{class_g_l_w_1_1_buffer_object}{Buffer\+Object} constructor. \end{DoxyCompactList}\item +\Hypertarget{class_g_l_w_1_1_buffer_object_a57351dac9127dc4dab26ab1b991ec79f}\label{class_g_l_w_1_1_buffer_object_a57351dac9127dc4dab26ab1b991ec79f} +{\bfseries Buffer\+Object} (\mbox{\hyperlink{class_g_l_w_1_1_buffer_object}{Buffer\+Object}} \&\&other) +\begin{DoxyCompactList}\small\item\em Move Constructor. \end{DoxyCompactList}\item +\Hypertarget{class_g_l_w_1_1_buffer_object_a16dc15b38a5c5d47b36c449d5945bd7a}\label{class_g_l_w_1_1_buffer_object_a16dc15b38a5c5d47b36c449d5945bd7a} +{\bfseries Buffer\+Object} (const \mbox{\hyperlink{class_g_l_w_1_1_buffer_object}{Buffer\+Object}} \&other) +\begin{DoxyCompactList}\small\item\em Copy Constructor. \end{DoxyCompactList}\item +\Hypertarget{class_g_l_w_1_1_buffer_object_aa9eedd875b7ea8f657e58452f61e643d}\label{class_g_l_w_1_1_buffer_object_aa9eedd875b7ea8f657e58452f61e643d} +{\bfseries \texorpdfstring{$\sim$}{\string~}\+Buffer\+Object} () +\begin{DoxyCompactList}\small\item\em Destructor. \end{DoxyCompactList}\item +\Hypertarget{class_g_l_w_1_1_buffer_object_a5d780b73c735d1a17dddd5bf67c8c0df}\label{class_g_l_w_1_1_buffer_object_a5d780b73c735d1a17dddd5bf67c8c0df} +{\bfseries operator bool} () const +\begin{DoxyCompactList}\small\item\em Validity test. \end{DoxyCompactList}\item +\Hypertarget{class_g_l_w_1_1_buffer_object_a837d2b9cf2b2b4eaffa20d5c984ec1b0}\label{class_g_l_w_1_1_buffer_object_a837d2b9cf2b2b4eaffa20d5c984ec1b0} +\mbox{\hyperlink{class_g_l_w_1_1_buffer_object}{Buffer\+Object}} \& {\bfseries operator=} (const \mbox{\hyperlink{class_g_l_w_1_1_buffer_object}{Buffer\+Object}} \&other) +\begin{DoxyCompactList}\small\item\em Copy Assignment. \end{DoxyCompactList}\item +\Hypertarget{class_g_l_w_1_1_buffer_object_a5911e71647b4b45831751f4e150ff032}\label{class_g_l_w_1_1_buffer_object_a5911e71647b4b45831751f4e150ff032} +\mbox{\hyperlink{class_g_l_w_1_1_buffer_object}{Buffer\+Object}} \& {\bfseries operator=} (\mbox{\hyperlink{class_g_l_w_1_1_buffer_object}{Buffer\+Object}} \&\&other) noexcept +\begin{DoxyCompactList}\small\item\em Move Assignment. \end{DoxyCompactList}\item +\Hypertarget{class_g_l_w_1_1_buffer_object_ad636d87c35176f626b35362ff0d46b0d}\label{class_g_l_w_1_1_buffer_object_ad636d87c35176f626b35362ff0d46b0d} +SizeT {\bfseries Size} () const +\item +\Hypertarget{class_g_l_w_1_1_buffer_object_ab0c82441f152ebc87799a2965e97fd62}\label{class_g_l_w_1_1_buffer_object_ab0c82441f152ebc87799a2965e97fd62} +void {\bfseries Resize} (SizeT size) +\end{DoxyCompactItemize} +\doxysubsubsection*{Static Public Attributes} +\begin{DoxyCompactItemize} +\item +\Hypertarget{class_g_l_w_1_1_buffer_object_a6c6e041c9d6917fad58ccc69d08a0924}\label{class_g_l_w_1_1_buffer_object_a6c6e041c9d6917fad58ccc69d08a0924} +static constexpr Buffer\+Type {\bfseries Type} = T +\item +\Hypertarget{class_g_l_w_1_1_buffer_object_ae738cca2b4de888820301ce23f41f354}\label{class_g_l_w_1_1_buffer_object_ae738cca2b4de888820301ce23f41f354} +static constexpr Buffer\+Usage {\bfseries Usage} = U +\item +\Hypertarget{class_g_l_w_1_1_buffer_object_a3c4aba391b5ff94e0e6845c3d4ef2e55}\label{class_g_l_w_1_1_buffer_object_a3c4aba391b5ff94e0e6845c3d4ef2e55} +static constexpr Buffer\+Storage {\bfseries Storage} = S +\end{DoxyCompactItemize} + + +\doxysubsection{Constructor \& Destructor Documentation} +\Hypertarget{class_g_l_w_1_1_buffer_object_a965f2c34ca5291ae351bb32226a1bed8}\index{GLW::BufferObject$<$ T, U, S $>$@{GLW::BufferObject$<$ T, U, S $>$}!BufferObject@{BufferObject}} +\index{BufferObject@{BufferObject}!GLW::BufferObject$<$ T, U, S $>$@{GLW::BufferObject$<$ T, U, S $>$}} +\doxysubsubsection{\texorpdfstring{BufferObject()}{BufferObject()}} +{\footnotesize\ttfamily \label{class_g_l_w_1_1_buffer_object_a965f2c34ca5291ae351bb32226a1bed8} +template$<$Buffer\+Type T, Buffer\+Usage U, Buffer\+Storage S$>$ \\ +\mbox{\hyperlink{class_g_l_w_1_1_buffer_object}{GLW\+::\+Buffer\+Object}}$<$ T, U, S $>$\+::\+Buffer\+Object (\begin{DoxyParamCaption}\item[{SizeT}]{size}{, }\item[{void \texorpdfstring{$\ast$}{*}}]{data}{ = {\ttfamily nullptr}}\end{DoxyParamCaption})} + + + +\doxylink{class_g_l_w_1_1_buffer_object}{Buffer\+Object} constructor. + + +\begin{DoxyParams}{Parameters} +{\em size} & Size in bytes of the Buffer \\ +\hline +{\em data} & Data to be used as the initial contents of the Buffer \\ +\hline +\end{DoxyParams} + + +The documentation for this class was generated from the following file\+:\begin{DoxyCompactItemize} +\item +Include/\+Open\+GL/Buffer\+Object.\+h\end{DoxyCompactItemize} diff --git a/Documentation/latex/class_open_shader_designer_1_1___impl_event_handler.eps b/Documentation/latex/class_open_shader_designer_1_1___impl_event_handler.eps new file mode 100644 index 0000000..d6f3e43 --- /dev/null +++ b/Documentation/latex/class_open_shader_designer_1_1___impl_event_handler.eps @@ -0,0 +1,219 @@ +%!PS-Adobe-2.0 EPSF-2.0 +%%Title: ClassName +%%Creator: Doxygen +%%CreationDate: Time +%%For: +%Magnification: 1.00 +%%Orientation: Portrait +%%BoundingBox: 0 0 500 62.893082 +%%Pages: 0 +%%BeginSetup +%%EndSetup +%%EndComments + +% ----- variables ----- + +/boxwidth 0 def +/boxheight 40 def +/fontheight 24 def +/marginwidth 10 def +/distx 20 def +/disty 40 def +/boundaspect 7.950000 def % aspect ratio of the BoundingBox (width/height) +/boundx 500 def +/boundy boundx boundaspect div def +/xspacing 0 def +/yspacing 0 def +/rows 3 def +/cols 3 def +/scalefactor 0 def +/boxfont /Times-Roman findfont fontheight scalefont def + +% ----- procedures ----- + +/dotted { [1 4] 0 setdash } def +/dashed { [5] 0 setdash } def +/solid { [] 0 setdash } def + +/max % result = MAX(arg1,arg2) +{ + /a exch def + /b exch def + a b gt {a} {b} ifelse +} def + +/xoffset % result = MAX(0,(scalefactor-(boxwidth*cols+distx*(cols-1)))/2) +{ + 0 scalefactor boxwidth cols mul distx cols 1 sub mul add sub 2 div max +} def + +/cw % boxwidth = MAX(boxwidth, stringwidth(arg1)) +{ + /str exch def + /boxwidth boxwidth str stringwidth pop max def +} def + +/box % draws a box with text 'arg1' at grid pos (arg2,arg3) +{ gsave + 2 setlinewidth + newpath + exch xspacing mul xoffset add + exch yspacing mul + moveto + boxwidth 0 rlineto + 0 boxheight rlineto + boxwidth neg 0 rlineto + 0 boxheight neg rlineto + closepath + dup stringwidth pop neg boxwidth add 2 div + boxheight fontheight 2 div sub 2 div + rmoveto show stroke + grestore +} def + +/mark +{ newpath + exch xspacing mul xoffset add boxwidth add + exch yspacing mul + moveto + 0 boxheight 4 div rlineto + boxheight neg 4 div boxheight neg 4 div rlineto + closepath + eofill + stroke +} def + +/arrow +{ newpath + moveto + 3 -8 rlineto + -6 0 rlineto + 3 8 rlineto + closepath + eofill + stroke +} def + +/out % draws an output connector for the block at (arg1,arg2) +{ + newpath + exch xspacing mul xoffset add boxwidth 2 div add + exch yspacing mul boxheight add + /y exch def + /x exch def + x y moveto + 0 disty 2 div rlineto + stroke + 1 eq { x y disty 2 div add arrow } if +} def + +/in % draws an input connector for the block at (arg1,arg2) +{ + newpath + exch xspacing mul xoffset add boxwidth 2 div add + exch yspacing mul disty 2 div sub + /y exch def + /x exch def + x y moveto + 0 disty 2 div rlineto + stroke + 1 eq { x y disty 2 div add arrow } if +} def + +/hedge +{ + exch xspacing mul xoffset add boxwidth 2 div add + exch yspacing mul boxheight 2 div sub + /y exch def + /x exch def + newpath + x y moveto + boxwidth 2 div distx add 0 rlineto + stroke + 1 eq + { newpath x boxwidth 2 div distx add add y moveto + -8 3 rlineto + 0 -6 rlineto + 8 3 rlineto + closepath + eofill + stroke + } if +} def + +/vedge +{ + /ye exch def + /ys exch def + /xs exch def + newpath + xs xspacing mul xoffset add boxwidth 2 div add dup + ys yspacing mul boxheight 2 div sub + moveto + ye yspacing mul boxheight 2 div sub + lineto + stroke +} def + +/conn % connections the blocks from col 'arg1' to 'arg2' of row 'arg3' +{ + /ys exch def + /xe exch def + /xs exch def + newpath + xs xspacing mul xoffset add boxwidth 2 div add + ys yspacing mul disty 2 div sub + moveto + xspacing xe xs sub mul 0 + rlineto + stroke +} def + +% ----- main ------ + +boxfont setfont +1 boundaspect scale +(OpenShaderDesigner::_ImplEventHandler) cw +(OpenShaderDesigner::EventHandler< BeginFrame >) cw +(OpenShaderDesigner::EventHandler< EndFrame >) cw +(OpenShaderDesigner::EventHandler< EventType >) cw +(OpenShaderDesigner::Profiler) cw +(OpenShaderDesigner::Profiler) cw +/boxwidth boxwidth marginwidth 2 mul add def +/xspacing boxwidth distx add def +/yspacing boxheight disty add def +/scalefactor + boxwidth cols mul distx cols 1 sub mul add + boxheight rows mul disty rows 1 sub mul add boundaspect mul + max def +boundx scalefactor div boundy scalefactor div scale + +% ----- classes ----- + + (OpenShaderDesigner::_ImplEventHandler) 1.000000 2.000000 box + (OpenShaderDesigner::EventHandler< BeginFrame >) 0.000000 1.000000 box + (OpenShaderDesigner::EventHandler< EndFrame >) 1.000000 1.000000 box + (OpenShaderDesigner::EventHandler< EventType >) 2.000000 1.000000 box + (OpenShaderDesigner::Profiler) 0.000000 0.000000 box + (OpenShaderDesigner::Profiler) 1.000000 0.000000 box + +% ----- relations ----- + +dotted +1 1.000000 1.250000 out +dotted +0.000000 2.000000 2.000000 conn +dotted +0 0.000000 1.750000 in +solid +1 0.000000 0.250000 out +dotted +0 1.000000 1.750000 in +solid +1 1.000000 0.250000 out +dotted +0 2.000000 1.750000 in +solid +0 0.000000 0.750000 in +solid +0 1.000000 0.750000 in diff --git a/Documentation/latex/class_open_shader_designer_1_1___impl_event_handler.tex b/Documentation/latex/class_open_shader_designer_1_1___impl_event_handler.tex new file mode 100644 index 0000000..3fcf9e6 --- /dev/null +++ b/Documentation/latex/class_open_shader_designer_1_1___impl_event_handler.tex @@ -0,0 +1,31 @@ +\doxysection{Open\+Shader\+Designer\+::\+\_\+\+Impl\+Event\+Handler Class Reference} +\hypertarget{class_open_shader_designer_1_1___impl_event_handler}{}\label{class_open_shader_designer_1_1___impl_event_handler}\index{OpenShaderDesigner::\_ImplEventHandler@{OpenShaderDesigner::\_ImplEventHandler}} + + +Base \doxylink{class_open_shader_designer_1_1_event_handler}{Event\+Handler} for abstraction. + + + + +{\ttfamily \#include $<$Event\+System.\+h$>$} + +Inheritance diagram for Open\+Shader\+Designer\+::\+\_\+\+Impl\+Event\+Handler\+:\begin{figure}[H] +\begin{center} +\leavevmode +\includegraphics[height=1.761006cm]{class_open_shader_designer_1_1___impl_event_handler} +\end{center} +\end{figure} +\doxysubsubsection*{Friends} +\begin{DoxyCompactItemize} +\item +\Hypertarget{class_open_shader_designer_1_1___impl_event_handler_a9daac1e9f186a9341e2a138d426f9867}\label{class_open_shader_designer_1_1___impl_event_handler_a9daac1e9f186a9341e2a138d426f9867} +class {\bfseries Event\+System} +\end{DoxyCompactItemize} + + +\doxysubsection{Detailed Description} +Base \doxylink{class_open_shader_designer_1_1_event_handler}{Event\+Handler} for abstraction. + +The documentation for this class was generated from the following file\+:\begin{DoxyCompactItemize} +\item +Include/\+Core/Event\+System.\+h\end{DoxyCompactItemize} diff --git a/Documentation/latex/class_open_shader_designer_1_1_console.tex b/Documentation/latex/class_open_shader_designer_1_1_console.tex new file mode 100644 index 0000000..f8bc2e2 --- /dev/null +++ b/Documentation/latex/class_open_shader_designer_1_1_console.tex @@ -0,0 +1,171 @@ +\doxysection{Open\+Shader\+Designer\+::Console Class Reference} +\hypertarget{class_open_shader_designer_1_1_console}{}\label{class_open_shader_designer_1_1_console}\index{OpenShaderDesigner::Console@{OpenShaderDesigner::Console}} +\doxysubsubsection*{Public Types} +\begin{DoxyCompactItemize} +\item +\Hypertarget{class_open_shader_designer_1_1_console_a4da63ca14b9e8f7a582df081623b6406}\label{class_open_shader_designer_1_1_console_a4da63ca14b9e8f7a582df081623b6406} +enum \mbox{\hyperlink{class_open_shader_designer_1_1_console_a4da63ca14b9e8f7a582df081623b6406}{Setting}} \+: uint8\+\_\+t \{ \newline +{\bfseries SHOW\+\_\+\+TIMESTAMP} = 0b00000001 +, {\bfseries SHOW\+\_\+\+THREAD} = 0b00000010 +, {\bfseries SHOW\+\_\+\+SEVERITY} = 0b00000100 +, {\bfseries SHOW\+\_\+\+FILE\+\_\+\+INFO} = 0b00001000 +, \newline +{\bfseries WRAP\+\_\+\+TEXT} = 0b00010000 +, {\bfseries ALL\+\_\+\+SETTINGS} = 0x\+FF +, {\bfseries DEFAULT\+\_\+\+SETTINGS} = ALL\+\_\+\+SETTINGS \texorpdfstring{$^\wedge$}{\string^} WRAP\+\_\+\+TEXT + \} +\begin{DoxyCompactList}\small\item\em Setting for displaying log entries. \end{DoxyCompactList}\item +\Hypertarget{class_open_shader_designer_1_1_console_a880eae5d076afe686248bbb0f6a83771}\label{class_open_shader_designer_1_1_console_a880eae5d076afe686248bbb0f6a83771} +enum class \mbox{\hyperlink{class_open_shader_designer_1_1_console_a880eae5d076afe686248bbb0f6a83771}{Severity}} \+: int \{ \newline +{\bfseries MESSAGE} = 0 +, {\bfseries WARNING} +, {\bfseries ERROR} +, {\bfseries FATAL} +, \newline +{\bfseries ALERT} +, {\bfseries COMMAND} +, {\bfseries COUNT} +, {\bfseries DEFAULT} = WARNING + \} +\begin{DoxyCompactList}\small\item\em Severity levels for log entries. \end{DoxyCompactList}\end{DoxyCompactItemize} +\doxysubsubsection*{Static Public Member Functions} +\begin{DoxyCompactItemize} +\item +static constexpr Im\+Vec4 \mbox{\hyperlink{class_open_shader_designer_1_1_console_abc25e7d9ad33fdcc95fe11df9a9c3fc4}{Im\+Gui\+Color}} (unsigned int RGB) +\begin{DoxyCompactList}\small\item\em Integer to floating point color. (Im\+Gui APIVersion) \end{DoxyCompactList}\item +\Hypertarget{class_open_shader_designer_1_1_console_a41b89c645164fc524c58b5ee5cc1e8fa}\label{class_open_shader_designer_1_1_console_a41b89c645164fc524c58b5ee5cc1e8fa} +static std\+::string {\bfseries Thread\+ID} () +\item +{\footnotesize template$<$typename... Args$>$ }\\static void \mbox{\hyperlink{class_open_shader_designer_1_1_console_a4b0e458b796c898279bcb8fedf960920}{Log}} (const std\+::string \&file, const int line, \mbox{\hyperlink{class_open_shader_designer_1_1_console_a880eae5d076afe686248bbb0f6a83771}{Severity}} severity=Severity\+::\+DEFAULT, const std\+::format\+\_\+string$<$ Args... $>$ \&message="{}"{}, Args \&\&... vargs) +\begin{DoxyCompactList}\small\item\em Thread-\/\+Safe Log function for debugging. \end{DoxyCompactList}\item +\Hypertarget{class_open_shader_designer_1_1_console_ac4e13a7bd1fb502c9864f3c0454203b2}\label{class_open_shader_designer_1_1_console_ac4e13a7bd1fb502c9864f3c0454203b2} +static void {\bfseries Draw\+Menu} () +\item +\Hypertarget{class_open_shader_designer_1_1_console_acff1d4f443320977d132b2f32bc225eb}\label{class_open_shader_designer_1_1_console_acff1d4f443320977d132b2f32bc225eb} +static void {\bfseries Draw\+Window} () +\end{DoxyCompactItemize} +\doxysubsubsection*{Static Public Attributes} +\begin{DoxyCompactItemize} +\item +static const std\+::string \mbox{\hyperlink{class_open_shader_designer_1_1_console_a858d18576b3e7e542d4723316ae71e21}{Setting\+Names}} \mbox{[}$\,$\mbox{]} +\begin{DoxyCompactList}\small\item\em String representations of the settings. \end{DoxyCompactList}\item +static const std\+::string \mbox{\hyperlink{class_open_shader_designer_1_1_console_abac05fdca9513434894c10df2473d8b9}{Severities}} \mbox{[}$\,$\mbox{]} +\begin{DoxyCompactList}\small\item\em String representations of the Severity levels. \end{DoxyCompactList}\item +static const Im\+Vec4 \mbox{\hyperlink{class_open_shader_designer_1_1_console_a1a476dcb9b07e3ad0d54e08775118b35}{Severity\+Colors}} \mbox{[}$\,$\mbox{]} +\begin{DoxyCompactList}\small\item\em Color for rendering each Severity level text in editor. \end{DoxyCompactList}\item +\Hypertarget{class_open_shader_designer_1_1_console_a58a540e350481dfc6c79b2b7f85242de}\label{class_open_shader_designer_1_1_console_a58a540e350481dfc6c79b2b7f85242de} +static bool {\bfseries Open} = true +\end{DoxyCompactItemize} + + +\doxysubsection{Member Function Documentation} +\Hypertarget{class_open_shader_designer_1_1_console_abc25e7d9ad33fdcc95fe11df9a9c3fc4}\index{OpenShaderDesigner::Console@{OpenShaderDesigner::Console}!ImGuiColor@{ImGuiColor}} +\index{ImGuiColor@{ImGuiColor}!OpenShaderDesigner::Console@{OpenShaderDesigner::Console}} +\doxysubsubsection{\texorpdfstring{ImGuiColor()}{ImGuiColor()}} +{\footnotesize\ttfamily \label{class_open_shader_designer_1_1_console_abc25e7d9ad33fdcc95fe11df9a9c3fc4} +static constexpr Im\+Vec4 Open\+Shader\+Designer\+::\+Console\+::\+Im\+Gui\+Color (\begin{DoxyParamCaption}\item[{unsigned int}]{RGB}{}\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [static]}, {\ttfamily [constexpr]}} + + + +Integer to floating point color. (Im\+Gui APIVersion) + + +\begin{DoxyParams}{Parameters} +{\em RGB} & The Integer color to convert. \\ +\hline +\end{DoxyParams} +\begin{DoxyReturn}{Returns} +The rgba floating point color. +\end{DoxyReturn} +\Hypertarget{class_open_shader_designer_1_1_console_a4b0e458b796c898279bcb8fedf960920}\index{OpenShaderDesigner::Console@{OpenShaderDesigner::Console}!Log@{Log}} +\index{Log@{Log}!OpenShaderDesigner::Console@{OpenShaderDesigner::Console}} +\doxysubsubsection{\texorpdfstring{Log()}{Log()}} +{\footnotesize\ttfamily \label{class_open_shader_designer_1_1_console_a4b0e458b796c898279bcb8fedf960920} +template$<$typename... Args$>$ \\ +void Open\+Shader\+Designer\+::\+Console\+::\+Log (\begin{DoxyParamCaption}\item[{const std\+::string \&}]{file}{, }\item[{const int}]{line}{, }\item[{\mbox{\hyperlink{class_open_shader_designer_1_1_console_a880eae5d076afe686248bbb0f6a83771}{Severity}}}]{severity}{ = {\ttfamily Severity\+:\+:DEFAULT}, }\item[{const std\+::format\+\_\+string$<$ Args... $>$ \&}]{message}{ = {\ttfamily "{}"{}}, }\item[{Args \&\&...}]{vargs}{}\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}} + + + +Thread-\/\+Safe Log function for debugging. + + +\begin{DoxyTemplParams}{Template Parameters} +{\em Args} & Variadic Arguments template for Pixel\+Layout Parameters \\ +\hline +\end{DoxyTemplParams} + +\begin{DoxyParams}{Parameters} +{\em file} & The name of the file this was called from. \\ +\hline +{\em line} & The line number this was called from. \\ +\hline +{\em severity} & The severity level of the log entry. \\ +\hline +{\em message} & A format string for the entry message. \\ +\hline +{\em vargs} & Arguments for the format string. \\ +\hline +\end{DoxyParams} + + +\doxysubsection{Member Data Documentation} +\Hypertarget{class_open_shader_designer_1_1_console_a858d18576b3e7e542d4723316ae71e21}\index{OpenShaderDesigner::Console@{OpenShaderDesigner::Console}!SettingNames@{SettingNames}} +\index{SettingNames@{SettingNames}!OpenShaderDesigner::Console@{OpenShaderDesigner::Console}} +\doxysubsubsection{\texorpdfstring{SettingNames}{SettingNames}} +{\footnotesize\ttfamily \label{class_open_shader_designer_1_1_console_a858d18576b3e7e542d4723316ae71e21} +const std\+::string Open\+Shader\+Designer\+::\+Console\+::\+Setting\+Names\mbox{[}$\,$\mbox{]}\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [static]}} + +{\bfseries Initial value\+:} +\begin{DoxyCode}{0} +\DoxyCodeLine{=} +\DoxyCodeLine{\ \ \ \ \ \ \ \ \{} +\DoxyCodeLine{\ \ \ \ \ \ \ \ \ \ \ \ \textcolor{stringliteral}{"{}Timestamps"{}},\ \textcolor{stringliteral}{"{}Thread\ IDs"{}},\ \textcolor{stringliteral}{"{}Severity"{}},\ \textcolor{stringliteral}{"{}File\ Info"{}},\ \textcolor{stringliteral}{"{}Wrapping"{}}} +\DoxyCodeLine{\ \ \ \ \ \ \ \ \}} + +\end{DoxyCode} + + +String representations of the settings. + +\Hypertarget{class_open_shader_designer_1_1_console_abac05fdca9513434894c10df2473d8b9}\index{OpenShaderDesigner::Console@{OpenShaderDesigner::Console}!Severities@{Severities}} +\index{Severities@{Severities}!OpenShaderDesigner::Console@{OpenShaderDesigner::Console}} +\doxysubsubsection{\texorpdfstring{Severities}{Severities}} +{\footnotesize\ttfamily \label{class_open_shader_designer_1_1_console_abac05fdca9513434894c10df2473d8b9} +const std\+::string Open\+Shader\+Designer\+::\+Console\+::\+Severities\mbox{[}$\,$\mbox{]}\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [static]}} + +{\bfseries Initial value\+:} +\begin{DoxyCode}{0} +\DoxyCodeLine{=} +\DoxyCodeLine{\ \ \ \ \ \ \ \ \{} +\DoxyCodeLine{\ \ \ \ \ \ \ \ \ \ \ \ \textcolor{stringliteral}{"{}Message"{}},\ \textcolor{stringliteral}{"{}Warning"{}},\ \textcolor{stringliteral}{"{}Error"{}},\ \textcolor{stringliteral}{"{}Fatal"{}},\ \textcolor{stringliteral}{"{}Alert"{}},\ \textcolor{stringliteral}{"{}Command"{}}} +\DoxyCodeLine{\ \ \ \ \ \ \ \ \}} + +\end{DoxyCode} + + +String representations of the Severity levels. + +\Hypertarget{class_open_shader_designer_1_1_console_a1a476dcb9b07e3ad0d54e08775118b35}\index{OpenShaderDesigner::Console@{OpenShaderDesigner::Console}!SeverityColors@{SeverityColors}} +\index{SeverityColors@{SeverityColors}!OpenShaderDesigner::Console@{OpenShaderDesigner::Console}} +\doxysubsubsection{\texorpdfstring{SeverityColors}{SeverityColors}} +{\footnotesize\ttfamily \label{class_open_shader_designer_1_1_console_a1a476dcb9b07e3ad0d54e08775118b35} +const Im\+Vec4 Open\+Shader\+Designer\+::\+Console\+::\+Severity\+Colors\mbox{[}$\,$\mbox{]}\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [static]}} + +{\bfseries Initial value\+:} +\begin{DoxyCode}{0} +\DoxyCodeLine{=\ \{} +\DoxyCodeLine{\ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{class_open_shader_designer_1_1_console_abc25e7d9ad33fdcc95fe11df9a9c3fc4}{ImGuiColor}}(0xA4B9C4FF),\ \mbox{\hyperlink{class_open_shader_designer_1_1_console_abc25e7d9ad33fdcc95fe11df9a9c3fc4}{ImGuiColor}}(0xF2C554FF),\ \mbox{\hyperlink{class_open_shader_designer_1_1_console_abc25e7d9ad33fdcc95fe11df9a9c3fc4}{ImGuiColor}}(0xE57327FF),\ \mbox{\hyperlink{class_open_shader_designer_1_1_console_abc25e7d9ad33fdcc95fe11df9a9c3fc4}{ImGuiColor}}(0xCC211EFF),} +\DoxyCodeLine{\ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{class_open_shader_designer_1_1_console_abc25e7d9ad33fdcc95fe11df9a9c3fc4}{ImGuiColor}}(0x9CDCFEFF),} +\DoxyCodeLine{\ \ \ \ \ \ \ \ \}} + +\end{DoxyCode} + + +Color for rendering each Severity level text in editor. + + + +The documentation for this class was generated from the following files\+:\begin{DoxyCompactItemize} +\item +Include/\+Core/Console.\+h\item +Source/\+Core/Console.\+cpp\end{DoxyCompactItemize} diff --git a/Documentation/latex/class_open_shader_designer_1_1_console_window.eps b/Documentation/latex/class_open_shader_designer_1_1_console_window.eps new file mode 100644 index 0000000..96a7488 --- /dev/null +++ b/Documentation/latex/class_open_shader_designer_1_1_console_window.eps @@ -0,0 +1,197 @@ +%!PS-Adobe-2.0 EPSF-2.0 +%%Title: ClassName +%%Creator: Doxygen +%%CreationDate: Time +%%For: +%Magnification: 1.00 +%%Orientation: Portrait +%%BoundingBox: 0 0 500 167.364014 +%%Pages: 0 +%%BeginSetup +%%EndSetup +%%EndComments + +% ----- variables ----- + +/boxwidth 0 def +/boxheight 40 def +/fontheight 24 def +/marginwidth 10 def +/distx 20 def +/disty 40 def +/boundaspect 2.987500 def % aspect ratio of the BoundingBox (width/height) +/boundx 500 def +/boundy boundx boundaspect div def +/xspacing 0 def +/yspacing 0 def +/rows 2 def +/cols 1 def +/scalefactor 0 def +/boxfont /Times-Roman findfont fontheight scalefont def + +% ----- procedures ----- + +/dotted { [1 4] 0 setdash } def +/dashed { [5] 0 setdash } def +/solid { [] 0 setdash } def + +/max % result = MAX(arg1,arg2) +{ + /a exch def + /b exch def + a b gt {a} {b} ifelse +} def + +/xoffset % result = MAX(0,(scalefactor-(boxwidth*cols+distx*(cols-1)))/2) +{ + 0 scalefactor boxwidth cols mul distx cols 1 sub mul add sub 2 div max +} def + +/cw % boxwidth = MAX(boxwidth, stringwidth(arg1)) +{ + /str exch def + /boxwidth boxwidth str stringwidth pop max def +} def + +/box % draws a box with text 'arg1' at grid pos (arg2,arg3) +{ gsave + 2 setlinewidth + newpath + exch xspacing mul xoffset add + exch yspacing mul + moveto + boxwidth 0 rlineto + 0 boxheight rlineto + boxwidth neg 0 rlineto + 0 boxheight neg rlineto + closepath + dup stringwidth pop neg boxwidth add 2 div + boxheight fontheight 2 div sub 2 div + rmoveto show stroke + grestore +} def + +/mark +{ newpath + exch xspacing mul xoffset add boxwidth add + exch yspacing mul + moveto + 0 boxheight 4 div rlineto + boxheight neg 4 div boxheight neg 4 div rlineto + closepath + eofill + stroke +} def + +/arrow +{ newpath + moveto + 3 -8 rlineto + -6 0 rlineto + 3 8 rlineto + closepath + eofill + stroke +} def + +/out % draws an output connector for the block at (arg1,arg2) +{ + newpath + exch xspacing mul xoffset add boxwidth 2 div add + exch yspacing mul boxheight add + /y exch def + /x exch def + x y moveto + 0 disty 2 div rlineto + stroke + 1 eq { x y disty 2 div add arrow } if +} def + +/in % draws an input connector for the block at (arg1,arg2) +{ + newpath + exch xspacing mul xoffset add boxwidth 2 div add + exch yspacing mul disty 2 div sub + /y exch def + /x exch def + x y moveto + 0 disty 2 div rlineto + stroke + 1 eq { x y disty 2 div add arrow } if +} def + +/hedge +{ + exch xspacing mul xoffset add boxwidth 2 div add + exch yspacing mul boxheight 2 div sub + /y exch def + /x exch def + newpath + x y moveto + boxwidth 2 div distx add 0 rlineto + stroke + 1 eq + { newpath x boxwidth 2 div distx add add y moveto + -8 3 rlineto + 0 -6 rlineto + 8 3 rlineto + closepath + eofill + stroke + } if +} def + +/vedge +{ + /ye exch def + /ys exch def + /xs exch def + newpath + xs xspacing mul xoffset add boxwidth 2 div add dup + ys yspacing mul boxheight 2 div sub + moveto + ye yspacing mul boxheight 2 div sub + lineto + stroke +} def + +/conn % connections the blocks from col 'arg1' to 'arg2' of row 'arg3' +{ + /ys exch def + /xe exch def + /xs exch def + newpath + xs xspacing mul xoffset add boxwidth 2 div add + ys yspacing mul disty 2 div sub + moveto + xspacing xe xs sub mul 0 + rlineto + stroke +} def + +% ----- main ------ + +boxfont setfont +1 boundaspect scale +(OpenShaderDesigner::ConsoleWindow) cw +(OpenShaderDesigner::EditorWindow) cw +/boxwidth boxwidth marginwidth 2 mul add def +/xspacing boxwidth distx add def +/yspacing boxheight disty add def +/scalefactor + boxwidth cols mul distx cols 1 sub mul add + boxheight rows mul disty rows 1 sub mul add boundaspect mul + max def +boundx scalefactor div boundy scalefactor div scale + +% ----- classes ----- + + (OpenShaderDesigner::ConsoleWindow) 0.000000 0.000000 box + (OpenShaderDesigner::EditorWindow) 0.000000 1.000000 box + +% ----- relations ----- + +solid +0 0.000000 0.000000 out +solid +1 0.000000 1.000000 in diff --git a/Documentation/latex/class_open_shader_designer_1_1_console_window.tex b/Documentation/latex/class_open_shader_designer_1_1_console_window.tex new file mode 100644 index 0000000..b5a61fd --- /dev/null +++ b/Documentation/latex/class_open_shader_designer_1_1_console_window.tex @@ -0,0 +1,88 @@ +\doxysection{Open\+Shader\+Designer\+::Console\+Window Class Reference} +\hypertarget{class_open_shader_designer_1_1_console_window}{}\label{class_open_shader_designer_1_1_console_window}\index{OpenShaderDesigner::ConsoleWindow@{OpenShaderDesigner::ConsoleWindow}} +Inheritance diagram for Open\+Shader\+Designer\+::Console\+Window\+:\begin{figure}[H] +\begin{center} +\leavevmode +\includegraphics[height=2.000000cm]{class_open_shader_designer_1_1_console_window} +\end{center} +\end{figure} +\doxysubsubsection*{Public Member Functions} +\begin{DoxyCompactItemize} +\item +void \mbox{\hyperlink{class_open_shader_designer_1_1_console_window_a14ecc944c576eeb9f3ae4d524be62b52}{Draw\+Menu}} () override +\begin{DoxyCompactList}\small\item\em Draw\+Menu function for when the \doxylink{class_open_shader_designer_1_1_editor_window}{Editor\+Window} Menu is being drawn. \end{DoxyCompactList}\item +void \mbox{\hyperlink{class_open_shader_designer_1_1_console_window_aa4f7904f19e843905b02c1ee399a0e15}{Draw\+Window}} () override +\begin{DoxyCompactList}\small\item\em Draw\+Window function for when the \doxylink{class_open_shader_designer_1_1_editor_window}{Editor\+Window} is being drawn. \end{DoxyCompactList}\end{DoxyCompactItemize} +\doxysubsection*{Public Member Functions inherited from \mbox{\hyperlink{class_open_shader_designer_1_1_editor_window}{Open\+Shader\+Designer\+::\+Editor\+Window}}} +\begin{DoxyCompactItemize} +\item +void {\bfseries Open} () +\begin{DoxyCompactList}\small\item\em Open the \doxylink{class_open_shader_designer_1_1_editor_window}{Editor\+Window}. \end{DoxyCompactList}\item +void {\bfseries Draw} () +\begin{DoxyCompactList}\small\item\em Draw the \doxylink{class_open_shader_designer_1_1_editor_window}{Editor\+Window}. \end{DoxyCompactList}\item +void {\bfseries Close} () +\begin{DoxyCompactList}\small\item\em Close the \doxylink{class_open_shader_designer_1_1_editor_window}{Editor\+Window}. \end{DoxyCompactList}\item +bool \mbox{\hyperlink{class_open_shader_designer_1_1_editor_window_af3ea05326684e2f58d54805ce10570a6}{Is\+Open}} () const +\begin{DoxyCompactList}\small\item\em Check if the \doxylink{class_open_shader_designer_1_1_editor_window}{Editor\+Window} is open. \end{DoxyCompactList}\item +void {\bfseries Set\+Flags} (Im\+Gui\+Window\+Flags flags) +\item +void {\bfseries Clear\+Flags} (Im\+Gui\+Window\+Flags flags) +\item +void {\bfseries Toggle\+Flags} (Im\+Gui\+Window\+Flags flags) +\item +bool {\bfseries Check\+Flag} (Im\+Gui\+Window\+Flags flag) const +\item +bool {\bfseries Has\+Menu\+Bar} () const +\end{DoxyCompactItemize} +\doxysubsubsection*{Additional Inherited Members} +\doxysubsection*{Public Attributes inherited from \mbox{\hyperlink{class_open_shader_designer_1_1_editor_window}{Open\+Shader\+Designer\+::\+Editor\+Window}}} +\begin{DoxyCompactItemize} +\item +const std\+::string {\bfseries Title} +\begin{DoxyCompactList}\small\item\em Title for the \doxylink{class_open_shader_designer_1_1_editor_window}{Editor\+Window}. \end{DoxyCompactList}\end{DoxyCompactItemize} +\doxysubsection*{Protected Member Functions inherited from \mbox{\hyperlink{class_open_shader_designer_1_1_editor_window}{Open\+Shader\+Designer\+::\+Editor\+Window}}} +\begin{DoxyCompactItemize} +\item +{\bfseries Editor\+Window} (const std\+::string \&title, Im\+Gui\+Window\+Flags flags) +\item +virtual void \mbox{\hyperlink{class_open_shader_designer_1_1_editor_window_a2e68f7186c2ceb3ea3dd5618045c6ab7}{On\+Open}} () +\begin{DoxyCompactList}\small\item\em On\+Open callback for when the \doxylink{class_open_shader_designer_1_1_editor_window}{Editor\+Window} is opened. \end{DoxyCompactList}\item +virtual void {\bfseries On\+Close} () +\begin{DoxyCompactList}\small\item\em On\+Close callback for when the \doxylink{class_open_shader_designer_1_1_editor_window}{Editor\+Window} is closed. \end{DoxyCompactList}\end{DoxyCompactItemize} + + +\doxysubsection{Member Function Documentation} +\Hypertarget{class_open_shader_designer_1_1_console_window_a14ecc944c576eeb9f3ae4d524be62b52}\index{OpenShaderDesigner::ConsoleWindow@{OpenShaderDesigner::ConsoleWindow}!DrawMenu@{DrawMenu}} +\index{DrawMenu@{DrawMenu}!OpenShaderDesigner::ConsoleWindow@{OpenShaderDesigner::ConsoleWindow}} +\doxysubsubsection{\texorpdfstring{DrawMenu()}{DrawMenu()}} +{\footnotesize\ttfamily \label{class_open_shader_designer_1_1_console_window_a14ecc944c576eeb9f3ae4d524be62b52} +void Console\+Window\+::\+Draw\+Menu (\begin{DoxyParamCaption}{}{}\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [override]}, {\ttfamily [virtual]}} + + + +Draw\+Menu function for when the \doxylink{class_open_shader_designer_1_1_editor_window}{Editor\+Window} Menu is being drawn. + + + +Reimplemented from \mbox{\hyperlink{class_open_shader_designer_1_1_editor_window_a6c229ca70221f672315f9a4f0c7be0c0}{Open\+Shader\+Designer\+::\+Editor\+Window}}. + +\Hypertarget{class_open_shader_designer_1_1_console_window_aa4f7904f19e843905b02c1ee399a0e15}\index{OpenShaderDesigner::ConsoleWindow@{OpenShaderDesigner::ConsoleWindow}!DrawWindow@{DrawWindow}} +\index{DrawWindow@{DrawWindow}!OpenShaderDesigner::ConsoleWindow@{OpenShaderDesigner::ConsoleWindow}} +\doxysubsubsection{\texorpdfstring{DrawWindow()}{DrawWindow()}} +{\footnotesize\ttfamily \label{class_open_shader_designer_1_1_console_window_aa4f7904f19e843905b02c1ee399a0e15} +void Console\+Window\+::\+Draw\+Window (\begin{DoxyParamCaption}{}{}\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [override]}, {\ttfamily [virtual]}} + + + +Draw\+Window function for when the \doxylink{class_open_shader_designer_1_1_editor_window}{Editor\+Window} is being drawn. + + + +Reimplemented from \mbox{\hyperlink{class_open_shader_designer_1_1_editor_window_a058742ce762d782440f595497e5bfbff}{Open\+Shader\+Designer\+::\+Editor\+Window}}. + + + +The documentation for this class was generated from the following files\+:\begin{DoxyCompactItemize} +\item +Include/\+Editor/Console\+Window.\+h\item +Source/\+Editor/Console\+Window.\+cpp\end{DoxyCompactItemize} diff --git a/Documentation/latex/class_open_shader_designer_1_1_editor_system.tex b/Documentation/latex/class_open_shader_designer_1_1_editor_system.tex new file mode 100644 index 0000000..442fe49 --- /dev/null +++ b/Documentation/latex/class_open_shader_designer_1_1_editor_system.tex @@ -0,0 +1,41 @@ +\doxysection{Open\+Shader\+Designer\+::Editor\+System Class Reference} +\hypertarget{class_open_shader_designer_1_1_editor_system}{}\label{class_open_shader_designer_1_1_editor_system}\index{OpenShaderDesigner::EditorSystem@{OpenShaderDesigner::EditorSystem}} +\doxysubsubsection*{Public Types} +\begin{DoxyCompactItemize} +\item +\Hypertarget{class_open_shader_designer_1_1_editor_system_ac2e6e3e4a9aa2c15d421f55b312b4435}\label{class_open_shader_designer_1_1_editor_system_ac2e6e3e4a9aa2c15d421f55b312b4435} +using {\bfseries Window\+ID} = uint64\+\_\+t +\end{DoxyCompactItemize} +\doxysubsubsection*{Static Public Member Functions} +\begin{DoxyCompactItemize} +\item +\Hypertarget{class_open_shader_designer_1_1_editor_system_afb397d6248a42ac62949a1e2c0bcd082}\label{class_open_shader_designer_1_1_editor_system_afb397d6248a42ac62949a1e2c0bcd082} +{\footnotesize template$<$typename T $>$ }\\static Window\+ID {\bfseries ID} () +\item +\Hypertarget{class_open_shader_designer_1_1_editor_system_aa022e59741ec8845a29297ff7c3b7041}\label{class_open_shader_designer_1_1_editor_system_aa022e59741ec8845a29297ff7c3b7041} +{\footnotesize template$<$typename T $>$ }\\static T \texorpdfstring{$\ast$}{*} {\bfseries Open} () +\item +\Hypertarget{class_open_shader_designer_1_1_editor_system_a5f03246a4cb0e333e67cdbe6ab435c70}\label{class_open_shader_designer_1_1_editor_system_a5f03246a4cb0e333e67cdbe6ab435c70} +{\footnotesize template$<$typename T $>$ }\\static T \texorpdfstring{$\ast$}{*} {\bfseries Close} () +\item +\Hypertarget{class_open_shader_designer_1_1_editor_system_a5cfbbeeb2182fac56e60ce9aff1f54b9}\label{class_open_shader_designer_1_1_editor_system_a5cfbbeeb2182fac56e60ce9aff1f54b9} +{\footnotesize template$<$typename T $>$ }\\static T \texorpdfstring{$\ast$}{*} {\bfseries Get} () +\item +\Hypertarget{class_open_shader_designer_1_1_editor_system_aaf12a76a732a5e77de1e9f819d11d54e}\label{class_open_shader_designer_1_1_editor_system_aaf12a76a732a5e77de1e9f819d11d54e} +static void {\bfseries Initialize} () +\item +\Hypertarget{class_open_shader_designer_1_1_editor_system_a590e32932425e91404fde311a0575032}\label{class_open_shader_designer_1_1_editor_system_a590e32932425e91404fde311a0575032} +static void {\bfseries Draw} () +\item +\Hypertarget{class_open_shader_designer_1_1_editor_system_a97d3bd661f03e9bdbcaaa6665e23b384}\label{class_open_shader_designer_1_1_editor_system_a97d3bd661f03e9bdbcaaa6665e23b384} +static void {\bfseries Shutdown} () +\item +\Hypertarget{class_open_shader_designer_1_1_editor_system_a153ee9ddaeb4245ffb896bffb34f9824}\label{class_open_shader_designer_1_1_editor_system_a153ee9ddaeb4245ffb896bffb34f9824} +static void {\bfseries Handle\+Events} (SDL\+\_\+\+Event \texorpdfstring{$\ast$}{*}event) +\end{DoxyCompactItemize} + + +The documentation for this class was generated from the following files\+:\begin{DoxyCompactItemize} +\item +Include/\+Editor/Editor\+System.\+h\item +Source/\+Editor/Editor\+System.\+cpp\end{DoxyCompactItemize} diff --git a/Documentation/latex/class_open_shader_designer_1_1_editor_window.eps b/Documentation/latex/class_open_shader_designer_1_1_editor_window.eps new file mode 100644 index 0000000..4f3f5bf --- /dev/null +++ b/Documentation/latex/class_open_shader_designer_1_1_editor_window.eps @@ -0,0 +1,211 @@ +%!PS-Adobe-2.0 EPSF-2.0 +%%Title: ClassName +%%Creator: Doxygen +%%CreationDate: Time +%%For: +%Magnification: 1.00 +%%Orientation: Portrait +%%BoundingBox: 0 0 500 41.841003 +%%Pages: 0 +%%BeginSetup +%%EndSetup +%%EndComments + +% ----- variables ----- + +/boxwidth 0 def +/boxheight 40 def +/fontheight 24 def +/marginwidth 10 def +/distx 20 def +/disty 40 def +/boundaspect 11.950000 def % aspect ratio of the BoundingBox (width/height) +/boundx 500 def +/boundy boundx boundaspect div def +/xspacing 0 def +/yspacing 0 def +/rows 2 def +/cols 4 def +/scalefactor 0 def +/boxfont /Times-Roman findfont fontheight scalefont def + +% ----- procedures ----- + +/dotted { [1 4] 0 setdash } def +/dashed { [5] 0 setdash } def +/solid { [] 0 setdash } def + +/max % result = MAX(arg1,arg2) +{ + /a exch def + /b exch def + a b gt {a} {b} ifelse +} def + +/xoffset % result = MAX(0,(scalefactor-(boxwidth*cols+distx*(cols-1)))/2) +{ + 0 scalefactor boxwidth cols mul distx cols 1 sub mul add sub 2 div max +} def + +/cw % boxwidth = MAX(boxwidth, stringwidth(arg1)) +{ + /str exch def + /boxwidth boxwidth str stringwidth pop max def +} def + +/box % draws a box with text 'arg1' at grid pos (arg2,arg3) +{ gsave + 2 setlinewidth + newpath + exch xspacing mul xoffset add + exch yspacing mul + moveto + boxwidth 0 rlineto + 0 boxheight rlineto + boxwidth neg 0 rlineto + 0 boxheight neg rlineto + closepath + dup stringwidth pop neg boxwidth add 2 div + boxheight fontheight 2 div sub 2 div + rmoveto show stroke + grestore +} def + +/mark +{ newpath + exch xspacing mul xoffset add boxwidth add + exch yspacing mul + moveto + 0 boxheight 4 div rlineto + boxheight neg 4 div boxheight neg 4 div rlineto + closepath + eofill + stroke +} def + +/arrow +{ newpath + moveto + 3 -8 rlineto + -6 0 rlineto + 3 8 rlineto + closepath + eofill + stroke +} def + +/out % draws an output connector for the block at (arg1,arg2) +{ + newpath + exch xspacing mul xoffset add boxwidth 2 div add + exch yspacing mul boxheight add + /y exch def + /x exch def + x y moveto + 0 disty 2 div rlineto + stroke + 1 eq { x y disty 2 div add arrow } if +} def + +/in % draws an input connector for the block at (arg1,arg2) +{ + newpath + exch xspacing mul xoffset add boxwidth 2 div add + exch yspacing mul disty 2 div sub + /y exch def + /x exch def + x y moveto + 0 disty 2 div rlineto + stroke + 1 eq { x y disty 2 div add arrow } if +} def + +/hedge +{ + exch xspacing mul xoffset add boxwidth 2 div add + exch yspacing mul boxheight 2 div sub + /y exch def + /x exch def + newpath + x y moveto + boxwidth 2 div distx add 0 rlineto + stroke + 1 eq + { newpath x boxwidth 2 div distx add add y moveto + -8 3 rlineto + 0 -6 rlineto + 8 3 rlineto + closepath + eofill + stroke + } if +} def + +/vedge +{ + /ye exch def + /ys exch def + /xs exch def + newpath + xs xspacing mul xoffset add boxwidth 2 div add dup + ys yspacing mul boxheight 2 div sub + moveto + ye yspacing mul boxheight 2 div sub + lineto + stroke +} def + +/conn % connections the blocks from col 'arg1' to 'arg2' of row 'arg3' +{ + /ys exch def + /xe exch def + /xs exch def + newpath + xs xspacing mul xoffset add boxwidth 2 div add + ys yspacing mul disty 2 div sub + moveto + xspacing xe xs sub mul 0 + rlineto + stroke +} def + +% ----- main ------ + +boxfont setfont +1 boundaspect scale +(OpenShaderDesigner::EditorWindow) cw +(OpenShaderDesigner::ConsoleWindow) cw +(OpenShaderDesigner::Inspector) cw +(OpenShaderDesigner::Profiler) cw +(OpenShaderDesigner::ShaderGraph) cw +/boxwidth boxwidth marginwidth 2 mul add def +/xspacing boxwidth distx add def +/yspacing boxheight disty add def +/scalefactor + boxwidth cols mul distx cols 1 sub mul add + boxheight rows mul disty rows 1 sub mul add boundaspect mul + max def +boundx scalefactor div boundy scalefactor div scale + +% ----- classes ----- + + (OpenShaderDesigner::EditorWindow) 1.500000 1.000000 box + (OpenShaderDesigner::ConsoleWindow) 0.000000 0.000000 box + (OpenShaderDesigner::Inspector) 1.000000 0.000000 box + (OpenShaderDesigner::Profiler) 2.000000 0.000000 box + (OpenShaderDesigner::ShaderGraph) 3.000000 0.000000 box + +% ----- relations ----- + +solid +1 1.500000 0.250000 out +solid +0.000000 3.000000 1.000000 conn +solid +0 0.000000 0.750000 in +solid +0 1.000000 0.750000 in +solid +0 2.000000 0.750000 in +solid +0 3.000000 0.750000 in diff --git a/Documentation/latex/class_open_shader_designer_1_1_editor_window.tex b/Documentation/latex/class_open_shader_designer_1_1_editor_window.tex new file mode 100644 index 0000000..a2d356a --- /dev/null +++ b/Documentation/latex/class_open_shader_designer_1_1_editor_window.tex @@ -0,0 +1,140 @@ +\doxysection{Open\+Shader\+Designer\+::Editor\+Window Class Reference} +\hypertarget{class_open_shader_designer_1_1_editor_window}{}\label{class_open_shader_designer_1_1_editor_window}\index{OpenShaderDesigner::EditorWindow@{OpenShaderDesigner::EditorWindow}} + + +\doxylink{class_open_shader_designer_1_1_editor_window}{Editor\+Window} class for wrapping Im\+Gui window functionality. + + + + +{\ttfamily \#include $<$Editor\+Window.\+h$>$} + +Inheritance diagram for Open\+Shader\+Designer\+::Editor\+Window\+:\begin{figure}[H] +\begin{center} +\leavevmode +\includegraphics[height=1.171548cm]{class_open_shader_designer_1_1_editor_window} +\end{center} +\end{figure} +\doxysubsubsection*{Public Member Functions} +\begin{DoxyCompactItemize} +\item +\Hypertarget{class_open_shader_designer_1_1_editor_window_a858a412f2f8c652773885d217410d332}\label{class_open_shader_designer_1_1_editor_window_a858a412f2f8c652773885d217410d332} +void {\bfseries Open} () +\begin{DoxyCompactList}\small\item\em Open the \doxylink{class_open_shader_designer_1_1_editor_window}{Editor\+Window}. \end{DoxyCompactList}\item +\Hypertarget{class_open_shader_designer_1_1_editor_window_a501528be936bdf479359021308fb0d31}\label{class_open_shader_designer_1_1_editor_window_a501528be936bdf479359021308fb0d31} +void {\bfseries Draw} () +\begin{DoxyCompactList}\small\item\em Draw the \doxylink{class_open_shader_designer_1_1_editor_window}{Editor\+Window}. \end{DoxyCompactList}\item +\Hypertarget{class_open_shader_designer_1_1_editor_window_a5df4621355612a487578521525029aa6}\label{class_open_shader_designer_1_1_editor_window_a5df4621355612a487578521525029aa6} +void {\bfseries Close} () +\begin{DoxyCompactList}\small\item\em Close the \doxylink{class_open_shader_designer_1_1_editor_window}{Editor\+Window}. \end{DoxyCompactList}\item +bool \mbox{\hyperlink{class_open_shader_designer_1_1_editor_window_af3ea05326684e2f58d54805ce10570a6}{Is\+Open}} () const +\begin{DoxyCompactList}\small\item\em Check if the \doxylink{class_open_shader_designer_1_1_editor_window}{Editor\+Window} is open. \end{DoxyCompactList}\item +\Hypertarget{class_open_shader_designer_1_1_editor_window_acdca8f6c0dc76270551d3ff614122417}\label{class_open_shader_designer_1_1_editor_window_acdca8f6c0dc76270551d3ff614122417} +void {\bfseries Set\+Flags} (Im\+Gui\+Window\+Flags flags) +\item +\Hypertarget{class_open_shader_designer_1_1_editor_window_a54841ebee5ad18caac7bdab899e4e72f}\label{class_open_shader_designer_1_1_editor_window_a54841ebee5ad18caac7bdab899e4e72f} +void {\bfseries Clear\+Flags} (Im\+Gui\+Window\+Flags flags) +\item +\Hypertarget{class_open_shader_designer_1_1_editor_window_aa9aedb11ee2867d24c2d67d8ce1391e7}\label{class_open_shader_designer_1_1_editor_window_aa9aedb11ee2867d24c2d67d8ce1391e7} +void {\bfseries Toggle\+Flags} (Im\+Gui\+Window\+Flags flags) +\item +\Hypertarget{class_open_shader_designer_1_1_editor_window_ae951a77275bb6af1320b66536efbb2a5}\label{class_open_shader_designer_1_1_editor_window_ae951a77275bb6af1320b66536efbb2a5} +bool {\bfseries Check\+Flag} (Im\+Gui\+Window\+Flags flag) const +\item +\Hypertarget{class_open_shader_designer_1_1_editor_window_ae250d1936051a688be91556f0b2cac88}\label{class_open_shader_designer_1_1_editor_window_ae250d1936051a688be91556f0b2cac88} +bool {\bfseries Has\+Menu\+Bar} () const +\end{DoxyCompactItemize} +\doxysubsubsection*{Public Attributes} +\begin{DoxyCompactItemize} +\item +\Hypertarget{class_open_shader_designer_1_1_editor_window_a2e557a422d0e4e003f85fb9905b66980}\label{class_open_shader_designer_1_1_editor_window_a2e557a422d0e4e003f85fb9905b66980} +const std\+::string {\bfseries Title} +\begin{DoxyCompactList}\small\item\em Title for the \doxylink{class_open_shader_designer_1_1_editor_window}{Editor\+Window}. \end{DoxyCompactList}\end{DoxyCompactItemize} +\doxysubsubsection*{Protected Member Functions} +\begin{DoxyCompactItemize} +\item +\Hypertarget{class_open_shader_designer_1_1_editor_window_a06f3984ef5bf259fdedf79b07bc2c486}\label{class_open_shader_designer_1_1_editor_window_a06f3984ef5bf259fdedf79b07bc2c486} +{\bfseries Editor\+Window} (const std\+::string \&title, Im\+Gui\+Window\+Flags flags) +\item +virtual void \mbox{\hyperlink{class_open_shader_designer_1_1_editor_window_a2e68f7186c2ceb3ea3dd5618045c6ab7}{On\+Open}} () +\begin{DoxyCompactList}\small\item\em On\+Open callback for when the \doxylink{class_open_shader_designer_1_1_editor_window}{Editor\+Window} is opened. \end{DoxyCompactList}\item +virtual void \mbox{\hyperlink{class_open_shader_designer_1_1_editor_window_a058742ce762d782440f595497e5bfbff}{Draw\+Window}} () +\begin{DoxyCompactList}\small\item\em Draw\+Window function for when the \doxylink{class_open_shader_designer_1_1_editor_window}{Editor\+Window} is being drawn. \end{DoxyCompactList}\item +virtual void \mbox{\hyperlink{class_open_shader_designer_1_1_editor_window_a6c229ca70221f672315f9a4f0c7be0c0}{Draw\+Menu}} () +\begin{DoxyCompactList}\small\item\em Draw\+Menu function for when the \doxylink{class_open_shader_designer_1_1_editor_window}{Editor\+Window} Menu is being drawn. \end{DoxyCompactList}\item +\Hypertarget{class_open_shader_designer_1_1_editor_window_a6dc0b192488187ddbde44d7f0b5fc0f7}\label{class_open_shader_designer_1_1_editor_window_a6dc0b192488187ddbde44d7f0b5fc0f7} +virtual void {\bfseries On\+Close} () +\begin{DoxyCompactList}\small\item\em On\+Close callback for when the \doxylink{class_open_shader_designer_1_1_editor_window}{Editor\+Window} is closed. \end{DoxyCompactList}\end{DoxyCompactItemize} +\doxysubsubsection*{Friends} +\begin{DoxyCompactItemize} +\item +\Hypertarget{class_open_shader_designer_1_1_editor_window_a06ef57b59594cad91927d3416d70b84c}\label{class_open_shader_designer_1_1_editor_window_a06ef57b59594cad91927d3416d70b84c} +class {\bfseries Editor\+System} +\end{DoxyCompactItemize} + + +\doxysubsection{Detailed Description} +\doxylink{class_open_shader_designer_1_1_editor_window}{Editor\+Window} class for wrapping Im\+Gui window functionality. + +\doxysubsection{Member Function Documentation} +\Hypertarget{class_open_shader_designer_1_1_editor_window_a6c229ca70221f672315f9a4f0c7be0c0}\index{OpenShaderDesigner::EditorWindow@{OpenShaderDesigner::EditorWindow}!DrawMenu@{DrawMenu}} +\index{DrawMenu@{DrawMenu}!OpenShaderDesigner::EditorWindow@{OpenShaderDesigner::EditorWindow}} +\doxysubsubsection{\texorpdfstring{DrawMenu()}{DrawMenu()}} +{\footnotesize\ttfamily \label{class_open_shader_designer_1_1_editor_window_a6c229ca70221f672315f9a4f0c7be0c0} +virtual void Open\+Shader\+Designer\+::\+Editor\+Window\+::\+Draw\+Menu (\begin{DoxyParamCaption}{}{}\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [protected]}, {\ttfamily [virtual]}} + + + +Draw\+Menu function for when the \doxylink{class_open_shader_designer_1_1_editor_window}{Editor\+Window} Menu is being drawn. + + + +Reimplemented in \mbox{\hyperlink{class_open_shader_designer_1_1_console_window_a14ecc944c576eeb9f3ae4d524be62b52}{Open\+Shader\+Designer\+::\+Console\+Window}}. + +\Hypertarget{class_open_shader_designer_1_1_editor_window_a058742ce762d782440f595497e5bfbff}\index{OpenShaderDesigner::EditorWindow@{OpenShaderDesigner::EditorWindow}!DrawWindow@{DrawWindow}} +\index{DrawWindow@{DrawWindow}!OpenShaderDesigner::EditorWindow@{OpenShaderDesigner::EditorWindow}} +\doxysubsubsection{\texorpdfstring{DrawWindow()}{DrawWindow()}} +{\footnotesize\ttfamily \label{class_open_shader_designer_1_1_editor_window_a058742ce762d782440f595497e5bfbff} +virtual void Open\+Shader\+Designer\+::\+Editor\+Window\+::\+Draw\+Window (\begin{DoxyParamCaption}{}{}\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [protected]}, {\ttfamily [virtual]}} + + + +Draw\+Window function for when the \doxylink{class_open_shader_designer_1_1_editor_window}{Editor\+Window} is being drawn. + + + +Reimplemented in \mbox{\hyperlink{class_open_shader_designer_1_1_console_window_aa4f7904f19e843905b02c1ee399a0e15}{Open\+Shader\+Designer\+::\+Console\+Window}}, \mbox{\hyperlink{class_open_shader_designer_1_1_inspector_a69fb8726df2442514a65dc29a9660c24}{Open\+Shader\+Designer\+::\+Inspector}}, \mbox{\hyperlink{class_open_shader_designer_1_1_profiler_a26186e7726d5811f423c9cee06aec1d5}{Open\+Shader\+Designer\+::\+Profiler}}, and \mbox{\hyperlink{class_open_shader_designer_1_1_shader_graph_af028ed8ea55d12a1bb2bcf51c817398b}{Open\+Shader\+Designer\+::\+Shader\+Graph}}. + +\Hypertarget{class_open_shader_designer_1_1_editor_window_af3ea05326684e2f58d54805ce10570a6}\index{OpenShaderDesigner::EditorWindow@{OpenShaderDesigner::EditorWindow}!IsOpen@{IsOpen}} +\index{IsOpen@{IsOpen}!OpenShaderDesigner::EditorWindow@{OpenShaderDesigner::EditorWindow}} +\doxysubsubsection{\texorpdfstring{IsOpen()}{IsOpen()}} +{\footnotesize\ttfamily \label{class_open_shader_designer_1_1_editor_window_af3ea05326684e2f58d54805ce10570a6} +bool Open\+Shader\+Designer\+::\+Editor\+Window\+::\+Is\+Open (\begin{DoxyParamCaption}{}{}\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [nodiscard]}} + + + +Check if the \doxylink{class_open_shader_designer_1_1_editor_window}{Editor\+Window} is open. + +\begin{DoxyReturn}{Returns} + +\end{DoxyReturn} +\Hypertarget{class_open_shader_designer_1_1_editor_window_a2e68f7186c2ceb3ea3dd5618045c6ab7}\index{OpenShaderDesigner::EditorWindow@{OpenShaderDesigner::EditorWindow}!OnOpen@{OnOpen}} +\index{OnOpen@{OnOpen}!OpenShaderDesigner::EditorWindow@{OpenShaderDesigner::EditorWindow}} +\doxysubsubsection{\texorpdfstring{OnOpen()}{OnOpen()}} +{\footnotesize\ttfamily \label{class_open_shader_designer_1_1_editor_window_a2e68f7186c2ceb3ea3dd5618045c6ab7} +virtual void Open\+Shader\+Designer\+::\+Editor\+Window\+::\+On\+Open (\begin{DoxyParamCaption}{}{}\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [protected]}, {\ttfamily [virtual]}} + + + +On\+Open callback for when the \doxylink{class_open_shader_designer_1_1_editor_window}{Editor\+Window} is opened. + + + +Reimplemented in \mbox{\hyperlink{class_open_shader_designer_1_1_shader_graph_ab165317b9a0b95648df1e7009c220a04}{Open\+Shader\+Designer\+::\+Shader\+Graph}}. + + + +The documentation for this class was generated from the following files\+:\begin{DoxyCompactItemize} +\item +Include/\+Editor/Editor\+Window.\+h\item +Source/\+Editor/Editor\+Window.\+cpp\end{DoxyCompactItemize} diff --git a/Documentation/latex/class_open_shader_designer_1_1_engine.tex b/Documentation/latex/class_open_shader_designer_1_1_engine.tex new file mode 100644 index 0000000..8c39c19 --- /dev/null +++ b/Documentation/latex/class_open_shader_designer_1_1_engine.tex @@ -0,0 +1,26 @@ +\doxysection{Open\+Shader\+Designer\+::Engine Class Reference} +\hypertarget{class_open_shader_designer_1_1_engine}{}\label{class_open_shader_designer_1_1_engine}\index{OpenShaderDesigner::Engine@{OpenShaderDesigner::Engine}} +\doxysubsubsection*{Static Public Member Functions} +\begin{DoxyCompactItemize} +\item +\Hypertarget{class_open_shader_designer_1_1_engine_a51553a0b134de1663c2503157a3dd81e}\label{class_open_shader_designer_1_1_engine_a51553a0b134de1663c2503157a3dd81e} +static void {\bfseries Start} (const \mbox{\hyperlink{struct_open_shader_designer_1_1_window_1_1_configuration}{Window\+::\+Configuration}} \&config) +\item +\Hypertarget{class_open_shader_designer_1_1_engine_aff9a17f7a3bd34d532cc5f3390ca3d3b}\label{class_open_shader_designer_1_1_engine_aff9a17f7a3bd34d532cc5f3390ca3d3b} +static void {\bfseries Stop} () +\item +\Hypertarget{class_open_shader_designer_1_1_engine_a324cfb3d10756489db2e2d718689e0dd}\label{class_open_shader_designer_1_1_engine_a324cfb3d10756489db2e2d718689e0dd} +static \mbox{\hyperlink{class_open_shader_designer_1_1_window}{Window}} \& {\bfseries Get\+Main\+Window} () +\end{DoxyCompactItemize} +\doxysubsubsection*{Static Public Attributes} +\begin{DoxyCompactItemize} +\item +\Hypertarget{class_open_shader_designer_1_1_engine_aa9c9280582e0dda40e819f343683be53}\label{class_open_shader_designer_1_1_engine_aa9c9280582e0dda40e819f343683be53} +static const double \& {\bfseries Delta} = \+\_\+\+Delta +\end{DoxyCompactItemize} + + +The documentation for this class was generated from the following files\+:\begin{DoxyCompactItemize} +\item +Include/\+Core/Engine.\+h\item +Source/\+Core/Engine.\+cpp\end{DoxyCompactItemize} diff --git a/Documentation/latex/class_open_shader_designer_1_1_event_handler.eps b/Documentation/latex/class_open_shader_designer_1_1_event_handler.eps new file mode 100644 index 0000000..c44ef38 --- /dev/null +++ b/Documentation/latex/class_open_shader_designer_1_1_event_handler.eps @@ -0,0 +1,197 @@ +%!PS-Adobe-2.0 EPSF-2.0 +%%Title: ClassName +%%Creator: Doxygen +%%CreationDate: Time +%%For: +%Magnification: 1.00 +%%Orientation: Portrait +%%BoundingBox: 0 0 500 129.032257 +%%Pages: 0 +%%BeginSetup +%%EndSetup +%%EndComments + +% ----- variables ----- + +/boxwidth 0 def +/boxheight 40 def +/fontheight 24 def +/marginwidth 10 def +/distx 20 def +/disty 40 def +/boundaspect 3.875000 def % aspect ratio of the BoundingBox (width/height) +/boundx 500 def +/boundy boundx boundaspect div def +/xspacing 0 def +/yspacing 0 def +/rows 2 def +/cols 1 def +/scalefactor 0 def +/boxfont /Times-Roman findfont fontheight scalefont def + +% ----- procedures ----- + +/dotted { [1 4] 0 setdash } def +/dashed { [5] 0 setdash } def +/solid { [] 0 setdash } def + +/max % result = MAX(arg1,arg2) +{ + /a exch def + /b exch def + a b gt {a} {b} ifelse +} def + +/xoffset % result = MAX(0,(scalefactor-(boxwidth*cols+distx*(cols-1)))/2) +{ + 0 scalefactor boxwidth cols mul distx cols 1 sub mul add sub 2 div max +} def + +/cw % boxwidth = MAX(boxwidth, stringwidth(arg1)) +{ + /str exch def + /boxwidth boxwidth str stringwidth pop max def +} def + +/box % draws a box with text 'arg1' at grid pos (arg2,arg3) +{ gsave + 2 setlinewidth + newpath + exch xspacing mul xoffset add + exch yspacing mul + moveto + boxwidth 0 rlineto + 0 boxheight rlineto + boxwidth neg 0 rlineto + 0 boxheight neg rlineto + closepath + dup stringwidth pop neg boxwidth add 2 div + boxheight fontheight 2 div sub 2 div + rmoveto show stroke + grestore +} def + +/mark +{ newpath + exch xspacing mul xoffset add boxwidth add + exch yspacing mul + moveto + 0 boxheight 4 div rlineto + boxheight neg 4 div boxheight neg 4 div rlineto + closepath + eofill + stroke +} def + +/arrow +{ newpath + moveto + 3 -8 rlineto + -6 0 rlineto + 3 8 rlineto + closepath + eofill + stroke +} def + +/out % draws an output connector for the block at (arg1,arg2) +{ + newpath + exch xspacing mul xoffset add boxwidth 2 div add + exch yspacing mul boxheight add + /y exch def + /x exch def + x y moveto + 0 disty 2 div rlineto + stroke + 1 eq { x y disty 2 div add arrow } if +} def + +/in % draws an input connector for the block at (arg1,arg2) +{ + newpath + exch xspacing mul xoffset add boxwidth 2 div add + exch yspacing mul disty 2 div sub + /y exch def + /x exch def + x y moveto + 0 disty 2 div rlineto + stroke + 1 eq { x y disty 2 div add arrow } if +} def + +/hedge +{ + exch xspacing mul xoffset add boxwidth 2 div add + exch yspacing mul boxheight 2 div sub + /y exch def + /x exch def + newpath + x y moveto + boxwidth 2 div distx add 0 rlineto + stroke + 1 eq + { newpath x boxwidth 2 div distx add add y moveto + -8 3 rlineto + 0 -6 rlineto + 8 3 rlineto + closepath + eofill + stroke + } if +} def + +/vedge +{ + /ye exch def + /ys exch def + /xs exch def + newpath + xs xspacing mul xoffset add boxwidth 2 div add dup + ys yspacing mul boxheight 2 div sub + moveto + ye yspacing mul boxheight 2 div sub + lineto + stroke +} def + +/conn % connections the blocks from col 'arg1' to 'arg2' of row 'arg3' +{ + /ys exch def + /xe exch def + /xs exch def + newpath + xs xspacing mul xoffset add boxwidth 2 div add + ys yspacing mul disty 2 div sub + moveto + xspacing xe xs sub mul 0 + rlineto + stroke +} def + +% ----- main ------ + +boxfont setfont +1 boundaspect scale +(OpenShaderDesigner::EventHandler< EventType >) cw +(OpenShaderDesigner::_ImplEventHandler) cw +/boxwidth boxwidth marginwidth 2 mul add def +/xspacing boxwidth distx add def +/yspacing boxheight disty add def +/scalefactor + boxwidth cols mul distx cols 1 sub mul add + boxheight rows mul disty rows 1 sub mul add boundaspect mul + max def +boundx scalefactor div boundy scalefactor div scale + +% ----- classes ----- + + (OpenShaderDesigner::EventHandler< EventType >) 0.000000 0.000000 box + (OpenShaderDesigner::_ImplEventHandler) 0.000000 1.000000 box + +% ----- relations ----- + +dotted +0 0.000000 0.000000 out +dotted +1 0.000000 1.000000 in diff --git a/Documentation/latex/class_open_shader_designer_1_1_event_handler.tex b/Documentation/latex/class_open_shader_designer_1_1_event_handler.tex new file mode 100644 index 0000000..6ab5330 --- /dev/null +++ b/Documentation/latex/class_open_shader_designer_1_1_event_handler.tex @@ -0,0 +1,64 @@ +\doxysection{Open\+Shader\+Designer\+::Event\+Handler\texorpdfstring{$<$}{<} Event\+Type \texorpdfstring{$>$}{>} Class Template Reference} +\hypertarget{class_open_shader_designer_1_1_event_handler}{}\label{class_open_shader_designer_1_1_event_handler}\index{OpenShaderDesigner::EventHandler$<$ EventType $>$@{OpenShaderDesigner::EventHandler$<$ EventType $>$}} + + +\doxylink{class_open_shader_designer_1_1_event_handler}{Event\+Handler} interface for creating custom Event\+Handlers. + + + + +{\ttfamily \#include $<$Event\+System.\+h$>$} + +Inheritance diagram for Open\+Shader\+Designer\+::Event\+Handler\texorpdfstring{$<$}{<} Event\+Type \texorpdfstring{$>$}{>}\+:\begin{figure}[H] +\begin{center} +\leavevmode +\includegraphics[height=2.000000cm]{class_open_shader_designer_1_1_event_handler} +\end{center} +\end{figure} +\doxysubsubsection*{Public Types} +\begin{DoxyCompactItemize} +\item +\Hypertarget{class_open_shader_designer_1_1_event_handler_ac7326c1ee1a04cf764475dc7c74dc021}\label{class_open_shader_designer_1_1_event_handler_ac7326c1ee1a04cf764475dc7c74dc021} +using {\bfseries Handled\+Type} = Event\+Type +\begin{DoxyCompactList}\small\item\em The type handled by the \doxylink{class_open_shader_designer_1_1_event_handler}{Event\+Handler}. \end{DoxyCompactList}\end{DoxyCompactItemize} +\doxysubsubsection*{Public Member Functions} +\begin{DoxyCompactItemize} +\item +virtual bool \mbox{\hyperlink{class_open_shader_designer_1_1_event_handler_a3f8d4130cfbb6c7b1f6be52d0d6e1fae}{Handle\+Event}} (const \mbox{\hyperlink{class_open_shader_designer_1_1_event_handler_ac7326c1ee1a04cf764475dc7c74dc021}{Handled\+Type}} \texorpdfstring{$\ast$}{*}event)=0 +\begin{DoxyCompactList}\small\item\em Virtual function for custom \doxylink{class_open_shader_designer_1_1_event_handler}{Event\+Handler} implementations. \end{DoxyCompactList}\end{DoxyCompactItemize} + + +\doxysubsection{Detailed Description} +\subsubsection*{template$<$typename Event\+Type$>$\newline +class Open\+Shader\+Designer\+::\+Event\+Handler$<$ Event\+Type $>$} +\doxylink{class_open_shader_designer_1_1_event_handler}{Event\+Handler} interface for creating custom Event\+Handlers. + + +\begin{DoxyTemplParams}{Template Parameters} +{\em Event\+Type} & The Component\+Type of \doxylink{struct_open_shader_designer_1_1_event}{Event} handled by the \doxylink{class_open_shader_designer_1_1_event_handler}{Event\+Handler} \\ +\hline +\end{DoxyTemplParams} + + +\doxysubsection{Member Function Documentation} +\Hypertarget{class_open_shader_designer_1_1_event_handler_a3f8d4130cfbb6c7b1f6be52d0d6e1fae}\index{OpenShaderDesigner::EventHandler$<$ EventType $>$@{OpenShaderDesigner::EventHandler$<$ EventType $>$}!HandleEvent@{HandleEvent}} +\index{HandleEvent@{HandleEvent}!OpenShaderDesigner::EventHandler$<$ EventType $>$@{OpenShaderDesigner::EventHandler$<$ EventType $>$}} +\doxysubsubsection{\texorpdfstring{HandleEvent()}{HandleEvent()}} +{\footnotesize\ttfamily \label{class_open_shader_designer_1_1_event_handler_a3f8d4130cfbb6c7b1f6be52d0d6e1fae} +template$<$typename Event\+Type $>$ \\ +virtual bool \mbox{\hyperlink{class_open_shader_designer_1_1_event_handler}{Open\+Shader\+Designer\+::\+Event\+Handler}}$<$ Event\+Type $>$\+::\+Handle\+Event (\begin{DoxyParamCaption}\item[{const \mbox{\hyperlink{class_open_shader_designer_1_1_event_handler_ac7326c1ee1a04cf764475dc7c74dc021}{Handled\+Type}} \texorpdfstring{$\ast$}{*}}]{event}{}\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [pure virtual]}} + + + +Virtual function for custom \doxylink{class_open_shader_designer_1_1_event_handler}{Event\+Handler} implementations. + + +\begin{DoxyParams}{Parameters} +{\em event} & The \doxylink{struct_open_shader_designer_1_1_event}{Event} being handled. \\ +\hline +\end{DoxyParams} + + +The documentation for this class was generated from the following file\+:\begin{DoxyCompactItemize} +\item +Include/\+Core/Event\+System.\+h\end{DoxyCompactItemize} diff --git a/Documentation/latex/class_open_shader_designer_1_1_event_system.tex b/Documentation/latex/class_open_shader_designer_1_1_event_system.tex new file mode 100644 index 0000000..fd2e4ac --- /dev/null +++ b/Documentation/latex/class_open_shader_designer_1_1_event_system.tex @@ -0,0 +1,65 @@ +\doxysection{Open\+Shader\+Designer\+::Event\+System Class Reference} +\hypertarget{class_open_shader_designer_1_1_event_system}{}\label{class_open_shader_designer_1_1_event_system}\index{OpenShaderDesigner::EventSystem@{OpenShaderDesigner::EventSystem}} + + +\doxylink{class_open_shader_designer_1_1_event_system}{Event\+System} for posting Events to be handled. + + + + +{\ttfamily \#include $<$Event\+System.\+h$>$} + +\doxysubsubsection*{Static Public Member Functions} +\begin{DoxyCompactItemize} +\item +\Hypertarget{class_open_shader_designer_1_1_event_system_a55942d1d9b1d427c40aeade3b0ee8600}\label{class_open_shader_designer_1_1_event_system_a55942d1d9b1d427c40aeade3b0ee8600} +static void {\bfseries Post\+Event} (const \mbox{\hyperlink{struct_open_shader_designer_1_1_event}{Event}} \texorpdfstring{$\ast$}{*}) +\begin{DoxyCompactList}\small\item\em Post an \doxylink{struct_open_shader_designer_1_1_event}{Event} to be Handled. \end{DoxyCompactList}\item +{\footnotesize template$<$typename T $>$ }\\static void \mbox{\hyperlink{class_open_shader_designer_1_1_event_system_ad7aaf19637c81922d02dafe92ff1982d}{Register\+Handler}} (\mbox{\hyperlink{class_open_shader_designer_1_1_event_handler}{Event\+Handler}}$<$ T $>$ \texorpdfstring{$\ast$}{*}) +\begin{DoxyCompactList}\small\item\em Register an \doxylink{class_open_shader_designer_1_1_event_handler}{Event\+Handler} with the \doxylink{class_open_shader_designer_1_1_event_system}{Event\+System}. \end{DoxyCompactList}\item +{\footnotesize template$<$typename T $>$ }\\static void \mbox{\hyperlink{class_open_shader_designer_1_1_event_system_a46be97970de801727824e3ac8cc93872}{Unregister\+Handler}} (\mbox{\hyperlink{class_open_shader_designer_1_1_event_handler}{Event\+Handler}}$<$ T $>$ \texorpdfstring{$\ast$}{*}) +\begin{DoxyCompactList}\small\item\em Unregister an \doxylink{class_open_shader_designer_1_1_event_handler}{Event\+Handler} with the \doxylink{class_open_shader_designer_1_1_event_system}{Event\+System}. \end{DoxyCompactList}\end{DoxyCompactItemize} + + +\doxysubsection{Detailed Description} +\doxylink{class_open_shader_designer_1_1_event_system}{Event\+System} for posting Events to be handled. + +\doxysubsection{Member Function Documentation} +\Hypertarget{class_open_shader_designer_1_1_event_system_ad7aaf19637c81922d02dafe92ff1982d}\index{OpenShaderDesigner::EventSystem@{OpenShaderDesigner::EventSystem}!RegisterHandler@{RegisterHandler}} +\index{RegisterHandler@{RegisterHandler}!OpenShaderDesigner::EventSystem@{OpenShaderDesigner::EventSystem}} +\doxysubsubsection{\texorpdfstring{RegisterHandler()}{RegisterHandler()}} +{\footnotesize\ttfamily \label{class_open_shader_designer_1_1_event_system_ad7aaf19637c81922d02dafe92ff1982d} +template$<$typename T $>$ \\ +void Open\+Shader\+Designer\+::\+Event\+System\+::\+Register\+Handler (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{class_open_shader_designer_1_1_event_handler}{Event\+Handler}}$<$ T $>$ \texorpdfstring{$\ast$}{*}}]{handler}{}\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}} + + + +Register an \doxylink{class_open_shader_designer_1_1_event_handler}{Event\+Handler} with the \doxylink{class_open_shader_designer_1_1_event_system}{Event\+System}. + + +\begin{DoxyTemplParams}{Template Parameters} +{\em T} & Component\+Type of \doxylink{struct_open_shader_designer_1_1_event}{Event} handled by the \doxylink{class_open_shader_designer_1_1_event_handler}{Event\+Handler}. \\ +\hline +\end{DoxyTemplParams} +\Hypertarget{class_open_shader_designer_1_1_event_system_a46be97970de801727824e3ac8cc93872}\index{OpenShaderDesigner::EventSystem@{OpenShaderDesigner::EventSystem}!UnregisterHandler@{UnregisterHandler}} +\index{UnregisterHandler@{UnregisterHandler}!OpenShaderDesigner::EventSystem@{OpenShaderDesigner::EventSystem}} +\doxysubsubsection{\texorpdfstring{UnregisterHandler()}{UnregisterHandler()}} +{\footnotesize\ttfamily \label{class_open_shader_designer_1_1_event_system_a46be97970de801727824e3ac8cc93872} +template$<$typename T $>$ \\ +void Open\+Shader\+Designer\+::\+Event\+System\+::\+Unregister\+Handler (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{class_open_shader_designer_1_1_event_handler}{Event\+Handler}}$<$ T $>$ \texorpdfstring{$\ast$}{*}}]{handler}{}\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}} + + + +Unregister an \doxylink{class_open_shader_designer_1_1_event_handler}{Event\+Handler} with the \doxylink{class_open_shader_designer_1_1_event_system}{Event\+System}. + + +\begin{DoxyTemplParams}{Template Parameters} +{\em T} & Component\+Type of \doxylink{struct_open_shader_designer_1_1_event}{Event} handled by the \doxylink{class_open_shader_designer_1_1_event_handler}{Event\+Handler}. \\ +\hline +\end{DoxyTemplParams} + + +The documentation for this class was generated from the following files\+:\begin{DoxyCompactItemize} +\item +Include/\+Core/Event\+System.\+h\item +Source/\+Core/Event\+System.\+cpp\end{DoxyCompactItemize} diff --git a/Documentation/latex/class_open_shader_designer_1_1_inspector.eps b/Documentation/latex/class_open_shader_designer_1_1_inspector.eps new file mode 100644 index 0000000..b9c4e95 --- /dev/null +++ b/Documentation/latex/class_open_shader_designer_1_1_inspector.eps @@ -0,0 +1,197 @@ +%!PS-Adobe-2.0 EPSF-2.0 +%%Title: ClassName +%%Creator: Doxygen +%%CreationDate: Time +%%For: +%Magnification: 1.00 +%%Orientation: Portrait +%%BoundingBox: 0 0 500 176.991150 +%%Pages: 0 +%%BeginSetup +%%EndSetup +%%EndComments + +% ----- variables ----- + +/boxwidth 0 def +/boxheight 40 def +/fontheight 24 def +/marginwidth 10 def +/distx 20 def +/disty 40 def +/boundaspect 2.825000 def % aspect ratio of the BoundingBox (width/height) +/boundx 500 def +/boundy boundx boundaspect div def +/xspacing 0 def +/yspacing 0 def +/rows 2 def +/cols 1 def +/scalefactor 0 def +/boxfont /Times-Roman findfont fontheight scalefont def + +% ----- procedures ----- + +/dotted { [1 4] 0 setdash } def +/dashed { [5] 0 setdash } def +/solid { [] 0 setdash } def + +/max % result = MAX(arg1,arg2) +{ + /a exch def + /b exch def + a b gt {a} {b} ifelse +} def + +/xoffset % result = MAX(0,(scalefactor-(boxwidth*cols+distx*(cols-1)))/2) +{ + 0 scalefactor boxwidth cols mul distx cols 1 sub mul add sub 2 div max +} def + +/cw % boxwidth = MAX(boxwidth, stringwidth(arg1)) +{ + /str exch def + /boxwidth boxwidth str stringwidth pop max def +} def + +/box % draws a box with text 'arg1' at grid pos (arg2,arg3) +{ gsave + 2 setlinewidth + newpath + exch xspacing mul xoffset add + exch yspacing mul + moveto + boxwidth 0 rlineto + 0 boxheight rlineto + boxwidth neg 0 rlineto + 0 boxheight neg rlineto + closepath + dup stringwidth pop neg boxwidth add 2 div + boxheight fontheight 2 div sub 2 div + rmoveto show stroke + grestore +} def + +/mark +{ newpath + exch xspacing mul xoffset add boxwidth add + exch yspacing mul + moveto + 0 boxheight 4 div rlineto + boxheight neg 4 div boxheight neg 4 div rlineto + closepath + eofill + stroke +} def + +/arrow +{ newpath + moveto + 3 -8 rlineto + -6 0 rlineto + 3 8 rlineto + closepath + eofill + stroke +} def + +/out % draws an output connector for the block at (arg1,arg2) +{ + newpath + exch xspacing mul xoffset add boxwidth 2 div add + exch yspacing mul boxheight add + /y exch def + /x exch def + x y moveto + 0 disty 2 div rlineto + stroke + 1 eq { x y disty 2 div add arrow } if +} def + +/in % draws an input connector for the block at (arg1,arg2) +{ + newpath + exch xspacing mul xoffset add boxwidth 2 div add + exch yspacing mul disty 2 div sub + /y exch def + /x exch def + x y moveto + 0 disty 2 div rlineto + stroke + 1 eq { x y disty 2 div add arrow } if +} def + +/hedge +{ + exch xspacing mul xoffset add boxwidth 2 div add + exch yspacing mul boxheight 2 div sub + /y exch def + /x exch def + newpath + x y moveto + boxwidth 2 div distx add 0 rlineto + stroke + 1 eq + { newpath x boxwidth 2 div distx add add y moveto + -8 3 rlineto + 0 -6 rlineto + 8 3 rlineto + closepath + eofill + stroke + } if +} def + +/vedge +{ + /ye exch def + /ys exch def + /xs exch def + newpath + xs xspacing mul xoffset add boxwidth 2 div add dup + ys yspacing mul boxheight 2 div sub + moveto + ye yspacing mul boxheight 2 div sub + lineto + stroke +} def + +/conn % connections the blocks from col 'arg1' to 'arg2' of row 'arg3' +{ + /ys exch def + /xe exch def + /xs exch def + newpath + xs xspacing mul xoffset add boxwidth 2 div add + ys yspacing mul disty 2 div sub + moveto + xspacing xe xs sub mul 0 + rlineto + stroke +} def + +% ----- main ------ + +boxfont setfont +1 boundaspect scale +(OpenShaderDesigner::Inspector) cw +(OpenShaderDesigner::EditorWindow) cw +/boxwidth boxwidth marginwidth 2 mul add def +/xspacing boxwidth distx add def +/yspacing boxheight disty add def +/scalefactor + boxwidth cols mul distx cols 1 sub mul add + boxheight rows mul disty rows 1 sub mul add boundaspect mul + max def +boundx scalefactor div boundy scalefactor div scale + +% ----- classes ----- + + (OpenShaderDesigner::Inspector) 0.000000 0.000000 box + (OpenShaderDesigner::EditorWindow) 0.000000 1.000000 box + +% ----- relations ----- + +solid +0 0.000000 0.000000 out +solid +1 0.000000 1.000000 in diff --git a/Documentation/latex/class_open_shader_designer_1_1_inspector.tex b/Documentation/latex/class_open_shader_designer_1_1_inspector.tex new file mode 100644 index 0000000..2ae42b8 --- /dev/null +++ b/Documentation/latex/class_open_shader_designer_1_1_inspector.tex @@ -0,0 +1,80 @@ +\doxysection{Open\+Shader\+Designer\+::Inspector Class Reference} +\hypertarget{class_open_shader_designer_1_1_inspector}{}\label{class_open_shader_designer_1_1_inspector}\index{OpenShaderDesigner::Inspector@{OpenShaderDesigner::Inspector}} +Inheritance diagram for Open\+Shader\+Designer\+::Inspector\+:\begin{figure}[H] +\begin{center} +\leavevmode +\includegraphics[height=2.000000cm]{class_open_shader_designer_1_1_inspector} +\end{center} +\end{figure} +\doxysubsubsection*{Public Member Functions} +\begin{DoxyCompactItemize} +\item +void \mbox{\hyperlink{class_open_shader_designer_1_1_inspector_a69fb8726df2442514a65dc29a9660c24}{Draw\+Window}} () override +\begin{DoxyCompactList}\small\item\em Draw\+Window function for when the \doxylink{class_open_shader_designer_1_1_editor_window}{Editor\+Window} is being drawn. \end{DoxyCompactList}\end{DoxyCompactItemize} +\doxysubsection*{Public Member Functions inherited from \mbox{\hyperlink{class_open_shader_designer_1_1_editor_window}{Open\+Shader\+Designer\+::\+Editor\+Window}}} +\begin{DoxyCompactItemize} +\item +void {\bfseries Open} () +\begin{DoxyCompactList}\small\item\em Open the \doxylink{class_open_shader_designer_1_1_editor_window}{Editor\+Window}. \end{DoxyCompactList}\item +void {\bfseries Draw} () +\begin{DoxyCompactList}\small\item\em Draw the \doxylink{class_open_shader_designer_1_1_editor_window}{Editor\+Window}. \end{DoxyCompactList}\item +void {\bfseries Close} () +\begin{DoxyCompactList}\small\item\em Close the \doxylink{class_open_shader_designer_1_1_editor_window}{Editor\+Window}. \end{DoxyCompactList}\item +bool \mbox{\hyperlink{class_open_shader_designer_1_1_editor_window_af3ea05326684e2f58d54805ce10570a6}{Is\+Open}} () const +\begin{DoxyCompactList}\small\item\em Check if the \doxylink{class_open_shader_designer_1_1_editor_window}{Editor\+Window} is open. \end{DoxyCompactList}\item +void {\bfseries Set\+Flags} (Im\+Gui\+Window\+Flags flags) +\item +void {\bfseries Clear\+Flags} (Im\+Gui\+Window\+Flags flags) +\item +void {\bfseries Toggle\+Flags} (Im\+Gui\+Window\+Flags flags) +\item +bool {\bfseries Check\+Flag} (Im\+Gui\+Window\+Flags flag) const +\item +bool {\bfseries Has\+Menu\+Bar} () const +\end{DoxyCompactItemize} +\doxysubsubsection*{Friends} +\begin{DoxyCompactItemize} +\item +\Hypertarget{class_open_shader_designer_1_1_inspector_a0facfccf4766c7e992504e3cc2ec0c9d}\label{class_open_shader_designer_1_1_inspector_a0facfccf4766c7e992504e3cc2ec0c9d} +class {\bfseries Shader\+Graph} +\end{DoxyCompactItemize} +\doxysubsubsection*{Additional Inherited Members} +\doxysubsection*{Public Attributes inherited from \mbox{\hyperlink{class_open_shader_designer_1_1_editor_window}{Open\+Shader\+Designer\+::\+Editor\+Window}}} +\begin{DoxyCompactItemize} +\item +const std\+::string {\bfseries Title} +\begin{DoxyCompactList}\small\item\em Title for the \doxylink{class_open_shader_designer_1_1_editor_window}{Editor\+Window}. \end{DoxyCompactList}\end{DoxyCompactItemize} +\doxysubsection*{Protected Member Functions inherited from \mbox{\hyperlink{class_open_shader_designer_1_1_editor_window}{Open\+Shader\+Designer\+::\+Editor\+Window}}} +\begin{DoxyCompactItemize} +\item +{\bfseries Editor\+Window} (const std\+::string \&title, Im\+Gui\+Window\+Flags flags) +\item +virtual void \mbox{\hyperlink{class_open_shader_designer_1_1_editor_window_a2e68f7186c2ceb3ea3dd5618045c6ab7}{On\+Open}} () +\begin{DoxyCompactList}\small\item\em On\+Open callback for when the \doxylink{class_open_shader_designer_1_1_editor_window}{Editor\+Window} is opened. \end{DoxyCompactList}\item +virtual void \mbox{\hyperlink{class_open_shader_designer_1_1_editor_window_a6c229ca70221f672315f9a4f0c7be0c0}{Draw\+Menu}} () +\begin{DoxyCompactList}\small\item\em Draw\+Menu function for when the \doxylink{class_open_shader_designer_1_1_editor_window}{Editor\+Window} Menu is being drawn. \end{DoxyCompactList}\item +virtual void {\bfseries On\+Close} () +\begin{DoxyCompactList}\small\item\em On\+Close callback for when the \doxylink{class_open_shader_designer_1_1_editor_window}{Editor\+Window} is closed. \end{DoxyCompactList}\end{DoxyCompactItemize} + + +\doxysubsection{Member Function Documentation} +\Hypertarget{class_open_shader_designer_1_1_inspector_a69fb8726df2442514a65dc29a9660c24}\index{OpenShaderDesigner::Inspector@{OpenShaderDesigner::Inspector}!DrawWindow@{DrawWindow}} +\index{DrawWindow@{DrawWindow}!OpenShaderDesigner::Inspector@{OpenShaderDesigner::Inspector}} +\doxysubsubsection{\texorpdfstring{DrawWindow()}{DrawWindow()}} +{\footnotesize\ttfamily \label{class_open_shader_designer_1_1_inspector_a69fb8726df2442514a65dc29a9660c24} +void Inspector\+::\+Draw\+Window (\begin{DoxyParamCaption}{}{}\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [override]}, {\ttfamily [virtual]}} + + + +Draw\+Window function for when the \doxylink{class_open_shader_designer_1_1_editor_window}{Editor\+Window} is being drawn. + + + +Reimplemented from \mbox{\hyperlink{class_open_shader_designer_1_1_editor_window_a058742ce762d782440f595497e5bfbff}{Open\+Shader\+Designer\+::\+Editor\+Window}}. + + + +The documentation for this class was generated from the following files\+:\begin{DoxyCompactItemize} +\item +Include/\+Graph/Shader\+Graph.\+h\item +Source/\+Graph/Shader\+Graph.\+cpp\end{DoxyCompactItemize} diff --git a/Documentation/latex/class_open_shader_designer_1_1_profiler.eps b/Documentation/latex/class_open_shader_designer_1_1_profiler.eps new file mode 100644 index 0000000..2f3436e --- /dev/null +++ b/Documentation/latex/class_open_shader_designer_1_1_profiler.eps @@ -0,0 +1,219 @@ +%!PS-Adobe-2.0 EPSF-2.0 +%%Title: ClassName +%%Creator: Doxygen +%%CreationDate: Time +%%For: +%Magnification: 1.00 +%%Orientation: Portrait +%%BoundingBox: 0 0 500 62.893082 +%%Pages: 0 +%%BeginSetup +%%EndSetup +%%EndComments + +% ----- variables ----- + +/boxwidth 0 def +/boxheight 40 def +/fontheight 24 def +/marginwidth 10 def +/distx 20 def +/disty 40 def +/boundaspect 7.950000 def % aspect ratio of the BoundingBox (width/height) +/boundx 500 def +/boundy boundx boundaspect div def +/xspacing 0 def +/yspacing 0 def +/rows 3 def +/cols 3 def +/scalefactor 0 def +/boxfont /Times-Roman findfont fontheight scalefont def + +% ----- procedures ----- + +/dotted { [1 4] 0 setdash } def +/dashed { [5] 0 setdash } def +/solid { [] 0 setdash } def + +/max % result = MAX(arg1,arg2) +{ + /a exch def + /b exch def + a b gt {a} {b} ifelse +} def + +/xoffset % result = MAX(0,(scalefactor-(boxwidth*cols+distx*(cols-1)))/2) +{ + 0 scalefactor boxwidth cols mul distx cols 1 sub mul add sub 2 div max +} def + +/cw % boxwidth = MAX(boxwidth, stringwidth(arg1)) +{ + /str exch def + /boxwidth boxwidth str stringwidth pop max def +} def + +/box % draws a box with text 'arg1' at grid pos (arg2,arg3) +{ gsave + 2 setlinewidth + newpath + exch xspacing mul xoffset add + exch yspacing mul + moveto + boxwidth 0 rlineto + 0 boxheight rlineto + boxwidth neg 0 rlineto + 0 boxheight neg rlineto + closepath + dup stringwidth pop neg boxwidth add 2 div + boxheight fontheight 2 div sub 2 div + rmoveto show stroke + grestore +} def + +/mark +{ newpath + exch xspacing mul xoffset add boxwidth add + exch yspacing mul + moveto + 0 boxheight 4 div rlineto + boxheight neg 4 div boxheight neg 4 div rlineto + closepath + eofill + stroke +} def + +/arrow +{ newpath + moveto + 3 -8 rlineto + -6 0 rlineto + 3 8 rlineto + closepath + eofill + stroke +} def + +/out % draws an output connector for the block at (arg1,arg2) +{ + newpath + exch xspacing mul xoffset add boxwidth 2 div add + exch yspacing mul boxheight add + /y exch def + /x exch def + x y moveto + 0 disty 2 div rlineto + stroke + 1 eq { x y disty 2 div add arrow } if +} def + +/in % draws an input connector for the block at (arg1,arg2) +{ + newpath + exch xspacing mul xoffset add boxwidth 2 div add + exch yspacing mul disty 2 div sub + /y exch def + /x exch def + x y moveto + 0 disty 2 div rlineto + stroke + 1 eq { x y disty 2 div add arrow } if +} def + +/hedge +{ + exch xspacing mul xoffset add boxwidth 2 div add + exch yspacing mul boxheight 2 div sub + /y exch def + /x exch def + newpath + x y moveto + boxwidth 2 div distx add 0 rlineto + stroke + 1 eq + { newpath x boxwidth 2 div distx add add y moveto + -8 3 rlineto + 0 -6 rlineto + 8 3 rlineto + closepath + eofill + stroke + } if +} def + +/vedge +{ + /ye exch def + /ys exch def + /xs exch def + newpath + xs xspacing mul xoffset add boxwidth 2 div add dup + ys yspacing mul boxheight 2 div sub + moveto + ye yspacing mul boxheight 2 div sub + lineto + stroke +} def + +/conn % connections the blocks from col 'arg1' to 'arg2' of row 'arg3' +{ + /ys exch def + /xe exch def + /xs exch def + newpath + xs xspacing mul xoffset add boxwidth 2 div add + ys yspacing mul disty 2 div sub + moveto + xspacing xe xs sub mul 0 + rlineto + stroke +} def + +% ----- main ------ + +boxfont setfont +1 boundaspect scale +(OpenShaderDesigner::Profiler) cw +(OpenShaderDesigner::EditorWindow) cw +(OpenShaderDesigner::EventHandler< BeginFrame >) cw +(OpenShaderDesigner::EventHandler< EndFrame >) cw +(OpenShaderDesigner::_ImplEventHandler) cw +(OpenShaderDesigner::_ImplEventHandler) cw +/boxwidth boxwidth marginwidth 2 mul add def +/xspacing boxwidth distx add def +/yspacing boxheight disty add def +/scalefactor + boxwidth cols mul distx cols 1 sub mul add + boxheight rows mul disty rows 1 sub mul add boundaspect mul + max def +boundx scalefactor div boundy scalefactor div scale + +% ----- classes ----- + + (OpenShaderDesigner::Profiler) 1.000000 0.000000 box + (OpenShaderDesigner::EditorWindow) 0.000000 1.000000 box + (OpenShaderDesigner::EventHandler< BeginFrame >) 1.000000 1.000000 box + (OpenShaderDesigner::EventHandler< EndFrame >) 2.000000 1.000000 box + (OpenShaderDesigner::_ImplEventHandler) 1.000000 2.000000 box + (OpenShaderDesigner::_ImplEventHandler) 2.000000 2.000000 box + +% ----- relations ----- + +solid +0 1.000000 0.000000 out +solid +0.000000 2.000000 1.000000 conn +solid +1 0.000000 1.000000 in +solid +1 1.000000 1.000000 in +dotted +0 1.000000 1.000000 out +solid +1 2.000000 1.000000 in +dotted +0 2.000000 1.000000 out +dotted +1 1.000000 2.000000 in +dotted +1 2.000000 2.000000 in diff --git a/Documentation/latex/class_open_shader_designer_1_1_profiler.tex b/Documentation/latex/class_open_shader_designer_1_1_profiler.tex new file mode 100644 index 0000000..ea2b146 --- /dev/null +++ b/Documentation/latex/class_open_shader_designer_1_1_profiler.tex @@ -0,0 +1,100 @@ +\doxysection{Open\+Shader\+Designer\+::Profiler Class Reference} +\hypertarget{class_open_shader_designer_1_1_profiler}{}\label{class_open_shader_designer_1_1_profiler}\index{OpenShaderDesigner::Profiler@{OpenShaderDesigner::Profiler}} +Inheritance diagram for Open\+Shader\+Designer\+::Profiler\+:\begin{figure}[H] +\begin{center} +\leavevmode +\includegraphics[height=1.761006cm]{class_open_shader_designer_1_1_profiler} +\end{center} +\end{figure} +\doxysubsubsection*{Public Member Functions} +\begin{DoxyCompactItemize} +\item +void \mbox{\hyperlink{class_open_shader_designer_1_1_profiler_a26186e7726d5811f423c9cee06aec1d5}{Draw\+Window}} () override +\begin{DoxyCompactList}\small\item\em Draw\+Window function for when the \doxylink{class_open_shader_designer_1_1_editor_window}{Editor\+Window} is being drawn. \end{DoxyCompactList}\item +\Hypertarget{class_open_shader_designer_1_1_profiler_a33b0ae7c4e12722d315b092ea88fae94}\label{class_open_shader_designer_1_1_profiler_a33b0ae7c4e12722d315b092ea88fae94} +bool {\bfseries Handle\+Event} (const \mbox{\hyperlink{class_open_shader_designer_1_1_event_handler}{Event\+Handler}}$<$ Begin\+Frame $>$\mbox{\hyperlink{class_open_shader_designer_1_1_event_handler_ac7326c1ee1a04cf764475dc7c74dc021}{\+::\+Handled\+Type}} \texorpdfstring{$\ast$}{*}event) override +\item +\Hypertarget{class_open_shader_designer_1_1_profiler_abd76e2e6ac5aa3a1dee9fcc99e427759}\label{class_open_shader_designer_1_1_profiler_abd76e2e6ac5aa3a1dee9fcc99e427759} +bool {\bfseries Handle\+Event} (const \mbox{\hyperlink{class_open_shader_designer_1_1_event_handler}{Event\+Handler}}$<$ End\+Frame $>$\mbox{\hyperlink{class_open_shader_designer_1_1_event_handler_ac7326c1ee1a04cf764475dc7c74dc021}{\+::\+Handled\+Type}} \texorpdfstring{$\ast$}{*}event) override +\end{DoxyCompactItemize} +\doxysubsection*{Public Member Functions inherited from \mbox{\hyperlink{class_open_shader_designer_1_1_editor_window}{Open\+Shader\+Designer\+::\+Editor\+Window}}} +\begin{DoxyCompactItemize} +\item +void {\bfseries Open} () +\begin{DoxyCompactList}\small\item\em Open the \doxylink{class_open_shader_designer_1_1_editor_window}{Editor\+Window}. \end{DoxyCompactList}\item +void {\bfseries Draw} () +\begin{DoxyCompactList}\small\item\em Draw the \doxylink{class_open_shader_designer_1_1_editor_window}{Editor\+Window}. \end{DoxyCompactList}\item +void {\bfseries Close} () +\begin{DoxyCompactList}\small\item\em Close the \doxylink{class_open_shader_designer_1_1_editor_window}{Editor\+Window}. \end{DoxyCompactList}\item +bool \mbox{\hyperlink{class_open_shader_designer_1_1_editor_window_af3ea05326684e2f58d54805ce10570a6}{Is\+Open}} () const +\begin{DoxyCompactList}\small\item\em Check if the \doxylink{class_open_shader_designer_1_1_editor_window}{Editor\+Window} is open. \end{DoxyCompactList}\item +void {\bfseries Set\+Flags} (Im\+Gui\+Window\+Flags flags) +\item +void {\bfseries Clear\+Flags} (Im\+Gui\+Window\+Flags flags) +\item +void {\bfseries Toggle\+Flags} (Im\+Gui\+Window\+Flags flags) +\item +bool {\bfseries Check\+Flag} (Im\+Gui\+Window\+Flags flag) const +\item +bool {\bfseries Has\+Menu\+Bar} () const +\end{DoxyCompactItemize} +\doxysubsection*{Public Member Functions inherited from \mbox{\hyperlink{class_open_shader_designer_1_1_event_handler}{Open\+Shader\+Designer\+::\+Event\+Handler$<$ Begin\+Frame $>$}}} +\begin{DoxyCompactItemize} +\item +virtual bool \mbox{\hyperlink{class_open_shader_designer_1_1_event_handler_a3f8d4130cfbb6c7b1f6be52d0d6e1fae}{Handle\+Event}} (const \mbox{\hyperlink{class_open_shader_designer_1_1_event_handler_ac7326c1ee1a04cf764475dc7c74dc021}{Handled\+Type}} \texorpdfstring{$\ast$}{*}event)=0 +\begin{DoxyCompactList}\small\item\em Virtual function for custom \doxylink{class_open_shader_designer_1_1_event_handler}{Event\+Handler} implementations. \end{DoxyCompactList}\end{DoxyCompactItemize} +\doxysubsection*{Public Member Functions inherited from \mbox{\hyperlink{class_open_shader_designer_1_1_event_handler}{Open\+Shader\+Designer\+::\+Event\+Handler$<$ End\+Frame $>$}}} +\begin{DoxyCompactItemize} +\item +virtual bool \mbox{\hyperlink{class_open_shader_designer_1_1_event_handler_a3f8d4130cfbb6c7b1f6be52d0d6e1fae}{Handle\+Event}} (const \mbox{\hyperlink{class_open_shader_designer_1_1_event_handler_ac7326c1ee1a04cf764475dc7c74dc021}{Handled\+Type}} \texorpdfstring{$\ast$}{*}event)=0 +\begin{DoxyCompactList}\small\item\em Virtual function for custom \doxylink{class_open_shader_designer_1_1_event_handler}{Event\+Handler} implementations. \end{DoxyCompactList}\end{DoxyCompactItemize} +\doxysubsubsection*{Additional Inherited Members} +\doxysubsection*{Public Types inherited from \mbox{\hyperlink{class_open_shader_designer_1_1_event_handler}{Open\+Shader\+Designer\+::\+Event\+Handler$<$ Begin\+Frame $>$}}} +\begin{DoxyCompactItemize} +\item +using {\bfseries Handled\+Type} +\begin{DoxyCompactList}\small\item\em The type handled by the \doxylink{class_open_shader_designer_1_1_event_handler}{Event\+Handler}. \end{DoxyCompactList}\end{DoxyCompactItemize} +\doxysubsection*{Public Types inherited from \mbox{\hyperlink{class_open_shader_designer_1_1_event_handler}{Open\+Shader\+Designer\+::\+Event\+Handler$<$ End\+Frame $>$}}} +\begin{DoxyCompactItemize} +\item +using {\bfseries Handled\+Type} +\begin{DoxyCompactList}\small\item\em The type handled by the \doxylink{class_open_shader_designer_1_1_event_handler}{Event\+Handler}. \end{DoxyCompactList}\end{DoxyCompactItemize} +\doxysubsection*{Public Attributes inherited from \mbox{\hyperlink{class_open_shader_designer_1_1_editor_window}{Open\+Shader\+Designer\+::\+Editor\+Window}}} +\begin{DoxyCompactItemize} +\item +const std\+::string {\bfseries Title} +\begin{DoxyCompactList}\small\item\em Title for the \doxylink{class_open_shader_designer_1_1_editor_window}{Editor\+Window}. \end{DoxyCompactList}\end{DoxyCompactItemize} +\doxysubsection*{Protected Member Functions inherited from \mbox{\hyperlink{class_open_shader_designer_1_1_editor_window}{Open\+Shader\+Designer\+::\+Editor\+Window}}} +\begin{DoxyCompactItemize} +\item +{\bfseries Editor\+Window} (const std\+::string \&title, Im\+Gui\+Window\+Flags flags) +\item +virtual void \mbox{\hyperlink{class_open_shader_designer_1_1_editor_window_a2e68f7186c2ceb3ea3dd5618045c6ab7}{On\+Open}} () +\begin{DoxyCompactList}\small\item\em On\+Open callback for when the \doxylink{class_open_shader_designer_1_1_editor_window}{Editor\+Window} is opened. \end{DoxyCompactList}\item +virtual void \mbox{\hyperlink{class_open_shader_designer_1_1_editor_window_a6c229ca70221f672315f9a4f0c7be0c0}{Draw\+Menu}} () +\begin{DoxyCompactList}\small\item\em Draw\+Menu function for when the \doxylink{class_open_shader_designer_1_1_editor_window}{Editor\+Window} Menu is being drawn. \end{DoxyCompactList}\item +virtual void {\bfseries On\+Close} () +\begin{DoxyCompactList}\small\item\em On\+Close callback for when the \doxylink{class_open_shader_designer_1_1_editor_window}{Editor\+Window} is closed. \end{DoxyCompactList}\end{DoxyCompactItemize} + + +\doxysubsection{Member Function Documentation} +\Hypertarget{class_open_shader_designer_1_1_profiler_a26186e7726d5811f423c9cee06aec1d5}\index{OpenShaderDesigner::Profiler@{OpenShaderDesigner::Profiler}!DrawWindow@{DrawWindow}} +\index{DrawWindow@{DrawWindow}!OpenShaderDesigner::Profiler@{OpenShaderDesigner::Profiler}} +\doxysubsubsection{\texorpdfstring{DrawWindow()}{DrawWindow()}} +{\footnotesize\ttfamily \label{class_open_shader_designer_1_1_profiler_a26186e7726d5811f423c9cee06aec1d5} +void Profiler\+::\+Draw\+Window (\begin{DoxyParamCaption}{}{}\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [override]}, {\ttfamily [virtual]}} + + + +Draw\+Window function for when the \doxylink{class_open_shader_designer_1_1_editor_window}{Editor\+Window} is being drawn. + + + +Reimplemented from \mbox{\hyperlink{class_open_shader_designer_1_1_editor_window_a058742ce762d782440f595497e5bfbff}{Open\+Shader\+Designer\+::\+Editor\+Window}}. + + + +The documentation for this class was generated from the following files\+:\begin{DoxyCompactItemize} +\item +Include/\+Editor/Profiler.\+h\item +Source/\+Editor/Profiler.\+cpp\end{DoxyCompactItemize} diff --git a/Documentation/latex/class_open_shader_designer_1_1_renderer.tex b/Documentation/latex/class_open_shader_designer_1_1_renderer.tex new file mode 100644 index 0000000..480d263 --- /dev/null +++ b/Documentation/latex/class_open_shader_designer_1_1_renderer.tex @@ -0,0 +1,7 @@ +\doxysection{Open\+Shader\+Designer\+::Renderer Class Reference} +\hypertarget{class_open_shader_designer_1_1_renderer}{}\label{class_open_shader_designer_1_1_renderer}\index{OpenShaderDesigner::Renderer@{OpenShaderDesigner::Renderer}} + + +The documentation for this class was generated from the following file\+:\begin{DoxyCompactItemize} +\item +Include/\+Core/Renderer.\+h\end{DoxyCompactItemize} diff --git a/Documentation/latex/class_open_shader_designer_1_1_shader_graph.eps b/Documentation/latex/class_open_shader_designer_1_1_shader_graph.eps new file mode 100644 index 0000000..3882848 --- /dev/null +++ b/Documentation/latex/class_open_shader_designer_1_1_shader_graph.eps @@ -0,0 +1,197 @@ +%!PS-Adobe-2.0 EPSF-2.0 +%%Title: ClassName +%%Creator: Doxygen +%%CreationDate: Time +%%For: +%Magnification: 1.00 +%%Orientation: Portrait +%%BoundingBox: 0 0 500 176.991150 +%%Pages: 0 +%%BeginSetup +%%EndSetup +%%EndComments + +% ----- variables ----- + +/boxwidth 0 def +/boxheight 40 def +/fontheight 24 def +/marginwidth 10 def +/distx 20 def +/disty 40 def +/boundaspect 2.825000 def % aspect ratio of the BoundingBox (width/height) +/boundx 500 def +/boundy boundx boundaspect div def +/xspacing 0 def +/yspacing 0 def +/rows 2 def +/cols 1 def +/scalefactor 0 def +/boxfont /Times-Roman findfont fontheight scalefont def + +% ----- procedures ----- + +/dotted { [1 4] 0 setdash } def +/dashed { [5] 0 setdash } def +/solid { [] 0 setdash } def + +/max % result = MAX(arg1,arg2) +{ + /a exch def + /b exch def + a b gt {a} {b} ifelse +} def + +/xoffset % result = MAX(0,(scalefactor-(boxwidth*cols+distx*(cols-1)))/2) +{ + 0 scalefactor boxwidth cols mul distx cols 1 sub mul add sub 2 div max +} def + +/cw % boxwidth = MAX(boxwidth, stringwidth(arg1)) +{ + /str exch def + /boxwidth boxwidth str stringwidth pop max def +} def + +/box % draws a box with text 'arg1' at grid pos (arg2,arg3) +{ gsave + 2 setlinewidth + newpath + exch xspacing mul xoffset add + exch yspacing mul + moveto + boxwidth 0 rlineto + 0 boxheight rlineto + boxwidth neg 0 rlineto + 0 boxheight neg rlineto + closepath + dup stringwidth pop neg boxwidth add 2 div + boxheight fontheight 2 div sub 2 div + rmoveto show stroke + grestore +} def + +/mark +{ newpath + exch xspacing mul xoffset add boxwidth add + exch yspacing mul + moveto + 0 boxheight 4 div rlineto + boxheight neg 4 div boxheight neg 4 div rlineto + closepath + eofill + stroke +} def + +/arrow +{ newpath + moveto + 3 -8 rlineto + -6 0 rlineto + 3 8 rlineto + closepath + eofill + stroke +} def + +/out % draws an output connector for the block at (arg1,arg2) +{ + newpath + exch xspacing mul xoffset add boxwidth 2 div add + exch yspacing mul boxheight add + /y exch def + /x exch def + x y moveto + 0 disty 2 div rlineto + stroke + 1 eq { x y disty 2 div add arrow } if +} def + +/in % draws an input connector for the block at (arg1,arg2) +{ + newpath + exch xspacing mul xoffset add boxwidth 2 div add + exch yspacing mul disty 2 div sub + /y exch def + /x exch def + x y moveto + 0 disty 2 div rlineto + stroke + 1 eq { x y disty 2 div add arrow } if +} def + +/hedge +{ + exch xspacing mul xoffset add boxwidth 2 div add + exch yspacing mul boxheight 2 div sub + /y exch def + /x exch def + newpath + x y moveto + boxwidth 2 div distx add 0 rlineto + stroke + 1 eq + { newpath x boxwidth 2 div distx add add y moveto + -8 3 rlineto + 0 -6 rlineto + 8 3 rlineto + closepath + eofill + stroke + } if +} def + +/vedge +{ + /ye exch def + /ys exch def + /xs exch def + newpath + xs xspacing mul xoffset add boxwidth 2 div add dup + ys yspacing mul boxheight 2 div sub + moveto + ye yspacing mul boxheight 2 div sub + lineto + stroke +} def + +/conn % connections the blocks from col 'arg1' to 'arg2' of row 'arg3' +{ + /ys exch def + /xe exch def + /xs exch def + newpath + xs xspacing mul xoffset add boxwidth 2 div add + ys yspacing mul disty 2 div sub + moveto + xspacing xe xs sub mul 0 + rlineto + stroke +} def + +% ----- main ------ + +boxfont setfont +1 boundaspect scale +(OpenShaderDesigner::ShaderGraph) cw +(OpenShaderDesigner::EditorWindow) cw +/boxwidth boxwidth marginwidth 2 mul add def +/xspacing boxwidth distx add def +/yspacing boxheight disty add def +/scalefactor + boxwidth cols mul distx cols 1 sub mul add + boxheight rows mul disty rows 1 sub mul add boundaspect mul + max def +boundx scalefactor div boundy scalefactor div scale + +% ----- classes ----- + + (OpenShaderDesigner::ShaderGraph) 0.000000 0.000000 box + (OpenShaderDesigner::EditorWindow) 0.000000 1.000000 box + +% ----- relations ----- + +solid +0 0.000000 0.000000 out +solid +1 0.000000 1.000000 in diff --git a/Documentation/latex/class_open_shader_designer_1_1_shader_graph.tex b/Documentation/latex/class_open_shader_designer_1_1_shader_graph.tex new file mode 100644 index 0000000..8132c16 --- /dev/null +++ b/Documentation/latex/class_open_shader_designer_1_1_shader_graph.tex @@ -0,0 +1,100 @@ +\doxysection{Open\+Shader\+Designer\+::Shader\+Graph Class Reference} +\hypertarget{class_open_shader_designer_1_1_shader_graph}{}\label{class_open_shader_designer_1_1_shader_graph}\index{OpenShaderDesigner::ShaderGraph@{OpenShaderDesigner::ShaderGraph}} +Inheritance diagram for Open\+Shader\+Designer\+::Shader\+Graph\+:\begin{figure}[H] +\begin{center} +\leavevmode +\includegraphics[height=2.000000cm]{class_open_shader_designer_1_1_shader_graph} +\end{center} +\end{figure} +\doxysubsubsection*{Public Member Functions} +\begin{DoxyCompactItemize} +\item +void \mbox{\hyperlink{class_open_shader_designer_1_1_shader_graph_ab165317b9a0b95648df1e7009c220a04}{On\+Open}} () override +\begin{DoxyCompactList}\small\item\em On\+Open callback for when the \doxylink{class_open_shader_designer_1_1_editor_window}{Editor\+Window} is opened. \end{DoxyCompactList}\item +void \mbox{\hyperlink{class_open_shader_designer_1_1_shader_graph_af028ed8ea55d12a1bb2bcf51c817398b}{Draw\+Window}} () override +\begin{DoxyCompactList}\small\item\em Draw\+Window function for when the \doxylink{class_open_shader_designer_1_1_editor_window}{Editor\+Window} is being drawn. \end{DoxyCompactList}\end{DoxyCompactItemize} +\doxysubsection*{Public Member Functions inherited from \mbox{\hyperlink{class_open_shader_designer_1_1_editor_window}{Open\+Shader\+Designer\+::\+Editor\+Window}}} +\begin{DoxyCompactItemize} +\item +void {\bfseries Open} () +\begin{DoxyCompactList}\small\item\em Open the \doxylink{class_open_shader_designer_1_1_editor_window}{Editor\+Window}. \end{DoxyCompactList}\item +void {\bfseries Draw} () +\begin{DoxyCompactList}\small\item\em Draw the \doxylink{class_open_shader_designer_1_1_editor_window}{Editor\+Window}. \end{DoxyCompactList}\item +void {\bfseries Close} () +\begin{DoxyCompactList}\small\item\em Close the \doxylink{class_open_shader_designer_1_1_editor_window}{Editor\+Window}. \end{DoxyCompactList}\item +bool \mbox{\hyperlink{class_open_shader_designer_1_1_editor_window_af3ea05326684e2f58d54805ce10570a6}{Is\+Open}} () const +\begin{DoxyCompactList}\small\item\em Check if the \doxylink{class_open_shader_designer_1_1_editor_window}{Editor\+Window} is open. \end{DoxyCompactList}\item +void {\bfseries Set\+Flags} (Im\+Gui\+Window\+Flags flags) +\item +void {\bfseries Clear\+Flags} (Im\+Gui\+Window\+Flags flags) +\item +void {\bfseries Toggle\+Flags} (Im\+Gui\+Window\+Flags flags) +\item +bool {\bfseries Check\+Flag} (Im\+Gui\+Window\+Flags flag) const +\item +bool {\bfseries Has\+Menu\+Bar} () const +\end{DoxyCompactItemize} +\doxysubsubsection*{Static Public Member Functions} +\begin{DoxyCompactItemize} +\item +\Hypertarget{class_open_shader_designer_1_1_shader_graph_ad345fe46c900a917e863df04d3ab9a0b}\label{class_open_shader_designer_1_1_shader_graph_ad345fe46c900a917e863df04d3ab9a0b} +static void {\bfseries Register} (const std\+::filesystem\+::path \&path, Constructor\+Ptr constructor) +\end{DoxyCompactItemize} +\doxysubsubsection*{Friends} +\begin{DoxyCompactItemize} +\item +\Hypertarget{class_open_shader_designer_1_1_shader_graph_a5486a5ab1c546bf41e8da20dd0b01de1}\label{class_open_shader_designer_1_1_shader_graph_a5486a5ab1c546bf41e8da20dd0b01de1} +class {\bfseries Inspector} +\end{DoxyCompactItemize} +\doxysubsubsection*{Additional Inherited Members} +\doxysubsection*{Public Attributes inherited from \mbox{\hyperlink{class_open_shader_designer_1_1_editor_window}{Open\+Shader\+Designer\+::\+Editor\+Window}}} +\begin{DoxyCompactItemize} +\item +const std\+::string {\bfseries Title} +\begin{DoxyCompactList}\small\item\em Title for the \doxylink{class_open_shader_designer_1_1_editor_window}{Editor\+Window}. \end{DoxyCompactList}\end{DoxyCompactItemize} +\doxysubsection*{Protected Member Functions inherited from \mbox{\hyperlink{class_open_shader_designer_1_1_editor_window}{Open\+Shader\+Designer\+::\+Editor\+Window}}} +\begin{DoxyCompactItemize} +\item +{\bfseries Editor\+Window} (const std\+::string \&title, Im\+Gui\+Window\+Flags flags) +\item +virtual void \mbox{\hyperlink{class_open_shader_designer_1_1_editor_window_a6c229ca70221f672315f9a4f0c7be0c0}{Draw\+Menu}} () +\begin{DoxyCompactList}\small\item\em Draw\+Menu function for when the \doxylink{class_open_shader_designer_1_1_editor_window}{Editor\+Window} Menu is being drawn. \end{DoxyCompactList}\item +virtual void {\bfseries On\+Close} () +\begin{DoxyCompactList}\small\item\em On\+Close callback for when the \doxylink{class_open_shader_designer_1_1_editor_window}{Editor\+Window} is closed. \end{DoxyCompactList}\end{DoxyCompactItemize} + + +\doxysubsection{Member Function Documentation} +\Hypertarget{class_open_shader_designer_1_1_shader_graph_af028ed8ea55d12a1bb2bcf51c817398b}\index{OpenShaderDesigner::ShaderGraph@{OpenShaderDesigner::ShaderGraph}!DrawWindow@{DrawWindow}} +\index{DrawWindow@{DrawWindow}!OpenShaderDesigner::ShaderGraph@{OpenShaderDesigner::ShaderGraph}} +\doxysubsubsection{\texorpdfstring{DrawWindow()}{DrawWindow()}} +{\footnotesize\ttfamily \label{class_open_shader_designer_1_1_shader_graph_af028ed8ea55d12a1bb2bcf51c817398b} +void Shader\+Graph\+::\+Draw\+Window (\begin{DoxyParamCaption}{}{}\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [override]}, {\ttfamily [virtual]}} + + + +Draw\+Window function for when the \doxylink{class_open_shader_designer_1_1_editor_window}{Editor\+Window} is being drawn. + + + +Reimplemented from \mbox{\hyperlink{class_open_shader_designer_1_1_editor_window_a058742ce762d782440f595497e5bfbff}{Open\+Shader\+Designer\+::\+Editor\+Window}}. + +\Hypertarget{class_open_shader_designer_1_1_shader_graph_ab165317b9a0b95648df1e7009c220a04}\index{OpenShaderDesigner::ShaderGraph@{OpenShaderDesigner::ShaderGraph}!OnOpen@{OnOpen}} +\index{OnOpen@{OnOpen}!OpenShaderDesigner::ShaderGraph@{OpenShaderDesigner::ShaderGraph}} +\doxysubsubsection{\texorpdfstring{OnOpen()}{OnOpen()}} +{\footnotesize\ttfamily \label{class_open_shader_designer_1_1_shader_graph_ab165317b9a0b95648df1e7009c220a04} +void Shader\+Graph\+::\+On\+Open (\begin{DoxyParamCaption}{}{}\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [override]}, {\ttfamily [virtual]}} + + + +On\+Open callback for when the \doxylink{class_open_shader_designer_1_1_editor_window}{Editor\+Window} is opened. + + + +Reimplemented from \mbox{\hyperlink{class_open_shader_designer_1_1_editor_window_a2e68f7186c2ceb3ea3dd5618045c6ab7}{Open\+Shader\+Designer\+::\+Editor\+Window}}. + + + +The documentation for this class was generated from the following files\+:\begin{DoxyCompactItemize} +\item +Include/\+Graph/Shader\+Graph.\+h\item +Source/\+Graph/Shader\+Graph.\+cpp\end{DoxyCompactItemize} diff --git a/Documentation/latex/class_open_shader_designer_1_1_timer.tex b/Documentation/latex/class_open_shader_designer_1_1_timer.tex new file mode 100644 index 0000000..b0faaac --- /dev/null +++ b/Documentation/latex/class_open_shader_designer_1_1_timer.tex @@ -0,0 +1,16 @@ +\doxysection{Open\+Shader\+Designer\+::Timer Class Reference} +\hypertarget{class_open_shader_designer_1_1_timer}{}\label{class_open_shader_designer_1_1_timer}\index{OpenShaderDesigner::Timer@{OpenShaderDesigner::Timer}} +\doxysubsubsection*{Public Member Functions} +\begin{DoxyCompactItemize} +\item +\Hypertarget{class_open_shader_designer_1_1_timer_aa4496039db2c2c22ebed4986048b2557}\label{class_open_shader_designer_1_1_timer_aa4496039db2c2c22ebed4986048b2557} +void {\bfseries Reset} () +\item +\Hypertarget{class_open_shader_designer_1_1_timer_af59131d64bd0effcb5193929b2f84c26}\label{class_open_shader_designer_1_1_timer_af59131d64bd0effcb5193929b2f84c26} +double {\bfseries Poll} () const +\end{DoxyCompactItemize} + + +The documentation for this class was generated from the following file\+:\begin{DoxyCompactItemize} +\item +Include/\+Utility/Timer.\+h\end{DoxyCompactItemize} diff --git a/Documentation/latex/class_open_shader_designer_1_1_window.tex b/Documentation/latex/class_open_shader_designer_1_1_window.tex new file mode 100644 index 0000000..e544574 --- /dev/null +++ b/Documentation/latex/class_open_shader_designer_1_1_window.tex @@ -0,0 +1,71 @@ +\doxysection{Open\+Shader\+Designer\+::Window Class Reference} +\hypertarget{class_open_shader_designer_1_1_window}{}\label{class_open_shader_designer_1_1_window}\index{OpenShaderDesigner::Window@{OpenShaderDesigner::Window}} +\doxysubsubsection*{Classes} +\begin{DoxyCompactItemize} +\item +struct \mbox{\hyperlink{struct_open_shader_designer_1_1_window_1_1_configuration}{Configuration}} +\end{DoxyCompactItemize} +\doxysubsubsection*{Public Types} +\begin{DoxyCompactItemize} +\item +\Hypertarget{class_open_shader_designer_1_1_window_a702515ac449f5558f8b9f56453aa697b}\label{class_open_shader_designer_1_1_window_a702515ac449f5558f8b9f56453aa697b} +enum class {\bfseries VSync\+Mode} \+: int \{ {\bfseries DISABLED} = 0 +, {\bfseries ENABLED} = 1 +, {\bfseries ADAPTIVE} = -\/1 +, {\bfseries DEFAULT} = DISABLED + \} +\item +\Hypertarget{class_open_shader_designer_1_1_window_a6d4afe17ced8640f90f00b82b4489cea}\label{class_open_shader_designer_1_1_window_a6d4afe17ced8640f90f00b82b4489cea} +enum class {\bfseries Fullscreen\+Mode} \+: int \{ {\bfseries WINDOWED} = 0 +, {\bfseries FULLSCREEN} = SDL\+\_\+\+WINDOW\+\_\+\+FULLSCREEN +, {\bfseries FULLSCREEN\+\_\+\+WINDOW} = SDL\+\_\+\+WINDOW\+\_\+\+FULLSCREEN\+\_\+\+DESKTOP + \} +\end{DoxyCompactItemize} +\doxysubsubsection*{Public Member Functions} +\begin{DoxyCompactItemize} +\item +\Hypertarget{class_open_shader_designer_1_1_window_a2a782015b95da8a453bdf241b5ccd9e4}\label{class_open_shader_designer_1_1_window_a2a782015b95da8a453bdf241b5ccd9e4} +{\bfseries Window} (const \mbox{\hyperlink{struct_open_shader_designer_1_1_window_1_1_configuration}{Configuration}} \&config) +\item +\Hypertarget{class_open_shader_designer_1_1_window_a26bd6809eafdb15ad2bc9ad2097c625f}\label{class_open_shader_designer_1_1_window_a26bd6809eafdb15ad2bc9ad2097c625f} +void {\bfseries Handle\+Events} () +\item +\Hypertarget{class_open_shader_designer_1_1_window_a57d825ad38512ac9a4b79d06be0c3b65}\label{class_open_shader_designer_1_1_window_a57d825ad38512ac9a4b79d06be0c3b65} +void {\bfseries Begin\+Frame} () +\item +\Hypertarget{class_open_shader_designer_1_1_window_a23bf99dc7ae51eacb31f71b1b1d01975}\label{class_open_shader_designer_1_1_window_a23bf99dc7ae51eacb31f71b1b1d01975} +void {\bfseries End\+Frame} () +\item +\Hypertarget{class_open_shader_designer_1_1_window_a415489122dab7f0324d716da57347315}\label{class_open_shader_designer_1_1_window_a415489122dab7f0324d716da57347315} +void {\bfseries Close} () +\item +\Hypertarget{class_open_shader_designer_1_1_window_a6b805b08491bf9b8acc62e408a764690}\label{class_open_shader_designer_1_1_window_a6b805b08491bf9b8acc62e408a764690} +bool {\bfseries Is\+Open} () const +\item +\Hypertarget{class_open_shader_designer_1_1_window_a2e3bd3b5f7911c3a2365781d571d5bfd}\label{class_open_shader_designer_1_1_window_a2e3bd3b5f7911c3a2365781d571d5bfd} +SDL\+\_\+\+Window \texorpdfstring{$\ast$}{*} {\bfseries Get\+Handle} () +\item +\Hypertarget{class_open_shader_designer_1_1_window_a0fe610a7bc102d3abed5677d0789ed25}\label{class_open_shader_designer_1_1_window_a0fe610a7bc102d3abed5677d0789ed25} +const SDL\+\_\+\+Window \texorpdfstring{$\ast$}{*} {\bfseries Get\+Handle} () const +\item +\Hypertarget{class_open_shader_designer_1_1_window_a00c2aa9fa43cf4e6a321d333f1979fdd}\label{class_open_shader_designer_1_1_window_a00c2aa9fa43cf4e6a321d333f1979fdd} +SDL\+\_\+\+GLContext {\bfseries Get\+Context} () +\item +\Hypertarget{class_open_shader_designer_1_1_window_a002e7873697812ba8c6a1ce3c0c6f6a6}\label{class_open_shader_designer_1_1_window_a002e7873697812ba8c6a1ce3c0c6f6a6} +const SDL\+\_\+\+GLContext {\bfseries Get\+Context} () const +\item +\Hypertarget{class_open_shader_designer_1_1_window_a10996328c5ed819d1025250e99b6dca3}\label{class_open_shader_designer_1_1_window_a10996328c5ed819d1025250e99b6dca3} +glm\+::ivec2 {\bfseries Size} () const +\end{DoxyCompactItemize} +\doxysubsubsection*{Static Public Attributes} +\begin{DoxyCompactItemize} +\item +\Hypertarget{class_open_shader_designer_1_1_window_a7347365722b46b380e8cc93e36ee8b8e}\label{class_open_shader_designer_1_1_window_a7347365722b46b380e8cc93e36ee8b8e} +static const \mbox{\hyperlink{struct_open_shader_designer_1_1_window_1_1_configuration}{Configuration}} {\bfseries Default\+Configuration} +\end{DoxyCompactItemize} + + +The documentation for this class was generated from the following files\+:\begin{DoxyCompactItemize} +\item +Include/\+Core/Window.\+h\item +Source/\+Core/Window.\+cpp\end{DoxyCompactItemize} diff --git a/Documentation/latex/class_optional.tex b/Documentation/latex/class_optional.tex new file mode 100644 index 0000000..376f7ad --- /dev/null +++ b/Documentation/latex/class_optional.tex @@ -0,0 +1,94 @@ +\doxysection{Optional\texorpdfstring{$<$}{<} T \texorpdfstring{$>$}{>} Class Template Reference} +\hypertarget{class_optional}{}\label{class_optional}\index{Optional$<$ T $>$@{Optional$<$ T $>$}} +\doxysubsubsection*{Public Types} +\begin{DoxyCompactItemize} +\item +\Hypertarget{class_optional_aecd74afe410cc77cde4d1a3017ec1bc4}\label{class_optional_aecd74afe410cc77cde4d1a3017ec1bc4} +using {\bfseries Type} = T +\end{DoxyCompactItemize} +\doxysubsubsection*{Public Member Functions} +\begin{DoxyCompactItemize} +\item +\Hypertarget{class_optional_a634e3cc84e3e1b4ab75dafa911055337}\label{class_optional_a634e3cc84e3e1b4ab75dafa911055337} +{\bfseries Optional} (const Type \&data) +\item +\Hypertarget{class_optional_a3d106be65145c44e6d5d4f45293c998f}\label{class_optional_a3d106be65145c44e6d5d4f45293c998f} +{\bfseries Optional} (Type \&\&data) +\item +\Hypertarget{class_optional_a8546d1a2cc3d7b78fdbb37e53724f0ba}\label{class_optional_a8546d1a2cc3d7b78fdbb37e53724f0ba} +{\bfseries Optional} (const \mbox{\hyperlink{class_optional}{Optional}} \&other)=default +\item +\Hypertarget{class_optional_a0b7120349c2c69ce9df039f3f26efc01}\label{class_optional_a0b7120349c2c69ce9df039f3f26efc01} +{\bfseries Optional} (\mbox{\hyperlink{class_optional}{Optional}} \&\&other)=default +\item +\Hypertarget{class_optional_a5e2a256a6603b4b425976396a6c8f98c}\label{class_optional_a5e2a256a6603b4b425976396a6c8f98c} +\mbox{\hyperlink{class_optional}{Optional}} \& {\bfseries operator=} (const \mbox{\hyperlink{class_optional}{Optional}} \&other)=default +\item +\Hypertarget{class_optional_a214f91bad3ce8acc954b9febd834b847}\label{class_optional_a214f91bad3ce8acc954b9febd834b847} +\mbox{\hyperlink{class_optional}{Optional}} \& {\bfseries operator=} (\mbox{\hyperlink{class_optional}{Optional}} \&\&other)=default +\item +\Hypertarget{class_optional_a8ddff20212d93046a9c174f15f63c10d}\label{class_optional_a8ddff20212d93046a9c174f15f63c10d} +Type \& {\bfseries operator=} (const Type \&data) +\item +\Hypertarget{class_optional_aa53fedacf109af763d6fb2c8bde83fe7}\label{class_optional_aa53fedacf109af763d6fb2c8bde83fe7} +Type \& {\bfseries operator=} (Type \&\&data) +\item +\Hypertarget{class_optional_a18f2c2beed54bb4628b3e345fd9c9137}\label{class_optional_a18f2c2beed54bb4628b3e345fd9c9137} +Type \& {\bfseries operator+=} (const Type \&data) +\item +\Hypertarget{class_optional_a0cb9253c2ed850b764d8abf49568b9d0}\label{class_optional_a0cb9253c2ed850b764d8abf49568b9d0} +Type \& {\bfseries operator-\/=} (const Type \&data) +\item +\Hypertarget{class_optional_aea536c51a2db2212acab199c5b84bcb4}\label{class_optional_aea536c51a2db2212acab199c5b84bcb4} +Type \& {\bfseries operator\texorpdfstring{$\ast$}{*}=} (const Type \&data) +\item +\Hypertarget{class_optional_a48978e3db73afec9e8480e041b9733ce}\label{class_optional_a48978e3db73afec9e8480e041b9733ce} +Type \& {\bfseries operator/=} (const Type \&data) +\item +\Hypertarget{class_optional_a826eee47e3ee8ff9cea926fd310dbb28}\label{class_optional_a826eee47e3ee8ff9cea926fd310dbb28} +Type \& {\bfseries operator\%=} (const Type \&data) +\item +\Hypertarget{class_optional_aab7ad99a7607834e10a0f6ff6a27cd50}\label{class_optional_aab7ad99a7607834e10a0f6ff6a27cd50} +Type \& {\bfseries operator$<$$<$=} (const Type \&data) +\item +\Hypertarget{class_optional_af7119ea926a964a53e257fa582b84122}\label{class_optional_af7119ea926a964a53e257fa582b84122} +Type \& {\bfseries operator$>$$>$=} (const Type \&data) +\item +\Hypertarget{class_optional_ad46aca91638d55ccc2546e0d2e60e5ac}\label{class_optional_ad46aca91638d55ccc2546e0d2e60e5ac} +Type \& {\bfseries operator\texorpdfstring{$\vert$}{|}=} (const Type \&data) +\item +\Hypertarget{class_optional_a4c466d39a5187b32ac6dcfa758d41fc1}\label{class_optional_a4c466d39a5187b32ac6dcfa758d41fc1} +Type \& {\bfseries operator\&=} (const Type \&data) +\item +\Hypertarget{class_optional_a74f10841200938c8f0610c57182213b4}\label{class_optional_a74f10841200938c8f0610c57182213b4} +Type \& {\bfseries operator\texorpdfstring{$^\wedge$}{\string^}=} (const Type \&data) +\item +\Hypertarget{class_optional_ac9a229deec30dcaf7243837707c36dbe}\label{class_optional_ac9a229deec30dcaf7243837707c36dbe} +bool {\bfseries operator()} () const +\item +\Hypertarget{class_optional_aa3627108a04c6248cb38f60acd958ba0}\label{class_optional_aa3627108a04c6248cb38f60acd958ba0} +{\bfseries operator Type \&} () +\item +\Hypertarget{class_optional_a3b15daf314c4ba6f53b0a742d17ef9c2}\label{class_optional_a3b15daf314c4ba6f53b0a742d17ef9c2} +{\bfseries operator const Type \&} () const +\item +\Hypertarget{class_optional_a2a1c6f47cd627fe4dc14a1a36aabc21c}\label{class_optional_a2a1c6f47cd627fe4dc14a1a36aabc21c} +Type \texorpdfstring{$\ast$}{*} {\bfseries operator-\/$>$} () +\item +\Hypertarget{class_optional_ae129401adb52e4c9d03dbd600853ab30}\label{class_optional_ae129401adb52e4c9d03dbd600853ab30} +const Type \texorpdfstring{$\ast$}{*} {\bfseries operator-\/$>$} () const +\item +\Hypertarget{class_optional_a8d482ac8adf843941735eff6d1b0b792}\label{class_optional_a8d482ac8adf843941735eff6d1b0b792} +Type \& {\bfseries operator\texorpdfstring{$\ast$}{*}} () +\item +\Hypertarget{class_optional_a64fcab55f500dfc23b0a76e4f6a75946}\label{class_optional_a64fcab55f500dfc23b0a76e4f6a75946} +const Type \& {\bfseries operator\texorpdfstring{$\ast$}{*}} () const +\item +\Hypertarget{class_optional_acbea0cf91af1697c8ae2523e6d7a3df0}\label{class_optional_acbea0cf91af1697c8ae2523e6d7a3df0} +void {\bfseries Reset} () +\end{DoxyCompactItemize} + + +The documentation for this class was generated from the following file\+:\begin{DoxyCompactItemize} +\item +Include/\+Utility/Optional.\+h\end{DoxyCompactItemize} diff --git a/Documentation/latex/doxygen.sty b/Documentation/latex/doxygen.sty new file mode 100644 index 0000000..cd6cfec --- /dev/null +++ b/Documentation/latex/doxygen.sty @@ -0,0 +1,711 @@ +\NeedsTeXFormat{LaTeX2e} +\ProvidesPackage{doxygen} + +% Packages used by this style file +\RequirePackage{alltt} +%%\RequirePackage{array} %% moved to refman.tex due to workaround for LaTex 2019 version and unmaintained tabu package +\RequirePackage{calc} +\RequirePackage{float} +%%\RequirePackage{ifthen} %% moved to refman.tex due to workaround for LaTex 2019 version and unmaintained tabu package +\RequirePackage{verbatim} +\RequirePackage[table]{xcolor} +\RequirePackage{longtable_doxygen} +\RequirePackage{tabu_doxygen} +\RequirePackage{fancyvrb} +\RequirePackage{tabularx} +\RequirePackage{multicol} +\RequirePackage{multirow} +\RequirePackage{hanging} +\RequirePackage{ifpdf} +\RequirePackage{adjustbox} +\RequirePackage{amssymb} +\RequirePackage{stackengine} +\RequirePackage{enumitem} +\RequirePackage{alphalph} +\RequirePackage[normalem]{ulem} % for strikeout, but don't modify emphasis + +%---------- Internal commands used in this style file ---------------- + +\newcommand{\ensurespace}[1]{% + \begingroup% + \setlength{\dimen@}{#1}% + \vskip\z@\@plus\dimen@% + \penalty -100\vskip\z@\@plus -\dimen@% + \vskip\dimen@% + \penalty 9999% + \vskip -\dimen@% + \vskip\z@skip% hide the previous |\vskip| from |\addvspace| + \endgroup% +} + +\newcommand{\DoxyHorRuler}[1]{% + \setlength{\parskip}{0ex plus 0ex minus 0ex}% + \ifthenelse{#1=0}% + {% + \hrule% + }% + {% + \hrulefilll% + }% +} +\newcommand{\DoxyLabelFont}{} +\newcommand{\entrylabel}[1]{% + {% + \parbox[b]{\labelwidth-4pt}{% + \makebox[0pt][l]{\DoxyLabelFont#1}% + \vspace{1.5\baselineskip}% + }% + }% +} + +\newenvironment{DoxyDesc}[1]{% + \ensurespace{4\baselineskip}% + \begin{list}{}{% + \settowidth{\labelwidth}{20pt}% + %\setlength{\parsep}{0pt}% + \setlength{\itemsep}{0pt}% + \setlength{\leftmargin}{\labelwidth+\labelsep}% + \renewcommand{\makelabel}{\entrylabel}% + }% + \item[#1]% +}{% + \end{list}% +} + +\newsavebox{\xrefbox} +\newlength{\xreflength} +\newcommand{\xreflabel}[1]{% + \sbox{\xrefbox}{#1}% + \setlength{\xreflength}{\wd\xrefbox}% + \ifthenelse{\xreflength>\labelwidth}{% + \begin{minipage}{\textwidth}% + \setlength{\parindent}{0pt}% + \hangindent=15pt\bfseries #1\vspace{1.2\itemsep}% + \end{minipage}% + }{% + \parbox[b]{\labelwidth}{\makebox[0pt][l]{\textbf{#1}}}% + }% +} + +%---------- Commands used by doxygen LaTeX output generator ---------- + +% Used by
     ... 
    +\newenvironment{DoxyPre}{% + \small% + \begin{alltt}% +}{% + \end{alltt}% + \normalsize% +} +% Necessary for redefining not defined characters, i.e. "Replacement Character" in tex output. +\newlength{\CodeWidthChar} +\newlength{\CodeHeightChar} +\settowidth{\CodeWidthChar}{?} +\settoheight{\CodeHeightChar}{?} +% Necessary for hanging indent +\newlength{\DoxyCodeWidth} + +\newcommand\DoxyCodeLine[1]{ + \ifthenelse{\equal{\detokenize{#1}}{}} + { + \vspace*{\baselineskip} + } + { + \hangpara{\DoxyCodeWidth}{1}{#1}\par + } +} + +\newcommand\NiceSpace{% + \discretionary{}{\kern\fontdimen2\font}{\kern\fontdimen2\font}% +} + +% Used by @code ... @endcode +\newenvironment{DoxyCode}[1]{% + \par% + \scriptsize% + \normalfont\ttfamily% + \rightskip0pt plus 1fil% + \settowidth{\DoxyCodeWidth}{000000}% + \settowidth{\CodeWidthChar}{?}% + \settoheight{\CodeHeightChar}{?}% + \setlength{\parskip}{0ex plus 0ex minus 0ex}% + \ifthenelse{\equal{#1}{0}} + { + {\lccode`~32 \lowercase{\global\let~}\NiceSpace}\obeyspaces% + } + { + {\lccode`~32 \lowercase{\global\let~}}\obeyspaces% + } + +}{% + \normalfont% + \normalsize% + \settowidth{\CodeWidthChar}{?}% + \settoheight{\CodeHeightChar}{?}% +} + +% Redefining not defined characters, i.e. "Replacement Character" in tex output. +\def\ucr{\adjustbox{width=\CodeWidthChar,height=\CodeHeightChar}{\stackinset{c}{}{c}{-.2pt}{% + \textcolor{white}{\sffamily\bfseries\small ?}}{% + \rotatebox{45}{$\blacksquare$}}}} + +% Used by @example, @include, @includelineno and @dontinclude +\newenvironment{DoxyCodeInclude}[1]{% + \DoxyCode{#1}% +}{% + \endDoxyCode% +} + +% Used by @verbatim ... @endverbatim +\newenvironment{DoxyVerb}{% + \par% + \footnotesize% + \verbatim% +}{% + \endverbatim% + \normalsize% +} + +% Used by @verbinclude +\newenvironment{DoxyVerbInclude}{% + \DoxyVerb% +}{% + \endDoxyVerb% +} + +% Used by numbered lists (using '-#' or
      ...
    ) +\setlistdepth{12} +\newlist{DoxyEnumerate}{enumerate}{12} +\setlist[DoxyEnumerate,1]{label=\arabic*.} +\setlist[DoxyEnumerate,2]{label=(\enumalphalphcnt*)} +\setlist[DoxyEnumerate,3]{label=\roman*.} +\setlist[DoxyEnumerate,4]{label=\enumAlphAlphcnt*.} +\setlist[DoxyEnumerate,5]{label=\arabic*.} +\setlist[DoxyEnumerate,6]{label=(\enumalphalphcnt*)} +\setlist[DoxyEnumerate,7]{label=\roman*.} +\setlist[DoxyEnumerate,8]{label=\enumAlphAlphcnt*.} +\setlist[DoxyEnumerate,9]{label=\arabic*.} +\setlist[DoxyEnumerate,10]{label=(\enumalphalphcnt*)} +\setlist[DoxyEnumerate,11]{label=\roman*.} +\setlist[DoxyEnumerate,12]{label=\enumAlphAlphcnt*.} + +% Used by bullet lists (using '-', @li, @arg, or
      ...
    ) +\setlistdepth{12} +\newlist{DoxyItemize}{itemize}{12} +\setlist[DoxyItemize]{label=\textperiodcentered} + +\setlist[DoxyItemize,1]{label=\textbullet} +\setlist[DoxyItemize,2]{label=\normalfont\bfseries \textendash} +\setlist[DoxyItemize,3]{label=\textasteriskcentered} +\setlist[DoxyItemize,4]{label=\textperiodcentered} + +% Used for check boxes +\newcommand{\DoxyUnchecked}{$\square$} +\newcommand{\DoxyChecked}{\rlap{\raisebox{0.3ex}{\hspace{0.4ex}\tiny \checkmark}}$\square$} + +% Used by description lists (using
    ...
    ) +\newenvironment{DoxyDescription}{% + \description% +}{% + \enddescription% +} + +% Used by @image, @dotfile, @dot ... @enddot, and @msc ... @endmsc +% (only if caption is specified) +\newenvironment{DoxyImage}{% + \begin{figure}[H]% + \centering% +}{% + \end{figure}% +} + +% Used by @image, @dotfile, @dot ... @enddot, and @msc ... @endmsc +% (only if no caption is specified) +\newenvironment{DoxyImageNoCaption}{% + \begin{center}% +}{% + \end{center}% +} + +% Used by @image +% (only if inline is specified) +\newenvironment{DoxyInlineImage}{% +}{% +} + +% Used by @attention +\newenvironment{DoxyAttention}[1]{% + \begin{DoxyDesc}{#1}% +}{% + \end{DoxyDesc}% +} + +% Used by @important +\newenvironment{DoxyImportant}[1]{% + \begin{DoxyDesc}{#1}% +}{% + \end{DoxyDesc}% +} + +% Used by @author and @authors +\newenvironment{DoxyAuthor}[1]{% + \begin{DoxyDesc}{#1}% +}{% + \end{DoxyDesc}% +} + +% Used by @date +\newenvironment{DoxyDate}[1]{% + \begin{DoxyDesc}{#1}% +}{% + \end{DoxyDesc}% +} + +% Used by @invariant +\newenvironment{DoxyInvariant}[1]{% + \begin{DoxyDesc}{#1}% +}{% + \end{DoxyDesc}% +} + +% Used by @note +\newenvironment{DoxyNote}[1]{% + \begin{DoxyDesc}{#1}% +}{% + \end{DoxyDesc}% +} + +% Used by @post +\newenvironment{DoxyPostcond}[1]{% + \begin{DoxyDesc}{#1}% +}{% + \end{DoxyDesc}% +} + +% Used by @pre +\newenvironment{DoxyPrecond}[1]{% + \begin{DoxyDesc}{#1}% +}{% + \end{DoxyDesc}% +} + +% Used by @copyright +\newenvironment{DoxyCopyright}[1]{% + \begin{DoxyDesc}{#1}% +}{% + \end{DoxyDesc}% +} + +% Used by @remark +\newenvironment{DoxyRemark}[1]{% + \begin{DoxyDesc}{#1}% +}{% + \end{DoxyDesc}% +} + +% Used by @return and @returns +\newenvironment{DoxyReturn}[1]{% + \begin{DoxyDesc}{#1}% +}{% + \end{DoxyDesc}% +} + +% Used by @since +\newenvironment{DoxySince}[1]{% + \begin{DoxyDesc}{#1}% +}{% + \end{DoxyDesc}% +} + +% Used by @see +\newenvironment{DoxySeeAlso}[1]{% + \begin{DoxyDesc}{#1}% +}{% + \end{DoxyDesc}% +} + +% Used by @version +\newenvironment{DoxyVersion}[1]{% + \begin{DoxyDesc}{#1}% +}{% + \end{DoxyDesc}% +} + +% Used by @warning +\newenvironment{DoxyWarning}[1]{% + \begin{DoxyDesc}{#1}% +}{% + \end{DoxyDesc}% +} + +% Used by @par and @paragraph +\newenvironment{DoxyParagraph}[1]{% + \begin{DoxyDesc}{#1}% +}{% + \end{DoxyDesc}% +} + +% Used by parameter lists +\newenvironment{DoxyParams}[2][]{% + \tabulinesep=1mm% + \par% + \ifthenelse{\equal{#1}{}}% + {\begin{longtabu*}spread 0pt [l]{|X[-1,l]|X[-1,l]|}}% name + description + {\ifthenelse{\equal{#1}{1}}% + {\begin{longtabu*}spread 0pt [l]{|X[-1,l]|X[-1,l]|X[-1,l]|}}% in/out + name + desc + {\begin{longtabu*}spread 0pt [l]{|X[-1,l]|X[-1,l]|X[-1,l]|X[-1,l]|}}% in/out + type + name + desc + } + \multicolumn{2}{l}{\hspace{-6pt}\bfseries\fontseries{bc}\selectfont\color{darkgray} #2}\\[1ex]% + \hline% + \endfirsthead% + \multicolumn{2}{l}{\hspace{-6pt}\bfseries\fontseries{bc}\selectfont\color{darkgray} #2}\\[1ex]% + \hline% + \endhead% +}{% + \end{longtabu*}% + \vspace{6pt}% +} + +% Used for fields of simple structs +\newenvironment{DoxyFields}[1]{% + \tabulinesep=1mm% + \par% + \begin{longtabu*}spread 0pt [l]{|X[-1,r]|X[-1,l]|X[-1,l]|}% + \multicolumn{3}{l}{\hspace{-6pt}\bfseries\fontseries{bc}\selectfont\color{darkgray} #1}\\[1ex]% + \hline% + \endfirsthead% + \multicolumn{3}{l}{\hspace{-6pt}\bfseries\fontseries{bc}\selectfont\color{darkgray} #1}\\[1ex]% + \hline% + \endhead% +}{% + \end{longtabu*}% + \vspace{6pt}% +} + +% Used for fields simple class style enums +\newenvironment{DoxyEnumFields}[1]{% + \tabulinesep=1mm% + \par% + \begin{longtabu*}spread 0pt [l]{|X[-1,r]|X[-1,l]|}% + \multicolumn{2}{l}{\hspace{-6pt}\bfseries\fontseries{bc}\selectfont\color{darkgray} #1}\\[1ex]% + \hline% + \endfirsthead% + \multicolumn{2}{l}{\hspace{-6pt}\bfseries\fontseries{bc}\selectfont\color{darkgray} #1}\\[1ex]% + \hline% + \endhead% +}{% + \end{longtabu*}% + \vspace{6pt}% +} + +% Used for parameters within a detailed function description +\newenvironment{DoxyParamCaption}{% + \renewcommand{\item}[3][]{\\ \hspace*{2.0cm} ##1 {\em ##2}##3}% +}{% +} + +% Used by return value lists +\newenvironment{DoxyRetVals}[1]{% + \tabulinesep=1mm% + \par% + \begin{longtabu*}spread 0pt [l]{|X[-1,r]|X[-1,l]|}% + \multicolumn{2}{l}{\hspace{-6pt}\bfseries\fontseries{bc}\selectfont\color{darkgray} #1}\\[1ex]% + \hline% + \endfirsthead% + \multicolumn{2}{l}{\hspace{-6pt}\bfseries\fontseries{bc}\selectfont\color{darkgray} #1}\\[1ex]% + \hline% + \endhead% +}{% + \end{longtabu*}% + \vspace{6pt}% +} + +% Used by exception lists +\newenvironment{DoxyExceptions}[1]{% + \tabulinesep=1mm% + \par% + \begin{longtabu*}spread 0pt [l]{|X[-1,r]|X[-1,l]|}% + \multicolumn{2}{l}{\hspace{-6pt}\bfseries\fontseries{bc}\selectfont\color{darkgray} #1}\\[1ex]% + \hline% + \endfirsthead% + \multicolumn{2}{l}{\hspace{-6pt}\bfseries\fontseries{bc}\selectfont\color{darkgray} #1}\\[1ex]% + \hline% + \endhead% +}{% + \end{longtabu*}% + \vspace{6pt}% +} + +% Used by template parameter lists +\newenvironment{DoxyTemplParams}[1]{% + \tabulinesep=1mm% + \par% + \begin{longtabu*}spread 0pt [l]{|X[-1,r]|X[-1,l]|}% + \multicolumn{2}{l}{\hspace{-6pt}\bfseries\fontseries{bc}\selectfont\color{darkgray} #1}\\[1ex]% + \hline% + \endfirsthead% + \multicolumn{2}{l}{\hspace{-6pt}\bfseries\fontseries{bc}\selectfont\color{darkgray} #1}\\[1ex]% + \hline% + \endhead% +}{% + \end{longtabu*}% + \vspace{6pt}% +} + +% Used for member lists +\newenvironment{DoxyCompactItemize}{% + \begin{itemize}% + \setlength{\itemsep}{-3pt}% + \setlength{\parsep}{0pt}% + \setlength{\topsep}{0pt}% + \setlength{\partopsep}{0pt}% +}{% + \end{itemize}% +} + +% Used for member descriptions +\newenvironment{DoxyCompactList}{% + \begin{list}{}{% + \setlength{\leftmargin}{0.5cm}% + \setlength{\itemsep}{0pt}% + \setlength{\parsep}{0pt}% + \setlength{\topsep}{0pt}% + \renewcommand{\makelabel}{\hfill}% + }% +}{% + \end{list}% +} + +% Used for reference lists (@bug, @deprecated, @todo, etc.) +\newenvironment{DoxyRefList}{% + \begin{list}{}{% + \setlength{\labelwidth}{10pt}% + \setlength{\leftmargin}{\labelwidth}% + \addtolength{\leftmargin}{\labelsep}% + \renewcommand{\makelabel}{\xreflabel}% + }% +}{% + \end{list}% +} + +% Used by @bug, @deprecated, @todo, etc. +\newenvironment{DoxyRefDesc}[1]{% + \begin{list}{}{% + \renewcommand\makelabel[1]{\textbf{##1}}% + \settowidth\labelwidth{\makelabel{#1}}% + \setlength\leftmargin{\labelwidth+\labelsep}% + }% +}{% + \end{list}% +} + +% Used by parameter lists and simple sections +\newenvironment{Desc} +{\begin{list}{}{% + \settowidth{\labelwidth}{20pt}% + \setlength{\parsep}{0pt}% + \setlength{\itemsep}{0pt}% + \setlength{\leftmargin}{\labelwidth+\labelsep}% + \renewcommand{\makelabel}{\entrylabel}% + } +}{% + \end{list}% +} + +% Used by tables +\newcommand{\PBS}[1]{\let\temp=\\#1\let\\=\temp}% +\newenvironment{TabularC}[1]% +{\tabulinesep=1mm +\begin{longtabu*}spread 0pt [c]{*#1{|X[-1]}|}}% +{\end{longtabu*}\par}% + +\newenvironment{TabularNC}[1]% +{\begin{tabu}spread 0pt [l]{*#1{|X[-1]}|}}% +{\end{tabu}\par}% + +% Used for member group headers +\newenvironment{Indent}{% + \begin{list}{}{% + \setlength{\leftmargin}{0.5cm}% + }% + \item[]\ignorespaces% +}{% + \unskip% + \end{list}% +} + +% Used when hyperlinks are turned on +\newcommand{\doxylink}[2]{% + \mbox{\hyperlink{#1}{#2}}% +} + +% Used when hyperlinks are turned on +% Third argument is the SectionType, see the doxygen internal +% documentation for the values (relevant: Page ... Subsubsection). +\newcommand{\doxysectlink}[3]{% + \mbox{\hyperlink{#1}{#2}}% +} +% Used when hyperlinks are turned off +\newcommand{\doxyref}[3]{% + \textbf{#1} (\textnormal{#2}\,\pageref{#3})% +} + +% Used when hyperlinks are turned off +% Fourth argument is the SectionType, see the doxygen internal +% documentation for the values (relevant: Page ... Subsubsection). +\newcommand{\doxysectref}[4]{% + \textbf{#1} (\textnormal{#2}\,\pageref{#3})% +} + +% Used to link to a table when hyperlinks are turned on +\newcommand{\doxytablelink}[2]{% + \ref{#1}% +} + +% Used to link to a table when hyperlinks are turned off +\newcommand{\doxytableref}[3]{% + \ref{#3}% +} + +% Used by @addindex +\newcommand{\lcurly}{\{} +\newcommand{\rcurly}{\}} + +% Colors used for syntax highlighting +\definecolor{comment}{rgb}{0.5,0.0,0.0} +\definecolor{keyword}{rgb}{0.0,0.5,0.0} +\definecolor{keywordtype}{rgb}{0.38,0.25,0.125} +\definecolor{keywordflow}{rgb}{0.88,0.5,0.0} +\definecolor{preprocessor}{rgb}{0.5,0.38,0.125} +\definecolor{stringliteral}{rgb}{0.0,0.125,0.25} +\definecolor{charliteral}{rgb}{0.0,0.5,0.5} +\definecolor{xmlcdata}{rgb}{0.0,0.0,0.0} +\definecolor{vhdldigit}{rgb}{1.0,0.0,1.0} +\definecolor{vhdlkeyword}{rgb}{0.43,0.0,0.43} +\definecolor{vhdllogic}{rgb}{1.0,0.0,0.0} +\definecolor{vhdlchar}{rgb}{0.0,0.0,0.0} + +% Color used for table heading +\newcommand{\tableheadbgcolor}{lightgray}% + +% Version of hypertarget with correct landing location +\newcommand{\Hypertarget}[1]{\Hy@raisedlink{\hypertarget{#1}{}}} + +% possibility to have sections etc. be within the margins +% unfortunately had to copy part of book.cls and add \raggedright +\makeatletter +\newcounter{subsubsubsection}[subsubsection] +\newcounter{subsubsubsubsection}[subsubsubsection] +\newcounter{subsubsubsubsubsection}[subsubsubsubsection] +\newcounter{subsubsubsubsubsubsection}[subsubsubsubsubsection] +\renewcommand{\thesubsubsubsection}{\thesubsubsection.\arabic{subsubsubsection}} +\renewcommand{\thesubsubsubsubsection}{\thesubsubsubsection.\arabic{subsubsubsubsection}} +\renewcommand{\thesubsubsubsubsubsection}{\thesubsubsubsubsection.\arabic{subsubsubsubsubsection}} +\renewcommand{\thesubsubsubsubsubsubsection}{\thesubsubsubsubsubsection.\arabic{subsubsubsubsubsubsection}} +\newcommand{\subsubsubsectionmark}[1]{} +\newcommand{\subsubsubsubsectionmark}[1]{} +\newcommand{\subsubsubsubsubsectionmark}[1]{} +\newcommand{\subsubsubsubsubsubsectionmark}[1]{} +\def\toclevel@subsubsubsection{4} +\def\toclevel@subsubsubsubsection{5} +\def\toclevel@subsubsubsubsubsection{6} +\def\toclevel@subsubsubsubsubsubsection{7} +\def\toclevel@paragraph{8} +\def\toclevel@subparagraph{9} + +\newcommand\doxysection{\@startsection {section}{1}{\z@}% + {-3.5ex \@plus -1ex \@minus -.2ex}% + {2.3ex \@plus.2ex}% + {\raggedright\normalfont\Large\bfseries}} +\newcommand\doxysubsection{\@startsection{subsection}{2}{\z@}% + {-3.25ex\@plus -1ex \@minus -.2ex}% + {1.5ex \@plus .2ex}% + {\raggedright\normalfont\large\bfseries}} +\newcommand\doxysubsubsection{\@startsection{subsubsection}{3}{\z@}% + {-3.25ex\@plus -1ex \@minus -.2ex}% + {1.5ex \@plus .2ex}% + {\raggedright\normalfont\normalsize\bfseries}} +\newcommand\doxysubsubsubsection{\@startsection{subsubsubsection}{4}{\z@}% + {-3.25ex\@plus -1ex \@minus -.2ex}% + {1.5ex \@plus .2ex}% + {\raggedright\normalfont\normalsize\bfseries}} +\newcommand\doxysubsubsubsubsection{\@startsection{subsubsubsubsection}{5}{\z@}% + {-3.25ex\@plus -1ex \@minus -.2ex}% + {1.5ex \@plus .2ex}% + {\raggedright\normalfont\normalsize\bfseries}} +\newcommand\doxysubsubsubsubsubsection{\@startsection{subsubsubsubsubsection}{6}{\z@}% + {-3.25ex\@plus -1ex \@minus -.2ex}% + {1.5ex \@plus .2ex}% + {\raggedright\normalfont\normalsize\bfseries}} +\newcommand\doxysubsubsubsubsubsubsection{\@startsection{subsubsubsubsubsubsection}{7}{\z@}% + {-3.25ex\@plus -1ex \@minus -.2ex}% + {1.5ex \@plus .2ex}% + {\raggedright\normalfont\normalsize\bfseries}} +\newcommand\doxyparagraph{\@startsection{paragraph}{8}{\z@}% + {-3.25ex\@plus -1ex \@minus -.2ex}% + {1.5ex \@plus .2ex}% + {\raggedright\normalfont\normalsize\bfseries}} +\newcommand\doxysubparagraph{\@startsection{subparagraph}{9}{\parindent}% + {-3.25ex\@plus -1ex \@minus -.2ex}% + {1.5ex \@plus .2ex}% + {\raggedright\normalfont\normalsize\bfseries}} + +\newcommand\l@subsubsubsection{\@dottedtocline{4}{6.1em}{7.8em}} +\newcommand\l@subsubsubsubsection{\@dottedtocline{5}{6.1em}{9.4em}} +\newcommand\l@subsubsubsubsubsection{\@dottedtocline{6}{6.1em}{11em}} +\newcommand\l@subsubsubsubsubsubsection{\@dottedtocline{7}{6.1em}{12.6em}} +\renewcommand\l@paragraph{\@dottedtocline{8}{6.1em}{14.2em}} +\renewcommand\l@subparagraph{\@dottedtocline{9}{6.1em}{15.8em}} +\makeatother +% the sectsty doesn't look to be maintained but gives, in our case, some warning like: +% LaTeX Warning: Command \underline has changed. +% Check if current package is valid. +% unfortunately had to copy the relevant part +\newcommand*{\doxypartfont} [1] + {\gdef\SS@partnumberfont{\SS@sectid{0}\SS@nopart\SS@makeulinepartchap#1} + \gdef\SS@parttitlefont{\SS@sectid{0}\SS@titlepart\SS@makeulinepartchap#1}} +\newcommand*{\doxychapterfont} [1] + {\gdef\SS@chapnumfont{\SS@sectid{1}\SS@nopart\SS@makeulinepartchap#1} + \gdef\SS@chaptitlefont{\SS@sectid{1}\SS@titlepart\SS@makeulinepartchap#1}} +\newcommand*{\doxysectionfont} [1] + {\gdef\SS@sectfont{\SS@sectid{2}\SS@rr\SS@makeulinesect#1}} +\newcommand*{\doxysubsectionfont} [1] + {\gdef\SS@subsectfont{\SS@sectid{3}\SS@rr\SS@makeulinesect#1}} +\newcommand*{\doxysubsubsectionfont} [1] + {\gdef\SS@subsubsectfont{\SS@sectid{4}\SS@rr\SS@makeulinesect#1}} +\newcommand*{\doxyparagraphfont} [1] + {\gdef\SS@parafont{\SS@sectid{5}\SS@rr\SS@makeulinesect#1}} +\newcommand*{\doxysubparagraphfont} [1] + {\gdef\SS@subparafont{\SS@sectid{6}\SS@rr\SS@makeulinesect#1}} +\newcommand*{\doxyminisecfont} [1] + {\gdef\SS@minisecfont{\SS@sectid{7}\SS@rr\SS@makeulinepartchap#1}} +\newcommand*{\doxyallsectionsfont} [1] {\doxypartfont{#1}% + \doxychapterfont{#1}% + \doxysectionfont{#1}% + \doxysubsectionfont{#1}% + \doxysubsubsectionfont{#1}% + \doxyparagraphfont{#1}% + \doxysubparagraphfont{#1}% + \doxyminisecfont{#1}}% +% Define caption that is also suitable in a table +% for usage with hyperlinks +\makeatletter +\def\doxyfigcaption{% +\H@refstepcounter{figure}% +\@dblarg{\@caption{figure}}} + +% for usage without hyperlinks +\def\doxyfigcaptionnolink{% +\refstepcounter{figure}% +\@dblarg{\@caption{figure}}} +\makeatother + +% Define alpha enumarative names for counters > 26 +\makeatletter +\def\enumalphalphcnt#1{\expandafter\@enumalphalphcnt\csname c@#1\endcsname} +\def\@enumalphalphcnt#1{\alphalph{#1}} +\def\enumAlphAlphcnt#1{\expandafter\@enumAlphAlphcnt\csname c@#1\endcsname} +\def\@enumAlphAlphcnt#1{\AlphAlph{#1}} +\makeatother +\AddEnumerateCounter{\enumalphalphcnt}{\@enumalphalphcnt}{aa} +\AddEnumerateCounter{\enumAlphAlphcnt}{\@enumAlphAlphcnt}{AA} diff --git a/Documentation/latex/etoc_doxygen.sty b/Documentation/latex/etoc_doxygen.sty new file mode 100644 index 0000000..5f7e127 --- /dev/null +++ b/Documentation/latex/etoc_doxygen.sty @@ -0,0 +1,2178 @@ +%% +%% This is file etoc_doxygen.sty +%% +%% Apart from this header notice and the renaming from etoc to +%% etoc_doxygen (also in \ProvidesPackage) it is an identical +%% copy of +%% +%% etoc.sty +%% +%% at version 1.2b of 2023/07/01. +%% +%% This file has been provided to Doxygen team courtesy of the +%% author for benefit of users having a LaTeX installation not +%% yet providing version 1.2a or later of etoc, whose +%% deeplevels feature is required. +%% +%% The original source etoc.dtx (only of the latest version at +%% any given time) is available at +%% +%% https://ctan.org/pkg/etoc +%% +%% and contains the terms for copying and modification as well +%% as author contact information. +%% +%% In brief any modified versions of this file must be renamed +%% with new filenames distinct from etoc.sty. +%% +%% Package: etoc +%% Version: 1.2b +%% License: LPPL 1.3c +%% Copyright (C) 2012-2023 Jean-Francois B. +\NeedsTeXFormat{LaTeX2e}[2003/12/01] +\ProvidesPackage{etoc_doxygen}[2023/07/01 v1.2b Completely customisable TOCs (JFB)] +\newif\ifEtoc@oldLaTeX +\@ifl@t@r\fmtversion{2020/10/01} + {} + {\Etoc@oldLaTeXtrue + \PackageInfo{etoc}{Old LaTeX (\fmtversion) detected!\MessageBreak + Since 1.1a (2023/01/14), etoc prefers LaTeX at least\MessageBreak + as recent as 2020-10-01, for reasons of the .toc file,\MessageBreak + and used to require it (from 1.1a to 1.2).\MessageBreak + This etoc (1.2b) does not *require* it, but has not been\MessageBreak + tested thoroughly on old LaTeX (especially if document\MessageBreak + does not use hyperref) and retrofitting was done only\MessageBreak + on basis of author partial remembrances of old context.\MessageBreak + Reported}} +\RequirePackage{kvoptions} +\SetupKeyvalOptions{prefix=Etoc@} +\newif\ifEtoc@lof +\DeclareVoidOption{lof}{\Etoc@loftrue + \PackageInfo{etoc}{Experimental support for \string\locallistoffigures.\MessageBreak + Barely tested, use at own risk}% +} +\newif\ifEtoc@lot +\DeclareVoidOption{lot}{\Etoc@lottrue + \PackageInfo{etoc}{Experimental support for \string\locallistoftables.\MessageBreak + Barely tested, use at own risk}% +} +\@ifclassloaded{memoir}{ +\PackageInfo{etoc} + {As this is with memoir class, all `...totoc' options\MessageBreak + are set true by default. Reported} +\DeclareBoolOption[true]{maintoctotoc} +\DeclareBoolOption[true]{localtoctotoc} +\DeclareBoolOption[true]{localloftotoc} +\DeclareBoolOption[true]{locallottotoc} +}{ +\DeclareBoolOption[false]{maintoctotoc} +\DeclareBoolOption[false]{localtoctotoc} +\DeclareBoolOption[false]{localloftotoc} +\DeclareBoolOption[false]{locallottotoc} +} +\DeclareBoolOption[true]{ouroboros} +\DeclareBoolOption[false]{deeplevels} +\DeclareDefaultOption{\PackageWarning{etoc}{Option `\CurrentOption' is unknown.}} +\ProcessKeyvalOptions* +\DisableKeyvalOption[action=error,package=etoc]{etoc}{lof} +\DisableKeyvalOption[action=error,package=etoc]{etoc}{lot} +\DisableKeyvalOption[action=error,package=etoc]{etoc}{deeplevels} +\def\etocsetup#1{\setkeys{etoc}{#1}} +\def\etocifmaintoctotoc{\ifEtoc@maintoctotoc + \expandafter\@firstoftwo + \else + \expandafter\@secondoftwo + \fi} +\def\etociflocaltoctotoc{\ifEtoc@localtoctotoc + \expandafter\@firstoftwo + \else + \expandafter\@secondoftwo + \fi} +\def\etociflocalloftotoc{\ifEtoc@localloftotoc + \expandafter\@firstoftwo + \else + \expandafter\@secondoftwo + \fi} +\def\etociflocallottotoc{\ifEtoc@locallottotoc + \expandafter\@firstoftwo + \else + \expandafter\@secondoftwo + \fi} +\RequirePackage{multicol} +\def\etoc@{\etoc@} +\long\def\Etoc@gobtoetoc@ #1\etoc@{} +\newtoks\Etoc@toctoks +\def\Etoc@par{\par} +\def\etocinline{\def\Etoc@par{}} +\let\etocnopar\etocinline +\def\etocdisplay{\def\Etoc@par{\par}} +\let\Etoc@global\@empty +\def\etocglobaldefs{\let\Etoc@global\global\let\tof@global\global} +\def\etoclocaldefs {\let\Etoc@global\@empty\let\tof@global\@empty} +\newif\ifEtoc@numbered +\newif\ifEtoc@hyperref +\newif\ifEtoc@parskip +\newif\ifEtoc@tocwithid +\newif\ifEtoc@standardlines +\newif\ifEtoc@etocstyle +\newif\ifEtoc@classstyle +\newif\ifEtoc@keeporiginaltoc +\newif\ifEtoc@skipprefix +\newif\ifEtoc@isfirst +\newif\ifEtoc@localtoc +\newif\ifEtoc@skipthisone +\newif\ifEtoc@stoptoc +\newif\ifEtoc@notactive +\newif\ifEtoc@mustclosegroup +\newif\ifEtoc@isemptytoc +\newif\ifEtoc@checksemptiness +\def\etocchecksemptiness {\Etoc@checksemptinesstrue } +\def\etocdoesnotcheckemptiness {\Etoc@checksemptinessfalse } +\newif\ifEtoc@notocifnotoc +\def\etocnotocifnotoc {\Etoc@checksemptinesstrue\Etoc@notocifnotoctrue } +\newcounter{etoc@tocid} +\def\Etoc@tocext{toc} +\def\Etoc@lofext{lof} +\def\Etoc@lotext{lot} +\let\Etoc@currext\Etoc@tocext +\def\etocifislocal{\ifEtoc@localtoc\expandafter\@firstoftwo\else + \expandafter\@secondoftwo\fi + } +\def\etocifislocaltoc{\etocifislocal{\ifx\Etoc@currext\Etoc@tocext + \expandafter\@firstoftwo\else + \expandafter\@secondoftwo\fi}% + {\@secondoftwo}% + } +\def\etocifislocallof{\etocifislocal{\ifx\Etoc@currext\Etoc@lofext + \expandafter\@firstoftwo\else + \expandafter\@secondoftwo\fi}% + {\@secondoftwo}% + } +\def\etocifislocallot{\etocifislocal{\ifx\Etoc@currext\Etoc@lotext + \expandafter\@firstoftwo\else + \expandafter\@secondoftwo\fi}% + {\@secondoftwo}% + } +\expandafter\def\csname Etoc@-3@@\endcsname {-\thr@@} +\expandafter\def\csname Etoc@-2@@\endcsname {-\tw@} +\expandafter\let\csname Etoc@-1@@\endcsname \m@ne +\expandafter\let\csname Etoc@0@@\endcsname \z@ +\expandafter\let\csname Etoc@1@@\endcsname \@ne +\expandafter\let\csname Etoc@2@@\endcsname \tw@ +\expandafter\let\csname Etoc@3@@\endcsname \thr@@ +\expandafter\chardef\csname Etoc@4@@\endcsname 4 +\expandafter\chardef\csname Etoc@5@@\endcsname 5 +\expandafter\chardef\csname Etoc@6@@\endcsname 6 +\ifEtoc@deeplevels + \expandafter\chardef\csname Etoc@7@@\endcsname 7 + \expandafter\chardef\csname Etoc@8@@\endcsname 8 + \expandafter\chardef\csname Etoc@9@@\endcsname 9 + \expandafter\chardef\csname Etoc@10@@\endcsname 10 + \expandafter\chardef\csname Etoc@11@@\endcsname 11 + \expandafter\chardef\csname Etoc@12@@\endcsname 12 +\fi +\expandafter\let\expandafter\Etoc@maxlevel + \csname Etoc@\ifEtoc@deeplevels12\else6\fi @@\endcsname +\edef\etocthemaxlevel{\number\Etoc@maxlevel} +\@ifclassloaded{memoir}{\def\Etoc@minf{-\thr@@}}{\def\Etoc@minf{-\tw@}} +\let\Etoc@none@@ \Etoc@minf +\expandafter\let\expandafter\Etoc@all@@ + \csname Etoc@\ifEtoc@deeplevels11\else5\fi @@\endcsname +\let\Etoc@dolevels\@empty +\def\Etoc@newlevel #1{\expandafter\def\expandafter\Etoc@dolevels\expandafter + {\Etoc@dolevels\Etoc@do{#1}}} +\ifdefined\expanded + \def\etocsetlevel#1#2{\expanded{\noexpand\etoc@setlevel{#1}{#2}}}% +\else + \def\etocsetlevel#1#2{{\edef\Etoc@tmp{\noexpand\etoc@setlevel{#1}{#2}}\expandafter}\Etoc@tmp}% +\fi +\def\etoc@setlevel#1#2{% + \edef\Etoc@tmp{\the\numexpr#2}% + \if1\ifnum\Etoc@tmp>\Etoc@maxlevel0\fi\unless\ifnum\Etoc@minf<\Etoc@tmp;\fi1% + \ifEtoc@deeplevels + \in@{.#1,}{.none,.all,.figure,.table,.-3,.-2,.-1,.0,.1,.2,.3,.4,.5,.6,% + .7,.8,.9,.10,.11,.12,}% + \else + \in@{.#1,}{.none,.all,.figure,.table,.-3,.-2,.-1,.0,.1,.2,.3,.4,.5,.6,}% + \fi + \ifin@\else\if\@car#1\@nil @\in@true\fi\fi + \ifin@ + \PackageWarning{etoc} + {Sorry, but `#1' is forbidden as level name.\MessageBreak + \if\@car#1\@nil @% + (because of the @ as first character)\MessageBreak\fi + Reported}% + \else + \etocifunknownlevelTF{#1}{\Etoc@newlevel{#1}}{}% + \expandafter\let\csname Etoc@#1@@\expandafter\endcsname + \csname Etoc@\Etoc@tmp @@\endcsname + \expandafter\edef\csname Etoc@@#1@@\endcsname + {\expandafter\noexpand\csname Etoc@#1@@\endcsname}% + \expandafter\edef\csname toclevel@@#1\endcsname + {\expandafter\noexpand\csname toclevel@#1\endcsname}% + \fi + \else + \PackageWarning{etoc} + {Argument `\detokenize{#2}' of \string\etocsetlevel\space should + represent one of\MessageBreak + \ifnum\Etoc@minf=-\thr@@-2, \fi-1, 0, 1, 2, \ifEtoc@deeplevels ...\else3, 4\fi, + \the\numexpr\Etoc@maxlevel-1, or \number\Etoc@maxlevel\space + but evaluates to \Etoc@tmp.\MessageBreak + The level of `#1' will be set to \number\Etoc@maxlevel.\MessageBreak + Tables of contents will ignore `#1' as long\MessageBreak + as its level is \number\Etoc@maxlevel\space (=\string\etocthemaxlevel).% + \MessageBreak + Reported}% + \etocifunknownlevelTF{#1}{\Etoc@newlevel{#1}}{}% + \expandafter\let\csname Etoc@#1@@\endcsname\Etoc@maxlevel + \fi +} +\def\etoclevel#1{\csname Etoc@#1@@\endcsname} +\def\etocthelevel#1{\number\csname Etoc@#1@@\endcsname} +\def\etocifunknownlevelTF#1{\@ifundefined{Etoc@#1@@}} +\@ifclassloaded{memoir}{\etocsetlevel{book}{-2}}{} +\etocsetlevel{part}{-1} +\etocsetlevel{chapter}{0} +\etocsetlevel{section}{1} +\etocsetlevel{subsection}{2} +\etocsetlevel{subsubsection}{3} +\etocsetlevel{paragraph}{4} +\etocsetlevel{subparagraph}{5} +\ifdefined\c@chapter + \etocsetlevel{appendix}{0} +\else + \etocsetlevel{appendix}{1} +\fi +\def\Etoc@do#1{\@namedef{l@@#1}{\csname l@#1\endcsname}} +\Etoc@dolevels +\let\Etoc@figure@@\Etoc@maxlevel +\let\Etoc@table@@ \Etoc@maxlevel +\let\Etoc@gobblethreeorfour\@gobblefour +\ifdefined\@gobblethree + \let\Etoc@gobblethree\@gobblethree +\else + \long\def\Etoc@gobblethree#1#2#3{}% +\fi +\AtBeginDocument{% +\@ifpackageloaded{parskip}{\Etoc@parskiptrue}{}% +\@ifpackageloaded{hyperref} + {\Etoc@hyperreftrue} + {\ifEtoc@oldLaTeX + \let\Etoc@gobblethreeorfour\Etoc@gobblethree + \let\Etoc@etoccontentsline@fourargs\Etoc@etoccontentsline@ + \long\def\Etoc@etoccontentsline@#1#2#3{% + \Etoc@etoccontentsline@fourargs{#1}{#2}{#3}{}% + }% + \fi + }% +} +\def\etocskipfirstprefix {\global\Etoc@skipprefixtrue } +\def\Etoc@updatestackofends#1\etoc@{\gdef\Etoc@stackofends{#1}} +\def\Etoc@stackofends{{-3}{}} +\def\Etoc@doendsandbegin{% + \expandafter\Etoc@traversestackofends\Etoc@stackofends\etoc@ +} +\def\Etoc@traversestackofends#1{% + \ifnum#1>\Etoc@level + \csname Etoc@end@#1\endcsname + \expandafter\Etoc@traversestackofends + \else + \Etoc@traversestackofends@done{#1}% + \fi +} +\def\Etoc@traversestackofends@done#1#2{#2% + \ifnum#1<\Etoc@level + \csname Etoc@begin@\the\numexpr\Etoc@level\endcsname + \Etoc@global\Etoc@isfirsttrue + \edef\Etoc@tmp{{\the\numexpr\Etoc@level}}% + \else + \Etoc@global\Etoc@isfirstfalse + \let\Etoc@tmp\@empty + \fi + \expandafter\Etoc@updatestackofends\Etoc@tmp{#1}% +} +\def\Etoc@etoccontentsline #1{% + \let\Etoc@next\Etoc@gobblethreeorfour + \ifnum\csname Etoc@#1@@\endcsname=\Etoc@maxlevel + \else + \Etoc@skipthisonefalse + \global\expandafter\let\expandafter\Etoc@level\csname Etoc@#1@@\endcsname + \if @\@car#1\@nil\else\global\let\Etoc@virtualtop\Etoc@level\fi + \ifEtoc@localtoc + \ifEtoc@stoptoc + \Etoc@skipthisonetrue + \else + \ifEtoc@notactive + \Etoc@skipthisonetrue + \else + \unless\ifnum\Etoc@level>\etoclocaltop + \Etoc@skipthisonetrue + \global\Etoc@stoptoctrue + \fi + \fi + \fi + \fi + \ifEtoc@skipthisone + \else + \unless\ifnum\Etoc@level>\c@tocdepth + \ifEtoc@standardlines + \let\Etoc@next\Etoc@savedcontentsline + \else + \let\Etoc@next\Etoc@etoccontentsline@ + \fi + \fi + \fi + \fi + \Etoc@next{#1}% +} +\def\Etoc@etoccontentsline@ #1#2#3#4{% + \Etoc@doendsandbegin + \Etoc@global\edef\Etoc@prefix {\expandafter\noexpand + \csname Etoc@prefix@\the\numexpr\Etoc@level\endcsname }% + \Etoc@global\edef\Etoc@contents{\expandafter\noexpand + \csname Etoc@contents@\the\numexpr\Etoc@level\endcsname }% + \ifEtoc@skipprefix \Etoc@global\def\Etoc@prefix{\@empty}\fi + \global\Etoc@skipprefixfalse + \Etoc@lxyz{#2}{#3}{#4}% + \Etoc@prefix + \Etoc@contents +} +\def\Etoc@lxyz #1#2#3{% + \ifEtoc@hyperref + \Etoc@global\def\etocthelink##1{\hyperlink{#3}{##1}}% + \else + \Etoc@global\let\etocthelink\@firstofone + \fi + \Etoc@global\def\etocthepage {#2}% + \ifEtoc@hyperref + \ifx\etocthepage\@empty + \Etoc@global\let\etocthelinkedpage\@empty + \else + \Etoc@global\def\etocthelinkedpage{\hyperlink {#3}{#2}}% + \fi + \else + \Etoc@global\let\etocthelinkedpage\etocthepage + \fi + \Etoc@global\def\etocthename{#1}% + \futurelet\Etoc@getnb@token\Etoc@@getnb #1\hspace\etoc@ + \ifEtoc@hyperref + \def\Etoc@tmp##1##2{\Etoc@global\def##2{\hyperlink{#3}{##1}}}% + \expandafter\Etoc@tmp\expandafter{\etocthename}\etocthelinkedname + \ifEtoc@numbered + \expandafter\Etoc@tmp\expandafter{\etocthenumber}\etocthelinkednumber + \else + \Etoc@global\let\etocthelinkednumber\@empty + \fi + \else + \Etoc@global\let\etocthelinkedname \etocthename + \Etoc@global\let\etocthelinkednumber\etocthenumber + \fi + \Etoc@global\expandafter\let\csname etoclink \endcsname \etocthelink + \Etoc@global\expandafter\let\csname etocname \endcsname \etocthename + \Etoc@global\expandafter\let\csname etocnumber \endcsname\etocthenumber + \Etoc@global\expandafter\let\csname etocpage \endcsname \etocthepage + \ifEtoc@hyperref + \Etoc@lxyz@linktoc + \fi +} +\def\Etoc@lxyz@linktoc{% + \ifcase\Hy@linktoc + \or + \Etoc@global\expandafter\let\csname etocname \endcsname\etocthelinkedname + \Etoc@global\expandafter\let\csname etocnumber \endcsname\etocthelinkednumber + \or % page + \Etoc@global\expandafter\let\csname etocpage \endcsname\etocthelinkedpage + \else % all + \Etoc@global\expandafter\let\csname etocname \endcsname\etocthelinkedname + \Etoc@global\expandafter\let\csname etocnumber \endcsname\etocthelinkednumber + \Etoc@global\expandafter\let\csname etocpage \endcsname\etocthelinkedpage + \fi +} +\def\Etoc@@getnb {% + \let\Etoc@next\Etoc@getnb + \ifx\Etoc@getnb@token\@sptoken\let\Etoc@next\Etoc@getnb@nonbr\fi + \ifx\Etoc@getnb@token\bgroup \let\Etoc@next\Etoc@getnb@nonbr\fi + \Etoc@next +} +\def\Etoc@getnb #1{% + \in@{#1}{\numberline\chapternumberline\partnumberline\booknumberline}% + \ifin@ + \let\Etoc@next\Etoc@getnb@nmbrd + \else + \ifnum\Etoc@level=\m@ne + \let\Etoc@next\Etoc@@getit + \else + \let\Etoc@next\Etoc@getnb@nonbr + \fi + \in@{#1}{\nonumberline}% + \ifin@ + \let\Etoc@next\Etoc@getnb@nonumberline + \fi + \fi + \Etoc@next #1% +} +\def\Etoc@getnb@nmbrd #1#2{% + \Etoc@global\Etoc@numberedtrue + \Etoc@global\def\etocthenumber {#2}% + \Etoc@getnb@nmbrd@getname\@empty +}% +\def\Etoc@getnb@nmbrd@getname #1\hspace\etoc@ {% + \Etoc@global\expandafter\def\expandafter\etocthename\expandafter{#1}% +} +\def\Etoc@getnb@nonbr #1\etoc@ {% + \Etoc@global\Etoc@numberedfalse + \Etoc@global\let\etocthenumber \@empty +} +\def\Etoc@getnb@nonumberline #1\hspace\etoc@ {% + \Etoc@global\Etoc@numberedfalse + \Etoc@global\let\etocthenumber \@empty + \Etoc@global\expandafter\def\expandafter\etocthename\expandafter{\@gobble#1}% +} +\def\Etoc@@getit #1\hspace#2{% + \ifx\etoc@#2% + \Etoc@global\Etoc@numberedfalse + \Etoc@global\let\etocthenumber \@empty + \else + \Etoc@global\Etoc@numberedtrue + \Etoc@global\def\etocthenumber {#1}% + \expandafter\Etoc@getit@getname \expandafter\@empty + \fi +} +\def\Etoc@getit@getname #1\hspace\etoc@ {% + \Etoc@global\expandafter\def\expandafter\etocthename\expandafter{#1}% +} +\let\etocthename \@empty +\let\etocthenumber \@empty +\let\etocthepage \@empty +\let\etocthelinkedname \@empty +\let\etocthelinkednumber \@empty +\let\etocthelinkedpage \@empty +\let\etocthelink \@firstofone +\DeclareRobustCommand*{\etocname} {} +\DeclareRobustCommand*{\etocnumber}{} +\DeclareRobustCommand*{\etocpage} {} +\DeclareRobustCommand*{\etoclink} {\@firstofone} +\DeclareRobustCommand*{\etocifnumbered} + {\ifEtoc@numbered\expandafter\@firstoftwo\else\expandafter\@secondoftwo\fi} +\expandafter\let\expandafter\etocxifnumbered\csname etocifnumbered \endcsname +\DeclareRobustCommand*{\etociffirst} + {\ifEtoc@isfirst\expandafter\@firstoftwo\else\expandafter\@secondoftwo\fi} +\expandafter\let\expandafter\etocxiffirst\csname etociffirst \endcsname +\def\Etoc@readtoc {% + \ifeof \Etoc@tf + \else + \read \Etoc@tf to \Etoc@buffer + \Etoc@toctoks=\expandafter\expandafter\expandafter + {\expandafter\the\expandafter\Etoc@toctoks\Etoc@buffer}% + \expandafter\Etoc@readtoc + \fi +} +\Etoc@toctoks {}% (superfluous, but for clarity) +\AtBeginDocument{\IfFileExists{\jobname.toc} + {{\endlinechar=\m@ne + \makeatletter + \newread\Etoc@tf + \openin\Etoc@tf\@filef@und + \Etoc@readtoc + \global\Etoc@toctoks=\expandafter{\the\Etoc@toctoks}% + \closein\Etoc@tf}} + {\typeout{No file \jobname.toc.}}} +\def\Etoc@openouttoc{% + \ifEtoc@hyperref + \ifx\hyper@last\@undefined + \IfFileExists{\jobname .toc} + {\Hy@WarningNoLine + {old toc file detected; run LaTeX again (cheers from `etoc')}% + \global\Etoc@toctoks={}% + } + {}% + \fi + \fi + \if@filesw + \newwrite \tf@toc + \immediate \openout \tf@toc \jobname .toc\relax + \fi + \global\let\Etoc@openouttoc\empty +} +\def\Etoc@toctoc{% + \gdef\Etoc@stackofends{{-3}{}}% + \global\let\Etoc@level\Etoc@minf + \global\let\Etoc@virtualtop\Etoc@minf + \the\Etoc@toctoks + \ifEtoc@notactive + \else + \gdef\Etoc@level{-\thr@@}% + \Etoc@doendsandbegin + \fi +} +\def\Etoc@@startlocaltoc#1#2{% + \ifEtoc@localtoc + \ifnum #1=#2\relax + \global\let\etoclocaltop\Etoc@virtualtop + \Etoc@@startlocaltochook + \etoclocaltableofcontentshook + \ifEtoc@etocstyle + \etocetoclocaltocmaketitle + \fi + \ifx\Etoc@aftertitlehook\@empty + \else + \ifEtoc@localtoctotoc + \ifEtoc@ouroboros + \else + \let\Etoc@tmp\contentsline + \def\contentsline{\let\contentsline\Etoc@tmp\Etoc@gobblethreeorfour}% + \fi + \fi + \fi + \global\Etoc@notactivefalse + \fi + \fi +} +\let\etoc@startlocaltoc\@gobble +\let\Etoc@@startlocaltoc@toc\Etoc@@startlocaltoc +\let\Etoc@@startlocaltochook\@empty +\unless\ifEtoc@deeplevels + \def\etocdivisionnameatlevel#1{% + \ifcase\numexpr#1\relax + \ifdefined\c@chapter chapter\else section\fi% + \or section% + \or subsection% + \or subsubsection% + \or paragraph% + \or subparagraph% + \or empty% + \else\ifnum\numexpr#1<\m@ne + book% + \else + part% + \fi + \fi + } +\else + \def\etocdivisionnameatlevel#1{% + \ifcase\numexpr#1\relax + \ifdefined\c@chapter chapter\else section\fi% + \or section% + \or subsection% + \or subsubsection% + \or subsubsubsection% + \or subsubsubsubsection% + \or subsubsubsubsubsection% + \or subsubsubsubsubsubsection% + \or paragraph% + \or subparagraph% + \else\ifnum\numexpr#1>\z@ + empty% + \else\ifnum\numexpr#1=\m@ne + part% + \else + book% + \fi\fi + \fi + } +\fi +\def\etoclocalheadtotoc#1#2{\addcontentsline{toc}{@#1}{#2}} +\def\etocglobalheadtotoc{\addcontentsline{toc}} +\providecommand*\UseName{\@nameuse} +\def\etocetoclocaltocmaketitle{% + \UseName{\etocdivisionnameatlevel{\etoclocaltop+1}}*{\localcontentsname}% + \if@noskipsec\leavevmode\par\fi + \etociflocaltoctotoc + {\etocifisstarred + {}% star variant, do not add to toc + {\etoclocalheadtotoc + {\etocdivisionnameatlevel{\etoclocaltop+1}}% + {\localcontentsname}% + }% + }% + {}% +}% +\def\localcontentsname {\contentsname}% +\let\etoclocaltableofcontentshook\@empty +\if1\ifEtoc@lof0\fi\ifEtoc@lot0\fi1% +\else +\AtBeginDocument{% + \let\Etoc@originaladdcontentsline\addcontentsline + \def\addcontentsline{\Etoc@hackedaddcontentsline}% +}% +\fi +\ifEtoc@lof + \ifEtoc@lot + \def\Etoc@hackedaddcontentsline#1{% + \expanded{\noexpand\in@{.#1,}}{.lof,.lot,}% + \ifin@\expandafter\Etoc@hackedaddcontentsline@i + \else\expandafter\Etoc@originaladdcontentsline + \fi {#1}} + \else + \def\Etoc@hackedaddcontentsline#1{% + \expanded{\noexpand\in@{.#1,}}{.lof,}% + \ifin@\expandafter\Etoc@hackedaddcontentsline@i + \else\expandafter\Etoc@originaladdcontentsline + \fi {#1}} + \fi +\else + \def\Etoc@hackedaddcontentsline#1{% + \expanded{\noexpand\in@{.#1,}}{.lot,}% + \ifin@\expandafter\Etoc@hackedaddcontentsline@i + \else\expandafter\Etoc@originaladdcontentsline + \fi {#1}} +\fi +\def\Etoc@hackedaddcontentsline@i#1#2#3{% + \expanded{\noexpand\in@{.#1;#2,}}{.lof;figure,.lot;table,}% + \ifin@ + \addtocontents {toc}{% + \protect\contentsline{#2}{#3}{\thepage}{\ifEtoc@hyperref\@currentHref\fi}% + \ifdefined\protected@file@percent\protected@file@percent\fi + }% + \fi + \Etoc@originaladdcontentsline{#1}{#2}{#3}% +} +\unless\ifdefined\expanded + \def\Etoc@hackedaddcontentsline#1{% + {\edef\Etoc@tmp{\noexpand\in@{.#1,}{\ifEtoc@lof.lof,\fi\ifEtoc@lot.lot,\fi}}\expandafter}% + \Etoc@tmp + \ifin@\expandafter\Etoc@hackedaddcontentsline@i + \else\expandafter\Etoc@originaladdcontentsline + \fi {#1}% + } + \def\Etoc@hackedaddcontentsline@i#1#2#3{% + {\edef\Etoc@tmp{\noexpand\in@{.#1;#2,}}\expandafter}% + \Etoc@tmp{.lof;figure,.lot;table,}% + \ifin@ + \addtocontents {toc}{% + \protect\contentsline{#2}{#3}{\thepage}{\ifEtoc@hyperref\@currentHref\fi}% + \ifdefined\protected@file@percent\protected@file@percent\fi + }% + \fi + \Etoc@originaladdcontentsline{#1}{#2}{#3}% + } +\fi +\def\Etoc@@startlocallistof#1#2#3{% + \ifEtoc@localtoc + \ifnum #2=#3\relax + \global\let\etoclocaltop\Etoc@virtualtop + \global\Etoc@notactivefalse + \Etoc@@startlocaltochook + \csname etoclocallistof#1shook\endcsname + \ifEtoc@etocstyle + \csname etocetoclistof#1smaketitle\endcsname + \fi + \fi + \fi +} +\def\Etoc@@startlocallistof@setlevels#1{% + \ifnum\etoclocaltop<\z@ + \expandafter\let\csname Etoc@#1@@\endcsname\@ne + \else + \expandafter\let\csname Etoc@#1@@\expandafter\endcsname + \csname Etoc@\the\numexpr\etoclocaltop+\@ne @@\endcsname + \fi + \def\Etoc@do##1{% + \ifnum\etoclevel{##1}>\etoclocaltop + \expandafter\let\csname Etoc@##1@@\endcsname\Etoc@maxlevel + \fi}% + \Etoc@dolevels +} +\def\etoclocallistoffigureshook{\etocstandardlines} +\def\etoclocallistoftableshook {\etocstandardlines} +\def\locallistfigurename{\listfigurename} +\def\locallisttablename {\listtablename} +\def\etocetoclistoffiguresmaketitle{% + \UseName{\etocdivisionnameatlevel{\etoclocaltop+1}}*{\locallistfigurename}% + \ifnum\etoclocaltop>\tw@\mbox{}\par\fi + \etociflocalloftotoc + {\etocifisstarred + {}% star variant, do not add to toc + {\etoclocalheadtotoc + {\etocdivisionnameatlevel{\etoclocaltop+1}}% + {\locallistfigurename}% + }% + }% + {}% +}% +\def\etocetoclistoftablesmaketitle{% + \UseName{\etocdivisionnameatlevel{\etoclocaltop+1}}*{\locallisttablename}% + \ifnum\etoclocaltop>\tw@\mbox{}\par\fi + \etociflocallottotoc + {\etocifisstarred + {}% star variant, do not add to toc + {\etoclocalheadtotoc + {\etocdivisionnameatlevel{\etoclocaltop+1}}% + {\locallisttablename}% + }% + }% + {}% +}% +\let\Etoc@listofreset\@empty +\ifEtoc@lof + \def\locallistoffigures{% + \def\Etoc@listofreset{% + \let\Etoc@currext\Etoc@tocext + \let\Etoc@@startlocaltoc\Etoc@@startlocaltoc@toc + \let\Etoc@@startlocaltochook\@empty + \let\Etoc@listofreset\@empty + \let\Etoc@listofhook\@empty + }% + \let\Etoc@currext\Etoc@lofext + \def\Etoc@@startlocaltoc{\Etoc@@startlocallistof{figure}}% + \def\Etoc@@startlocaltochook{\Etoc@@startlocallistof@setlevels{figure}}% + \def\Etoc@listofhook{% + \def\Etoc@do####1{% + \expandafter\let\csname Etoc@@####1@@\endcsname\Etoc@maxlevel + }% + \Etoc@dolevels + }% + \localtableofcontents + } +\else + \def\locallistoffigures{% + \PackageError{etoc}{% + \string\locallistoffigures \on@line\space but\MessageBreak + package was loaded without `lof' option}% + {Try again with \string\usepackage[lof]{etoc}}% + } +\fi +\ifEtoc@lot + \def\locallistoftables{% + \def\Etoc@listofreset{% + \let\Etoc@currext\Etoc@tocext + \let\Etoc@@startlocaltoc\Etoc@@startlocaltoc@toc + \let\Etoc@@startlocaltochook\@empty + \let\Etoc@listofreset\@empty + \let\Etoc@listofhook\@empty + }% + \let\Etoc@currext\Etoc@lotext + \def\Etoc@@startlocaltoc{\Etoc@@startlocallistof{table}}% + \def\Etoc@@startlocaltochook{\Etoc@@startlocallistof@setlevels{table}}% + \def\Etoc@listofhook{% + \def\Etoc@do####1{% + \expandafter\let\csname Etoc@@####1@@\endcsname\Etoc@maxlevel + }% + \Etoc@dolevels + }% + \localtableofcontents + } +\else + \def\locallistoftables{% + \PackageError{etoc}{% + \string\locallistoftable \on@line\space but\MessageBreak + package was loaded without `lot' option}% + {Try again with \string\usepackage[lot]{etoc}}% + } +\fi +\def\Etoc@checkifempty {% + \global\Etoc@isemptytoctrue + \global\Etoc@stoptocfalse + \global\let\Etoc@level\Etoc@minf + \global\let\Etoc@virtualtop\Etoc@minf + \gdef\Etoc@stackofends{{-3}{}}% + \begingroup + \ifEtoc@localtoc + \def\etoc@startlocaltoc##1{% + \ifnum##1=\Etoc@tocid\relax + \global\let\etoclocaltop\Etoc@virtualtop + \Etoc@@startlocaltochook + \global\Etoc@notactivefalse + \fi + }% + \let\contentsline\Etoc@testingcontentslinelocal + \else + \let\contentsline\Etoc@testingcontentsline + \fi + \Etoc@storetocdepth + \let\Etoc@setlocaltop@doendsandbegin\@empty + \the\Etoc@toctoks + \Etoc@restoretocdepth + \endgroup +} +\DeclareRobustCommand*\etocifwasempty + {\ifEtoc@isemptytoc\expandafter\@firstoftwo\else\expandafter\@secondoftwo\fi } +\expandafter\let\expandafter\etocxifwasempty\csname etocifwasempty \endcsname +\def\Etoc@testingcontentslinelocal #1{% + \ifEtoc@stoptoc + \else + \ifnum\csname Etoc@#1@@\endcsname=\Etoc@maxlevel + \else + \global\expandafter\let\expandafter\Etoc@level\csname Etoc@#1@@\endcsname + \if @\@car#1\@nil\else\global\let\Etoc@virtualtop\Etoc@level\fi + \ifEtoc@notactive + \else + \ifnum\Etoc@level>\etoclocaltop + \unless\ifnum\Etoc@level>\c@tocdepth + \global\Etoc@isemptytocfalse + \global\Etoc@stoptoctrue + \fi + \else + \global\Etoc@stoptoctrue + \fi + \fi + \fi + \fi + \Etoc@gobblethreeorfour{}% +} +\def\Etoc@testingcontentsline #1{% + \ifEtoc@stoptoc + \else + \ifnum\csname Etoc@#1@@\endcsname=\Etoc@maxlevel + \else + \unless\ifnum\csname Etoc@#1@@\endcsname>\c@tocdepth + \global\Etoc@isemptytocfalse + \global\Etoc@stoptoctrue + \fi + \fi + \fi + \Etoc@gobblethreeorfour{}% +} +\def\Etoc@localtableofcontents#1{% + \gdef\etoclocaltop{-\@m}% + \Etoc@localtoctrue + \global\Etoc@isemptytocfalse + \edef\Etoc@tocid{#1}% + \ifnum\Etoc@tocid<\@ne + \setbox0\hbox{\ref{Unknown toc ref \@secondoftwo#1. \space Rerun LaTeX}}% + \global\Etoc@stoptoctrue + \gdef\etoclocaltop{-\thr@@}% + \Etoc@tableofcontents + \expandafter\Etoc@gobtoetoc@ + \fi + \global\Etoc@notactivetrue + \ifEtoc@checksemptiness + \Etoc@checkifempty + \fi + \ifEtoc@isemptytoc + \ifEtoc@notactive + \setbox0\hbox{\ref{Unknown toc ID \number\Etoc@tocid. \space Rerun LaTeX}}% + \global\Etoc@isemptytocfalse + \global\Etoc@stoptoctrue + \gdef\etoclocaltop{-\thr@@}% + \Etoc@tableofcontents + \expandafter\expandafter\expandafter\Etoc@gobtoetoc@ + \fi + \else + \global\Etoc@stoptocfalse + \global\Etoc@notactivetrue + \edef\etoc@startlocaltoc##1% + {\noexpand\Etoc@@startlocaltoc{##1}{\Etoc@tocid}}% + \Etoc@tableofcontents + \fi + \@gobble\etoc@ + \endgroup\ifEtoc@mustclosegroup\endgroup\fi + \Etoc@tocdepthreset + \Etoc@listofreset + \etocaftertochook +}% \Etoc@localtableofcontents +\def\Etoc@getref #1{% + \@ifundefined{r@#1} + {0} + {\expandafter\Etoc@getref@i\romannumeral-`0% + \expandafter\expandafter\expandafter + \@car\csname r@#1\endcsname0\@nil\@etoc + }% +} +\def\Etoc@getref@i#1#2\@etoc{\ifnum9<1\string#1 #1#2\else 0\fi} +\def\Etoc@ref#1{\Etoc@localtableofcontents{\Etoc@getref{#1}}} +\def\Etoc@label#1{\label{#1}\futurelet\Etoc@nexttoken\Etoc@t@bleofcontents} +\@firstofone{\def\Etoc@again} {\futurelet\Etoc@nexttoken\Etoc@t@bleofcontents} +\def\Etoc@dothis #1#2\etoc@ {\fi #1} +\def\Etoc@t@bleofcontents{% + \gdef\etoclocaltop{-\@M}% + \ifx\Etoc@nexttoken\label\Etoc@dothis{\expandafter\Etoc@label\@gobble}\fi + \ifx\Etoc@nexttoken\@sptoken\Etoc@dothis{\Etoc@again}\fi + \ifx\Etoc@nexttoken\ref\Etoc@dothis{\expandafter\Etoc@ref\@gobble}\fi + \ifEtoc@tocwithid\Etoc@dothis{\Etoc@localtableofcontents{\c@etoc@tocid}}\fi + \global\Etoc@isemptytocfalse + \ifEtoc@checksemptiness\Etoc@checkifempty\fi + \ifEtoc@isemptytoc + \ifEtoc@notocifnotoc + \expandafter\expandafter\expandafter\@gobble + \fi + \fi + \Etoc@tableofcontents + \endgroup + \ifEtoc@mustclosegroup\endgroup\fi + \Etoc@tocdepthreset + \Etoc@listofreset + \etocaftertochook + \@gobble\etoc@ + }% \Etoc@t@bleofcontents +\def\Etoc@table@fcontents{% + \refstepcounter{etoc@tocid}% + \Etoc@tocwithidfalse + \futurelet\Etoc@nexttoken\Etoc@t@bleofcontents +} +\def\Etoc@localtable@fcontents{% + \refstepcounter{etoc@tocid}% + \addtocontents{toc}{\string\etoc@startlocaltoc{\the\c@etoc@tocid}}% + \Etoc@tocwithidtrue + \futurelet\Etoc@nexttoken\Etoc@t@bleofcontents +} +\def\etoctableofcontents{% + \Etoc@openouttoc + \Etoc@tocdepthset + \begingroup + \@ifstar + {\let\Etoc@aftertitlehook\@empty\Etoc@table@fcontents} + {\def\Etoc@aftertitlehook{\etocaftertitlehook}\Etoc@table@fcontents}% +}% \etoctableofcontents +\def\etocifisstarred{\ifx\Etoc@aftertitlehook\@empty + \expandafter\@firstoftwo\else + \expandafter\@secondoftwo + \fi} +\let\etocoriginaltableofcontents\tableofcontents +\let\tableofcontents\etoctableofcontents +\let\Etoc@listofhook\@empty +\newcommand*\localtableofcontents{% + \Etoc@openouttoc + \Etoc@tocdepthset + \begingroup + \Etoc@listofhook + \@ifstar + {\let\Etoc@aftertitlehook\@empty\Etoc@localtable@fcontents} + {\def\Etoc@aftertitlehook{\etocaftertitlehook}\Etoc@localtable@fcontents}% +}% \localtableofcontents +\newcommand*\localtableofcontentswithrelativedepth[1]{% + \def\Etoc@@startlocaltochook{% + \global\c@tocdepth\numexpr\etoclocaltop+#1\relax + }% + \def\Etoc@listofreset{\let\Etoc@@startlocaltochook\@empty + \let\Etoc@listofreset\@empty}% + \localtableofcontents +}% \localtableofcontentswithrelativedepth +\newcommand\etocsettocstyle[2]{% + \Etoc@etocstylefalse + \Etoc@classstylefalse + \def\Etoc@tableofcontents@user@before{#1}% + \def\Etoc@tableofcontents@user@after {#2}% +}% +\def\etocstoretocstyleinto#1{% +%% \@ifdefinable#1{% + \edef#1{\noexpand\Etoc@etocstylefalse\noexpand\Etoc@classstylefalse + \def\noexpand\Etoc@tableofcontents@user@before{% + \unexpanded\expandafter{\Etoc@tableofcontents@user@before}% + }% + \def\noexpand\Etoc@tableofcontents@user@after{% + \unexpanded\expandafter{\Etoc@tableofcontents@user@after}% + }% + }% +%% }% +}% +\def\Etoc@tableofcontents {% + \Etoc@tableofcontents@etoc@before + \ifEtoc@localtoc\ifEtoc@etocstyle\expandafter\expandafter\expandafter\@gobble\fi\fi + \Etoc@tableofcontents@user@before + \Etoc@tableofcontents@contents + \ifEtoc@localtoc\ifEtoc@etocstyle\expandafter\expandafter\expandafter\@gobble\fi\fi + \Etoc@tableofcontents@user@after + \Etoc@tableofcontents@etoc@after + \@gobble\etoc@ +} +\def\Etoc@tableofcontents@etoc@before{% + \ifnum\c@tocdepth>\Etoc@minf + \else + \expandafter\Etoc@gobtoetoc@ + \fi + \Etoc@par + \Etoc@beforetitlehook + \etocbeforetitlehook + \Etoc@storetocdepth + \let\Etoc@savedcontentsline\contentsline + \let\contentsline\Etoc@etoccontentsline + \ifEtoc@standardlines + \else + \def\Etoc@do##1{% + \expandafter\def\csname etocsaved##1tocline\endcsname + {\PackageError{etoc}{% + \expandafter\string\csname etocsaved##1tocline\endcsname\space + has been deprecated\MessageBreak + at 1.1a and is removed at 1.2.\MessageBreak + Use \expandafter\string\csname l@##1\endcsname\space directly.\MessageBreak + Reported \on@line}% + {I will use \expandafter\string + \csname l@##1\endcsname\space myself for this time.% + }% + \csname l@##1\endcsname + }% + }% + \Etoc@dolevels + \fi +}% +\def\Etoc@tableofcontents@contents{% + \Etoc@tocdepthset + \ifEtoc@parskip\parskip\z@skip\fi + \Etoc@aftertitlehook + \gdef\etoclocaltop{-\thr@@}% + \Etoc@toctoc + \etocaftercontentshook +}% +\def\Etoc@tableofcontents@etoc@after{% + \@nobreakfalse + \Etoc@restoretocdepth + \ifx\Etoc@global\global + \@ifundefined{tof@finish} + {} + {\ifx\tof@finish\@empty + \else + \global\let\contentsline\Etoc@savedcontentsline + \fi + }% + \fi +} +\def\etocsetstyle#1{\ifcsname Etoc@#1@@\endcsname + \expandafter\Etoc@setstyle@a + \else + \expandafter\Etoc@setstyle@error + \fi {#1}% +} +\def\Etoc@setstyle@error #1{% + \PackageWarning{etoc}{`#1' is unknown to etoc. \space Did you\MessageBreak + forget some \string\etocsetlevel{#1}{}?\MessageBreak + Reported}% + \@gobblefour +} +\def\Etoc@setstyle@a #1{% + \edef\Etoc@tmp{\the\numexpr\csname Etoc@#1@@\endcsname}% + \if1\unless\ifnum\Etoc@tmp<\Etoc@maxlevel 0\fi + \unless\ifnum\Etoc@tmp>\Etoc@minf 0\fi1% + \Etoc@standardlinesfalse + \expandafter\Etoc@setstyle@b\expandafter\Etoc@tmp + \else + \ifnum\Etoc@tmp=\Etoc@maxlevel + \in@{.#1,}{.figure,.table,}% + \ifin@ + \PackageWarning{etoc} + {You can not use \string\etocsetstyle\space with `#1'.\MessageBreak + Check the package documentation (in particular about\MessageBreak + \string\etoclocallistoffigureshook/\string\etoclocallistoftableshook)% + \MessageBreak on how to customize + figure and table entries in local\MessageBreak lists. Reported}% + \else + \PackageInfo{etoc} + {Attempt to set the style of `#1',\MessageBreak + whose level is currently the maximal one \etocthemaxlevel,\MessageBreak + which is never displayed. \space This will be ignored\MessageBreak + but note that we do quit compatibility mode.\MessageBreak + Reported}% + \Etoc@standardlinesfalse + \fi + \else + \PackageWarning{etoc}{This should not happen. Reported}% + \fi + \expandafter\@gobblefour + \fi +} +\long\def\Etoc@setstyle@b#1#2#3#4#5{% + \expandafter\def\csname Etoc@begin@#1\endcsname {#2}% + \expandafter\def\csname Etoc@prefix@#1\endcsname {#3}% + \expandafter\def\csname Etoc@contents@#1\endcsname {#4}% + \expandafter\def\csname Etoc@end@#1\endcsname {#5}% +} +\def\Etoc@setstyle@e#1{% + \expandafter\let\csname Etoc@begin@#1\endcsname \@empty + \expandafter\let\csname Etoc@prefix@#1\endcsname \@empty + \expandafter\let\csname Etoc@contents@#1\endcsname \@empty + \expandafter\let\csname Etoc@end@#1\endcsname \@empty +} +\def\Etoc@storelines@a#1{% + \noexpand\Etoc@setstyle@b{#1}% + {\expandafter\Etoc@expandonce\csname Etoc@begin@#1\endcsname}% + {\expandafter\Etoc@expandonce\csname Etoc@prefix@#1\endcsname}% + {\expandafter\Etoc@expandonce\csname Etoc@contents@#1\endcsname}% + {\expandafter\Etoc@expandonce\csname Etoc@end@#1\endcsname}% +} +\def\Etoc@expandonce#1{\unexpanded\expandafter{#1}} +\def\etocstorelinestylesinto#1{% + \edef#1{\Etoc@storelines@a{-2}\Etoc@storelines@a{-1}\Etoc@storelines@a{0}% + \Etoc@storelines@a {1}\Etoc@storelines@a {2}\Etoc@storelines@a{3}% + \Etoc@storelines@a {4}\Etoc@storelines@a {5}% + \ifEtoc@deeplevels + \Etoc@storelines@a{6}\Etoc@storelines@a{7}\Etoc@storelines@a{8}% + \Etoc@storelines@a{9}\Etoc@storelines@a{10}\Etoc@storelines@a{11}% + \fi + }% +} +\def\etocstorethislinestyleinto#1#2{% + \edef#2{\expandafter\Etoc@storelines@a\expandafter{\number\etoclevel{#1}}}% +}% +\def\etocfontminustwo {\normalfont \LARGE \bfseries} +\def\etocfontminusone {\normalfont \large \bfseries} +\def\etocfontzero {\normalfont \large \bfseries} +\def\etocfontone {\normalfont \normalsize \bfseries} +\def\etocfonttwo {\normalfont \normalsize} +\def\etocfontthree {\normalfont \footnotesize} +\def\etocsepminustwo {4ex \@plus .5ex \@minus .5ex} +\def\etocsepminusone {4ex \@plus .5ex \@minus .5ex} +\def\etocsepzero {2.5ex \@plus .4ex \@minus .4ex} +\def\etocsepone {1.5ex \@plus .3ex \@minus .3ex} +\def\etocseptwo {.5ex \@plus .1ex \@minus .1ex} +\def\etocsepthree {.25ex \@plus .05ex \@minus .05ex} +\def\etocbaselinespreadminustwo {1} +\def\etocbaselinespreadminusone {1} +\def\etocbaselinespreadzero {1} +\def\etocbaselinespreadone {1} +\def\etocbaselinespreadtwo {1} +\def\etocbaselinespreadthree {.9} +\def\etocminustwoleftmargin {1.5em plus 0.5fil} +\def\etocminustworightmargin {1.5em plus -0.5fil} +\def\etocminusoneleftmargin {1em} +\def\etocminusonerightmargin {1em} +\def\etoctoclineleaders + {\hbox{\normalfont\normalsize\hb@xt@2ex {\hss.\hss}}} +\def\etocabbrevpagename {p.~} +\def\etocpartname {Part} +\def\etocbookname {Book} +\def\etocdefaultlines{% + \Etoc@standardlinesfalse + \etocdefaultlines@setbook + \etocdefaultlines@setpart + \etocdefaultlines@setchapter + \etocdefaultlines@setsection + \etocdefaultlines@setsubsection + \etocdefaultlines@setsubsubsection + \etocdefaultlines@setdeeperones +} +\def\etocnoprotrusion{\leavevmode\kern-\p@\kern\p@} +\@ifclassloaded{memoir}{% + \def\etocdefaultlines@setbook{% + \Etoc@setstyle@b + {-2}% + {\addpenalty\@M\etocskipfirstprefix} + {\addpenalty\@secpenalty} + {\begingroup + \etocfontminustwo + \addvspace{\etocsepminustwo}% + \parindent \z@ + \leftskip \etocminustwoleftmargin + \rightskip \etocminustworightmargin + \parfillskip \@flushglue + \vbox{\etocifnumbered{\etoclink{\etocbookname\enspace\etocthenumber:\quad}}{}% + \etocname + \baselineskip\etocbaselinespreadminustwo\baselineskip + \par}% + \addpenalty\@M\addvspace{\etocsepminusone}% + \endgroup} + {}% + } + }{\let\etocdefaultlines@setbook\@empty} +\def\etocdefaultlines@setpart{% +\Etoc@setstyle@b + {-1}% + {\addpenalty\@M\etocskipfirstprefix} + {\addpenalty\@secpenalty} + {\begingroup + \etocfontminusone + \addvspace{\etocsepminusone}% + \parindent \z@ + \leftskip \etocminusoneleftmargin + \rightskip \etocminusonerightmargin + \parfillskip \@flushglue + \vbox{\etocifnumbered{\etoclink{\etocpartname\enspace\etocthenumber.\quad}}{}% + \etocname + \baselineskip\etocbaselinespreadminusone\baselineskip + \par}% + \addpenalty\@M\addvspace{\etocsepzero}% + \endgroup} + {}% +} +\def\etocdefaultlines@setchapter{% +\Etoc@setstyle@b + {0}% + {\addpenalty\@M\etocskipfirstprefix} + {\addpenalty\@itempenalty} + {\begingroup + \etocfontzero + \addvspace{\etocsepzero}% + \parindent \z@ \parfillskip \@flushglue + \vbox{\etocifnumbered{\etocnumber.\enspace}{}\etocname + \baselineskip\etocbaselinespreadzero\baselineskip + \par}% + \endgroup} + {\addpenalty{-\@highpenalty}\addvspace{\etocsepminusone}}% +} +\def\etocdefaultlines@setsection{% +\Etoc@setstyle@b + {1}% + {\addpenalty\@M\etocskipfirstprefix} + {\addpenalty\@itempenalty} + {\begingroup + \etocfontone + \addvspace{\etocsepone}% + \parindent \z@ \parfillskip \z@ + \setbox\z@\vbox{\parfillskip\@flushglue + \etocname\par + \setbox\tw@\lastbox + \global\setbox\@ne\hbox{\unhbox\tw@\ }}% + \dimen\z@=\wd\@ne + \setbox\z@=\etoctoclineleaders + \advance\dimen\z@\wd\z@ + \etocifnumbered + {\setbox\tw@\hbox{\etocnumber, \etocabbrevpagename\etocpage\etocnoprotrusion}} + {\setbox\tw@\hbox{\etocabbrevpagename\etocpage\etocnoprotrusion}}% + \advance\dimen\z@\wd\tw@ + \ifdim\dimen\z@ < \linewidth + \vbox{\etocname~% + \leaders\box\z@\hfil\box\tw@ + \baselineskip\etocbaselinespreadone\baselineskip + \par}% + \else + \vbox{\etocname~% + \leaders\copy\z@\hfil\break + \hbox{}\leaders\box\z@\hfil\box\tw@ + \baselineskip\etocbaselinespreadone\baselineskip + \par}% + \fi + \endgroup} + {\addpenalty\@secpenalty\addvspace{\etocsepzero}}% +} +\def\etocdefaultlines@setsubsection{% +\Etoc@setstyle@b + {2}% + {\addpenalty\@medpenalty\etocskipfirstprefix} + {\addpenalty\@itempenalty} + {\begingroup + \etocfonttwo + \addvspace{\etocseptwo}% + \parindent \z@ \parfillskip \z@ + \setbox\z@\vbox{\parfillskip\@flushglue + \etocname\par\setbox\tw@\lastbox + \global\setbox\@ne\hbox{\unhbox\tw@}}% + \dimen\z@=\wd\@ne + \setbox\z@=\etoctoclineleaders + \advance\dimen\z@\wd\z@ + \etocifnumbered + {\setbox\tw@\hbox{\etocnumber, \etocabbrevpagename\etocpage\etocnoprotrusion}} + {\setbox\tw@\hbox{\etocabbrevpagename\etocpage\etocnoprotrusion}}% + \advance\dimen\z@\wd\tw@ + \ifdim\dimen\z@ < \linewidth + \vbox{\etocname~% + \leaders\box\z@\hfil\box\tw@ + \baselineskip\etocbaselinespreadtwo\baselineskip + \par}% + \else + \vbox{\etocname~% + \leaders\copy\z@\hfil\break + \hbox{}\leaders\box\z@\hfil\box\tw@ + \baselineskip\etocbaselinespreadtwo\baselineskip + \par}% + \fi + \endgroup} + {\addpenalty\@secpenalty\addvspace{\etocsepone}}% +} +\def\etocdefaultlines@setsubsubsection{% +\Etoc@setstyle@b + {3}% + {\addpenalty\@M + \etocfontthree + \vspace{\etocsepthree}% + \noindent + \etocskipfirstprefix} + {\allowbreak\,--\,} + {\etocname} + {.\hfil + \begingroup + \baselineskip\etocbaselinespreadthree\baselineskip + \par + \endgroup + \addpenalty{-\@highpenalty}} +} +\def\etocdefaultlines@setdeeperones{% +\Etoc@setstyle@e{4}% +\Etoc@setstyle@e{5}% +\ifEtoc@deeplevels + \Etoc@setstyle@e{6}% + \Etoc@setstyle@e{7}% + \Etoc@setstyle@e{8}% + \Etoc@setstyle@e{9}% + \Etoc@setstyle@e{10}% + \Etoc@setstyle@e{11}% +\fi +} +\def\etocabovetocskip{3.5ex \@plus 1ex \@minus .2ex} +\def\etocbelowtocskip{3.5ex \@plus 1ex \@minus .2ex} +\def\etoccolumnsep{2em} +\def\etocmulticolsep{0ex} +\def\etocmulticolpretolerance{-1} +\def\etocmulticoltolerance{200} +\def\etocdefaultnbcol{2} +\def\etocinnertopsep{2ex} +\newcommand\etocmulticolstyle[2][\etocdefaultnbcol]{% +\etocsettocstyle + {\let\etocoldpar\par + \addvspace{\etocabovetocskip}% + \ifnum #1>\@ne + \expandafter\@firstoftwo + \else \expandafter\@secondoftwo + \fi + {\multicolpretolerance\etocmulticolpretolerance + \multicoltolerance\etocmulticoltolerance + \setlength{\columnsep}{\etoccolumnsep}% + \setlength{\multicolsep}{\etocmulticolsep}% + \begin{multicols}{#1}[#2\etocoldpar\addvspace{\etocinnertopsep}]} + {#2\ifvmode\else\begingroup\interlinepenalty\@M\parskip\z@skip + \@@par\endgroup + \fi + \nobreak\addvspace{\etocinnertopsep}% + \pretolerance\etocmulticolpretolerance + \tolerance\etocmulticoltolerance}% + }% + {\ifnum #1>\@ne + \expandafter\@firstofone + \else \expandafter\@gobble + \fi + {\end{multicols}}% + \addvspace{\etocbelowtocskip}}% +} +\def\etocinnerbottomsep{3.5ex} +\def\etocinnerleftsep{2em} +\def\etocinnerrightsep{2em} +\def\etoctoprule{\hrule} +\def\etocleftrule{\vrule} +\def\etocrightrule{\vrule} +\def\etocbottomrule{\hrule} +\def\etoctoprulecolorcmd{\relax} +\def\etocbottomrulecolorcmd{\relax} +\def\etocleftrulecolorcmd{\relax} +\def\etocrightrulecolorcmd{\relax} +\def\etoc@ruledheading #1{% + \hb@xt@\linewidth{\color@begingroup + \hss #1\hss\hskip-\linewidth + \etoctoprulecolorcmd\leaders\etoctoprule\hss + \phantom{#1}% + \leaders\etoctoprule\hss\color@endgroup}% + \nointerlineskip\nobreak\vskip\etocinnertopsep} +\newcommand*\etocruledstyle[2][\etocdefaultnbcol]{% +\etocsettocstyle + {\addvspace{\etocabovetocskip}% + \ifnum #1>\@ne + \expandafter\@firstoftwo + \else \expandafter\@secondoftwo + \fi + {\multicolpretolerance\etocmulticolpretolerance + \multicoltolerance\etocmulticoltolerance + \setlength{\columnsep}{\etoccolumnsep}% + \setlength{\multicolsep}{\etocmulticolsep}% + \begin{multicols}{#1}[\etoc@ruledheading{#2}]} + {\etoc@ruledheading{#2}% + \pretolerance\etocmulticolpretolerance + \tolerance\etocmulticoltolerance}} + {\ifnum #1>\@ne\expandafter\@firstofone + \else \expandafter\@gobble + \fi + {\end{multicols}}% + \addvspace{\etocbelowtocskip}}} +\def\etocframedmphook{\relax} +\long\def\etocbkgcolorcmd{\relax} +\long\def\Etoc@relax{\relax} +\newbox\etoc@framed@titlebox +\newbox\etoc@framed@contentsbox +\newcommand*\etocframedstyle[2][\etocdefaultnbcol]{% +\etocsettocstyle{% + \addvspace{\etocabovetocskip}% + \sbox\z@{#2}% + \dimen\z@\dp\z@ + \ifdim\wd\z@<\linewidth \dp\z@\z@ \else \dimen\z@\z@ \fi + \setbox\etoc@framed@titlebox=\hb@xt@\linewidth{\color@begingroup + \hss + \ifx\etocbkgcolorcmd\Etoc@relax + \else + \sbox\tw@{\color{white}% + \vrule\@width\wd\z@\@height\ht\z@\@depth\dimen\z@}% + \ifdim\wd\z@<\linewidth \dp\tw@\z@\fi + \box\tw@ + \hskip-\wd\z@ + \fi + \copy\z@ + \hss + \hskip-\linewidth + \etoctoprulecolorcmd\leaders\etoctoprule\hss + \hskip\wd\z@ + \etoctoprulecolorcmd\leaders\etoctoprule\hss\color@endgroup}% + \setbox\z@\hbox{\etocleftrule\etocrightrule}% + \dimen\tw@\linewidth\advance\dimen\tw@-\wd\z@ + \advance\dimen\tw@-\etocinnerleftsep + \advance\dimen\tw@-\etocinnerrightsep + \setbox\etoc@framed@contentsbox=\vbox\bgroup + \hsize\dimen\tw@ + \kern\dimen\z@ + \vskip\etocinnertopsep + \hbox\bgroup + \begin{minipage}{\hsize}% + \etocframedmphook + \ifnum #1>\@ne + \expandafter\@firstoftwo + \else \expandafter\@secondoftwo + \fi + {\multicolpretolerance\etocmulticolpretolerance + \multicoltolerance\etocmulticoltolerance + \setlength{\columnsep}{\etoccolumnsep}% + \setlength{\multicolsep}{\etocmulticolsep}% + \begin{multicols}{#1}} + {\pretolerance\etocmulticolpretolerance + \tolerance\etocmulticoltolerance}} + {\ifnum #1>\@ne\expandafter\@firstofone + \else \expandafter\@gobble + \fi + {\end{multicols}\unskip }% + \end{minipage}% + \egroup + \vskip\etocinnerbottomsep + \egroup + \vbox{\hsize\linewidth + \ifx\etocbkgcolorcmd\Etoc@relax + \else + \kern\ht\etoc@framed@titlebox + \kern\dp\etoc@framed@titlebox + \hb@xt@\linewidth{\color@begingroup + \etocleftrulecolorcmd\etocleftrule + \etocbkgcolorcmd + \leaders\vrule + \@height\ht\etoc@framed@contentsbox + \@depth\dp\etoc@framed@contentsbox + \hss + \etocrightrulecolorcmd\etocrightrule + \color@endgroup}\nointerlineskip + \vskip-\dp\etoc@framed@contentsbox + \vskip-\ht\etoc@framed@contentsbox + \vskip-\dp\etoc@framed@titlebox + \vskip-\ht\etoc@framed@titlebox + \fi + \box\etoc@framed@titlebox\nointerlineskip + \hb@xt@\linewidth{\color@begingroup + {\etocleftrulecolorcmd\etocleftrule}% + \hss\box\etoc@framed@contentsbox\hss + \etocrightrulecolorcmd\etocrightrule\color@endgroup} + \nointerlineskip + \vskip\ht\etoc@framed@contentsbox + \vskip\dp\etoc@framed@contentsbox + \hb@xt@\linewidth{\color@begingroup\etocbottomrulecolorcmd + \leaders\etocbottomrule\hss\color@endgroup}} + \addvspace{\etocbelowtocskip}}} +\newcommand\etoc@multicoltoc[2][\etocdefaultnbcol]{% + \etocmulticolstyle[#1]{#2}% + \tableofcontents} +\newcommand\etoc@multicoltoci[2][\etocdefaultnbcol]{% + \etocmulticolstyle[#1]{#2}% + \tableofcontents*} +\newcommand\etoc@local@multicoltoc[2][\etocdefaultnbcol]{% + \etocmulticolstyle[#1]{#2}% + \localtableofcontents} +\newcommand\etoc@local@multicoltoci[2][\etocdefaultnbcol]{% + \etocmulticolstyle[#1]{#2}% + \localtableofcontents*} +\newcommand*\etoc@ruledtoc[2][\etocdefaultnbcol]{% + \etocruledstyle[#1]{#2}% + \tableofcontents} +\newcommand*\etoc@ruledtoci[2][\etocdefaultnbcol]{% + \etocruledstyle[#1]{#2}% + \tableofcontents*} +\newcommand*\etoc@local@ruledtoc[2][\etocdefaultnbcol]{% + \etocruledstyle[#1]{#2}% + \localtableofcontents} +\newcommand*\etoc@local@ruledtoci[2][\etocdefaultnbcol]{% + \etocruledstyle[#1]{#2}% + \localtableofcontents*} +\newcommand*\etoc@framedtoc[2][\etocdefaultnbcol]{% + \etocframedstyle[#1]{#2}% + \tableofcontents} +\newcommand*\etoc@framedtoci[2][\etocdefaultnbcol]{% + \etocframedstyle[#1]{#2}% + \tableofcontents*} +\newcommand*\etoc@local@framedtoc[2][\etocdefaultnbcol]{% + \etocframedstyle[#1]{#2}% + \localtableofcontents} +\newcommand*\etoc@local@framedtoci[2][\etocdefaultnbcol]{% + \etocframedstyle[#1]{#2}% + \localtableofcontents*} +\def\etocmulticol{\begingroup + \Etoc@mustclosegrouptrue + \@ifstar + {\etoc@multicoltoci} + {\etoc@multicoltoc}} +\def\etocruled{\begingroup + \Etoc@mustclosegrouptrue + \@ifstar + {\etoc@ruledtoci} + {\etoc@ruledtoc}} +\def\etocframed{\begingroup + \Etoc@mustclosegrouptrue + \@ifstar + {\etoc@framedtoci} + {\etoc@framedtoc}} +\def\etoclocalmulticol{\begingroup + \Etoc@mustclosegrouptrue + \@ifstar + {\etoc@local@multicoltoci} + {\etoc@local@multicoltoc}} +\def\etoclocalruled{\begingroup + \Etoc@mustclosegrouptrue + \@ifstar + {\etoc@local@ruledtoci} + {\etoc@local@ruledtoc}} +\def\etoclocalframed{\begingroup + \Etoc@mustclosegrouptrue + \@ifstar + {\etoc@local@framedtoci} + {\etoc@local@framedtoc}} +\def\etocmemoirtoctotocfmt #1#2{% + \PackageWarning{etoc} + {\string\etocmemoirtoctotocfmt\space is deprecated.\MessageBreak + Use in its place \string\etocsettoclineforclasstoc,\MessageBreak + and \string\etocsettoclineforclasslistof{toc} (or {lof}, {lot}). + I will do this now.\MessageBreak + Reported}% + \etocsettoclineforclasstoc{#1}{#2}% + \etocsettoclineforclasslistof{toc}{#1}{#2}% +} +\def\etocsettoclineforclasstoc #1#2{% + \def\etocclassmaintocaddtotoc{\etocglobalheadtotoc{#1}{#2}}% +} +\def\etocsettoclineforclasslistof #1#2#3{% + \@namedef{etocclasslocal#1addtotoc}{\etoclocalheadtotoc{#2}{#3}}% +} +\let\etocclasslocaltocaddtotoc\@empty +\let\etocclasslocallofaddtotoc\@empty +\let\etocclasslocallotaddtotoc\@empty +\ifdefined\c@chapter + \def\etocclasslocaltocmaketitle{\section*{\localcontentsname}} + \def\etocclasslocallofmaketitle{\section*{\locallistfigurename}} + \def\etocclasslocallotmaketitle{\section*{\locallisttablename}} + \etocsettoclineforclasstoc {chapter}{\contentsname} + \etocsettoclineforclasslistof{toc}{section}{\localcontentsname} + \etocsettoclineforclasslistof{lof}{section}{\locallistfigurename} + \etocsettoclineforclasslistof{lot}{section}{\locallisttablename} +\else + \def\etocclasslocaltocmaketitle{\subsection*{\localcontentsname}}% + \def\etocclasslocallofmaketitle{\subsection*{\locallistfigurename}}% + \def\etocclasslocallotmaketitle{\subsection*{\locallisttablename}}% + \etocsettoclineforclasstoc {section}{\contentsname} + \etocsettoclineforclasslistof{toc}{subsection}{\localcontentsname} + \etocsettoclineforclasslistof{lof}{subsection}{\locallistfigurename} + \etocsettoclineforclasslistof{lot}{subsection}{\locallisttablename} +\fi +\def\etocclasslocalperhapsaddtotoc #1{% + \etocifisstarred + {} + {\csname ifEtoc@local#1totoc\endcsname + \csname etocclasslocal#1addtotoc\endcsname + \fi + }% +} +\def\etocarticlestyle{% + \etocsettocstyle + {\ifEtoc@localtoc + \@nameuse{etocclasslocal\Etoc@currext maketitle}% + \etocclasslocalperhapsaddtotoc\Etoc@currext + \else + \section *{\contentsname + \@mkboth {\MakeUppercase \contentsname} + {\MakeUppercase \contentsname}}% + \etocifisstarred{}{\etocifmaintoctotoc{\etocclassmaintocaddtotoc}{}}% + \fi + } + {}% +} +\def\etocarticlestylenomarks{% + \etocsettocstyle + {\ifEtoc@localtoc + \@nameuse{etocclasslocal\Etoc@currext maketitle}% + \etocclasslocalperhapsaddtotoc\Etoc@currext + \else + \section *{\contentsname}% + \etocifisstarred{}{\etocifmaintoctotoc{\etocclassmaintocaddtotoc}{}}% + \fi + } + {}% +} +\def\etocbookstyle{% + \etocsettocstyle + {\if@twocolumn \@restonecoltrue \onecolumn \else \@restonecolfalse \fi + \ifEtoc@localtoc + \@nameuse{etocclasslocal\Etoc@currext maketitle}% + \etocclasslocalperhapsaddtotoc\Etoc@currext + \else + \chapter *{\contentsname + \@mkboth {\MakeUppercase \contentsname} + {\MakeUppercase \contentsname}}% + \etocifisstarred{}{\etocifmaintoctotoc{\etocclassmaintocaddtotoc}{}}% + \fi + }% + {\if@restonecol \twocolumn \fi}% +} +\def\etocbookstylenomarks{% + \etocsettocstyle + {\if@twocolumn \@restonecoltrue \onecolumn \else \@restonecolfalse \fi + \ifEtoc@localtoc + \@nameuse{etocclasslocal\Etoc@currext maketitle}% + \etocclasslocalperhapsaddtotoc\Etoc@currext + \else + \chapter *{\contentsname}% + \etocifisstarred{}{\etocifmaintoctotoc{\etocclassmaintocaddtotoc}{}}% + \fi + }% + {\if@restonecol \twocolumn \fi}% +} +\let\etocreportstyle\etocbookstyle +\let\etocreportstylenomarks\etocbookstylenomarks +\def\etocmemoirstyle{% + \etocsettocstyle + {\ensureonecol \par \begingroup \phantomsection + \ifx\Etoc@aftertitlehook\@empty + \else + \ifmem@em@starred@listof + \else + \ifEtoc@localtoc + \etocclasslocalperhapsaddtotoc\Etoc@currext + \else + \ifEtoc@maintoctotoc + \etocclassmaintocaddtotoc + \fi + \fi + \fi + \fi + \ifEtoc@localtoc + \@namedef{@\Etoc@currext maketitle}{% + \@nameuse{etocclasslocal\Etoc@currext maketitle}% + }% + \fi + \@nameuse {@\Etoc@currext maketitle} %<< space token here from memoir code + \ifx\Etoc@aftertitlehook\@empty + \else + \Etoc@aftertitlehook \let \Etoc@aftertitlehook \relax + \fi + \parskip \cftparskip \@nameuse {cft\Etoc@currext beforelisthook}% + }% + {\@nameuse {cft\Etoc@currext afterlisthook}% + \endgroup\restorefromonecol + }% +} +\let\Etoc@beforetitlehook\@empty +\if1\@ifclassloaded{scrartcl}0{\@ifclassloaded{scrbook}0{\@ifclassloaded{scrreprt}01}}% +\expandafter\@gobble +\else + \ifdefined\setuptoc + \def\Etoc@beforetitlehook{% + \ifEtoc@localtoc + \etocclasslocalperhapsaddtotoc\Etoc@currext + \setuptoc{\Etoc@currext}{leveldown}% + \else + \etocifisstarred{}{\etocifmaintoctotoc{\setuptoc{toc}{totoc}}}% + \fi + }% + \fi +\expandafter\@firstofone +\fi +{\def\etocclasslocalperhapsaddtotoc #1{% + \etocifisstarred + {}% + {\csname ifEtoc@local#1totoc\endcsname + \setuptoc{\Etoc@currext}{totoc}% + \fi + }% + }% +} +\ifdefined\Iftocfeature + \def\etoc@Iftocfeature{\Iftocfeature}% +\else + \def\etoc@Iftocfeature{\iftocfeature}% +\fi +\def\etocscrartclstyle{% + \etocsettocstyle + {\ifx\Etoc@currext\Etoc@tocext + \expandafter\@firstofone + \else + \expandafter\@gobble + \fi + {\let\if@dynlist\if@tocleft}% + \edef\@currext{\Etoc@currext}% + \@ifundefined{listof\@currext name}% + {\def\list@fname{\listofname~\@currext}}% + {\expandafter\let\expandafter\list@fname + \csname listof\@currext name\endcsname}% + \etoc@Iftocfeature {\@currext}{onecolumn} + {\etoc@Iftocfeature {\@currext}{leveldown} + {} + {\if@twocolumn \aftergroup \twocolumn \onecolumn \fi }} + {}% + \etoc@Iftocfeature {\@currext}{numberline}% + {\def \nonumberline {\numberline {}}}{}% + \expandafter\tocbasic@listhead\expandafter {\list@fname}% + \begingroup \expandafter \expandafter \expandafter + \endgroup \expandafter + \ifx + \csname microtypesetup\endcsname \relax + \else + \etoc@Iftocfeature {\@currext}{noprotrusion}{} + {\microtypesetup {protrusion=false}% + \PackageInfo {tocbasic}% + {character protrusion at \@currext\space deactivated}}% + \fi + \etoc@Iftocfeature{\@currext}{noparskipfake}{}{% + \ifvmode \@tempskipa\lastskip \vskip-\lastskip + \addtolength{\@tempskipa}{\parskip}\vskip\@tempskipa\fi + }% + \setlength {\parskip }{\z@ }% + \setlength {\parindent }{\z@ }% + \setlength {\parfillskip }{\z@ \@plus 1fil}% + \csname tocbasic@@before@hook\endcsname + \csname tb@\@currext @before@hook\endcsname + }% end of before_toc + {% start of after_toc + \providecommand\tocbasic@end@toc@file{}\tocbasic@end@toc@file + \edef\@currext{\Etoc@currext}% + \csname tb@\@currext @after@hook\endcsname + \csname tocbasic@@after@hook\endcsname + }% end of after_toc +} +\let\etocscrbookstyle\etocscrartclstyle +\let\etocscrreprtstyle\etocscrartclstyle +\def\etocclasstocstyle{\etocarticlestyle} +\newcommand*\etocmarkboth[1]{% + \@mkboth{\MakeUppercase{#1}}{\MakeUppercase{#1}}} +\newcommand*\etocmarkbothnouc[1]{\@mkboth{#1}{#1}} +\newcommand\etoctocstyle[3][section]{\etocmulticolstyle[#2]% + {\csname #1\endcsname *{#3}}} +\newcommand\etoctocstylewithmarks[4][section]{\etocmulticolstyle[#2]% + {\csname #1\endcsname *{#3\etocmarkboth{#4}}}} +\newcommand\etoctocstylewithmarksnouc[4][section]{\etocmulticolstyle[#2]% + {\csname #1\endcsname *{#3\etocmarkbothnouc{#4}}}} +\def\Etoc@redefetocstylesforchapters{% + \renewcommand\etoctocstylewithmarks[4][chapter]{% + \etocmulticolstyle[##2]{\csname ##1\endcsname *{##3\etocmarkboth{##4}}}% + } + \renewcommand\etoctocstylewithmarksnouc[4][chapter]{% + \etocmulticolstyle[##2]{\csname ##1\endcsname *{##3\etocmarkbothnouc{##4}}}% + } + \renewcommand\etoctocstyle[3][chapter]{% + \etocmulticolstyle[##2]{\csname ##1\endcsname *{##3}} + } +} +\@ifclassloaded{scrartcl} + {\renewcommand*\etocclasstocstyle{\etocscrartclstyle}}{} +\@ifclassloaded{book} + {\renewcommand*\etocfontone{\normalfont\normalsize} + \renewcommand*\etocclasstocstyle{\etocbookstyle} + \Etoc@redefetocstylesforchapters}{} +\@ifclassloaded{report} + {\renewcommand*\etocfontone{\normalfont\normalsize} + \renewcommand*\etocclasstocstyle{\etocreportstyle} + \Etoc@redefetocstylesforchapters}{} +\@ifclassloaded{scrbook} + {\renewcommand*\etocfontone{\normalfont\normalsize} + \renewcommand*\etocclasstocstyle{\etocscrbookstyle} + \Etoc@redefetocstylesforchapters}{} +\@ifclassloaded{scrreprt} + {\renewcommand*\etocfontone{\normalfont\normalsize} + \renewcommand*\etocclasstocstyle{\etocscrreprtstyle} + \Etoc@redefetocstylesforchapters}{} +\@ifclassloaded{memoir} + {\renewcommand*\etocfontone{\normalfont\normalsize} + \renewcommand*\etocclasstocstyle{\etocmemoirstyle} + \Etoc@redefetocstylesforchapters}{} +\def\etoctocloftstyle {% + \etocsettocstyle{% + \@cfttocstart + \par + \begingroup + \parindent\z@ \parskip\cftparskip + \@nameuse{@cftmake\Etoc@currext title}% + \ifEtoc@localtoc + \etoctocloftlocalperhapsaddtotoc\Etoc@currext + \else + \etocifisstarred {}{\ifEtoc@maintoctotoc\@cftdobibtoc\fi}% + \fi + }% + {% + \endgroup + \@cfttocfinish + }% +} +\def\etoctocloftlocalperhapsaddtotoc#1{% + \etocifisstarred + {}% + {\csname ifEtoc@local#1totoc\endcsname + \ifdefined\c@chapter\def\@tocextra{@section}\else\def\@tocextra{@subsection}\fi + \csname @cftdobib#1\endcsname + \fi + }% +} +\def\etoctocbibindstyle {% + \etocsettocstyle {% + \toc@start + \ifEtoc@localtoc + \@nameuse{etocclasslocal\Etoc@currext maketitle}% + \etocclasslocalperhapsaddtotoc\Etoc@currext + \else + \etoc@tocbibind@dotoctitle + \fi + }% + {\toc@finish}% +} +\def\etoc@tocbibind@dotoctitle {% + \if@bibchapter + \etocifisstarred + {\chapter*{\contentsname}\prw@mkboth{\contentsname} % id. + }% + {\ifEtoc@maintoctotoc + \toc@chapter{\contentsname} %<-space from original + \else + \chapter*{\contentsname}\prw@mkboth{\contentsname} % id. + \fi + }% + \else + \etocifisstarred + {\@nameuse{\@tocextra}*{\contentsname\prw@mkboth{\contentsname}} %<-space + } + {\ifEtoc@maintoctotoc + \toc@section{\@tocextra}{\contentsname} %<-space from original + \else + \@nameuse{\@tocextra}*{\contentsname\prw@mkboth{\contentsname}} % id. + \fi + }% + \fi +}% +\@ifclassloaded{memoir} +{} +{% memoir not loaded + \@ifpackageloaded{tocloft} + {\if@cftnctoc\else + \ifEtoc@keeporiginaltoc + \else + \AtBeginDocument{\let\tableofcontents\etoctableofcontents}% + \fi + \fi } + {\AtBeginDocument + {\@ifpackageloaded{tocloft} + {\if@cftnctoc\else + \PackageWarningNoLine {etoc} + {Package `tocloft' was loaded after `etoc'.\MessageBreak + To prevent it from overwriting \protect\tableofcontents, it will\MessageBreak + be tricked into believing to have been loaded with its\MessageBreak + option `titles'. \space But this will cause the `tocloft'\MessageBreak + customization of the titles of the main list of figures\MessageBreak + and list of tables to not apply either.\MessageBreak + You should load `tocloft' before `etoc'.}% + \AtEndDocument{\PackageWarning{etoc} + {Please load `tocloft' before `etoc'!\@gobbletwo}}% + \fi + \@cftnctoctrue }% + {}% + }% + }% +} +\@ifclassloaded{memoir} +{} +{% memoir not loaded + \AtBeginDocument{% + \@ifpackageloaded{tocloft} + {% + \def\etocclasstocstyle{% + \etoctocloftstyle + \Etoc@classstyletrue + }% + \ifEtoc@etocstyle + \ifEtoc@classstyle + \etocclasstocstyle + \Etoc@etocstyletrue + \fi + \else + \ifEtoc@classstyle + \etocclasstocstyle + \fi + \fi + }% + {% no tocloft + \@ifpackageloaded {tocbibind} + {\if@dotoctoc + \def\etocclasstocstyle{% + \etoctocbibindstyle + \Etoc@classstyletrue + }% + \ifEtoc@etocstyle + \ifEtoc@classstyle + \etocclasstocstyle + \Etoc@etocstyletrue + \fi + \else + \ifEtoc@classstyle + \etocclasstocstyle + \fi + \fi + \ifEtoc@keeporiginaltoc + \else + \let\tableofcontents\etoctableofcontents + \fi + }% + {}% + }% + \@ifpackageloaded{tocbibind} + {% tocbibind, perhaps with tocloft + \if@dotoctoc + \ifEtoc@keeporiginaltoc + \else + \let\tableofcontents\etoctableofcontents + \fi + \etocsetup{maintoctotoc,localtoctotoc}% + \PackageInfo{etoc}{% + Setting (or re-setting) the options `maintoctotoc' and\MessageBreak + `localtoctotoc' to true as tocbibind was detected and\MessageBreak + found to be configured for `TOC to toc'.\MessageBreak + Reported at begin document}% + \fi + \if@dotoclof + \ifEtoc@lof + \etocsetup{localloftotoc}% + \PackageInfo{etoc}{% + Setting (or re-setting) `localloftotoc=true' as the\MessageBreak + package tocbibind was detected and is configured for\MessageBreak + `LOF to toc'. Reported at begin document}% + \fi + \fi + \if@dotoclot + \ifEtoc@lot + \etocsetup{locallottotoc}% + \PackageInfo{etoc}{% + Setting (or re-setting) `locallottotoc=true' as the\MessageBreak + package tocbibind was detected and is configured for\MessageBreak + `LOT to toc'. Reported at begin document}% + \fi + \fi + }% end of tocbibind branch + {}% + }% end of at begin document +}% end of not with memoir branch +\def\Etoc@addtocontents #1#2{% + \addtocontents {toc}{% + \protect\contentsline{#1}{#2}{\thepage}{\ifEtoc@hyperref\@currentHref\fi}% + \ifdefined\protected@file@percent\protected@file@percent\fi + }% +} +\def\Etoc@addcontentsline@ #1#2#3{% + \@namedef{toclevel@#1}{#3}\addcontentsline {toc}{#1}{#2}% +} +\DeclareRobustCommand*{\etoctoccontentsline} + {\@ifstar{\Etoc@addcontentsline@}{\Etoc@addtocontents}} +\def\Etoc@addtocontents@immediately#1#2{% + \begingroup + \let\Etoc@originalwrite\write + \def\write{\immediate\Etoc@originalwrite}% + \Etoc@addtocontents{#1}{#2}% + \endgroup +} +\def\Etoc@addcontentsline@@immediately#1#2#3{% + \begingroup + \let\Etoc@originalwrite\write + \def\write{\immediate\Etoc@originalwrite}% + \Etoc@addcontentsline@{#1}{#2}{#3}% + \endgoroup +} +\DeclareRobustCommand*{\etocimmediatetoccontentsline} + {\@ifstar{\Etoc@addcontentsline@@immediately}{\Etoc@addtocontents@immediately}} +\def\Etoc@storetocdepth {\xdef\Etoc@savedtocdepth{\number\c@tocdepth}} +\def\Etoc@restoretocdepth {\global\c@tocdepth\Etoc@savedtocdepth\relax} +\def\etocobeytoctocdepth {\def\etoc@settocdepth + {\afterassignment\Etoc@@nottoodeep \global\c@tocdepth}} +\def\Etoc@@nottoodeep {\ifnum\Etoc@savedtocdepth<\c@tocdepth + \global\c@tocdepth\Etoc@savedtocdepth\relax\fi } +\def\etocignoretoctocdepth {\let\etoc@settocdepth\@gobble } +\def\etocsettocdepth {\futurelet\Etoc@nexttoken\Etoc@set@tocdepth } +\def\Etoc@set@tocdepth {\ifx\Etoc@nexttoken\bgroup + \expandafter\Etoc@set@tocdepth@ + \else\expandafter\Etoc@set@toctocdepth + \fi } +\def\Etoc@set@tocdepth@ #1{\@ifundefined {Etoc@#1@@} + {\PackageWarning{etoc} + {Unknown sectioning unit #1, \protect\etocsettocdepth\space ignored}} + {\global\c@tocdepth\csname Etoc@#1@@\endcsname}% +} +\def\Etoc@set@toctocdepth #1#{\Etoc@set@toctocdepth@ } +\def\Etoc@set@toctocdepth@ #1{% + \@ifundefined{Etoc@#1@@}% + {\PackageWarning{etoc} + {Unknown sectioning depth #1, \protect\etocsettocdepth.toc ignored}}% + {\addtocontents {toc} + {\protect\etoc@settocdepth\expandafter\protect\csname Etoc@#1@@\endcsname}}% +} +\def\etocimmediatesettocdepth #1#{\Etoc@set@toctocdepth@immediately} +\def\Etoc@set@toctocdepth@immediately #1{% + \@ifundefined{Etoc@#1@@}% + {\PackageWarning{etoc} + {Unknown sectioning depth #1, \protect\etocimmediatesettocdepth.toc ignored}}% + {\begingroup + \let\Etoc@originalwrite\write + \def\write{\immediate\Etoc@originalwrite}% + \addtocontents {toc} + {\protect\etoc@settocdepth\expandafter\protect + \csname Etoc@#1@@\endcsname}% + \endgroup + }% +} +\def\etocdepthtag #1#{\Etoc@depthtag } +\def\Etoc@depthtag #1{\addtocontents {toc}{\protect\etoc@depthtag {#1}}} +\def\etocimmediatedepthtag #1#{\Etoc@depthtag@immediately } +\def\Etoc@depthtag@immediately #1{% + \begingroup + \let\Etoc@originalwrite\write + \def\write{\immediate\Etoc@originalwrite}% + \addtocontents {toc}{\protect\etoc@depthtag {#1}}% + \endgroup +} +\def\etocignoredepthtags {\let\etoc@depthtag \@gobble } +\def\etocobeydepthtags {\let\etoc@depthtag \Etoc@depthtag@ } +\def\Etoc@depthtag@ #1{\@ifundefined{Etoc@depthof@#1}% + {}% ignore in silence if tag has no associated depth + {\afterassignment\Etoc@@nottoodeep + \global\c@tocdepth\csname Etoc@depthof@#1\endcsname}% +} +\def\etocsettagdepth #1#2{\@ifundefined{Etoc@#2@@}% + {\PackageWarning{etoc} + {Unknown sectioning depth #2, \protect\etocsettagdepth\space ignored}}% + {\@namedef{Etoc@depthof@#1}{\@nameuse{Etoc@#2@@}}}% +} +\def\Etoc@tocvsec@err #1{\PackageError {etoc} + {The command \protect#1\space is incompatible with `etoc'} + {Use \protect\etocsettocdepth.toc as replacement}% +}% +\AtBeginDocument {% + \@ifclassloaded{memoir} + {\PackageInfo {etoc} + {Regarding `memoir' class command \protect\settocdepth, consider\MessageBreak + \protect\etocsettocdepth.toc as a drop-in replacement with more\MessageBreak + capabilities (see `etoc' manual). \space + Also, \protect\etocsettocdepth\MessageBreak + and \protect\etocsetnexttocdepth\space should be used in place of\MessageBreak + `memoir' command \protect\maxtocdepth\@gobble}% + }% + {\@ifpackageloaded {tocvsec2}{% + \def\maxtocdepth #1{\Etoc@tocvsec@err \maxtocdepth }% + \def\settocdepth #1{\Etoc@tocvsec@err \settocdepth }% + \def\resettocdepth {\@ifstar {\Etoc@tocvsec@err \resettocdepth }% + {\Etoc@tocvsec@err \resettocdepth }% + }% + \def\save@tocdepth #1#2#3{}% + \let\reset@tocdepth\relax + \let\remax@tocdepth\relax + \let\tableofcontents\etoctableofcontents + \PackageWarningNoLine {etoc} + {Package `tocvsec2' detected and its modification of\MessageBreak + \protect\tableofcontents\space reverted. \space Use + \protect\etocsettocdepth.toc\MessageBreak as a replacement + for `tocvsec2' toc-related commands}% + }% tocvsec2 loaded + {}% tocvsec2 not loaded + }% +}% +\def\invisibletableofcontents {\etocsetnexttocdepth {-3}\tableofcontents }% +\def\invisiblelocaltableofcontents + {\etocsetnexttocdepth {-3}\localtableofcontents }% +\def\etocsetnexttocdepth #1{% + \@ifundefined{Etoc@#1@@} + {\PackageWarning{etoc} + {Unknown sectioning unit #1, \protect\etocsetnextocdepth\space ignored}} + {\Etoc@setnexttocdepth{\csname Etoc@#1@@\endcsname}}% +}% +\def\Etoc@setnexttocdepth#1{% + \def\Etoc@tocdepthset{% + \Etoc@tocdepthreset + \edef\Etoc@tocdepthreset {% + \global\c@tocdepth\the\c@tocdepth\space + \global\let\noexpand\Etoc@tocdepthreset\noexpand\@empty + }% + \global\c@tocdepth#1% + \global\let\Etoc@tocdepthset\@empty + }% +}% +\let\Etoc@tocdepthreset\@empty +\let\Etoc@tocdepthset \@empty +\def\etocsetlocaltop #1#{\Etoc@set@localtop}% +\def\Etoc@set@localtop #1{% + \@ifundefined{Etoc@#1@@}% + {\PackageWarning{etoc} + {Unknown sectioning depth #1, \protect\etocsetlocaltop.toc ignored}}% + {\addtocontents {toc} + {\protect\etoc@setlocaltop\expandafter\protect\csname Etoc@#1@@\endcsname}}% +}% +\def\etocimmediatesetlocaltop #1#{\Etoc@set@localtop@immediately}% +\def\Etoc@set@localtop@immediately #1{% + \@ifundefined{Etoc@#1@@}% + {\PackageWarning{etoc} + {Unknown sectioning depth #1, \protect\etocimmediatesetlocaltop.toc ignored}}% + {\begingroup + \let\Etoc@originalwrite\write + \def\write{\immediate\Etoc@originalwrite}% + \addtocontents {toc} + {\protect\etoc@setlocaltop\expandafter\protect + \csname Etoc@#1@@\endcsname}% + \endgroup + }% +}% +\def\etoc@setlocaltop #1{% + \ifnum#1=\Etoc@maxlevel + \Etoc@skipthisonetrue + \else + \Etoc@skipthisonefalse + \global\let\Etoc@level #1% + \global\let\Etoc@virtualtop #1% + \ifEtoc@localtoc + \ifEtoc@stoptoc + \Etoc@skipthisonetrue + \else + \ifEtoc@notactive + \Etoc@skipthisonetrue + \else + \unless\ifnum\Etoc@level>\etoclocaltop + \Etoc@skipthisonetrue + \global\Etoc@stoptoctrue + \fi + \fi + \fi + \fi + \fi + \let\Etoc@next\@empty + \ifEtoc@skipthisone + \else + \ifnum\Etoc@level>\c@tocdepth + \else + \ifEtoc@standardlines + \else + \let\Etoc@next\Etoc@setlocaltop@doendsandbegin + \fi + \fi + \fi + \Etoc@next +}% +\def\Etoc@setlocaltop@doendsandbegin{% + \Etoc@doendsandbegin + \global\Etoc@skipprefixfalse +} +\addtocontents {toc}{\protect\@ifundefined{etoctocstyle}% + {\let\protect\etoc@startlocaltoc\protect\@gobble + \let\protect\etoc@settocdepth\protect\@gobble + \let\protect\etoc@depthtag\protect\@gobble + \let\protect\etoc@setlocaltop\protect\@gobble}{}}% +\def\etocstandardlines {\Etoc@standardlinestrue} +\def\etoctoclines {\Etoc@standardlinesfalse} +\etocdefaultlines +\etocstandardlines +\def\etocstandarddisplaystyle{% + \PackageWarningNoLine{etoc}{% + \string\etocstandarddisplaystyle \on@line\MessageBreak + is deprecated. \space Please use \string\etocclasstocstyle}% +} +\expandafter\def\expandafter\etocclasstocstyle\expandafter{% + \etocclasstocstyle + \Etoc@classstyletrue +} +\def\etocetoclocaltocstyle{\Etoc@etocstyletrue} +\def\etocusertocstyle{\Etoc@etocstylefalse} +\etocclasstocstyle +\etocetoclocaltocstyle +\etocobeytoctocdepth +\etocobeydepthtags +\let\etocbeforetitlehook \@empty +\let\etocaftertitlehook \@empty +\let\etocaftercontentshook \@empty +\let\etocaftertochook \@empty +\def\etockeeporiginaltableofcontents + {\Etoc@keeporiginaltoctrue\let\tableofcontents\etocoriginaltableofcontents}% +\endinput +%% +%% End of file `etoc.sty'. diff --git a/Documentation/latex/files.tex b/Documentation/latex/files.tex new file mode 100644 index 0000000..c3f4200 --- /dev/null +++ b/Documentation/latex/files.tex @@ -0,0 +1,18 @@ +\doxysection{File List} +Here is a list of all documented files with brief descriptions\+:\begin{DoxyCompactList} +\item\contentsline{section}{Include/\+Core/\mbox{\hyperlink{_console_8h_source}{Console.\+h}} }{\pageref{_console_8h_source}}{} +\item\contentsline{section}{Include/\+Core/\mbox{\hyperlink{_engine_8h_source}{Engine.\+h}} }{\pageref{_engine_8h_source}}{} +\item\contentsline{section}{Include/\+Core/\mbox{\hyperlink{_event_system_8h_source}{Event\+System.\+h}} }{\pageref{_event_system_8h_source}}{} +\item\contentsline{section}{Include/\+Core/\mbox{\hyperlink{_renderer_8h_source}{Renderer.\+h}} }{\pageref{_renderer_8h_source}}{} +\item\contentsline{section}{Include/\+Core/\mbox{\hyperlink{_window_8h_source}{Window.\+h}} }{\pageref{_window_8h_source}}{} +\item\contentsline{section}{Include/\+Editor/\mbox{\hyperlink{_console_window_8h_source}{Console\+Window.\+h}} }{\pageref{_console_window_8h_source}}{} +\item\contentsline{section}{Include/\+Editor/\mbox{\hyperlink{_editor_system_8h_source}{Editor\+System.\+h}} }{\pageref{_editor_system_8h_source}}{} +\item\contentsline{section}{Include/\+Editor/\mbox{\hyperlink{_editor_window_8h_source}{Editor\+Window.\+h}} }{\pageref{_editor_window_8h_source}}{} +\item\contentsline{section}{Include/\+Editor/\mbox{\hyperlink{_profiler_8h_source}{Profiler.\+h}} }{\pageref{_profiler_8h_source}}{} +\item\contentsline{section}{Include/\+Graph/\mbox{\hyperlink{_shader_graph_8h_source}{Shader\+Graph.\+h}} }{\pageref{_shader_graph_8h_source}}{} +\item\contentsline{section}{Include/\+Graph/\+Nodes/\mbox{\hyperlink{_math_8h_source}{Math.\+h}} }{\pageref{_math_8h_source}}{} +\item\contentsline{section}{Include/\+Open\+GL/\mbox{\hyperlink{_buffer_object_8h_source}{Buffer\+Object.\+h}} }{\pageref{_buffer_object_8h_source}}{} +\item\contentsline{section}{Include/\+Open\+GL/\mbox{\hyperlink{_enum_8h_source}{Enum.\+h}} }{\pageref{_enum_8h_source}}{} +\item\contentsline{section}{Include/\+Open\+GL/\mbox{\hyperlink{_type_8h_source}{Type.\+h}} }{\pageref{_type_8h_source}}{} +\item\contentsline{section}{Include/\+Utility/\mbox{\hyperlink{_timer_8h_source}{Timer.\+h}} }{\pageref{_timer_8h_source}}{} +\end{DoxyCompactList} diff --git a/Documentation/latex/hierarchy.tex b/Documentation/latex/hierarchy.tex new file mode 100644 index 0000000..fa3cabd --- /dev/null +++ b/Documentation/latex/hierarchy.tex @@ -0,0 +1,40 @@ +\doxysection{Class Hierarchy} +This inheritance list is sorted roughly, but not completely, alphabetically\+:\begin{DoxyCompactList} +\item \contentsline{section}{Open\+Shader\+Designer\+::\+\_\+\+Impl\+Event\+Handler}{\pageref{class_open_shader_designer_1_1___impl_event_handler}}{} +\begin{DoxyCompactList} +\item \contentsline{section}{Open\+Shader\+Designer\+::Event\+Handler\texorpdfstring{$<$}{<} Begin\+Frame \texorpdfstring{$>$}{>}}{\pageref{class_open_shader_designer_1_1_event_handler}}{} +\begin{DoxyCompactList} +\item \contentsline{section}{Open\+Shader\+Designer\+::Profiler}{\pageref{class_open_shader_designer_1_1_profiler}}{} +\end{DoxyCompactList} +\item \contentsline{section}{Open\+Shader\+Designer\+::Event\+Handler\texorpdfstring{$<$}{<} End\+Frame \texorpdfstring{$>$}{>}}{\pageref{class_open_shader_designer_1_1_event_handler}}{} +\begin{DoxyCompactList} +\item \contentsline{section}{Open\+Shader\+Designer\+::Profiler}{\pageref{class_open_shader_designer_1_1_profiler}}{} +\end{DoxyCompactList} +\item \contentsline{section}{Open\+Shader\+Designer\+::Event\+Handler\texorpdfstring{$<$}{<} Event\+Type \texorpdfstring{$>$}{>}}{\pageref{class_open_shader_designer_1_1_event_handler}}{} +\end{DoxyCompactList} +\item \contentsline{section}{GLW\+::Buffer\+Object\texorpdfstring{$<$}{<} T, U, S \texorpdfstring{$>$}{>}}{\pageref{class_g_l_w_1_1_buffer_object}}{} +\item \contentsline{section}{Open\+Shader\+Designer\+::Window\+::Configuration}{\pageref{struct_open_shader_designer_1_1_window_1_1_configuration}}{} +\item \contentsline{section}{Open\+Shader\+Designer\+::Console}{\pageref{class_open_shader_designer_1_1_console}}{} +\item \contentsline{section}{Open\+Shader\+Designer\+::Editor\+System}{\pageref{class_open_shader_designer_1_1_editor_system}}{} +\item \contentsline{section}{Open\+Shader\+Designer\+::Editor\+Window}{\pageref{class_open_shader_designer_1_1_editor_window}}{} +\begin{DoxyCompactList} +\item \contentsline{section}{Open\+Shader\+Designer\+::Console\+Window}{\pageref{class_open_shader_designer_1_1_console_window}}{} +\item \contentsline{section}{Open\+Shader\+Designer\+::Inspector}{\pageref{class_open_shader_designer_1_1_inspector}}{} +\item \contentsline{section}{Open\+Shader\+Designer\+::Profiler}{\pageref{class_open_shader_designer_1_1_profiler}}{} +\item \contentsline{section}{Open\+Shader\+Designer\+::Shader\+Graph}{\pageref{class_open_shader_designer_1_1_shader_graph}}{} +\end{DoxyCompactList} +\item \contentsline{section}{Open\+Shader\+Designer\+::Engine}{\pageref{class_open_shader_designer_1_1_engine}}{} +\item \contentsline{section}{Open\+Shader\+Designer\+::Event}{\pageref{struct_open_shader_designer_1_1_event}}{} +\item \contentsline{section}{Open\+Shader\+Designer\+::Event\+System}{\pageref{class_open_shader_designer_1_1_event_system}}{} +\item \contentsline{section}{Open\+Shader\+Designer\+::Pin\+Ptr\+::Hash}{\pageref{struct_open_shader_designer_1_1_pin_ptr_1_1_hash}}{} +\item \contentsline{section}{Open\+Shader\+Designer\+::Node}{\pageref{struct_open_shader_designer_1_1_node}}{} +\begin{DoxyCompactList} +\item \contentsline{section}{Open\+Shader\+Designer\+::Nodes\+::Math\+::Add}{\pageref{struct_open_shader_designer_1_1_nodes_1_1_math_1_1_add}}{} +\item \contentsline{section}{Open\+Shader\+Designer\+::Nodes\+::Math\+::Constant}{\pageref{struct_open_shader_designer_1_1_nodes_1_1_math_1_1_constant}}{} +\end{DoxyCompactList} +\item \contentsline{section}{Open\+Shader\+Designer\+::Pin}{\pageref{struct_open_shader_designer_1_1_pin}}{} +\item \contentsline{section}{Open\+Shader\+Designer\+::Pin\+Ptr}{\pageref{struct_open_shader_designer_1_1_pin_ptr}}{} +\item \contentsline{section}{Open\+Shader\+Designer\+::Renderer}{\pageref{class_open_shader_designer_1_1_renderer}}{} +\item \contentsline{section}{Open\+Shader\+Designer\+::Timer}{\pageref{class_open_shader_designer_1_1_timer}}{} +\item \contentsline{section}{Open\+Shader\+Designer\+::Window}{\pageref{class_open_shader_designer_1_1_window}}{} +\end{DoxyCompactList} diff --git a/Documentation/latex/longtable_doxygen.sty b/Documentation/latex/longtable_doxygen.sty new file mode 100644 index 0000000..39a44b8 --- /dev/null +++ b/Documentation/latex/longtable_doxygen.sty @@ -0,0 +1,459 @@ +%% +%% This is file `longtable.sty', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% longtable.dtx (with options: `package') +%% +%% This is a generated file. +%% +%% The source is maintained by the LaTeX Project team and bug +%% reports for it can be opened at http://latex-project.org/bugs.html +%% (but please observe conditions on bug reports sent to that address!) +%% +%% Copyright 1993-2016 +%% The LaTeX3 Project and any individual authors listed elsewhere +%% in this file. +%% +%% This file was generated from file(s) of the Standard LaTeX `Tools Bundle'. +%% -------------------------------------------------------------------------- +%% +%% It may be distributed and/or modified under the +%% conditions of the LaTeX Project Public License, either version 1.3c +%% of this license or (at your option) any later version. +%% The latest version of this license is in +%% http://www.latex-project.org/lppl.txt +%% and version 1.3c or later is part of all distributions of LaTeX +%% version 2005/12/01 or later. +%% +%% This file may only be distributed together with a copy of the LaTeX +%% `Tools Bundle'. You may however distribute the LaTeX `Tools Bundle' +%% without such generated files. +%% +%% The list of all files belonging to the LaTeX `Tools Bundle' is +%% given in the file `manifest.txt'. +%% +%% File: longtable.dtx Copyright (C) 1990-2001 David Carlisle +\NeedsTeXFormat{LaTeX2e}[1995/06/01] +\ProvidesPackage{longtable_doxygen} + [2014/10/28 v4.11 Multi-page Table package (DPC) - frozen version for doxygen] +\def\LT@err{\PackageError{longtable}} +\def\LT@warn{\PackageWarning{longtable}} +\def\LT@final@warn{% + \AtEndDocument{% + \LT@warn{Table \@width s have changed. Rerun LaTeX.\@gobbletwo}}% + \global\let\LT@final@warn\relax} +\DeclareOption{errorshow}{% + \def\LT@warn{\PackageInfo{longtable}}} +\DeclareOption{pausing}{% + \def\LT@warn#1{% + \LT@err{#1}{This is not really an error}}} +\DeclareOption{set}{} +\DeclareOption{final}{} +\ProcessOptions +\newskip\LTleft \LTleft=\fill +\newskip\LTright \LTright=\fill +\newskip\LTpre \LTpre=\bigskipamount +\newskip\LTpost \LTpost=\bigskipamount +\newcount\LTchunksize \LTchunksize=20 +\let\c@LTchunksize\LTchunksize +\newdimen\LTcapwidth \LTcapwidth=4in +\newbox\LT@head +\newbox\LT@firsthead +\newbox\LT@foot +\newbox\LT@lastfoot +\newcount\LT@cols +\newcount\LT@rows +\newcounter{LT@tables} +\newcounter{LT@chunks}[LT@tables] +\ifx\c@table\undefined + \newcounter{table} + \def\fnum@table{\tablename~\thetable} +\fi +\ifx\tablename\undefined + \def\tablename{Table} +\fi +\newtoks\LT@p@ftn +\mathchardef\LT@end@pen=30000 +\def\longtable{% + \par + \ifx\multicols\@undefined + \else + \ifnum\col@number>\@ne + \@twocolumntrue + \fi + \fi + \if@twocolumn + \LT@err{longtable not in 1-column mode}\@ehc + \fi + \begingroup + \@ifnextchar[\LT@array{\LT@array[x]}} +\def\LT@array[#1]#2{% + \refstepcounter{table}\stepcounter{LT@tables}% + \if l#1% + \LTleft\z@ \LTright\fill + \else\if r#1% + \LTleft\fill \LTright\z@ + \else\if c#1% + \LTleft\fill \LTright\fill + \fi\fi\fi + \let\LT@mcol\multicolumn + \let\LT@@tabarray\@tabarray + \let\LT@@hl\hline + \def\@tabarray{% + \let\hline\LT@@hl + \LT@@tabarray}% + \let\\\LT@tabularcr\let\tabularnewline\\% + \def\newpage{\noalign{\break}}% + \def\pagebreak{\noalign{\ifnum`}=0\fi\@testopt{\LT@no@pgbk-}4}% + \def\nopagebreak{\noalign{\ifnum`}=0\fi\@testopt\LT@no@pgbk4}% + \let\hline\LT@hline \let\kill\LT@kill\let\caption\LT@caption + \@tempdima\ht\strutbox + \let\@endpbox\LT@endpbox + \ifx\extrarowheight\@undefined + \let\@acol\@tabacol + \let\@classz\@tabclassz \let\@classiv\@tabclassiv + \def\@startpbox{\vtop\LT@startpbox}% + \let\@@startpbox\@startpbox + \let\@@endpbox\@endpbox + \let\LT@LL@FM@cr\@tabularcr + \else + \advance\@tempdima\extrarowheight + \col@sep\tabcolsep + \let\@startpbox\LT@startpbox\let\LT@LL@FM@cr\@arraycr + \fi + \setbox\@arstrutbox\hbox{\vrule + \@height \arraystretch \@tempdima + \@depth \arraystretch \dp \strutbox + \@width \z@}% + \let\@sharp##\let\protect\relax + \begingroup + \@mkpream{#2}% + \xdef\LT@bchunk{% + \global\advance\c@LT@chunks\@ne + \global\LT@rows\z@\setbox\z@\vbox\bgroup + \LT@setprevdepth + \tabskip\LTleft \noexpand\halign to\hsize\bgroup + \tabskip\z@ \@arstrut \@preamble \tabskip\LTright \cr}% + \endgroup + \expandafter\LT@nofcols\LT@bchunk&\LT@nofcols + \LT@make@row + \m@th\let\par\@empty + \everycr{}\lineskip\z@\baselineskip\z@ + \LT@bchunk} +\def\LT@no@pgbk#1[#2]{\penalty #1\@getpen{#2}\ifnum`{=0\fi}} +\def\LT@start{% + \let\LT@start\endgraf + \endgraf\penalty\z@\vskip\LTpre + \dimen@\pagetotal + \advance\dimen@ \ht\ifvoid\LT@firsthead\LT@head\else\LT@firsthead\fi + \advance\dimen@ \dp\ifvoid\LT@firsthead\LT@head\else\LT@firsthead\fi + \advance\dimen@ \ht\LT@foot + \dimen@ii\vfuzz + \vfuzz\maxdimen + \setbox\tw@\copy\z@ + \setbox\tw@\vsplit\tw@ to \ht\@arstrutbox + \setbox\tw@\vbox{\unvbox\tw@}% + \vfuzz\dimen@ii + \advance\dimen@ \ht + \ifdim\ht\@arstrutbox>\ht\tw@\@arstrutbox\else\tw@\fi + \advance\dimen@\dp + \ifdim\dp\@arstrutbox>\dp\tw@\@arstrutbox\else\tw@\fi + \advance\dimen@ -\pagegoal + \ifdim \dimen@>\z@\vfil\break\fi + \global\@colroom\@colht + \ifvoid\LT@foot\else + \global\advance\vsize-\ht\LT@foot + \global\advance\@colroom-\ht\LT@foot + \dimen@\pagegoal\advance\dimen@-\ht\LT@foot\pagegoal\dimen@ + \maxdepth\z@ + \fi + \ifvoid\LT@firsthead\copy\LT@head\else\box\LT@firsthead\fi\nobreak + \output{\LT@output}} +\def\endlongtable{% + \crcr + \noalign{% + \let\LT@entry\LT@entry@chop + \xdef\LT@save@row{\LT@save@row}}% + \LT@echunk + \LT@start + \unvbox\z@ + \LT@get@widths + \if@filesw + {\let\LT@entry\LT@entry@write\immediate\write\@auxout{% + \gdef\expandafter\noexpand + \csname LT@\romannumeral\c@LT@tables\endcsname + {\LT@save@row}}}% + \fi + \ifx\LT@save@row\LT@@save@row + \else + \LT@warn{Column \@width s have changed\MessageBreak + in table \thetable}% + \LT@final@warn + \fi + \endgraf\penalty -\LT@end@pen + \ifvoid\LT@foot\else + \global\advance\vsize\ht\LT@foot + \global\advance\@colroom\ht\LT@foot + \dimen@\pagegoal\advance\dimen@\ht\LT@foot\pagegoal\dimen@ + \fi + \endgroup + \global\@mparbottom\z@ + \endgraf\penalty\z@\addvspace\LTpost + \ifvoid\footins\else\insert\footins{}\fi} +\def\LT@nofcols#1&{% + \futurelet\@let@token\LT@n@fcols} +\def\LT@n@fcols{% + \advance\LT@cols\@ne + \ifx\@let@token\LT@nofcols + \expandafter\@gobble + \else + \expandafter\LT@nofcols + \fi} +\def\LT@tabularcr{% + \relax\iffalse{\fi\ifnum0=`}\fi + \@ifstar + {\def\crcr{\LT@crcr\noalign{\nobreak}}\let\cr\crcr + \LT@t@bularcr}% + {\LT@t@bularcr}} +\let\LT@crcr\crcr +\let\LT@setprevdepth\relax +\def\LT@t@bularcr{% + \global\advance\LT@rows\@ne + \ifnum\LT@rows=\LTchunksize + \gdef\LT@setprevdepth{% + \prevdepth\z@\global + \global\let\LT@setprevdepth\relax}% + \expandafter\LT@xtabularcr + \else + \ifnum0=`{}\fi + \expandafter\LT@LL@FM@cr + \fi} +\def\LT@xtabularcr{% + \@ifnextchar[\LT@argtabularcr\LT@ntabularcr} +\def\LT@ntabularcr{% + \ifnum0=`{}\fi + \LT@echunk + \LT@start + \unvbox\z@ + \LT@get@widths + \LT@bchunk} +\def\LT@argtabularcr[#1]{% + \ifnum0=`{}\fi + \ifdim #1>\z@ + \unskip\@xargarraycr{#1}% + \else + \@yargarraycr{#1}% + \fi + \LT@echunk + \LT@start + \unvbox\z@ + \LT@get@widths + \LT@bchunk} +\def\LT@echunk{% + \crcr\LT@save@row\cr\egroup + \global\setbox\@ne\lastbox + \unskip + \egroup} +\def\LT@entry#1#2{% + \ifhmode\@firstofone{&}\fi\omit + \ifnum#1=\c@LT@chunks + \else + \kern#2\relax + \fi} +\def\LT@entry@chop#1#2{% + \noexpand\LT@entry + {\ifnum#1>\c@LT@chunks + 1}{0pt% + \else + #1}{#2% + \fi}} +\def\LT@entry@write{% + \noexpand\LT@entry^^J% + \@spaces} +\def\LT@kill{% + \LT@echunk + \LT@get@widths + \expandafter\LT@rebox\LT@bchunk} +\def\LT@rebox#1\bgroup{% + #1\bgroup + \unvbox\z@ + \unskip + \setbox\z@\lastbox} +\def\LT@blank@row{% + \xdef\LT@save@row{\expandafter\LT@build@blank + \romannumeral\number\LT@cols 001 }} +\def\LT@build@blank#1{% + \if#1m% + \noexpand\LT@entry{1}{0pt}% + \expandafter\LT@build@blank + \fi} +\def\LT@make@row{% + \global\expandafter\let\expandafter\LT@save@row + \csname LT@\romannumeral\c@LT@tables\endcsname + \ifx\LT@save@row\relax + \LT@blank@row + \else + {\let\LT@entry\or + \if!% + \ifcase\expandafter\expandafter\expandafter\LT@cols + \expandafter\@gobble\LT@save@row + \or + \else + \relax + \fi + !% + \else + \aftergroup\LT@blank@row + \fi}% + \fi} +\let\setlongtables\relax +\def\LT@get@widths{% + \setbox\tw@\hbox{% + \unhbox\@ne + \let\LT@old@row\LT@save@row + \global\let\LT@save@row\@empty + \count@\LT@cols + \loop + \unskip + \setbox\tw@\lastbox + \ifhbox\tw@ + \LT@def@row + \advance\count@\m@ne + \repeat}% + \ifx\LT@@save@row\@undefined + \let\LT@@save@row\LT@save@row + \fi} +\def\LT@def@row{% + \let\LT@entry\or + \edef\@tempa{% + \ifcase\expandafter\count@\LT@old@row + \else + {1}{0pt}% + \fi}% + \let\LT@entry\relax + \xdef\LT@save@row{% + \LT@entry + \expandafter\LT@max@sel\@tempa + \LT@save@row}} +\def\LT@max@sel#1#2{% + {\ifdim#2=\wd\tw@ + #1% + \else + \number\c@LT@chunks + \fi}% + {\the\wd\tw@}} +\def\LT@hline{% + \noalign{\ifnum0=`}\fi + \penalty\@M + \futurelet\@let@token\LT@@hline} +\def\LT@@hline{% + \ifx\@let@token\hline + \global\let\@gtempa\@gobble + \gdef\LT@sep{\penalty-\@medpenalty\vskip\doublerulesep}% + \else + \global\let\@gtempa\@empty + \gdef\LT@sep{\penalty-\@lowpenalty\vskip-\arrayrulewidth}% + \fi + \ifnum0=`{\fi}% + \multispan\LT@cols + \unskip\leaders\hrule\@height\arrayrulewidth\hfill\cr + \noalign{\LT@sep}% + \multispan\LT@cols + \unskip\leaders\hrule\@height\arrayrulewidth\hfill\cr + \noalign{\penalty\@M}% + \@gtempa} +\def\LT@caption{% + \noalign\bgroup + \@ifnextchar[{\egroup\LT@c@ption\@firstofone}\LT@capti@n} +\def\LT@c@ption#1[#2]#3{% + \LT@makecaption#1\fnum@table{#3}% + \def\@tempa{#2}% + \ifx\@tempa\@empty\else + {\let\\\space + \addcontentsline{lot}{table}{\protect\numberline{\thetable}{#2}}}% + \fi} +\def\LT@capti@n{% + \@ifstar + {\egroup\LT@c@ption\@gobble[]}% + {\egroup\@xdblarg{\LT@c@ption\@firstofone}}} +\def\LT@makecaption#1#2#3{% + \LT@mcol\LT@cols c{\hbox to\z@{\hss\parbox[t]\LTcapwidth{% + \sbox\@tempboxa{#1{#2: }#3}% + \ifdim\wd\@tempboxa>\hsize + #1{#2: }#3% + \else + \hbox to\hsize{\hfil\box\@tempboxa\hfil}% + \fi + \endgraf\vskip\baselineskip}% + \hss}}} +\def\LT@output{% + \ifnum\outputpenalty <-\@Mi + \ifnum\outputpenalty > -\LT@end@pen + \LT@err{floats and marginpars not allowed in a longtable}\@ehc + \else + \setbox\z@\vbox{\unvbox\@cclv}% + \ifdim \ht\LT@lastfoot>\ht\LT@foot + \dimen@\pagegoal + \advance\dimen@\ht\LT@foot + \advance\dimen@-\ht\LT@lastfoot + \ifdim\dimen@<\ht\z@ + \setbox\@cclv\vbox{\unvbox\z@\copy\LT@foot\vss}% + \@makecol + \@outputpage + \global\vsize\@colroom + \setbox\z@\vbox{\box\LT@head}% + \fi + \fi + \unvbox\z@\ifvoid\LT@lastfoot\copy\LT@foot\else\box\LT@lastfoot\fi + \fi + \else + \setbox\@cclv\vbox{\unvbox\@cclv\copy\LT@foot\vss}% + \@makecol + \@outputpage + \global\vsize\@colroom + \copy\LT@head\nobreak + \fi} +\def\LT@end@hd@ft#1{% + \LT@echunk + \ifx\LT@start\endgraf + \LT@err + {Longtable head or foot not at start of table}% + {Increase LTchunksize}% + \fi + \setbox#1\box\z@ + \LT@get@widths + \LT@bchunk} +\def\endfirsthead{\LT@end@hd@ft\LT@firsthead} +\def\endhead{\LT@end@hd@ft\LT@head} +\def\endfoot{\LT@end@hd@ft\LT@foot} +\def\endlastfoot{\LT@end@hd@ft\LT@lastfoot} +\def\LT@startpbox#1{% + \bgroup + \let\@footnotetext\LT@p@ftntext + \setlength\hsize{#1}% + \@arrayparboxrestore + \vrule \@height \ht\@arstrutbox \@width \z@} +\def\LT@endpbox{% + \@finalstrut\@arstrutbox + \egroup + \the\LT@p@ftn + \global\LT@p@ftn{}% + \hfil} +%% added \long to prevent: +% LaTeX Warning: Command \LT@p@ftntext has changed. +% +% from the original repository (https://github.com/latex3/latex2e/blob/develop/required/tools/longtable.dtx): +% \changes{v4.15}{2021/03/28} +% {make long for gh/364} +% Inside the `p' column, just save up the footnote text in a token +% register. +\long\def\LT@p@ftntext#1{% + \edef\@tempa{\the\LT@p@ftn\noexpand\footnotetext[\the\c@footnote]}% + \global\LT@p@ftn\expandafter{\@tempa{#1}}}% + +\@namedef{ver@longtable.sty}{2014/10/28 v4.11 Multi-page Table package (DPC) - frozen version for doxygen} +\endinput +%% +%% End of file `longtable.sty'. diff --git a/Documentation/latex/make.bat b/Documentation/latex/make.bat new file mode 100644 index 0000000..ccd0c1b --- /dev/null +++ b/Documentation/latex/make.bat @@ -0,0 +1,67 @@ +pushd %~dp0 +if not %errorlevel% == 0 goto :end1 + +set ORG_LATEX_CMD=%LATEX_CMD% +set ORG_MKIDX_CMD=%MKIDX_CMD% +set ORG_BIBTEX_CMD=%BIBTEX_CMD% +set ORG_LATEX_COUNT=%LATEX_COUNT% +set ORG_MANUAL_FILE=%MANUAL_FILE% +if "X"%LATEX_CMD% == "X" set LATEX_CMD=pdflatex +if "X"%MKIDX_CMD% == "X" set MKIDX_CMD=makeindex +if "X"%BIBTEX_CMD% == "X" set BIBTEX_CMD=bibtex +if "X"%LATEX_COUNT% == "X" set LATEX_COUNT=8 +if "X"%MANUAL_FILE% == "X" set MANUAL_FILE=refman + +del /s /f *.ps *.dvi *.aux *.toc *.idx *.ind *.ilg *.log *.out *.brf *.blg *.bbl %MANUAL_FILE%.pdf + + +%LATEX_CMD% %MANUAL_FILE% +@if ERRORLEVEL 1 goto :error +echo ---- +%MKIDX_CMD% %MANUAL_FILE%.idx +echo ---- +%LATEX_CMD% %MANUAL_FILE% +@if ERRORLEVEL 1 goto :error + +setlocal enabledelayedexpansion +set count=%LATEX_COUNT% +:repeat +set content=X +for /F "tokens=*" %%T in ( 'findstr /C:"Rerun LaTeX" %MANUAL_FILE%.log' ) do set content="%%~T" +if !content! == X for /F "tokens=*" %%T in ( 'findstr /C:"Rerun to get cross-references right" %MANUAL_FILE%.log' ) do set content="%%~T" +if !content! == X for /F "tokens=*" %%T in ( 'findstr /C:"Rerun to get bibliographical references right" %MANUAL_FILE%.log' ) do set content="%%~T" +if !content! == X goto :skip +set /a count-=1 +if !count! EQU 0 goto :skip + +echo ---- +%LATEX_CMD% %MANUAL_FILE% +@if ERRORLEVEL 1 goto :error +goto :repeat +:skip +endlocal +%MKIDX_CMD% %MANUAL_FILE%.idx +%LATEX_CMD% %MANUAL_FILE% +@if ERRORLEVEL 1 goto :error + +goto :end +:error +@echo =============== +@echo Please consult %MANUAL_FILE%.log to see the error messages +@echo =============== + +:end +@REM reset environment +popd +set LATEX_CMD=%ORG_LATEX_CMD% +set ORG_LATEX_CMD= +set MKIDX_CMD=%ORG_MKIDX_CMD% +set ORG_MKIDX_CMD= +set BIBTEX_CMD=%ORG_BIBTEX_CMD% +set ORG_BIBTEX_CMD= +set MANUAL_FILE=%ORG_MANUAL_FILE% +set ORG_MANUAL_FILE= +set LATEX_COUNT=%ORG_LATEX_COUNT% +set ORG_LATEX_COUNT= + +:end1 diff --git a/Documentation/latex/md__r_e_a_d_m_e.tex b/Documentation/latex/md__r_e_a_d_m_e.tex new file mode 100644 index 0000000..3da8775 --- /dev/null +++ b/Documentation/latex/md__r_e_a_d_m_e.tex @@ -0,0 +1,4 @@ +\chapter{Open\+Shader\+Designer} +\hypertarget{md__r_e_a_d_m_e}{}\label{md__r_e_a_d_m_e}\index{OpenShaderDesigner@{OpenShaderDesigner}} +\label{md__r_e_a_d_m_e_autotoc_md0}% +\Hypertarget{md__r_e_a_d_m_e_autotoc_md0}% diff --git a/Documentation/latex/refman.tex b/Documentation/latex/refman.tex new file mode 100644 index 0000000..4af8466 --- /dev/null +++ b/Documentation/latex/refman.tex @@ -0,0 +1,292 @@ + % Handle batch mode + % to overcome problems with too many open files + \let\mypdfximage\pdfximage\def\pdfximage{\immediate\mypdfximage} + \RequirePackage{iftex} + \ifLuaTeX + \directlua{pdf.setminorversion(7)} + \fi + \ifXeTeX + \special{pdf:minorversion 7} + \fi + \ifPDFTeX + \pdfminorversion=7 + \fi + % Set document class depending on configuration + \documentclass[twoside]{book} + %% moved from doxygen.sty due to workaround for LaTex 2019 version and unmaintained tabu package + \usepackage{ifthen} + \ifx\requestedLaTeXdate\undefined + \usepackage{array} + \else + \usepackage{array}[=2016-10-06] + \fi + %% + % Packages required by doxygen + \makeatletter + \providecommand\IfFormatAtLeastTF{\@ifl@t@r\fmtversion} + % suppress package identification of infwarerr as it contains the word "warning" + \let\@@protected@wlog\protected@wlog + \def\protected@wlog#1{\wlog{package info suppressed}} + \RequirePackage{infwarerr} + \let\protected@wlog\@@protected@wlog + \makeatother + \IfFormatAtLeastTF{2016/01/01}{}{\usepackage{fixltx2e}} % for \textsubscript + \ifPDFTeX + \IfFormatAtLeastTF{2015/01/01}{\pdfsuppresswarningpagegroup=1}{} + \fi + \usepackage{doxygen} + \usepackage{graphicx} + \iftutex + \usepackage{fontspec} + \defaultfontfeatures{Ligatures={TeX}} + \usepackage{unicode-math} + \else + \usepackage[utf8]{inputenc} + \fi + \usepackage{makeidx} + \PassOptionsToPackage{warn}{textcomp} + \usepackage{textcomp} + \usepackage[nointegrals]{wasysym} + \usepackage{ifxetex} + % NLS support packages + % Define default fonts + % Font selection + \iftutex + \else + \usepackage[T1]{fontenc} + \fi + % set main and monospaced font + \usepackage[scaled=.90]{helvet} +\usepackage{courier} +\renewcommand{\familydefault}{\sfdefault} + \doxyallsectionsfont{% + \fontseries{bc}\selectfont% + \color{darkgray}% + } + \renewcommand{\DoxyLabelFont}{% + \fontseries{bc}\selectfont% + \color{darkgray}% + } + \newcommand{\+}{\discretionary{\mbox{\scriptsize$\hookleftarrow$}}{}{}} + % Arguments of doxygenemoji: + % 1) '::' form of the emoji, already LaTeX-escaped + % 2) file with the name of the emoji without the .png extension + % in case image exist use this otherwise use the '::' form + \newcommand{\doxygenemoji}[2]{% + \IfFileExists{./#2.png}{\raisebox{-0.1em}{\includegraphics[height=0.9em]{./#2.png}}}{#1}% + } + % Page & text layout + \usepackage{geometry} + \geometry{% + a4paper,% + top=2.5cm,% + bottom=2.5cm,% + left=2.5cm,% + right=2.5cm% + } + \usepackage{changepage} + % Allow a bit of overflow to go unnoticed by other means + \tolerance=750 + \hfuzz=15pt + \hbadness=750 + \setlength{\emergencystretch}{15pt} + \setlength{\parindent}{0cm} + \newcommand{\doxynormalparskip}{\setlength{\parskip}{3ex plus 2ex minus 2ex}} + \newcommand{\doxytocparskip}{\setlength{\parskip}{1ex plus 0ex minus 0ex}} + \doxynormalparskip + % Redefine paragraph/subparagraph environments, using sectsty fonts + \makeatletter + \renewcommand{\paragraph}{% + \@startsection{paragraph}{4}{0ex}{-1.0ex}{1.0ex}{% + \normalfont\normalsize\bfseries\SS@parafont% + }% + } + \renewcommand{\subparagraph}{% + \@startsection{subparagraph}{5}{0ex}{-1.0ex}{1.0ex}{% + \normalfont\normalsize\bfseries\SS@subparafont% + }% + } + \makeatother + \makeatletter + \newcommand\hrulefilll{\leavevmode\leaders\hrule\hskip 0pt plus 1filll\kern\z@} + \makeatother + % Headers & footers + \usepackage{fancyhdr} + \pagestyle{fancyplain} + \renewcommand{\footrulewidth}{0.4pt} + \fancypagestyle{fancyplain}{ + \fancyhf{} + \fancyhead[LE, RO]{\bfseries\thepage} + \fancyhead[LO]{\bfseries\rightmark} + \fancyhead[RE]{\bfseries\leftmark} + \fancyfoot[LO, RE]{\bfseries\scriptsize Generated by Doxygen } + } + \fancypagestyle{plain}{ + \fancyhf{} + \fancyfoot[LO, RE]{\bfseries\scriptsize Generated by Doxygen } + \renewcommand{\headrulewidth}{0pt} + } + \pagestyle{fancyplain} + \renewcommand{\chaptermark}[1]{% + \markboth{#1}{}% + } + \renewcommand{\sectionmark}[1]{% + \markright{\thesection\ #1}% + } + % ToC, LoF, LoT, bibliography, and index + % Indices & bibliography + \usepackage{natbib} + \usepackage[titles]{tocloft} + \setcounter{tocdepth}{3} + \setcounter{secnumdepth}{5} + % creating indexes + \makeindex + \ifPDFTeX +\usepackage{newunicodechar} + \makeatletter + \def\doxynewunicodechar#1#2{% + \@tempswafalse + \edef\nuc@tempa{\detokenize{#1}}% + \if\relax\nuc@tempa\relax + \nuc@emptyargerr + \else + \edef\@tempb{\expandafter\@car\nuc@tempa\@nil}% + \nuc@check + \if@tempswa + \@namedef{u8:\nuc@tempa}{#2}% + \fi + \fi + } + \makeatother + \doxynewunicodechar{⁻}{${}^{-}$}% Superscript minus + \doxynewunicodechar{²}{${}^{2}$}% Superscript two + \doxynewunicodechar{³}{${}^{3}$}% Superscript three +\fi + % Hyperlinks + % Hyperlinks (required, but should be loaded last) + \ifPDFTeX + \usepackage[pdftex,pagebackref=true]{hyperref} + \else + \ifXeTeX + \usepackage[xetex,pagebackref=true]{hyperref} + \else + \ifLuaTeX + \usepackage[luatex,pagebackref=true]{hyperref} + \else + \usepackage[ps2pdf,pagebackref=true]{hyperref} + \fi + \fi + \fi + \hypersetup{% + colorlinks=true,% + linkcolor=blue,% + citecolor=blue,% + unicode,% + pdftitle={Open\+Shader\+Designer},% + pdfsubject={}% + } + % Custom commands used by the header + % Custom commands + \newcommand{\clearemptydoublepage}{% + \newpage{\pagestyle{empty}\cleardoublepage}% + } + % caption style definition + \usepackage{caption} + \captionsetup{labelsep=space,justification=centering,font={bf},singlelinecheck=off,skip=4pt,position=top} + % in page table of contents + \IfFormatAtLeastTF{2023/05/01}{\usepackage[deeplevels]{etoc}}{\usepackage[deeplevels]{etoc_doxygen}} + \etocsettocstyle{\doxytocparskip}{\doxynormalparskip} + \etocsetlevel{subsubsubsection}{4} + \etocsetlevel{subsubsubsubsection}{5} + \etocsetlevel{subsubsubsubsubsection}{6} + \etocsetlevel{subsubsubsubsubsubsection}{7} + \etocsetlevel{paragraph}{8} + \etocsetlevel{subparagraph}{9} + % prevent numbers overlap the titles in toc + \renewcommand{\numberline}[1]{#1~} +% End of preamble, now comes the document contents +%===== C O N T E N T S ===== +\begin{document} + \raggedbottom + % Titlepage & ToC + % To avoid duplicate page anchors due to reuse of same numbers for + % the index (be it as roman numbers) + \hypersetup{pageanchor=false, + bookmarksnumbered=true, + pdfencoding=unicode + } + \pagenumbering{alph} + \begin{titlepage} + \vspace*{7cm} + \begin{center}% + {\Large Open\+Shader\+Designer}\\ + [1ex]\large 0.\+0.\+1 \\ + \vspace*{1cm} + {\large Generated by Doxygen 1.11.0}\\ + \end{center} + \end{titlepage} + \clearemptydoublepage + \pagenumbering{roman} + \tableofcontents + \clearemptydoublepage + \pagenumbering{arabic} + % re-enable anchors again + \hypersetup{pageanchor=true} +%--- Begin generated contents --- +\input{md__r_e_a_d_m_e} +\chapter{Hierarchical Index} +\input{hierarchy} +\chapter{Class Index} +\input{annotated} +\chapter{File Index} +\input{files} +\chapter{Class Documentation} +\input{class_open_shader_designer_1_1___impl_event_handler} +\input{struct_open_shader_designer_1_1_nodes_1_1_math_1_1_add} +\input{class_g_l_w_1_1_buffer_object} +\input{struct_open_shader_designer_1_1_window_1_1_configuration} +\input{class_open_shader_designer_1_1_console} +\input{class_open_shader_designer_1_1_console_window} +\input{struct_open_shader_designer_1_1_nodes_1_1_math_1_1_constant} +\input{class_open_shader_designer_1_1_editor_system} +\input{class_open_shader_designer_1_1_editor_window} +\input{class_open_shader_designer_1_1_engine} +\input{struct_open_shader_designer_1_1_event} +\input{class_open_shader_designer_1_1_event_handler} +\input{class_open_shader_designer_1_1_event_system} +\input{struct_open_shader_designer_1_1_pin_ptr_1_1_hash} +\input{class_open_shader_designer_1_1_inspector} +\input{struct_open_shader_designer_1_1_node} +\input{struct_open_shader_designer_1_1_pin} +\input{struct_open_shader_designer_1_1_pin_ptr} +\input{class_open_shader_designer_1_1_profiler} +\input{class_open_shader_designer_1_1_renderer} +\input{class_open_shader_designer_1_1_shader_graph} +\input{class_open_shader_designer_1_1_timer} +\input{class_open_shader_designer_1_1_window} +\chapter{File Documentation} +\input{_console_8h_source} +\input{_engine_8h_source} +\input{_event_system_8h_source} +\input{_renderer_8h_source} +\input{_window_8h_source} +\input{_console_window_8h_source} +\input{_editor_system_8h_source} +\input{_editor_window_8h_source} +\input{_profiler_8h_source} +\input{_math_8h_source} +\input{_shader_graph_8h_source} +\input{_buffer_object_8h_source} +\input{_enum_8h_source} +\input{_type_8h_source} +\input{_timer_8h_source} +%--- End generated contents --- +% Index + \backmatter + \newpage + \phantomsection + \clearemptydoublepage + \addcontentsline{toc}{chapter}{\indexname} + \printindex +% Required for some languages (in combination with latexdocumentpre from the header) +\end{document} diff --git a/Documentation/latex/struct_constant_value.tex b/Documentation/latex/struct_constant_value.tex new file mode 100644 index 0000000..ffd59a1 --- /dev/null +++ b/Documentation/latex/struct_constant_value.tex @@ -0,0 +1,51 @@ +\doxysection{Constant\+Value\texorpdfstring{$<$}{<} T, V \texorpdfstring{$>$}{>} Struct Template Reference} +\hypertarget{struct_constant_value}{}\label{struct_constant_value}\index{ConstantValue$<$ T, V $>$@{ConstantValue$<$ T, V $>$}} + + +Compile-\/time constant value. + + + + +{\ttfamily \#include $<$Template\+Utils.\+h$>$} + +\doxysubsubsection*{Public Types} +\begin{DoxyCompactItemize} +\item +\Hypertarget{struct_constant_value_a7179481e63466b2ab97e60faf59b9a26}\label{struct_constant_value_a7179481e63466b2ab97e60faf59b9a26} +using {\bfseries Type} = T +\end{DoxyCompactItemize} +\doxysubsubsection*{Public Member Functions} +\begin{DoxyCompactItemize} +\item +\Hypertarget{struct_constant_value_a0054b1acc3ea91bc11866fc767c5fcf3}\label{struct_constant_value_a0054b1acc3ea91bc11866fc767c5fcf3} +constexpr {\bfseries operator Type} () const noexcept +\item +\Hypertarget{struct_constant_value_a1e0d9f37538503106899b129bbc57ec5}\label{struct_constant_value_a1e0d9f37538503106899b129bbc57ec5} +constexpr Type {\bfseries operator()} () const +\end{DoxyCompactItemize} +\doxysubsubsection*{Static Public Attributes} +\begin{DoxyCompactItemize} +\item +\Hypertarget{struct_constant_value_ac0a9784a2671a08e1babcd477f2e78fd}\label{struct_constant_value_ac0a9784a2671a08e1babcd477f2e78fd} +static constexpr Type {\bfseries Value} = V +\end{DoxyCompactItemize} + + +\doxysubsection{Detailed Description} +\subsubsection*{template$<$typename T, T V$>$\newline +struct Constant\+Value$<$ T, V $>$} +Compile-\/time constant value. + + +\begin{DoxyTemplParams}{Template Parameters} +{\em T} & Type \\ +\hline +{\em V} & Value \\ +\hline +\end{DoxyTemplParams} + + +The documentation for this struct was generated from the following file\+:\begin{DoxyCompactItemize} +\item +Include/\+Utility/\mbox{\hyperlink{_template_utils_8h}{Template\+Utils.\+h}}\end{DoxyCompactItemize} diff --git a/Documentation/latex/struct_get_pack_element.tex b/Documentation/latex/struct_get_pack_element.tex new file mode 100644 index 0000000..6f68781 --- /dev/null +++ b/Documentation/latex/struct_get_pack_element.tex @@ -0,0 +1,13 @@ +\doxysection{Get\+Pack\+Element\texorpdfstring{$<$}{<} I, T, Ts \texorpdfstring{$>$}{>} Struct Template Reference} +\hypertarget{struct_get_pack_element}{}\label{struct_get_pack_element}\index{GetPackElement$<$ I, T, Ts $>$@{GetPackElement$<$ I, T, Ts $>$}} +\doxysubsubsection*{Public Types} +\begin{DoxyCompactItemize} +\item +\Hypertarget{struct_get_pack_element_a4e0241e0f464930b3c0430491e1e15f8}\label{struct_get_pack_element_a4e0241e0f464930b3c0430491e1e15f8} +using {\bfseries Type} = typename \mbox{\hyperlink{struct_get_pack_element}{Get\+Pack\+Element}}$<$I -\/ 1, T, Ts...$>$\+::\+Type +\end{DoxyCompactItemize} + + +The documentation for this struct was generated from the following file\+:\begin{DoxyCompactItemize} +\item +Include/\+Utility/\mbox{\hyperlink{_template_utils_8h}{Template\+Utils.\+h}}\end{DoxyCompactItemize} diff --git a/Documentation/latex/struct_open_shader_designer_1_1_event.tex b/Documentation/latex/struct_open_shader_designer_1_1_event.tex new file mode 100644 index 0000000..bb73a01 --- /dev/null +++ b/Documentation/latex/struct_open_shader_designer_1_1_event.tex @@ -0,0 +1,46 @@ +\doxysection{Open\+Shader\+Designer\+::Event Struct Reference} +\hypertarget{struct_open_shader_designer_1_1_event}{}\label{struct_open_shader_designer_1_1_event}\index{OpenShaderDesigner::Event@{OpenShaderDesigner::Event}} + + +Base \doxylink{struct_open_shader_designer_1_1_event}{Event} class for sending events to the \doxylink{class_open_shader_designer_1_1_engine}{Engine}. + + + + +{\ttfamily \#include $<$Event\+System.\+h$>$} + +\doxysubsubsection*{Public Member Functions} +\begin{DoxyCompactItemize} +\item +virtual uint8\+\_\+t \mbox{\hyperlink{struct_open_shader_designer_1_1_event_a1920b3e03c8e47a463f403cd7c29dc26}{Get\+ID}} () const =0 +\begin{DoxyCompactList}\small\item\em Get the \doxylink{struct_open_shader_designer_1_1_event}{Event}\textquotesingle{}s type ID. \end{DoxyCompactList}\end{DoxyCompactItemize} +\doxysubsubsection*{Static Public Member Functions} +\begin{DoxyCompactItemize} +\item +\Hypertarget{struct_open_shader_designer_1_1_event_afd225c2e1322d9341d0ad50ab4d7d979}\label{struct_open_shader_designer_1_1_event_afd225c2e1322d9341d0ad50ab4d7d979} +{\footnotesize template$<$typename T $>$ }\\static uint8\+\_\+t {\bfseries Type\+Of} () +\end{DoxyCompactItemize} + + +\doxysubsection{Detailed Description} +Base \doxylink{struct_open_shader_designer_1_1_event}{Event} class for sending events to the \doxylink{class_open_shader_designer_1_1_engine}{Engine}. + +\doxysubsection{Member Function Documentation} +\Hypertarget{struct_open_shader_designer_1_1_event_a1920b3e03c8e47a463f403cd7c29dc26}\index{OpenShaderDesigner::Event@{OpenShaderDesigner::Event}!GetID@{GetID}} +\index{GetID@{GetID}!OpenShaderDesigner::Event@{OpenShaderDesigner::Event}} +\doxysubsubsection{\texorpdfstring{GetID()}{GetID()}} +{\footnotesize\ttfamily \label{struct_open_shader_designer_1_1_event_a1920b3e03c8e47a463f403cd7c29dc26} +virtual uint8\+\_\+t Open\+Shader\+Designer\+::\+Event\+::\+Get\+ID (\begin{DoxyParamCaption}{}{}\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [pure virtual]}} + + + +Get the \doxylink{struct_open_shader_designer_1_1_event}{Event}\textquotesingle{}s type ID. + +\begin{DoxyReturn}{Returns} +A pointer to the \doxylink{struct_open_shader_designer_1_1_event}{Event} type ID. +\end{DoxyReturn} + + +The documentation for this struct was generated from the following file\+:\begin{DoxyCompactItemize} +\item +Include/\+Core/Event\+System.\+h\end{DoxyCompactItemize} diff --git a/Documentation/latex/struct_open_shader_designer_1_1_node.eps b/Documentation/latex/struct_open_shader_designer_1_1_node.eps new file mode 100644 index 0000000..5489554 --- /dev/null +++ b/Documentation/latex/struct_open_shader_designer_1_1_node.eps @@ -0,0 +1,203 @@ +%!PS-Adobe-2.0 EPSF-2.0 +%%Title: ClassName +%%Creator: Doxygen +%%CreationDate: Time +%%For: +%Magnification: 1.00 +%%Orientation: Portrait +%%BoundingBox: 0 0 500 72.992699 +%%Pages: 0 +%%BeginSetup +%%EndSetup +%%EndComments + +% ----- variables ----- + +/boxwidth 0 def +/boxheight 40 def +/fontheight 24 def +/marginwidth 10 def +/distx 20 def +/disty 40 def +/boundaspect 6.850000 def % aspect ratio of the BoundingBox (width/height) +/boundx 500 def +/boundy boundx boundaspect div def +/xspacing 0 def +/yspacing 0 def +/rows 2 def +/cols 2 def +/scalefactor 0 def +/boxfont /Times-Roman findfont fontheight scalefont def + +% ----- procedures ----- + +/dotted { [1 4] 0 setdash } def +/dashed { [5] 0 setdash } def +/solid { [] 0 setdash } def + +/max % result = MAX(arg1,arg2) +{ + /a exch def + /b exch def + a b gt {a} {b} ifelse +} def + +/xoffset % result = MAX(0,(scalefactor-(boxwidth*cols+distx*(cols-1)))/2) +{ + 0 scalefactor boxwidth cols mul distx cols 1 sub mul add sub 2 div max +} def + +/cw % boxwidth = MAX(boxwidth, stringwidth(arg1)) +{ + /str exch def + /boxwidth boxwidth str stringwidth pop max def +} def + +/box % draws a box with text 'arg1' at grid pos (arg2,arg3) +{ gsave + 2 setlinewidth + newpath + exch xspacing mul xoffset add + exch yspacing mul + moveto + boxwidth 0 rlineto + 0 boxheight rlineto + boxwidth neg 0 rlineto + 0 boxheight neg rlineto + closepath + dup stringwidth pop neg boxwidth add 2 div + boxheight fontheight 2 div sub 2 div + rmoveto show stroke + grestore +} def + +/mark +{ newpath + exch xspacing mul xoffset add boxwidth add + exch yspacing mul + moveto + 0 boxheight 4 div rlineto + boxheight neg 4 div boxheight neg 4 div rlineto + closepath + eofill + stroke +} def + +/arrow +{ newpath + moveto + 3 -8 rlineto + -6 0 rlineto + 3 8 rlineto + closepath + eofill + stroke +} def + +/out % draws an output connector for the block at (arg1,arg2) +{ + newpath + exch xspacing mul xoffset add boxwidth 2 div add + exch yspacing mul boxheight add + /y exch def + /x exch def + x y moveto + 0 disty 2 div rlineto + stroke + 1 eq { x y disty 2 div add arrow } if +} def + +/in % draws an input connector for the block at (arg1,arg2) +{ + newpath + exch xspacing mul xoffset add boxwidth 2 div add + exch yspacing mul disty 2 div sub + /y exch def + /x exch def + x y moveto + 0 disty 2 div rlineto + stroke + 1 eq { x y disty 2 div add arrow } if +} def + +/hedge +{ + exch xspacing mul xoffset add boxwidth 2 div add + exch yspacing mul boxheight 2 div sub + /y exch def + /x exch def + newpath + x y moveto + boxwidth 2 div distx add 0 rlineto + stroke + 1 eq + { newpath x boxwidth 2 div distx add add y moveto + -8 3 rlineto + 0 -6 rlineto + 8 3 rlineto + closepath + eofill + stroke + } if +} def + +/vedge +{ + /ye exch def + /ys exch def + /xs exch def + newpath + xs xspacing mul xoffset add boxwidth 2 div add dup + ys yspacing mul boxheight 2 div sub + moveto + ye yspacing mul boxheight 2 div sub + lineto + stroke +} def + +/conn % connections the blocks from col 'arg1' to 'arg2' of row 'arg3' +{ + /ys exch def + /xe exch def + /xs exch def + newpath + xs xspacing mul xoffset add boxwidth 2 div add + ys yspacing mul disty 2 div sub + moveto + xspacing xe xs sub mul 0 + rlineto + stroke +} def + +% ----- main ------ + +boxfont setfont +1 boundaspect scale +(OpenShaderDesigner::Node) cw +(OpenShaderDesigner::Nodes::Math::Add) cw +(OpenShaderDesigner::Nodes::Math::Constant) cw +/boxwidth boxwidth marginwidth 2 mul add def +/xspacing boxwidth distx add def +/yspacing boxheight disty add def +/scalefactor + boxwidth cols mul distx cols 1 sub mul add + boxheight rows mul disty rows 1 sub mul add boundaspect mul + max def +boundx scalefactor div boundy scalefactor div scale + +% ----- classes ----- + + (OpenShaderDesigner::Node) 0.500000 1.000000 box + (OpenShaderDesigner::Nodes::Math::Add) 0.000000 0.000000 box + (OpenShaderDesigner::Nodes::Math::Constant) 1.000000 0.000000 box + +% ----- relations ----- + +solid +1 0.500000 0.250000 out +solid +0.000000 1.000000 1.000000 conn +solid +0 0.000000 0.750000 in +solid +0 1.000000 0.750000 in diff --git a/Documentation/latex/struct_open_shader_designer_1_1_node.tex b/Documentation/latex/struct_open_shader_designer_1_1_node.tex new file mode 100644 index 0000000..3681c4b --- /dev/null +++ b/Documentation/latex/struct_open_shader_designer_1_1_node.tex @@ -0,0 +1,61 @@ +\doxysection{Open\+Shader\+Designer\+::Node Struct Reference} +\hypertarget{struct_open_shader_designer_1_1_node}{}\label{struct_open_shader_designer_1_1_node}\index{OpenShaderDesigner::Node@{OpenShaderDesigner::Node}} +Inheritance diagram for Open\+Shader\+Designer\+::Node\+:\begin{figure}[H] +\begin{center} +\leavevmode +\includegraphics[height=2.000000cm]{struct_open_shader_designer_1_1_node} +\end{center} +\end{figure} +\doxysubsubsection*{Public Member Functions} +\begin{DoxyCompactItemize} +\item +\Hypertarget{struct_open_shader_designer_1_1_node_a045b08fc2e3c7bfb0fb021872060eca1}\label{struct_open_shader_designer_1_1_node_a045b08fc2e3c7bfb0fb021872060eca1} +{\bfseries Node} (\mbox{\hyperlink{class_open_shader_designer_1_1_shader_graph}{Shader\+Graph}} \&graph, Im\+Vec2 pos, const std\+::string \&title, Im\+Color color, const std\+::vector$<$ \mbox{\hyperlink{struct_open_shader_designer_1_1_pin}{Pin}} $>$ \&inputs, bool dyn\+\_\+inputs, const std\+::vector$<$ \mbox{\hyperlink{struct_open_shader_designer_1_1_pin}{Pin}} $>$ \&outputs, bool constant=false) +\item +\Hypertarget{struct_open_shader_designer_1_1_node_a70bb11ea1a9c508676a2af05279a29f6}\label{struct_open_shader_designer_1_1_node_a70bb11ea1a9c508676a2af05279a29f6} +virtual \mbox{\hyperlink{struct_open_shader_designer_1_1_node}{Node}} \texorpdfstring{$\ast$}{*} {\bfseries Copy} (\mbox{\hyperlink{class_open_shader_designer_1_1_shader_graph}{Shader\+Graph}} \&graph) const =0 +\item +\Hypertarget{struct_open_shader_designer_1_1_node_a3f5a0246c1069278857299567ebf4ce4}\label{struct_open_shader_designer_1_1_node_a3f5a0246c1069278857299567ebf4ce4} +virtual void {\bfseries Inspect} ()=0 +\end{DoxyCompactItemize} +\doxysubsubsection*{Public Attributes} +\begin{DoxyCompactItemize} +\item +\Hypertarget{struct_open_shader_designer_1_1_node_acf75149be57771e12f60179a284619e3}\label{struct_open_shader_designer_1_1_node_acf75149be57771e12f60179a284619e3} +Im\+Vec2 {\bfseries Position} = \{ 0, 0 \} +\item +\Hypertarget{struct_open_shader_designer_1_1_node_a91a75bd71698f33ec205bcb06db9fb3f}\label{struct_open_shader_designer_1_1_node_a91a75bd71698f33ec205bcb06db9fb3f} +\begin{tabbing} +xx\=xx\=xx\=xx\=xx\=xx\=xx\=xx\=xx\=\kill +struct \{\\ +\>std::string {\bfseries Title} = "{}Node"{}\\ +\>ImColor {\bfseries Color} = Pin::Colors\mbox{[}Pin::VECTOR\mbox{]}\\ +\>bool {\bfseries Enabled} = true\\ +\} {\bfseries Header}\\ + +\end{tabbing}\item +\Hypertarget{struct_open_shader_designer_1_1_node_afe91e26c03e73a1c84eb5bb6e6a155a0}\label{struct_open_shader_designer_1_1_node_afe91e26c03e73a1c84eb5bb6e6a155a0} +\begin{tabbing} +xx\=xx\=xx\=xx\=xx\=xx\=xx\=xx\=xx\=\kill +struct \{\\ +\>std::vector$<$ \mbox{\hyperlink{struct_open_shader_designer_1_1_pin}{Pin}} $>$ {\bfseries Inputs}\\ +\>std::vector$<$ \mbox{\hyperlink{struct_open_shader_designer_1_1_pin}{Pin}} $>$ {\bfseries Outputs}\\ +\>bool {\bfseries DynamicInputs} = false\\ +\} {\bfseries IO}\\ + +\end{tabbing}\item +\Hypertarget{struct_open_shader_designer_1_1_node_afed7efba8bacb46381d5ad7ca4e5d935}\label{struct_open_shader_designer_1_1_node_afed7efba8bacb46381d5ad7ca4e5d935} +\begin{tabbing} +xx\=xx\=xx\=xx\=xx\=xx\=xx\=xx\=xx\=\kill +struct \{\\ +\>ImVec2 {\bfseries Size}\\ +\>bool {\bfseries Const}\\ +\} {\bfseries Info}\\ + +\end{tabbing}\end{DoxyCompactItemize} + + +The documentation for this struct was generated from the following files\+:\begin{DoxyCompactItemize} +\item +Include/\+Graph/Shader\+Graph.\+h\item +Source/\+Graph/Shader\+Graph.\+cpp\end{DoxyCompactItemize} diff --git a/Documentation/latex/struct_open_shader_designer_1_1_nodes_1_1_math_1_1_add.eps b/Documentation/latex/struct_open_shader_designer_1_1_nodes_1_1_math_1_1_add.eps new file mode 100644 index 0000000..aaf10ee --- /dev/null +++ b/Documentation/latex/struct_open_shader_designer_1_1_nodes_1_1_math_1_1_add.eps @@ -0,0 +1,197 @@ +%!PS-Adobe-2.0 EPSF-2.0 +%%Title: ClassName +%%Creator: Doxygen +%%CreationDate: Time +%%For: +%Magnification: 1.00 +%%Orientation: Portrait +%%BoundingBox: 0 0 500 161.290329 +%%Pages: 0 +%%BeginSetup +%%EndSetup +%%EndComments + +% ----- variables ----- + +/boxwidth 0 def +/boxheight 40 def +/fontheight 24 def +/marginwidth 10 def +/distx 20 def +/disty 40 def +/boundaspect 3.100000 def % aspect ratio of the BoundingBox (width/height) +/boundx 500 def +/boundy boundx boundaspect div def +/xspacing 0 def +/yspacing 0 def +/rows 2 def +/cols 1 def +/scalefactor 0 def +/boxfont /Times-Roman findfont fontheight scalefont def + +% ----- procedures ----- + +/dotted { [1 4] 0 setdash } def +/dashed { [5] 0 setdash } def +/solid { [] 0 setdash } def + +/max % result = MAX(arg1,arg2) +{ + /a exch def + /b exch def + a b gt {a} {b} ifelse +} def + +/xoffset % result = MAX(0,(scalefactor-(boxwidth*cols+distx*(cols-1)))/2) +{ + 0 scalefactor boxwidth cols mul distx cols 1 sub mul add sub 2 div max +} def + +/cw % boxwidth = MAX(boxwidth, stringwidth(arg1)) +{ + /str exch def + /boxwidth boxwidth str stringwidth pop max def +} def + +/box % draws a box with text 'arg1' at grid pos (arg2,arg3) +{ gsave + 2 setlinewidth + newpath + exch xspacing mul xoffset add + exch yspacing mul + moveto + boxwidth 0 rlineto + 0 boxheight rlineto + boxwidth neg 0 rlineto + 0 boxheight neg rlineto + closepath + dup stringwidth pop neg boxwidth add 2 div + boxheight fontheight 2 div sub 2 div + rmoveto show stroke + grestore +} def + +/mark +{ newpath + exch xspacing mul xoffset add boxwidth add + exch yspacing mul + moveto + 0 boxheight 4 div rlineto + boxheight neg 4 div boxheight neg 4 div rlineto + closepath + eofill + stroke +} def + +/arrow +{ newpath + moveto + 3 -8 rlineto + -6 0 rlineto + 3 8 rlineto + closepath + eofill + stroke +} def + +/out % draws an output connector for the block at (arg1,arg2) +{ + newpath + exch xspacing mul xoffset add boxwidth 2 div add + exch yspacing mul boxheight add + /y exch def + /x exch def + x y moveto + 0 disty 2 div rlineto + stroke + 1 eq { x y disty 2 div add arrow } if +} def + +/in % draws an input connector for the block at (arg1,arg2) +{ + newpath + exch xspacing mul xoffset add boxwidth 2 div add + exch yspacing mul disty 2 div sub + /y exch def + /x exch def + x y moveto + 0 disty 2 div rlineto + stroke + 1 eq { x y disty 2 div add arrow } if +} def + +/hedge +{ + exch xspacing mul xoffset add boxwidth 2 div add + exch yspacing mul boxheight 2 div sub + /y exch def + /x exch def + newpath + x y moveto + boxwidth 2 div distx add 0 rlineto + stroke + 1 eq + { newpath x boxwidth 2 div distx add add y moveto + -8 3 rlineto + 0 -6 rlineto + 8 3 rlineto + closepath + eofill + stroke + } if +} def + +/vedge +{ + /ye exch def + /ys exch def + /xs exch def + newpath + xs xspacing mul xoffset add boxwidth 2 div add dup + ys yspacing mul boxheight 2 div sub + moveto + ye yspacing mul boxheight 2 div sub + lineto + stroke +} def + +/conn % connections the blocks from col 'arg1' to 'arg2' of row 'arg3' +{ + /ys exch def + /xe exch def + /xs exch def + newpath + xs xspacing mul xoffset add boxwidth 2 div add + ys yspacing mul disty 2 div sub + moveto + xspacing xe xs sub mul 0 + rlineto + stroke +} def + +% ----- main ------ + +boxfont setfont +1 boundaspect scale +(OpenShaderDesigner::Nodes::Math::Add) cw +(OpenShaderDesigner::Node) cw +/boxwidth boxwidth marginwidth 2 mul add def +/xspacing boxwidth distx add def +/yspacing boxheight disty add def +/scalefactor + boxwidth cols mul distx cols 1 sub mul add + boxheight rows mul disty rows 1 sub mul add boundaspect mul + max def +boundx scalefactor div boundy scalefactor div scale + +% ----- classes ----- + + (OpenShaderDesigner::Nodes::Math::Add) 0.000000 0.000000 box + (OpenShaderDesigner::Node) 0.000000 1.000000 box + +% ----- relations ----- + +solid +0 0.000000 0.000000 out +solid +1 0.000000 1.000000 in diff --git a/Documentation/latex/struct_open_shader_designer_1_1_nodes_1_1_math_1_1_add.tex b/Documentation/latex/struct_open_shader_designer_1_1_nodes_1_1_math_1_1_add.tex new file mode 100644 index 0000000..b7bf954 --- /dev/null +++ b/Documentation/latex/struct_open_shader_designer_1_1_nodes_1_1_math_1_1_add.tex @@ -0,0 +1,84 @@ +\doxysection{Open\+Shader\+Designer\+::Nodes\+::Math\+::Add Struct Reference} +\hypertarget{struct_open_shader_designer_1_1_nodes_1_1_math_1_1_add}{}\label{struct_open_shader_designer_1_1_nodes_1_1_math_1_1_add}\index{OpenShaderDesigner::Nodes::Math::Add@{OpenShaderDesigner::Nodes::Math::Add}} +Inheritance diagram for Open\+Shader\+Designer\+::Nodes\+::Math\+::Add\+:\begin{figure}[H] +\begin{center} +\leavevmode +\includegraphics[height=2.000000cm]{struct_open_shader_designer_1_1_nodes_1_1_math_1_1_add} +\end{center} +\end{figure} +\doxysubsubsection*{Public Member Functions} +\begin{DoxyCompactItemize} +\item +\Hypertarget{struct_open_shader_designer_1_1_nodes_1_1_math_1_1_add_a304e0edb3b70f6964bdceaa114e725aa}\label{struct_open_shader_designer_1_1_nodes_1_1_math_1_1_add_a304e0edb3b70f6964bdceaa114e725aa} +{\bfseries Add} (\mbox{\hyperlink{class_open_shader_designer_1_1_shader_graph}{Shader\+Graph}} \&graph, Im\+Vec2 pos) +\item +\mbox{\hyperlink{struct_open_shader_designer_1_1_node}{Node}} \texorpdfstring{$\ast$}{*} \mbox{\hyperlink{struct_open_shader_designer_1_1_nodes_1_1_math_1_1_add_a35cee587ccc6259b10708a6150733685}{Copy}} (\mbox{\hyperlink{class_open_shader_designer_1_1_shader_graph}{Shader\+Graph}} \&graph) const override +\item +void \mbox{\hyperlink{struct_open_shader_designer_1_1_nodes_1_1_math_1_1_add_adb5a7c2d022a3e9978dcac4c4fc0282a}{Inspect}} () override +\end{DoxyCompactItemize} +\doxysubsection*{Public Member Functions inherited from \mbox{\hyperlink{struct_open_shader_designer_1_1_node}{Open\+Shader\+Designer\+::\+Node}}} +\begin{DoxyCompactItemize} +\item +{\bfseries Node} (\mbox{\hyperlink{class_open_shader_designer_1_1_shader_graph}{Shader\+Graph}} \&graph, Im\+Vec2 pos, const std\+::string \&title, Im\+Color color, const std\+::vector$<$ \mbox{\hyperlink{struct_open_shader_designer_1_1_pin}{Pin}} $>$ \&inputs, bool dyn\+\_\+inputs, const std\+::vector$<$ \mbox{\hyperlink{struct_open_shader_designer_1_1_pin}{Pin}} $>$ \&outputs, bool constant=false) +\end{DoxyCompactItemize} +\doxysubsubsection*{Additional Inherited Members} +\doxysubsection*{Public Attributes inherited from \mbox{\hyperlink{struct_open_shader_designer_1_1_node}{Open\+Shader\+Designer\+::\+Node}}} +\begin{DoxyCompactItemize} +\item +Im\+Vec2 {\bfseries Position} = \{ 0, 0 \} +\item +\begin{tabbing} +xx\=xx\=xx\=xx\=xx\=xx\=xx\=xx\=xx\=\kill +struct \{\\ +\>std::string {\bfseries Title} = "{}Node"{}\\ +\>ImColor {\bfseries Color} = Pin::Colors\mbox{[}Pin::VECTOR\mbox{]}\\ +\>bool {\bfseries Enabled} = true\\ +\} {\bfseries Header}\\ + +\end{tabbing}\item +\begin{tabbing} +xx\=xx\=xx\=xx\=xx\=xx\=xx\=xx\=xx\=\kill +struct \{\\ +\>std::vector$<$ \mbox{\hyperlink{struct_open_shader_designer_1_1_pin}{Pin}} $>$ {\bfseries Inputs}\\ +\>std::vector$<$ \mbox{\hyperlink{struct_open_shader_designer_1_1_pin}{Pin}} $>$ {\bfseries Outputs}\\ +\>bool {\bfseries DynamicInputs} = false\\ +\} {\bfseries IO}\\ + +\end{tabbing}\item +\begin{tabbing} +xx\=xx\=xx\=xx\=xx\=xx\=xx\=xx\=xx\=\kill +struct \{\\ +\>ImVec2 {\bfseries Size}\\ +\>bool {\bfseries Const}\\ +\} {\bfseries Info}\\ + +\end{tabbing}\end{DoxyCompactItemize} + + +\doxysubsection{Member Function Documentation} +\Hypertarget{struct_open_shader_designer_1_1_nodes_1_1_math_1_1_add_a35cee587ccc6259b10708a6150733685}\index{OpenShaderDesigner::Nodes::Math::Add@{OpenShaderDesigner::Nodes::Math::Add}!Copy@{Copy}} +\index{Copy@{Copy}!OpenShaderDesigner::Nodes::Math::Add@{OpenShaderDesigner::Nodes::Math::Add}} +\doxysubsubsection{\texorpdfstring{Copy()}{Copy()}} +{\footnotesize\ttfamily \label{struct_open_shader_designer_1_1_nodes_1_1_math_1_1_add_a35cee587ccc6259b10708a6150733685} +\mbox{\hyperlink{struct_open_shader_designer_1_1_node}{Node}} \texorpdfstring{$\ast$}{*} Add\+::\+Copy (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{class_open_shader_designer_1_1_shader_graph}{Shader\+Graph}} \&}]{graph}{}\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [nodiscard]}, {\ttfamily [override]}, {\ttfamily [virtual]}} + + + +Implements \mbox{\hyperlink{struct_open_shader_designer_1_1_node}{Open\+Shader\+Designer\+::\+Node}}. + +\Hypertarget{struct_open_shader_designer_1_1_nodes_1_1_math_1_1_add_adb5a7c2d022a3e9978dcac4c4fc0282a}\index{OpenShaderDesigner::Nodes::Math::Add@{OpenShaderDesigner::Nodes::Math::Add}!Inspect@{Inspect}} +\index{Inspect@{Inspect}!OpenShaderDesigner::Nodes::Math::Add@{OpenShaderDesigner::Nodes::Math::Add}} +\doxysubsubsection{\texorpdfstring{Inspect()}{Inspect()}} +{\footnotesize\ttfamily \label{struct_open_shader_designer_1_1_nodes_1_1_math_1_1_add_adb5a7c2d022a3e9978dcac4c4fc0282a} +void Add\+::\+Inspect (\begin{DoxyParamCaption}{}{}\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [override]}, {\ttfamily [virtual]}} + + + +Implements \mbox{\hyperlink{struct_open_shader_designer_1_1_node}{Open\+Shader\+Designer\+::\+Node}}. + + + +The documentation for this struct was generated from the following files\+:\begin{DoxyCompactItemize} +\item +Include/\+Graph/\+Nodes/Math.\+h\item +Source/\+Graph/\+Nodes/Math.\+cpp\end{DoxyCompactItemize} diff --git a/Documentation/latex/struct_open_shader_designer_1_1_nodes_1_1_math_1_1_constant.eps b/Documentation/latex/struct_open_shader_designer_1_1_nodes_1_1_math_1_1_constant.eps new file mode 100644 index 0000000..534852c --- /dev/null +++ b/Documentation/latex/struct_open_shader_designer_1_1_nodes_1_1_math_1_1_constant.eps @@ -0,0 +1,197 @@ +%!PS-Adobe-2.0 EPSF-2.0 +%%Title: ClassName +%%Creator: Doxygen +%%CreationDate: Time +%%For: +%Magnification: 1.00 +%%Orientation: Portrait +%%BoundingBox: 0 0 500 145.985397 +%%Pages: 0 +%%BeginSetup +%%EndSetup +%%EndComments + +% ----- variables ----- + +/boxwidth 0 def +/boxheight 40 def +/fontheight 24 def +/marginwidth 10 def +/distx 20 def +/disty 40 def +/boundaspect 3.425000 def % aspect ratio of the BoundingBox (width/height) +/boundx 500 def +/boundy boundx boundaspect div def +/xspacing 0 def +/yspacing 0 def +/rows 2 def +/cols 1 def +/scalefactor 0 def +/boxfont /Times-Roman findfont fontheight scalefont def + +% ----- procedures ----- + +/dotted { [1 4] 0 setdash } def +/dashed { [5] 0 setdash } def +/solid { [] 0 setdash } def + +/max % result = MAX(arg1,arg2) +{ + /a exch def + /b exch def + a b gt {a} {b} ifelse +} def + +/xoffset % result = MAX(0,(scalefactor-(boxwidth*cols+distx*(cols-1)))/2) +{ + 0 scalefactor boxwidth cols mul distx cols 1 sub mul add sub 2 div max +} def + +/cw % boxwidth = MAX(boxwidth, stringwidth(arg1)) +{ + /str exch def + /boxwidth boxwidth str stringwidth pop max def +} def + +/box % draws a box with text 'arg1' at grid pos (arg2,arg3) +{ gsave + 2 setlinewidth + newpath + exch xspacing mul xoffset add + exch yspacing mul + moveto + boxwidth 0 rlineto + 0 boxheight rlineto + boxwidth neg 0 rlineto + 0 boxheight neg rlineto + closepath + dup stringwidth pop neg boxwidth add 2 div + boxheight fontheight 2 div sub 2 div + rmoveto show stroke + grestore +} def + +/mark +{ newpath + exch xspacing mul xoffset add boxwidth add + exch yspacing mul + moveto + 0 boxheight 4 div rlineto + boxheight neg 4 div boxheight neg 4 div rlineto + closepath + eofill + stroke +} def + +/arrow +{ newpath + moveto + 3 -8 rlineto + -6 0 rlineto + 3 8 rlineto + closepath + eofill + stroke +} def + +/out % draws an output connector for the block at (arg1,arg2) +{ + newpath + exch xspacing mul xoffset add boxwidth 2 div add + exch yspacing mul boxheight add + /y exch def + /x exch def + x y moveto + 0 disty 2 div rlineto + stroke + 1 eq { x y disty 2 div add arrow } if +} def + +/in % draws an input connector for the block at (arg1,arg2) +{ + newpath + exch xspacing mul xoffset add boxwidth 2 div add + exch yspacing mul disty 2 div sub + /y exch def + /x exch def + x y moveto + 0 disty 2 div rlineto + stroke + 1 eq { x y disty 2 div add arrow } if +} def + +/hedge +{ + exch xspacing mul xoffset add boxwidth 2 div add + exch yspacing mul boxheight 2 div sub + /y exch def + /x exch def + newpath + x y moveto + boxwidth 2 div distx add 0 rlineto + stroke + 1 eq + { newpath x boxwidth 2 div distx add add y moveto + -8 3 rlineto + 0 -6 rlineto + 8 3 rlineto + closepath + eofill + stroke + } if +} def + +/vedge +{ + /ye exch def + /ys exch def + /xs exch def + newpath + xs xspacing mul xoffset add boxwidth 2 div add dup + ys yspacing mul boxheight 2 div sub + moveto + ye yspacing mul boxheight 2 div sub + lineto + stroke +} def + +/conn % connections the blocks from col 'arg1' to 'arg2' of row 'arg3' +{ + /ys exch def + /xe exch def + /xs exch def + newpath + xs xspacing mul xoffset add boxwidth 2 div add + ys yspacing mul disty 2 div sub + moveto + xspacing xe xs sub mul 0 + rlineto + stroke +} def + +% ----- main ------ + +boxfont setfont +1 boundaspect scale +(OpenShaderDesigner::Nodes::Math::Constant) cw +(OpenShaderDesigner::Node) cw +/boxwidth boxwidth marginwidth 2 mul add def +/xspacing boxwidth distx add def +/yspacing boxheight disty add def +/scalefactor + boxwidth cols mul distx cols 1 sub mul add + boxheight rows mul disty rows 1 sub mul add boundaspect mul + max def +boundx scalefactor div boundy scalefactor div scale + +% ----- classes ----- + + (OpenShaderDesigner::Nodes::Math::Constant) 0.000000 0.000000 box + (OpenShaderDesigner::Node) 0.000000 1.000000 box + +% ----- relations ----- + +solid +0 0.000000 0.000000 out +solid +1 0.000000 1.000000 in diff --git a/Documentation/latex/struct_open_shader_designer_1_1_nodes_1_1_math_1_1_constant.tex b/Documentation/latex/struct_open_shader_designer_1_1_nodes_1_1_math_1_1_constant.tex new file mode 100644 index 0000000..98f71d0 --- /dev/null +++ b/Documentation/latex/struct_open_shader_designer_1_1_nodes_1_1_math_1_1_constant.tex @@ -0,0 +1,95 @@ +\doxysection{Open\+Shader\+Designer\+::Nodes\+::Math\+::Constant Struct Reference} +\hypertarget{struct_open_shader_designer_1_1_nodes_1_1_math_1_1_constant}{}\label{struct_open_shader_designer_1_1_nodes_1_1_math_1_1_constant}\index{OpenShaderDesigner::Nodes::Math::Constant@{OpenShaderDesigner::Nodes::Math::Constant}} +Inheritance diagram for Open\+Shader\+Designer\+::Nodes\+::Math\+::Constant\+:\begin{figure}[H] +\begin{center} +\leavevmode +\includegraphics[height=2.000000cm]{struct_open_shader_designer_1_1_nodes_1_1_math_1_1_constant} +\end{center} +\end{figure} +\doxysubsubsection*{Public Types} +\begin{DoxyCompactItemize} +\item +\Hypertarget{struct_open_shader_designer_1_1_nodes_1_1_math_1_1_constant_ab0cc15113a55a324a9c38fb2dbbc8e98}\label{struct_open_shader_designer_1_1_nodes_1_1_math_1_1_constant_ab0cc15113a55a324a9c38fb2dbbc8e98} +using {\bfseries Value\+Type} = ocu\+::any$<$int, unsigned int, float, glm\+::vec4$>$ +\end{DoxyCompactItemize} +\doxysubsubsection*{Public Member Functions} +\begin{DoxyCompactItemize} +\item +\Hypertarget{struct_open_shader_designer_1_1_nodes_1_1_math_1_1_constant_adf8461f427a174d1e94069af649c7a89}\label{struct_open_shader_designer_1_1_nodes_1_1_math_1_1_constant_adf8461f427a174d1e94069af649c7a89} +{\bfseries Constant} (\mbox{\hyperlink{class_open_shader_designer_1_1_shader_graph}{Shader\+Graph}} \&graph, Im\+Vec2 pos) +\item +\mbox{\hyperlink{struct_open_shader_designer_1_1_node}{Node}} \texorpdfstring{$\ast$}{*} \mbox{\hyperlink{struct_open_shader_designer_1_1_nodes_1_1_math_1_1_constant_a6b626d851b1ce89d6848a4c9f99de5fc}{Copy}} (\mbox{\hyperlink{class_open_shader_designer_1_1_shader_graph}{Shader\+Graph}} \&graph) const override +\item +void \mbox{\hyperlink{struct_open_shader_designer_1_1_nodes_1_1_math_1_1_constant_af61c06d1f09ba74b2322342f820590f3}{Inspect}} () override +\end{DoxyCompactItemize} +\doxysubsection*{Public Member Functions inherited from \mbox{\hyperlink{struct_open_shader_designer_1_1_node}{Open\+Shader\+Designer\+::\+Node}}} +\begin{DoxyCompactItemize} +\item +{\bfseries Node} (\mbox{\hyperlink{class_open_shader_designer_1_1_shader_graph}{Shader\+Graph}} \&graph, Im\+Vec2 pos, const std\+::string \&title, Im\+Color color, const std\+::vector$<$ \mbox{\hyperlink{struct_open_shader_designer_1_1_pin}{Pin}} $>$ \&inputs, bool dyn\+\_\+inputs, const std\+::vector$<$ \mbox{\hyperlink{struct_open_shader_designer_1_1_pin}{Pin}} $>$ \&outputs, bool constant=false) +\end{DoxyCompactItemize} +\doxysubsubsection*{Public Attributes} +\begin{DoxyCompactItemize} +\item +\Hypertarget{struct_open_shader_designer_1_1_nodes_1_1_math_1_1_constant_ae29d89d011107458842c28076c249f5f}\label{struct_open_shader_designer_1_1_nodes_1_1_math_1_1_constant_ae29d89d011107458842c28076c249f5f} +Value\+Type {\bfseries Value} +\end{DoxyCompactItemize} +\doxysubsection*{Public Attributes inherited from \mbox{\hyperlink{struct_open_shader_designer_1_1_node}{Open\+Shader\+Designer\+::\+Node}}} +\begin{DoxyCompactItemize} +\item +Im\+Vec2 {\bfseries Position} = \{ 0, 0 \} +\item +\begin{tabbing} +xx\=xx\=xx\=xx\=xx\=xx\=xx\=xx\=xx\=\kill +struct \{\\ +\>std::string {\bfseries Title} = "{}Node"{}\\ +\>ImColor {\bfseries Color} = Pin::Colors\mbox{[}Pin::VECTOR\mbox{]}\\ +\>bool {\bfseries Enabled} = true\\ +\} {\bfseries Header}\\ + +\end{tabbing}\item +\begin{tabbing} +xx\=xx\=xx\=xx\=xx\=xx\=xx\=xx\=xx\=\kill +struct \{\\ +\>std::vector$<$ \mbox{\hyperlink{struct_open_shader_designer_1_1_pin}{Pin}} $>$ {\bfseries Inputs}\\ +\>std::vector$<$ \mbox{\hyperlink{struct_open_shader_designer_1_1_pin}{Pin}} $>$ {\bfseries Outputs}\\ +\>bool {\bfseries DynamicInputs} = false\\ +\} {\bfseries IO}\\ + +\end{tabbing}\item +\begin{tabbing} +xx\=xx\=xx\=xx\=xx\=xx\=xx\=xx\=xx\=\kill +struct \{\\ +\>ImVec2 {\bfseries Size}\\ +\>bool {\bfseries Const}\\ +\} {\bfseries Info}\\ + +\end{tabbing}\end{DoxyCompactItemize} + + +\doxysubsection{Member Function Documentation} +\Hypertarget{struct_open_shader_designer_1_1_nodes_1_1_math_1_1_constant_a6b626d851b1ce89d6848a4c9f99de5fc}\index{OpenShaderDesigner::Nodes::Math::Constant@{OpenShaderDesigner::Nodes::Math::Constant}!Copy@{Copy}} +\index{Copy@{Copy}!OpenShaderDesigner::Nodes::Math::Constant@{OpenShaderDesigner::Nodes::Math::Constant}} +\doxysubsubsection{\texorpdfstring{Copy()}{Copy()}} +{\footnotesize\ttfamily \label{struct_open_shader_designer_1_1_nodes_1_1_math_1_1_constant_a6b626d851b1ce89d6848a4c9f99de5fc} +\mbox{\hyperlink{struct_open_shader_designer_1_1_node}{Node}} \texorpdfstring{$\ast$}{*} Constant\+::\+Copy (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{class_open_shader_designer_1_1_shader_graph}{Shader\+Graph}} \&}]{graph}{}\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [nodiscard]}, {\ttfamily [override]}, {\ttfamily [virtual]}} + + + +Implements \mbox{\hyperlink{struct_open_shader_designer_1_1_node}{Open\+Shader\+Designer\+::\+Node}}. + +\Hypertarget{struct_open_shader_designer_1_1_nodes_1_1_math_1_1_constant_af61c06d1f09ba74b2322342f820590f3}\index{OpenShaderDesigner::Nodes::Math::Constant@{OpenShaderDesigner::Nodes::Math::Constant}!Inspect@{Inspect}} +\index{Inspect@{Inspect}!OpenShaderDesigner::Nodes::Math::Constant@{OpenShaderDesigner::Nodes::Math::Constant}} +\doxysubsubsection{\texorpdfstring{Inspect()}{Inspect()}} +{\footnotesize\ttfamily \label{struct_open_shader_designer_1_1_nodes_1_1_math_1_1_constant_af61c06d1f09ba74b2322342f820590f3} +void Constant\+::\+Inspect (\begin{DoxyParamCaption}{}{}\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [override]}, {\ttfamily [virtual]}} + + + +Implements \mbox{\hyperlink{struct_open_shader_designer_1_1_node}{Open\+Shader\+Designer\+::\+Node}}. + + + +The documentation for this struct was generated from the following files\+:\begin{DoxyCompactItemize} +\item +Include/\+Graph/\+Nodes/Math.\+h\item +Source/\+Graph/\+Nodes/Math.\+cpp\end{DoxyCompactItemize} diff --git a/Documentation/latex/struct_open_shader_designer_1_1_pin.tex b/Documentation/latex/struct_open_shader_designer_1_1_pin.tex new file mode 100644 index 0000000..a65313f --- /dev/null +++ b/Documentation/latex/struct_open_shader_designer_1_1_pin.tex @@ -0,0 +1,82 @@ +\doxysection{Open\+Shader\+Designer\+::Pin Struct Reference} +\hypertarget{struct_open_shader_designer_1_1_pin}{}\label{struct_open_shader_designer_1_1_pin}\index{OpenShaderDesigner::Pin@{OpenShaderDesigner::Pin}} +\doxysubsubsection*{Public Types} +\begin{DoxyCompactItemize} +\item +\Hypertarget{struct_open_shader_designer_1_1_pin_a6ada53e38cf37f516479c3dcabddb284}\label{struct_open_shader_designer_1_1_pin_a6ada53e38cf37f516479c3dcabddb284} +enum {\bfseries Pin\+Type} \{ \newline +{\bfseries INT} = 0 +, {\bfseries UINT} +, {\bfseries FLOAT} +, {\bfseries VECTOR} +, \newline +{\bfseries ANY} +, {\bfseries COUNT} + \} +\item +\Hypertarget{struct_open_shader_designer_1_1_pin_a8adb1f80b40e1a4c7ad86fdb9e08e594}\label{struct_open_shader_designer_1_1_pin_a8adb1f80b40e1a4c7ad86fdb9e08e594} +enum {\bfseries Pin\+Direction} \{ {\bfseries INPUT} +, {\bfseries OUTPUT} + \} +\end{DoxyCompactItemize} +\doxysubsubsection*{Public Attributes} +\begin{DoxyCompactItemize} +\item +\Hypertarget{struct_open_shader_designer_1_1_pin_a8e42a1b60833cb40d71e5ae833cd4673}\label{struct_open_shader_designer_1_1_pin_a8e42a1b60833cb40d71e5ae833cd4673} +std\+::string {\bfseries Name} +\item +\Hypertarget{struct_open_shader_designer_1_1_pin_af0d09ac1168526f8f3a77c4ed180ef46}\label{struct_open_shader_designer_1_1_pin_af0d09ac1168526f8f3a77c4ed180ef46} +Pin\+Type {\bfseries Type} +\item +\Hypertarget{struct_open_shader_designer_1_1_pin_aa36a624e048b7dddbe797d456b05f649}\label{struct_open_shader_designer_1_1_pin_aa36a624e048b7dddbe797d456b05f649} +Pin\+Direction {\bfseries Direction} +\end{DoxyCompactItemize} +\doxysubsubsection*{Static Public Attributes} +\begin{DoxyCompactItemize} +\item +static const Im\+Color \mbox{\hyperlink{struct_open_shader_designer_1_1_pin_ac0bc314af51ae0f04cdeaf7911891c70}{Colors}} \mbox{[}COUNT\mbox{]} +\item +static const std\+::string \mbox{\hyperlink{struct_open_shader_designer_1_1_pin_aafe6dbb5ecd7409ddd19e6acf27c9cb5}{Type\+Names}} \mbox{[}COUNT\mbox{]} +\end{DoxyCompactItemize} + + +\doxysubsection{Member Data Documentation} +\Hypertarget{struct_open_shader_designer_1_1_pin_ac0bc314af51ae0f04cdeaf7911891c70}\index{OpenShaderDesigner::Pin@{OpenShaderDesigner::Pin}!Colors@{Colors}} +\index{Colors@{Colors}!OpenShaderDesigner::Pin@{OpenShaderDesigner::Pin}} +\doxysubsubsection{\texorpdfstring{Colors}{Colors}} +{\footnotesize\ttfamily \label{struct_open_shader_designer_1_1_pin_ac0bc314af51ae0f04cdeaf7911891c70} +const Im\+Color Open\+Shader\+Designer\+::\+Pin\+::\+Colors\mbox{[}COUNT\mbox{]}\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [static]}} + +{\bfseries Initial value\+:} +\begin{DoxyCode}{0} +\DoxyCodeLine{=\ \{} +\DoxyCodeLine{\ \ \ \ \ \ \ \ \ \ \ \ ImColor(0xB9,\ 0xF5,\ 0x94)} +\DoxyCodeLine{\ \ \ \ \ \ \ \ ,\ \ \ ImColor(0x8C,\ 0xC0,\ 0x8C)} +\DoxyCodeLine{\ \ \ \ \ \ \ \ ,\ \ \ ImColor(0x37,\ 0x95,\ 0x85)} +\DoxyCodeLine{\ \ \ \ \ \ \ \ ,\ \ \ ImColor(0xE3,\ 0x7D,\ 0xDC)} +\DoxyCodeLine{} +\DoxyCodeLine{\ \ \ \ \ \ \ \ ,\ \ \ ImColor(0xD2,\ 0xD5,\ 0xD3)} +\DoxyCodeLine{\ \ \ \ \ \ \ \ \}} + +\end{DoxyCode} +\Hypertarget{struct_open_shader_designer_1_1_pin_aafe6dbb5ecd7409ddd19e6acf27c9cb5}\index{OpenShaderDesigner::Pin@{OpenShaderDesigner::Pin}!TypeNames@{TypeNames}} +\index{TypeNames@{TypeNames}!OpenShaderDesigner::Pin@{OpenShaderDesigner::Pin}} +\doxysubsubsection{\texorpdfstring{TypeNames}{TypeNames}} +{\footnotesize\ttfamily \label{struct_open_shader_designer_1_1_pin_aafe6dbb5ecd7409ddd19e6acf27c9cb5} +const std\+::string Open\+Shader\+Designer\+::\+Pin\+::\+Type\+Names\mbox{[}COUNT\mbox{]}\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [static]}} + +{\bfseries Initial value\+:} +\begin{DoxyCode}{0} +\DoxyCodeLine{=\ \{} +\DoxyCodeLine{\ \ \ \ \ \ \ \ \ \ \ \ \textcolor{stringliteral}{"{}Int"{}}} +\DoxyCodeLine{\ \ \ \ \ \ \ \ ,\ \ \ \textcolor{stringliteral}{"{}Unsigned\ Int"{}}} +\DoxyCodeLine{\ \ \ \ \ \ \ \ ,\ \ \ \textcolor{stringliteral}{"{}Float"{}}} +\DoxyCodeLine{\ \ \ \ \ \ \ \ ,\ \ \ \textcolor{stringliteral}{"{}Vector"{}}} +\DoxyCodeLine{\ \ \ \ \ \ \ \ \}} + +\end{DoxyCode} + + +The documentation for this struct was generated from the following file\+:\begin{DoxyCompactItemize} +\item +Include/\+Graph/Shader\+Graph.\+h\end{DoxyCompactItemize} diff --git a/Documentation/latex/struct_open_shader_designer_1_1_pin_ptr.tex b/Documentation/latex/struct_open_shader_designer_1_1_pin_ptr.tex new file mode 100644 index 0000000..4c8bafe --- /dev/null +++ b/Documentation/latex/struct_open_shader_designer_1_1_pin_ptr.tex @@ -0,0 +1,36 @@ +\doxysection{Open\+Shader\+Designer\+::Pin\+Ptr Struct Reference} +\hypertarget{struct_open_shader_designer_1_1_pin_ptr}{}\label{struct_open_shader_designer_1_1_pin_ptr}\index{OpenShaderDesigner::PinPtr@{OpenShaderDesigner::PinPtr}} +\doxysubsubsection*{Classes} +\begin{DoxyCompactItemize} +\item +struct \mbox{\hyperlink{struct_open_shader_designer_1_1_pin_ptr_1_1_hash}{Hash}} +\end{DoxyCompactItemize} +\doxysubsubsection*{Public Member Functions} +\begin{DoxyCompactItemize} +\item +\Hypertarget{struct_open_shader_designer_1_1_pin_ptr_ae8e1fad0ecd667b0f82c6c6e60571ec6}\label{struct_open_shader_designer_1_1_pin_ptr_ae8e1fad0ecd667b0f82c6c6e60571ec6} +size\+\_\+t {\bfseries hash} () const +\item +\Hypertarget{struct_open_shader_designer_1_1_pin_ptr_ad976896c93c793300c5e039e34cfc4fd}\label{struct_open_shader_designer_1_1_pin_ptr_ad976896c93c793300c5e039e34cfc4fd} +bool {\bfseries operator$<$} (const \mbox{\hyperlink{struct_open_shader_designer_1_1_pin_ptr}{Pin\+Ptr}} \&o) const +\item +\Hypertarget{struct_open_shader_designer_1_1_pin_ptr_af10e42b7febeb0289092734d2f542873}\label{struct_open_shader_designer_1_1_pin_ptr_af10e42b7febeb0289092734d2f542873} +bool {\bfseries operator==} (const \mbox{\hyperlink{struct_open_shader_designer_1_1_pin_ptr}{Pin\+Ptr}} \&o) const +\end{DoxyCompactItemize} +\doxysubsubsection*{Public Attributes} +\begin{DoxyCompactItemize} +\item +\Hypertarget{struct_open_shader_designer_1_1_pin_ptr_a4f9dff066d725da527c0b67b6845211d}\label{struct_open_shader_designer_1_1_pin_ptr_a4f9dff066d725da527c0b67b6845211d} +Node\+Id {\bfseries Node} +\item +\Hypertarget{struct_open_shader_designer_1_1_pin_ptr_a6179b48b34aa8490e80911f1d87b8b89}\label{struct_open_shader_designer_1_1_pin_ptr_a6179b48b34aa8490e80911f1d87b8b89} +Pin\+Id {\bfseries Pin} +\item +\Hypertarget{struct_open_shader_designer_1_1_pin_ptr_a530bfea2267cfe0513fedb8986f4a193}\label{struct_open_shader_designer_1_1_pin_ptr_a530bfea2267cfe0513fedb8986f4a193} +bool {\bfseries Input} +\end{DoxyCompactItemize} + + +The documentation for this struct was generated from the following file\+:\begin{DoxyCompactItemize} +\item +Include/\+Graph/Shader\+Graph.\+h\end{DoxyCompactItemize} diff --git a/Documentation/latex/struct_open_shader_designer_1_1_pin_ptr_1_1_hash.tex b/Documentation/latex/struct_open_shader_designer_1_1_pin_ptr_1_1_hash.tex new file mode 100644 index 0000000..b0a3280 --- /dev/null +++ b/Documentation/latex/struct_open_shader_designer_1_1_pin_ptr_1_1_hash.tex @@ -0,0 +1,13 @@ +\doxysection{Open\+Shader\+Designer\+::Pin\+Ptr\+::Hash Struct Reference} +\hypertarget{struct_open_shader_designer_1_1_pin_ptr_1_1_hash}{}\label{struct_open_shader_designer_1_1_pin_ptr_1_1_hash}\index{OpenShaderDesigner::PinPtr::Hash@{OpenShaderDesigner::PinPtr::Hash}} +\doxysubsubsection*{Public Member Functions} +\begin{DoxyCompactItemize} +\item +\Hypertarget{struct_open_shader_designer_1_1_pin_ptr_1_1_hash_a9caeb7a65481cb01924e647cb182bcfa}\label{struct_open_shader_designer_1_1_pin_ptr_1_1_hash_a9caeb7a65481cb01924e647cb182bcfa} +size\+\_\+t {\bfseries operator()} (const \mbox{\hyperlink{struct_open_shader_designer_1_1_pin_ptr}{Pin\+Ptr}} \&p) const +\end{DoxyCompactItemize} + + +The documentation for this struct was generated from the following file\+:\begin{DoxyCompactItemize} +\item +Include/\+Graph/Shader\+Graph.\+h\end{DoxyCompactItemize} diff --git a/Documentation/latex/struct_open_shader_designer_1_1_window_1_1_configuration.tex b/Documentation/latex/struct_open_shader_designer_1_1_window_1_1_configuration.tex new file mode 100644 index 0000000..bf0f076 --- /dev/null +++ b/Documentation/latex/struct_open_shader_designer_1_1_window_1_1_configuration.tex @@ -0,0 +1,29 @@ +\doxysection{Open\+Shader\+Designer\+::Window\+::Configuration Struct Reference} +\hypertarget{struct_open_shader_designer_1_1_window_1_1_configuration}{}\label{struct_open_shader_designer_1_1_window_1_1_configuration}\index{OpenShaderDesigner::Window::Configuration@{OpenShaderDesigner::Window::Configuration}} +\doxysubsubsection*{Public Attributes} +\begin{DoxyCompactItemize} +\item +\Hypertarget{struct_open_shader_designer_1_1_window_1_1_configuration_ad546a5724c77316bd1277d71e6df15c9}\label{struct_open_shader_designer_1_1_window_1_1_configuration_ad546a5724c77316bd1277d71e6df15c9} +\begin{tabbing} +xx\=xx\=xx\=xx\=xx\=xx\=xx\=xx\=xx\=\kill +struct \{\\ +\>std::string {\bfseries Title}\\ +\} {\bfseries Application}\\ + +\end{tabbing}\item +\Hypertarget{struct_open_shader_designer_1_1_window_1_1_configuration_ae7aacc0332fb37f7725705940dd819be}\label{struct_open_shader_designer_1_1_window_1_1_configuration_ae7aacc0332fb37f7725705940dd819be} +\begin{tabbing} +xx\=xx\=xx\=xx\=xx\=xx\=xx\=xx\=xx\=\kill +struct \{\\ +\>FullscreenMode {\bfseries Fullscreen}\\ +\>glm::ivec2 {\bfseries Resolution}\\ +\>VSyncMode {\bfseries VSync}\\ +\>bool {\bfseries HDR}\\ +\} {\bfseries Video}\\ + +\end{tabbing}\end{DoxyCompactItemize} + + +The documentation for this struct was generated from the following file\+:\begin{DoxyCompactItemize} +\item +Include/\+Core/Window.\+h\end{DoxyCompactItemize} diff --git a/Documentation/latex/tabu_doxygen.sty b/Documentation/latex/tabu_doxygen.sty new file mode 100644 index 0000000..3f17d1d --- /dev/null +++ b/Documentation/latex/tabu_doxygen.sty @@ -0,0 +1,2557 @@ +%% +%% This is file `tabu.sty', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% tabu.dtx (with options: `package') +%% +%% This is a generated file. +%% Copyright (FC) 2010-2011 - lppl +%% +%% tabu : 2011/02/26 v2.8 - tabu : Flexible LaTeX tabulars +%% +%% ********************************************************************************************** +%% \begin{tabu} { preamble } => default target: \linewidth or \linegoal +%% \begin{tabu} to { preamble } => target specified +%% \begin{tabu} spread { preamble } => target relative to the ``natural width'' +%% +%% tabu works in text and in math modes. +%% +%% X columns: automatic width adjustment + horizontal and vertical alignment +%% \begin{tabu} { X[4c] X[1c] X[-2ml] } +%% +%% Horizontal lines and / or leaders: +%% \hline\hline => double horizontal line +%% \firsthline\hline => for nested tabulars +%% \lasthline\hline => for nested tabulars +%% \tabucline[line spec]{column-column} => ``funny'' lines (dash/leader) +%% Automatic lines / leaders : +%% \everyrow{\hline\hline} +%% +%% Vertical lines and / or leaders: +%% \begin{tabu} { |[3pt red] X[4c] X[1c] X[-2ml] |[3pt blue] } +%% \begin{tabu} { |[3pt red] X[4c] X[1c] X[-2ml] |[3pt on 2pt off 4pt blue] } +%% +%% Fixed vertical spacing adjustment: +%% \extrarowheight= \extrarowdepth= +%% or: \extrarowsep= => may be prefixed by \global +%% +%% Dynamic vertical spacing adjustment: +%% \abovetabulinesep= \belowtabulinesep= +%% or: \tabulinesep= => may be prefixed by \global +%% +%% delarray.sty shortcuts: in math and text modes +%% \begin{tabu} .... \({ preamble }\) +%% +%% Algorithms reports: +%% \tracingtabu=1 \tracingtabu=2 +%% +%% ********************************************************************************************** +%% +%% This work may be distributed and/or modified under the +%% conditions of the LaTeX Project Public License, either +%% version 1.3 of this license or (at your option) any later +%% version. The latest version of this license is in +%% http://www.latex-project.org/lppl.txt +%% +%% This work consists of the main source file tabu.dtx +%% and the derived files +%% tabu.sty, tabu.pdf, tabu.ins +%% +%% tabu : Flexible LaTeX tabulars +%% lppl copyright 2010-2011 by FC +%% + +\NeedsTeXFormat{LaTeX2e}[2005/12/01] +\ProvidesPackage{tabu_doxygen}[2011/02/26 v2.8 - flexible LaTeX tabulars (FC), frozen version for doxygen] +\RequirePackage{array}[2008/09/09] +\RequirePackage{varwidth}[2009/03/30] +\AtEndOfPackage{\tabu@AtEnd \let\tabu@AtEnd \@undefined} +\let\tabu@AtEnd\@empty +\def\TMP@EnsureCode#1={% + \edef\tabu@AtEnd{\tabu@AtEnd + \catcode#1 \the\catcode#1}% + \catcode#1=% +}% \TMP@EnsureCode +\TMP@EnsureCode 33 = 12 % ! +\TMP@EnsureCode 58 = 12 % : (for siunitx) +\TMP@EnsureCode124 = 12 % | +\TMP@EnsureCode 36 = 3 % $ = math shift +\TMP@EnsureCode 38 = 4 % & = tab alignment character +\TMP@EnsureCode 32 = 10 % space +\TMP@EnsureCode 94 = 7 % ^ +\TMP@EnsureCode 95 = 8 % _ +%% Constants -------------------------------------------------------- +\newcount \c@taburow \def\thetaburow {\number\c@taburow} +\newcount \tabu@nbcols +\newcount \tabu@cnt +\newcount \tabu@Xcol +\let\tabu@start \@tempcnta +\let\tabu@stop \@tempcntb +\newcount \tabu@alloc \tabu@alloc=\m@ne +\newcount \tabu@nested +\def\tabu@alloc@{\global\advance\tabu@alloc \@ne \tabu@nested\tabu@alloc} +\newdimen \tabu@target +\newdimen \tabu@spreadtarget +\newdimen \tabu@naturalX +\newdimen \tabucolX +\let\tabu@DELTA \@tempdimc +\let\tabu@thick \@tempdima +\let\tabu@on \@tempdimb +\let\tabu@off \@tempdimc +\newdimen \tabu@Xsum +\newdimen \extrarowdepth +\newdimen \abovetabulinesep +\newdimen \belowtabulinesep +\newdimen \tabustrutrule \tabustrutrule \z@ +\newtoks \tabu@thebody +\newtoks \tabu@footnotes +\newsavebox \tabu@box +\newsavebox \tabu@arstrutbox +\newsavebox \tabu@hleads +\newsavebox \tabu@vleads +\newif \iftabu@colortbl +\newif \iftabu@siunitx +\newif \iftabu@measuring +\newif \iftabu@spread +\newif \iftabu@negcoef +\newif \iftabu@everyrow +\def\tabu@everyrowtrue {\global\let\iftabu@everyrow \iftrue} +\def\tabu@everyrowfalse{\global\let\iftabu@everyrow \iffalse} +\newif \iftabu@long +\newif \iftabuscantokens +\def\tabu@rescan {\tabu@verbatim \scantokens } +%% Utilities (for internal usage) ----------------------------------- +\def\tabu@gobblespace #1 {#1} +\def\tabu@gobbletoken #1#2{#1} +\def\tabu@gobbleX{\futurelet\@let@token \tabu@gobblex} +\def\tabu@gobblex{\if ^^J\noexpand\@let@token \expandafter\@gobble + \else\ifx \@sptoken\@let@token + \expandafter\tabu@gobblespace\expandafter\tabu@gobbleX + \fi\fi +}% \tabu@gobblex +\def\tabu@X{^^J} +{\obeyspaces +\global\let\tabu@spxiii= % saves an active space (for \ifx) +\gdef\tabu@@spxiii{ }} +\def\tabu@ifenvir {% only for \multicolumn + \expandafter\tabu@if@nvir\csname\@currenvir\endcsname +}% \tabu@ifenvir +\def\tabu@if@nvir #1{\csname @\ifx\tabu#1first\else + \ifx\longtabu#1first\else + second\fi\fi oftwo\endcsname +}% \tabu@ifenvir +\def\tabu@modulo #1#2{\numexpr\ifnum\numexpr#1=\z@ 0\else #1-(#1-(#2-1)/2)/(#2)*(#2)\fi} +{\catcode`\&=3 +\gdef\tabu@strtrim #1{% #1 = control sequence to trim + \ifodd 1\ifx #1\@empty \else \ifx #1\space \else 0\fi \fi + \let\tabu@c@l@r \@empty \let#1\@empty + \else \expandafter \tabu@trimspaces #1\@nnil + \fi +}% \tabu@strtrim +\gdef\tabu@trimspaces #1\@nnil{\let\tabu@c@l@r=#2\tabu@firstspace .#1& }% +\gdef\tabu@firstspace #1#2#3 &{\tabu@lastspace #2#3&} +\gdef\tabu@lastspace #1{\def #3{#1}% + \ifx #3\tabu@c@l@r \def\tabu@c@l@r{\protect\color{#1}}\expandafter\remove@to@nnil \fi + \tabu@trimspaces #1\@nnil} +}% \catcode +\def\tabu@sanitizearg #1#2{{% + \csname \ifcsname if@safe@actives\endcsname % + @safe@activestrue\else + relax\fi \endcsname + \edef#2{#1}\tabu@strtrim#2\@onelevel@sanitize#2% + \expandafter}\expandafter\def\expandafter#2\expandafter{#2}% +}% \tabu@sanitizearg +\def\tabu@textbar #1{\begingroup \endlinechar\m@ne \scantokens{\def\:{|}}% + \expandafter\endgroup \expandafter#1\:% !!! semi simple group !!! +}% \tabu@textbar +\def\tabu@everyrow@bgroup{\iftabu@everyrow \begingroup \else \noalign{\ifnum0=`}\fi \fi} +\def\tabu@everyrow@egroup{% + \iftabu@everyrow \expandafter \endgroup \the\toks@ + \else \ifnum0=`{\fi}% + \fi +}% \tabu@everyrow@egroup +\def\tabu@arstrut {\global\setbox\@arstrutbox \hbox{\vrule + height \arraystretch \dimexpr\ht\strutbox+\extrarowheight + depth \arraystretch \dimexpr\dp\strutbox+\extrarowdepth + width \z@}% +}% \tabu@arstrut +\def\tabu@rearstrut {% + \@tempdima \arraystretch\dimexpr\ht\strutbox+\extrarowheight \relax + \@tempdimb \arraystretch\dimexpr\dp\strutbox+\extrarowdepth \relax + \ifodd 1\ifdim \ht\@arstrutbox=\@tempdima + \ifdim \dp\@arstrutbox=\@tempdimb 0 \fi\fi + \tabu@mkarstrut + \fi +}% \tabu@rearstrut +\def\tabu@@DBG #1{\ifdim\tabustrutrule>\z@ \color{#1}\fi} +\def\tabu@DBG@arstrut {\global\setbox\@arstrutbox + \hbox to\z@{\hbox to\z@{\hss + {\tabu@DBG{cyan}\vrule + height \arraystretch \dimexpr\ht\strutbox+\extrarowheight + depth \z@ + width \tabustrutrule}\kern-\tabustrutrule + {\tabu@DBG{pink}\vrule + height \z@ + depth \arraystretch \dimexpr\dp\strutbox+\extrarowdepth + width \tabustrutrule}}}% +}% \tabu@DBG@arstrut +\def\tabu@save@decl{\toks\count@ \expandafter{\the\toks\expandafter\count@ + \@nextchar}}% +\def\tabu@savedecl{\ifcat$\d@llarend\else + \let\save@decl \tabu@save@decl \fi % no inversion of tokens in text mode +}% \tabu@savedecl +\def\tabu@finalstrut #1{\unskip\ifhmode\nobreak\fi\vrule height\z@ depth\z@ width\z@} +\newcommand*\tabuDisableCommands {\g@addto@macro\tabu@trialh@@k } +\let\tabu@trialh@@k \@empty +\def\tabu@nowrite #1#{{\afterassignment}\toks@} +\let\tabu@write\write +\let\tabu@immediate\immediate +\def\tabu@WRITE{\begingroup + \def\immediate\write{\aftergroup\endgroup + \tabu@immediate\tabu@write}% +}% \tabu@WRITE +\expandafter\def\expandafter\tabu@GenericError\expandafter{% + \expandafter\tabu@WRITE\GenericError} +\def\tabu@warn{\tabu@WRITE\PackageWarning{tabu}} +\def\tabu@noxfootnote [#1]{\@gobble} +\def\tabu@nocolor #1#{\@gobble} +\newcommand*\tabu@norowcolor[2][]{} +\def\tabu@maybesiunitx #1{\def\tabu@temp{#1}% + \futurelet\@let@token \tabu@m@ybesiunitx} +\def\tabu@m@ybesiunitx #1{\def\tabu@m@ybesiunitx {% + \ifx #1\@let@token \let\tabu@cellleft \@empty \let\tabu@cellright \@empty \fi + \tabu@temp}% \tabu@m@ybesiunitx +}\expandafter\tabu@m@ybesiunitx \csname siunitx_table_collect_begin:Nn\endcsname +\def\tabu@celllalign@def #1{\def\tabu@celllalign{\tabu@maybesiunitx{#1}}}% +%% Fixed vertical spacing adjustment: \extrarowsep ------------------ +\newcommand*\extrarowsep{\edef\tabu@C@extra{\the\numexpr\tabu@C@extra+1}% + \iftabu@everyrow \aftergroup\tabu@Gextra + \else \aftergroup\tabu@n@Gextra + \fi + \@ifnextchar={\tabu@gobbletoken\tabu@extra} \tabu@extra +}% \extrarowsep +\def\tabu@extra {\@ifnextchar_% + {\tabu@gobbletoken{\tabu@setextra\extrarowheight \extrarowdepth}} + {\ifx ^\@let@token \def\tabu@temp{% + \tabu@gobbletoken{\tabu@setextra\extrarowdepth \extrarowheight}}% + \else \let\tabu@temp \@empty + \afterassignment \tabu@setextrasep \extrarowdepth + \fi \tabu@temp}% +}% \tabu@extra +\def\tabu@setextra #1#2{\def\tabu@temp{\tabu@extr@#1#2}\afterassignment\tabu@temp#2} +\def\tabu@extr@ #1#2{\@ifnextchar^% + {\tabu@gobbletoken{\tabu@setextra\extrarowdepth \extrarowheight}} + {\ifx _\@let@token \def\tabu@temp{% + \tabu@gobbletoken{\tabu@setextra\extrarowheight \extrarowdepth}}% + \else \let\tabu@temp \@empty + \tabu@Gsave \tabu@G@extra \tabu@C@extra \extrarowheight \extrarowdepth + \fi \tabu@temp}% +}% \tabu@extr@ +\def\tabu@setextrasep {\extrarowheight=\extrarowdepth + \tabu@Gsave \tabu@G@extra \tabu@C@extra \extrarowheight \extrarowdepth +}% \tabu@setextrasep +\def\tabu@Gextra{\ifx \tabu@G@extra\@empty \else {\tabu@Rextra}\fi} +\def\tabu@n@Gextra{\ifx \tabu@G@extra\@empty \else \noalign{\tabu@Rextra}\fi} +\def\tabu@Rextra{\tabu@Grestore \tabu@G@extra \tabu@C@extra} +\let\tabu@C@extra \z@ +\let\tabu@G@extra \@empty +%% Dynamic vertical spacing adjustment: \tabulinesep ---------------- +\newcommand*\tabulinesep{\edef\tabu@C@linesep{\the\numexpr\tabu@C@linesep+1}% + \iftabu@everyrow \aftergroup\tabu@Glinesep + \else \aftergroup\tabu@n@Glinesep + \fi + \@ifnextchar={\tabu@gobbletoken\tabu@linesep} \tabu@linesep +}% \tabulinesep +\def\tabu@linesep {\@ifnextchar_% + {\tabu@gobbletoken{\tabu@setsep\abovetabulinesep \belowtabulinesep}} + {\ifx ^\@let@token \def\tabu@temp{% + \tabu@gobbletoken{\tabu@setsep\belowtabulinesep \abovetabulinesep}}% + \else \let\tabu@temp \@empty + \afterassignment \tabu@setlinesep \abovetabulinesep + \fi \tabu@temp}% +}% \tabu@linesep +\def\tabu@setsep #1#2{\def\tabu@temp{\tabu@sets@p#1#2}\afterassignment\tabu@temp#2} +\def\tabu@sets@p #1#2{\@ifnextchar^% + {\tabu@gobbletoken{\tabu@setsep\belowtabulinesep \abovetabulinesep}} + {\ifx _\@let@token \def\tabu@temp{% + \tabu@gobbletoken{\tabu@setsep\abovetabulinesep \belowtabulinesep}}% + \else \let\tabu@temp \@empty + \tabu@Gsave \tabu@G@linesep \tabu@C@linesep \abovetabulinesep \belowtabulinesep + \fi \tabu@temp}% +}% \tabu@sets@p +\def\tabu@setlinesep {\belowtabulinesep=\abovetabulinesep + \tabu@Gsave \tabu@G@linesep \tabu@C@linesep \abovetabulinesep \belowtabulinesep +}% \tabu@setlinesep +\def\tabu@Glinesep{\ifx \tabu@G@linesep\@empty \else {\tabu@Rlinesep}\fi} +\def\tabu@n@Glinesep{\ifx \tabu@G@linesep\@empty \else \noalign{\tabu@Rlinesep}\fi} +\def\tabu@Rlinesep{\tabu@Grestore \tabu@G@linesep \tabu@C@linesep} +\let\tabu@C@linesep \z@ +\let\tabu@G@linesep \@empty +%% \global\extrarowsep and \global\tabulinesep ------------------- +\def\tabu@Gsave #1#2#3#4{\xdef#1{#1% + \toks#2{\toks\the\currentgrouplevel{\global#3\the#3\global#4\the#4}}}% +}% \tabu@Gsave +\def\tabu@Grestore#1#2{% + \toks#2{}#1\toks\currentgrouplevel\expandafter{\expandafter}\the\toks#2\relax + \ifcat$\the\toks\currentgrouplevel$\else + \global\let#1\@empty \global\let#2\z@ + \the\toks\currentgrouplevel + \fi +}% \tabu@Grestore +%% Setting code for every row --------------------------------------- +\newcommand*\everyrow{\tabu@everyrow@bgroup + \tabu@start \z@ \tabu@stop \z@ \tabu@evrstartstop +}% \everyrow +\def\tabu@evrstartstop {\@ifnextchar^% + {\afterassignment \tabu@evrstartstop \tabu@stop=}% + {\ifx ^\@let@token + \afterassignment\tabu@evrstartstop \tabu@start=% + \else \afterassignment\tabu@everyr@w \toks@ + \fi}% +}% \tabu@evrstartstop +\def\tabu@everyr@w {% + \xdef\tabu@everyrow{% + \noexpand\tabu@everyrowfalse + \let\noalign \relax + \noexpand\tabu@rowfontreset + \iftabu@colortbl \noexpand\tabu@rc@ \fi % \taburowcolors + \let\noexpand\tabu@docline \noexpand\tabu@docline@evr + \the\toks@ + \noexpand\tabu@evrh@@k + \noexpand\tabu@rearstrut + \global\advance\c@taburow \@ne}% + \iftabu@everyrow \toks@\expandafter + {\expandafter\def\expandafter\tabu@evr@L\expandafter{\the\toks@}\ignorespaces}% + \else \xdef\tabu@evr@G{\the\toks@}% + \fi + \tabu@everyrow@egroup +}% \tabu@everyr@w +\def\tabu@evr {\def\tabu@evrh@@k} % for internal use only +\tabu@evr{} +%% line style and leaders ------------------------------------------- +\newcommand*\newtabulinestyle [1]{% + {\@for \@tempa :=#1\do{\expandafter\tabu@newlinestyle \@tempa==\@nil}}% +}% \newtabulinestyle +\def\tabu@newlinestyle #1=#2=#3\@nil{\tabu@getline {#2}% + \tabu@sanitizearg {#1}\@tempa + \ifodd 1\ifx \@tempa\@empty \ifdefined\tabu@linestyle@ 0 \fi\fi + \global\expandafter\let + \csname tabu@linestyle@\@tempa \endcsname =\tabu@thestyle \fi +}% \tabu@newlinestyle +\newcommand*\tabulinestyle [1]{\tabu@everyrow@bgroup \tabu@getline{#1}% + \iftabu@everyrow + \toks@\expandafter{\expandafter \def \expandafter + \tabu@ls@L\expandafter{\tabu@thestyle}\ignorespaces}% + \gdef\tabu@ls@{\tabu@ls@L}% + \else + \global\let\tabu@ls@G \tabu@thestyle + \gdef\tabu@ls@{\tabu@ls@G}% + \fi + \tabu@everyrow@egroup +}% \tabulinestyle +\newcommand*\taburulecolor{\tabu@everyrow@bgroup \tabu@textbar \tabu@rulecolor} +\def\tabu@rulecolor #1{\toks@{}% + \def\tabu@temp #1##1#1{\tabu@ruledrsc{##1}}\@ifnextchar #1% + \tabu@temp + \tabu@rulearc +}% \tabu@rulecolor +\def\tabu@ruledrsc #1{\edef\tabu@temp{#1}\tabu@strtrim\tabu@temp + \ifx \tabu@temp\@empty \def\tabu@temp{\tabu@rule@drsc@ {}{}}% + \else \edef\tabu@temp{\noexpand\tabu@rule@drsc@ {}{\tabu@temp}}% + \fi + \tabu@temp +}% \tabu@ruledrsc@ +\def\tabu@ruledrsc@ #1#{\tabu@rule@drsc@ {#1}} +\def\tabu@rule@drsc@ #1#2{% + \iftabu@everyrow + \ifx \\#1#2\\\toks@{\let\CT@drsc@ \relax}% + \else \toks@{\def\CT@drsc@{\color #1{#2}}}% + \fi + \else + \ifx \\#1#2\\\global\let\CT@drsc@ \relax + \else \gdef\CT@drsc@{\color #1{#2}}% + \fi + \fi + \tabu@rulearc +}% \tabu@rule@drsc@ +\def\tabu@rulearc #1#{\tabu@rule@arc@ {#1}} +\def\tabu@rule@arc@ #1#2{% + \iftabu@everyrow + \ifx \\#1#2\\\toks@\expandafter{\the\toks@ \def\CT@arc@{}}% + \else \toks@\expandafter{\the\toks@ \def\CT@arc@{\color #1{#2}}}% + \fi + \toks@\expandafter{\the\toks@ + \let\tabu@arc@L \CT@arc@ + \let\tabu@drsc@L \CT@drsc@ + \ignorespaces}% + \else + \ifx \\#1#2\\\gdef\CT@arc@{}% + \else \gdef\CT@arc@{\color #1{#2}}% + \fi + \global\let\tabu@arc@G \CT@arc@ + \global\let\tabu@drsc@G \CT@drsc@ + \fi + \tabu@everyrow@egroup +}% \tabu@rule@arc@ +\def\taburowcolors {\tabu@everyrow@bgroup \@testopt \tabu@rowcolors 1} +\def\tabu@rowcolors [#1]#2#{\tabu@rowc@lors{#1}{#2}} +\def\tabu@rowc@lors #1#2#3{% + \toks@{}\@defaultunits \count@ =\number0#2\relax \@nnil + \@defaultunits \tabu@start =\number0#1\relax \@nnil + \ifnum \count@<\tw@ \count@=\tw@ \fi + \advance\tabu@start \m@ne + \ifnum \tabu@start<\z@ \tabu@start \z@ \fi + \tabu@rowcolorseries #3\in@..\in@ \@nnil +}% \tabu@rowcolors +\def\tabu@rowcolorseries #1..#2\in@ #3\@nnil {% + \ifx \in@#1\relax + \iftabu@everyrow \toks@{\def\tabu@rc@{}\let\tabu@rc@L \tabu@rc@}% + \else \gdef\tabu@rc@{}\global\let\tabu@rc@G \tabu@rc@ + \fi + \else + \ifx \\#2\\\tabu@rowcolorserieserror \fi + \tabu@sanitizearg{#1}\tabu@temp + \tabu@sanitizearg{#2}\@tempa + \advance\count@ \m@ne + \iftabu@everyrow + \def\tabu@rc@ ##1##2##3##4{\def\tabu@rc@{% + \ifnum ##2=\c@taburow + \definecolorseries{tabu@rcseries@\the\tabu@nested}{rgb}{last}{##3}{##4}\fi + \ifnum \c@taburow<##2 \else + \ifnum \tabu@modulo {\c@taburow-##2}{##1+1}=\z@ + \resetcolorseries[{##1}]{tabu@rcseries@\the\tabu@nested}\fi + \xglobal\colorlet{tabu@rc@\the\tabu@nested}{tabu@rcseries@\the\tabu@nested!!+}% + \rowcolor{tabu@rc@\the\tabu@nested}\fi}% + }\edef\x{\noexpand\tabu@rc@ {\the\count@} + {\the\tabu@start} + {\tabu@temp} + {\@tempa}% + }\x + \toks@\expandafter{\expandafter\def\expandafter\tabu@rc@\expandafter{\tabu@rc@}}% + \toks@\expandafter{\the\toks@ \let\tabu@rc@L \tabu@rc@ \ignorespaces}% + \else % inside \noalign + \definecolorseries{tabu@rcseries@\the\tabu@nested}{rgb}{last}{\tabu@temp}{\@tempa}% + \expandafter\resetcolorseries\expandafter[\the\count@]{tabu@rcseries@\the\tabu@nested}% + \xglobal\colorlet{tabu@rc@\the\tabu@nested}{tabu@rcseries@\the\tabu@nested!!+}% + \let\noalign \relax \rowcolor{tabu@rc@\the\tabu@nested}% + \def\tabu@rc@ ##1##2{\gdef\tabu@rc@{% + \ifnum \tabu@modulo {\c@taburow-##2}{##1+1}=\@ne + \resetcolorseries[{##1}]{tabu@rcseries@\the\tabu@nested}\fi + \xglobal\colorlet{tabu@rc@\the\tabu@nested}{tabu@rcseries@\the\tabu@nested!!+}% + \rowcolor{tabu@rc@\the\tabu@nested}}% + }\edef\x{\noexpand\tabu@rc@{\the\count@}{\the\c@taburow}}\x + \global\let\tabu@rc@G \tabu@rc@ + \fi + \fi + \tabu@everyrow@egroup +}% \tabu@rowcolorseries +\tabuDisableCommands {\let\tabu@rc@ \@empty } +\def\tabu@rowcolorserieserror {\PackageError{tabu} + {Invalid syntax for \string\taburowcolors + \MessageBreak Please look at the documentation!}\@ehd +}% \tabu@rowcolorserieserror +\newcommand*\tabureset {% + \tabulinesep=\z@ \extrarowsep=\z@ \extratabsurround=\z@ + \tabulinestyle{}\everyrow{}\taburulecolor||{}\taburowcolors{}% +}% \tabureset +%% Parsing the line styles ------------------------------------------ +\def\tabu@getline #1{\begingroup + \csname \ifcsname if@safe@actives\endcsname % + @safe@activestrue\else + relax\fi \endcsname + \edef\tabu@temp{#1}\tabu@sanitizearg{#1}\@tempa + \let\tabu@thestyle \relax + \ifcsname tabu@linestyle@\@tempa \endcsname + \edef\tabu@thestyle{\endgroup + \def\tabu@thestyle{\expandafter\noexpand + \csname tabu@linestyle@\@tempa\endcsname}% + }\tabu@thestyle + \else \expandafter\tabu@definestyle \tabu@temp \@nil + \fi +}% \tabu@getline +\def\tabu@definestyle #1#2\@nil {\endlinechar \m@ne \makeatletter + \tabu@thick \maxdimen \tabu@on \maxdimen \tabu@off \maxdimen + \let\tabu@c@lon \@undefined \let\tabu@c@loff \@undefined + \ifodd 1\ifcat .#1\else\ifcat\relax #1\else 0\fi\fi % catcode 12 or non expandable cs + \def\tabu@temp{\tabu@getparam{thick}}% + \else \def\tabu@temp{\tabu@getparam{thick}\maxdimen}% + \fi + {% + \let\tabu@ \relax + \def\:{\obeyspaces \tabu@oXIII \tabu@commaXIII \edef\:}% (space active \: happy ;-)) + \scantokens{\:{\tabu@temp #1#2 \tabu@\tabu@}}% + \expandafter}\expandafter + \def\expandafter\:\expandafter{\:}% line spec rewritten now ;-) + \def\;{\def\:}% + \scantokens\expandafter{\expandafter\;\expandafter{\:}}% space is now inactive (catcode 10) + \let\tabu@ \tabu@getcolor \:% all arguments are ready now ;-) + \ifdefined\tabu@c@lon \else \let\tabu@c@lon\@empty \fi + \ifx \tabu@c@lon\@empty \def\tabu@c@lon{\CT@arc@}\fi + \ifdefined\tabu@c@loff \else \let\tabu@c@loff \@empty \fi + \ifdim \tabu@on=\maxdimen \ifdim \tabu@off<\maxdimen + \tabu@on \tabulineon \fi\fi + \ifdim \tabu@off=\maxdimen \ifdim \tabu@on<\maxdimen + \tabu@off \tabulineoff \fi\fi + \ifodd 1\ifdim \tabu@off=\maxdimen \ifdim \tabu@on=\maxdimen 0 \fi\fi + \in@true % + \else \in@false % + \fi + \ifdim\tabu@thick=\maxdimen \def\tabu@thick{\arrayrulewidth}% + \else \edef\tabu@thick{\the\tabu@thick}% + \fi + \edef \tabu@thestyle ##1##2{\endgroup + \def\tabu@thestyle{% + \ifin@ \noexpand\tabu@leadersstyle {\tabu@thick} + {\the\tabu@on}{##1} + {\the\tabu@off}{##2}% + \else \noexpand\tabu@rulesstyle + {##1\vrule width \tabu@thick}% + {##1\leaders \hrule height \tabu@thick \hfil}% + \fi}% + }\expandafter \expandafter + \expandafter \tabu@thestyle \expandafter + \expandafter \expandafter + {\expandafter\tabu@c@lon\expandafter}\expandafter{\tabu@c@loff}% +}% \tabu@definestyle +{\catcode`\O=\active \lccode`\O=`\o \catcode`\,=\active + \lowercase{\gdef\tabu@oXIII {\catcode`\o=\active \let O=\tabu@oxiii}} + \gdef\tabu@commaXIII {\catcode`\,=\active \let ,=\space} +}% \catcode +\def\tabu@oxiii #1{% + \ifcase \ifx n#1\z@ \else + \ifx f#1\@ne\else + \tw@ \fi\fi + \expandafter\tabu@onxiii + \or \expandafter\tabu@ofxiii + \else o% + \fi#1}% +\def\tabu@onxiii #1#2{% + \ifcase \ifx !#2\tw@ \else + \ifcat.\noexpand#2\z@ \else + \ifx \tabu@spxiii#2\@ne\else + \tw@ \fi\fi\fi + \tabu@getparam{on}#2\expandafter\@gobble + \or \expandafter\tabu@onxiii % (space is active) + \else o\expandafter\@firstofone + \fi{#1#2}}% +\def\tabu@ofxiii #1#2{% + \ifx #2f\expandafter\tabu@offxiii + \else o\expandafter\@firstofone + \fi{#1#2}} +\def\tabu@offxiii #1#2{% + \ifcase \ifx !#2\tw@ \else + \ifcat.\noexpand#2\z@ \else + \ifx\tabu@spxiii#2\@ne \else + \tw@ \fi\fi\fi + \tabu@getparam{off}#2\expandafter\@gobble + \or \expandafter\tabu@offxiii % (space is active) + \else o\expandafter\@firstofone + \fi{#1#2}} +\def\tabu@getparam #1{\tabu@ \csname tabu@#1\endcsname=} +\def\tabu@getcolor #1{% \tabu@ <- \tabu@getcolor after \edef + \ifx \tabu@#1\else % no more spec + \let\tabu@theparam=#1\afterassignment \tabu@getc@l@r #1\fi +}% \tabu@getcolor +\def\tabu@getc@l@r #1\tabu@ {% + \def\tabu@temp{#1}\tabu@strtrim \tabu@temp + \ifx \tabu@temp\@empty + \else%\ifcsname \string\color@\tabu@temp \endcsname % if the color exists + \ifx \tabu@theparam \tabu@off \let\tabu@c@loff \tabu@c@l@r + \else \let\tabu@c@lon \tabu@c@l@r + \fi + %\else \tabu@warncolour{\tabu@temp}% + \fi%\fi + \tabu@ % next spec +}% \tabu@getc@l@r +\def\tabu@warncolour #1{\PackageWarning{tabu} + {Color #1 is not defined. Default color used}% +}% \tabu@warncolour +\def\tabu@leadersstyle #1#2#3#4#5{\def\tabu@leaders{{#1}{#2}{#3}{#4}{#5}}% + \ifx \tabu@leaders\tabu@leaders@G \else + \tabu@LEADERS{#1}{#2}{#3}{#4}{#5}\fi +}% \tabu@leadersstyle +\def\tabu@rulesstyle #1#2{\let\tabu@leaders \@undefined + \gdef\tabu@thevrule{#1}\gdef\tabu@thehrule{#2}% +}% \tabu@rulesstyle +%% The leaders boxes ------------------------------------------------ +\def\tabu@LEADERS #1#2#3#4#5{%% width, dash, dash color, gap, gap color + {\let\color \tabu@color % => during trials -> \color = \tabu@nocolor + {% % but the leaders boxes should have colors ! + \def\@therule{\vrule}\def\@thick{height}\def\@length{width}% + \def\@box{\hbox}\def\@unbox{\unhbox}\def\@elt{\wd}% + \def\@skip{\hskip}\def\@ss{\hss}\def\tabu@leads{\tabu@hleads}% + \tabu@l@@d@rs {#1}{#2}{#3}{#4}{#5}% + \global\let\tabu@thehleaders \tabu@theleaders + }% + {% + \def\@therule{\hrule}\def\@thick{width}\def\@length{height}% + \def\@box{\vbox}\def\@unbox{\unvbox}\def\@elt{\ht}% + \def\@skip{\vskip}\def\@ss{\vss}\def\tabu@leads{\tabu@vleads}% + \tabu@l@@d@rs {#1}{#2}{#3}{#4}{#5}% + \global\let\tabu@thevleaders \tabu@theleaders + }% + \gdef\tabu@leaders@G{{#1}{#2}{#3}{#4}{#5}}% + }% +}% \tabu@LEADERS +\def\tabu@therule #1#2{\@therule \@thick#1\@length\dimexpr#2/2 \@depth\z@} +\def\tabu@l@@d@rs #1#2#3#4#5{%% width, dash, dash color, gap, gap color + \global\setbox \tabu@leads=\@box{% + {#3\tabu@therule{#1}{#2}}% + \ifx\\#5\\\@skip#4\else{#5\tabu@therule{#1}{#4*2}}\fi + {#3\tabu@therule{#1}{#2}}}% + \global\setbox\tabu@leads=\@box to\@elt\tabu@leads{\@ss + {#3\tabu@therule{#1}{#2}}\@unbox\tabu@leads}% + \edef\tabu@theleaders ##1{\def\noexpand\tabu@theleaders {% + {##1\tabu@therule{#1}{#2}}% + \xleaders \copy\tabu@leads \@ss + \tabu@therule{0pt}{-#2}{##1\tabu@therule{#1}{#2}}}% + }\tabu@theleaders{#3}% +}% \tabu@l@@d@rs +%% \tabu \endtabu \tabu* \longtabu \endlongtabu \longtabu* ---------- +\newcommand*\tabu {\tabu@longfalse + \ifmmode \def\tabu@ {\array}\def\endtabu {\endarray}% + \else \def\tabu@ {\tabu@tabular}\def\endtabu {\endtabular}\fi + \expandafter\let\csname tabu*\endcsname \tabu + \expandafter\def\csname endtabu*\endcsname{\endtabu}% + \tabu@spreadfalse \tabu@negcoeffalse \tabu@settarget +}% {tabu} +\let\tabu@tabular \tabular % +\expandafter\def\csname tabu*\endcsname{\tabuscantokenstrue \tabu} +\newcommand*\longtabu {\tabu@longtrue + \ifmmode\PackageError{tabu}{longtabu not allowed in math mode}\fi + \def\tabu@{\longtable}\def\endlongtabu{\endlongtable}% + \LTchunksize=\@M + \expandafter\let\csname tabu*\endcsname \tabu + \expandafter\def\csname endlongtabu*\endcsname{\endlongtabu}% + \let\LT@startpbox \tabu@LT@startpbox % \everypar{ array struts } + \tabu@spreadfalse \tabu@negcoeffalse \tabu@settarget +}% {longtabu} +\expandafter\def\csname longtabu*\endcsname{\tabuscantokenstrue \longtabu} +\def\tabu@nolongtabu{\PackageError{tabu} + {longtabu requires the longtable package}\@ehd} +%% Read the target and then : \tabular or \@array ------------------ +\def\tabu@settarget {\futurelet\@let@token \tabu@sett@rget } +\def\tabu@sett@rget {\tabu@target \z@ + \ifcase \ifx \bgroup\@let@token \z@ \else + \ifx \@sptoken\@let@token \@ne \else + \if t\@let@token \tw@ \else + \if s\@let@token \thr@@\else + \z@\fi\fi\fi\fi + \expandafter\tabu@begin + \or \expandafter\tabu@gobblespace\expandafter\tabu@settarget + \or \expandafter\tabu@to + \or \expandafter\tabu@spread + \fi +}% \tabu@sett@rget +\def\tabu@to to{\def\tabu@halignto{to}\tabu@gettarget} +\def\tabu@spread spread{\tabu@spreadtrue\def\tabu@halignto{spread}\tabu@gettarget} +\def\tabu@gettarget {\afterassignment\tabu@linegoaltarget \tabu@target } +\def\tabu@linegoaltarget {\futurelet\tabu@temp \tabu@linegoalt@rget } +\def\tabu@linegoalt@rget {% + \ifx \tabu@temp\LNGL@setlinegoal + \LNGL@setlinegoal \expandafter \@firstoftwo \fi % @gobbles \LNGL@setlinegoal + \tabu@begin +}% \tabu@linegoalt@rget +\def\tabu@begin #1#{% + \iftabu@measuring \expandafter\tabu@nestedmeasure \fi + \ifdim \tabu@target=\z@ \let\tabu@halignto \@empty + \else \edef\tabu@halignto{\tabu@halignto\the\tabu@target}% + \fi + \@testopt \tabu@tabu@ \tabu@aligndefault #1\@nil +}% \tabu@begin +\long\def\tabu@tabu@ [#1]#2\@nil #3{\tabu@setup + \def\tabu@align {#1}\def\tabu@savedpream{\NC@find #3}% + \tabu@ [\tabu@align ]#2{#3\tabu@rewritefirst }% +}% \tabu@tabu@ +\def\tabu@nestedmeasure {% + \ifodd 1\iftabu@spread \else \ifdim\tabu@target=\z@ \else 0 \fi\fi\relax + \tabu@spreadtrue + \else \begingroup \iffalse{\fi \ifnum0=`}\fi + \toks@{}\def\tabu@stack{b}% + \expandafter\tabu@collectbody\expandafter\tabu@quickrule + \expandafter\endgroup + \fi +}% \tabu@nestedmeasure +\def\tabu@quickrule {\indent\vrule height\z@ depth\z@ width\tabu@target} +%% \tabu@setup \tabu@init \tabu@indent +\def\tabu@setup{\tabu@alloc@ + \ifcase \tabu@nested + \ifmmode \else \iftabu@spread\else \ifdim\tabu@target=\z@ + \let\tabu@afterendpar \par + \fi\fi\fi + \def\tabu@aligndefault{c}\tabu@init \tabu@indent + \else % + \def\tabu@aligndefault{t}\let\tabudefaulttarget \linewidth + \fi + \let\tabu@thetarget \tabudefaulttarget \let\tabu@restored \@undefined + \edef\tabu@NC@list{\the\NC@list}\NC@list{\NC@do \tabu@rewritefirst}% + \everycr{}\let\@startpbox \tabu@startpbox % for nested tabu inside longtabu... + \let\@endpbox \tabu@endpbox % idem " " " " " " + \let\@tabarray \tabu@tabarray % idem " " " " " " + \tabu@setcleanup \tabu@setreset +}% \tabu@setup +\def\tabu@init{\tabu@starttimer \tabu@measuringfalse + \edef\tabu@hfuzz {\the\dimexpr\hfuzz+1sp}\global\tabu@footnotes{}% + \let\firsthline \tabu@firsthline \let\lasthline \tabu@lasthline + \let\firstline \tabu@firstline \let\lastline \tabu@lastline + \let\hline \tabu@hline \let\@xhline \tabu@xhline + \let\color \tabu@color \let\@arstrutbox \tabu@arstrutbox + \iftabu@colortbl\else\let\LT@@hline \tabu@LT@@hline \fi + \tabu@trivlist % + \let\@footnotetext \tabu@footnotetext \let\@xfootnotetext \tabu@xfootnotetext + \let\@xfootnote \tabu@xfootnote \let\centering \tabu@centering + \let\raggedright \tabu@raggedright \let\raggedleft \tabu@raggedleft + \let\tabudecimal \tabu@tabudecimal \let\Centering \tabu@Centering + \let\RaggedRight \tabu@RaggedRight \let\RaggedLeft \tabu@RaggedLeft + \let\justifying \tabu@justifying \let\rowfont \tabu@rowfont + \let\fbox \tabu@fbox \let\color@b@x \tabu@color@b@x + \let\tabu@@everycr \everycr \let\tabu@@everypar \everypar + \let\tabu@prepnext@tokORI \prepnext@tok\let\prepnext@tok \tabu@prepnext@tok + \let\tabu@multicolumnORI\multicolumn \let\multicolumn \tabu@multicolumn + \let\tabu@startpbox \@startpbox % for nested tabu inside longtabu pfff !!! + \let\tabu@endpbox \@endpbox % idem " " " " " " " + \let\tabu@tabarray \@tabarray % idem " " " " " " " + \tabu@adl@fix \let\endarray \tabu@endarray % colortbl & arydshln (delarray) + \iftabu@colortbl\CT@everycr\expandafter{\expandafter\iftabu@everyrow \the\CT@everycr \fi}\fi +}% \tabu@init +\def\tabu@indent{% correction for indentation + \ifdim \parindent>\z@\ifx \linewidth\tabudefaulttarget + \everypar\expandafter{% + \the\everypar\everypar\expandafter{\the\everypar}% + \setbox\z@=\lastbox + \ifdim\wd\z@>\z@ \edef\tabu@thetarget + {\the\dimexpr -\wd\z@+\tabudefaulttarget}\fi + \box\z@}% + \fi\fi +}% \tabu@indent +\def\tabu@setcleanup {% saves last global assignments + \ifodd 1\ifmmode \else \iftabu@long \else 0\fi\fi\relax + \def\tabu@aftergroupcleanup{% + \def\tabu@aftergroupcleanup{\aftergroup\tabu@cleanup}}% + \else + \def\tabu@aftergroupcleanup{% + \aftergroup\aftergroup\aftergroup\tabu@cleanup + \let\tabu@aftergroupcleanup \relax}% + \fi + \let\tabu@arc@Gsave \tabu@arc@G + \let\tabu@arc@G \tabu@arc@L % + \let\tabu@drsc@Gsave \tabu@drsc@G + \let\tabu@drsc@G \tabu@drsc@L % + \let\tabu@ls@Gsave \tabu@ls@G + \let\tabu@ls@G \tabu@ls@L % + \let\tabu@rc@Gsave \tabu@rc@G + \let\tabu@rc@G \tabu@rc@L % + \let\tabu@evr@Gsave \tabu@evr@G + \let\tabu@evr@G \tabu@evr@L % + \let\tabu@celllalign@save \tabu@celllalign + \let\tabu@cellralign@save \tabu@cellralign + \let\tabu@cellleft@save \tabu@cellleft + \let\tabu@cellright@save \tabu@cellright + \let\tabu@@celllalign@save \tabu@@celllalign + \let\tabu@@cellralign@save \tabu@@cellralign + \let\tabu@@cellleft@save \tabu@@cellleft + \let\tabu@@cellright@save \tabu@@cellright + \let\tabu@rowfontreset@save \tabu@rowfontreset + \let\tabu@@rowfontreset@save\tabu@@rowfontreset + \let\tabu@rowfontreset \@empty + \edef\tabu@alloc@save {\the\tabu@alloc}% restore at \tabu@reset + \edef\c@taburow@save {\the\c@taburow}% + \edef\tabu@naturalX@save {\the\tabu@naturalX}% + \let\tabu@naturalXmin@save \tabu@naturalXmin + \let\tabu@naturalXmax@save \tabu@naturalXmax + \let\tabu@mkarstrut@save \tabu@mkarstrut + \edef\tabu@clarstrut{% + \extrarowheight \the\dimexpr \ht\@arstrutbox-\ht\strutbox \relax + \extrarowdepth \the\dimexpr \dp\@arstrutbox-\dp\strutbox \relax + \let\noexpand\@arraystretch \@ne \noexpand\tabu@rearstrut}% +}% \tabu@setcleanup +\def\tabu@cleanup {\begingroup + \globaldefs\@ne \tabu@everyrowtrue + \let\tabu@arc@G \tabu@arc@Gsave + \let\CT@arc@ \tabu@arc@G + \let\tabu@drsc@G \tabu@drsc@Gsave + \let\CT@drsc@ \tabu@drsc@G + \let\tabu@ls@G \tabu@ls@Gsave + \let\tabu@ls@ \tabu@ls@G + \let\tabu@rc@G \tabu@rc@Gsave + \let\tabu@rc@ \tabu@rc@G + \let\CT@do@color \relax + \let\tabu@evr@G \tabu@evr@Gsave + \let\tabu@celllalign \tabu@celllalign@save + \let\tabu@cellralign \tabu@cellralign@save + \let\tabu@cellleft \tabu@cellleft@save + \let\tabu@cellright \tabu@cellright@save + \let\tabu@@celllalign \tabu@@celllalign@save + \let\tabu@@cellralign \tabu@@cellralign@save + \let\tabu@@cellleft \tabu@@cellleft@save + \let\tabu@@cellright \tabu@@cellright@save + \let\tabu@rowfontreset \tabu@rowfontreset@save + \let\tabu@@rowfontreset \tabu@@rowfontreset@save + \tabu@naturalX =\tabu@naturalX@save + \let\tabu@naturalXmax \tabu@naturalXmax@save + \let\tabu@naturalXmin \tabu@naturalXmin@save + \let\tabu@mkarstrut \tabu@mkarstrut@save + \c@taburow =\c@taburow@save + \ifcase \tabu@nested \tabu@alloc \m@ne\fi + \endgroup % + \ifcase \tabu@nested + \the\tabu@footnotes \global\tabu@footnotes{}% + \tabu@afterendpar \tabu@elapsedtime + \fi + \tabu@clarstrut + \everyrow\expandafter {\tabu@evr@G}% +}% \tabu@cleanup +\let\tabu@afterendpar \relax +\def\tabu@setreset {% + \edef\tabu@savedparams {% \relax for \tabu@message@save + \ifmmode \col@sep \the\arraycolsep + \else \col@sep \the\tabcolsep \fi \relax + \arrayrulewidth \the\arrayrulewidth \relax + \doublerulesep \the\doublerulesep \relax + \extratabsurround \the\extratabsurround \relax + \extrarowheight \the\extrarowheight \relax + \extrarowdepth \the\extrarowdepth \relax + \abovetabulinesep \the\abovetabulinesep \relax + \belowtabulinesep \the\belowtabulinesep \relax + \def\noexpand\arraystretch{\arraystretch}% + \ifdefined\minrowclearance \minrowclearance\the\minrowclearance\relax\fi}% + \begingroup + \@temptokena\expandafter{\tabu@savedparams}% => only for \savetabu / \usetabu + \ifx \tabu@arc@L\relax \else \tabu@setsave \tabu@arc@L \fi + \ifx \tabu@drsc@L\relax \else \tabu@setsave \tabu@drsc@L \fi + \tabu@setsave \tabu@ls@L \tabu@setsave \tabu@evr@L + \expandafter \endgroup \expandafter + \def\expandafter\tabu@saved@ \expandafter{\the\@temptokena + \let\tabu@arc@G \tabu@arc@L + \let\tabu@drsc@G \tabu@drsc@L + \let\tabu@ls@G \tabu@ls@L + \let\tabu@rc@G \tabu@rc@L + \let\tabu@evr@G \tabu@evr@L}% + \def\tabu@reset{\tabu@savedparams + \tabu@everyrowtrue \c@taburow \z@ + \let\CT@arc@ \tabu@arc@L + \let\CT@drsc@ \tabu@drsc@L + \let\tabu@ls@ \tabu@ls@L + \let\tabu@rc@ \tabu@rc@L + \global\tabu@alloc \tabu@alloc@save + \everyrow\expandafter{\tabu@evr@L}}% +}% \tabu@reset +\def\tabu@setsave #1{\expandafter\tabu@sets@ve #1\@nil{#1}} +\long\def\tabu@sets@ve #1\@nil #2{\@temptokena\expandafter{\the\@temptokena \def#2{#1}}} +%% The Rewriting Process ------------------------------------------- +\def\tabu@newcolumntype #1{% + \expandafter\tabu@new@columntype + \csname NC@find@\string#1\expandafter\endcsname + \csname NC@rewrite@\string#1\endcsname + {#1}% +}% \tabu@newcolumntype +\def\tabu@new@columntype #1#2#3{% + \def#1##1#3{\NC@{##1}}% + \let#2\relax \newcommand*#2% +}% \tabu@new@columntype +\def\tabu@privatecolumntype #1{% + \expandafter\tabu@private@columntype + \csname NC@find@\string#1\expandafter\endcsname + \csname NC@rewrite@\string#1\expandafter\endcsname + \csname tabu@NC@find@\string#1\expandafter\endcsname + \csname tabu@NC@rewrite@\string#1\endcsname + {#1}% +}% \tabu@privatecolumntype +\def\tabu@private@columntype#1#2#3#4{% + \g@addto@macro\tabu@privatecolumns{\let#1#3\let#2#4}% + \tabu@new@columntype#3#4% +}% \tabu@private@columntype +\let\tabu@privatecolumns \@empty +\newcommand*\tabucolumn [1]{\expandafter \def \expandafter + \tabu@highprioritycolumns\expandafter{\tabu@highprioritycolumns + \NC@do #1}}% +\let\tabu@highprioritycolumns \@empty +%% The | ``column'' : rewriting process -------------------------- +\tabu@privatecolumntype |{\tabu@rewritevline} +\newcommand*\tabu@rewritevline[1][]{\tabu@vlinearg{#1}% + \expandafter \NC@find \tabu@rewritten} +\def\tabu@lines #1{% + \ifx|#1\else \tabu@privatecolumntype #1{\tabu@rewritevline}\fi + \NC@list\expandafter{\the\NC@list \NC@do #1}% +}% \tabu@lines@ +\def\tabu@vlinearg #1{% + \ifx\\#1\\\def\tabu@thestyle {\tabu@ls@}% + \else\tabu@getline {#1}% + \fi + \def\tabu@rewritten ##1{\def\tabu@rewritten{!{##1\tabu@thevline}}% + }\expandafter\tabu@rewritten\expandafter{\tabu@thestyle}% + \expandafter \tabu@keepls \tabu@thestyle \@nil +}% \tabu@vlinearg +\def\tabu@keepls #1\@nil{% + \ifcat $\@cdr #1\@nil $% + \ifx \relax#1\else + \ifx \tabu@ls@#1\else + \let#1\relax + \xdef\tabu@mkpreambuffer{\tabu@mkpreambuffer + \tabu@savels\noexpand#1}\fi\fi\fi +}% \tabu@keepls +\def\tabu@thevline {\begingroup + \ifdefined\tabu@leaders + \setbox\@tempboxa=\vtop to\dimexpr + \ht\@arstrutbox+\dp\@arstrutbox{{\tabu@thevleaders}}% + \ht\@tempboxa=\ht\@arstrutbox \dp\@tempboxa=\dp\@arstrutbox + \box\@tempboxa + \else + \tabu@thevrule + \fi \endgroup +}% \tabu@thevline +\def\tabu@savels #1{% + \expandafter\let\csname\string#1\endcsname #1% + \expandafter\def\expandafter\tabu@reset\expandafter{\tabu@reset + \tabu@resetls#1}}% +\def\tabu@resetls #1{\expandafter\let\expandafter#1\csname\string#1\endcsname}% +%% \multicolumn inside tabu environment ----------------------------- +\tabu@newcolumntype \tabu@rewritemulticolumn{% + \aftergroup \tabu@endrewritemulticolumn % after \@mkpream group + \NC@list{\NC@do *}\tabu@textbar \tabu@lines + \tabu@savedecl + \tabu@privatecolumns + \NC@list\expandafter{\the\expandafter\NC@list \tabu@NC@list}% + \let\tabu@savels \relax + \NC@find +}% \tabu@rewritemulticolumn +\def\tabu@endrewritemulticolumn{\gdef\tabu@mkpreambuffer{}\endgroup} +\def\tabu@multicolumn{\tabu@ifenvir \tabu@multic@lumn \tabu@multicolumnORI} +\long\def\tabu@multic@lumn #1#2#3{\multispan{#1}\begingroup + \tabu@everyrowtrue + \NC@list{\NC@do \tabu@rewritemulticolumn}% + \expandafter\@gobbletwo % gobbles \multispan{#1} + \tabu@multicolumnORI{#1}{\tabu@rewritemulticolumn #2}% + {\iftabuscantokens \tabu@rescan \else \expandafter\@firstofone \fi + {#3}}% +}% \tabu@multic@lumn +%% The X column(s): rewriting process ----------------------------- +\tabu@privatecolumntype X[1][]{\begingroup \tabu@siunitx{\endgroup \tabu@rewriteX {#1}}} +\def\tabu@nosiunitx #1{#1{}{}\expandafter \NC@find \tabu@rewritten } +\def\tabu@siunitx #1{\@ifnextchar \bgroup + {\tabu@rewriteX@Ss{#1}} + {\tabu@nosiunitx{#1}}} +\def\tabu@rewriteX@Ss #1#2{\@temptokena{}% + \@defaultunits \let\tabu@temp =#2\relax\@nnil + \ifodd 1\ifx S\tabu@temp \else \ifx s\tabu@temp \else 0 \fi\fi + \def\NC@find{\def\NC@find >####1####2<####3\relax{#1 {####1}{####3}% + }\expandafter\NC@find \the\@temptokena \relax + }\expandafter\NC@rewrite@S \@gobble #2\relax + \else \tabu@siunitxerror + \fi + \expandafter \NC@find \tabu@rewritten +}% \tabu@rewriteX@Ss +\def\tabu@siunitxerror {\PackageError{tabu}{Not a S nor s column ! + \MessageBreak X column can only embed siunitx S or s columns}\@ehd +}% \tabu@siunitxerror +\def\tabu@rewriteX #1#2#3{\tabu@Xarg {#1}{#2}{#3}% + \iftabu@measuring + \else \tabu@measuringtrue % first X column found in the preamble + \let\@halignto \relax \let\tabu@halignto \relax + \iftabu@spread \tabu@spreadtarget \tabu@target \tabu@target \z@ + \else \tabu@spreadtarget \z@ \fi + \ifdim \tabu@target=\z@ + \setlength\tabu@target \tabu@thetarget + \tabu@message{\tabu@message@defaulttarget}% + \else \tabu@message{\tabu@message@target}\fi + \fi +}% \tabu@rewriteX +\def\tabu@rewriteXrestore #1#2#3{\let\@halignto \relax + \def\tabu@rewritten{l}} +\def\tabu@Xarg #1#2#3{% + \advance\tabu@Xcol \@ne \let\tabu@Xlcr \@empty + \let\tabu@Xdisp \@empty \let\tabu@Xmath \@empty + \ifx\\#1\\% + \def\tabu@rewritten{p}\tabucolX \p@ % + \else + \let\tabu@rewritten \@empty \let\tabu@temp \@empty \tabucolX \z@ + \tabu@Xparse {}#1\relax + \fi + \tabu@Xrewritten{#2}{#3}% +}% \tabu@Xarg +\def\tabu@Xparse #1{\futurelet\@let@token \tabu@Xtest} +\expandafter\def\expandafter\tabu@Xparsespace\space{\tabu@Xparse{}} +\def\tabu@Xtest{% + \ifcase \ifx \relax\@let@token \z@ \else + \if ,\@let@token \m@ne\else + \if p\@let@token 1\else + \if m\@let@token 2\else + \if b\@let@token 3\else + \if l\@let@token 4\else + \if c\@let@token 5\else + \if r\@let@token 6\else + \if j\@let@token 7\else + \if L\@let@token 8\else + \if C\@let@token 9\else + \if R\@let@token 10\else + \if J\@let@token 11\else + \ifx \@sptoken\@let@token 12\else + \if .\@let@token 13\else + \if -\@let@token 13\else + \ifcat $\@let@token 14\else + 15\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\relax + \or \tabu@Xtype {p}% + \or \tabu@Xtype {m}% + \or \tabu@Xtype {b}% + \or \tabu@Xalign \raggedright\relax + \or \tabu@Xalign \centering\relax + \or \tabu@Xalign \raggedleft\relax + \or \tabu@Xalign \tabu@justify\relax + \or \tabu@Xalign \RaggedRight\raggedright + \or \tabu@Xalign \Centering\centering + \or \tabu@Xalign \RaggedLeft\raggedleft + \or \tabu@Xalign \justifying\tabu@justify + \or \expandafter \tabu@Xparsespace + \or \expandafter \tabu@Xcoef + \or \expandafter \tabu@Xm@th + \or \tabu@Xcoef{}% + \else\expandafter \tabu@Xparse + \fi +}% \tabu@Xtest +\def\tabu@Xalign #1#2{% + \ifx \tabu@Xlcr\@empty \else \PackageWarning{tabu} + {Duplicate horizontal alignment specification}\fi + \ifdefined#1\def\tabu@Xlcr{#1}\let#1\relax + \else \def\tabu@Xlcr{#2}\let#2\relax\fi + \expandafter\tabu@Xparse +}% \tabu@Xalign +\def\tabu@Xtype #1{% + \ifx \tabu@rewritten\@empty \else \PackageWarning{tabu} + {Duplicate vertical alignment specification}\fi + \def\tabu@rewritten{#1}\expandafter\tabu@Xparse +}% \tabu@Xtype +\def\tabu@Xcoef#1{\edef\tabu@temp{\tabu@temp#1}% + \afterassignment\tabu@Xc@ef \tabu@cnt\number\if-#10\fi +}% \tabu@Xcoef +\def\tabu@Xc@ef{\advance\tabucolX \tabu@temp\the\tabu@cnt\p@ + \tabu@Xparse{}% +}% \tabu@Xc@ef +\def\tabu@Xm@th #1{\futurelet \@let@token \tabu@Xd@sp} +\def\tabu@Xd@sp{\let\tabu@Xmath=$% + \ifx $\@let@token \def\tabu@Xdisp{\displaystyle}% + \expandafter\tabu@Xparse + \else \expandafter\tabu@Xparse\expandafter{\expandafter}% + \fi +}% \tabu@Xd@sp +\def\tabu@Xrewritten {% + \ifx \tabu@rewritten\@empty \def\tabu@rewritten{p}\fi + \ifdim \tabucolX<\z@ \tabu@negcoeftrue + \else\ifdim \tabucolX=\z@ \tabucolX \p@ + \fi\fi + \edef\tabu@temp{{\the\tabu@Xcol}{\tabu@strippt\tabucolX}}% + \edef\tabu@Xcoefs{\tabu@Xcoefs \tabu@ \tabu@temp}% + \edef\tabu@rewritten ##1##2{\def\noexpand\tabu@rewritten{% + >{\tabu@Xlcr \ifx$\tabu@Xmath$\tabu@Xdisp\fi ##1}% + \tabu@rewritten {\tabu@hsize \tabu@temp}% + <{##2\ifx$\tabu@Xmath$\fi}}% + }\tabu@rewritten +}% \tabu@Xrewritten +\def\tabu@hsize #1#2{% + \ifdim #2\p@<\z@ + \ifdim \tabucolX=\maxdimen \tabu@wd{#1}\else + \ifdim \tabu@wd{#1}<-#2\tabucolX \tabu@wd{#1}\else -#2\tabucolX\fi + \fi + \else #2\tabucolX + \fi +}% \tabu@hsize +%% \usetabu and \preamble: rewriting process --------------------- +\tabu@privatecolumntype \usetabu [1]{% + \ifx\\#1\\\tabu@saveerr{}\else + \@ifundefined{tabu@saved@\string#1} + {\tabu@saveerr{#1}} + {\let\tabu@rewriteX \tabu@rewriteXrestore + \csname tabu@saved@\string#1\expandafter\endcsname\expandafter\@ne}% + \fi +}% \NC@rewrite@\usetabu +\tabu@privatecolumntype \preamble [1]{% + \ifx\\#1\\\tabu@saveerr{}\else + \@ifundefined{tabu@saved@\string#1} + {\tabu@saveerr{#1}} + {\csname tabu@saved@\string#1\expandafter\endcsname\expandafter\z@}% + \fi +}% \NC@rewrite@\preamble +%% Controlling the rewriting process ------------------------------- +\tabu@newcolumntype \tabu@rewritefirst{% + \iftabu@long \aftergroup \tabu@longpream % + \else \aftergroup \tabu@pream + \fi + \let\tabu@ \relax \let\tabu@hsize \relax + \let\tabu@Xcoefs \@empty \let\tabu@savels \relax + \tabu@Xcol \z@ \tabu@cnt \tw@ + \gdef\tabu@mkpreambuffer{\tabu@{}}\tabu@measuringfalse + \global\setbox\@arstrutbox \box\@arstrutbox + \NC@list{\NC@do *}\tabu@textbar \tabu@lines + \NC@list\expandafter{\the\NC@list \NC@do X}% + \iftabu@siunitx % + \NC@list\expandafter{\the\NC@list \NC@do S\NC@do s}\fi + \NC@list\expandafter{\the\expandafter\NC@list \tabu@highprioritycolumns}% + \expandafter\def\expandafter\tabu@NC@list\expandafter{% + \the\expandafter\NC@list \tabu@NC@list}% % * | X S + \NC@list\expandafter{\expandafter \NC@do \expandafter\usetabu + \expandafter \NC@do \expandafter\preamble + \the\NC@list \NC@do \tabu@rewritemiddle + \NC@do \tabu@rewritelast}% + \tabu@savedecl + \tabu@privatecolumns + \edef\tabu@prev{\the\@temptokena}\NC@find \tabu@rewritemiddle +}% NC@rewrite@\tabu@rewritefirst +\tabu@newcolumntype \tabu@rewritemiddle{% + \edef\tabu@temp{\the\@temptokena}\NC@find \tabu@rewritelast +}% \NC@rewrite@\tabu@rewritemiddle +\tabu@newcolumntype \tabu@rewritelast{% + \ifx \tabu@temp\tabu@prev \advance\tabu@cnt \m@ne + \NC@list\expandafter{\tabu@NC@list \NC@do \tabu@rewritemiddle + \NC@do \tabu@rewritelast}% + \else \let\tabu@prev\tabu@temp + \fi + \ifcase \tabu@cnt \expandafter\tabu@endrewrite + \else \expandafter\NC@find \expandafter\tabu@rewritemiddle + \fi +}% \NC@rewrite@\tabu@rewritelast +%% Choosing the strategy -------------------------------------------- +\def\tabu@endrewrite {% + \let\tabu@temp \NC@find + \ifx \@arrayright\relax \let\@arrayright \@empty \fi + \count@=% + \ifx \@finalstrut\tabu@finalstrut \z@ % outer in mode 0 print + \iftabu@measuring + \xdef\tabu@mkpreambuffer{\tabu@mkpreambuffer + \tabu@target \csname tabu@\the\tabu@nested.T\endcsname + \tabucolX \csname tabu@\the\tabu@nested.X\endcsname + \edef\@halignto {\ifx\@arrayright\@empty to\tabu@target\fi}}% + \fi + \else\iftabu@measuring 4 % X columns + \xdef\tabu@mkpreambuffer{\tabu@{\tabu@mkpreambuffer + \tabu@target \the\tabu@target + \tabu@spreadtarget \the\tabu@spreadtarget}% + \def\noexpand\tabu@Xcoefs{\tabu@Xcoefs}% + \edef\tabu@halignto{\ifx \@arrayright\@empty to\tabu@target\fi}}% + \let\tabu@Xcoefs \relax + \else\ifcase\tabu@nested \thr@@ % outer, no X + \global\let\tabu@afterendpar \relax + \else \@ne % inner, no X, outer in mode 1 or 2 + \fi + \ifdefined\tabu@usetabu + \else \ifdim\tabu@target=\z@ + \else \let\tabu@temp \tabu@extracolsep + \fi\fi + \fi + \fi + \xdef\tabu@mkpreambuffer{\count@ \the\count@ \tabu@mkpreambuffer}% + \tabu@temp +}% \tabu@endrewrite +\def\tabu@extracolsep{\@defaultunits \expandafter\let + \expandafter\tabu@temp \expandafter=\the\@temptokena \relax\@nnil + \ifx \tabu@temp\@sptoken + \expandafter\tabu@gobblespace \expandafter\tabu@extracolsep + \else + \edef\tabu@temp{\noexpand\NC@find + \if |\noexpand\tabu@temp @% + \else\if !\noexpand\tabu@temp @% + \else !% + \fi\fi + {\noexpand\extracolsep\noexpand\@flushglue}}% + \fi + \tabu@temp +}% \tabu@extrac@lsep +%% Implementing the strategy ---------------------------------------- +\long\def\tabu@pream #1\@preamble {% + \let\tabu@ \tabu@@ \tabu@mkpreambuffer \tabu@aftergroupcleanup + \NC@list\expandafter {\tabu@NC@list}% in case of nesting... + \ifdefined\tabu@usetabu \tabu@usetabu \tabu@target \z@ \fi + \let\tabu@savedpreamble \@preamble + \global\let\tabu@elapsedtime \relax + \tabu@thebody ={#1\tabu@aftergroupcleanup}% + \tabu@thebody =\expandafter{\the\expandafter\tabu@thebody + \@preamble}% + \edef\tabuthepreamble {\the\tabu@thebody}% ( no @ allowed for \scantokens ) + \tabu@select +}% \tabu@pream +\long\def\tabu@longpream #1\LT@bchunk #2\LT@bchunk{% + \let\tabu@ \tabu@@ \tabu@mkpreambuffer \tabu@aftergroupcleanup + \NC@list\expandafter {\tabu@NC@list}% in case of nesting... + \let\tabu@savedpreamble \@preamble + \global\let\tabu@elapsedtime \relax + \tabu@thebody ={#1\LT@bchunk #2\tabu@aftergroupcleanup \LT@bchunk}% + \edef\tabuthepreamble {\the\tabu@thebody}% ( no @ allowed for \scantokens ) + \tabu@select +}% \tabu@longpream +\def\tabu@select {% + \ifnum\tabu@nested>\z@ \tabuscantokensfalse \fi + \ifnum \count@=\@ne \iftabu@measuring \count@=\tw@ \fi\fi + \ifcase \count@ + \global\let\tabu@elapsedtime \relax + \tabu@seteverycr + \expandafter \tabuthepreamble % vertical adjustment (inherited from outer) + \or % exit in vertical measure + struts per cell because no X and outer in mode 3 + \tabu@evr{\tabu@verticalinit}\tabu@celllalign@def{\tabu@verticalmeasure}% + \def\tabu@cellralign{\tabu@verticalspacing}% + \tabu@seteverycr + \expandafter \tabuthepreamble + \or % exit without measure because no X and outer in mode 4 + \tabu@evr{}\tabu@celllalign@def{}\let\tabu@cellralign \@empty + \tabu@seteverycr + \expandafter \tabuthepreamble + \else % needs trials + \tabu@evr{}\tabu@celllalign@def{}\let\tabu@cellralign \@empty + \tabu@savecounters + \expandafter \tabu@setstrategy + \fi +}% \tabu@select +\def\tabu@@ {\gdef\tabu@mkpreambuffer} +%% Protections to set up before trials ------------------------------ +\def\tabu@setstrategy {\begingroup % + \tabu@trialh@@k \tabu@cnt \z@ % number of trials + \hbadness \@M \let\hbadness \@tempcnta + \hfuzz \maxdimen \let\hfuzz \@tempdima + \let\write \tabu@nowrite\let\GenericError \tabu@GenericError + \let\savetabu \@gobble \let\tabudefaulttarget \linewidth + \let\@footnotetext \@gobble \let\@xfootnote \tabu@xfootnote + \let\color \tabu@nocolor\let\rowcolor \tabu@norowcolor + \let\tabu@aftergroupcleanup \relax % only after the last trial + \tabu@mkpreambuffer + \ifnum \count@>\thr@@ \let\@halignto \@empty \tabucolX@init + \def\tabu@lasttry{\m@ne\p@}\fi + \begingroup \iffalse{\fi \ifnum0=`}\fi + \toks@{}\def\tabu@stack{b}\iftabuscantokens \endlinechar=10 \obeyspaces \fi % + \tabu@collectbody \tabu@strategy % +}% \tabu@setstrategy +\def\tabu@savecounters{% + \def\@elt ##1{\csname c@##1\endcsname\the\csname c@##1\endcsname}% + \edef\tabu@clckpt {\begingroup \globaldefs=\@ne \cl@@ckpt \endgroup}\let\@elt \relax +}% \tabu@savecounters +\def\tabucolX@init {% \tabucolX <= \tabu@target / (sum coefs > 0) + \dimen@ \z@ \tabu@Xsum \z@ \tabucolX \z@ \let\tabu@ \tabu@Xinit \tabu@Xcoefs + \ifdim \dimen@>\z@ + \@tempdima \dimexpr \tabu@target *\p@/\dimen@ + \tabu@hfuzz\relax + \ifdim \tabucolX<\@tempdima \tabucolX \@tempdima \fi + \fi +}% \tabucolX@init +\def\tabu@Xinit #1#2{\tabu@Xcol #1 \advance \tabu@Xsum + \ifdim #2\p@>\z@ #2\p@ \advance\dimen@ #2\p@ + \else -#2\p@ \tabu@negcoeftrue + \@tempdima \dimexpr \tabu@target*\p@/\dimexpr-#2\p@\relax \relax + \ifdim \tabucolX<\@tempdima \tabucolX \@tempdima \fi + \tabu@wddef{#1}{0pt}% + \fi +}% \tabu@Xinit +%% Collecting the environment body ---------------------------------- +\long\def\tabu@collectbody #1#2\end #3{% + \edef\tabu@stack{\tabu@pushbegins #2\begin\end\expandafter\@gobble\tabu@stack}% + \ifx \tabu@stack\@empty + \toks@\expandafter{\expandafter\tabu@thebody\expandafter{\the\toks@ #2}% + \def\tabu@end@envir{\end{#3}}% + \iftabuscantokens + \iftabu@long \def\tabu@endenvir {\end{#3}\tabu@gobbleX}% + \else \def\tabu@endenvir {\let\endarray \@empty + \end{#3}\tabu@gobbleX}% + \fi + \else \def\tabu@endenvir {\end{#3}}\fi}% + \let\tabu@collectbody \tabu@endofcollect + \else\def\tabu@temp{#3}% + \ifx \tabu@temp\@empty \toks@\expandafter{\the\toks@ #2\end }% + \else \ifx\tabu@temp\tabu@@spxiii \toks@\expandafter{\the\toks@ #2\end #3}% + \else \ifx\tabu@temp\tabu@X \toks@\expandafter{\the\toks@ #2\end #3}% + \else \toks@\expandafter{\the\toks@ #2\end{#3}}% + \fi\fi\fi + \fi + \tabu@collectbody{#1}% +}% \tabu@collectbody +\long\def\tabu@pushbegins#1\begin#2{\ifx\end#2\else b\expandafter\tabu@pushbegins\fi}% +\def\tabu@endofcollect #1{\ifnum0=`{}\fi + \expandafter\endgroup \the\toks@ #1% +}% \tabu@endofcollect +%% The trials: switching between strategies ------------------------- +\def\tabu@strategy {\relax % stops \count@ assignment ! + \ifcase\count@ % case 0 = print with vertical adjustment (outer is finished) + \expandafter \tabu@endoftrials + \or % case 1 = exit in vertical measure (outer in mode 3) + \expandafter\xdef\csname tabu@\the\tabu@nested.T\endcsname{\the\tabu@target}% + \expandafter\xdef\csname tabu@\the\tabu@nested.X\endcsname{\the\tabucolX}% + \expandafter \tabu@endoftrials + \or % case 2 = exit with a rule replacing the table (outer in mode 4) + \expandafter \tabu@quickend + \or % case 3 = outer is in mode 3 because of no X + \begingroup + \tabu@evr{\tabu@verticalinit}\tabu@celllalign@def{\tabu@verticalmeasure}% + \def\tabu@cellralign{\tabu@verticalspacing}% + \expandafter \tabu@measuring + \else % case 4 = horizontal measure + \begingroup + \global\let\tabu@elapsedtime \tabu@message@etime + \long\def\multicolumn##1##2##3{\multispan{##1}}% + \let\tabu@startpboxORI \@startpbox + \iftabu@spread + \def\tabu@naturalXmax {\z@}% + \let\tabu@naturalXmin \tabu@naturalXmax + \tabu@evr{\global\tabu@naturalX \z@}% + \let\@startpbox \tabu@startpboxmeasure + \else\iftabu@negcoef + \let\@startpbox \tabu@startpboxmeasure + \else \let\@startpbox \tabu@startpboxquick + \fi\fi + \expandafter \tabu@measuring + \fi +}% \tabu@strategy +\def\tabu@measuring{\expandafter \tabu@trial \expandafter + \count@ \the\count@ \tabu@endtrial +}% \tabu@measuring +\def\tabu@trial{\iftabu@long \tabu@longtrial \else \tabu@shorttrial \fi} +\def\tabu@shorttrial {\setbox\tabu@box \hbox\bgroup \tabu@seteverycr + \ifx \tabu@savecounters\relax \else + \let\tabu@savecounters \relax \tabu@clckpt \fi + $\iftabuscantokens \tabu@rescan \else \expandafter\@secondoftwo \fi + \expandafter{\expandafter \tabuthepreamble + \the\tabu@thebody + \csname tabu@adl@endtrial\endcsname + \endarray}$\egroup % got \tabu@box +}% \tabu@shorttrial +\def\tabu@longtrial {\setbox\tabu@box \hbox\bgroup \tabu@seteverycr + \ifx \tabu@savecounters\relax \else + \let\tabu@savecounters \relax \tabu@clckpt \fi + \iftabuscantokens \tabu@rescan \else \expandafter\@secondoftwo \fi + \expandafter{\expandafter \tabuthepreamble + \the\tabu@thebody + \tabuendlongtrial}\egroup % got \tabu@box +}% \tabu@longtrial +\def\tabuendlongtrial{% no @ allowed for \scantokens + \LT@echunk \global\setbox\@ne \hbox{\unhbox\@ne}\kern\wd\@ne + \LT@get@widths +}% \tabuendlongtrial +\def\tabu@adl@endtrial{% + \crcr \noalign{\global\adl@ncol \tabu@nbcols}}% anything global is crap, junky and fails ! +\def\tabu@seteverycr {\tabu@reset + \everycr \expandafter{\the\everycr \tabu@everycr}% + \let\everycr \tabu@noeverycr % +}% \tabu@seteverycr +\def\tabu@noeverycr{{\aftergroup\tabu@restoreeverycr \afterassignment}\toks@} +\def\tabu@restoreeverycr {\let\everycr \tabu@@everycr} +\def\tabu@everycr {\iftabu@everyrow \noalign{\tabu@everyrow}\fi} +\def\tabu@endoftrials {% + \iftabuscantokens \expandafter\@firstoftwo + \else \expandafter\@secondoftwo + \fi + {\expandafter \tabu@closetrialsgroup \expandafter + \tabu@rescan \expandafter{% + \expandafter\tabuthepreamble + \the\expandafter\tabu@thebody + \iftabu@long \else \endarray \fi}} + {\expandafter\tabu@closetrialsgroup \expandafter + \tabuthepreamble + \the\tabu@thebody}% + \tabu@endenvir % Finish ! +}% \tabu@endoftrials +\def\tabu@closetrialsgroup {% + \toks@\expandafter{\tabu@endenvir}% + \edef\tabu@bufferX{\endgroup + \tabucolX \the\tabucolX + \tabu@target \the\tabu@target + \tabu@cnt \the\tabu@cnt + \def\noexpand\tabu@endenvir{\the\toks@}% + %Quid de \@halignto = \tabu@halignto ?? + }% \tabu@bufferX + \tabu@bufferX + \ifcase\tabu@nested % print out (outer in mode 0) + \global\tabu@cnt \tabu@cnt + \tabu@evr{\tabu@verticaldynamicadjustment}% + \tabu@celllalign@def{\everypar{}}\let\tabu@cellralign \@empty + \let\@finalstrut \tabu@finalstrut + \else % vertical measure of nested tabu + \tabu@evr{\tabu@verticalinit}% + \tabu@celllalign@def{\tabu@verticalmeasure}% + \def\tabu@cellralign{\tabu@verticalspacing}% + \fi + \tabu@clckpt \let\@halignto \tabu@halignto + \let\@halignto \@empty + \tabu@seteverycr + \ifdim \tabustrutrule>\z@ \ifnum\tabu@nested=\z@ + \setbox\@arstrutbox \box\voidb@x % force \@arstrutbox to be rebuilt (visible struts) + \fi\fi +}% \tabu@closetrialsgroup +\def\tabu@quickend {\expandafter \endgroup \expandafter + \tabu@target \the\tabu@target \tabu@quickrule + \let\endarray \relax \tabu@endenvir +}% \tabu@quickend +\def\tabu@endtrial {\relax % stops \count@ assignment ! + \ifcase \count@ \tabu@err % case 0 = impossible here + \or \tabu@err % case 1 = impossible here + \or \tabu@err % case 2 = impossible here + \or % case 3 = outer goes into mode 0 + \def\tabu@bufferX{\endgroup}\count@ \z@ + \else % case 4 = outer goes into mode 3 + \iftabu@spread \tabu@spreadarith % inner into mode 1 (outer in mode 3) + \else \tabu@arith % or 2 (outer in mode 4) + \fi + \count@=% + \ifcase\tabu@nested \thr@@ % outer goes into mode 3 + \else\iftabu@measuring \tw@ % outer is in mode 4 + \else \@ne % outer is in mode 3 + \fi\fi + \edef\tabu@bufferX{\endgroup + \tabucolX \the\tabucolX + \tabu@target \the\tabu@target}% + \fi + \expandafter \tabu@bufferX \expandafter + \count@ \the\count@ \tabu@strategy +}% \tabu@endtrial +\def\tabu@err{\errmessage{(tabu) Internal impossible error! (\count@=\the\count@)}} +%% The algorithms: compute the widths / stop or go on --------------- +\def\tabu@arithnegcoef {% + \@tempdima \z@ \dimen@ \z@ \let\tabu@ \tabu@arith@negcoef \tabu@Xcoefs +}% \tabu@arithnegcoef +\def\tabu@arith@negcoef #1#2{% + \ifdim #2\p@>\z@ \advance\dimen@ #2\p@ % saturated by definition + \advance\@tempdima #2\tabucolX + \else + \ifdim -#2\tabucolX <\tabu@wd{#1}% c_i X < natural width <= \tabu@target-> saturated + \advance\dimen@ -#2\p@ + \advance\@tempdima -#2\tabucolX + \else + \advance\@tempdima \tabu@wd{#1}% natural width <= c_i X => neutralised + \ifdim \tabu@wd{#1}<\tabu@target \else % neutralised + \advance\dimen@ -#2\p@ % saturated (natural width = tabu@target) + \fi + \fi + \fi +}% \tabu@arith@negcoef +\def\tabu@givespace #1#2{% here \tabu@DELTA < \z@ + \ifdim \@tempdima=\z@ + \tabu@wddef{#1}{\the\dimexpr -\tabu@DELTA*\p@/\tabu@Xsum}% + \else + \tabu@wddef{#1}{\the\dimexpr \tabu@hsize{#1}{#2} + *(\p@ -\tabu@DELTA*\p@/\@tempdima)/\p@\relax}% + \fi +}% \tabu@givespace +\def\tabu@arith {\advance\tabu@cnt \@ne + \ifnum \tabu@cnt=\@ne \tabu@message{\tabu@titles}\fi + \tabu@arithnegcoef + \@tempdimb \dimexpr \wd\tabu@box -\@tempdima \relax % + \tabu@DELTA = \dimexpr \wd\tabu@box - \tabu@target \relax + \tabu@message{\tabu@message@arith}% + \ifdim \tabu@DELTA <\tabu@hfuzz + \ifdim \tabu@DELTA<\z@ % wd (tabu)<\tabu@target ? + \let\tabu@ \tabu@givespace \tabu@Xcoefs + \advance\@tempdima \@tempdimb \advance\@tempdima -\tabu@DELTA % for message + \else % already converged: nothing to do but nearly impossible... + \fi + \tabucolX \maxdimen + \tabu@measuringfalse + \else % need for narrower X columns + \tabucolX =\dimexpr (\@tempdima -\tabu@DELTA) *\p@/\tabu@Xsum \relax + \tabu@measuringtrue + \@whilesw \iftabu@measuring\fi {% + \advance\tabu@cnt \@ne + \tabu@arithnegcoef + \tabu@DELTA =\dimexpr \@tempdima+\@tempdimb -\tabu@target \relax % always < 0 here + \tabu@message{\tabu@header + \tabu@msgalign \tabucolX { }{ }{ }{ }{ }\@@ + \tabu@msgalign \@tempdima+\@tempdimb { }{ }{ }{ }{ }\@@ + \tabu@msgalign \tabu@target { }{ }{ }{ }{ }\@@ + \tabu@msgalign@PT \dimen@ { }{}{}{}{}{}{}\@@ + \ifdim -\tabu@DELTA<\tabu@hfuzz \tabu@spaces target ok\else + \tabu@msgalign \dimexpr -\tabu@DELTA *\p@/\dimen@ {}{}{}{}{}\@@ + \fi}% + \ifdim -\tabu@DELTA<\tabu@hfuzz + \advance\@tempdima \@tempdimb % for message + \tabu@measuringfalse + \else + \advance\tabucolX \dimexpr -\tabu@DELTA *\p@/\dimen@ \relax + \fi + }% + \fi + \tabu@message{\tabu@message@reached}% + \edef\tabu@bufferX{\endgroup \tabu@cnt \the\tabu@cnt + \tabucolX \the\tabucolX + \tabu@target \the\tabu@target}% +}% \tabu@arith +\def\tabu@spreadarith {% + \dimen@ \z@ \@tempdima \tabu@naturalXmax \let\tabu@ \tabu@spread@arith \tabu@Xcoefs + \edef\tabu@naturalXmin {\the\dimexpr\tabu@naturalXmin*\dimen@/\p@}% + \@tempdimc =\dimexpr \wd\tabu@box -\tabu@naturalXmax+\tabu@naturalXmin \relax + \iftabu@measuring + \tabu@target =\dimexpr \@tempdimc+\tabu@spreadtarget \relax + \edef\tabu@bufferX{\endgroup \tabucolX \the\tabucolX \tabu@target\the\tabu@target}% + \else + \tabu@message{\tabu@message@spreadarith}% + \ifdim \dimexpr \@tempdimc+\tabu@spreadtarget >\tabu@target + \tabu@message{(tabu) spread + \ifdim \@tempdimc>\tabu@target useless here: default target used% + \else too large: reduced to fit default target\fi.}% + \else + \tabu@target =\dimexpr \@tempdimc+\tabu@spreadtarget \relax + \tabu@message{(tabu) spread: New target set to \the\tabu@target^^J}% + \fi + \begingroup \let\tabu@wddef \@gobbletwo + \@tempdimb \@tempdima + \tabucolX@init + \tabu@arithnegcoef + \wd\tabu@box =\dimexpr \wd\tabu@box +\@tempdima-\@tempdimb \relax + \expandafter\endgroup \expandafter\tabucolX \the\tabucolX + \tabu@arith + \fi +}% \tabu@spreadarith +\def\tabu@spread@arith #1#2{% + \ifdim #2\p@>\z@ \advance\dimen@ #2\p@ + \else \advance\@tempdima \tabu@wd{#1}\relax + \fi +}% \tabu@spread@arith +%% Reporting in the .log file --------------------------------------- +\def\tabu@message@defaulttarget{% + \ifnum\tabu@nested=\z@^^J(tabu) Default target: + \ifx\tabudefaulttarget\linewidth \string\linewidth + \ifdim \tabu@thetarget=\linewidth \else + -\the\dimexpr\linewidth-\tabu@thetarget\fi = + \else\ifx\tabudefaulttarget\linegoal\string\linegoal= + \fi\fi + \else (tabu) Default target (nested): \fi + \the\tabu@target \on@line + \ifnum\tabu@nested=\z@ , page \the\c@page\fi} +\def\tabu@message@target {^^J(tabu) Target specified: + \the\tabu@target \on@line, page \the\c@page} +\def\tabu@message@arith {\tabu@header + \tabu@msgalign \tabucolX { }{ }{ }{ }{ }\@@ + \tabu@msgalign \wd\tabu@box { }{ }{ }{ }{ }\@@ + \tabu@msgalign \tabu@target { }{ }{ }{ }{ }\@@ + \tabu@msgalign@PT \dimen@ { }{}{}{}{}{}{}\@@ + \ifdim \tabu@DELTA<\tabu@hfuzz giving space\else + \tabu@msgalign \dimexpr (\@tempdima-\tabu@DELTA) *\p@/\tabu@Xsum -\tabucolX {}{}{}{}{}\@@ + \fi +}% \tabu@message@arith +\def\tabu@message@spreadarith {\tabu@spreadheader + \tabu@msgalign \tabu@spreadtarget { }{ }{ }{ }{}\@@ + \tabu@msgalign \wd\tabu@box { }{ }{ }{ }{}\@@ + \tabu@msgalign -\tabu@naturalXmax { }{}{}{}{}\@@ + \tabu@msgalign \tabu@naturalXmin { }{ }{ }{ }{}\@@ + \tabu@msgalign \ifdim \dimexpr\@tempdimc>\tabu@target \tabu@target + \else \@tempdimc+\tabu@spreadtarget \fi + {}{}{}{}{}\@@} +\def\tabu@message@negcoef #1#2{ + \tabu@spaces\tabu@spaces\space * #1. X[\rem@pt#2]: + \space width = \tabu@wd {#1} + \expandafter\string\csname tabu@\the\tabu@nested.W\number#1\endcsname + \ifdim -\tabu@pt#2\tabucolX<\tabu@target + < \number-\rem@pt#2 X + = \the\dimexpr -\tabu@pt#2\tabucolX \relax + \else + <= \the\tabu@target\space < \number-\rem@pt#2 X\fi} +\def\tabu@message@reached{\tabu@header + ******* Reached Target: + hfuzz = \tabu@hfuzz\on@line\space *******} +\def\tabu@message@etime{\edef\tabu@stoptime{\the\pdfelapsedtime}% + \tabu@message{(tabu)\tabu@spaces Time elapsed during measure: + \the\numexpr(\tabu@stoptime-\tabu@starttime-32767)/65536\relax sec + \the\numexpr\numexpr(\tabu@stoptime-\tabu@starttime) + -\numexpr(\tabu@stoptime-\tabu@starttime-32767)/65536\relax*65536\relax + *1000/65536\relax ms \tabu@spaces(\the\tabu@cnt\space + cycle\ifnum\tabu@cnt>\@ne s\fi)^^J^^J}} +\def\tabu@message@verticalsp {% + \ifdim \@tempdima>\tabu@ht + \ifdim \@tempdimb>\tabu@dp + \expandafter\expandafter\expandafter\string\tabu@ht = + \tabu@msgalign \@tempdima { }{ }{ }{ }{ }\@@ + \expandafter\expandafter\expandafter\string\tabu@dp = + \tabu@msgalign \@tempdimb { }{ }{ }{ }{ }\@@^^J% + \else + \expandafter\expandafter\expandafter\string\tabu@ht = + \tabu@msgalign \@tempdima { }{ }{ }{ }{ }\@@^^J% + \fi + \else\ifdim \@tempdimb>\tabu@dp + \tabu@spaces\tabu@spaces\tabu@spaces + \expandafter\expandafter\expandafter\string\tabu@dp = + \tabu@msgalign \@tempdimb { }{ }{ }{ }{ }\@@^^J\fi + \fi +}% \tabu@message@verticalsp +\edef\tabu@spaces{\@spaces} +\def\tabu@strippt{\expandafter\tabu@pt\the} +{\@makeother\P \@makeother\T\lowercase{\gdef\tabu@pt #1PT{#1}}} +\def\tabu@msgalign{\expandafter\tabu@msg@align\the\dimexpr} +\def\tabu@msgalign@PT{\expandafter\tabu@msg@align\romannumeral-`\0\tabu@strippt} +\def\do #1{% + \def\tabu@msg@align##1.##2##3##4##5##6##7##8##9\@@{% + \ifnum##1<10 #1 #1\else + \ifnum##1<100 #1 \else + \ifnum##1<\@m #1\fi\fi\fi + ##1.##2##3##4##5##6##7##8#1}% + \def\tabu@header{(tabu) \ifnum\tabu@cnt<10 #1\fi\the\tabu@cnt) }% + \def\tabu@titles{\ifnum \tabu@nested=\z@ + (tabu) Try#1 #1 tabu X #1 #1 #1tabu Width #1 #1 Target + #1 #1 #1 Coefs #1 #1 #1 Update^^J\fi}% + \def\tabu@spreadheader{% + (tabu) Try#1 #1 Spread #1 #1 tabu Width #1 #1 #1 Nat. X #1 #1 #1 #1Nat. Min. + #1 New Target^^J% + (tabu) sprd} + \def\tabu@message@save {\begingroup + \def\x ####1{\tabu@msg@align ####1{ }{ }{ }{ }{}\@@} + \def\z ####1{\expandafter\x\expandafter{\romannumeral-`\0\tabu@strippt + \dimexpr####1\p@{ }{ }}}% + \let\color \relax \def\tabu@rulesstyle ####1####2{\detokenize{####1}}% + \let\CT@arc@ \relax \let\@preamble \@gobble + \let\tabu@savedpream \@firstofone + \let\tabu@savedparams \@firstofone + \def\tabu@target ####1\relax {(tabu) target #1 #1 #1 #1 #1 = \x{####1}^^J}% + \def\tabucolX ####1\relax {(tabu) X columns width#1 = \x{####1}^^J}% + \def\tabu@nbcols ####1\relax {(tabu) Number of columns: \z{####1}^^J}% + \def\tabu@aligndefault ####1{(tabu) Default alignment: #1 #1 ####1^^J}% + \def\col@sep ####1\relax {(tabu) column sep #1 #1 #1 = \x{####1}^^J}% + \def\arrayrulewidth ####1\relax{(tabu) arrayrulewidth #1 = \x{####1}}% + \def\doublerulesep ####1\relax { doublerulesep = \x{####1}^^J}% + \def\extratabsurround####1\relax{(tabu) extratabsurround = \x{####1}^^J}% + \def\extrarowheight ####1\relax{(tabu) extrarowheight #1 = \x{####1}}% + \def\extrarowdepth ####1\relax {extrarowdepth = \x{####1}^^J}% + \def\abovetabulinesep####1\relax{(tabu) abovetabulinesep=\x{####1} }% + \def\belowtabulinesep####1\relax{ belowtabulinesep=\x{####1}^^J}% + \def\arraystretch ####1{(tabu) arraystretch #1 #1 = \z{####1}^^J}% + \def\minrowclearance####1\relax{(tabu) minrowclearance #1 = \x{####1}^^J}% + \def\tabu@arc@L ####1{(tabu) taburulecolor #1 #1 = ####1^^J}% + \def\tabu@drsc@L ####1{(tabu) tabudoublerulecolor= ####1^^J}% + \def\tabu@evr@L ####1{(tabu) everyrow #1 #1 #1 #1 = \detokenize{####1}^^J}% + \def\tabu@ls@L ####1{(tabu) line style = \detokenize{####1}^^J}% + \def\NC@find ####1\@nil{(tabu) tabu preamble#1 #1 = \detokenize{####1}^^J}% + \def\tabu@wddef####1####2{(tabu) Natural width ####1 = \x{####2}^^J}% + \let\edef \@gobbletwo \let\def \@empty \let\let \@gobbletwo + \tabu@message{% + (tabu) \string\savetabu{\tabu@temp}: \on@line^^J% + \tabu@usetabu \@nil^^J}% + \endgroup} +}\do{ } +%% Measuring the natural width (varwidth) - store the results ------- +\def\tabu@startpboxmeasure #1{\bgroup % entering \vtop + \edef\tabu@temp{\expandafter\@secondoftwo \ifx\tabu@hsize #1\else\relax\fi}% + \ifodd 1\ifx \tabu@temp\@empty 0 \else % starts with \tabu@hsize ? + \iftabu@spread \else % if spread -> measure + \ifdim \tabu@temp\p@>\z@ 0 \fi\fi\fi% if coef>0 -> do not measure + \let\@startpbox \tabu@startpboxORI % restore immediately (nesting) + \tabu@measuringtrue % for the quick option... + \tabu@Xcol =\expandafter\@firstoftwo\ifx\tabu@hsize #1\fi + \ifdim \tabu@temp\p@>\z@ \ifdim \tabu@temp\tabucolX<\tabu@target + \tabu@target=\tabu@temp\tabucolX \fi\fi + \setbox\tabu@box \hbox \bgroup + \begin{varwidth}\tabu@target + \let\FV@ListProcessLine \tabu@FV@ListProcessLine % \hbox to natural width... + \narrowragged \arraybackslash \parfillskip \@flushglue + \ifdefined\pdfadjustspacing \pdfadjustspacing\z@ \fi + \bgroup \aftergroup\tabu@endpboxmeasure + \ifdefined \cellspacetoplimit \tabu@cellspacepatch \fi + \else \expandafter\@gobble + \tabu@startpboxquick{#1}% \@gobble \bgroup + \fi +}% \tabu@startpboxmeasure +\def\tabu@cellspacepatch{\def\bcolumn##1\@nil{}\let\ecolumn\@empty + \bgroup\color@begingroup} +\def\tabu@endpboxmeasure {% + \@finalstrut \@arstrutbox + \end{varwidth}\egroup % + \ifdim \tabu@temp\p@ <\z@ % neg coef + \ifdim \tabu@wd\tabu@Xcol <\wd\tabu@box + \tabu@wddef\tabu@Xcol {\the\wd\tabu@box}% + \tabu@debug{\tabu@message@endpboxmeasure}% + \fi + \else % spread coef>0 + \global\advance \tabu@naturalX \wd\tabu@box + \@tempdima =\dimexpr \wd\tabu@box *\p@/\dimexpr \tabu@temp\p@\relax \relax + \ifdim \tabu@naturalXmax <\tabu@naturalX + \xdef\tabu@naturalXmax {\the\tabu@naturalX}\fi + \ifdim \tabu@naturalXmin <\@tempdima + \xdef\tabu@naturalXmin {\the\@tempdima}\fi + \fi + \box\tabu@box \egroup % end of \vtop (measure) restore \tabu@target +}% \tabu@endpboxmeasure +\def\tabu@wddef #1{\expandafter\xdef + \csname tabu@\the\tabu@nested.W\number#1\endcsname} +\def\tabu@wd #1{\csname tabu@\the\tabu@nested.W\number#1\endcsname} +\def\tabu@message@endpboxmeasure{\tabu@spaces\tabu@spaces<-> % <-> save natural wd + \the\tabu@Xcol. X[\tabu@temp]: + target = \the\tabucolX \space + \expandafter\expandafter\expandafter\string\tabu@wd\tabu@Xcol + =\tabu@wd\tabu@Xcol +}% \tabu@message@endpboxmeasure +\def\tabu@startpboxquick {\bgroup + \let\@startpbox \tabu@startpboxORI % restore immediately + \let\tabu \tabu@quick % \begin is expanded before... + \expandafter\@gobble \@startpbox % gobbles \bgroup +}% \tabu@startpboxquick +\def\tabu@quick {\begingroup \iffalse{\fi \ifnum0=`}\fi + \toks@{}\def\tabu@stack{b}\tabu@collectbody \tabu@endquick +}% \tabu@quick +\def\tabu@endquick {% + \ifodd 1\ifx\tabu@end@envir\tabu@endtabu \else + \ifx\tabu@end@envir\tabu@endtabus \else 0\fi\fi\relax + \endgroup + \else \let\endtabu \relax + \tabu@end@envir + \fi +}% \tabu@quick +\def\tabu@endtabu {\end{tabu}} +\def\tabu@endtabus {\end{tabu*}} +%% Measuring the heights and depths - store the results ------------- +\def\tabu@verticalmeasure{\everypar{}% + \ifnum \currentgrouptype>12 % 14=semi-simple, 15=math shift group + \setbox\tabu@box =\hbox\bgroup + \let\tabu@verticalspacing \tabu@verticalsp@lcr + \d@llarbegin % after \hbox ... + \else + \edef\tabu@temp{\ifnum\currentgrouptype=5\vtop + \else\ifnum\currentgrouptype=12\vcenter + \else\vbox\fi\fi}% + \setbox\tabu@box \hbox\bgroup$\tabu@temp \bgroup + \let\tabu@verticalspacing \tabu@verticalsp@pmb + \fi +}% \tabu@verticalmeasure +\def\tabu@verticalsp@lcr{% + \d@llarend \egroup % + \@tempdima \dimexpr \ht\tabu@box+\abovetabulinesep + \@tempdimb \dimexpr \dp\tabu@box+\belowtabulinesep \relax + \ifdim\tabustrutrule>\z@ \tabu@debug{\tabu@message@verticalsp}\fi + \ifdim \tabu@ht<\@tempdima \tabu@htdef{\the\@tempdima}\fi + \ifdim \tabu@dp<\@tempdimb \tabu@dpdef{\the\@tempdimb}\fi + \noindent\vrule height\@tempdima depth\@tempdimb +}% \tabu@verticalsp@lcr +\def\tabu@verticalsp@pmb{% inserts struts as needed + \par \expandafter\egroup + \expandafter$\expandafter + \egroup \expandafter + \@tempdimc \the\prevdepth + \@tempdima \dimexpr \ht\tabu@box+\abovetabulinesep + \@tempdimb \dimexpr \dp\tabu@box+\belowtabulinesep \relax + \ifdim\tabustrutrule>\z@ \tabu@debug{\tabu@message@verticalsp}\fi + \ifdim \tabu@ht<\@tempdima \tabu@htdef{\the\@tempdima}\fi + \ifdim \tabu@dp<\@tempdimb \tabu@dpdef{\the\@tempdimb}\fi + \let\@finalstrut \@gobble + \hrule height\@tempdima depth\@tempdimb width\hsize +%% \box\tabu@box +}% \tabu@verticalsp@pmb + +\def\tabu@verticalinit{% + \ifnum \c@taburow=\z@ \tabu@rearstrut \fi % after \tabu@reset ! + \advance\c@taburow \@ne + \tabu@htdef{\the\ht\@arstrutbox}\tabu@dpdef{\the\dp\@arstrutbox}% + \advance\c@taburow \m@ne +}% \tabu@verticalinit +\def\tabu@htdef {\expandafter\xdef \csname tabu@\the\tabu@nested.H\the\c@taburow\endcsname} +\def\tabu@ht {\csname tabu@\the\tabu@nested.H\the\c@taburow\endcsname} +\def\tabu@dpdef {\expandafter\xdef \csname tabu@\the\tabu@nested.D\the\c@taburow\endcsname} +\def\tabu@dp {\csname tabu@\the\tabu@nested.D\the\c@taburow\endcsname} +\def\tabu@verticaldynamicadjustment {% + \advance\c@taburow \@ne + \extrarowheight \dimexpr\tabu@ht - \ht\strutbox + \extrarowdepth \dimexpr\tabu@dp - \dp\strutbox + \let\arraystretch \@empty + \advance\c@taburow \m@ne +}% \tabu@verticaldynamicadjustment +\def\tabuphantomline{\crcr \noalign{% + {\globaldefs \@ne + \setbox\@arstrutbox \box\voidb@x + \let\tabu@@celllalign \tabu@celllalign + \let\tabu@@cellralign \tabu@cellralign + \let\tabu@@cellleft \tabu@cellleft + \let\tabu@@cellright \tabu@cellright + \let\tabu@@thevline \tabu@thevline + \let\tabu@celllalign \@empty + \let\tabu@cellralign \@empty + \let\tabu@cellright \@empty + \let\tabu@cellleft \@empty + \let\tabu@thevline \relax}% + \edef\tabu@temp{\tabu@multispan \tabu@nbcols{\noindent &}}% + \toks@\expandafter{\tabu@temp \noindent\tabu@everyrowfalse \cr + \noalign{\tabu@rearstrut + {\globaldefs\@ne + \let\tabu@celllalign \tabu@@celllalign + \let\tabu@cellralign \tabu@@cellralign + \let\tabu@cellleft \tabu@@cellleft + \let\tabu@cellright \tabu@@cellright + \let\tabu@thevline \tabu@@thevline}}}% + \expandafter}\the\toks@ +}% \tabuphantomline +%% \firsthline and \lasthline corrections --------------------------- +\def\tabu@firstline {\tabu@hlineAZ \tabu@firsthlinecorrection {}} +\def\tabu@firsthline{\tabu@hlineAZ \tabu@firsthlinecorrection \hline} +\def\tabu@lastline {\tabu@hlineAZ \tabu@lasthlinecorrection {}} +\def\tabu@lasthline {\tabu@hlineAZ \tabu@lasthlinecorrection \hline} +\def\tabu@hline {% replaces \hline if no colortbl (see \AtBeginDocument) + \noalign{\ifnum0=`}\fi + {\CT@arc@\hrule height\arrayrulewidth}% + \futurelet \tabu@temp \tabu@xhline +}% \tabu@hline +\def\tabu@xhline{% + \ifx \tabu@temp \hline + {\ifx \CT@drsc@\relax \vskip + \else\ifx \CT@drsc@\@empty \vskip + \else \CT@drsc@\hrule height + \fi\fi + \doublerulesep}% + \fi + \ifnum0=`{\fi}% +}% \tabu@xhline +\def\tabu@hlineAZ #1#2{\noalign{\ifnum0=`}\fi \dimen@ \z@ \count@ \z@ + \toks@{}\def\tabu@hlinecorrection{#1}\def\tabu@temp{#2}% + \tabu@hlineAZsurround +}% \tabu@hlineAZ +\newcommand*\tabu@hlineAZsurround[1][\extratabsurround]{% + \extratabsurround #1\let\tabucline \tabucline@scan + \let\hline \tabu@hlinescan \let\firsthline \hline + \let\cline \tabu@clinescan \let\lasthline \hline + \expandafter \futurelet \expandafter \tabu@temp + \expandafter \tabu@nexthlineAZ \tabu@temp +}% \tabu@hlineAZsurround +\def\tabu@hlinescan {\tabu@thick \arrayrulewidth \tabu@xhlineAZ \hline} +\def\tabu@clinescan #1{\tabu@thick \arrayrulewidth \tabu@xhlineAZ {\cline{#1}}} +\def\tabucline@scan{\@testopt \tabucline@sc@n {}} +\def\tabucline@sc@n #1[#2]{\tabu@xhlineAZ {\tabucline[{#1}]{#2}}} +\def\tabu@nexthlineAZ{% + \ifx \tabu@temp\hline \else + \ifx \tabu@temp\cline \else + \ifx \tabu@temp\tabucline \else + \tabu@hlinecorrection + \fi\fi\fi +}% \tabu@nexthlineAZ +\def\tabu@xhlineAZ #1{% + \toks@\expandafter{\the\toks@ #1}% + \@tempdimc \tabu@thick % The last line width + \ifcase\count@ \@tempdimb \tabu@thick % The first line width + \else \advance\dimen@ \dimexpr \tabu@thick+\doublerulesep \relax + \fi + \advance\count@ \@ne \futurelet \tabu@temp \tabu@nexthlineAZ +}% \tabu@xhlineAZ +\def\tabu@firsthlinecorrection{% \count@ = number of \hline -1 + \@tempdima \dimexpr \ht\@arstrutbox+\dimen@ + \edef\firsthline{% + \omit \hbox to\z@{\hss{\noexpand\tabu@DBG{yellow}\vrule + height \the\dimexpr\@tempdima+\extratabsurround + depth \dp\@arstrutbox + width \tabustrutrule}\hss}\cr + \noalign{\vskip -\the\dimexpr \@tempdima+\@tempdimb + +\dp\@arstrutbox \relax}% + \the\toks@ + }\ifnum0=`{\fi + \expandafter}\firsthline % we are then ! +}% \tabu@firsthlinecorrection +\def\tabu@lasthlinecorrection{% + \@tempdima \dimexpr \dp\@arstrutbox+\dimen@+\@tempdimb+\@tempdimc + \edef\lasthline{% + \the\toks@ + \noalign{\vskip -\the\dimexpr\dimen@+\@tempdimb+\dp\@arstrutbox}% + \omit \hbox to\z@{\hss{\noexpand\tabu@DBG{yellow}\vrule + depth \the\dimexpr \dp\@arstrutbox+\@tempdimb+\dimen@ + +\extratabsurround-\@tempdimc + height \z@ + width \tabustrutrule}\hss}\cr + }\ifnum0=`{\fi + \expandafter}\lasthline % we are then ! +}% \tabu@lasthlinecorrection +\def\tabu@LT@@hline{% + \ifx\LT@next\hline + \global\let\LT@next \@gobble + \ifx \CT@drsc@\relax + \gdef\CT@LT@sep{% + \noalign{\penalty-\@medpenalty\vskip\doublerulesep}}% + \else + \gdef\CT@LT@sep{% + \multispan\LT@cols{% + \CT@drsc@\leaders\hrule\@height\doublerulesep\hfill}\cr}% + \fi + \else + \global\let\LT@next\empty + \gdef\CT@LT@sep{% + \noalign{\penalty-\@lowpenalty\vskip-\arrayrulewidth}}% + \fi + \ifnum0=`{\fi}% + \multispan\LT@cols + {\CT@arc@\leaders\hrule\@height\arrayrulewidth\hfill}\cr + \CT@LT@sep + \multispan\LT@cols + {\CT@arc@\leaders\hrule\@height\arrayrulewidth\hfill}\cr + \noalign{\penalty\@M}% + \LT@next +}% \tabu@LT@@hline +%% Horizontal lines : \tabucline ------------------------------------ +\let\tabu@start \@tempcnta +\let\tabu@stop \@tempcntb +\newcommand*\tabucline{\noalign{\ifnum0=`}\fi \tabu@cline} +\newcommand*\tabu@cline[2][]{\tabu@startstop{#2}% + \ifnum \tabu@stop<\z@ \toks@{}% + \else \tabu@clinearg{#1}\tabu@thestyle + \edef\tabucline{\toks@{% + \ifnum \tabu@start>\z@ \omit + \tabu@multispan\tabu@start {\span\omit}&\fi + \omit \tabu@multispan\tabu@stop {\span\omit}% + \tabu@thehline\cr + }}\tabucline + \tabu@tracinglines{(tabu:tabucline) Style: #1^^J\the\toks@^^J^^J}% + \fi + \futurelet \tabu@temp \tabu@xcline +}% \tabu@cline +\def\tabu@clinearg #1{% + \ifx\\#1\\\let\tabu@thestyle \tabu@ls@ + \else \@defaultunits \expandafter\let\expandafter\@tempa + \romannumeral-`\0#1\relax \@nnil + \ifx \hbox\@tempa \tabu@clinebox{#1}% + \else\ifx \box\@tempa \tabu@clinebox{#1}% + \else\ifx \vbox\@tempa \tabu@clinebox{#1}% + \else\ifx \vtop\@tempa \tabu@clinebox{#1}% + \else\ifx \copy\@tempa \tabu@clinebox{#1}% + \else\ifx \leaders\@tempa \tabu@clineleads{#1}% + \else\ifx \cleaders\@tempa \tabu@clineleads{#1}% + \else\ifx \xleaders\@tempa \tabu@clineleads{#1}% + \else\tabu@getline {#1}% + \fi\fi\fi\fi\fi\fi\fi\fi + \fi +}% \tabu@clinearg +\def\tabu@clinebox #1{\tabu@clineleads{\xleaders#1\hss}} +\def\tabu@clineleads #1{% + \let\tabu@thestyle \relax \let\tabu@leaders \@undefined + \gdef\tabu@thehrule{#1}} +\def\tabu@thehline{\begingroup + \ifdefined\tabu@leaders + \noexpand\tabu@thehleaders + \else \noexpand\tabu@thehrule + \fi \endgroup +}% \tabu@thehline +\def\tabu@xcline{% + \ifx \tabu@temp\tabucline + \toks@\expandafter{\the\toks@ \noalign + {\ifx\CT@drsc@\relax \vskip + \else \CT@drsc@\hrule height + \fi + \doublerulesep}}% + \fi + \tabu@docline +}% \tabu@xcline +\def\tabu@docline {\ifnum0=`{\fi \expandafter}\the\toks@} +\def\tabu@docline@evr {\xdef\tabu@doclineafter{\the\toks@}% + \ifnum0=`{\fi}\aftergroup\tabu@doclineafter} +\def\tabu@multispan #1#2{% + \ifnum\numexpr#1>\@ne #2\expandafter\tabu@multispan + \else \expandafter\@gobbletwo + \fi {#1-1}{#2}% +}% \tabu@multispan +\def\tabu@startstop #1{\tabu@start@stop #1\relax 1-\tabu@nbcols \@nnil} +\def\tabu@start@stop #1-#2\@nnil{% + \@defaultunits \tabu@start\number 0#1\relax \@nnil + \@defaultunits \tabu@stop \number 0#2\relax \@nnil + \tabu@stop \ifnum \tabu@start>\tabu@nbcols \m@ne + \else\ifnum \tabu@stop=\z@ \tabu@nbcols + \else\ifnum \tabu@stop>\tabu@nbcols \tabu@nbcols + \else \tabu@stop + \fi\fi\fi + \advance\tabu@start \m@ne + \ifnum \tabu@start>\z@ \advance\tabu@stop -\tabu@start \fi +}% \tabu@start@stop +%% Numbers: siunitx S columns (and \tabudecimal) ------------------- +\def\tabu@tabudecimal #1{% + \def\tabu@decimal{#1}\@temptokena{}% + \let\tabu@getdecimal@ \tabu@getdecimal@ignorespaces + \tabu@scandecimal +}% \tabu@tabudecimal +\def\tabu@scandecimal{\futurelet \tabu@temp \tabu@getdecimal@} +\def\tabu@skipdecimal#1{#1\tabu@scandecimal} +\def\tabu@getdecimal@ignorespaces{% + \ifcase 0\ifx\tabu@temp\ignorespaces\else + \ifx\tabu@temp\@sptoken1\else + 2\fi\fi\relax + \let\tabu@getdecimal@ \tabu@getdecimal + \expandafter\tabu@skipdecimal + \or \expandafter\tabu@gobblespace\expandafter\tabu@scandecimal + \else \expandafter\tabu@skipdecimal + \fi +}% \tabu@getdecimal@ignorespaces +\def\tabu@get@decimal#1{\@temptokena\expandafter{\the\@temptokena #1}% + \tabu@scandecimal} +\def\do#1{% + \def\tabu@get@decimalspace#1{% + \@temptokena\expandafter{\the\@temptokena #1}\tabu@scandecimal}% +}\do{ } +\let\tabu@@tabudecimal \tabu@tabudecimal +\def\tabu@getdecimal{% + \ifcase 0\ifx 0\tabu@temp\else + \ifx 1\tabu@temp\else + \ifx 2\tabu@temp\else + \ifx 3\tabu@temp\else + \ifx 4\tabu@temp\else + \ifx 5\tabu@temp\else + \ifx 6\tabu@temp\else + \ifx 7\tabu@temp\else + \ifx 8\tabu@temp\else + \ifx 9\tabu@temp\else + \ifx .\tabu@temp\else + \ifx ,\tabu@temp\else + \ifx -\tabu@temp\else + \ifx +\tabu@temp\else + \ifx e\tabu@temp\else + \ifx E\tabu@temp\else + \ifx\tabu@cellleft\tabu@temp1\else + \ifx\ignorespaces\tabu@temp1\else + \ifx\@sptoken\tabu@temp2\else + 3\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\relax + \expandafter\tabu@get@decimal + \or \expandafter\tabu@skipdecimal + \or \expandafter\tabu@get@decimalspace + \else\expandafter\tabu@printdecimal + \fi +}% \tabu@getdecimal +\def\tabu@printdecimal{% + \edef\tabu@temp{\the\@temptokena}% + \ifx\tabu@temp\@empty\else + \ifx\tabu@temp\space\else + \expandafter\tabu@decimal\expandafter{\the\@temptokena}% + \fi\fi +}% \tabu@printdecimal +%% Verbatim inside X columns ---------------------------------------- +\def\tabu@verbatim{% + \let\verb \tabu@verb + \let\FV@DefineCheckEnd \tabu@FV@DefineCheckEnd +}% \tabu@verbatim +\let\tabu@ltx@verb \verb +\def\tabu@verb{\@ifstar {\tabu@ltx@verb*} \tabu@ltx@verb} +\def\tabu@fancyvrb {% + \def\tabu@FV@DefineCheckEnd ##1{% + \def\tabu@FV@DefineCheckEnd{% + ##1% + \let\FV@CheckEnd \tabu@FV@CheckEnd + \let\FV@@CheckEnd \tabu@FV@@CheckEnd + \let\FV@@@CheckEnd \tabu@FV@@@CheckEnd + \edef\FV@EndScanning{% + \def\noexpand\next{\noexpand\end{\FV@EnvironName}}% + \global\let\noexpand\FV@EnvironName\relax + \noexpand\next}% + \xdef\FV@EnvironName{\detokenize\expandafter{\FV@EnvironName}}}% + }\expandafter\tabu@FV@DefineCheckEnd\expandafter{\FV@DefineCheckEnd} +}% \tabu@fancyvrb +\def\tabu@FV@CheckEnd #1{\expandafter\FV@@CheckEnd \detokenize{#1\end{}}\@nil} +\edef\tabu@FV@@@CheckEnd {\detokenize{\end{}}} +\begingroup +\catcode`\[1 \catcode`\]2 +\@makeother\{ \@makeother\} + \edef\x[\endgroup + \def\noexpand\tabu@FV@@CheckEnd ##1\detokenize[\end{]##2\detokenize[}]##3% + ]\x \@nil{\def\@tempa{#2}\def\@tempb{#3}} +\def\tabu@FV@ListProcessLine #1{% + \hbox {%to \hsize{% + \kern\leftmargin + \hbox {%to \linewidth{% + \FV@LeftListNumber + \FV@LeftListFrame + \FancyVerbFormatLine{#1}\hss +%% DG/SR modification begin - Jan. 28, 1998 (for numbers=right add-on) +%% \FV@RightListFrame}% + \FV@RightListFrame + \FV@RightListNumber}% +%% DG/SR modification end + \hss}} +%% \savetabu -------------------------------------------------------- +\newcommand*\savetabu[1]{\noalign{% + \tabu@sanitizearg{#1}\tabu@temp + \ifx \tabu@temp\@empty \tabu@savewarn{}{The tabu will not be saved}\else + \@ifundefined{tabu@saved@\tabu@temp}{}{\tabu@savewarn{#1}{Overwriting}}% + \ifdefined\tabu@restored \expandafter\let + \csname tabu@saved@\tabu@temp \endcsname \tabu@restored + \else {\tabu@save}% + \fi + \fi}% +}% \savetabu +\def\tabu@save {% + \toks0\expandafter{\tabu@saved@}% + \iftabu@negcoef + \let\tabu@wddef \relax \let\tabu@ \tabu@savewd \edef\tabu@savewd{\tabu@Xcoefs}% + \toks0\expandafter{\the\toks\expandafter0\tabu@savewd}\fi + \toks1\expandafter{\tabu@savedpream}% + \toks2\expandafter{\tabu@savedpreamble}% + \let\@preamble \relax + \let\tabu@savedpream \relax \let\tabu@savedparams \relax + \edef\tabu@preamble{% + \def\noexpand\tabu@aligndefault{\tabu@align}% + \def\tabu@savedparams {\noexpand\the\toks0}% + \def\tabu@savedpream {\noexpand\the\toks1}}% + \edef\tabu@usetabu{% + \def\@preamble {\noexpand\the\toks2}% + \tabu@target \the\tabu@target \relax + \tabucolX \the\tabucolX \relax + \tabu@nbcols \the\tabu@nbcols \relax + \def\noexpand\tabu@aligndefault{\tabu@align}% + \def\tabu@savedparams {\noexpand\the\toks0}% + \def\tabu@savedpream {\noexpand\the\toks1}}% + \let\tabu@aligndefault \relax \let\@sharp \relax + \edef\@tempa{\noexpand\tabu@s@ved + {\tabu@usetabu} + {\tabu@preamble} + {\the\toks1}}\@tempa + \tabu@message@save +}% \tabu@save +\long\def\tabu@s@ved #1#2#3{% + \def\tabu@usetabu{#1}% + \expandafter\gdef\csname tabu@saved@\tabu@temp\endcsname ##1{% + \ifodd ##1% \usetabu + \tabu@measuringfalse \tabu@spreadfalse % Just in case... + \gdef\tabu@usetabu {% + \ifdim \tabu@target>\z@ \tabu@warn@usetabu \fi + \global\let\tabu@usetabu \@undefined + \def\@halignto {to\tabu@target}% + #1% + \ifx \tabu@align\tabu@aligndefault@text + \ifnum \tabu@nested=\z@ + \let\tabu@align \tabu@aligndefault \fi\fi}% + \else % \preamble + \gdef\tabu@preamble {% + \global\let\tabu@preamble \@undefined + #2% + \ifx \tabu@align\tabu@aligndefault@text + \ifnum \tabu@nested=\z@ + \let\tabu@align \tabu@aligndefault \fi\fi}% + \fi + #3}% +}% \tabu@s@ved +\def\tabu@aligndefault@text {\tabu@aligndefault}% +\def\tabu@warn@usetabu {\PackageWarning{tabu} + {Specifying a target with \string\usetabu\space is useless + \MessageBreak The target cannot be changed!}} +\def\tabu@savewd #1#2{\ifdim #2\p@<\z@ \tabu@wddef{#1}{\tabu@wd{#1}}\fi} +\def\tabu@savewarn#1#2{\PackageInfo{tabu} + {User-name `#1' already used for \string\savetabu + \MessageBreak #2}}% +\def\tabu@saveerr#1{\PackageError{tabu} + {User-name `#1' is unknown for \string\usetabu + \MessageBreak I cannot restore an unknown preamble!}\@ehd} +%% \rowfont --------------------------------------------------------- +\newskip \tabu@cellskip +\def\tabu@rowfont{\ifdim \baselineskip=\z@\noalign\fi + {\ifnum0=`}\fi \tabu@row@font} +\newcommand*\tabu@row@font[2][]{% + \ifnum7=\currentgrouptype + \global\let\tabu@@cellleft \tabu@cellleft + \global\let\tabu@@cellright \tabu@cellright + \global\let\tabu@@celllalign \tabu@celllalign + \global\let\tabu@@cellralign \tabu@cellralign + \global\let\tabu@@rowfontreset\tabu@rowfontreset + \fi + \global\let\tabu@rowfontreset \tabu@rowfont@reset + \expandafter\gdef\expandafter\tabu@cellleft\expandafter{\tabu@cellleft #2}% + \ifcsname tabu@cell@#1\endcsname % row alignment + \csname tabu@cell@#1\endcsname \fi + \ifnum0=`{\fi}% end of group / noalign group +}% \rowfont +\def\tabu@ifcolorleavevmode #1{\let\color \tabu@leavevmodecolor #1\let\color\tabu@color}% +\def\tabu@rowfont@reset{% + \global\let\tabu@rowfontreset \tabu@@rowfontreset + \global\let\tabu@cellleft \tabu@@cellleft + \global\let\tabu@cellright \tabu@@cellright + \global\let\tabu@cellfont \@empty + \global\let\tabu@celllalign \tabu@@celllalign + \global\let\tabu@cellralign \tabu@@cellralign +}% \tabu@@rowfontreset +\let\tabu@rowfontreset \@empty % overwritten \AtBeginDocument if colortbl +%% \tabu@prepnext@tok ----------------------------------------------- +\newif \iftabu@cellright +\def\tabu@prepnext@tok{% + \ifnum \count@<\z@ % + \@tempcnta \@M % + \tabu@nbcols\z@ + \let\tabu@fornoopORI \@fornoop + \tabu@cellrightfalse + \else + \ifcase \numexpr \count@-\@tempcnta \relax % (case 0): prev. token is left + \advance \tabu@nbcols \@ne + \iftabu@cellright % before-previous token is right and is finished + \tabu@cellrightfalse % + \tabu@righttok + \fi + \tabu@lefttok + \or % (case 1) previous token is right + \tabu@cellrighttrue \let\@fornoop \tabu@lastnoop + \else % special column: do not change the token + \iftabu@cellright % before-previous token is right + \tabu@cellrightfalse + \tabu@righttok + \fi + \fi % \ifcase + \fi + \tabu@prepnext@tokORI +}% \tabu@prepnext@tok +\long\def\tabu@lastnoop#1\@@#2#3{\tabu@lastn@@p #2\@nextchar \in@\in@@} +\def\tabu@lastn@@p #1\@nextchar #2#3\in@@{% + \ifx \in@#2\else + \let\@fornoop \tabu@fornoopORI + \xdef\tabu@mkpreambuffer{\tabu@nbcols\the\tabu@nbcols \tabu@mkpreambuffer}% + \toks0\expandafter{\expandafter\tabu@everyrowtrue \the\toks0}% + \expandafter\prepnext@tok + \fi +}% \tabu@lastnoop +\def\tabu@righttok{% + \advance \count@ \m@ne + \toks\count@\expandafter {\the\toks\count@ \tabu@cellright \tabu@cellralign}% + \advance \count@ \@ne +}% \tabu@righttok +\def\tabu@lefttok{\toks\count@\expandafter{\expandafter\tabu@celllalign + \the\toks\count@ \tabu@cellleft}% after because of $ +}% \tabu@lefttok +%% Neutralisation of glues ------------------------------------------ +\let\tabu@cellleft \@empty +\let\tabu@cellright \@empty +\tabu@celllalign@def{\tabu@cellleft}% +\let\tabu@cellralign \@empty +\def\tabu@cell@align #1#2#3{% + \let\tabu@maybesiunitx \toks@ \tabu@celllalign + \global \expandafter \tabu@celllalign@def \expandafter {\the\toks@ #1}% + \toks@\expandafter{\tabu@cellralign #2}% + \xdef\tabu@cellralign{\the\toks@}% + \toks@\expandafter{\tabu@cellleft #3}% + \xdef\tabu@cellleft{\the\toks@}% +}% \tabu@cell@align +\def\tabu@cell@l{% force alignment to left + \tabu@cell@align + {\tabu@removehfil \raggedright \tabu@cellleft}% left + {\tabu@flush1\tabu@ignorehfil}% right + \raggedright +}% \tabu@cell@l +\def\tabu@cell@c{% force alignment to center + \tabu@cell@align + {\tabu@removehfil \centering \tabu@flush{.5}\tabu@cellleft} + {\tabu@flush{.5}\tabu@ignorehfil} + \centering +}% \tabu@cell@c +\def\tabu@cell@r{% force alignment to right + \tabu@cell@align + {\tabu@removehfil \raggedleft \tabu@flush1\tabu@cellleft} + \tabu@ignorehfil + \raggedleft +}% \tabu@cell@r +\def\tabu@cell@j{% force justification (for p, m, b columns) + \tabu@cell@align + {\tabu@justify\tabu@cellleft} + {} + \tabu@justify +}% \tabu@cell@j +\def\tabu@justify{% + \leftskip\z@skip \@rightskip\leftskip \rightskip\@rightskip + \parfillskip\@flushglue +}% \tabu@justify +%% ragged2e settings +\def\tabu@cell@L{% force alignment to left (ragged2e) + \tabu@cell@align + {\tabu@removehfil \RaggedRight \tabu@cellleft} + {\tabu@flush 1\tabu@ignorehfil} + \RaggedRight +}% \tabu@cell@L +\def\tabu@cell@C{% force alignment to center (ragged2e) + \tabu@cell@align + {\tabu@removehfil \Centering \tabu@flush{.5}\tabu@cellleft} + {\tabu@flush{.5}\tabu@ignorehfil} + \Centering +}% \tabu@cell@C +\def\tabu@cell@R{% force alignment to right (ragged2e) + \tabu@cell@align + {\tabu@removehfil \RaggedLeft \tabu@flush 1\tabu@cellleft} + \tabu@ignorehfil + \RaggedLeft +}% \tabu@cell@R +\def\tabu@cell@J{% force justification (ragged2e) + \tabu@cell@align + {\justifying \tabu@cellleft} + {} + \justifying +}% \tabu@cell@J +\def\tabu@flush#1{% + \iftabu@colortbl % colortbl uses \hfill rather than \hfil + \hskip \ifnum13<\currentgrouptype \stretch{#1}% + \else \ifdim#1pt<\p@ \tabu@cellskip + \else \stretch{#1} + \fi\fi \relax + \else % array.sty + \ifnum 13<\currentgrouptype + \hfil \hskip1sp \relax \fi + \fi +}% \tabu@flush +\let\tabu@hfil \hfil +\let\tabu@hfill \hfill +\let\tabu@hskip \hskip +\def\tabu@removehfil{% + \iftabu@colortbl + \unkern \tabu@cellskip =\lastskip + \ifnum\gluestretchorder\tabu@cellskip =\tw@ \hskip-\tabu@cellskip + \else \tabu@cellskip \z@skip + \fi + \else + \ifdim\lastskip=1sp\unskip\fi + \ifnum\gluestretchorder\lastskip =\@ne + \hfilneg % \hfilneg for array.sty but not for colortbl... + \fi + \fi +}% \tabu@removehfil +\def\tabu@ignorehfil{\aftergroup \tabu@nohfil} +\def\tabu@nohfil{% \hfil -> do nothing + restore original \hfil + \def\hfil{\let\hfil \tabu@hfil}% local to (alignment template) group +}% \tabu@nohfil +\def\tabu@colortblalignments {% if colortbl + \def\tabu@nohfil{% + \def\hfil {\let\hfil \tabu@hfil}% local to (alignment template) group + \def\hfill {\let\hfill \tabu@hfill}% (colortbl uses \hfill) pfff... + \def\hskip ####1\relax{\let\hskip \tabu@hskip}}% local +}% \tabu@colortblalignments +%% Taking care of footnotes and hyperfootnotes ---------------------- +\long\def\tabu@footnotetext #1{% + \edef\@tempa{\the\tabu@footnotes + \noexpand\footnotetext [\the\csname c@\@mpfn\endcsname]}% + \global\tabu@footnotes\expandafter{\@tempa {#1}}}% +\long\def\tabu@xfootnotetext [#1]#2{% + \global\tabu@footnotes\expandafter{\the\tabu@footnotes + \footnotetext [{#1}]{#2}}} +\let\tabu@xfootnote \@xfootnote +\long\def\tabu@Hy@ftntext{\tabu@Hy@ftntxt {\the \c@footnote }} +\long\def\tabu@Hy@xfootnote [#1]{% + \begingroup + \value\@mpfn #1\relax + \protected@xdef \@thefnmark {\thempfn}% + \endgroup + \@footnotemark \tabu@Hy@ftntxt {#1}% +}% \tabu@Hy@xfootnote +\long\def\tabu@Hy@ftntxt #1#2{% + \edef\@tempa{% + \the\tabu@footnotes + \begingroup + \value\@mpfn #1\relax + \noexpand\protected@xdef\noexpand\@thefnmark {\noexpand\thempfn}% + \expandafter \noexpand \expandafter + \tabu@Hy@footnotetext \expandafter{\Hy@footnote@currentHref}% + }% + \global\tabu@footnotes\expandafter{\@tempa {#2}% + \endgroup}% +}% \tabu@Hy@ftntxt +\long\def\tabu@Hy@footnotetext #1#2{% + \H@@footnotetext{% + \ifHy@nesting + \hyper@@anchor {#1}{#2}% + \else + \Hy@raisedlink{% + \hyper@@anchor {#1}{\relax}% + }% + \def\@currentHref {#1}% + \let\@currentlabelname \@empty + #2% + \fi + }% +}% \tabu@Hy@footnotetext +%% No need for \arraybackslash ! ------------------------------------ +\def\tabu@latextwoe {% +\def\tabu@temp##1##2##3{{\toks@\expandafter{##2##3}\xdef##1{\the\toks@}}} +\tabu@temp \tabu@centering \centering \arraybackslash +\tabu@temp \tabu@raggedleft \raggedleft \arraybackslash +\tabu@temp \tabu@raggedright \raggedright \arraybackslash +}% \tabu@latextwoe +\def\tabu@raggedtwoe {% +\def\tabu@temp ##1##2##3{{\toks@\expandafter{##2##3}\xdef##1{\the\toks@}}} +\tabu@temp \tabu@Centering \Centering \arraybackslash +\tabu@temp \tabu@RaggedLeft \RaggedLeft \arraybackslash +\tabu@temp \tabu@RaggedRight \RaggedRight \arraybackslash +\tabu@temp \tabu@justifying \justifying \arraybackslash +}% \tabu@raggedtwoe +\def\tabu@normalcrbackslash{\let\\\@normalcr} +\def\tabu@trivlist{\expandafter\def\expandafter\@trivlist\expandafter{% + \expandafter\tabu@normalcrbackslash \@trivlist}} +%% Utilities: \fbox \fcolorbox and \tabudecimal ------------------- +\def\tabu@fbox {\leavevmode\afterassignment\tabu@beginfbox \setbox\@tempboxa\hbox} +\def\tabu@beginfbox {\bgroup \kern\fboxsep + \bgroup\aftergroup\tabu@endfbox} +\def\tabu@endfbox {\kern\fboxsep\egroup\egroup + \@frameb@x\relax} +\def\tabu@color@b@x #1#2{\leavevmode \bgroup + \def\tabu@docolor@b@x{#1{#2\color@block{\wd\z@}{\ht\z@}{\dp\z@}\box\z@}}% + \afterassignment\tabu@begincolor@b@x \setbox\z@ \hbox +}% \tabu@color@b@x +\def\tabu@begincolor@b@x {\kern\fboxsep \bgroup + \aftergroup\tabu@endcolor@b@x \set@color} +\def\tabu@endcolor@b@x {\kern\fboxsep \egroup + \dimen@\ht\z@ \advance\dimen@ \fboxsep \ht\z@ \dimen@ + \dimen@\dp\z@ \advance\dimen@ \fboxsep \dp\z@ \dimen@ + \tabu@docolor@b@x \egroup +}% \tabu@endcolor@b@x +%% Corrections (arydshln, delarray, colortbl) ----------------------- +\def\tabu@fix@arrayright {%% \@arrayright is missing from \endarray + \iftabu@colortbl + \ifdefined\adl@array % + \def\tabu@endarray{% + \adl@endarray \egroup \adl@arrayrestore \CT@end \egroup % + \@arrayright % + \gdef\@preamble{}}% + \else % + \def\tabu@endarray{% + \crcr \egroup \egroup % + \@arrayright % + \gdef\@preamble{}\CT@end}% + \fi + \else + \ifdefined\adl@array % + \def\tabu@endarray{% + \adl@endarray \egroup \adl@arrayrestore \egroup % + \@arrayright % + \gdef\@preamble{}}% + \else % + \PackageWarning{tabu} + {\string\@arrayright\space is missing from the + \MessageBreak definition of \string\endarray. + \MessageBreak Compatibility with delarray.sty is broken.}% + \fi\fi +}% \tabu@fix@arrayright +\def\tabu@adl@xarraydashrule #1#2#3{% + \ifnum\@lastchclass=\adl@class@start\else + \ifnum\@lastchclass=\@ne\else + \ifnum\@lastchclass=5 \else % @-arg (class 5) and !-arg (class 1) + \adl@leftrulefalse \fi\fi % must be treated the same + \fi + \ifadl@zwvrule\else \ifadl@inactive\else + \@addtopreamble{\vrule\@width\arrayrulewidth + \@height\z@ \@depth\z@}\fi \fi + \ifadl@leftrule + \@addtopreamble{\adl@vlineL{\CT@arc@}{\adl@dashgapcolor}% + {\number#1}#3}% + \else \@addtopreamble{\adl@vlineR{\CT@arc@}{\adl@dashgapcolor}% + {\number#2}#3} + \fi +}% \tabu@adl@xarraydashrule +\def\tabu@adl@act@endpbox {% + \unskip \ifhmode \nobreak \fi \@finalstrut \@arstrutbox + \egroup \egroup + \adl@colhtdp \box\adl@box \hfil +}% \tabu@adl@act@endpbox +\def\tabu@adl@fix {% + \let\adl@xarraydashrule \tabu@adl@xarraydashrule % arydshln + \let\adl@act@endpbox \tabu@adl@act@endpbox % arydshln + \let\adl@act@@endpbox \tabu@adl@act@endpbox % arydshln + \let\@preamerror \@preamerr % arydshln +}% \tabu@adl@fix +%% Correction for longtable' \@startbox definition ------------------ +%% => \everypar is ``missing'' : TeX should be in vertical mode +\def\tabu@LT@startpbox #1{% + \bgroup + \let\@footnotetext\LT@p@ftntext + \setlength\hsize{#1}% + \@arrayparboxrestore + \everypar{% + \vrule \@height \ht\@arstrutbox \@width \z@ + \everypar{}}% +}% \tabu@LT@startpbox +%% \tracingtabu and the package options ------------------ +\DeclareOption{delarray}{\AtEndOfPackage{\RequirePackage{delarray}}} +\DeclareOption{linegoal}{% + \AtEndOfPackage{% + \RequirePackage{linegoal}[2010/12/07]% + \let\tabudefaulttarget \linegoal% \linegoal is \linewidth if not pdfTeX +}} +\DeclareOption{scantokens}{\tabuscantokenstrue} +\DeclareOption{debugshow}{\AtEndOfPackage{\tracingtabu=\tw@}} +\def\tracingtabu {\begingroup\@ifnextchar=% + {\afterassignment\tabu@tracing\count@} + {\afterassignment\tabu@tracing\count@1\relax}} +\def\tabu@tracing{\expandafter\endgroup + \expandafter\tabu@tr@cing \the\count@ \relax +}% \tabu@tracing +\def\tabu@tr@cing #1\relax {% + \ifnum#1>\thr@@ \let\tabu@tracinglines\message + \else \let\tabu@tracinglines\@gobble + \fi + \ifnum#1>\tw@ \let\tabu@DBG \tabu@@DBG + \def\tabu@mkarstrut {\tabu@DBG@arstrut}% + \tabustrutrule 1.5\p@ + \else \let\tabu@DBG \@gobble + \def\tabu@mkarstrut {\tabu@arstrut}% + \tabustrutrule \z@ + \fi + \ifnum#1>\@ne \let\tabu@debug \message + \else \let\tabu@debug \@gobble + \fi + \ifnum#1>\z@ + \let\tabu@message \message + \let\tabu@tracing@save \tabu@message@save + \let\tabu@starttimer \tabu@pdftimer + \else + \let\tabu@message \@gobble + \let\tabu@tracing@save \@gobble + \let\tabu@starttimer \relax + \fi +}% \tabu@tr@cing +%% Setup \AtBeginDocument +\AtBeginDocument{\tabu@AtBeginDocument} +\def\tabu@AtBeginDocument{\let\tabu@AtBeginDocument \@undefined + \ifdefined\arrayrulecolor \tabu@colortbltrue % + \tabu@colortblalignments % different glues are used + \else \tabu@colortblfalse \fi + \ifdefined\CT@arc@ \else \let\CT@arc@ \relax \fi + \ifdefined\CT@drsc@\else \let\CT@drsc@ \relax \fi + \let\tabu@arc@L \CT@arc@ \let\tabu@drsc@L \CT@drsc@ + \ifodd 1\ifcsname siunitx_table_collect_begin:Nn\endcsname % + \expandafter\ifx + \csname siunitx_table_collect_begin:Nn\endcsname\relax 0\fi\fi\relax + \tabu@siunitxtrue + \else \let\tabu@maybesiunitx \@firstofone % + \let\tabu@siunitx \tabu@nosiunitx + \tabu@siunitxfalse + \fi + \ifdefined\adl@array % + \else \let\tabu@adl@fix \relax + \let\tabu@adl@endtrial \@empty \fi + \ifdefined\longtable % + \else \let\longtabu \tabu@nolongtabu \fi + \ifdefined\cellspacetoplimit \tabu@warn@cellspace\fi + \csname\ifcsname ifHy@hyperfootnotes\endcsname % + ifHy@hyperfootnotes\else iffalse\fi\endcsname + \let\tabu@footnotetext \tabu@Hy@ftntext + \let\tabu@xfootnote \tabu@Hy@xfootnote \fi + \ifdefined\FV@DefineCheckEnd% + \tabu@fancyvrb \fi + \ifdefined\color % + \let\tabu@color \color + \def\tabu@leavevmodecolor ##1{% + \def\tabu@leavevmodecolor {\leavevmode ##1}% + }\expandafter\tabu@leavevmodecolor\expandafter{\color}% + \else + \let\tabu@color \tabu@nocolor + \let\tabu@leavevmodecolor \@firstofone \fi + \tabu@latextwoe + \ifdefined\@raggedtwoe@everyselectfont % + \tabu@raggedtwoe + \else + \let\tabu@cell@L \tabu@cell@l + \let\tabu@cell@R \tabu@cell@r + \let\tabu@cell@C \tabu@cell@c + \let\tabu@cell@J \tabu@cell@j \fi + \expandafter\in@ \expandafter\@arrayright \expandafter{\endarray}% + \ifin@ \let\tabu@endarray \endarray + \else \tabu@fix@arrayright \fi% + \everyrow{}% +}% \tabu@AtBeginDocument +\def\tabu@warn@cellspace{% + \PackageWarning{tabu}{% + Package cellspace has some limitations + \MessageBreak And redefines some macros of array.sty. + \MessageBreak Please use \string\tabulinesep\space to control + \MessageBreak vertical spacing of lines inside tabu environment}% +}% \tabu@warn@cellspace +%% tabu Package initialisation +\tabuscantokensfalse +\let\tabu@arc@G \relax +\let\tabu@drsc@G \relax +\let\tabu@evr@G \@empty +\let\tabu@rc@G \@empty +\def\tabu@ls@G {\tabu@linestyle@}% +\let\tabu@@rowfontreset \@empty % +\let\tabu@@celllalign \@empty +\let\tabu@@cellralign \@empty +\let\tabu@@cellleft \@empty +\let\tabu@@cellright \@empty +\def\tabu@naturalXmin {\z@} +\def\tabu@naturalXmax {\z@} +\let\tabu@rowfontreset \@empty +\def\tabulineon {4pt}\let\tabulineoff \tabulineon +\tabu@everyrowtrue +\ifdefined\pdfelapsedtime % + \def\tabu@pdftimer {\xdef\tabu@starttime{\the\pdfelapsedtime}}% +\else \let\tabu@pdftimer \relax \let\tabu@message@etime \relax +\fi +\tracingtabu=\z@ +\newtabulinestyle {=\maxdimen}% creates the 'factory' settings \tabu@linestyle@ +\tabulinestyle{} +\taburowcolors{} +\let\tabudefaulttarget \linewidth +\ProcessOptions* % \ProcessOptions* is quicker ! +\endinput +%% +%% End of file `tabu.sty'. diff --git a/Doxyfile b/Doxyfile new file mode 100644 index 0000000..12526e4 --- /dev/null +++ b/Doxyfile @@ -0,0 +1,5 @@ +OUTPUT_DIRECTORY = "C:/Users/Medusa/Documents/Work/Personal/OpenShaderDesigner/Documentation/" +INPUT = "C:/Users/Medusa/Documents/Work/Personal/OpenShaderDesigner/README.md" "C:/Users/Medusa/Documents/Work/Personal/OpenShaderDesigner/Include/" "C:/Users/Medusa/Documents/Work/Personal/OpenShaderDesigner/Source/" +RECURSIVE = YES +PROJECT_NAME = "OpenShaderDesigner" +PROJECT_NUMBER = "0.0.1" diff --git a/Doxyfile.in b/Doxyfile.in new file mode 100644 index 0000000..11e23e7 --- /dev/null +++ b/Doxyfile.in @@ -0,0 +1,5 @@ +OUTPUT_DIRECTORY = "@CMAKE_CURRENT_SOURCE_DIR@/Documentation/" +INPUT = "@CMAKE_CURRENT_SOURCE_DIR@/README.md" "@CMAKE_CURRENT_SOURCE_DIR@/Include/" "@CMAKE_CURRENT_SOURCE_DIR@/Source/" +RECURSIVE = YES +PROJECT_NAME = "@CMAKE_PROJECT_NAME@" +PROJECT_NUMBER = "@CMAKE_PROJECT_VERSION@" \ No newline at end of file diff --git a/External/imgui-docking/CMakeLists.txt b/External/imgui-docking/CMakeLists.txt new file mode 100644 index 0000000..9316bf0 --- /dev/null +++ b/External/imgui-docking/CMakeLists.txt @@ -0,0 +1,165 @@ +cmake_minimum_required(VERSION 3.5) + +project(imgui-docking) + + +# Required Source Files +set(IMGUI_SOURCES imgui.cpp imgui_demo.cpp imgui_draw.cpp imgui_tables.cpp imgui_widgets.cpp) +set(IMGUI_HEADERS imconfig.h imgui.h imgui_internal.h imstb_rectpack.h imstb_textedit.h imstb_truetype.h) + +set(IMGUI_DEPENDENCIES) + +# Backends + +# Allegro ============================================================================================================== + +if(IMGUI_BACKEND_ALLEGRO_5) + list(APPEND IMGUI_SOURCES backends/imgui_impl_allegro5.cpp) + list(APPEND IMGUI_HEADERS backends/imgui_impl_allegro5.h) +endif() + + +# Android ============================================================================================================== + +if(IMGUI_BACKEND_ANDROID) + list(APPEND IMGUI_SOURCES backends/imgui_impl_android.cpp) + list(APPEND IMGUI_HEADERS backends/imgui_impl_android.h) +endif() + + +# DirectX ============================================================================================================== + +if(IMGUI_BACKEND_DIRECTX_9) + list(APPEND IMGUI_SOURCES backends/imgui_impl_dx9.cpp) + list(APPEND IMGUI_HEADERS backends/imgui_impl_dx9.h) +endif() + +if(IMGUI_BACKEND_DIRECTX_10) + list(APPEND IMGUI_SOURCES backends/imgui_impl_dx10.cpp) + list(APPEND IMGUI_HEADERS backends/imgui_impl_dx10.h) +endif() + +if(IMGUI_BACKEND_DIRECTX_11) + list(APPEND IMGUI_SOURCES backends/imgui_impl_dx11.cpp) + list(APPEND IMGUI_HEADERS backends/imgui_impl_dx11.h) +endif() + +if(IMGUI_BACKEND_DIRECTX_12) + list(APPEND IMGUI_SOURCES backends/imgui_impl_dx12.cpp) + list(APPEND IMGUI_HEADERS backends/imgui_impl_dx12.h) +endif() + + +# GLFW ================================================================================================================= + +if(IMGUI_BACKEND_GLFW) + find_package(glfw3 REQUIRED) + list(APPEND IMGUI_SOURCES backends/imgui_impl_glfw.cpp) + list(APPEND IMGUI_HEADERS backends/imgui_impl_glfw.h) + list(APPEND IMGUI_DEPENDENCIES glfw) +endif() + + +# GLUT ================================================================================================================= + +if(IMGUI_BACKEND_GLUT) + list(APPEND IMGUI_SOURCES backends/imgui_impl_glut.cpp) + list(APPEND IMGUI_HEADERS backends/imgui_impl_glut.h) +endif() + + +# METAL ================================================================================================================ + +if(IMGUI_BACKEND_METAL) + list(APPEND IMGUI_SOURCES backends/imgui_impl_metal.cpp) + list(APPEND IMGUI_HEADERS backends/imgui_impl_metal.h) +endif() + + +# OPENGL =============================================================================================================== + +if(IMGUI_BACKEND_OPENGL) + find_package(OpenGL REQUIRED COMPONENTS OpenGL) + list(APPEND IMGUI_DEPENDENCIES OpenGL::GL) + list(APPEND IMGUI_SOURCES backends/imgui_impl_opengl3.cpp) + list(APPEND IMGUI_HEADERS backends/imgui_impl_opengl3.h backends/imgui_impl_opengl3_loader.h) +endif() + +if(IMGUI_BACKEND_OPENGL_LEGACY) + find_package(OpenGL REQUIRED COMPONENTS OpenGL) + list(APPEND IMGUI_DEPENDENCIES OpenGL::GL) + list(APPEND IMGUI_SOURCES backends/imgui_impl_opengl2.cpp) + list(APPEND IMGUI_HEADERS backends/imgui_impl_opengl2.h) +endif() + + +# SDL ================================================================================================================== + +if(IMGUI_BACKEND_SDL2) + find_package(SDL2 REQUIRED) + list(APPEND IMGUI_DEPENDENCIES ${SDL2_LIBRARIES}) + list(APPEND IMGUI_SOURCES backends/imgui_impl_sdl2.cpp) + list(APPEND IMGUI_HEADERS backends/imgui_impl_sdl2.h) + + if(IMGUI_BACKEND_SDL_RENDERER) + list(APPEND IMGUI_SOURCES backends/imgui_impl_sdlrenderer2.cpp) + list(APPEND IMGUI_HEADERS backends/imgui_impl_sdlrenderer2.h) + endif () +endif() + +if(IMGUI_BACKEND_SDL3) + find_package(SDL3 REQUIRED) + list(APPEND IMGUI_SOURCES backends/imgui_impl_sdl3.cpp) + list(APPEND IMGUI_HEADERS backends/imgui_impl_sdl3.h) + list(APPEND IMGUI_DEPENDENCIES SDL3) + + if(IMGUI_BACKEND_SDL_RENDERER) + list(APPEND IMGUI_SOURCES backends/imgui_impl_sdlrenderer3.cpp) + list(APPEND IMGUI_HEADERS backends/imgui_impl_sdlrenderer3.h) + endif () +endif() + + +# VULKAN =============================================================================================================== + +if(IMGUI_BACKEND_VULKAN) + list(APPEND IMGUI_SOURCES backends/imgui_impl_vulkan.cpp) + list(APPEND IMGUI_HEADERS backends/imgui_impl_vulkan.h) +endif() + + +# WGPU ================================================================================================================= + +if(IMGUI_BACKEND_WGPU) + list(APPEND IMGUI_SOURCES backends/imgui_impl_wgpu.cpp) + list(APPEND IMGUI_HEADERS backends/imgui_impl_wgpu.h) +endif() + + +# WIN32 ================================================================================================================ + +if(IMGUI_BACKEND_WIN32) + list(APPEND IMGUI_SOURCES backends/imgui_impl_win32.cpp) + list(APPEND IMGUI_HEADERS backends/imgui_impl_win32.h) +endif() + + +# Misc + +if(IMGUI_STDLIB) + list(APPEND IMGUI_SOURCES misc/cpp/imgui_stdlib.cpp) + list(APPEND IMGUI_HEADERS misc/cpp/imgui_stdlib.h) +endif() + +if(IMGUI_FREETYPE) + find_package(Freetype REQUIRED) + list(APPEND IMGUI_DEPENDENCIES Freetype::Freetype) + list(APPEND IMGUI_SOURCES misc/freetype/imgui_freetype.cpp) + list(APPEND IMGUI_HEADERS misc/freetype/imgui_freetype.h) +endif() + +# Library + +include_directories(${CMAKE_CURRENT_SOURCE_DIR}) +add_library(imgui-docking STATIC ${IMGUI_HEADERS} ${IMGUI_SOURCES}) +target_link_libraries(imgui-docking PRIVATE ${IMGUI_DEPENDENCIES}) \ No newline at end of file diff --git a/External/imgui-docking/backends/imgui_impl_glfw.h b/External/imgui-docking/backends/imgui_impl_glfw.h index 6fe6882..e2dca4d 100644 --- a/External/imgui-docking/backends/imgui_impl_glfw.h +++ b/External/imgui-docking/backends/imgui_impl_glfw.h @@ -22,7 +22,7 @@ // - Introduction, links and more at the top of imgui.cpp #pragma once -#include "imgui.h" // IMGUI_IMPL_API +#include "../imgui.h" // IMGUI_IMPL_API #ifndef IMGUI_DISABLE struct GLFWwindow; diff --git a/External/imgui-docking/examples/README.txt b/External/imgui-docking/examples/README.txt new file mode 100644 index 0000000..6db2f3c --- /dev/null +++ b/External/imgui-docking/examples/README.txt @@ -0,0 +1,9 @@ +See BACKENDS and EXAMPLES files in the docs/ folder, or on the web at: https://github.com/ocornut/imgui/tree/master/docs + +Backends = Helper code to facilitate integration with platforms/graphics api (used by Examples + should be used by your app). +Examples = Standalone applications showcasing integration with platforms/graphics api. + +Some Examples have extra README files in their respective directory, please check them too! + +Once Dear ImGui is running (in either examples or your own application/game/engine), +run and refer to ImGui::ShowDemoWindow() in imgui_demo.cpp for the end-user API. diff --git a/External/imgui-docking/examples/example_allegro5/README.md b/External/imgui-docking/examples/example_allegro5/README.md new file mode 100644 index 0000000..4af31f6 --- /dev/null +++ b/External/imgui-docking/examples/example_allegro5/README.md @@ -0,0 +1,36 @@ + +# Configuration + +Dear ImGui outputs 16-bit vertex indices by default. +Allegro doesn't support them natively, so we have two solutions: convert the indices manually in imgui_impl_allegro5.cpp, or compile dear imgui with 32-bit indices. +You can either modify imconfig.h that comes with Dear ImGui (easier), or set a C++ preprocessor option IMGUI_USER_CONFIG to find to a filename. +We are providing `imconfig_allegro5.h` that enables 32-bit indices. +Note that the backend supports _BOTH_ 16-bit and 32-bit indices, but 32-bit indices will be slightly faster as they won't require a manual conversion. + +# How to Build + +### On Ubuntu 14.04+ and macOS + +```bash +g++ -DIMGUI_USER_CONFIG=\"examples/example_allegro5/imconfig_allegro5.h\" -I .. -I ../.. -I ../../backends main.cpp ../../backends/imgui_impl_allegro5.cpp ../../imgui*.cpp -lallegro -lallegro_main -lallegro_primitives -o allegro5_example +``` + +On macOS, install Allegro with homebrew: `brew install allegro`. + +### On Windows with Visual Studio's CLI + +You may install Allegro using vcpkg: +``` +git clone https://github.com/Microsoft/vcpkg +cd vcpkg +bootstrap-vcpkg.bat +vcpkg install allegro5 --triplet=x86-windows ; for win32 +vcpkg install allegro5 --triplet=x64-windows ; for win64 +vcpkg integrate install ; register include / libs in Visual Studio +``` + +Build: +``` +set ALLEGRODIR=path_to_your_allegro5_folder +cl /Zi /MD /utf-8 /I %ALLEGRODIR%\include /DIMGUI_USER_CONFIG=\"examples/example_allegro5/imconfig_allegro5.h\" /I .. /I ..\.. /I ..\..\backends main.cpp ..\..\backends\imgui_impl_allegro5.cpp ..\..\imgui*.cpp /link /LIBPATH:%ALLEGRODIR%\lib allegro-5.0.10-monolith-md.lib user32.lib +``` diff --git a/External/imgui-docking/examples/example_allegro5/example_allegro5.vcxproj b/External/imgui-docking/examples/example_allegro5/example_allegro5.vcxproj new file mode 100644 index 0000000..02f6a47 --- /dev/null +++ b/External/imgui-docking/examples/example_allegro5/example_allegro5.vcxproj @@ -0,0 +1,185 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {73F235B5-7D31-4FC6-8682-DDC5A097B9C1} + example_allegro5 + 8.1 + + + + Application + true + MultiByte + v140 + + + Application + true + MultiByte + v140 + + + Application + false + true + MultiByte + v140 + + + Application + false + true + MultiByte + v140 + + + + + + + + + + + + + + + + + + + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + $(IncludePath) + + + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + $(IncludePath) + + + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + $(IncludePath) + + + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + $(IncludePath) + + + + Level4 + Disabled + ..\..;..\..\backends;%(AdditionalIncludeDirectories) + /utf-8 %(AdditionalOptions) + + + true + %(AdditionalLibraryDirectories) + opengl32.lib;%(AdditionalDependencies) + Console + msvcrt.lib + + + + + Level4 + Disabled + ..\..;..\..\backends;%(AdditionalIncludeDirectories) + /utf-8 %(AdditionalOptions) + + + true + %(AdditionalLibraryDirectories) + opengl32.lib;%(AdditionalDependencies) + Console + msvcrt.lib + + + + + Level4 + MaxSpeed + true + true + ..\..;..\..\backends;%(AdditionalIncludeDirectories) + false + /utf-8 %(AdditionalOptions) + + + true + true + true + %(AdditionalLibraryDirectories) + opengl32.lib;%(AdditionalDependencies) + Console + + + + + + + Level4 + MaxSpeed + true + true + ..\..;..\..\backends;%(AdditionalIncludeDirectories) + false + /utf-8 %(AdditionalOptions) + + + true + true + true + %(AdditionalLibraryDirectories) + opengl32.lib;%(AdditionalDependencies) + Console + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/External/imgui-docking/examples/example_allegro5/example_allegro5.vcxproj.filters b/External/imgui-docking/examples/example_allegro5/example_allegro5.vcxproj.filters new file mode 100644 index 0000000..84881d3 --- /dev/null +++ b/External/imgui-docking/examples/example_allegro5/example_allegro5.vcxproj.filters @@ -0,0 +1,61 @@ + + + + + {20b90ce4-7fcb-4731-b9a0-075f875de82d} + + + {f18ab499-84e1-499f-8eff-9754361e0e52} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + + + imgui + + + imgui + + + imgui + + + sources + + + sources + + + sources + + + imgui + + + imgui + + + + + imgui + + + imgui + + + imgui + + + sources + + + + + + imgui + + + imgui + + + \ No newline at end of file diff --git a/External/imgui-docking/examples/example_allegro5/imconfig_allegro5.h b/External/imgui-docking/examples/example_allegro5/imconfig_allegro5.h new file mode 100644 index 0000000..35afa67 --- /dev/null +++ b/External/imgui-docking/examples/example_allegro5/imconfig_allegro5.h @@ -0,0 +1,11 @@ +//----------------------------------------------------------------------------- +// COMPILE-TIME OPTIONS FOR DEAR IMGUI ALLEGRO 5 EXAMPLE +// See imconfig.h for the full template +// Because Allegro doesn't support 16-bit vertex indices, we enable the compile-time option of imgui to use 32-bit indices +//----------------------------------------------------------------------------- + +#pragma once + +// Use 32-bit vertex indices because Allegro doesn't support 16-bit ones +// This allows us to avoid converting vertices format at runtime +#define ImDrawIdx int diff --git a/External/imgui-docking/examples/example_allegro5/main.cpp b/External/imgui-docking/examples/example_allegro5/main.cpp new file mode 100644 index 0000000..298c845 --- /dev/null +++ b/External/imgui-docking/examples/example_allegro5/main.cpp @@ -0,0 +1,150 @@ +// Dear ImGui: standalone example application for Allegro 5 + +// Learn about Dear ImGui: +// - FAQ https://dearimgui.com/faq +// - Getting Started https://dearimgui.com/getting-started +// - Documentation https://dearimgui.com/docs (same as your local docs/ folder). +// - Introduction, links and more at the top of imgui.cpp + +// On Windows, you can install Allegro5 using vcpkg: +// git clone https://github.com/Microsoft/vcpkg +// cd vcpkg +// bootstrap - vcpkg.bat +// vcpkg install allegro5 --triplet=x86-windows ; for win32 +// vcpkg install allegro5 --triplet=x64-windows ; for win64 +// vcpkg integrate install ; register include and libs in Visual Studio + +#include +#include +#include +#include "imgui.h" +#include "imgui_impl_allegro5.h" + +int main(int, char**) +{ + // Setup Allegro + al_init(); + al_install_keyboard(); + al_install_mouse(); + al_init_primitives_addon(); + al_set_new_display_flags(ALLEGRO_RESIZABLE); + ALLEGRO_DISPLAY* display = al_create_display(1280, 720); + al_set_window_title(display, "Dear ImGui Allegro 5 example"); + ALLEGRO_EVENT_QUEUE* queue = al_create_event_queue(); + al_register_event_source(queue, al_get_display_event_source(display)); + al_register_event_source(queue, al_get_keyboard_event_source()); + al_register_event_source(queue, al_get_mouse_event_source()); + + // Setup Dear ImGui context + IMGUI_CHECKVERSION(); + ImGui::CreateContext(); + ImGuiIO& io = ImGui::GetIO(); (void)io; + io.ConfigFlags |= ImGuiConfigFlags_NavEnableKeyboard; // Enable Keyboard Controls + io.ConfigFlags |= ImGuiConfigFlags_DockingEnable; // Enable Docking + + // Setup Dear ImGui style + ImGui::StyleColorsDark(); + //ImGui::StyleColorsLight(); + + // Setup Platform/Renderer backends + ImGui_ImplAllegro5_Init(display); + + // Load Fonts + // - If no fonts are loaded, dear imgui will use the default font. You can also load multiple fonts and use ImGui::PushFont()/PopFont() to select them. + // - AddFontFromFileTTF() will return the ImFont* so you can store it if you need to select the font among multiple. + // - If the file cannot be loaded, the function will return a nullptr. Please handle those errors in your application (e.g. use an assertion, or display an error and quit). + // - The fonts will be rasterized at a given size (w/ oversampling) and stored into a texture when calling ImFontAtlas::Build()/GetTexDataAsXXXX(), which ImGui_ImplXXXX_NewFrame below will call. + // - Use '#define IMGUI_ENABLE_FREETYPE' in your imconfig file to use Freetype for higher quality font rendering. + // - Read 'docs/FONTS.md' for more instructions and details. + // - Remember that in C/C++ if you want to include a backslash \ in a string literal you need to write a double backslash \\ ! + //io.Fonts->AddFontDefault(); + //io.Fonts->AddFontFromFileTTF("c:\\Windows\\Fonts\\segoeui.ttf", 18.0f); + //io.Fonts->AddFontFromFileTTF("../../misc/fonts/DroidSans.ttf", 16.0f); + //io.Fonts->AddFontFromFileTTF("../../misc/fonts/Roboto-Medium.ttf", 16.0f); + //io.Fonts->AddFontFromFileTTF("../../misc/fonts/Cousine-Regular.ttf", 15.0f); + //ImFont* font = io.Fonts->AddFontFromFileTTF("c:\\Windows\\Fonts\\ArialUni.ttf", 18.0f, nullptr, io.Fonts->GetGlyphRangesJapanese()); + //IM_ASSERT(font != nullptr); + + bool show_demo_window = true; + bool show_another_window = false; + ImVec4 clear_color = ImVec4(0.45f, 0.55f, 0.60f, 1.00f); + + // Main loop + bool running = true; + while (running) + { + // Poll and handle events (inputs, window resize, etc.) + // You can read the io.WantCaptureMouse, io.WantCaptureKeyboard flags to tell if dear imgui wants to use your inputs. + // - When io.WantCaptureMouse is true, do not dispatch mouse input data to your main application, or clear/overwrite your copy of the mouse data. + // - When io.WantCaptureKeyboard is true, do not dispatch keyboard input data to your main application, or clear/overwrite your copy of the keyboard data. + // Generally you may always pass all inputs to dear imgui, and hide them from your application based on those two flags. + ALLEGRO_EVENT ev; + while (al_get_next_event(queue, &ev)) + { + ImGui_ImplAllegro5_ProcessEvent(&ev); + if (ev.type == ALLEGRO_EVENT_DISPLAY_CLOSE) + running = false; + if (ev.type == ALLEGRO_EVENT_DISPLAY_RESIZE) + { + ImGui_ImplAllegro5_InvalidateDeviceObjects(); + al_acknowledge_resize(display); + ImGui_ImplAllegro5_CreateDeviceObjects(); + } + } + + // Start the Dear ImGui frame + ImGui_ImplAllegro5_NewFrame(); + ImGui::NewFrame(); + + // 1. Show the big demo window (Most of the sample code is in ImGui::ShowDemoWindow()! You can browse its code to learn more about Dear ImGui!). + if (show_demo_window) + ImGui::ShowDemoWindow(&show_demo_window); + + // 2. Show a simple window that we create ourselves. We use a Begin/End pair to create a named window. + { + static float f = 0.0f; + static int counter = 0; + + ImGui::Begin("Hello, world!"); // Create a window called "Hello, world!" and append into it. + + ImGui::Text("This is some useful text."); // Display some text (you can use a format strings too) + ImGui::Checkbox("Demo Window", &show_demo_window); // Edit bools storing our window open/close state + ImGui::Checkbox("Another Window", &show_another_window); + + ImGui::SliderFloat("float", &f, 0.0f, 1.0f); // Edit 1 float using a slider from 0.0f to 1.0f + ImGui::ColorEdit3("clear color", (float*)&clear_color); // Edit 3 floats representing a color + + if (ImGui::Button("Button")) // Buttons return true when clicked (most widgets return true when edited/activated) + counter++; + ImGui::SameLine(); + ImGui::Text("counter = %d", counter); + + ImGui::Text("Application average %.3f ms/frame (%.1f FPS)", 1000.0f / io.Framerate, io.Framerate); + ImGui::End(); + } + + // 3. Show another simple window. + if (show_another_window) + { + ImGui::Begin("Another Window", &show_another_window); // Pass a pointer to our bool variable (the window will have a closing button that will clear the bool when clicked) + ImGui::Text("Hello from another window!"); + if (ImGui::Button("Close Me")) + show_another_window = false; + ImGui::End(); + } + + // Rendering + ImGui::Render(); + al_clear_to_color(al_map_rgba_f(clear_color.x * clear_color.w, clear_color.y * clear_color.w, clear_color.z * clear_color.w, clear_color.w)); + ImGui_ImplAllegro5_RenderDrawData(ImGui::GetDrawData()); + al_flip_display(); + } + + // Cleanup + ImGui_ImplAllegro5_Shutdown(); + ImGui::DestroyContext(); + al_destroy_event_queue(queue); + al_destroy_display(display); + + return 0; +} diff --git a/External/imgui-docking/examples/example_android_opengl3/CMakeLists.txt b/External/imgui-docking/examples/example_android_opengl3/CMakeLists.txt new file mode 100644 index 0000000..63531f4 --- /dev/null +++ b/External/imgui-docking/examples/example_android_opengl3/CMakeLists.txt @@ -0,0 +1,40 @@ +cmake_minimum_required(VERSION 3.6) + +project(ImGuiExample) + +set(CMAKE_CXX_STANDARD 11) +set(CMAKE_CXX_STANDARD_REQUIRED ON) +set(CMAKE_CXX_EXTENSIONS OFF) + +add_library(${CMAKE_PROJECT_NAME} SHARED + ${CMAKE_CURRENT_SOURCE_DIR}/main.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/../../imgui.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/../../imgui_demo.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/../../imgui_draw.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/../../imgui_tables.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/../../imgui_widgets.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/../../backends/imgui_impl_android.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/../../backends/imgui_impl_opengl3.cpp + ${ANDROID_NDK}/sources/android/native_app_glue/android_native_app_glue.c +) + +set(CMAKE_SHARED_LINKER_FLAGS + "${CMAKE_SHARED_LINKER_FLAGS} -u ANativeActivity_onCreate" +) + +target_compile_definitions(${CMAKE_PROJECT_NAME} PRIVATE + IMGUI_IMPL_OPENGL_ES3 +) + +target_include_directories(${CMAKE_PROJECT_NAME} PRIVATE + ${CMAKE_CURRENT_SOURCE_DIR}/../.. + ${CMAKE_CURRENT_SOURCE_DIR}/../../backends + ${ANDROID_NDK}/sources/android/native_app_glue +) + +target_link_libraries(${CMAKE_PROJECT_NAME} PRIVATE + android + EGL + GLESv3 + log +) diff --git a/External/imgui-docking/examples/example_android_opengl3/android/.gitignore b/External/imgui-docking/examples/example_android_opengl3/android/.gitignore new file mode 100644 index 0000000..3c7a619 --- /dev/null +++ b/External/imgui-docking/examples/example_android_opengl3/android/.gitignore @@ -0,0 +1,12 @@ +.cxx +.externalNativeBuild +build/ +*.iml + +.idea +.gradle +local.properties + +# Android Studio puts a Gradle wrapper here, that we don't want: +gradle/ +gradlew* diff --git a/External/imgui-docking/examples/example_android_opengl3/android/app/build.gradle b/External/imgui-docking/examples/example_android_opengl3/android/app/build.gradle new file mode 100644 index 0000000..53181ba --- /dev/null +++ b/External/imgui-docking/examples/example_android_opengl3/android/app/build.gradle @@ -0,0 +1,46 @@ +apply plugin: 'com.android.application' +apply plugin: 'kotlin-android' + +android { + compileSdkVersion 33 + buildToolsVersion "33.0.2" + ndkVersion "25.2.9519653" + + defaultConfig { + applicationId "imgui.example.android" + namespace "imgui.example.android" + minSdkVersion 24 + targetSdkVersion 33 + versionCode 1 + versionName "1.0" + } + + buildTypes { + release { + minifyEnabled false + proguardFiles getDefaultProguardFile('proguard-android-optimize.txt') + } + } + + compileOptions { + sourceCompatibility JavaVersion.VERSION_11 + targetCompatibility JavaVersion.VERSION_11 + } + + kotlinOptions { + jvmTarget="11" + } + + externalNativeBuild { + cmake { + path "../../CMakeLists.txt" + version '3.22.1' + } + } +} +repositories { + mavenCentral() +} +dependencies { + implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" +} diff --git a/External/imgui-docking/examples/example_android_opengl3/android/app/src/main/AndroidManifest.xml b/External/imgui-docking/examples/example_android_opengl3/android/app/src/main/AndroidManifest.xml new file mode 100644 index 0000000..a87b95b --- /dev/null +++ b/External/imgui-docking/examples/example_android_opengl3/android/app/src/main/AndroidManifest.xml @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + diff --git a/External/imgui-docking/examples/example_android_opengl3/android/app/src/main/java/MainActivity.kt b/External/imgui-docking/examples/example_android_opengl3/android/app/src/main/java/MainActivity.kt new file mode 100644 index 0000000..896a88c --- /dev/null +++ b/External/imgui-docking/examples/example_android_opengl3/android/app/src/main/java/MainActivity.kt @@ -0,0 +1,40 @@ +package imgui.example.android + +import android.app.NativeActivity +import android.os.Bundle +import android.content.Context +import android.view.inputmethod.InputMethodManager +import android.view.KeyEvent +import java.util.concurrent.LinkedBlockingQueue + +class MainActivity : NativeActivity() { + public override fun onCreate(savedInstanceState: Bundle?) { + super.onCreate(savedInstanceState) + } + + fun showSoftInput() { + val inputMethodManager = getSystemService(Context.INPUT_METHOD_SERVICE) as InputMethodManager + inputMethodManager.showSoftInput(this.window.decorView, 0) + } + + fun hideSoftInput() { + val inputMethodManager = getSystemService(Context.INPUT_METHOD_SERVICE) as InputMethodManager + inputMethodManager.hideSoftInputFromWindow(this.window.decorView.windowToken, 0) + } + + // Queue for the Unicode characters to be polled from native code (via pollUnicodeChar()) + private var unicodeCharacterQueue: LinkedBlockingQueue = LinkedBlockingQueue() + + // We assume dispatchKeyEvent() of the NativeActivity is actually called for every + // KeyEvent and not consumed by any View before it reaches here + override fun dispatchKeyEvent(event: KeyEvent): Boolean { + if (event.action == KeyEvent.ACTION_DOWN) { + unicodeCharacterQueue.offer(event.getUnicodeChar(event.metaState)) + } + return super.dispatchKeyEvent(event) + } + + fun pollUnicodeChar(): Int { + return unicodeCharacterQueue.poll() ?: 0 + } +} diff --git a/External/imgui-docking/examples/example_android_opengl3/android/build.gradle b/External/imgui-docking/examples/example_android_opengl3/android/build.gradle new file mode 100644 index 0000000..ccd2185 --- /dev/null +++ b/External/imgui-docking/examples/example_android_opengl3/android/build.gradle @@ -0,0 +1,24 @@ +buildscript { + ext.kotlin_version = '1.8.0' + repositories { + google() + mavenCentral() + + } + dependencies { + classpath 'com.android.tools.build:gradle:7.4.1' + classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" + + } +} + +allprojects { + repositories { + google() + mavenCentral() + } +} + +task clean(type: Delete) { + delete rootProject.buildDir +} diff --git a/External/imgui-docking/examples/example_android_opengl3/android/settings.gradle b/External/imgui-docking/examples/example_android_opengl3/android/settings.gradle new file mode 100644 index 0000000..e7b4def --- /dev/null +++ b/External/imgui-docking/examples/example_android_opengl3/android/settings.gradle @@ -0,0 +1 @@ +include ':app' diff --git a/External/imgui-docking/examples/example_android_opengl3/main.cpp b/External/imgui-docking/examples/example_android_opengl3/main.cpp new file mode 100644 index 0000000..e0ad5f9 --- /dev/null +++ b/External/imgui-docking/examples/example_android_opengl3/main.cpp @@ -0,0 +1,383 @@ +// dear imgui: standalone example application for Android + OpenGL ES 3 + +// Learn about Dear ImGui: +// - FAQ https://dearimgui.com/faq +// - Getting Started https://dearimgui.com/getting-started +// - Documentation https://dearimgui.com/docs (same as your local docs/ folder). +// - Introduction, links and more at the top of imgui.cpp + +#include "imgui.h" +#include "imgui_impl_android.h" +#include "imgui_impl_opengl3.h" +#include +#include +#include +#include +#include +#include + +// Data +static EGLDisplay g_EglDisplay = EGL_NO_DISPLAY; +static EGLSurface g_EglSurface = EGL_NO_SURFACE; +static EGLContext g_EglContext = EGL_NO_CONTEXT; +static struct android_app* g_App = nullptr; +static bool g_Initialized = false; +static char g_LogTag[] = "ImGuiExample"; +static std::string g_IniFilename = ""; + +// Forward declarations of helper functions +static void Init(struct android_app* app); +static void Shutdown(); +static void MainLoopStep(); +static int ShowSoftKeyboardInput(); +static int PollUnicodeChars(); +static int GetAssetData(const char* filename, void** out_data); + +// Main code +static void handleAppCmd(struct android_app* app, int32_t appCmd) +{ + switch (appCmd) + { + case APP_CMD_SAVE_STATE: + break; + case APP_CMD_INIT_WINDOW: + Init(app); + break; + case APP_CMD_TERM_WINDOW: + Shutdown(); + break; + case APP_CMD_GAINED_FOCUS: + case APP_CMD_LOST_FOCUS: + break; + } +} + +static int32_t handleInputEvent(struct android_app* app, AInputEvent* inputEvent) +{ + return ImGui_ImplAndroid_HandleInputEvent(inputEvent); +} + +void android_main(struct android_app* app) +{ + app->onAppCmd = handleAppCmd; + app->onInputEvent = handleInputEvent; + + while (true) + { + int out_events; + struct android_poll_source* out_data; + + // Poll all events. If the app is not visible, this loop blocks until g_Initialized == true. + while (ALooper_pollAll(g_Initialized ? 0 : -1, nullptr, &out_events, (void**)&out_data) >= 0) + { + // Process one event + if (out_data != nullptr) + out_data->process(app, out_data); + + // Exit the app by returning from within the infinite loop + if (app->destroyRequested != 0) + { + // shutdown() should have been called already while processing the + // app command APP_CMD_TERM_WINDOW. But we play save here + if (!g_Initialized) + Shutdown(); + + return; + } + } + + // Initiate a new frame + MainLoopStep(); + } +} + +void Init(struct android_app* app) +{ + if (g_Initialized) + return; + + g_App = app; + ANativeWindow_acquire(g_App->window); + + // Initialize EGL + // This is mostly boilerplate code for EGL... + { + g_EglDisplay = eglGetDisplay(EGL_DEFAULT_DISPLAY); + if (g_EglDisplay == EGL_NO_DISPLAY) + __android_log_print(ANDROID_LOG_ERROR, g_LogTag, "%s", "eglGetDisplay(EGL_DEFAULT_DISPLAY) returned EGL_NO_DISPLAY"); + + if (eglInitialize(g_EglDisplay, 0, 0) != EGL_TRUE) + __android_log_print(ANDROID_LOG_ERROR, g_LogTag, "%s", "eglInitialize() returned with an error"); + + const EGLint egl_attributes[] = { EGL_BLUE_SIZE, 8, EGL_GREEN_SIZE, 8, EGL_RED_SIZE, 8, EGL_DEPTH_SIZE, 24, EGL_SURFACE_TYPE, EGL_WINDOW_BIT, EGL_NONE }; + EGLint num_configs = 0; + if (eglChooseConfig(g_EglDisplay, egl_attributes, nullptr, 0, &num_configs) != EGL_TRUE) + __android_log_print(ANDROID_LOG_ERROR, g_LogTag, "%s", "eglChooseConfig() returned with an error"); + if (num_configs == 0) + __android_log_print(ANDROID_LOG_ERROR, g_LogTag, "%s", "eglChooseConfig() returned 0 matching config"); + + // Get the first matching config + EGLConfig egl_config; + eglChooseConfig(g_EglDisplay, egl_attributes, &egl_config, 1, &num_configs); + EGLint egl_format; + eglGetConfigAttrib(g_EglDisplay, egl_config, EGL_NATIVE_VISUAL_ID, &egl_format); + ANativeWindow_setBuffersGeometry(g_App->window, 0, 0, egl_format); + + const EGLint egl_context_attributes[] = { EGL_CONTEXT_CLIENT_VERSION, 3, EGL_NONE }; + g_EglContext = eglCreateContext(g_EglDisplay, egl_config, EGL_NO_CONTEXT, egl_context_attributes); + + if (g_EglContext == EGL_NO_CONTEXT) + __android_log_print(ANDROID_LOG_ERROR, g_LogTag, "%s", "eglCreateContext() returned EGL_NO_CONTEXT"); + + g_EglSurface = eglCreateWindowSurface(g_EglDisplay, egl_config, g_App->window, nullptr); + eglMakeCurrent(g_EglDisplay, g_EglSurface, g_EglSurface, g_EglContext); + } + + // Setup Dear ImGui context + IMGUI_CHECKVERSION(); + ImGui::CreateContext(); + ImGuiIO& io = ImGui::GetIO(); + + // Redirect loading/saving of .ini file to our location. + // Make sure 'g_IniFilename' persists while we use Dear ImGui. + g_IniFilename = std::string(app->activity->internalDataPath) + "/imgui.ini"; + io.IniFilename = g_IniFilename.c_str();; + + // Setup Dear ImGui style + ImGui::StyleColorsDark(); + //ImGui::StyleColorsLight(); + + // Setup Platform/Renderer backends + ImGui_ImplAndroid_Init(g_App->window); + ImGui_ImplOpenGL3_Init("#version 300 es"); + + // Load Fonts + // - If no fonts are loaded, dear imgui will use the default font. You can also load multiple fonts and use ImGui::PushFont()/PopFont() to select them. + // - If the file cannot be loaded, the function will return a nullptr. Please handle those errors in your application (e.g. use an assertion, or display an error and quit). + // - The fonts will be rasterized at a given size (w/ oversampling) and stored into a texture when calling ImFontAtlas::Build()/GetTexDataAsXXXX(), which ImGui_ImplXXXX_NewFrame below will call. + // - Read 'docs/FONTS.md' for more instructions and details. + // - Remember that in C/C++ if you want to include a backslash \ in a string literal you need to write a double backslash \\ ! + // - Android: The TTF files have to be placed into the assets/ directory (android/app/src/main/assets), we use our GetAssetData() helper to retrieve them. + + // We load the default font with increased size to improve readability on many devices with "high" DPI. + // FIXME: Put some effort into DPI awareness. + // Important: when calling AddFontFromMemoryTTF(), ownership of font_data is transferred by Dear ImGui by default (deleted is handled by Dear ImGui), unless we set FontDataOwnedByAtlas=false in ImFontConfig + ImFontConfig font_cfg; + font_cfg.SizePixels = 22.0f; + io.Fonts->AddFontDefault(&font_cfg); + //void* font_data; + //int font_data_size; + //ImFont* font; + //font_data_size = GetAssetData("segoeui.ttf", &font_data); + //font = io.Fonts->AddFontFromMemoryTTF(font_data, font_data_size, 16.0f); + //IM_ASSERT(font != nullptr); + //font_data_size = GetAssetData("DroidSans.ttf", &font_data); + //font = io.Fonts->AddFontFromMemoryTTF(font_data, font_data_size, 16.0f); + //IM_ASSERT(font != nullptr); + //font_data_size = GetAssetData("Roboto-Medium.ttf", &font_data); + //font = io.Fonts->AddFontFromMemoryTTF(font_data, font_data_size, 16.0f); + //IM_ASSERT(font != nullptr); + //font_data_size = GetAssetData("Cousine-Regular.ttf", &font_data); + //font = io.Fonts->AddFontFromMemoryTTF(font_data, font_data_size, 15.0f); + //IM_ASSERT(font != nullptr); + //font_data_size = GetAssetData("ArialUni.ttf", &font_data); + //font = io.Fonts->AddFontFromMemoryTTF(font_data, font_data_size, 18.0f, nullptr, io.Fonts->GetGlyphRangesJapanese()); + //IM_ASSERT(font != nullptr); + + // Arbitrary scale-up + // FIXME: Put some effort into DPI awareness + ImGui::GetStyle().ScaleAllSizes(3.0f); + + g_Initialized = true; +} + +void MainLoopStep() +{ + ImGuiIO& io = ImGui::GetIO(); + if (g_EglDisplay == EGL_NO_DISPLAY) + return; + + // Our state + // (we use static, which essentially makes the variable globals, as a convenience to keep the example code easy to follow) + static bool show_demo_window = true; + static bool show_another_window = false; + static ImVec4 clear_color = ImVec4(0.45f, 0.55f, 0.60f, 1.00f); + + // Poll Unicode characters via JNI + // FIXME: do not call this every frame because of JNI overhead + PollUnicodeChars(); + + // Open on-screen (soft) input if requested by Dear ImGui + static bool WantTextInputLast = false; + if (io.WantTextInput && !WantTextInputLast) + ShowSoftKeyboardInput(); + WantTextInputLast = io.WantTextInput; + + // Start the Dear ImGui frame + ImGui_ImplOpenGL3_NewFrame(); + ImGui_ImplAndroid_NewFrame(); + ImGui::NewFrame(); + + // 1. Show the big demo window (Most of the sample code is in ImGui::ShowDemoWindow()! You can browse its code to learn more about Dear ImGui!). + if (show_demo_window) + ImGui::ShowDemoWindow(&show_demo_window); + + // 2. Show a simple window that we create ourselves. We use a Begin/End pair to create a named window. + { + static float f = 0.0f; + static int counter = 0; + + ImGui::Begin("Hello, world!"); // Create a window called "Hello, world!" and append into it. + + ImGui::Text("This is some useful text."); // Display some text (you can use a format strings too) + ImGui::Checkbox("Demo Window", &show_demo_window); // Edit bools storing our window open/close state + ImGui::Checkbox("Another Window", &show_another_window); + + ImGui::SliderFloat("float", &f, 0.0f, 1.0f); // Edit 1 float using a slider from 0.0f to 1.0f + ImGui::ColorEdit3("clear color", (float*)&clear_color); // Edit 3 floats representing a color + + if (ImGui::Button("Button")) // Buttons return true when clicked (most widgets return true when edited/activated) + counter++; + ImGui::SameLine(); + ImGui::Text("counter = %d", counter); + + ImGui::Text("Application average %.3f ms/frame (%.1f FPS)", 1000.0f / io.Framerate, io.Framerate); + ImGui::End(); + } + + // 3. Show another simple window. + if (show_another_window) + { + ImGui::Begin("Another Window", &show_another_window); // Pass a pointer to our bool variable (the window will have a closing button that will clear the bool when clicked) + ImGui::Text("Hello from another window!"); + if (ImGui::Button("Close Me")) + show_another_window = false; + ImGui::End(); + } + + // Rendering + ImGui::Render(); + glViewport(0, 0, (int)io.DisplaySize.x, (int)io.DisplaySize.y); + glClearColor(clear_color.x * clear_color.w, clear_color.y * clear_color.w, clear_color.z * clear_color.w, clear_color.w); + glClear(GL_COLOR_BUFFER_BIT); + ImGui_ImplOpenGL3_RenderDrawData(ImGui::GetDrawData()); + eglSwapBuffers(g_EglDisplay, g_EglSurface); +} + +void Shutdown() +{ + if (!g_Initialized) + return; + + // Cleanup + ImGui_ImplOpenGL3_Shutdown(); + ImGui_ImplAndroid_Shutdown(); + ImGui::DestroyContext(); + + if (g_EglDisplay != EGL_NO_DISPLAY) + { + eglMakeCurrent(g_EglDisplay, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT); + + if (g_EglContext != EGL_NO_CONTEXT) + eglDestroyContext(g_EglDisplay, g_EglContext); + + if (g_EglSurface != EGL_NO_SURFACE) + eglDestroySurface(g_EglDisplay, g_EglSurface); + + eglTerminate(g_EglDisplay); + } + + g_EglDisplay = EGL_NO_DISPLAY; + g_EglContext = EGL_NO_CONTEXT; + g_EglSurface = EGL_NO_SURFACE; + ANativeWindow_release(g_App->window); + + g_Initialized = false; +} + +// Helper functions + +// Unfortunately, there is no way to show the on-screen input from native code. +// Therefore, we call ShowSoftKeyboardInput() of the main activity implemented in MainActivity.kt via JNI. +static int ShowSoftKeyboardInput() +{ + JavaVM* java_vm = g_App->activity->vm; + JNIEnv* java_env = nullptr; + + jint jni_return = java_vm->GetEnv((void**)&java_env, JNI_VERSION_1_6); + if (jni_return == JNI_ERR) + return -1; + + jni_return = java_vm->AttachCurrentThread(&java_env, nullptr); + if (jni_return != JNI_OK) + return -2; + + jclass native_activity_clazz = java_env->GetObjectClass(g_App->activity->clazz); + if (native_activity_clazz == nullptr) + return -3; + + jmethodID method_id = java_env->GetMethodID(native_activity_clazz, "showSoftInput", "()V"); + if (method_id == nullptr) + return -4; + + java_env->CallVoidMethod(g_App->activity->clazz, method_id); + + jni_return = java_vm->DetachCurrentThread(); + if (jni_return != JNI_OK) + return -5; + + return 0; +} + +// Unfortunately, the native KeyEvent implementation has no getUnicodeChar() function. +// Therefore, we implement the processing of KeyEvents in MainActivity.kt and poll +// the resulting Unicode characters here via JNI and send them to Dear ImGui. +static int PollUnicodeChars() +{ + JavaVM* java_vm = g_App->activity->vm; + JNIEnv* java_env = nullptr; + + jint jni_return = java_vm->GetEnv((void**)&java_env, JNI_VERSION_1_6); + if (jni_return == JNI_ERR) + return -1; + + jni_return = java_vm->AttachCurrentThread(&java_env, nullptr); + if (jni_return != JNI_OK) + return -2; + + jclass native_activity_clazz = java_env->GetObjectClass(g_App->activity->clazz); + if (native_activity_clazz == nullptr) + return -3; + + jmethodID method_id = java_env->GetMethodID(native_activity_clazz, "pollUnicodeChar", "()I"); + if (method_id == nullptr) + return -4; + + // Send the actual characters to Dear ImGui + ImGuiIO& io = ImGui::GetIO(); + jint unicode_character; + while ((unicode_character = java_env->CallIntMethod(g_App->activity->clazz, method_id)) != 0) + io.AddInputCharacter(unicode_character); + + jni_return = java_vm->DetachCurrentThread(); + if (jni_return != JNI_OK) + return -5; + + return 0; +} + +// Helper to retrieve data placed into the assets/ directory (android/app/src/main/assets) +static int GetAssetData(const char* filename, void** outData) +{ + int num_bytes = 0; + AAsset* asset_descriptor = AAssetManager_open(g_App->activity->assetManager, filename, AASSET_MODE_BUFFER); + if (asset_descriptor) + { + num_bytes = AAsset_getLength(asset_descriptor); + *outData = IM_ALLOC(num_bytes); + int64_t num_bytes_read = AAsset_read(asset_descriptor, *outData, num_bytes); + AAsset_close(asset_descriptor); + IM_ASSERT(num_bytes_read == num_bytes); + } + return num_bytes; +} diff --git a/External/imgui-docking/examples/example_apple_metal/README.md b/External/imgui-docking/examples/example_apple_metal/README.md new file mode 100644 index 0000000..48a2b57 --- /dev/null +++ b/External/imgui-docking/examples/example_apple_metal/README.md @@ -0,0 +1,10 @@ +# iOS / OSX Metal example + +## Introduction + +This example shows how to integrate Dear ImGui with Metal. It is based on the "cross-platform" game template provided with Xcode as of Xcode 9. + +Consider basing your work off the example_glfw_metal/ or example_sdl2_metal/ examples. They are better supported and will be portable unlike this one. + + + diff --git a/External/imgui-docking/examples/example_apple_metal/example_apple_metal.xcodeproj/project.pbxproj b/External/imgui-docking/examples/example_apple_metal/example_apple_metal.xcodeproj/project.pbxproj new file mode 100644 index 0000000..3ebf9cc --- /dev/null +++ b/External/imgui-docking/examples/example_apple_metal/example_apple_metal.xcodeproj/project.pbxproj @@ -0,0 +1,516 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 48; + objects = { + +/* Begin PBXBuildFile section */ + 050450AB2768052600AB6805 /* imgui_tables.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5079822D257677DB0038A28D /* imgui_tables.cpp */; }; + 050450AD276863B000AB6805 /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 050450AC276863B000AB6805 /* QuartzCore.framework */; }; + 05318E0F274C397200A8DE2E /* GameController.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 05318E0E274C397200A8DE2E /* GameController.framework */; }; + 05A275442773BEA20084EF39 /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 05A275432773BEA20084EF39 /* QuartzCore.framework */; }; + 07A82ED82139413D0078D120 /* imgui_widgets.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 07A82ED72139413C0078D120 /* imgui_widgets.cpp */; }; + 07A82ED92139418F0078D120 /* imgui_widgets.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 07A82ED72139413C0078D120 /* imgui_widgets.cpp */; }; + 5079822E257677DB0038A28D /* imgui_tables.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5079822D257677DB0038A28D /* imgui_tables.cpp */; }; + 8309BD8F253CCAAA0045E2A1 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8309BD8E253CCAAA0045E2A1 /* UIKit.framework */; }; + 8309BDA5253CCC070045E2A1 /* main.mm in Sources */ = {isa = PBXBuildFile; fileRef = 8309BDA0253CCBC10045E2A1 /* main.mm */; }; + 8309BDA8253CCC080045E2A1 /* main.mm in Sources */ = {isa = PBXBuildFile; fileRef = 8309BDA0253CCBC10045E2A1 /* main.mm */; }; + 8309BDBB253CCCAD0045E2A1 /* imgui_impl_metal.mm in Sources */ = {isa = PBXBuildFile; fileRef = 8309BDB5253CCC9D0045E2A1 /* imgui_impl_metal.mm */; }; + 8309BDBE253CCCB60045E2A1 /* imgui_impl_metal.mm in Sources */ = {isa = PBXBuildFile; fileRef = 8309BDB5253CCC9D0045E2A1 /* imgui_impl_metal.mm */; }; + 8309BDBF253CCCB60045E2A1 /* imgui_impl_osx.mm in Sources */ = {isa = PBXBuildFile; fileRef = 8309BDB6253CCC9D0045E2A1 /* imgui_impl_osx.mm */; }; + 8309BDC6253CCCFE0045E2A1 /* AppKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8309BDC5253CCCFE0045E2A1 /* AppKit.framework */; }; + 8309BDFC253CDAB30045E2A1 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 8309BDF7253CDAAE0045E2A1 /* LaunchScreen.storyboard */; }; + 8309BE04253CDAB60045E2A1 /* MainMenu.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 8309BDFA253CDAAE0045E2A1 /* MainMenu.storyboard */; }; + 83BBE9E520EB46B900295997 /* Metal.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 83BBE9E420EB46B900295997 /* Metal.framework */; }; + 83BBE9E720EB46BD00295997 /* MetalKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 83BBE9E620EB46BD00295997 /* MetalKit.framework */; }; + 83BBE9EC20EB471700295997 /* MetalKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 83BBE9EA20EB471700295997 /* MetalKit.framework */; }; + 83BBE9ED20EB471700295997 /* Metal.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 83BBE9EB20EB471700295997 /* Metal.framework */; }; + 83BBEA0520EB54E700295997 /* imgui_draw.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 83BBEA0120EB54E700295997 /* imgui_draw.cpp */; }; + 83BBEA0620EB54E700295997 /* imgui_draw.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 83BBEA0120EB54E700295997 /* imgui_draw.cpp */; }; + 83BBEA0720EB54E700295997 /* imgui_demo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 83BBEA0220EB54E700295997 /* imgui_demo.cpp */; }; + 83BBEA0820EB54E700295997 /* imgui_demo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 83BBEA0220EB54E700295997 /* imgui_demo.cpp */; }; + 83BBEA0920EB54E700295997 /* imgui.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 83BBEA0320EB54E700295997 /* imgui.cpp */; }; + 83BBEA0A20EB54E700295997 /* imgui.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 83BBEA0320EB54E700295997 /* imgui.cpp */; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + 050450AC276863B000AB6805 /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = System/Library/Frameworks/QuartzCore.framework; sourceTree = SDKROOT; }; + 05318E0E274C397200A8DE2E /* GameController.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = GameController.framework; path = System/Library/Frameworks/GameController.framework; sourceTree = SDKROOT; }; + 05A2754027728F5B0084EF39 /* imgui_impl_metal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = imgui_impl_metal.h; path = ../../backends/imgui_impl_metal.h; sourceTree = ""; }; + 05A2754127728F5B0084EF39 /* imgui_impl_osx.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = imgui_impl_osx.h; path = ../../backends/imgui_impl_osx.h; sourceTree = ""; }; + 05A275432773BEA20084EF39 /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS15.2.sdk/System/Library/Frameworks/QuartzCore.framework; sourceTree = DEVELOPER_DIR; }; + 07A82ED62139413C0078D120 /* imgui_internal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = imgui_internal.h; path = ../../imgui_internal.h; sourceTree = ""; }; + 07A82ED72139413C0078D120 /* imgui_widgets.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = imgui_widgets.cpp; path = ../../imgui_widgets.cpp; sourceTree = ""; }; + 5079822D257677DB0038A28D /* imgui_tables.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = imgui_tables.cpp; path = ../../imgui_tables.cpp; sourceTree = ""; }; + 8307E7C420E9F9C900473790 /* example_apple_metal.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = example_apple_metal.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 8307E7DA20E9F9C900473790 /* example_apple_metal.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = example_apple_metal.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 8309BD8E253CCAAA0045E2A1 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.0.sdk/System/Library/Frameworks/UIKit.framework; sourceTree = DEVELOPER_DIR; }; + 8309BDA0253CCBC10045E2A1 /* main.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = main.mm; sourceTree = ""; }; + 8309BDB5253CCC9D0045E2A1 /* imgui_impl_metal.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = imgui_impl_metal.mm; path = ../../backends/imgui_impl_metal.mm; sourceTree = ""; }; + 8309BDB6253CCC9D0045E2A1 /* imgui_impl_osx.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = imgui_impl_osx.mm; path = ../../backends/imgui_impl_osx.mm; sourceTree = ""; }; + 8309BDC5253CCCFE0045E2A1 /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = System/Library/Frameworks/AppKit.framework; sourceTree = SDKROOT; }; + 8309BDF7253CDAAE0045E2A1 /* LaunchScreen.storyboard */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; path = LaunchScreen.storyboard; sourceTree = ""; }; + 8309BDF8253CDAAE0045E2A1 /* Info-iOS.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "Info-iOS.plist"; sourceTree = ""; }; + 8309BDFA253CDAAE0045E2A1 /* MainMenu.storyboard */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; path = MainMenu.storyboard; sourceTree = ""; }; + 8309BDFB253CDAAE0045E2A1 /* Info-macOS.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "Info-macOS.plist"; sourceTree = ""; }; + 83BBE9E420EB46B900295997 /* Metal.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Metal.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.4.sdk/System/Library/Frameworks/Metal.framework; sourceTree = DEVELOPER_DIR; }; + 83BBE9E620EB46BD00295997 /* MetalKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MetalKit.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.4.sdk/System/Library/Frameworks/MetalKit.framework; sourceTree = DEVELOPER_DIR; }; + 83BBE9E820EB46C100295997 /* ModelIO.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = ModelIO.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.4.sdk/System/Library/Frameworks/ModelIO.framework; sourceTree = DEVELOPER_DIR; }; + 83BBE9EA20EB471700295997 /* MetalKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MetalKit.framework; path = System/Library/Frameworks/MetalKit.framework; sourceTree = SDKROOT; }; + 83BBE9EB20EB471700295997 /* Metal.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Metal.framework; path = System/Library/Frameworks/Metal.framework; sourceTree = SDKROOT; }; + 83BBE9EE20EB471C00295997 /* ModelIO.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = ModelIO.framework; path = System/Library/Frameworks/ModelIO.framework; sourceTree = SDKROOT; }; + 83BBEA0020EB54E700295997 /* imgui.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = imgui.h; path = ../../imgui.h; sourceTree = ""; }; + 83BBEA0120EB54E700295997 /* imgui_draw.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = imgui_draw.cpp; path = ../../imgui_draw.cpp; sourceTree = ""; }; + 83BBEA0220EB54E700295997 /* imgui_demo.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = imgui_demo.cpp; path = ../../imgui_demo.cpp; sourceTree = ""; }; + 83BBEA0320EB54E700295997 /* imgui.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = imgui.cpp; path = ../../imgui.cpp; sourceTree = ""; }; + 83BBEA0420EB54E700295997 /* imconfig.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = imconfig.h; path = ../../imconfig.h; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 8307E7C120E9F9C900473790 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 05A275442773BEA20084EF39 /* QuartzCore.framework in Frameworks */, + 8309BD8F253CCAAA0045E2A1 /* UIKit.framework in Frameworks */, + 83BBE9E720EB46BD00295997 /* MetalKit.framework in Frameworks */, + 83BBE9E520EB46B900295997 /* Metal.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 8307E7D720E9F9C900473790 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 050450AD276863B000AB6805 /* QuartzCore.framework in Frameworks */, + 8309BDC6253CCCFE0045E2A1 /* AppKit.framework in Frameworks */, + 83BBE9EC20EB471700295997 /* MetalKit.framework in Frameworks */, + 05318E0F274C397200A8DE2E /* GameController.framework in Frameworks */, + 83BBE9ED20EB471700295997 /* Metal.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 8307E7B520E9F9C700473790 = { + isa = PBXGroup; + children = ( + 83BBE9F020EB544400295997 /* imgui */, + 8309BD9E253CCBA70045E2A1 /* example */, + 8307E7C520E9F9C900473790 /* Products */, + 83BBE9E320EB46B800295997 /* Frameworks */, + ); + sourceTree = ""; + }; + 8307E7C520E9F9C900473790 /* Products */ = { + isa = PBXGroup; + children = ( + 8307E7C420E9F9C900473790 /* example_apple_metal.app */, + 8307E7DA20E9F9C900473790 /* example_apple_metal.app */, + ); + name = Products; + sourceTree = ""; + }; + 8309BD9E253CCBA70045E2A1 /* example */ = { + isa = PBXGroup; + children = ( + 8309BDF6253CDAAE0045E2A1 /* iOS */, + 8309BDF9253CDAAE0045E2A1 /* macOS */, + 8309BDA0253CCBC10045E2A1 /* main.mm */, + ); + name = example; + sourceTree = ""; + }; + 8309BDF6253CDAAE0045E2A1 /* iOS */ = { + isa = PBXGroup; + children = ( + 8309BDF7253CDAAE0045E2A1 /* LaunchScreen.storyboard */, + 8309BDF8253CDAAE0045E2A1 /* Info-iOS.plist */, + ); + path = iOS; + sourceTree = ""; + }; + 8309BDF9253CDAAE0045E2A1 /* macOS */ = { + isa = PBXGroup; + children = ( + 8309BDFA253CDAAE0045E2A1 /* MainMenu.storyboard */, + 8309BDFB253CDAAE0045E2A1 /* Info-macOS.plist */, + ); + path = macOS; + sourceTree = ""; + }; + 83BBE9E320EB46B800295997 /* Frameworks */ = { + isa = PBXGroup; + children = ( + 050450AC276863B000AB6805 /* QuartzCore.framework */, + 05A275432773BEA20084EF39 /* QuartzCore.framework */, + 05318E0E274C397200A8DE2E /* GameController.framework */, + 8309BDC5253CCCFE0045E2A1 /* AppKit.framework */, + 8309BD8E253CCAAA0045E2A1 /* UIKit.framework */, + 83BBE9EE20EB471C00295997 /* ModelIO.framework */, + 83BBE9EB20EB471700295997 /* Metal.framework */, + 83BBE9EA20EB471700295997 /* MetalKit.framework */, + 83BBE9E820EB46C100295997 /* ModelIO.framework */, + 83BBE9E620EB46BD00295997 /* MetalKit.framework */, + 83BBE9E420EB46B900295997 /* Metal.framework */, + ); + name = Frameworks; + sourceTree = ""; + }; + 83BBE9F020EB544400295997 /* imgui */ = { + isa = PBXGroup; + children = ( + 5079822D257677DB0038A28D /* imgui_tables.cpp */, + 05A2754027728F5B0084EF39 /* imgui_impl_metal.h */, + 8309BDB5253CCC9D0045E2A1 /* imgui_impl_metal.mm */, + 05A2754127728F5B0084EF39 /* imgui_impl_osx.h */, + 8309BDB6253CCC9D0045E2A1 /* imgui_impl_osx.mm */, + 83BBEA0420EB54E700295997 /* imconfig.h */, + 83BBEA0320EB54E700295997 /* imgui.cpp */, + 83BBEA0020EB54E700295997 /* imgui.h */, + 83BBEA0220EB54E700295997 /* imgui_demo.cpp */, + 83BBEA0120EB54E700295997 /* imgui_draw.cpp */, + 07A82ED62139413C0078D120 /* imgui_internal.h */, + 07A82ED72139413C0078D120 /* imgui_widgets.cpp */, + ); + name = imgui; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 8307E7C320E9F9C900473790 /* example_apple_metal_ios */ = { + isa = PBXNativeTarget; + buildConfigurationList = 8307E7F020E9F9C900473790 /* Build configuration list for PBXNativeTarget "example_apple_metal_ios" */; + buildPhases = ( + 8307E7C020E9F9C900473790 /* Sources */, + 8307E7C120E9F9C900473790 /* Frameworks */, + 8307E7C220E9F9C900473790 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = example_apple_metal_ios; + productName = "imguiex iOS"; + productReference = 8307E7C420E9F9C900473790 /* example_apple_metal.app */; + productType = "com.apple.product-type.application"; + }; + 8307E7D920E9F9C900473790 /* example_apple_metal_macos */ = { + isa = PBXNativeTarget; + buildConfigurationList = 8307E7F320E9F9C900473790 /* Build configuration list for PBXNativeTarget "example_apple_metal_macos" */; + buildPhases = ( + 8307E7D620E9F9C900473790 /* Sources */, + 8307E7D720E9F9C900473790 /* Frameworks */, + 8307E7D820E9F9C900473790 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = example_apple_metal_macos; + productName = "imguiex macOS"; + productReference = 8307E7DA20E9F9C900473790 /* example_apple_metal.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 8307E7B620E9F9C700473790 /* Project object */ = { + isa = PBXProject; + attributes = { + LastUpgradeCheck = 1200; + ORGANIZATIONNAME = "Warren Moore"; + TargetAttributes = { + 8307E7C320E9F9C900473790 = { + CreatedOnToolsVersion = 9.4.1; + ProvisioningStyle = Automatic; + }; + 8307E7D920E9F9C900473790 = { + CreatedOnToolsVersion = 9.4.1; + ProvisioningStyle = Automatic; + }; + }; + }; + buildConfigurationList = 8307E7B920E9F9C700473790 /* Build configuration list for PBXProject "example_apple_metal" */; + compatibilityVersion = "Xcode 8.0"; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = 8307E7B520E9F9C700473790; + productRefGroup = 8307E7C520E9F9C900473790 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 8307E7C320E9F9C900473790 /* example_apple_metal_ios */, + 8307E7D920E9F9C900473790 /* example_apple_metal_macos */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 8307E7C220E9F9C900473790 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 8309BDFC253CDAB30045E2A1 /* LaunchScreen.storyboard in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 8307E7D820E9F9C900473790 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 8309BE04253CDAB60045E2A1 /* MainMenu.storyboard in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 8307E7C020E9F9C900473790 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 8309BDBB253CCCAD0045E2A1 /* imgui_impl_metal.mm in Sources */, + 83BBEA0920EB54E700295997 /* imgui.cpp in Sources */, + 83BBEA0720EB54E700295997 /* imgui_demo.cpp in Sources */, + 83BBEA0520EB54E700295997 /* imgui_draw.cpp in Sources */, + 5079822E257677DB0038A28D /* imgui_tables.cpp in Sources */, + 07A82ED82139413D0078D120 /* imgui_widgets.cpp in Sources */, + 8309BDA5253CCC070045E2A1 /* main.mm in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 8307E7D620E9F9C900473790 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 8309BDBE253CCCB60045E2A1 /* imgui_impl_metal.mm in Sources */, + 8309BDBF253CCCB60045E2A1 /* imgui_impl_osx.mm in Sources */, + 83BBEA0A20EB54E700295997 /* imgui.cpp in Sources */, + 83BBEA0820EB54E700295997 /* imgui_demo.cpp in Sources */, + 83BBEA0620EB54E700295997 /* imgui_draw.cpp in Sources */, + 050450AB2768052600AB6805 /* imgui_tables.cpp in Sources */, + 07A82ED92139418F0078D120 /* imgui_widgets.cpp in Sources */, + 8309BDA8253CCC080045E2A1 /* main.mm in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin XCBuildConfiguration section */ + 8307E7EE20E9F9C900473790 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + MTL_ENABLE_DEBUG_INFO = YES; + ONLY_ACTIVE_ARCH = YES; + }; + name = Debug; + }; + 8307E7EF20E9F9C900473790 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + MTL_ENABLE_DEBUG_INFO = NO; + }; + name = Release; + }; + 8307E7F120E9F9C900473790 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_IDENTITY = "iPhone Developer"; + CODE_SIGN_STYLE = Automatic; + DEVELOPMENT_TEAM = ""; + INFOPLIST_FILE = "$(SRCROOT)/iOS/Info-iOS.plist"; + IPHONEOS_DEPLOYMENT_TARGET = 10.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = "org.imgui.example.apple-metal-ios"; + PRODUCT_NAME = example_apple_metal; + SDKROOT = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + USER_HEADER_SEARCH_PATHS = "$(SRCROOT)/../../**"; + }; + name = Debug; + }; + 8307E7F220E9F9C900473790 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_IDENTITY = "iPhone Developer"; + CODE_SIGN_STYLE = Automatic; + DEVELOPMENT_TEAM = ""; + INFOPLIST_FILE = "$(SRCROOT)/iOS/Info-iOS.plist"; + IPHONEOS_DEPLOYMENT_TARGET = 10.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = "org.imgui.example.apple-metal-ios"; + PRODUCT_NAME = example_apple_metal; + SDKROOT = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + USER_HEADER_SEARCH_PATHS = "$(SRCROOT)/../../**"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 8307E7F420E9F9C900473790 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_IDENTITY = "-"; + CODE_SIGN_STYLE = Automatic; + COMBINE_HIDPI_IMAGES = YES; + DEVELOPMENT_TEAM = ""; + INFOPLIST_FILE = "$(SRCROOT)/macOS/Info-macOS.plist"; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks"; + MACOSX_DEPLOYMENT_TARGET = 10.12; + PRODUCT_BUNDLE_IDENTIFIER = "org.imgui.example.apple-metal-macos"; + PRODUCT_NAME = example_apple_metal; + SDKROOT = macosx; + USER_HEADER_SEARCH_PATHS = "$(SRCROOT)/../../**"; + }; + name = Debug; + }; + 8307E7F520E9F9C900473790 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_IDENTITY = "-"; + CODE_SIGN_STYLE = Automatic; + COMBINE_HIDPI_IMAGES = YES; + DEVELOPMENT_TEAM = ""; + INFOPLIST_FILE = "$(SRCROOT)/macOS/Info-macOS.plist"; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks"; + MACOSX_DEPLOYMENT_TARGET = 10.12; + PRODUCT_BUNDLE_IDENTIFIER = "org.imgui.example.apple-metal-macos"; + PRODUCT_NAME = example_apple_metal; + SDKROOT = macosx; + USER_HEADER_SEARCH_PATHS = "$(SRCROOT)/../../**"; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 8307E7B920E9F9C700473790 /* Build configuration list for PBXProject "example_apple_metal" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 8307E7EE20E9F9C900473790 /* Debug */, + 8307E7EF20E9F9C900473790 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 8307E7F020E9F9C900473790 /* Build configuration list for PBXNativeTarget "example_apple_metal_ios" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 8307E7F120E9F9C900473790 /* Debug */, + 8307E7F220E9F9C900473790 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 8307E7F320E9F9C900473790 /* Build configuration list for PBXNativeTarget "example_apple_metal_macos" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 8307E7F420E9F9C900473790 /* Debug */, + 8307E7F520E9F9C900473790 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 8307E7B620E9F9C700473790 /* Project object */; +} diff --git a/External/imgui-docking/examples/example_apple_metal/iOS/Info-iOS.plist b/External/imgui-docking/examples/example_apple_metal/iOS/Info-iOS.plist new file mode 100644 index 0000000..93ef078 --- /dev/null +++ b/External/imgui-docking/examples/example_apple_metal/iOS/Info-iOS.plist @@ -0,0 +1,49 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + imgui + CFBundlePackageType + APPL + CFBundleShortVersionString + 1.0 + CFBundleVersion + 1 + LSRequiresIPhoneOS + + UILaunchStoryboardName + LaunchScreen + UIRequiredDeviceCapabilities + + armv7 + metal + + UIRequiresFullScreen + + UIStatusBarHidden + + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + UIInterfaceOrientationPortraitUpsideDown + + UISupportedInterfaceOrientations~ipad + + UIInterfaceOrientationPortrait + UIInterfaceOrientationPortraitUpsideDown + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + + diff --git a/External/imgui-docking/examples/example_apple_metal/iOS/LaunchScreen.storyboard b/External/imgui-docking/examples/example_apple_metal/iOS/LaunchScreen.storyboard new file mode 100644 index 0000000..12c52cf --- /dev/null +++ b/External/imgui-docking/examples/example_apple_metal/iOS/LaunchScreen.storyboard @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/External/imgui-docking/examples/example_apple_metal/macOS/Info-macOS.plist b/External/imgui-docking/examples/example_apple_metal/macOS/Info-macOS.plist new file mode 100644 index 0000000..6f4a2b2 --- /dev/null +++ b/External/imgui-docking/examples/example_apple_metal/macOS/Info-macOS.plist @@ -0,0 +1,30 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIconFile + + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + imgui + CFBundlePackageType + APPL + CFBundleShortVersionString + 1.0 + CFBundleVersion + 1 + LSMinimumSystemVersion + $(MACOSX_DEPLOYMENT_TARGET) + NSMainStoryboardFile + MainMenu + NSPrincipalClass + NSApplication + + diff --git a/External/imgui-docking/examples/example_apple_metal/macOS/MainMenu.storyboard b/External/imgui-docking/examples/example_apple_metal/macOS/MainMenu.storyboard new file mode 100644 index 0000000..38ad432 --- /dev/null +++ b/External/imgui-docking/examples/example_apple_metal/macOS/MainMenu.storyboard @@ -0,0 +1,93 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/External/imgui-docking/examples/example_apple_metal/main.mm b/External/imgui-docking/examples/example_apple_metal/main.mm new file mode 100644 index 0000000..d184dd6 --- /dev/null +++ b/External/imgui-docking/examples/example_apple_metal/main.mm @@ -0,0 +1,354 @@ +// Dear ImGui: standalone example application for OSX + Metal. + +// Learn about Dear ImGui: +// - FAQ https://dearimgui.com/faq +// - Getting Started https://dearimgui.com/getting-started +// - Documentation https://dearimgui.com/docs (same as your local docs/ folder). +// - Introduction, links and more at the top of imgui.cpp + +#import + +#if TARGET_OS_OSX +#import +#else +#import +#endif + +#import +#import + +#include "imgui.h" +#include "imgui_impl_metal.h" +#if TARGET_OS_OSX +#include "imgui_impl_osx.h" +@interface AppViewController : NSViewController +@end +#else +@interface AppViewController : UIViewController +@end +#endif + +@interface AppViewController () +@property (nonatomic, readonly) MTKView *mtkView; +@property (nonatomic, strong) id device; +@property (nonatomic, strong) id commandQueue; +@end + +//----------------------------------------------------------------------------------- +// AppViewController +//----------------------------------------------------------------------------------- + +@implementation AppViewController + +-(instancetype)initWithNibName:(nullable NSString *)nibNameOrNil bundle:(nullable NSBundle *)nibBundleOrNil +{ + self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]; + + _device = MTLCreateSystemDefaultDevice(); + _commandQueue = [_device newCommandQueue]; + + if (!self.device) + { + NSLog(@"Metal is not supported"); + abort(); + } + + // Setup Dear ImGui context + // FIXME: This example doesn't have proper cleanup... + IMGUI_CHECKVERSION(); + ImGui::CreateContext(); + ImGuiIO& io = ImGui::GetIO(); (void)io; + io.ConfigFlags |= ImGuiConfigFlags_NavEnableKeyboard; // Enable Keyboard Controls + io.ConfigFlags |= ImGuiConfigFlags_NavEnableGamepad; // Enable Gamepad Controls + io.ConfigFlags |= ImGuiConfigFlags_DockingEnable; // Enable Docking + io.ConfigFlags |= ImGuiConfigFlags_ViewportsEnable; // Enable Multi-Viewport / Platform Windows + + // Setup Dear ImGui style + ImGui::StyleColorsDark(); + //ImGui::StyleColorsLight(); + + // When viewports are enabled we tweak WindowRounding/WindowBg so platform windows can look identical to regular ones. + ImGuiStyle& style = ImGui::GetStyle(); + if (io.ConfigFlags & ImGuiConfigFlags_ViewportsEnable) + { + style.WindowRounding = 0.0f; + style.Colors[ImGuiCol_WindowBg].w = 1.0f; + } + + // Setup Renderer backend + ImGui_ImplMetal_Init(_device); + + // Load Fonts + // - If no fonts are loaded, dear imgui will use the default font. You can also load multiple fonts and use ImGui::PushFont()/PopFont() to select them. + // - AddFontFromFileTTF() will return the ImFont* so you can store it if you need to select the font among multiple. + // - If the file cannot be loaded, the function will return a nullptr. Please handle those errors in your application (e.g. use an assertion, or display an error and quit). + // - The fonts will be rasterized at a given size (w/ oversampling) and stored into a texture when calling ImFontAtlas::Build()/GetTexDataAsXXXX(), which ImGui_ImplXXXX_NewFrame below will call. + // - Use '#define IMGUI_ENABLE_FREETYPE' in your imconfig file to use Freetype for higher quality font rendering. + // - Read 'docs/FONTS.md' for more instructions and details. + // - Remember that in C/C++ if you want to include a backslash \ in a string literal you need to write a double backslash \\ ! + //io.Fonts->AddFontDefault(); + //io.Fonts->AddFontFromFileTTF("c:\\Windows\\Fonts\\segoeui.ttf", 18.0f); + //io.Fonts->AddFontFromFileTTF("../../misc/fonts/DroidSans.ttf", 16.0f); + //io.Fonts->AddFontFromFileTTF("../../misc/fonts/Roboto-Medium.ttf", 16.0f); + //io.Fonts->AddFontFromFileTTF("../../misc/fonts/Cousine-Regular.ttf", 15.0f); + //ImFont* font = io.Fonts->AddFontFromFileTTF("c:\\Windows\\Fonts\\ArialUni.ttf", 18.0f, nullptr, io.Fonts->GetGlyphRangesJapanese()); + //IM_ASSERT(font != nullptr); + + return self; +} + +-(MTKView *)mtkView +{ + return (MTKView *)self.view; +} + +-(void)loadView +{ + self.view = [[MTKView alloc] initWithFrame:CGRectMake(0, 0, 1200, 720)]; +} + +-(void)viewDidLoad +{ + [super viewDidLoad]; + + self.mtkView.device = self.device; + self.mtkView.delegate = self; + +#if TARGET_OS_OSX + ImGui_ImplOSX_Init(self.view); + [NSApp activateIgnoringOtherApps:YES]; +#endif +} + +-(void)drawInMTKView:(MTKView*)view +{ + ImGuiIO& io = ImGui::GetIO(); + io.DisplaySize.x = view.bounds.size.width; + io.DisplaySize.y = view.bounds.size.height; + +#if TARGET_OS_OSX + CGFloat framebufferScale = view.window.screen.backingScaleFactor ?: NSScreen.mainScreen.backingScaleFactor; +#else + CGFloat framebufferScale = view.window.screen.scale ?: UIScreen.mainScreen.scale; +#endif + io.DisplayFramebufferScale = ImVec2(framebufferScale, framebufferScale); + + id commandBuffer = [self.commandQueue commandBuffer]; + + MTLRenderPassDescriptor* renderPassDescriptor = view.currentRenderPassDescriptor; + if (renderPassDescriptor == nil) + { + [commandBuffer commit]; + return; + } + + // Start the Dear ImGui frame + ImGui_ImplMetal_NewFrame(renderPassDescriptor); +#if TARGET_OS_OSX + ImGui_ImplOSX_NewFrame(view); +#endif + ImGui::NewFrame(); + + // Our state (make them static = more or less global) as a convenience to keep the example terse. + static bool show_demo_window = true; + static bool show_another_window = false; + static ImVec4 clear_color = ImVec4(0.45f, 0.55f, 0.60f, 1.00f); + + // 1. Show the big demo window (Most of the sample code is in ImGui::ShowDemoWindow()! You can browse its code to learn more about Dear ImGui!). + if (show_demo_window) + ImGui::ShowDemoWindow(&show_demo_window); + + // 2. Show a simple window that we create ourselves. We use a Begin/End pair to create a named window. + { + static float f = 0.0f; + static int counter = 0; + + ImGui::Begin("Hello, world!"); // Create a window called "Hello, world!" and append into it. + + ImGui::Text("This is some useful text."); // Display some text (you can use a format strings too) + ImGui::Checkbox("Demo Window", &show_demo_window); // Edit bools storing our window open/close state + ImGui::Checkbox("Another Window", &show_another_window); + + ImGui::SliderFloat("float", &f, 0.0f, 1.0f); // Edit 1 float using a slider from 0.0f to 1.0f + ImGui::ColorEdit3("clear color", (float*)&clear_color); // Edit 3 floats representing a color + + if (ImGui::Button("Button")) // Buttons return true when clicked (most widgets return true when edited/activated) + counter++; + ImGui::SameLine(); + ImGui::Text("counter = %d", counter); + + ImGui::Text("Application average %.3f ms/frame (%.1f FPS)", 1000.0f / io.Framerate, io.Framerate); + ImGui::End(); + } + + // 3. Show another simple window. + if (show_another_window) + { + ImGui::Begin("Another Window", &show_another_window); // Pass a pointer to our bool variable (the window will have a closing button that will clear the bool when clicked) + ImGui::Text("Hello from another window!"); + if (ImGui::Button("Close Me")) + show_another_window = false; + ImGui::End(); + } + + // Rendering + ImGui::Render(); + ImDrawData* draw_data = ImGui::GetDrawData(); + + renderPassDescriptor.colorAttachments[0].clearColor = MTLClearColorMake(clear_color.x * clear_color.w, clear_color.y * clear_color.w, clear_color.z * clear_color.w, clear_color.w); + id renderEncoder = [commandBuffer renderCommandEncoderWithDescriptor:renderPassDescriptor]; + [renderEncoder pushDebugGroup:@"Dear ImGui rendering"]; + ImGui_ImplMetal_RenderDrawData(draw_data, commandBuffer, renderEncoder); + [renderEncoder popDebugGroup]; + [renderEncoder endEncoding]; + + // Present + [commandBuffer presentDrawable:view.currentDrawable]; + [commandBuffer commit]; + + // Update and Render additional Platform Windows + if (io.ConfigFlags & ImGuiConfigFlags_ViewportsEnable) + { + ImGui::UpdatePlatformWindows(); + ImGui::RenderPlatformWindowsDefault(); + } +} + +-(void)mtkView:(MTKView*)view drawableSizeWillChange:(CGSize)size +{ +} + +//----------------------------------------------------------------------------------- +// Input processing +//----------------------------------------------------------------------------------- + +#if TARGET_OS_OSX + +- (void)viewWillAppear +{ + [super viewWillAppear]; + self.view.window.delegate = self; +} + +- (void)windowWillClose:(NSNotification *)notification +{ + ImGui_ImplMetal_Shutdown(); + ImGui_ImplOSX_Shutdown(); + ImGui::DestroyContext(); +} + +#else + +// This touch mapping is super cheesy/hacky. We treat any touch on the screen +// as if it were a depressed left mouse button, and we don't bother handling +// multitouch correctly at all. This causes the "cursor" to behave very erratically +// when there are multiple active touches. But for demo purposes, single-touch +// interaction actually works surprisingly well. +-(void)updateIOWithTouchEvent:(UIEvent *)event +{ + UITouch *anyTouch = event.allTouches.anyObject; + CGPoint touchLocation = [anyTouch locationInView:self.view]; + ImGuiIO &io = ImGui::GetIO(); + io.AddMouseSourceEvent(ImGuiMouseSource_TouchScreen); + io.AddMousePosEvent(touchLocation.x, touchLocation.y); + + BOOL hasActiveTouch = NO; + for (UITouch *touch in event.allTouches) + { + if (touch.phase != UITouchPhaseEnded && touch.phase != UITouchPhaseCancelled) + { + hasActiveTouch = YES; + break; + } + } + io.AddMouseButtonEvent(0, hasActiveTouch); +} + +-(void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event { [self updateIOWithTouchEvent:event]; } +-(void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event { [self updateIOWithTouchEvent:event]; } +-(void)touchesCancelled:(NSSet *)touches withEvent:(UIEvent *)event { [self updateIOWithTouchEvent:event]; } +-(void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event { [self updateIOWithTouchEvent:event]; } + +#endif + +@end + +//----------------------------------------------------------------------------------- +// AppDelegate +//----------------------------------------------------------------------------------- + +#if TARGET_OS_OSX + +@interface AppDelegate : NSObject +@property (nonatomic, strong) NSWindow *window; +@end + +@implementation AppDelegate + +-(BOOL)applicationShouldTerminateAfterLastWindowClosed:(NSApplication *)sender +{ + return YES; +} + +-(instancetype)init +{ + if (self = [super init]) + { + NSViewController *rootViewController = [[AppViewController alloc] initWithNibName:nil bundle:nil]; + self.window = [[NSWindow alloc] initWithContentRect:NSZeroRect + styleMask:NSWindowStyleMaskTitled | NSWindowStyleMaskClosable | NSWindowStyleMaskResizable | NSWindowStyleMaskMiniaturizable + backing:NSBackingStoreBuffered + defer:NO]; + self.window.contentViewController = rootViewController; + [self.window center]; + [self.window makeKeyAndOrderFront:self]; + } + return self; +} + +@end + +#else + +@interface AppDelegate : UIResponder +@property (strong, nonatomic) UIWindow *window; +@end + +@implementation AppDelegate + +-(BOOL)application:(UIApplication *)application + didFinishLaunchingWithOptions:(NSDictionary *)launchOptions +{ + UIViewController *rootViewController = [[AppViewController alloc] init]; + self.window = [[UIWindow alloc] initWithFrame:UIScreen.mainScreen.bounds]; + self.window.rootViewController = rootViewController; + [self.window makeKeyAndVisible]; + return YES; +} + +@end + +#endif + +//----------------------------------------------------------------------------------- +// Application main() function +//----------------------------------------------------------------------------------- + +#if TARGET_OS_OSX + +int main(int argc, const char * argv[]) +{ + return NSApplicationMain(argc, argv); +} + +#else + +int main(int argc, char * argv[]) +{ + @autoreleasepool + { + return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); + } +} + +#endif diff --git a/External/imgui-docking/examples/example_apple_opengl2/example_apple_opengl2.xcodeproj/project.pbxproj b/External/imgui-docking/examples/example_apple_opengl2/example_apple_opengl2.xcodeproj/project.pbxproj new file mode 100644 index 0000000..a168373 --- /dev/null +++ b/External/imgui-docking/examples/example_apple_opengl2/example_apple_opengl2.xcodeproj/project.pbxproj @@ -0,0 +1,332 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 48; + objects = { + +/* Begin PBXBuildFile section */ + 05E31B59274EF0700083FCB6 /* GameController.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 05E31B57274EF0360083FCB6 /* GameController.framework */; }; + 07A82EDB213941D00078D120 /* imgui_widgets.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 07A82EDA213941D00078D120 /* imgui_widgets.cpp */; }; + 4080A99820B02D340036BA46 /* main.mm in Sources */ = {isa = PBXBuildFile; fileRef = 4080A98A20B02CD90036BA46 /* main.mm */; }; + 4080A9A220B034280036BA46 /* imgui_impl_opengl2.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4080A99E20B034280036BA46 /* imgui_impl_opengl2.cpp */; }; + 4080A9AD20B0343C0036BA46 /* imgui_demo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4080A9A620B0343C0036BA46 /* imgui_demo.cpp */; }; + 4080A9AE20B0343C0036BA46 /* imgui.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4080A9A720B0343C0036BA46 /* imgui.cpp */; }; + 4080A9AF20B0343C0036BA46 /* imgui_draw.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4080A9AA20B0343C0036BA46 /* imgui_draw.cpp */; }; + 4080A9B020B0347A0036BA46 /* imgui_impl_osx.mm in Sources */ = {isa = PBXBuildFile; fileRef = 4080A99F20B034280036BA46 /* imgui_impl_osx.mm */; }; + 4080A9B320B034E40036BA46 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4080A9B220B034E40036BA46 /* Cocoa.framework */; }; + 4080A9B520B034EA0036BA46 /* OpenGL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4080A9B420B034EA0036BA46 /* OpenGL.framework */; }; + 50798230257677FD0038A28D /* imgui_tables.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5079822F257677FC0038A28D /* imgui_tables.cpp */; }; +/* End PBXBuildFile section */ + +/* Begin PBXCopyFilesBuildPhase section */ + 4080A96920B029B00036BA46 /* CopyFiles */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = /usr/share/man/man1/; + dstSubfolderSpec = 0; + files = ( + ); + runOnlyForDeploymentPostprocessing = 1; + }; +/* End PBXCopyFilesBuildPhase section */ + +/* Begin PBXFileReference section */ + 05E31B57274EF0360083FCB6 /* GameController.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = GameController.framework; path = System/Library/Frameworks/GameController.framework; sourceTree = SDKROOT; }; + 07A82EDA213941D00078D120 /* imgui_widgets.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = imgui_widgets.cpp; path = ../../imgui_widgets.cpp; sourceTree = ""; }; + 4080A96B20B029B00036BA46 /* example_osx_opengl2 */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = example_osx_opengl2; sourceTree = BUILT_PRODUCTS_DIR; }; + 4080A98A20B02CD90036BA46 /* main.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = main.mm; sourceTree = SOURCE_ROOT; }; + 4080A99E20B034280036BA46 /* imgui_impl_opengl2.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = imgui_impl_opengl2.cpp; path = ../../backends/imgui_impl_opengl2.cpp; sourceTree = ""; }; + 4080A99F20B034280036BA46 /* imgui_impl_osx.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = imgui_impl_osx.mm; path = ../../backends/imgui_impl_osx.mm; sourceTree = ""; }; + 4080A9A020B034280036BA46 /* imgui_impl_opengl2.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = imgui_impl_opengl2.h; path = ../../backends/imgui_impl_opengl2.h; sourceTree = ""; }; + 4080A9A120B034280036BA46 /* imgui_impl_osx.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = imgui_impl_osx.h; path = ../../backends/imgui_impl_osx.h; sourceTree = ""; }; + 4080A9A520B0343C0036BA46 /* imgui_internal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = imgui_internal.h; path = ../../imgui_internal.h; sourceTree = ""; }; + 4080A9A620B0343C0036BA46 /* imgui_demo.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = imgui_demo.cpp; path = ../../imgui_demo.cpp; sourceTree = ""; }; + 4080A9A720B0343C0036BA46 /* imgui.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = imgui.cpp; path = ../../imgui.cpp; sourceTree = ""; }; + 4080A9A820B0343C0036BA46 /* imgui.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = imgui.h; path = ../../imgui.h; sourceTree = ""; }; + 4080A9AA20B0343C0036BA46 /* imgui_draw.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = imgui_draw.cpp; path = ../../imgui_draw.cpp; sourceTree = ""; }; + 4080A9AC20B0343C0036BA46 /* imconfig.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = imconfig.h; path = ../../imconfig.h; sourceTree = ""; }; + 4080A9B220B034E40036BA46 /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = System/Library/Frameworks/Cocoa.framework; sourceTree = SDKROOT; }; + 4080A9B420B034EA0036BA46 /* OpenGL.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenGL.framework; path = System/Library/Frameworks/OpenGL.framework; sourceTree = SDKROOT; }; + 5079822F257677FC0038A28D /* imgui_tables.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = imgui_tables.cpp; path = ../../imgui_tables.cpp; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 4080A96820B029B00036BA46 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 4080A9B520B034EA0036BA46 /* OpenGL.framework in Frameworks */, + 4080A9B320B034E40036BA46 /* Cocoa.framework in Frameworks */, + 05E31B59274EF0700083FCB6 /* GameController.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 4080A96220B029B00036BA46 = { + isa = PBXGroup; + children = ( + 5079822F257677FC0038A28D /* imgui_tables.cpp */, + 4080A9AC20B0343C0036BA46 /* imconfig.h */, + 4080A9A720B0343C0036BA46 /* imgui.cpp */, + 4080A9A820B0343C0036BA46 /* imgui.h */, + 07A82EDA213941D00078D120 /* imgui_widgets.cpp */, + 4080A9A620B0343C0036BA46 /* imgui_demo.cpp */, + 4080A9AA20B0343C0036BA46 /* imgui_draw.cpp */, + 4080A9A520B0343C0036BA46 /* imgui_internal.h */, + 4080A99E20B034280036BA46 /* imgui_impl_opengl2.cpp */, + 4080A9A020B034280036BA46 /* imgui_impl_opengl2.h */, + 4080A9A120B034280036BA46 /* imgui_impl_osx.h */, + 4080A99F20B034280036BA46 /* imgui_impl_osx.mm */, + 4080A98A20B02CD90036BA46 /* main.mm */, + 4080A96C20B029B00036BA46 /* Products */, + 4080A9B120B034E40036BA46 /* Frameworks */, + ); + sourceTree = ""; + }; + 4080A96C20B029B00036BA46 /* Products */ = { + isa = PBXGroup; + children = ( + 4080A96B20B029B00036BA46 /* example_osx_opengl2 */, + ); + name = Products; + sourceTree = ""; + }; + 4080A9B120B034E40036BA46 /* Frameworks */ = { + isa = PBXGroup; + children = ( + 05E31B57274EF0360083FCB6 /* GameController.framework */, + 4080A9B420B034EA0036BA46 /* OpenGL.framework */, + 4080A9B220B034E40036BA46 /* Cocoa.framework */, + ); + name = Frameworks; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 4080A96A20B029B00036BA46 /* example_osx_opengl2 */ = { + isa = PBXNativeTarget; + buildConfigurationList = 4080A97220B029B00036BA46 /* Build configuration list for PBXNativeTarget "example_osx_opengl2" */; + buildPhases = ( + 4080A96720B029B00036BA46 /* Sources */, + 4080A96820B029B00036BA46 /* Frameworks */, + 4080A96920B029B00036BA46 /* CopyFiles */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = example_osx_opengl2; + productName = example_osx_opengl2; + productReference = 4080A96B20B029B00036BA46 /* example_osx_opengl2 */; + productType = "com.apple.product-type.tool"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 4080A96320B029B00036BA46 /* Project object */ = { + isa = PBXProject; + attributes = { + LastUpgradeCheck = 0930; + ORGANIZATIONNAME = ImGui; + TargetAttributes = { + 4080A96A20B029B00036BA46 = { + CreatedOnToolsVersion = 9.3.1; + ProvisioningStyle = Automatic; + }; + }; + }; + buildConfigurationList = 4080A96620B029B00036BA46 /* Build configuration list for PBXProject "example_apple_opengl2" */; + compatibilityVersion = "Xcode 8.0"; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + ); + mainGroup = 4080A96220B029B00036BA46; + productRefGroup = 4080A96C20B029B00036BA46 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 4080A96A20B029B00036BA46 /* example_osx_opengl2 */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXSourcesBuildPhase section */ + 4080A96720B029B00036BA46 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 4080A99820B02D340036BA46 /* main.mm in Sources */, + 4080A9AD20B0343C0036BA46 /* imgui_demo.cpp in Sources */, + 4080A9AF20B0343C0036BA46 /* imgui_draw.cpp in Sources */, + 4080A9A220B034280036BA46 /* imgui_impl_opengl2.cpp in Sources */, + 4080A9B020B0347A0036BA46 /* imgui_impl_osx.mm in Sources */, + 4080A9AE20B0343C0036BA46 /* imgui.cpp in Sources */, + 50798230257677FD0038A28D /* imgui_tables.cpp in Sources */, + 07A82EDB213941D00078D120 /* imgui_widgets.cpp in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin XCBuildConfiguration section */ + 4080A97020B029B00036BA46 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + CODE_SIGN_IDENTITY = "-"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + MACOSX_DEPLOYMENT_TARGET = 10.13; + MTL_ENABLE_DEBUG_INFO = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = macosx; + }; + name = Debug; + }; + 4080A97120B029B00036BA46 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + CODE_SIGN_IDENTITY = "-"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + MACOSX_DEPLOYMENT_TARGET = 10.13; + MTL_ENABLE_DEBUG_INFO = NO; + SDKROOT = macosx; + }; + name = Release; + }; + 4080A97320B029B00036BA46 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_STYLE = Automatic; + MACOSX_DEPLOYMENT_TARGET = 10.12; + PRODUCT_NAME = "$(TARGET_NAME)"; + USER_HEADER_SEARCH_PATHS = ../..; + }; + name = Debug; + }; + 4080A97420B029B00036BA46 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_STYLE = Automatic; + MACOSX_DEPLOYMENT_TARGET = 10.12; + PRODUCT_NAME = "$(TARGET_NAME)"; + USER_HEADER_SEARCH_PATHS = ../..; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 4080A96620B029B00036BA46 /* Build configuration list for PBXProject "example_apple_opengl2" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 4080A97020B029B00036BA46 /* Debug */, + 4080A97120B029B00036BA46 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 4080A97220B029B00036BA46 /* Build configuration list for PBXNativeTarget "example_osx_opengl2" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 4080A97320B029B00036BA46 /* Debug */, + 4080A97420B029B00036BA46 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 4080A96320B029B00036BA46 /* Project object */; +} diff --git a/External/imgui-docking/examples/example_apple_opengl2/main.mm b/External/imgui-docking/examples/example_apple_opengl2/main.mm new file mode 100644 index 0000000..11829a8 --- /dev/null +++ b/External/imgui-docking/examples/example_apple_opengl2/main.mm @@ -0,0 +1,273 @@ +// Dear ImGui: standalone example application for OSX + OpenGL2, using legacy fixed pipeline + +// Learn about Dear ImGui: +// - FAQ https://dearimgui.com/faq +// - Getting Started https://dearimgui.com/getting-started +// - Documentation https://dearimgui.com/docs (same as your local docs/ folder). +// - Introduction, links and more at the top of imgui.cpp + +#import +#import +#import + +#include "imgui.h" +#include "imgui_impl_opengl2.h" +#include "imgui_impl_osx.h" + +//----------------------------------------------------------------------------------- +// AppView +//----------------------------------------------------------------------------------- + +@interface AppView : NSOpenGLView +{ + NSTimer* animationTimer; +} +@end + +@implementation AppView + +-(void)prepareOpenGL +{ + [super prepareOpenGL]; + +#ifndef DEBUG + GLint swapInterval = 1; + [[self openGLContext] setValues:&swapInterval forParameter:NSOpenGLCPSwapInterval]; + if (swapInterval == 0) + NSLog(@"Error: Cannot set swap interval."); +#endif +} + +-(void)initialize +{ + // Setup Dear ImGui context + // FIXME: This example doesn't have proper cleanup... + IMGUI_CHECKVERSION(); + ImGui::CreateContext(); + ImGuiIO& io = ImGui::GetIO(); (void)io; + io.ConfigFlags |= ImGuiConfigFlags_NavEnableKeyboard; // Enable Keyboard Controls + io.ConfigFlags |= ImGuiConfigFlags_NavEnableGamepad; // Enable Gamepad Controls + io.ConfigFlags |= ImGuiConfigFlags_DockingEnable; // Enable Docking + io.ConfigFlags |= ImGuiConfigFlags_ViewportsEnable; // Enable Multi-Viewport / Platform Windows + + // Setup Dear ImGui style + ImGui::StyleColorsDark(); + //ImGui::StyleColorsLight(); + + // When viewports are enabled we tweak WindowRounding/WindowBg so platform windows can look identical to regular ones. + ImGuiStyle& style = ImGui::GetStyle(); + if (io.ConfigFlags & ImGuiConfigFlags_ViewportsEnable) + { + style.WindowRounding = 0.0f; + style.Colors[ImGuiCol_WindowBg].w = 1.0f; + } + + // Setup Platform/Renderer backends + ImGui_ImplOSX_Init(self); + ImGui_ImplOpenGL2_Init(); + + // Load Fonts + // - If no fonts are loaded, dear imgui will use the default font. You can also load multiple fonts and use ImGui::PushFont()/PopFont() to select them. + // - AddFontFromFileTTF() will return the ImFont* so you can store it if you need to select the font among multiple. + // - If the file cannot be loaded, the function will return a nullptr. Please handle those errors in your application (e.g. use an assertion, or display an error and quit). + // - The fonts will be rasterized at a given size (w/ oversampling) and stored into a texture when calling ImFontAtlas::Build()/GetTexDataAsXXXX(), which ImGui_ImplXXXX_NewFrame below will call. + // - Use '#define IMGUI_ENABLE_FREETYPE' in your imconfig file to use Freetype for higher quality font rendering. + // - Read 'docs/FONTS.md' for more instructions and details. + // - Remember that in C/C++ if you want to include a backslash \ in a string literal you need to write a double backslash \\ ! + //io.Fonts->AddFontDefault(); + //io.Fonts->AddFontFromFileTTF("c:\\Windows\\Fonts\\segoeui.ttf", 18.0f); + //io.Fonts->AddFontFromFileTTF("../../misc/fonts/DroidSans.ttf", 16.0f); + //io.Fonts->AddFontFromFileTTF("../../misc/fonts/Roboto-Medium.ttf", 16.0f); + //io.Fonts->AddFontFromFileTTF("../../misc/fonts/Cousine-Regular.ttf", 15.0f); + //ImFont* font = io.Fonts->AddFontFromFileTTF("c:\\Windows\\Fonts\\ArialUni.ttf", 18.0f, nullptr, io.Fonts->GetGlyphRangesJapanese()); + //IM_ASSERT(font != nullptr); +} + +-(void)updateAndDrawDemoView +{ + // Start the Dear ImGui frame + ImGuiIO& io = ImGui::GetIO(); + ImGui_ImplOpenGL2_NewFrame(); + ImGui_ImplOSX_NewFrame(self); + ImGui::NewFrame(); + + // Our state (make them static = more or less global) as a convenience to keep the example terse. + static bool show_demo_window = true; + static bool show_another_window = false; + static ImVec4 clear_color = ImVec4(0.45f, 0.55f, 0.60f, 1.00f); + + // 1. Show the big demo window (Most of the sample code is in ImGui::ShowDemoWindow()! You can browse its code to learn more about Dear ImGui!). + if (show_demo_window) + ImGui::ShowDemoWindow(&show_demo_window); + + // 2. Show a simple window that we create ourselves. We use a Begin/End pair to create a named window. + { + static float f = 0.0f; + static int counter = 0; + + ImGui::Begin("Hello, world!"); // Create a window called "Hello, world!" and append into it. + + ImGui::Text("This is some useful text."); // Display some text (you can use a format strings too) + ImGui::Checkbox("Demo Window", &show_demo_window); // Edit bools storing our window open/close state + ImGui::Checkbox("Another Window", &show_another_window); + + ImGui::SliderFloat("float", &f, 0.0f, 1.0f); // Edit 1 float using a slider from 0.0f to 1.0f + ImGui::ColorEdit3("clear color", (float*)&clear_color); // Edit 3 floats representing a color + + if (ImGui::Button("Button")) // Buttons return true when clicked (most widgets return true when edited/activated) + counter++; + ImGui::SameLine(); + ImGui::Text("counter = %d", counter); + + ImGui::Text("Application average %.3f ms/frame (%.1f FPS)", 1000.0f / io.Framerate, io.Framerate); + ImGui::End(); + } + + // 3. Show another simple window. + if (show_another_window) + { + ImGui::Begin("Another Window", &show_another_window); // Pass a pointer to our bool variable (the window will have a closing button that will clear the bool when clicked) + ImGui::Text("Hello from another window!"); + if (ImGui::Button("Close Me")) + show_another_window = false; + ImGui::End(); + } + + // Rendering + ImGui::Render(); + ImDrawData* draw_data = ImGui::GetDrawData(); + + [[self openGLContext] makeCurrentContext]; + GLsizei width = (GLsizei)(draw_data->DisplaySize.x * draw_data->FramebufferScale.x); + GLsizei height = (GLsizei)(draw_data->DisplaySize.y * draw_data->FramebufferScale.y); + glViewport(0, 0, width, height); + glClearColor(clear_color.x * clear_color.w, clear_color.y * clear_color.w, clear_color.z * clear_color.w, clear_color.w); + glClear(GL_COLOR_BUFFER_BIT); + + ImGui_ImplOpenGL2_RenderDrawData(draw_data); + + // Update and Render additional Platform Windows + if (io.ConfigFlags & ImGuiConfigFlags_ViewportsEnable) + { + ImGui::UpdatePlatformWindows(); + ImGui::RenderPlatformWindowsDefault(); + } + + // Present + [[self openGLContext] flushBuffer]; + + if (!animationTimer) + animationTimer = [NSTimer scheduledTimerWithTimeInterval:0.017 target:self selector:@selector(animationTimerFired:) userInfo:nil repeats:YES]; +} + +-(void)reshape { [super reshape]; [[self openGLContext] update]; [self updateAndDrawDemoView]; } +-(void)drawRect:(NSRect)bounds { [self updateAndDrawDemoView]; } +-(void)animationTimerFired:(NSTimer*)timer { [self setNeedsDisplay:YES]; } +-(void)dealloc { animationTimer = nil; } + +@end + +//----------------------------------------------------------------------------------- +// AppDelegate +//----------------------------------------------------------------------------------- + +@interface AppDelegate : NSObject +@property (nonatomic, readonly) NSWindow* window; +@end + +@implementation AppDelegate +@synthesize window = _window; + +-(BOOL)applicationShouldTerminateAfterLastWindowClosed:(NSApplication *)theApplication +{ + return YES; +} + +-(NSWindow*)window +{ + if (_window != nil) + return (_window); + + NSRect viewRect = NSMakeRect(100.0, 100.0, 100.0 + 1280.0, 100 + 720.0); + + _window = [[NSWindow alloc] initWithContentRect:viewRect styleMask:NSWindowStyleMaskTitled|NSWindowStyleMaskMiniaturizable|NSWindowStyleMaskResizable|NSWindowStyleMaskClosable backing:NSBackingStoreBuffered defer:YES]; + [_window setTitle:@"Dear ImGui OSX+OpenGL2 Example"]; + [_window setAcceptsMouseMovedEvents:YES]; + [_window setOpaque:YES]; + [_window makeKeyAndOrderFront:NSApp]; + + return (_window); +} + +-(void)setupMenu +{ + NSMenu* mainMenuBar = [[NSMenu alloc] init]; + NSMenu* appMenu; + NSMenuItem* menuItem; + + appMenu = [[NSMenu alloc] initWithTitle:@"Dear ImGui OSX+OpenGL2 Example"]; + menuItem = [appMenu addItemWithTitle:@"Quit Dear ImGui OSX+OpenGL2 Example" action:@selector(terminate:) keyEquivalent:@"q"]; + [menuItem setKeyEquivalentModifierMask:NSEventModifierFlagCommand]; + + menuItem = [[NSMenuItem alloc] init]; + [menuItem setSubmenu:appMenu]; + + [mainMenuBar addItem:menuItem]; + + appMenu = nil; + [NSApp setMainMenu:mainMenuBar]; +} + +-(void)dealloc +{ + _window = nil; +} + +-(void)applicationDidFinishLaunching:(NSNotification *)aNotification +{ + // Make the application a foreground application (else it won't receive keyboard events) + ProcessSerialNumber psn = {0, kCurrentProcess}; + TransformProcessType(&psn, kProcessTransformToForegroundApplication); + + // Menu + [self setupMenu]; + + NSOpenGLPixelFormatAttribute attrs[] = + { + NSOpenGLPFADoubleBuffer, + NSOpenGLPFADepthSize, 32, + 0 + }; + + NSOpenGLPixelFormat* format = [[NSOpenGLPixelFormat alloc] initWithAttributes:attrs]; + AppView* view = [[AppView alloc] initWithFrame:self.window.frame pixelFormat:format]; + format = nil; +#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1070 + if (floor(NSAppKitVersionNumber) > NSAppKitVersionNumber10_6) + [view setWantsBestResolutionOpenGLSurface:YES]; +#endif // MAC_OS_X_VERSION_MAX_ALLOWED >= 1070 + [self.window setContentView:view]; + + if ([view openGLContext] == nil) + NSLog(@"No OpenGL Context!"); + + [view initialize]; +} + +@end + +//----------------------------------------------------------------------------------- +// Application main() function +//----------------------------------------------------------------------------------- + +int main(int argc, const char* argv[]) +{ + @autoreleasepool + { + NSApp = [NSApplication sharedApplication]; + AppDelegate* delegate = [[AppDelegate alloc] init]; + [[NSApplication sharedApplication] setDelegate:delegate]; + [NSApp run]; + } + return NSApplicationMain(argc, argv); +} diff --git a/External/imgui-docking/examples/example_glfw_metal/main.mm b/External/imgui-docking/examples/example_glfw_metal/main.mm new file mode 100644 index 0000000..2f346ff --- /dev/null +++ b/External/imgui-docking/examples/example_glfw_metal/main.mm @@ -0,0 +1,194 @@ +// Dear ImGui: standalone example application for GLFW + Metal, using programmable pipeline +// (GLFW is a cross-platform general purpose library for handling windows, inputs, OpenGL/Vulkan/Metal graphics context creation, etc.) + +// Learn about Dear ImGui: +// - FAQ https://dearimgui.com/faq +// - Getting Started https://dearimgui.com/getting-started +// - Documentation https://dearimgui.com/docs (same as your local docs/ folder). +// - Introduction, links and more at the top of imgui.cpp + +#include "imgui.h" +#include "imgui_impl_glfw.h" +#include "imgui_impl_metal.h" +#include + +#define GLFW_INCLUDE_NONE +#define GLFW_EXPOSE_NATIVE_COCOA +#include +#include + +#import +#import + +static void glfw_error_callback(int error, const char* description) +{ + fprintf(stderr, "Glfw Error %d: %s\n", error, description); +} + +int main(int, char**) +{ + // Setup Dear ImGui context + IMGUI_CHECKVERSION(); + ImGui::CreateContext(); + ImGuiIO& io = ImGui::GetIO(); (void)io; + io.ConfigFlags |= ImGuiConfigFlags_NavEnableKeyboard; // Enable Keyboard Controls + io.ConfigFlags |= ImGuiConfigFlags_NavEnableGamepad; // Enable Gamepad Controls + io.ConfigFlags |= ImGuiConfigFlags_DockingEnable; // Enable Docking + io.ConfigFlags |= ImGuiConfigFlags_ViewportsEnable; // Enable Multi-Viewport / Platform Windows + + // Setup style + ImGui::StyleColorsDark(); + //ImGui::StyleColorsLight(); + + // When viewports are enabled we tweak WindowRounding/WindowBg so platform windows can look identical to regular ones. + ImGuiStyle& style = ImGui::GetStyle(); + if (io.ConfigFlags & ImGuiConfigFlags_ViewportsEnable) + { + style.WindowRounding = 0.0f; + style.Colors[ImGuiCol_WindowBg].w = 1.0f; + } + + // Load Fonts + // - If no fonts are loaded, dear imgui will use the default font. You can also load multiple fonts and use ImGui::PushFont()/PopFont() to select them. + // - AddFontFromFileTTF() will return the ImFont* so you can store it if you need to select the font among multiple. + // - If the file cannot be loaded, the function will return a nullptr. Please handle those errors in your application (e.g. use an assertion, or display an error and quit). + // - The fonts will be rasterized at a given size (w/ oversampling) and stored into a texture when calling ImFontAtlas::Build()/GetTexDataAsXXXX(), which ImGui_ImplXXXX_NewFrame below will call. + // - Use '#define IMGUI_ENABLE_FREETYPE' in your imconfig file to use Freetype for higher quality font rendering. + // - Read 'docs/FONTS.md' for more instructions and details. + // - Remember that in C/C++ if you want to include a backslash \ in a string literal you need to write a double backslash \\ ! + //io.Fonts->AddFontDefault(); + //io.Fonts->AddFontFromFileTTF("c:\\Windows\\Fonts\\segoeui.ttf", 18.0f); + //io.Fonts->AddFontFromFileTTF("../../misc/fonts/DroidSans.ttf", 16.0f); + //io.Fonts->AddFontFromFileTTF("../../misc/fonts/Roboto-Medium.ttf", 16.0f); + //io.Fonts->AddFontFromFileTTF("../../misc/fonts/Cousine-Regular.ttf", 15.0f); + //ImFont* font = io.Fonts->AddFontFromFileTTF("c:\\Windows\\Fonts\\ArialUni.ttf", 18.0f, nullptr, io.Fonts->GetGlyphRangesJapanese()); + //IM_ASSERT(font != nullptr); + + // Setup window + glfwSetErrorCallback(glfw_error_callback); + if (!glfwInit()) + return 1; + + // Create window with graphics context + glfwWindowHint(GLFW_CLIENT_API, GLFW_NO_API); + GLFWwindow* window = glfwCreateWindow(1280, 720, "Dear ImGui GLFW+Metal example", nullptr, nullptr); + if (window == nullptr) + return 1; + + id device = MTLCreateSystemDefaultDevice(); + id commandQueue = [device newCommandQueue]; + + // Setup Platform/Renderer backends + ImGui_ImplGlfw_InitForOther(window, true); + ImGui_ImplMetal_Init(device); + + NSWindow *nswin = glfwGetCocoaWindow(window); + CAMetalLayer *layer = [CAMetalLayer layer]; + layer.device = device; + layer.pixelFormat = MTLPixelFormatBGRA8Unorm; + nswin.contentView.layer = layer; + nswin.contentView.wantsLayer = YES; + + MTLRenderPassDescriptor *renderPassDescriptor = [MTLRenderPassDescriptor new]; + + // Our state + bool show_demo_window = true; + bool show_another_window = false; + float clear_color[4] = {0.45f, 0.55f, 0.60f, 1.00f}; + + // Main loop + while (!glfwWindowShouldClose(window)) + { + @autoreleasepool + { + // Poll and handle events (inputs, window resize, etc.) + // You can read the io.WantCaptureMouse, io.WantCaptureKeyboard flags to tell if dear imgui wants to use your inputs. + // - When io.WantCaptureMouse is true, do not dispatch mouse input data to your main application, or clear/overwrite your copy of the mouse data. + // - When io.WantCaptureKeyboard is true, do not dispatch keyboard input data to your main application, or clear/overwrite your copy of the keyboard data. + // Generally you may always pass all inputs to dear imgui, and hide them from your application based on those two flags. + glfwPollEvents(); + + int width, height; + glfwGetFramebufferSize(window, &width, &height); + layer.drawableSize = CGSizeMake(width, height); + id drawable = [layer nextDrawable]; + + id commandBuffer = [commandQueue commandBuffer]; + renderPassDescriptor.colorAttachments[0].clearColor = MTLClearColorMake(clear_color[0] * clear_color[3], clear_color[1] * clear_color[3], clear_color[2] * clear_color[3], clear_color[3]); + renderPassDescriptor.colorAttachments[0].texture = drawable.texture; + renderPassDescriptor.colorAttachments[0].loadAction = MTLLoadActionClear; + renderPassDescriptor.colorAttachments[0].storeAction = MTLStoreActionStore; + id renderEncoder = [commandBuffer renderCommandEncoderWithDescriptor:renderPassDescriptor]; + [renderEncoder pushDebugGroup:@"ImGui demo"]; + + // Start the Dear ImGui frame + ImGui_ImplMetal_NewFrame(renderPassDescriptor); + ImGui_ImplGlfw_NewFrame(); + ImGui::NewFrame(); + + // 1. Show the big demo window (Most of the sample code is in ImGui::ShowDemoWindow()! You can browse its code to learn more about Dear ImGui!). + if (show_demo_window) + ImGui::ShowDemoWindow(&show_demo_window); + + // 2. Show a simple window that we create ourselves. We use a Begin/End pair to create a named window. + { + static float f = 0.0f; + static int counter = 0; + + ImGui::Begin("Hello, world!"); // Create a window called "Hello, world!" and append into it. + + ImGui::Text("This is some useful text."); // Display some text (you can use a format strings too) + ImGui::Checkbox("Demo Window", &show_demo_window); // Edit bools storing our window open/close state + ImGui::Checkbox("Another Window", &show_another_window); + + ImGui::SliderFloat("float", &f, 0.0f, 1.0f); // Edit 1 float using a slider from 0.0f to 1.0f + ImGui::ColorEdit3("clear color", (float*)&clear_color); // Edit 3 floats representing a color + + if (ImGui::Button("Button")) // Buttons return true when clicked (most widgets return true when edited/activated) + counter++; + ImGui::SameLine(); + ImGui::Text("counter = %d", counter); + + ImGui::Text("Application average %.3f ms/frame (%.1f FPS)", 1000.0f / io.Framerate, io.Framerate); + ImGui::End(); + } + + // 3. Show another simple window. + if (show_another_window) + { + ImGui::Begin("Another Window", &show_another_window); // Pass a pointer to our bool variable (the window will have a closing button that will clear the bool when clicked) + ImGui::Text("Hello from another window!"); + if (ImGui::Button("Close Me")) + show_another_window = false; + ImGui::End(); + } + + // Rendering + ImGui::Render(); + ImGui_ImplMetal_RenderDrawData(ImGui::GetDrawData(), commandBuffer, renderEncoder); + + // Update and Render additional Platform Windows + if (io.ConfigFlags & ImGuiConfigFlags_ViewportsEnable) + { + ImGui::UpdatePlatformWindows(); + ImGui::RenderPlatformWindowsDefault(); + } + + [renderEncoder popDebugGroup]; + [renderEncoder endEncoding]; + + [commandBuffer presentDrawable:drawable]; + [commandBuffer commit]; + } + } + + // Cleanup + ImGui_ImplMetal_Shutdown(); + ImGui_ImplGlfw_Shutdown(); + ImGui::DestroyContext(); + + glfwDestroyWindow(window); + glfwTerminate(); + + return 0; +} diff --git a/External/imgui-docking/examples/example_glfw_opengl2/build_win32.bat b/External/imgui-docking/examples/example_glfw_opengl2/build_win32.bat new file mode 100644 index 0000000..24c0e08 --- /dev/null +++ b/External/imgui-docking/examples/example_glfw_opengl2/build_win32.bat @@ -0,0 +1,8 @@ +@REM Build for Visual Studio compiler. Run your copy of vcvars32.bat or vcvarsall.bat to setup command-line compiler. +@set OUT_DIR=Debug +@set OUT_EXE=example_glfw_opengl2 +@set INCLUDES=/I..\.. /I..\..\backends /I..\libs\glfw\include +@set SOURCES=main.cpp ..\..\backends\imgui_impl_opengl2.cpp ..\..\backends\imgui_impl_glfw.cpp ..\..\imgui*.cpp +@set LIBS=/LIBPATH:..\libs\glfw\lib-vc2010-32 glfw3.lib opengl32.lib gdi32.lib shell32.lib +mkdir %OUT_DIR% +cl /nologo /Zi /MD /utf-8 %INCLUDES% %SOURCES% /Fe%OUT_DIR%/%OUT_EXE%.exe /Fo%OUT_DIR%/ /link %LIBS% diff --git a/External/imgui-docking/examples/example_glfw_opengl2/example_glfw_opengl2.vcxproj b/External/imgui-docking/examples/example_glfw_opengl2/example_glfw_opengl2.vcxproj new file mode 100644 index 0000000..2aa2550 --- /dev/null +++ b/External/imgui-docking/examples/example_glfw_opengl2/example_glfw_opengl2.vcxproj @@ -0,0 +1,186 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {9CDA7840-B7A5-496D-A527-E95571496D18} + example_glfw_opengl2 + 8.1 + + + + Application + true + MultiByte + v140 + + + Application + true + MultiByte + v140 + + + Application + false + true + MultiByte + v140 + + + Application + false + true + MultiByte + v140 + + + + + + + + + + + + + + + + + + + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + $(IncludePath) + + + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + $(IncludePath) + + + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + $(IncludePath) + + + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + $(IncludePath) + + + + Level4 + Disabled + ..\..;..\..\backends;..\libs\glfw\include;%(AdditionalIncludeDirectories) + /utf-8 %(AdditionalOptions) + + + true + ..\libs\glfw\lib-vc2010-32;%(AdditionalLibraryDirectories) + opengl32.lib;glfw3.lib;%(AdditionalDependencies) + Console + msvcrt.lib + + + + + Level4 + Disabled + ..\..;..\..\backends;..\libs\glfw\include;%(AdditionalIncludeDirectories) + /utf-8 %(AdditionalOptions) + + + true + ..\libs\glfw\lib-vc2010-64;%(AdditionalLibraryDirectories) + opengl32.lib;glfw3.lib;%(AdditionalDependencies) + Console + msvcrt.lib + + + + + Level4 + MaxSpeed + true + true + ..\..;..\..\backends;..\libs\glfw\include;%(AdditionalIncludeDirectories) + false + /utf-8 %(AdditionalOptions) + + + true + true + true + ..\libs\glfw\lib-vc2010-32;%(AdditionalLibraryDirectories) + opengl32.lib;glfw3.lib;%(AdditionalDependencies) + Console + + + + + + + Level4 + MaxSpeed + true + true + ..\..;..\..\backends;..\libs\glfw\include;%(AdditionalIncludeDirectories) + false + /utf-8 %(AdditionalOptions) + + + true + true + true + ..\libs\glfw\lib-vc2010-64;%(AdditionalLibraryDirectories) + opengl32.lib;glfw3.lib;%(AdditionalDependencies) + Console + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/External/imgui-docking/examples/example_glfw_opengl2/example_glfw_opengl2.vcxproj.filters b/External/imgui-docking/examples/example_glfw_opengl2/example_glfw_opengl2.vcxproj.filters new file mode 100644 index 0000000..049b0b1 --- /dev/null +++ b/External/imgui-docking/examples/example_glfw_opengl2/example_glfw_opengl2.vcxproj.filters @@ -0,0 +1,64 @@ + + + + + {c336cfe3-f0c4-464c-9ef0-a9e17a7ff222} + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + + + sources + + + imgui + + + imgui + + + imgui + + + imgui + + + imgui + + + sources + + + sources + + + + + imgui + + + imgui + + + imgui + + + sources + + + sources + + + + + + imgui + + + imgui + + + \ No newline at end of file diff --git a/External/imgui-docking/examples/example_glfw_opengl2/main.cpp b/External/imgui-docking/examples/example_glfw_opengl2/main.cpp new file mode 100644 index 0000000..1ed2083 --- /dev/null +++ b/External/imgui-docking/examples/example_glfw_opengl2/main.cpp @@ -0,0 +1,189 @@ +// Dear ImGui: standalone example application for GLFW + OpenGL2, using legacy fixed pipeline +// (GLFW is a cross-platform general purpose library for handling windows, inputs, OpenGL/Vulkan/Metal graphics context creation, etc.) + +// Learn about Dear ImGui: +// - FAQ https://dearimgui.com/faq +// - Getting Started https://dearimgui.com/getting-started +// - Documentation https://dearimgui.com/docs (same as your local docs/ folder). +// - Introduction, links and more at the top of imgui.cpp + +// **DO NOT USE THIS CODE IF YOUR CODE/ENGINE IS USING MODERN OPENGL (SHADERS, VBO, VAO, etc.)** +// **Prefer using the code in the example_glfw_opengl2/ folder** +// See imgui_impl_glfw.cpp for details. + +#include "imgui.h" +#include "imgui_impl_glfw.h" +#include "imgui_impl_opengl2.h" +#include +#ifdef __APPLE__ +#define GL_SILENCE_DEPRECATION +#endif +#include + +// [Win32] Our example includes a copy of glfw3.lib pre-compiled with VS2010 to maximize ease of testing and compatibility with old VS compilers. +// To link with VS2010-era libraries, VS2015+ requires linking with legacy_stdio_definitions.lib, which we do using this pragma. +// Your own project should not be affected, as you are likely to link with a newer binary of GLFW that is adequate for your version of Visual Studio. +#if defined(_MSC_VER) && (_MSC_VER >= 1900) && !defined(IMGUI_DISABLE_WIN32_FUNCTIONS) +#pragma comment(lib, "legacy_stdio_definitions") +#endif + +static void glfw_error_callback(int error, const char* description) +{ + fprintf(stderr, "GLFW Error %d: %s\n", error, description); +} + +// Main code +int main(int, char**) +{ + glfwSetErrorCallback(glfw_error_callback); + if (!glfwInit()) + return 1; + + // Create window with graphics context + GLFWwindow* window = glfwCreateWindow(1280, 720, "Dear ImGui GLFW+OpenGL2 example", nullptr, nullptr); + if (window == nullptr) + return 1; + glfwMakeContextCurrent(window); + glfwSwapInterval(1); // Enable vsync + + // Setup Dear ImGui context + IMGUI_CHECKVERSION(); + ImGui::CreateContext(); + ImGuiIO& io = ImGui::GetIO(); (void)io; + io.ConfigFlags |= ImGuiConfigFlags_NavEnableKeyboard; // Enable Keyboard Controls + io.ConfigFlags |= ImGuiConfigFlags_NavEnableGamepad; // Enable Gamepad Controls + io.ConfigFlags |= ImGuiConfigFlags_DockingEnable; // Enable Docking + io.ConfigFlags |= ImGuiConfigFlags_ViewportsEnable; // Enable Multi-Viewport / Platform Windows + //io.ConfigViewportsNoAutoMerge = true; + //io.ConfigViewportsNoTaskBarIcon = true; + + // Setup Dear ImGui style + ImGui::StyleColorsDark(); + //ImGui::StyleColorsLight(); + + // When viewports are enabled we tweak WindowRounding/WindowBg so platform windows can look identical to regular ones. + ImGuiStyle& style = ImGui::GetStyle(); + if (io.ConfigFlags & ImGuiConfigFlags_ViewportsEnable) + { + style.WindowRounding = 0.0f; + style.Colors[ImGuiCol_WindowBg].w = 1.0f; + } + + // Setup Platform/Renderer backends + ImGui_ImplGlfw_InitForOpenGL(window, true); + ImGui_ImplOpenGL2_Init(); + + // Load Fonts + // - If no fonts are loaded, dear imgui will use the default font. You can also load multiple fonts and use ImGui::PushFont()/PopFont() to select them. + // - AddFontFromFileTTF() will return the ImFont* so you can store it if you need to select the font among multiple. + // - If the file cannot be loaded, the function will return a nullptr. Please handle those errors in your application (e.g. use an assertion, or display an error and quit). + // - The fonts will be rasterized at a given size (w/ oversampling) and stored into a texture when calling ImFontAtlas::Build()/GetTexDataAsXXXX(), which ImGui_ImplXXXX_NewFrame below will call. + // - Use '#define IMGUI_ENABLE_FREETYPE' in your imconfig file to use Freetype for higher quality font rendering. + // - Read 'docs/FONTS.md' for more instructions and details. + // - Remember that in C/C++ if you want to include a backslash \ in a string literal you need to write a double backslash \\ ! + //io.Fonts->AddFontDefault(); + //io.Fonts->AddFontFromFileTTF("c:\\Windows\\Fonts\\segoeui.ttf", 18.0f); + //io.Fonts->AddFontFromFileTTF("../../misc/fonts/DroidSans.ttf", 16.0f); + //io.Fonts->AddFontFromFileTTF("../../misc/fonts/Roboto-Medium.ttf", 16.0f); + //io.Fonts->AddFontFromFileTTF("../../misc/fonts/Cousine-Regular.ttf", 15.0f); + //ImFont* font = io.Fonts->AddFontFromFileTTF("c:\\Windows\\Fonts\\ArialUni.ttf", 18.0f, nullptr, io.Fonts->GetGlyphRangesJapanese()); + //IM_ASSERT(font != nullptr); + + // Our state + bool show_demo_window = true; + bool show_another_window = false; + ImVec4 clear_color = ImVec4(0.45f, 0.55f, 0.60f, 1.00f); + + // Main loop + while (!glfwWindowShouldClose(window)) + { + // Poll and handle events (inputs, window resize, etc.) + // You can read the io.WantCaptureMouse, io.WantCaptureKeyboard flags to tell if dear imgui wants to use your inputs. + // - When io.WantCaptureMouse is true, do not dispatch mouse input data to your main application, or clear/overwrite your copy of the mouse data. + // - When io.WantCaptureKeyboard is true, do not dispatch keyboard input data to your main application, or clear/overwrite your copy of the keyboard data. + // Generally you may always pass all inputs to dear imgui, and hide them from your application based on those two flags. + glfwPollEvents(); + + // Start the Dear ImGui frame + ImGui_ImplOpenGL2_NewFrame(); + ImGui_ImplGlfw_NewFrame(); + ImGui::NewFrame(); + + // 1. Show the big demo window (Most of the sample code is in ImGui::ShowDemoWindow()! You can browse its code to learn more about Dear ImGui!). + if (show_demo_window) + ImGui::ShowDemoWindow(&show_demo_window); + + // 2. Show a simple window that we create ourselves. We use a Begin/End pair to create a named window. + { + static float f = 0.0f; + static int counter = 0; + + ImGui::Begin("Hello, world!"); // Create a window called "Hello, world!" and append into it. + + ImGui::Text("This is some useful text."); // Display some text (you can use a format strings too) + ImGui::Checkbox("Demo Window", &show_demo_window); // Edit bools storing our window open/close state + ImGui::Checkbox("Another Window", &show_another_window); + + ImGui::SliderFloat("float", &f, 0.0f, 1.0f); // Edit 1 float using a slider from 0.0f to 1.0f + ImGui::ColorEdit3("clear color", (float*)&clear_color); // Edit 3 floats representing a color + + if (ImGui::Button("Button")) // Buttons return true when clicked (most widgets return true when edited/activated) + counter++; + ImGui::SameLine(); + ImGui::Text("counter = %d", counter); + + ImGui::Text("Application average %.3f ms/frame (%.1f FPS)", 1000.0f / io.Framerate, io.Framerate); + ImGui::End(); + } + + // 3. Show another simple window. + if (show_another_window) + { + ImGui::Begin("Another Window", &show_another_window); // Pass a pointer to our bool variable (the window will have a closing button that will clear the bool when clicked) + ImGui::Text("Hello from another window!"); + if (ImGui::Button("Close Me")) + show_another_window = false; + ImGui::End(); + } + + // Rendering + ImGui::Render(); + int display_w, display_h; + glfwGetFramebufferSize(window, &display_w, &display_h); + glViewport(0, 0, display_w, display_h); + glClearColor(clear_color.x * clear_color.w, clear_color.y * clear_color.w, clear_color.z * clear_color.w, clear_color.w); + glClear(GL_COLOR_BUFFER_BIT); + + // If you are using this code with non-legacy OpenGL header/contexts (which you should not, prefer using imgui_impl_opengl3.cpp!!), + // you may need to backup/reset/restore other state, e.g. for current shader using the commented lines below. + //GLint last_program; + //glGetIntegerv(GL_CURRENT_PROGRAM, &last_program); + //glUseProgram(0); + ImGui_ImplOpenGL2_RenderDrawData(ImGui::GetDrawData()); + //glUseProgram(last_program); + + // Update and Render additional Platform Windows + // (Platform functions may change the current OpenGL context, so we save/restore it to make it easier to paste this code elsewhere. + // For this specific demo app we could also call glfwMakeContextCurrent(window) directly) + if (io.ConfigFlags & ImGuiConfigFlags_ViewportsEnable) + { + GLFWwindow* backup_current_context = glfwGetCurrentContext(); + ImGui::UpdatePlatformWindows(); + ImGui::RenderPlatformWindowsDefault(); + glfwMakeContextCurrent(backup_current_context); + } + + glfwMakeContextCurrent(window); + glfwSwapBuffers(window); + } + + // Cleanup + ImGui_ImplOpenGL2_Shutdown(); + ImGui_ImplGlfw_Shutdown(); + ImGui::DestroyContext(); + + glfwDestroyWindow(window); + glfwTerminate(); + + return 0; +} diff --git a/External/imgui-docking/examples/example_glfw_opengl3/Makefile.emscripten b/External/imgui-docking/examples/example_glfw_opengl3/Makefile.emscripten new file mode 100644 index 0000000..bd972ab --- /dev/null +++ b/External/imgui-docking/examples/example_glfw_opengl3/Makefile.emscripten @@ -0,0 +1,91 @@ +# +# Makefile to use with GLFW+emscripten +# See https://emscripten.org/docs/getting_started/downloads.html +# for installation instructions. +# +# This Makefile assumes you have loaded emscripten's environment. +# (On Windows, you may need to execute emsdk_env.bat or encmdprompt.bat ahead) +# +# Running `make -f Makefile.emscripten` will produce three files: +# - web/index.html +# - web/index.js +# - web/index.wasm +# +# All three are needed to run the demo. + +CC = emcc +CXX = em++ +WEB_DIR = web +EXE = $(WEB_DIR)/index.html +IMGUI_DIR = ../.. +SOURCES = main.cpp +SOURCES += $(IMGUI_DIR)/imgui.cpp $(IMGUI_DIR)/imgui_demo.cpp $(IMGUI_DIR)/imgui_draw.cpp $(IMGUI_DIR)/imgui_tables.cpp $(IMGUI_DIR)/imgui_widgets.cpp +SOURCES += $(IMGUI_DIR)/backends/imgui_impl_glfw.cpp $(IMGUI_DIR)/backends/imgui_impl_opengl3.cpp +OBJS = $(addsuffix .o, $(basename $(notdir $(SOURCES)))) +UNAME_S := $(shell uname -s) +CPPFLAGS = +LDFLAGS = +EMS = + +##--------------------------------------------------------------------- +## EMSCRIPTEN OPTIONS +##--------------------------------------------------------------------- + +# ("EMS" options gets added to both CPPFLAGS and LDFLAGS, whereas some options are for linker only) +EMS += -s DISABLE_EXCEPTION_CATCHING=1 +LDFLAGS += -s USE_GLFW=3 -s WASM=1 -s ALLOW_MEMORY_GROWTH=1 -s NO_EXIT_RUNTIME=0 -s ASSERTIONS=1 + +# Uncomment next line to fix possible rendering bugs with Emscripten version older then 1.39.0 (https://github.com/ocornut/imgui/issues/2877) +#EMS += -s BINARYEN_TRAP_MODE=clamp +#EMS += -s SAFE_HEAP=1 ## Adds overhead + +# Emscripten allows preloading a file or folder to be accessible at runtime. +# The Makefile for this example project suggests embedding the misc/fonts/ folder into our application, it will then be accessible as "/fonts" +# See documentation for more details: https://emscripten.org/docs/porting/files/packaging_files.html +# (Default value is 0. Set to 1 to enable file-system and include the misc/fonts/ folder as part of the build.) +USE_FILE_SYSTEM ?= 0 +ifeq ($(USE_FILE_SYSTEM), 0) +LDFLAGS += -s NO_FILESYSTEM=1 +CPPFLAGS += -DIMGUI_DISABLE_FILE_FUNCTIONS +endif +ifeq ($(USE_FILE_SYSTEM), 1) +LDFLAGS += --no-heap-copy --preload-file ../../misc/fonts@/fonts +endif + +##--------------------------------------------------------------------- +## FINAL BUILD FLAGS +##--------------------------------------------------------------------- + +CPPFLAGS += -I$(IMGUI_DIR) -I$(IMGUI_DIR)/backends +#CPPFLAGS += -g +CPPFLAGS += -Wall -Wformat -Os $(EMS) +LDFLAGS += --shell-file ../libs/emscripten/shell_minimal.html +LDFLAGS += $(EMS) + +##--------------------------------------------------------------------- +## BUILD RULES +##--------------------------------------------------------------------- + +%.o:%.cpp + $(CXX) $(CPPFLAGS) $(CXXFLAGS) -c -o $@ $< + +%.o:$(IMGUI_DIR)/%.cpp + $(CXX) $(CPPFLAGS) $(CXXFLAGS) -c -o $@ $< + +%.o:$(IMGUI_DIR)/backends/%.cpp + $(CXX) $(CPPFLAGS) $(CXXFLAGS) -c -o $@ $< + +all: $(EXE) + @echo Build complete for $(EXE) + +$(WEB_DIR): + mkdir $@ + +serve: all + python3 -m http.server -d $(WEB_DIR) + +$(EXE): $(OBJS) $(WEB_DIR) + $(CXX) -o $@ $(OBJS) $(LDFLAGS) + +clean: + rm -rf $(OBJS) $(WEB_DIR) diff --git a/External/imgui-docking/examples/example_glfw_opengl3/build_win32.bat b/External/imgui-docking/examples/example_glfw_opengl3/build_win32.bat new file mode 100644 index 0000000..b5979ad --- /dev/null +++ b/External/imgui-docking/examples/example_glfw_opengl3/build_win32.bat @@ -0,0 +1,8 @@ +@REM Build for Visual Studio compiler. Run your copy of vcvars32.bat or vcvarsall.bat to setup command-line compiler. +@set OUT_DIR=Debug +@set OUT_EXE=example_glfw_opengl3 +@set INCLUDES=/I..\.. /I..\..\backends /I..\libs\glfw\include +@set SOURCES=main.cpp ..\..\backends\imgui_impl_glfw.cpp ..\..\backends\imgui_impl_opengl3.cpp ..\..\imgui*.cpp +@set LIBS=/LIBPATH:..\libs\glfw\lib-vc2010-32 glfw3.lib opengl32.lib gdi32.lib shell32.lib +mkdir %OUT_DIR% +cl /nologo /Zi /MD /utf-8 %INCLUDES% %SOURCES% /Fe%OUT_DIR%/%OUT_EXE%.exe /Fo%OUT_DIR%/ /link %LIBS% diff --git a/External/imgui-docking/examples/example_glfw_opengl3/example_glfw_opengl3.vcxproj b/External/imgui-docking/examples/example_glfw_opengl3/example_glfw_opengl3.vcxproj new file mode 100644 index 0000000..4bd503a --- /dev/null +++ b/External/imgui-docking/examples/example_glfw_opengl3/example_glfw_opengl3.vcxproj @@ -0,0 +1,187 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {4a1fb5ea-22f5-42a8-ab92-1d2df5d47fb9} + example_glfw_opengl3 + 8.1 + + + + Application + true + MultiByte + v140 + + + Application + true + MultiByte + v140 + + + Application + false + true + MultiByte + v140 + + + Application + false + true + MultiByte + v140 + + + + + + + + + + + + + + + + + + + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + $(IncludePath) + + + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + $(IncludePath) + + + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + $(IncludePath) + + + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + $(IncludePath) + + + + Level4 + Disabled + ..\..;..\..\backends;..\libs\glfw\include;%(AdditionalIncludeDirectories) + /utf-8 %(AdditionalOptions) + + + true + ..\libs\glfw\lib-vc2010-32;%(AdditionalLibraryDirectories) + opengl32.lib;glfw3.lib;%(AdditionalDependencies) + Console + msvcrt.lib + + + + + Level4 + Disabled + ..\..;..\..\backends;..\libs\glfw\include;%(AdditionalIncludeDirectories) + /utf-8 %(AdditionalOptions) + + + true + ..\libs\glfw\lib-vc2010-64;%(AdditionalLibraryDirectories) + opengl32.lib;glfw3.lib;%(AdditionalDependencies) + Console + msvcrt.lib + + + + + Level4 + MaxSpeed + true + true + ..\..;..\..\backends;..\libs\glfw\include;%(AdditionalIncludeDirectories) + false + /utf-8 %(AdditionalOptions) + + + true + true + true + ..\libs\glfw\lib-vc2010-32;%(AdditionalLibraryDirectories) + opengl32.lib;glfw3.lib;%(AdditionalDependencies) + Console + + + + + + + Level4 + MaxSpeed + true + true + ..\..;..\..\backends;..\libs\glfw\include;%(AdditionalIncludeDirectories) + false + /utf-8 %(AdditionalOptions) + + + true + true + true + ..\libs\glfw\lib-vc2010-64;%(AdditionalLibraryDirectories) + opengl32.lib;glfw3.lib;%(AdditionalDependencies) + Console + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/External/imgui-docking/examples/example_glfw_opengl3/example_glfw_opengl3.vcxproj.filters b/External/imgui-docking/examples/example_glfw_opengl3/example_glfw_opengl3.vcxproj.filters new file mode 100644 index 0000000..bc79bb1 --- /dev/null +++ b/External/imgui-docking/examples/example_glfw_opengl3/example_glfw_opengl3.vcxproj.filters @@ -0,0 +1,67 @@ + + + + + {20b90ce4-7fcb-4731-b9a0-075f875de82d} + + + {f18ab499-84e1-499f-8eff-9754361e0e52} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + + + sources + + + imgui + + + imgui + + + imgui + + + imgui + + + imgui + + + sources + + + sources + + + + + imgui + + + imgui + + + imgui + + + sources + + + sources + + + sources + + + + + + imgui + + + imgui + + + \ No newline at end of file diff --git a/External/imgui-docking/examples/example_glfw_opengl3/main.cpp b/External/imgui-docking/examples/example_glfw_opengl3/main.cpp new file mode 100644 index 0000000..4aaf406 --- /dev/null +++ b/External/imgui-docking/examples/example_glfw_opengl3/main.cpp @@ -0,0 +1,220 @@ +// Dear ImGui: standalone example application for GLFW + OpenGL 3, using programmable pipeline +// (GLFW is a cross-platform general purpose library for handling windows, inputs, OpenGL/Vulkan/Metal graphics context creation, etc.) + +// Learn about Dear ImGui: +// - FAQ https://dearimgui.com/faq +// - Getting Started https://dearimgui.com/getting-started +// - Documentation https://dearimgui.com/docs (same as your local docs/ folder). +// - Introduction, links and more at the top of imgui.cpp + +#include "imgui.h" +#include "imgui_impl_glfw.h" +#include "imgui_impl_opengl3.h" +#include +#define GL_SILENCE_DEPRECATION +#if defined(IMGUI_IMPL_OPENGL_ES2) +#include +#endif +#include // Will drag system OpenGL headers + +// [Win32] Our example includes a copy of glfw3.lib pre-compiled with VS2010 to maximize ease of testing and compatibility with old VS compilers. +// To link with VS2010-era libraries, VS2015+ requires linking with legacy_stdio_definitions.lib, which we do using this pragma. +// Your own project should not be affected, as you are likely to link with a newer binary of GLFW that is adequate for your version of Visual Studio. +#if defined(_MSC_VER) && (_MSC_VER >= 1900) && !defined(IMGUI_DISABLE_WIN32_FUNCTIONS) +#pragma comment(lib, "legacy_stdio_definitions") +#endif + +// This example can also compile and run with Emscripten! See 'Makefile.emscripten' for details. +#ifdef __EMSCRIPTEN__ +#include "../libs/emscripten/emscripten_mainloop_stub.h" +#endif + +static void glfw_error_callback(int error, const char* description) +{ + fprintf(stderr, "GLFW Error %d: %s\n", error, description); +} + +// Main code +int main(int, char**) +{ + glfwSetErrorCallback(glfw_error_callback); + if (!glfwInit()) + return 1; + + // Decide GL+GLSL versions +#if defined(IMGUI_IMPL_OPENGL_ES2) + // GL ES 2.0 + GLSL 100 + const char* glsl_version = "#version 100"; + glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 2); + glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 0); + glfwWindowHint(GLFW_CLIENT_API, GLFW_OPENGL_ES_API); +#elif defined(__APPLE__) + // GL 3.2 + GLSL 150 + const char* glsl_version = "#version 150"; + glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3); + glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 2); + glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE); // 3.2+ only + glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE); // Required on Mac +#else + // GL 3.0 + GLSL 130 + const char* glsl_version = "#version 130"; + glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3); + glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 0); + //glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE); // 3.2+ only + //glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE); // 3.0+ only +#endif + + // Create window with graphics context + GLFWwindow* window = glfwCreateWindow(1280, 720, "Dear ImGui GLFW+OpenGL3 example", nullptr, nullptr); + if (window == nullptr) + return 1; + glfwMakeContextCurrent(window); + glfwSwapInterval(1); // Enable vsync + + // Setup Dear ImGui context + IMGUI_CHECKVERSION(); + ImGui::CreateContext(); + ImGuiIO& io = ImGui::GetIO(); (void)io; + io.ConfigFlags |= ImGuiConfigFlags_NavEnableKeyboard; // Enable Keyboard Controls + io.ConfigFlags |= ImGuiConfigFlags_NavEnableGamepad; // Enable Gamepad Controls + io.ConfigFlags |= ImGuiConfigFlags_DockingEnable; // Enable Docking + io.ConfigFlags |= ImGuiConfigFlags_ViewportsEnable; // Enable Multi-Viewport / Platform Windows + //io.ConfigViewportsNoAutoMerge = true; + //io.ConfigViewportsNoTaskBarIcon = true; + + // Setup Dear ImGui style + ImGui::StyleColorsDark(); + //ImGui::StyleColorsLight(); + + // When viewports are enabled we tweak WindowRounding/WindowBg so platform windows can look identical to regular ones. + ImGuiStyle& style = ImGui::GetStyle(); + if (io.ConfigFlags & ImGuiConfigFlags_ViewportsEnable) + { + style.WindowRounding = 0.0f; + style.Colors[ImGuiCol_WindowBg].w = 1.0f; + } + + // Setup Platform/Renderer backends + ImGui_ImplGlfw_InitForOpenGL(window, true); +#ifdef __EMSCRIPTEN__ + ImGui_ImplGlfw_InstallEmscriptenCanvasResizeCallback("#canvas"); +#endif + ImGui_ImplOpenGL3_Init(glsl_version); + + // Load Fonts + // - If no fonts are loaded, dear imgui will use the default font. You can also load multiple fonts and use ImGui::PushFont()/PopFont() to select them. + // - AddFontFromFileTTF() will return the ImFont* so you can store it if you need to select the font among multiple. + // - If the file cannot be loaded, the function will return a nullptr. Please handle those errors in your application (e.g. use an assertion, or display an error and quit). + // - The fonts will be rasterized at a given size (w/ oversampling) and stored into a texture when calling ImFontAtlas::Build()/GetTexDataAsXXXX(), which ImGui_ImplXXXX_NewFrame below will call. + // - Use '#define IMGUI_ENABLE_FREETYPE' in your imconfig file to use Freetype for higher quality font rendering. + // - Read 'docs/FONTS.md' for more instructions and details. + // - Remember that in C/C++ if you want to include a backslash \ in a string literal you need to write a double backslash \\ ! + // - Our Emscripten build process allows embedding fonts to be accessible at runtime from the "fonts/" folder. See Makefile.emscripten for details. + //io.Fonts->AddFontDefault(); + //io.Fonts->AddFontFromFileTTF("c:\\Windows\\Fonts\\segoeui.ttf", 18.0f); + //io.Fonts->AddFontFromFileTTF("../../misc/fonts/DroidSans.ttf", 16.0f); + //io.Fonts->AddFontFromFileTTF("../../misc/fonts/Roboto-Medium.ttf", 16.0f); + //io.Fonts->AddFontFromFileTTF("../../misc/fonts/Cousine-Regular.ttf", 15.0f); + //ImFont* font = io.Fonts->AddFontFromFileTTF("c:\\Windows\\Fonts\\ArialUni.ttf", 18.0f, nullptr, io.Fonts->GetGlyphRangesJapanese()); + //IM_ASSERT(font != nullptr); + + // Our state + bool show_demo_window = true; + bool show_another_window = false; + ImVec4 clear_color = ImVec4(0.45f, 0.55f, 0.60f, 1.00f); + + // Main loop +#ifdef __EMSCRIPTEN__ + // For an Emscripten build we are disabling file-system access, so let's not attempt to do a fopen() of the imgui.ini file. + // You may manually call LoadIniSettingsFromMemory() to load settings from your own storage. + io.IniFilename = nullptr; + EMSCRIPTEN_MAINLOOP_BEGIN +#else + while (!glfwWindowShouldClose(window)) +#endif + { + // Poll and handle events (inputs, window resize, etc.) + // You can read the io.WantCaptureMouse, io.WantCaptureKeyboard flags to tell if dear imgui wants to use your inputs. + // - When io.WantCaptureMouse is true, do not dispatch mouse input data to your main application, or clear/overwrite your copy of the mouse data. + // - When io.WantCaptureKeyboard is true, do not dispatch keyboard input data to your main application, or clear/overwrite your copy of the keyboard data. + // Generally you may always pass all inputs to dear imgui, and hide them from your application based on those two flags. + glfwPollEvents(); + + // Start the Dear ImGui frame + ImGui_ImplOpenGL3_NewFrame(); + ImGui_ImplGlfw_NewFrame(); + ImGui::NewFrame(); + + // 1. Show the big demo window (Most of the sample code is in ImGui::ShowDemoWindow()! You can browse its code to learn more about Dear ImGui!). + if (show_demo_window) + ImGui::ShowDemoWindow(&show_demo_window); + + // 2. Show a simple window that we create ourselves. We use a Begin/End pair to create a named window. + { + static float f = 0.0f; + static int counter = 0; + + ImGui::Begin("Hello, world!"); // Create a window called "Hello, world!" and append into it. + + ImGui::Text("This is some useful text."); // Display some text (you can use a format strings too) + ImGui::Checkbox("Demo Window", &show_demo_window); // Edit bools storing our window open/close state + ImGui::Checkbox("Another Window", &show_another_window); + + ImGui::SliderFloat("float", &f, 0.0f, 1.0f); // Edit 1 float using a slider from 0.0f to 1.0f + ImGui::ColorEdit3("clear color", (float*)&clear_color); // Edit 3 floats representing a color + + if (ImGui::Button("Button")) // Buttons return true when clicked (most widgets return true when edited/activated) + counter++; + ImGui::SameLine(); + ImGui::Text("counter = %d", counter); + + ImGui::Text("Application average %.3f ms/frame (%.1f FPS)", 1000.0f / io.Framerate, io.Framerate); + ImGui::End(); + } + + // 3. Show another simple window. + if (show_another_window) + { + ImGui::Begin("Another Window", &show_another_window); // Pass a pointer to our bool variable (the window will have a closing button that will clear the bool when clicked) + ImGui::Text("Hello from another window!"); + if (ImGui::Button("Close Me")) + show_another_window = false; + ImGui::End(); + } + + // Rendering + ImGui::Render(); + int display_w, display_h; + glfwGetFramebufferSize(window, &display_w, &display_h); + glViewport(0, 0, display_w, display_h); + glClearColor(clear_color.x * clear_color.w, clear_color.y * clear_color.w, clear_color.z * clear_color.w, clear_color.w); + glClear(GL_COLOR_BUFFER_BIT); + ImGui_ImplOpenGL3_RenderDrawData(ImGui::GetDrawData()); + + // Update and Render additional Platform Windows + // (Platform functions may change the current OpenGL context, so we save/restore it to make it easier to paste this code elsewhere. + // For this specific demo app we could also call glfwMakeContextCurrent(window) directly) + if (io.ConfigFlags & ImGuiConfigFlags_ViewportsEnable) + { + GLFWwindow* backup_current_context = glfwGetCurrentContext(); + ImGui::UpdatePlatformWindows(); + ImGui::RenderPlatformWindowsDefault(); + glfwMakeContextCurrent(backup_current_context); + } + + glfwSwapBuffers(window); + } +#ifdef __EMSCRIPTEN__ + EMSCRIPTEN_MAINLOOP_END; +#endif + + // Cleanup + ImGui_ImplOpenGL3_Shutdown(); + ImGui_ImplGlfw_Shutdown(); + ImGui::DestroyContext(); + + glfwDestroyWindow(window); + glfwTerminate(); + + return 0; +} diff --git a/External/imgui-docking/examples/example_glfw_vulkan/CMakeLists.txt b/External/imgui-docking/examples/example_glfw_vulkan/CMakeLists.txt new file mode 100644 index 0000000..a6e5bf9 --- /dev/null +++ b/External/imgui-docking/examples/example_glfw_vulkan/CMakeLists.txt @@ -0,0 +1,45 @@ +# Example usage: +# mkdir build +# cd build +# cmake -g "Visual Studio 14 2015" .. + +cmake_minimum_required(VERSION 2.8) +project(imgui_example_glfw_vulkan C CXX) + +if(NOT CMAKE_BUILD_TYPE) + set(CMAKE_BUILD_TYPE Debug CACHE STRING "" FORCE) +endif() + +set(CMAKE_CXX_STANDARD 11) +set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DVK_PROTOTYPES") +set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DVK_PROTOTYPES") + +# GLFW +set(GLFW_DIR ../../../glfw) # Set this to point to an up-to-date GLFW repo +option(GLFW_BUILD_EXAMPLES "Build the GLFW example programs" OFF) +option(GLFW_BUILD_TESTS "Build the GLFW test programs" OFF) +option(GLFW_BUILD_DOCS "Build the GLFW documentation" OFF) +option(GLFW_INSTALL "Generate installation target" OFF) +option(GLFW_DOCUMENT_INTERNALS "Include internals in documentation" OFF) +add_subdirectory(${GLFW_DIR} binary_dir EXCLUDE_FROM_ALL) +include_directories(${GLFW_DIR}/include) + +# Dear ImGui +set(IMGUI_DIR ../../) +include_directories(${IMGUI_DIR} ${IMGUI_DIR}/backends ..) + +# Libraries +find_package(Vulkan REQUIRED) +#find_library(VULKAN_LIBRARY + #NAMES vulkan vulkan-1) +#set(LIBRARIES "glfw;${VULKAN_LIBRARY}") +set(LIBRARIES "glfw;Vulkan::Vulkan") + +# Use vulkan headers from glfw: +include_directories(${GLFW_DIR}/deps) + +file(GLOB sources *.cpp) + +add_executable(example_glfw_vulkan ${sources} ${IMGUI_DIR}/backends/imgui_impl_glfw.cpp ${IMGUI_DIR}/backends/imgui_impl_vulkan.cpp ${IMGUI_DIR}/imgui.cpp ${IMGUI_DIR}/imgui_draw.cpp ${IMGUI_DIR}/imgui_demo.cpp ${IMGUI_DIR}/imgui_tables.cpp ${IMGUI_DIR}/imgui_widgets.cpp) +target_link_libraries(example_glfw_vulkan ${LIBRARIES}) +target_compile_definitions(example_glfw_vulkan PUBLIC -DImTextureID=ImU64) diff --git a/External/imgui-docking/examples/example_glfw_vulkan/build_win32.bat b/External/imgui-docking/examples/example_glfw_vulkan/build_win32.bat new file mode 100644 index 0000000..be92398 --- /dev/null +++ b/External/imgui-docking/examples/example_glfw_vulkan/build_win32.bat @@ -0,0 +1,14 @@ +@REM Build for Visual Studio compiler. Run your copy of vcvars32.bat or vcvarsall.bat to setup command-line compiler. + +@set OUT_EXE=example_glfw_vulkan +@set INCLUDES=/I..\.. /I..\..\backends /I..\libs\glfw\include /I %VULKAN_SDK%\include +@set SOURCES=main.cpp ..\..\backends\imgui_impl_vulkan.cpp ..\..\backends\imgui_impl_glfw.cpp ..\..\imgui*.cpp +@set LIBS=/LIBPATH:..\libs\glfw\lib-vc2010-32 /libpath:%VULKAN_SDK%\lib32 glfw3.lib opengl32.lib gdi32.lib shell32.lib vulkan-1.lib + +@set OUT_DIR=Debug +mkdir %OUT_DIR% +cl /nologo /Zi /MD /utf-8 %INCLUDES% /D ImTextureID=ImU64 %SOURCES% /Fe%OUT_DIR%/%OUT_EXE%.exe /Fo%OUT_DIR%/ /link %LIBS% + +@set OUT_DIR=Release +mkdir %OUT_DIR% +cl /nologo /Zi /MD /utf-8 /Ox /Oi %INCLUDES% /D ImTextureID=ImU64 %SOURCES% /Fe%OUT_DIR%/%OUT_EXE%.exe /Fo%OUT_DIR%/ /link %LIBS% diff --git a/External/imgui-docking/examples/example_glfw_vulkan/build_win64.bat b/External/imgui-docking/examples/example_glfw_vulkan/build_win64.bat new file mode 100644 index 0000000..c60b027 --- /dev/null +++ b/External/imgui-docking/examples/example_glfw_vulkan/build_win64.bat @@ -0,0 +1,13 @@ +@REM Build for Visual Studio compiler. Run your copy of amd64/vcvars32.bat to setup 64-bit command-line compiler. + +@set INCLUDES=/I..\.. /I..\..\backends /I..\libs\glfw\include /I %VULKAN_SDK%\include +@set SOURCES=main.cpp ..\..\backends\imgui_impl_vulkan.cpp ..\..\backends\imgui_impl_glfw.cpp ..\..\imgui*.cpp +@set LIBS=/LIBPATH:..\libs\glfw\lib-vc2010-64 /libpath:%VULKAN_SDK%\lib glfw3.lib opengl32.lib gdi32.lib shell32.lib vulkan-1.lib + +@set OUT_DIR=Debug +mkdir %OUT_DIR% +cl /nologo /Zi /MD /utf-8 %INCLUDES% /D ImTextureID=ImU64 %SOURCES% /Fe%OUT_DIR%/%OUT_EXE%.exe /Fo%OUT_DIR%/ /link %LIBS% + +@set OUT_DIR=Release +mkdir %OUT_DIR% +cl /nologo /Zi /MD /utf-8 /Ox /Oi %INCLUDES% /D ImTextureID=ImU64 %SOURCES% /Fe%OUT_DIR%/%OUT_EXE%.exe /Fo%OUT_DIR%/ /link %LIBS% diff --git a/External/imgui-docking/examples/example_glfw_vulkan/example_glfw_vulkan.vcxproj b/External/imgui-docking/examples/example_glfw_vulkan/example_glfw_vulkan.vcxproj new file mode 100644 index 0000000..d0d1c5f --- /dev/null +++ b/External/imgui-docking/examples/example_glfw_vulkan/example_glfw_vulkan.vcxproj @@ -0,0 +1,190 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {57E2DF5A-6FC8-45BB-99DD-91A18C646E80} + example_glfw_vulkan + 8.1 + + + + Application + true + MultiByte + v140 + + + Application + true + MultiByte + v140 + + + Application + false + true + MultiByte + v140 + + + Application + false + true + MultiByte + v140 + + + + + + + + + + + + + + + + + + + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + $(IncludePath) + + + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + $(IncludePath) + + + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + $(IncludePath) + + + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + $(IncludePath) + + + + Level4 + Disabled + ..\..;..\..\backends;%VULKAN_SDK%\include;..\libs\glfw\include;%(AdditionalIncludeDirectories) + ImTextureID=ImU64;_MBCS;%(PreprocessorDefinitions) + /utf-8 %(AdditionalOptions) + + + true + %VULKAN_SDK%\lib32;..\libs\glfw\lib-vc2010-32;%(AdditionalLibraryDirectories) + vulkan-1.lib;glfw3.lib;%(AdditionalDependencies) + Console + msvcrt.lib + + + + + Level4 + Disabled + ..\..;..\..\backends;%VULKAN_SDK%\include;..\libs\glfw\include;%(AdditionalIncludeDirectories) + ImTextureID=ImU64;_MBCS;%(PreprocessorDefinitions) + /utf-8 %(AdditionalOptions) + + + true + %VULKAN_SDK%\lib;..\libs\glfw\lib-vc2010-64;%(AdditionalLibraryDirectories) + vulkan-1.lib;glfw3.lib;%(AdditionalDependencies) + Console + msvcrt.lib + + + + + Level4 + MaxSpeed + true + true + ..\..;..\..\backends;%VULKAN_SDK%\include;..\libs\glfw\include;%(AdditionalIncludeDirectories) + false + ImTextureID=ImU64;_MBCS;%(PreprocessorDefinitions) + /utf-8 %(AdditionalOptions) + + + true + true + true + %VULKAN_SDK%\lib32;..\libs\glfw\lib-vc2010-32;%(AdditionalLibraryDirectories) + vulkan-1.lib;glfw3.lib;%(AdditionalDependencies) + Console + + + + + + + Level4 + MaxSpeed + true + true + ..\..;..\..\backends;%VULKAN_SDK%\include;..\libs\glfw\include;%(AdditionalIncludeDirectories) + false + ImTextureID=ImU64;_MBCS;%(PreprocessorDefinitions) + /utf-8 %(AdditionalOptions) + + + true + true + true + %VULKAN_SDK%\lib;..\libs\glfw\lib-vc2010-64;%(AdditionalLibraryDirectories) + vulkan-1.lib;glfw3.lib;%(AdditionalDependencies) + Console + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/External/imgui-docking/examples/example_glfw_vulkan/example_glfw_vulkan.vcxproj.filters b/External/imgui-docking/examples/example_glfw_vulkan/example_glfw_vulkan.vcxproj.filters new file mode 100644 index 0000000..510fc85 --- /dev/null +++ b/External/imgui-docking/examples/example_glfw_vulkan/example_glfw_vulkan.vcxproj.filters @@ -0,0 +1,64 @@ + + + + + {20b90ce4-7fcb-4731-b9a0-075f875de82d} + + + {f18ab499-84e1-499f-8eff-9754361e0e52} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + + + sources + + + imgui + + + imgui + + + imgui + + + imgui + + + imgui + + + sources + + + sources + + + + + imgui + + + imgui + + + imgui + + + sources + + + sources + + + + + + imgui + + + imgui + + + \ No newline at end of file diff --git a/External/imgui-docking/examples/example_glfw_vulkan/main.cpp b/External/imgui-docking/examples/example_glfw_vulkan/main.cpp new file mode 100644 index 0000000..3f191f2 --- /dev/null +++ b/External/imgui-docking/examples/example_glfw_vulkan/main.cpp @@ -0,0 +1,589 @@ +// Dear ImGui: standalone example application for Glfw + Vulkan + +// Learn about Dear ImGui: +// - FAQ https://dearimgui.com/faq +// - Getting Started https://dearimgui.com/getting-started +// - Documentation https://dearimgui.com/docs (same as your local docs/ folder). +// - Introduction, links and more at the top of imgui.cpp + +// Important note to the reader who wish to integrate imgui_impl_vulkan.cpp/.h in their own engine/app. +// - Common ImGui_ImplVulkan_XXX functions and structures are used to interface with imgui_impl_vulkan.cpp/.h. +// You will use those if you want to use this rendering backend in your engine/app. +// - Helper ImGui_ImplVulkanH_XXX functions and structures are only used by this example (main.cpp) and by +// the backend itself (imgui_impl_vulkan.cpp), but should PROBABLY NOT be used by your own engine/app code. +// Read comments in imgui_impl_vulkan.h. + +#include "imgui.h" +#include "imgui_impl_glfw.h" +#include "imgui_impl_vulkan.h" +#include // printf, fprintf +#include // abort +#define GLFW_INCLUDE_NONE +#define GLFW_INCLUDE_VULKAN +#include + +// Volk headers +#ifdef IMGUI_IMPL_VULKAN_USE_VOLK +#define VOLK_IMPLEMENTATION +#include +#endif + +// [Win32] Our example includes a copy of glfw3.lib pre-compiled with VS2010 to maximize ease of testing and compatibility with old VS compilers. +// To link with VS2010-era libraries, VS2015+ requires linking with legacy_stdio_definitions.lib, which we do using this pragma. +// Your own project should not be affected, as you are likely to link with a newer binary of GLFW that is adequate for your version of Visual Studio. +#if defined(_MSC_VER) && (_MSC_VER >= 1900) && !defined(IMGUI_DISABLE_WIN32_FUNCTIONS) +#pragma comment(lib, "legacy_stdio_definitions") +#endif + +//#define APP_USE_UNLIMITED_FRAME_RATE +#ifdef _DEBUG +#define APP_USE_VULKAN_DEBUG_REPORT +#endif + +// Data +static VkAllocationCallbacks* g_Allocator = nullptr; +static VkInstance g_Instance = VK_NULL_HANDLE; +static VkPhysicalDevice g_PhysicalDevice = VK_NULL_HANDLE; +static VkDevice g_Device = VK_NULL_HANDLE; +static uint32_t g_QueueFamily = (uint32_t)-1; +static VkQueue g_Queue = VK_NULL_HANDLE; +static VkDebugReportCallbackEXT g_DebugReport = VK_NULL_HANDLE; +static VkPipelineCache g_PipelineCache = VK_NULL_HANDLE; +static VkDescriptorPool g_DescriptorPool = VK_NULL_HANDLE; + +static ImGui_ImplVulkanH_Window g_MainWindowData; +static int g_MinImageCount = 2; +static bool g_SwapChainRebuild = false; + +static void glfw_error_callback(int error, const char* description) +{ + fprintf(stderr, "GLFW Error %d: %s\n", error, description); +} +static void check_vk_result(VkResult err) +{ + if (err == 0) + return; + fprintf(stderr, "[vulkan] Error: VkResult = %d\n", err); + if (err < 0) + abort(); +} + +#ifdef APP_USE_VULKAN_DEBUG_REPORT +static VKAPI_ATTR VkBool32 VKAPI_CALL debug_report(VkDebugReportFlagsEXT flags, VkDebugReportObjectTypeEXT objectType, uint64_t object, size_t location, int32_t messageCode, const char* pLayerPrefix, const char* pMessage, void* pUserData) +{ + (void)flags; (void)object; (void)location; (void)messageCode; (void)pUserData; (void)pLayerPrefix; // Unused arguments + fprintf(stderr, "[vulkan] Debug report from ObjectType: %i\nMessage: %s\n\n", objectType, pMessage); + return VK_FALSE; +} +#endif // APP_USE_VULKAN_DEBUG_REPORT + +static bool IsExtensionAvailable(const ImVector& properties, const char* extension) +{ + for (const VkExtensionProperties& p : properties) + if (strcmp(p.extensionName, extension) == 0) + return true; + return false; +} + +static VkPhysicalDevice SetupVulkan_SelectPhysicalDevice() +{ + uint32_t gpu_count; + VkResult err = vkEnumeratePhysicalDevices(g_Instance, &gpu_count, nullptr); + check_vk_result(err); + IM_ASSERT(gpu_count > 0); + + ImVector gpus; + gpus.resize(gpu_count); + err = vkEnumeratePhysicalDevices(g_Instance, &gpu_count, gpus.Data); + check_vk_result(err); + + // If a number >1 of GPUs got reported, find discrete GPU if present, or use first one available. This covers + // most common cases (multi-gpu/integrated+dedicated graphics). Handling more complicated setups (multiple + // dedicated GPUs) is out of scope of this sample. + for (VkPhysicalDevice& device : gpus) + { + VkPhysicalDeviceProperties properties; + vkGetPhysicalDeviceProperties(device, &properties); + if (properties.deviceType == VK_PHYSICAL_DEVICE_TYPE_DISCRETE_GPU) + return device; + } + + // Use first GPU (Integrated) is a Discrete one is not available. + if (gpu_count > 0) + return gpus[0]; + return VK_NULL_HANDLE; +} + +static void SetupVulkan(ImVector instance_extensions) +{ + VkResult err; +#ifdef IMGUI_IMPL_VULKAN_USE_VOLK + volkInitialize(); +#endif + + // Create Vulkan Instance + { + VkInstanceCreateInfo create_info = {}; + create_info.sType = VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO; + + // Enumerate available extensions + uint32_t properties_count; + ImVector properties; + vkEnumerateInstanceExtensionProperties(nullptr, &properties_count, nullptr); + properties.resize(properties_count); + err = vkEnumerateInstanceExtensionProperties(nullptr, &properties_count, properties.Data); + check_vk_result(err); + + // Enable required extensions + if (IsExtensionAvailable(properties, VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME)) + instance_extensions.push_back(VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME); +#ifdef VK_KHR_PORTABILITY_ENUMERATION_EXTENSION_NAME + if (IsExtensionAvailable(properties, VK_KHR_PORTABILITY_ENUMERATION_EXTENSION_NAME)) + { + instance_extensions.push_back(VK_KHR_PORTABILITY_ENUMERATION_EXTENSION_NAME); + create_info.flags |= VK_INSTANCE_CREATE_ENUMERATE_PORTABILITY_BIT_KHR; + } +#endif + + // Enabling validation layers +#ifdef APP_USE_VULKAN_DEBUG_REPORT + const char* layers[] = { "VK_LAYER_KHRONOS_validation" }; + create_info.enabledLayerCount = 1; + create_info.ppEnabledLayerNames = layers; + instance_extensions.push_back("VK_EXT_debug_report"); +#endif + + // Create Vulkan Instance + create_info.enabledExtensionCount = (uint32_t)instance_extensions.Size; + create_info.ppEnabledExtensionNames = instance_extensions.Data; + err = vkCreateInstance(&create_info, g_Allocator, &g_Instance); + check_vk_result(err); +#ifdef IMGUI_IMPL_VULKAN_USE_VOLK + volkLoadInstance(g_Instance); +#endif + + // Setup the debug report callback +#ifdef APP_USE_VULKAN_DEBUG_REPORT + auto f_vkCreateDebugReportCallbackEXT = (PFN_vkCreateDebugReportCallbackEXT)vkGetInstanceProcAddr(g_Instance, "vkCreateDebugReportCallbackEXT"); + IM_ASSERT(f_vkCreateDebugReportCallbackEXT != nullptr); + VkDebugReportCallbackCreateInfoEXT debug_report_ci = {}; + debug_report_ci.sType = VK_STRUCTURE_TYPE_DEBUG_REPORT_CALLBACK_CREATE_INFO_EXT; + debug_report_ci.flags = VK_DEBUG_REPORT_ERROR_BIT_EXT | VK_DEBUG_REPORT_WARNING_BIT_EXT | VK_DEBUG_REPORT_PERFORMANCE_WARNING_BIT_EXT; + debug_report_ci.pfnCallback = debug_report; + debug_report_ci.pUserData = nullptr; + err = f_vkCreateDebugReportCallbackEXT(g_Instance, &debug_report_ci, g_Allocator, &g_DebugReport); + check_vk_result(err); +#endif + } + + // Select Physical Device (GPU) + g_PhysicalDevice = SetupVulkan_SelectPhysicalDevice(); + + // Select graphics queue family + { + uint32_t count; + vkGetPhysicalDeviceQueueFamilyProperties(g_PhysicalDevice, &count, nullptr); + VkQueueFamilyProperties* queues = (VkQueueFamilyProperties*)malloc(sizeof(VkQueueFamilyProperties) * count); + vkGetPhysicalDeviceQueueFamilyProperties(g_PhysicalDevice, &count, queues); + for (uint32_t i = 0; i < count; i++) + if (queues[i].queueFlags & VK_QUEUE_GRAPHICS_BIT) + { + g_QueueFamily = i; + break; + } + free(queues); + IM_ASSERT(g_QueueFamily != (uint32_t)-1); + } + + // Create Logical Device (with 1 queue) + { + ImVector device_extensions; + device_extensions.push_back("VK_KHR_swapchain"); + + // Enumerate physical device extension + uint32_t properties_count; + ImVector properties; + vkEnumerateDeviceExtensionProperties(g_PhysicalDevice, nullptr, &properties_count, nullptr); + properties.resize(properties_count); + vkEnumerateDeviceExtensionProperties(g_PhysicalDevice, nullptr, &properties_count, properties.Data); +#ifdef VK_KHR_PORTABILITY_SUBSET_EXTENSION_NAME + if (IsExtensionAvailable(properties, VK_KHR_PORTABILITY_SUBSET_EXTENSION_NAME)) + device_extensions.push_back(VK_KHR_PORTABILITY_SUBSET_EXTENSION_NAME); +#endif + + const float queue_priority[] = { 1.0f }; + VkDeviceQueueCreateInfo queue_info[1] = {}; + queue_info[0].sType = VK_STRUCTURE_TYPE_DEVICE_QUEUE_CREATE_INFO; + queue_info[0].queueFamilyIndex = g_QueueFamily; + queue_info[0].queueCount = 1; + queue_info[0].pQueuePriorities = queue_priority; + VkDeviceCreateInfo create_info = {}; + create_info.sType = VK_STRUCTURE_TYPE_DEVICE_CREATE_INFO; + create_info.queueCreateInfoCount = sizeof(queue_info) / sizeof(queue_info[0]); + create_info.pQueueCreateInfos = queue_info; + create_info.enabledExtensionCount = (uint32_t)device_extensions.Size; + create_info.ppEnabledExtensionNames = device_extensions.Data; + err = vkCreateDevice(g_PhysicalDevice, &create_info, g_Allocator, &g_Device); + check_vk_result(err); + vkGetDeviceQueue(g_Device, g_QueueFamily, 0, &g_Queue); + } + + // Create Descriptor Pool + // The example only requires a single combined image sampler descriptor for the font image and only uses one descriptor set (for that) + // If you wish to load e.g. additional textures you may need to alter pools sizes. + { + VkDescriptorPoolSize pool_sizes[] = + { + { VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER, 1 }, + }; + VkDescriptorPoolCreateInfo pool_info = {}; + pool_info.sType = VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_CREATE_INFO; + pool_info.flags = VK_DESCRIPTOR_POOL_CREATE_FREE_DESCRIPTOR_SET_BIT; + pool_info.maxSets = 1; + pool_info.poolSizeCount = (uint32_t)IM_ARRAYSIZE(pool_sizes); + pool_info.pPoolSizes = pool_sizes; + err = vkCreateDescriptorPool(g_Device, &pool_info, g_Allocator, &g_DescriptorPool); + check_vk_result(err); + } +} + +// All the ImGui_ImplVulkanH_XXX structures/functions are optional helpers used by the demo. +// Your real engine/app may not use them. +static void SetupVulkanWindow(ImGui_ImplVulkanH_Window* wd, VkSurfaceKHR surface, int width, int height) +{ + wd->Surface = surface; + + // Check for WSI support + VkBool32 res; + vkGetPhysicalDeviceSurfaceSupportKHR(g_PhysicalDevice, g_QueueFamily, wd->Surface, &res); + if (res != VK_TRUE) + { + fprintf(stderr, "Error no WSI support on physical device 0\n"); + exit(-1); + } + + // Select Surface Format + const VkFormat requestSurfaceImageFormat[] = { VK_FORMAT_B8G8R8A8_UNORM, VK_FORMAT_R8G8B8A8_UNORM, VK_FORMAT_B8G8R8_UNORM, VK_FORMAT_R8G8B8_UNORM }; + const VkColorSpaceKHR requestSurfaceColorSpace = VK_COLORSPACE_SRGB_NONLINEAR_KHR; + wd->SurfaceFormat = ImGui_ImplVulkanH_SelectSurfaceFormat(g_PhysicalDevice, wd->Surface, requestSurfaceImageFormat, (size_t)IM_ARRAYSIZE(requestSurfaceImageFormat), requestSurfaceColorSpace); + + // Select Present Mode +#ifdef APP_USE_UNLIMITED_FRAME_RATE + VkPresentModeKHR present_modes[] = { VK_PRESENT_MODE_MAILBOX_KHR, VK_PRESENT_MODE_IMMEDIATE_KHR, VK_PRESENT_MODE_FIFO_KHR }; +#else + VkPresentModeKHR present_modes[] = { VK_PRESENT_MODE_FIFO_KHR }; +#endif + wd->PresentMode = ImGui_ImplVulkanH_SelectPresentMode(g_PhysicalDevice, wd->Surface, &present_modes[0], IM_ARRAYSIZE(present_modes)); + //printf("[vulkan] Selected PresentMode = %d\n", wd->PresentMode); + + // Create SwapChain, RenderPass, Framebuffer, etc. + IM_ASSERT(g_MinImageCount >= 2); + ImGui_ImplVulkanH_CreateOrResizeWindow(g_Instance, g_PhysicalDevice, g_Device, wd, g_QueueFamily, g_Allocator, width, height, g_MinImageCount); +} + +static void CleanupVulkan() +{ + vkDestroyDescriptorPool(g_Device, g_DescriptorPool, g_Allocator); + +#ifdef APP_USE_VULKAN_DEBUG_REPORT + // Remove the debug report callback + auto f_vkDestroyDebugReportCallbackEXT = (PFN_vkDestroyDebugReportCallbackEXT)vkGetInstanceProcAddr(g_Instance, "vkDestroyDebugReportCallbackEXT"); + f_vkDestroyDebugReportCallbackEXT(g_Instance, g_DebugReport, g_Allocator); +#endif // APP_USE_VULKAN_DEBUG_REPORT + + vkDestroyDevice(g_Device, g_Allocator); + vkDestroyInstance(g_Instance, g_Allocator); +} + +static void CleanupVulkanWindow() +{ + ImGui_ImplVulkanH_DestroyWindow(g_Instance, g_Device, &g_MainWindowData, g_Allocator); +} + +static void FrameRender(ImGui_ImplVulkanH_Window* wd, ImDrawData* draw_data) +{ + VkResult err; + + VkSemaphore image_acquired_semaphore = wd->FrameSemaphores[wd->SemaphoreIndex].ImageAcquiredSemaphore; + VkSemaphore render_complete_semaphore = wd->FrameSemaphores[wd->SemaphoreIndex].RenderCompleteSemaphore; + err = vkAcquireNextImageKHR(g_Device, wd->Swapchain, UINT64_MAX, image_acquired_semaphore, VK_NULL_HANDLE, &wd->FrameIndex); + if (err == VK_ERROR_OUT_OF_DATE_KHR || err == VK_SUBOPTIMAL_KHR) + { + g_SwapChainRebuild = true; + return; + } + check_vk_result(err); + + ImGui_ImplVulkanH_Frame* fd = &wd->Frames[wd->FrameIndex]; + { + err = vkWaitForFences(g_Device, 1, &fd->Fence, VK_TRUE, UINT64_MAX); // wait indefinitely instead of periodically checking + check_vk_result(err); + + err = vkResetFences(g_Device, 1, &fd->Fence); + check_vk_result(err); + } + { + err = vkResetCommandPool(g_Device, fd->CommandPool, 0); + check_vk_result(err); + VkCommandBufferBeginInfo info = {}; + info.sType = VK_STRUCTURE_TYPE_COMMAND_BUFFER_BEGIN_INFO; + info.flags |= VK_COMMAND_BUFFER_USAGE_ONE_TIME_SUBMIT_BIT; + err = vkBeginCommandBuffer(fd->CommandBuffer, &info); + check_vk_result(err); + } + { + VkRenderPassBeginInfo info = {}; + info.sType = VK_STRUCTURE_TYPE_RENDER_PASS_BEGIN_INFO; + info.renderPass = wd->RenderPass; + info.framebuffer = fd->Framebuffer; + info.renderArea.extent.width = wd->Width; + info.renderArea.extent.height = wd->Height; + info.clearValueCount = 1; + info.pClearValues = &wd->ClearValue; + vkCmdBeginRenderPass(fd->CommandBuffer, &info, VK_SUBPASS_CONTENTS_INLINE); + } + + // Record dear imgui primitives into command buffer + ImGui_ImplVulkan_RenderDrawData(draw_data, fd->CommandBuffer); + + // Submit command buffer + vkCmdEndRenderPass(fd->CommandBuffer); + { + VkPipelineStageFlags wait_stage = VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT; + VkSubmitInfo info = {}; + info.sType = VK_STRUCTURE_TYPE_SUBMIT_INFO; + info.waitSemaphoreCount = 1; + info.pWaitSemaphores = &image_acquired_semaphore; + info.pWaitDstStageMask = &wait_stage; + info.commandBufferCount = 1; + info.pCommandBuffers = &fd->CommandBuffer; + info.signalSemaphoreCount = 1; + info.pSignalSemaphores = &render_complete_semaphore; + + err = vkEndCommandBuffer(fd->CommandBuffer); + check_vk_result(err); + err = vkQueueSubmit(g_Queue, 1, &info, fd->Fence); + check_vk_result(err); + } +} + +static void FramePresent(ImGui_ImplVulkanH_Window* wd) +{ + if (g_SwapChainRebuild) + return; + VkSemaphore render_complete_semaphore = wd->FrameSemaphores[wd->SemaphoreIndex].RenderCompleteSemaphore; + VkPresentInfoKHR info = {}; + info.sType = VK_STRUCTURE_TYPE_PRESENT_INFO_KHR; + info.waitSemaphoreCount = 1; + info.pWaitSemaphores = &render_complete_semaphore; + info.swapchainCount = 1; + info.pSwapchains = &wd->Swapchain; + info.pImageIndices = &wd->FrameIndex; + VkResult err = vkQueuePresentKHR(g_Queue, &info); + if (err == VK_ERROR_OUT_OF_DATE_KHR || err == VK_SUBOPTIMAL_KHR) + { + g_SwapChainRebuild = true; + return; + } + check_vk_result(err); + wd->SemaphoreIndex = (wd->SemaphoreIndex + 1) % wd->SemaphoreCount; // Now we can use the next set of semaphores +} + +// Main code +int main(int, char**) +{ + glfwSetErrorCallback(glfw_error_callback); + if (!glfwInit()) + return 1; + + // Create window with Vulkan context + glfwWindowHint(GLFW_CLIENT_API, GLFW_NO_API); + GLFWwindow* window = glfwCreateWindow(1280, 720, "Dear ImGui GLFW+Vulkan example", nullptr, nullptr); + if (!glfwVulkanSupported()) + { + printf("GLFW: Vulkan Not Supported\n"); + return 1; + } + + ImVector extensions; + uint32_t extensions_count = 0; + const char** glfw_extensions = glfwGetRequiredInstanceExtensions(&extensions_count); + for (uint32_t i = 0; i < extensions_count; i++) + extensions.push_back(glfw_extensions[i]); + SetupVulkan(extensions); + + // Create Window Surface + VkSurfaceKHR surface; + VkResult err = glfwCreateWindowSurface(g_Instance, window, g_Allocator, &surface); + check_vk_result(err); + + // Create Framebuffers + int w, h; + glfwGetFramebufferSize(window, &w, &h); + ImGui_ImplVulkanH_Window* wd = &g_MainWindowData; + SetupVulkanWindow(wd, surface, w, h); + + // Setup Dear ImGui context + IMGUI_CHECKVERSION(); + ImGui::CreateContext(); + ImGuiIO& io = ImGui::GetIO(); (void)io; + io.ConfigFlags |= ImGuiConfigFlags_NavEnableKeyboard; // Enable Keyboard Controls + io.ConfigFlags |= ImGuiConfigFlags_NavEnableGamepad; // Enable Gamepad Controls + io.ConfigFlags |= ImGuiConfigFlags_DockingEnable; // Enable Docking + io.ConfigFlags |= ImGuiConfigFlags_ViewportsEnable; // Enable Multi-Viewport / Platform Windows + //io.ConfigViewportsNoAutoMerge = true; + //io.ConfigViewportsNoTaskBarIcon = true; + + // Setup Dear ImGui style + ImGui::StyleColorsDark(); + //ImGui::StyleColorsLight(); + + // When viewports are enabled we tweak WindowRounding/WindowBg so platform windows can look identical to regular ones. + ImGuiStyle& style = ImGui::GetStyle(); + if (io.ConfigFlags & ImGuiConfigFlags_ViewportsEnable) + { + style.WindowRounding = 0.0f; + style.Colors[ImGuiCol_WindowBg].w = 1.0f; + } + + // Setup Platform/Renderer backends + ImGui_ImplGlfw_InitForVulkan(window, true); + ImGui_ImplVulkan_InitInfo init_info = {}; + init_info.Instance = g_Instance; + init_info.PhysicalDevice = g_PhysicalDevice; + init_info.Device = g_Device; + init_info.QueueFamily = g_QueueFamily; + init_info.Queue = g_Queue; + init_info.PipelineCache = g_PipelineCache; + init_info.DescriptorPool = g_DescriptorPool; + init_info.RenderPass = wd->RenderPass; + init_info.Subpass = 0; + init_info.MinImageCount = g_MinImageCount; + init_info.ImageCount = wd->ImageCount; + init_info.MSAASamples = VK_SAMPLE_COUNT_1_BIT; + init_info.Allocator = g_Allocator; + init_info.CheckVkResultFn = check_vk_result; + ImGui_ImplVulkan_Init(&init_info); + + // Load Fonts + // - If no fonts are loaded, dear imgui will use the default font. You can also load multiple fonts and use ImGui::PushFont()/PopFont() to select them. + // - AddFontFromFileTTF() will return the ImFont* so you can store it if you need to select the font among multiple. + // - If the file cannot be loaded, the function will return a nullptr. Please handle those errors in your application (e.g. use an assertion, or display an error and quit). + // - The fonts will be rasterized at a given size (w/ oversampling) and stored into a texture when calling ImFontAtlas::Build()/GetTexDataAsXXXX(), which ImGui_ImplXXXX_NewFrame below will call. + // - Use '#define IMGUI_ENABLE_FREETYPE' in your imconfig file to use Freetype for higher quality font rendering. + // - Read 'docs/FONTS.md' for more instructions and details. + // - Remember that in C/C++ if you want to include a backslash \ in a string literal you need to write a double backslash \\ ! + //io.Fonts->AddFontDefault(); + //io.Fonts->AddFontFromFileTTF("c:\\Windows\\Fonts\\segoeui.ttf", 18.0f); + //io.Fonts->AddFontFromFileTTF("../../misc/fonts/DroidSans.ttf", 16.0f); + //io.Fonts->AddFontFromFileTTF("../../misc/fonts/Roboto-Medium.ttf", 16.0f); + //io.Fonts->AddFontFromFileTTF("../../misc/fonts/Cousine-Regular.ttf", 15.0f); + //ImFont* font = io.Fonts->AddFontFromFileTTF("c:\\Windows\\Fonts\\ArialUni.ttf", 18.0f, nullptr, io.Fonts->GetGlyphRangesJapanese()); + //IM_ASSERT(font != nullptr); + + // Our state + bool show_demo_window = true; + bool show_another_window = false; + ImVec4 clear_color = ImVec4(0.45f, 0.55f, 0.60f, 1.00f); + + // Main loop + while (!glfwWindowShouldClose(window)) + { + // Poll and handle events (inputs, window resize, etc.) + // You can read the io.WantCaptureMouse, io.WantCaptureKeyboard flags to tell if dear imgui wants to use your inputs. + // - When io.WantCaptureMouse is true, do not dispatch mouse input data to your main application, or clear/overwrite your copy of the mouse data. + // - When io.WantCaptureKeyboard is true, do not dispatch keyboard input data to your main application, or clear/overwrite your copy of the keyboard data. + // Generally you may always pass all inputs to dear imgui, and hide them from your application based on those two flags. + glfwPollEvents(); + + // Resize swap chain? + int fb_width, fb_height; + glfwGetFramebufferSize(window, &fb_width, &fb_height); + if (fb_width > 0 && fb_height > 0 && (g_SwapChainRebuild || g_MainWindowData.Width != fb_width || g_MainWindowData.Height != fb_height)) + { + ImGui_ImplVulkan_SetMinImageCount(g_MinImageCount); + ImGui_ImplVulkanH_CreateOrResizeWindow(g_Instance, g_PhysicalDevice, g_Device, &g_MainWindowData, g_QueueFamily, g_Allocator, fb_width, fb_height, g_MinImageCount); + g_MainWindowData.FrameIndex = 0; + g_SwapChainRebuild = false; + } + + // Start the Dear ImGui frame + ImGui_ImplVulkan_NewFrame(); + ImGui_ImplGlfw_NewFrame(); + ImGui::NewFrame(); + + // 1. Show the big demo window (Most of the sample code is in ImGui::ShowDemoWindow()! You can browse its code to learn more about Dear ImGui!). + if (show_demo_window) + ImGui::ShowDemoWindow(&show_demo_window); + + // 2. Show a simple window that we create ourselves. We use a Begin/End pair to create a named window. + { + static float f = 0.0f; + static int counter = 0; + + ImGui::Begin("Hello, world!"); // Create a window called "Hello, world!" and append into it. + + ImGui::Text("This is some useful text."); // Display some text (you can use a format strings too) + ImGui::Checkbox("Demo Window", &show_demo_window); // Edit bools storing our window open/close state + ImGui::Checkbox("Another Window", &show_another_window); + + ImGui::SliderFloat("float", &f, 0.0f, 1.0f); // Edit 1 float using a slider from 0.0f to 1.0f + ImGui::ColorEdit3("clear color", (float*)&clear_color); // Edit 3 floats representing a color + + if (ImGui::Button("Button")) // Buttons return true when clicked (most widgets return true when edited/activated) + counter++; + ImGui::SameLine(); + ImGui::Text("counter = %d", counter); + + ImGui::Text("Application average %.3f ms/frame (%.1f FPS)", 1000.0f / io.Framerate, io.Framerate); + ImGui::End(); + } + + // 3. Show another simple window. + if (show_another_window) + { + ImGui::Begin("Another Window", &show_another_window); // Pass a pointer to our bool variable (the window will have a closing button that will clear the bool when clicked) + ImGui::Text("Hello from another window!"); + if (ImGui::Button("Close Me")) + show_another_window = false; + ImGui::End(); + } + + // Rendering + ImGui::Render(); + ImDrawData* main_draw_data = ImGui::GetDrawData(); + const bool main_is_minimized = (main_draw_data->DisplaySize.x <= 0.0f || main_draw_data->DisplaySize.y <= 0.0f); + wd->ClearValue.color.float32[0] = clear_color.x * clear_color.w; + wd->ClearValue.color.float32[1] = clear_color.y * clear_color.w; + wd->ClearValue.color.float32[2] = clear_color.z * clear_color.w; + wd->ClearValue.color.float32[3] = clear_color.w; + if (!main_is_minimized) + FrameRender(wd, main_draw_data); + + // Update and Render additional Platform Windows + if (io.ConfigFlags & ImGuiConfigFlags_ViewportsEnable) + { + ImGui::UpdatePlatformWindows(); + ImGui::RenderPlatformWindowsDefault(); + } + + // Present Main Platform Window + if (!main_is_minimized) + FramePresent(wd); + } + + // Cleanup + err = vkDeviceWaitIdle(g_Device); + check_vk_result(err); + ImGui_ImplVulkan_Shutdown(); + ImGui_ImplGlfw_Shutdown(); + ImGui::DestroyContext(); + + CleanupVulkanWindow(); + CleanupVulkan(); + + glfwDestroyWindow(window); + glfwTerminate(); + + return 0; +} diff --git a/External/imgui-docking/examples/example_glfw_wgpu/CMakeLists.txt b/External/imgui-docking/examples/example_glfw_wgpu/CMakeLists.txt new file mode 100644 index 0000000..e682836 --- /dev/null +++ b/External/imgui-docking/examples/example_glfw_wgpu/CMakeLists.txt @@ -0,0 +1,100 @@ +# Building for desktop (WebGPU-native) with Dawn: +# 1. git clone https://github.com/google/dawn dawn +# 2. cmake -B build -DIMGUI_DAWN_DIR=dawn +# 3. cmake --build build +# The resulting binary will be found at one of the following locations: +# * build/Debug/example_glfw_wgpu[.exe] +# * build/example_glfw_wgpu[.exe] + +# Building for Emscripten: +# 1. Install Emscripten SDK following the instructions: https://emscripten.org/docs/getting_started/downloads.html +# 2. Install Ninja build system +# 3. emcmake cmake -G Ninja -B build +# 3. cmake --build build +# 4. emrun build/index.html + +cmake_minimum_required(VERSION 3.10.2) +project(imgui_example_glfw_wgpu C CXX) + +if(NOT CMAKE_BUILD_TYPE) + set(CMAKE_BUILD_TYPE Debug CACHE STRING "" FORCE) +endif() + +set(CMAKE_CXX_STANDARD 17) # Dawn requires C++17 + +# Dear ImGui +set(IMGUI_DIR ../../) + +# Libraries +if(EMSCRIPTEN) + set(LIBRARIES glfw) + add_compile_options(-sDISABLE_EXCEPTION_CATCHING=1 -DIMGUI_DISABLE_FILE_FUNCTIONS=1) +else() + # Dawn wgpu desktop + set(DAWN_FETCH_DEPENDENCIES ON) + set(IMGUI_DAWN_DIR CACHE PATH "Path to Dawn repository") + if (NOT IMGUI_DAWN_DIR) + message(FATAL_ERROR "Please specify the Dawn repository by setting IMGUI_DAWN_DIR") + endif() + + option(DAWN_FETCH_DEPENDENCIES "Use fetch_dawn_dependencies.py as an alternative to using depot_tools" ON) + + # Dawn builds many things by default - disable things we don't need + option(DAWN_BUILD_SAMPLES "Enables building Dawn's samples" OFF) + option(TINT_BUILD_CMD_TOOLS "Build the Tint command line tools" OFF) + option(TINT_BUILD_DOCS "Build documentation" OFF) + option(TINT_BUILD_TESTS "Build tests" OFF) + if (NOT APPLE) + option(TINT_BUILD_MSL_WRITER "Build the MSL output writer" OFF) + endif() + if(WIN32) + option(TINT_BUILD_SPV_READER "Build the SPIR-V input reader" OFF) + option(TINT_BUILD_WGSL_READER "Build the WGSL input reader" ON) + option(TINT_BUILD_GLSL_WRITER "Build the GLSL output writer" OFF) + option(TINT_BUILD_GLSL_VALIDATOR "Build the GLSL output validator" OFF) + option(TINT_BUILD_SPV_WRITER "Build the SPIR-V output writer" OFF) + option(TINT_BUILD_WGSL_WRITER "Build the WGSL output writer" ON) + endif() + + add_subdirectory("${IMGUI_DAWN_DIR}" "${CMAKE_CURRENT_BINARY_DIR}/dawn" EXCLUDE_FROM_ALL) + + set(LIBRARIES webgpu_dawn webgpu_cpp webgpu_glfw glfw) +endif() + +add_executable(example_glfw_wgpu + main.cpp + # backend files + ${IMGUI_DIR}/backends/imgui_impl_glfw.cpp + ${IMGUI_DIR}/backends/imgui_impl_wgpu.cpp + # Dear ImGui files + ${IMGUI_DIR}/imgui.cpp + ${IMGUI_DIR}/imgui_draw.cpp + ${IMGUI_DIR}/imgui_demo.cpp + ${IMGUI_DIR}/imgui_tables.cpp + ${IMGUI_DIR}/imgui_widgets.cpp +) +target_include_directories(example_glfw_wgpu PUBLIC + ${IMGUI_DIR} + ${IMGUI_DIR}/backends +) + +target_link_libraries(example_glfw_wgpu PUBLIC ${LIBRARIES}) + +# Emscripten settings +if(EMSCRIPTEN) + target_link_options(example_glfw_wgpu PRIVATE + "-sUSE_WEBGPU=1" + "-sUSE_GLFW=3" + "-sWASM=1" + "-sALLOW_MEMORY_GROWTH=1" + "-sNO_EXIT_RUNTIME=0" + "-sASSERTIONS=1" + "-sDISABLE_EXCEPTION_CATCHING=1" + "-sNO_FILESYSTEM=1" + ) + set_target_properties(example_glfw_wgpu PROPERTIES OUTPUT_NAME "index") + # copy our custom index.html to build directory + add_custom_command(TARGET example_glfw_wgpu POST_BUILD + COMMAND ${CMAKE_COMMAND} -E copy_if_different "${CMAKE_CURRENT_LIST_DIR}/web/index.html" $ + ) +endif() diff --git a/External/imgui-docking/examples/example_glfw_wgpu/Makefile.emscripten b/External/imgui-docking/examples/example_glfw_wgpu/Makefile.emscripten new file mode 100644 index 0000000..5c79f0c --- /dev/null +++ b/External/imgui-docking/examples/example_glfw_wgpu/Makefile.emscripten @@ -0,0 +1,88 @@ +# +# Makefile to use with emscripten +# See https://emscripten.org/docs/getting_started/downloads.html +# for installation instructions. +# +# This Makefile assumes you have loaded emscripten's environment. +# (On Windows, you may need to execute emsdk_env.bat or encmdprompt.bat ahead) +# +# Running `make` will produce three files: +# - web/index.html (current stored in the repository) +# - web/index.js +# - web/index.wasm +# +# All three are needed to run the demo. + +CC = emcc +CXX = em++ +WEB_DIR = web +EXE = $(WEB_DIR)/index.js +IMGUI_DIR = ../.. +SOURCES = main.cpp +SOURCES += $(IMGUI_DIR)/imgui.cpp $(IMGUI_DIR)/imgui_demo.cpp $(IMGUI_DIR)/imgui_draw.cpp $(IMGUI_DIR)/imgui_tables.cpp $(IMGUI_DIR)/imgui_widgets.cpp +SOURCES += $(IMGUI_DIR)/backends/imgui_impl_glfw.cpp $(IMGUI_DIR)/backends/imgui_impl_wgpu.cpp +OBJS = $(addsuffix .o, $(basename $(notdir $(SOURCES)))) +UNAME_S := $(shell uname -s) +CPPFLAGS = +LDFLAGS = +EMS = + +##--------------------------------------------------------------------- +## EMSCRIPTEN OPTIONS +##--------------------------------------------------------------------- + +# ("EMS" options gets added to both CPPFLAGS and LDFLAGS, whereas some options are for linker only) +EMS += -s DISABLE_EXCEPTION_CATCHING=1 +LDFLAGS += -s USE_GLFW=3 -s USE_WEBGPU=1 +LDFLAGS += -s WASM=1 -s ALLOW_MEMORY_GROWTH=1 -s NO_EXIT_RUNTIME=0 -s ASSERTIONS=1 + +# Emscripten allows preloading a file or folder to be accessible at runtime. +# The Makefile for this example project suggests embedding the misc/fonts/ folder into our application, it will then be accessible as "/fonts" +# See documentation for more details: https://emscripten.org/docs/porting/files/packaging_files.html +# (Default value is 0. Set to 1 to enable file-system and include the misc/fonts/ folder as part of the build.) +USE_FILE_SYSTEM ?= 0 +ifeq ($(USE_FILE_SYSTEM), 0) +LDFLAGS += -s NO_FILESYSTEM=1 +CPPFLAGS += -DIMGUI_DISABLE_FILE_FUNCTIONS +endif +ifeq ($(USE_FILE_SYSTEM), 1) +LDFLAGS += --no-heap-copy --preload-file ../../misc/fonts@/fonts +endif + +##--------------------------------------------------------------------- +## FINAL BUILD FLAGS +##--------------------------------------------------------------------- + +CPPFLAGS += -I$(IMGUI_DIR) -I$(IMGUI_DIR)/backends +#CPPFLAGS += -g +CPPFLAGS += -Wall -Wformat -Os $(EMS) +#LDFLAGS += --shell-file shell_minimal.html +LDFLAGS += $(EMS) + +##--------------------------------------------------------------------- +## BUILD RULES +##--------------------------------------------------------------------- + +%.o:%.cpp + $(CXX) $(CPPFLAGS) $(CXXFLAGS) -c -o $@ $< + +%.o:$(IMGUI_DIR)/%.cpp + $(CXX) $(CPPFLAGS) $(CXXFLAGS) -c -o $@ $< + +%.o:$(IMGUI_DIR)/backends/%.cpp + $(CXX) $(CPPFLAGS) $(CXXFLAGS) -c -o $@ $< + +all: $(EXE) + @echo Build complete for $(EXE) + +$(WEB_DIR): + mkdir $@ + +serve: all + python3 -m http.server -d $(WEB_DIR) + +$(EXE): $(OBJS) $(WEB_DIR) + $(CXX) -o $@ $(OBJS) $(LDFLAGS) + +clean: + rm -f $(EXE) $(OBJS) $(WEB_DIR)/*.js $(WEB_DIR)/*.wasm $(WEB_DIR)/*.wasm.pre diff --git a/External/imgui-docking/examples/example_glfw_wgpu/README.md b/External/imgui-docking/examples/example_glfw_wgpu/README.md new file mode 100644 index 0000000..399d431 --- /dev/null +++ b/External/imgui-docking/examples/example_glfw_wgpu/README.md @@ -0,0 +1,24 @@ +## How to Build + +- You need to install Emscripten from https://emscripten.org/docs/getting_started/downloads.html, and have the environment variables set, as described in https://emscripten.org/docs/getting_started/downloads.html#installation-instructions + +- Depending on your configuration, in Windows you may need to run `emsdk/emsdk_env.bat` in your console to access the Emscripten command-line tools. + +- You may also refer to our [Continuous Integration setup](https://github.com/ocornut/imgui/tree/master/.github/workflows) for Emscripten setup. + +- Then build using `make -f Makefile.emscripten` while in the `example_glfw_wgpu/` directory. + +- Requires recent Emscripten as WGPU is still a work-in-progress API. + +## How to Run + +To run on a local machine: +- Make sure your browse supports WGPU and it is enabled. WGPU is still WIP not enabled by default in most browser. +- `make serve` will use Python3 to spawn a local webserver, you can then browse http://localhost:8000 to access your build. +- Otherwise, generally you will need a local webserver: + - Quoting [https://emscripten.org/docs/getting_started](https://emscripten.org/docs/getting_started/Tutorial.html#generating-html):
    +_"Unfortunately several browsers (including Chrome, Safari, and Internet Explorer) do not support file:// [XHR](https://emscripten.org/docs/site/glossary.html#term-xhr) requests, and can’t load extra files needed by the HTML (like a .wasm file, or packaged file data as mentioned lower down). For these browsers you’ll need to serve the files using a [local webserver](https://emscripten.org/docs/getting_started/FAQ.html#faq-local-webserver) and then open http://localhost:8000/hello.html."_ + - Emscripten SDK has a handy `emrun` command: `emrun web/example_glfw_wgpu.html --browser firefox` which will spawn a temporary local webserver (in Firefox). See https://emscripten.org/docs/compiling/Running-html-files-with-emrun.html for details. + - You may use Python 3 builtin webserver: `python -m http.server -d web` (this is what `make serve` uses). + - You may use Python 2 builtin webserver: `cd web && python -m SimpleHTTPServer`. + - If you are accessing the files over a network, certain browsers, such as Firefox, will restrict Gamepad API access to secure contexts only (e.g. https only). diff --git a/External/imgui-docking/examples/example_glfw_wgpu/main.cpp b/External/imgui-docking/examples/example_glfw_wgpu/main.cpp new file mode 100644 index 0000000..9a079f5 --- /dev/null +++ b/External/imgui-docking/examples/example_glfw_wgpu/main.cpp @@ -0,0 +1,346 @@ +// Dear ImGui: standalone example application for using GLFW + WebGPU +// - Emscripten is supported for publishing on web. See https://emscripten.org. +// - Dawn is used as a WebGPU implementation on desktop. + +// Learn about Dear ImGui: +// - FAQ https://dearimgui.com/faq +// - Getting Started https://dearimgui.com/getting-started +// - Documentation https://dearimgui.com/docs (same as your local docs/ folder). +// - Introduction, links and more at the top of imgui.cpp + +#include "imgui.h" +#include "imgui_impl_glfw.h" +#include "imgui_impl_wgpu.h" +#include + +#ifdef __EMSCRIPTEN__ +#include +#include +#include +#else +#include +#endif + +#include +#include +#include + +// This example can also compile and run with Emscripten! See 'Makefile.emscripten' for details. +#ifdef __EMSCRIPTEN__ +#include "../libs/emscripten/emscripten_mainloop_stub.h" +#endif + +// Global WebGPU required states +static WGPUInstance wgpu_instance = nullptr; +static WGPUDevice wgpu_device = nullptr; +static WGPUSurface wgpu_surface = nullptr; +static WGPUTextureFormat wgpu_preferred_fmt = WGPUTextureFormat_RGBA8Unorm; +static WGPUSwapChain wgpu_swap_chain = nullptr; +static int wgpu_swap_chain_width = 1280; +static int wgpu_swap_chain_height = 720; + +// Forward declarations +static bool InitWGPU(GLFWwindow* window); +static void CreateSwapChain(int width, int height); + +static void glfw_error_callback(int error, const char* description) +{ + printf("GLFW Error %d: %s\n", error, description); +} + +static void wgpu_error_callback(WGPUErrorType error_type, const char* message, void*) +{ + const char* error_type_lbl = ""; + switch (error_type) + { + case WGPUErrorType_Validation: error_type_lbl = "Validation"; break; + case WGPUErrorType_OutOfMemory: error_type_lbl = "Out of memory"; break; + case WGPUErrorType_Unknown: error_type_lbl = "Unknown"; break; + case WGPUErrorType_DeviceLost: error_type_lbl = "Device lost"; break; + default: error_type_lbl = "Unknown"; + } + printf("%s error: %s\n", error_type_lbl, message); +} + +// Main code +int main(int, char**) +{ + glfwSetErrorCallback(glfw_error_callback); + if (!glfwInit()) + return 1; + + // Make sure GLFW does not initialize any graphics context. + // This needs to be done explicitly later. + glfwWindowHint(GLFW_CLIENT_API, GLFW_NO_API); + GLFWwindow* window = glfwCreateWindow(wgpu_swap_chain_width, wgpu_swap_chain_height, "Dear ImGui GLFW+WebGPU example", nullptr, nullptr); + if (window == nullptr) + return 1; + + // Initialize the WebGPU environment + if (!InitWGPU(window)) + { + if (window) + glfwDestroyWindow(window); + glfwTerminate(); + return 1; + } + CreateSwapChain(wgpu_swap_chain_width, wgpu_swap_chain_height); + glfwShowWindow(window); + + // Setup Dear ImGui context + IMGUI_CHECKVERSION(); + ImGui::CreateContext(); + ImGuiIO& io = ImGui::GetIO(); (void)io; + io.ConfigFlags |= ImGuiConfigFlags_NavEnableKeyboard; // Enable Keyboard Controls + io.ConfigFlags |= ImGuiConfigFlags_NavEnableGamepad; // Enable Gamepad Controls + io.ConfigFlags |= ImGuiConfigFlags_DockingEnable; // Enable Docking + + // Setup Dear ImGui style + ImGui::StyleColorsDark(); + //ImGui::StyleColorsLight(); + + // Setup Platform/Renderer backends + ImGui_ImplGlfw_InitForOther(window, true); +#ifdef __EMSCRIPTEN__ + ImGui_ImplGlfw_InstallEmscriptenCanvasResizeCallback("#canvas"); +#endif + ImGui_ImplWGPU_InitInfo init_info; + init_info.Device = wgpu_device; + init_info.NumFramesInFlight = 3; + init_info.RenderTargetFormat = wgpu_preferred_fmt; + init_info.DepthStencilFormat = WGPUTextureFormat_Undefined; + ImGui_ImplWGPU_Init(&init_info); + + // Load Fonts + // - If no fonts are loaded, dear imgui will use the default font. You can also load multiple fonts and use ImGui::PushFont()/PopFont() to select them. + // - AddFontFromFileTTF() will return the ImFont* so you can store it if you need to select the font among multiple. + // - If the file cannot be loaded, the function will return a nullptr. Please handle those errors in your application (e.g. use an assertion, or display an error and quit). + // - The fonts will be rasterized at a given size (w/ oversampling) and stored into a texture when calling ImFontAtlas::Build()/GetTexDataAsXXXX(), which ImGui_ImplXXXX_NewFrame below will call. + // - Use '#define IMGUI_ENABLE_FREETYPE' in your imconfig file to use Freetype for higher quality font rendering. + // - Read 'docs/FONTS.md' for more instructions and details. + // - Remember that in C/C++ if you want to include a backslash \ in a string literal you need to write a double backslash \\ ! + // - Emscripten allows preloading a file or folder to be accessible at runtime. See Makefile for details. + //io.Fonts->AddFontDefault(); +#ifndef IMGUI_DISABLE_FILE_FUNCTIONS + //io.Fonts->AddFontFromFileTTF("fonts/segoeui.ttf", 18.0f); + //io.Fonts->AddFontFromFileTTF("fonts/DroidSans.ttf", 16.0f); + //io.Fonts->AddFontFromFileTTF("fonts/Roboto-Medium.ttf", 16.0f); + //io.Fonts->AddFontFromFileTTF("fonts/Cousine-Regular.ttf", 15.0f); + //io.Fonts->AddFontFromFileTTF("fonts/ProggyTiny.ttf", 10.0f); + //ImFont* font = io.Fonts->AddFontFromFileTTF("fonts/ArialUni.ttf", 18.0f, nullptr, io.Fonts->GetGlyphRangesJapanese()); + //IM_ASSERT(font != nullptr); +#endif + + // Our state + bool show_demo_window = true; + bool show_another_window = false; + ImVec4 clear_color = ImVec4(0.45f, 0.55f, 0.60f, 1.00f); + + // Main loop +#ifdef __EMSCRIPTEN__ + // For an Emscripten build we are disabling file-system access, so let's not attempt to do a fopen() of the imgui.ini file. + // You may manually call LoadIniSettingsFromMemory() to load settings from your own storage. + io.IniFilename = nullptr; + EMSCRIPTEN_MAINLOOP_BEGIN +#else + while (!glfwWindowShouldClose(window)) +#endif + { + // Poll and handle events (inputs, window resize, etc.) + // You can read the io.WantCaptureMouse, io.WantCaptureKeyboard flags to tell if dear imgui wants to use your inputs. + // - When io.WantCaptureMouse is true, do not dispatch mouse input data to your main application, or clear/overwrite your copy of the mouse data. + // - When io.WantCaptureKeyboard is true, do not dispatch keyboard input data to your main application, or clear/overwrite your copy of the keyboard data. + // Generally you may always pass all inputs to dear imgui, and hide them from your application based on those two flags. + glfwPollEvents(); + + // React to changes in screen size + int width, height; + glfwGetFramebufferSize((GLFWwindow*)window, &width, &height); + if (width != wgpu_swap_chain_width || height != wgpu_swap_chain_height) + { + ImGui_ImplWGPU_InvalidateDeviceObjects(); + CreateSwapChain(width, height); + ImGui_ImplWGPU_CreateDeviceObjects(); + } + + // Start the Dear ImGui frame + ImGui_ImplWGPU_NewFrame(); + ImGui_ImplGlfw_NewFrame(); + ImGui::NewFrame(); + + // 1. Show the big demo window (Most of the sample code is in ImGui::ShowDemoWindow()! You can browse its code to learn more about Dear ImGui!). + if (show_demo_window) + ImGui::ShowDemoWindow(&show_demo_window); + + // 2. Show a simple window that we create ourselves. We use a Begin/End pair to create a named window. + { + static float f = 0.0f; + static int counter = 0; + + ImGui::Begin("Hello, world!"); // Create a window called "Hello, world!" and append into it. + + ImGui::Text("This is some useful text."); // Display some text (you can use a format strings too) + ImGui::Checkbox("Demo Window", &show_demo_window); // Edit bools storing our window open/close state + ImGui::Checkbox("Another Window", &show_another_window); + + ImGui::SliderFloat("float", &f, 0.0f, 1.0f); // Edit 1 float using a slider from 0.0f to 1.0f + ImGui::ColorEdit3("clear color", (float*)&clear_color); // Edit 3 floats representing a color + + if (ImGui::Button("Button")) // Buttons return true when clicked (most widgets return true when edited/activated) + counter++; + ImGui::SameLine(); + ImGui::Text("counter = %d", counter); + + ImGui::Text("Application average %.3f ms/frame (%.1f FPS)", 1000.0f / io.Framerate, io.Framerate); + ImGui::End(); + } + + // 3. Show another simple window. + if (show_another_window) + { + ImGui::Begin("Another Window", &show_another_window); // Pass a pointer to our bool variable (the window will have a closing button that will clear the bool when clicked) + ImGui::Text("Hello from another window!"); + if (ImGui::Button("Close Me")) + show_another_window = false; + ImGui::End(); + } + + // Rendering + ImGui::Render(); + +#ifndef __EMSCRIPTEN__ + // Tick needs to be called in Dawn to display validation errors + wgpuDeviceTick(wgpu_device); +#endif + + WGPURenderPassColorAttachment color_attachments = {}; + color_attachments.depthSlice = WGPU_DEPTH_SLICE_UNDEFINED; + color_attachments.loadOp = WGPULoadOp_Clear; + color_attachments.storeOp = WGPUStoreOp_Store; + color_attachments.clearValue = { clear_color.x * clear_color.w, clear_color.y * clear_color.w, clear_color.z * clear_color.w, clear_color.w }; + color_attachments.view = wgpuSwapChainGetCurrentTextureView(wgpu_swap_chain); + + WGPURenderPassDescriptor render_pass_desc = {}; + render_pass_desc.colorAttachmentCount = 1; + render_pass_desc.colorAttachments = &color_attachments; + render_pass_desc.depthStencilAttachment = nullptr; + + WGPUCommandEncoderDescriptor enc_desc = {}; + WGPUCommandEncoder encoder = wgpuDeviceCreateCommandEncoder(wgpu_device, &enc_desc); + + WGPURenderPassEncoder pass = wgpuCommandEncoderBeginRenderPass(encoder, &render_pass_desc); + ImGui_ImplWGPU_RenderDrawData(ImGui::GetDrawData(), pass); + wgpuRenderPassEncoderEnd(pass); + + WGPUCommandBufferDescriptor cmd_buffer_desc = {}; + WGPUCommandBuffer cmd_buffer = wgpuCommandEncoderFinish(encoder, &cmd_buffer_desc); + WGPUQueue queue = wgpuDeviceGetQueue(wgpu_device); + wgpuQueueSubmit(queue, 1, &cmd_buffer); + +#ifndef __EMSCRIPTEN__ + wgpuSwapChainPresent(wgpu_swap_chain); +#endif + + wgpuTextureViewRelease(color_attachments.view); + wgpuRenderPassEncoderRelease(pass); + wgpuCommandEncoderRelease(encoder); + wgpuCommandBufferRelease(cmd_buffer); + } +#ifdef __EMSCRIPTEN__ + EMSCRIPTEN_MAINLOOP_END; +#endif + + // Cleanup + ImGui_ImplWGPU_Shutdown(); + ImGui_ImplGlfw_Shutdown(); + ImGui::DestroyContext(); + + glfwDestroyWindow(window); + glfwTerminate(); + + return 0; +} + +#ifndef __EMSCRIPTEN__ +static WGPUAdapter RequestAdapter(WGPUInstance instance) +{ + auto onAdapterRequestEnded = [](WGPURequestAdapterStatus status, WGPUAdapter adapter, const char* message, void* pUserData) + { + if (status == WGPURequestAdapterStatus_Success) + *(WGPUAdapter*)(pUserData) = adapter; + else + printf("Could not get WebGPU adapter: %s\n", message); +}; + WGPUAdapter adapter; + wgpuInstanceRequestAdapter(instance, nullptr, onAdapterRequestEnded, (void*)&adapter); + return adapter; +} + +static WGPUDevice RequestDevice(WGPUAdapter& adapter) +{ + auto onDeviceRequestEnded = [](WGPURequestDeviceStatus status, WGPUDevice device, const char* message, void* pUserData) + { + if (status == WGPURequestDeviceStatus_Success) + *(WGPUDevice*)(pUserData) = device; + else + printf("Could not get WebGPU device: %s\n", message); + }; + WGPUDevice device; + wgpuAdapterRequestDevice(adapter, nullptr, onDeviceRequestEnded, (void*)&device); + return device; +} +#endif + +static bool InitWGPU(GLFWwindow* window) +{ + wgpu::Instance instance = wgpuCreateInstance(nullptr); + +#ifdef __EMSCRIPTEN__ + wgpu_device = emscripten_webgpu_get_device(); + if (!wgpu_device) + return false; +#else + WGPUAdapter adapter = RequestAdapter(instance.Get()); + if (!adapter) + return false; + wgpu_device = RequestDevice(adapter); +#endif + +#ifdef __EMSCRIPTEN__ + wgpu::SurfaceDescriptorFromCanvasHTMLSelector html_surface_desc = {}; + html_surface_desc.selector = "#canvas"; + wgpu::SurfaceDescriptor surface_desc = {}; + surface_desc.nextInChain = &html_surface_desc; + wgpu::Surface surface = instance.CreateSurface(&surface_desc); + + wgpu::Adapter adapter = {}; + wgpu_preferred_fmt = (WGPUTextureFormat)surface.GetPreferredFormat(adapter); +#else + wgpu::Surface surface = wgpu::glfw::CreateSurfaceForWindow(instance, window); + if (!surface) + return false; + wgpu_preferred_fmt = WGPUTextureFormat_BGRA8Unorm; +#endif + + wgpu_instance = instance.MoveToCHandle(); + wgpu_surface = surface.MoveToCHandle(); + + wgpuDeviceSetUncapturedErrorCallback(wgpu_device, wgpu_error_callback, nullptr); + + return true; +} + +static void CreateSwapChain(int width, int height) +{ + if (wgpu_swap_chain) + wgpuSwapChainRelease(wgpu_swap_chain); + wgpu_swap_chain_width = width; + wgpu_swap_chain_height = height; + WGPUSwapChainDescriptor swap_chain_desc = {}; + swap_chain_desc.usage = WGPUTextureUsage_RenderAttachment; + swap_chain_desc.format = wgpu_preferred_fmt; + swap_chain_desc.width = width; + swap_chain_desc.height = height; + swap_chain_desc.presentMode = WGPUPresentMode_Fifo; + wgpu_swap_chain = wgpuDeviceCreateSwapChain(wgpu_device, wgpu_surface, &swap_chain_desc); +} diff --git a/External/imgui-docking/examples/example_glfw_wgpu/web/index.html b/External/imgui-docking/examples/example_glfw_wgpu/web/index.html new file mode 100644 index 0000000..a2a91c4 --- /dev/null +++ b/External/imgui-docking/examples/example_glfw_wgpu/web/index.html @@ -0,0 +1,84 @@ + + + + + + Dear ImGui Emscripten+GLFW+WebGPU example + + + + + + + diff --git a/External/imgui-docking/examples/example_glut_opengl2/example_glut_opengl2.vcxproj b/External/imgui-docking/examples/example_glut_opengl2/example_glut_opengl2.vcxproj new file mode 100644 index 0000000..c56452b --- /dev/null +++ b/External/imgui-docking/examples/example_glut_opengl2/example_glut_opengl2.vcxproj @@ -0,0 +1,186 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {F90D0333-5FB1-440D-918D-DD39A1B5187E} + example_glut_opengl2 + 8.1 + + + + Application + true + MultiByte + v140 + + + Application + true + MultiByte + v140 + + + Application + false + true + MultiByte + v140 + + + Application + false + true + MultiByte + v140 + + + + + + + + + + + + + + + + + + + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + $(IncludePath) + + + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + $(IncludePath) + + + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + $(IncludePath) + + + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + $(IncludePath) + + + + Level4 + Disabled + $(GLUT_INCLUDE_DIR);..\..;..\..\backends;%(AdditionalIncludeDirectories) + /utf-8 %(AdditionalOptions) + + + true + $(GLUT_ROOT_PATH)/lib;%(AdditionalLibraryDirectories) + opengl32.lib;freeglut.lib;%(AdditionalDependencies) + Console + msvcrt.lib + + + + + Level4 + Disabled + $(GLUT_INCLUDE_DIR);..\..;..\..\backends;%(AdditionalIncludeDirectories) + /utf-8 %(AdditionalOptions) + + + true + $(GLUT_ROOT_PATH)/lib/x64;%(AdditionalLibraryDirectories) + opengl32.lib;freeglut.lib;%(AdditionalDependencies) + Console + msvcrt.lib + + + + + Level4 + MaxSpeed + true + true + $(GLUT_INCLUDE_DIR);..\..;..\..\backends;%(AdditionalIncludeDirectories) + false + /utf-8 %(AdditionalOptions) + + + true + true + true + $(GLUT_ROOT_PATH)/lib;%(AdditionalLibraryDirectories) + opengl32.lib;freeglut.lib;%(AdditionalDependencies) + Console + + + + + + + Level4 + MaxSpeed + true + true + $(GLUT_INCLUDE_DIR);..\..;..\..\backends;%(AdditionalIncludeDirectories) + false + /utf-8 %(AdditionalOptions) + + + true + true + true + $(GLUT_ROOT_PATH)/lib/x64;%(AdditionalLibraryDirectories) + opengl32.lib;freeglut.lib;%(AdditionalDependencies) + Console + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/External/imgui-docking/examples/example_glut_opengl2/example_glut_opengl2.vcxproj.filters b/External/imgui-docking/examples/example_glut_opengl2/example_glut_opengl2.vcxproj.filters new file mode 100644 index 0000000..0ac4a0b --- /dev/null +++ b/External/imgui-docking/examples/example_glut_opengl2/example_glut_opengl2.vcxproj.filters @@ -0,0 +1,64 @@ + + + + + {c336cfe3-f0c4-464c-9ef0-a9e17a7ff222} + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + + + sources + + + imgui + + + imgui + + + imgui + + + imgui + + + imgui + + + sources + + + sources + + + + + imgui + + + imgui + + + imgui + + + sources + + + sources + + + + + + imgui + + + imgui + + + \ No newline at end of file diff --git a/External/imgui-docking/examples/example_glut_opengl2/main.cpp b/External/imgui-docking/examples/example_glut_opengl2/main.cpp new file mode 100644 index 0000000..4edae6f --- /dev/null +++ b/External/imgui-docking/examples/example_glut_opengl2/main.cpp @@ -0,0 +1,164 @@ +// Dear ImGui: standalone example application for GLUT/FreeGLUT + OpenGL2, using legacy fixed pipeline + +// Learn about Dear ImGui: +// - FAQ https://dearimgui.com/faq +// - Getting Started https://dearimgui.com/getting-started +// - Documentation https://dearimgui.com/docs (same as your local docs/ folder). +// - Introduction, links and more at the top of imgui.cpp + +// !!! GLUT/FreeGLUT IS OBSOLETE PREHISTORIC SOFTWARE. Using GLUT is not recommended unless you really miss the 90's. !!! +// !!! If someone or something is teaching you GLUT today, you are being abused. Please show some resistance. !!! +// !!! Nowadays, prefer using GLFW or SDL instead! + +// On Windows, you can install Freeglut using vcpkg: +// git clone https://github.com/Microsoft/vcpkg +// cd vcpkg +// bootstrap - vcpkg.bat +// vcpkg install freeglut --triplet=x86-windows ; for win32 +// vcpkg install freeglut --triplet=x64-windows ; for win64 +// vcpkg integrate install ; register include and libs in Visual Studio + +#include "imgui.h" +#include "imgui_impl_glut.h" +#include "imgui_impl_opengl2.h" +#define GL_SILENCE_DEPRECATION +#ifdef __APPLE__ +#include +#else +#include +#endif + +#ifdef _MSC_VER +#pragma warning (disable: 4505) // unreferenced local function has been removed +#endif + +// Forward declarations of helper functions +void MainLoopStep(); + +// Our state +static bool show_demo_window = true; +static bool show_another_window = false; +static ImVec4 clear_color = ImVec4(0.45f, 0.55f, 0.60f, 1.00f); + +int main(int argc, char** argv) +{ + // Create GLUT window + glutInit(&argc, argv); +#ifdef __FREEGLUT_EXT_H__ + glutSetOption(GLUT_ACTION_ON_WINDOW_CLOSE, GLUT_ACTION_GLUTMAINLOOP_RETURNS); +#endif + glutInitDisplayMode(GLUT_RGBA | GLUT_DOUBLE | GLUT_MULTISAMPLE); + glutInitWindowSize(1280, 720); + glutCreateWindow("Dear ImGui GLUT+OpenGL2 Example"); + + // Setup GLUT display function + // We will also call ImGui_ImplGLUT_InstallFuncs() to get all the other functions installed for us, + // otherwise it is possible to install our own functions and call the imgui_impl_glut.h functions ourselves. + glutDisplayFunc(MainLoopStep); + + // Setup Dear ImGui context + IMGUI_CHECKVERSION(); + ImGui::CreateContext(); + ImGuiIO& io = ImGui::GetIO(); (void)io; + io.ConfigFlags |= ImGuiConfigFlags_NavEnableKeyboard; // Enable Keyboard Controls + io.ConfigFlags |= ImGuiConfigFlags_DockingEnable; // Enable Docking + + // Setup Dear ImGui style + ImGui::StyleColorsDark(); + //ImGui::StyleColorsLight(); + + // Setup Platform/Renderer backends + // FIXME: Consider reworking this example to install our own GLUT funcs + forward calls ImGui_ImplGLUT_XXX ones, instead of using ImGui_ImplGLUT_InstallFuncs(). + ImGui_ImplGLUT_Init(); + ImGui_ImplOpenGL2_Init(); + + // Install GLUT handlers (glutReshapeFunc(), glutMotionFunc(), glutPassiveMotionFunc(), glutMouseFunc(), glutKeyboardFunc() etc.) + // You can read the io.WantCaptureMouse, io.WantCaptureKeyboard flags to tell if dear imgui wants to use your inputs. + // - When io.WantCaptureMouse is true, do not dispatch mouse input data to your main application, or clear/overwrite your copy of the mouse data. + // - When io.WantCaptureKeyboard is true, do not dispatch keyboard input data to your main application, or clear/overwrite your copy of the keyboard data. + // Generally you may always pass all inputs to dear imgui, and hide them from your application based on those two flags. + ImGui_ImplGLUT_InstallFuncs(); + + // Load Fonts + // - If no fonts are loaded, dear imgui will use the default font. You can also load multiple fonts and use ImGui::PushFont()/PopFont() to select them. + // - AddFontFromFileTTF() will return the ImFont* so you can store it if you need to select the font among multiple. + // - If the file cannot be loaded, the function will return a nullptr. Please handle those errors in your application (e.g. use an assertion, or display an error and quit). + // - The fonts will be rasterized at a given size (w/ oversampling) and stored into a texture when calling ImFontAtlas::Build()/GetTexDataAsXXXX(), which ImGui_ImplXXXX_NewFrame below will call. + // - Use '#define IMGUI_ENABLE_FREETYPE' in your imconfig file to use Freetype for higher quality font rendering. + // - Read 'docs/FONTS.md' for more instructions and details. + // - Remember that in C/C++ if you want to include a backslash \ in a string literal you need to write a double backslash \\ ! + //io.Fonts->AddFontDefault(); + //io.Fonts->AddFontFromFileTTF("c:\\Windows\\Fonts\\segoeui.ttf", 18.0f); + //io.Fonts->AddFontFromFileTTF("../../misc/fonts/DroidSans.ttf", 16.0f); + //io.Fonts->AddFontFromFileTTF("../../misc/fonts/Roboto-Medium.ttf", 16.0f); + //io.Fonts->AddFontFromFileTTF("../../misc/fonts/Cousine-Regular.ttf", 15.0f); + //ImFont* font = io.Fonts->AddFontFromFileTTF("c:\\Windows\\Fonts\\ArialUni.ttf", 18.0f, nullptr, io.Fonts->GetGlyphRangesJapanese()); + //IM_ASSERT(font != nullptr); + + // Main loop + glutMainLoop(); + + // Cleanup + ImGui_ImplOpenGL2_Shutdown(); + ImGui_ImplGLUT_Shutdown(); + ImGui::DestroyContext(); + + return 0; +} + +void MainLoopStep() +{ + // Start the Dear ImGui frame + ImGui_ImplOpenGL2_NewFrame(); + ImGui_ImplGLUT_NewFrame(); + ImGui::NewFrame(); + ImGuiIO& io = ImGui::GetIO(); + + // 1. Show the big demo window (Most of the sample code is in ImGui::ShowDemoWindow()! You can browse its code to learn more about Dear ImGui!). + if (show_demo_window) + ImGui::ShowDemoWindow(&show_demo_window); + + // 2. Show a simple window that we create ourselves. We use a Begin/End pair to create a named window. + { + static float f = 0.0f; + static int counter = 0; + + ImGui::Begin("Hello, world!"); // Create a window called "Hello, world!" and append into it. + + ImGui::Text("This is some useful text."); // Display some text (you can use a format strings too) + ImGui::Checkbox("Demo Window", &show_demo_window); // Edit bools storing our window open/close state + ImGui::Checkbox("Another Window", &show_another_window); + + ImGui::SliderFloat("float", &f, 0.0f, 1.0f); // Edit 1 float using a slider from 0.0f to 1.0f + ImGui::ColorEdit3("clear color", (float*)&clear_color); // Edit 3 floats representing a color + + if (ImGui::Button("Button")) // Buttons return true when clicked (most widgets return true when edited/activated) + counter++; + ImGui::SameLine(); + ImGui::Text("counter = %d", counter); + + ImGui::Text("Application average %.3f ms/frame (%.1f FPS)", 1000.0f / io.Framerate, io.Framerate); + ImGui::End(); + } + + // 3. Show another simple window. + if (show_another_window) + { + ImGui::Begin("Another Window", &show_another_window); // Pass a pointer to our bool variable (the window will have a closing button that will clear the bool when clicked) + ImGui::Text("Hello from another window!"); + if (ImGui::Button("Close Me")) + show_another_window = false; + ImGui::End(); + } + + // Rendering + ImGui::Render(); + glViewport(0, 0, (GLsizei)io.DisplaySize.x, (GLsizei)io.DisplaySize.y); + glClearColor(clear_color.x * clear_color.w, clear_color.y * clear_color.w, clear_color.z * clear_color.w, clear_color.w); + glClear(GL_COLOR_BUFFER_BIT); + //glUseProgram(0); // You may want this if using this code in an OpenGL 3+ context where shaders may be bound, but prefer using the GL3+ code. + ImGui_ImplOpenGL2_RenderDrawData(ImGui::GetDrawData()); + + glutSwapBuffers(); + glutPostRedisplay(); +} diff --git a/External/imgui-docking/examples/example_null/build_win32.bat b/External/imgui-docking/examples/example_null/build_win32.bat new file mode 100644 index 0000000..be81d80 --- /dev/null +++ b/External/imgui-docking/examples/example_null/build_win32.bat @@ -0,0 +1,3 @@ +@REM Build for Visual Studio compiler. Run your copy of vcvars32.bat or vcvarsall.bat to setup command-line compiler. +mkdir Debug +cl /nologo /Zi /MD /utf-8 /I ..\.. %* *.cpp ..\..\*.cpp /FeDebug/example_null.exe /FoDebug/ /link gdi32.lib shell32.lib imm32.lib diff --git a/External/imgui-docking/examples/example_null/main.cpp b/External/imgui-docking/examples/example_null/main.cpp new file mode 100644 index 0000000..f7153cc --- /dev/null +++ b/External/imgui-docking/examples/example_null/main.cpp @@ -0,0 +1,37 @@ +// dear imgui: "null" example application +// (compile and link imgui, create context, run headless with NO INPUTS, NO GRAPHICS OUTPUT) +// This is useful to test building, but you cannot interact with anything here! +#include "imgui.h" +#include + +int main(int, char**) +{ + IMGUI_CHECKVERSION(); + ImGui::CreateContext(); + ImGuiIO& io = ImGui::GetIO(); + + // Build atlas + unsigned char* tex_pixels = nullptr; + int tex_w, tex_h; + io.Fonts->GetTexDataAsRGBA32(&tex_pixels, &tex_w, &tex_h); + + for (int n = 0; n < 20; n++) + { + printf("NewFrame() %d\n", n); + io.DisplaySize = ImVec2(1920, 1080); + io.DeltaTime = 1.0f / 60.0f; + ImGui::NewFrame(); + + static float f = 0.0f; + ImGui::Text("Hello, world!"); + ImGui::SliderFloat("float", &f, 0.0f, 1.0f); + ImGui::Text("Application average %.3f ms/frame (%.1f FPS)", 1000.0f / io.Framerate, io.Framerate); + ImGui::ShowDemoWindow(nullptr); + + ImGui::Render(); + } + + printf("DestroyContext()\n"); + ImGui::DestroyContext(); + return 0; +} diff --git a/External/imgui-docking/examples/example_sdl2_directx11/build_win32.bat b/External/imgui-docking/examples/example_sdl2_directx11/build_win32.bat new file mode 100644 index 0000000..f0b485c --- /dev/null +++ b/External/imgui-docking/examples/example_sdl2_directx11/build_win32.bat @@ -0,0 +1,8 @@ +@REM Build for Visual Studio compiler. Run your copy of vcvars32.bat or vcvarsall.bat to setup command-line compiler. +@set OUT_DIR=Debug +@set OUT_EXE=example_sdl2_directx11 +@set INCLUDES=/I..\.. /I..\..\backends /I%SDL2_DIR%\include /I "%WindowsSdkDir%Include\um" /I "%WindowsSdkDir%Include\shared" /I "%DXSDK_DIR%Include" +@set SOURCES=main.cpp ..\..\backends\imgui_impl_sdl2.cpp ..\..\backends\imgui_impl_dx11.cpp ..\..\imgui*.cpp +@set LIBS=/LIBPATH:%SDL2_DIR%\lib\x86 SDL2.lib SDL2main.lib /LIBPATH:"%DXSDK_DIR%/Lib/x86" d3d11.lib d3dcompiler.lib shell32.lib +mkdir %OUT_DIR% +cl /nologo /Zi /MD /utf-8 %INCLUDES% %SOURCES% /Fe%OUT_DIR%/%OUT_EXE%.exe /Fo%OUT_DIR%/ /link %LIBS% /subsystem:console diff --git a/External/imgui-docking/examples/example_sdl2_directx11/example_sdl2_directx11.vcxproj b/External/imgui-docking/examples/example_sdl2_directx11/example_sdl2_directx11.vcxproj new file mode 100644 index 0000000..c23800c --- /dev/null +++ b/External/imgui-docking/examples/example_sdl2_directx11/example_sdl2_directx11.vcxproj @@ -0,0 +1,187 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {9E1987E3-1F19-45CA-B9C9-D31E791836D8} + example_sdl2_directx11 + 8.1 + example_sdl2_directx11 + + + + Application + true + MultiByte + v140 + + + Application + true + MultiByte + v140 + + + Application + false + true + MultiByte + v140 + + + Application + false + true + MultiByte + v140 + + + + + + + + + + + + + + + + + + + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + $(IncludePath) + + + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + $(IncludePath) + + + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + $(IncludePath) + + + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + $(IncludePath) + + + + Level4 + Disabled + ..\..;..\..\backends;%SDL2_DIR%\include;$(VcpkgCurrentInstalledDir)include\SDL2;%(AdditionalIncludeDirectories) + /utf-8 %(AdditionalOptions) + + + true + %SDL2_DIR%\lib\x86;$(DXSDK_DIR)/Lib/x86;%(AdditionalLibraryDirectories) + SDL2.lib;SDL2main.lib;d3d11.lib;d3dcompiler.lib;dxgi.lib;%(AdditionalDependencies) + Console + msvcrt.lib + + + + + Level4 + Disabled + ..\..;..\..\backends;%SDL2_DIR%\include;$(VcpkgCurrentInstalledDir)include\SDL2;%(AdditionalIncludeDirectories) + /utf-8 %(AdditionalOptions) + + + true + %SDL2_DIR%\lib\x64;$(DXSDK_DIR)/Lib/x64;%(AdditionalLibraryDirectories) + SDL2.lib;SDL2main.lib;d3d11.lib;d3dcompiler.lib;dxgi.lib;%(AdditionalDependencies) + Console + msvcrt.lib + + + + + Level4 + MaxSpeed + true + true + ..\..;..\..\backends;%SDL2_DIR%\include;$(VcpkgCurrentInstalledDir)include\SDL2;%(AdditionalIncludeDirectories) + false + /utf-8 %(AdditionalOptions) + + + true + true + true + %SDL2_DIR%\lib\x86;$(DXSDK_DIR)/Lib/x86;%(AdditionalLibraryDirectories) + SDL2.lib;SDL2main.lib;d3d11.lib;d3dcompiler.lib;dxgi.lib;%(AdditionalDependencies) + Console + + + + + + + Level4 + MaxSpeed + true + true + ..\..;..\..\backends;%SDL2_DIR%\include;$(VcpkgCurrentInstalledDir)include\SDL2;%(AdditionalIncludeDirectories) + false + /utf-8 %(AdditionalOptions) + + + true + true + true + %SDL2_DIR%\lib\x64;$(DXSDK_DIR)/Lib/x64;%(AdditionalLibraryDirectories) + SDL2.lib;SDL2main.lib;d3d11.lib;d3dcompiler.lib;dxgi.lib;%(AdditionalDependencies) + Console + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/External/imgui-docking/examples/example_sdl2_directx11/example_sdl2_directx11.vcxproj.filters b/External/imgui-docking/examples/example_sdl2_directx11/example_sdl2_directx11.vcxproj.filters new file mode 100644 index 0000000..92d11f8 --- /dev/null +++ b/External/imgui-docking/examples/example_sdl2_directx11/example_sdl2_directx11.vcxproj.filters @@ -0,0 +1,63 @@ + + + + + {0587d7a3-f2ce-4d56-b84f-a0005d3bfce6} + + + {08e36723-ce4f-4cff-9662-c40801cf1acf} + + + + + imgui + + + imgui + + + imgui + + + sources + + + sources + + + + + imgui + + + sources + + + imgui + + + imgui + + + imgui + + + imgui + + + sources + + + sources + + + + + + imgui + + + imgui + + + \ No newline at end of file diff --git a/External/imgui-docking/examples/example_sdl2_directx11/main.cpp b/External/imgui-docking/examples/example_sdl2_directx11/main.cpp new file mode 100644 index 0000000..70fc5f8 --- /dev/null +++ b/External/imgui-docking/examples/example_sdl2_directx11/main.cpp @@ -0,0 +1,264 @@ +// Dear ImGui: standalone example application for SDL2 + DirectX 11 +// (SDL is a cross-platform general purpose library for handling windows, inputs, OpenGL/Vulkan/Metal graphics context creation, etc.) + +// Learn about Dear ImGui: +// - FAQ https://dearimgui.com/faq +// - Getting Started https://dearimgui.com/getting-started +// - Documentation https://dearimgui.com/docs (same as your local docs/ folder). +// - Introduction, links and more at the top of imgui.cpp + +#include "imgui.h" +#include "imgui_impl_sdl2.h" +#include "imgui_impl_dx11.h" +#include +#include +#include +#include + +// Data +static ID3D11Device* g_pd3dDevice = nullptr; +static ID3D11DeviceContext* g_pd3dDeviceContext = nullptr; +static IDXGISwapChain* g_pSwapChain = nullptr; +static ID3D11RenderTargetView* g_mainRenderTargetView = nullptr; + +// Forward declarations of helper functions +bool CreateDeviceD3D(HWND hWnd); +void CleanupDeviceD3D(); +void CreateRenderTarget(); +void CleanupRenderTarget(); + +// Main code +int main(int, char**) +{ + // Setup SDL + // (Some versions of SDL before <2.0.10 appears to have performance/stalling issues on a minority of Windows systems, + // depending on whether SDL_INIT_GAMECONTROLLER is enabled or disabled.. updating to the latest version of SDL is recommended!) + if (SDL_Init(SDL_INIT_VIDEO | SDL_INIT_TIMER | SDL_INIT_GAMECONTROLLER) != 0) + { + printf("Error: %s\n", SDL_GetError()); + return -1; + } + + // From 2.0.18: Enable native IME. +#ifdef SDL_HINT_IME_SHOW_UI + SDL_SetHint(SDL_HINT_IME_SHOW_UI, "1"); +#endif + + // Setup window + SDL_WindowFlags window_flags = (SDL_WindowFlags)(SDL_WINDOW_RESIZABLE | SDL_WINDOW_ALLOW_HIGHDPI); + SDL_Window* window = SDL_CreateWindow("Dear ImGui SDL2+DirectX11 example", SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED, 1280, 720, window_flags); + if (window == nullptr) + { + printf("Error: SDL_CreateWindow(): %s\n", SDL_GetError()); + return -1; + } + + SDL_SysWMinfo wmInfo; + SDL_VERSION(&wmInfo.version); + SDL_GetWindowWMInfo(window, &wmInfo); + HWND hwnd = (HWND)wmInfo.info.win.window; + + // Initialize Direct3D + if (!CreateDeviceD3D(hwnd)) + { + CleanupDeviceD3D(); + return 1; + } + + // Setup Dear ImGui context + IMGUI_CHECKVERSION(); + ImGui::CreateContext(); + ImGuiIO& io = ImGui::GetIO(); (void)io; + io.ConfigFlags |= ImGuiConfigFlags_NavEnableKeyboard; // Enable Keyboard Controls + io.ConfigFlags |= ImGuiConfigFlags_NavEnableGamepad; // Enable Gamepad Controls + io.ConfigFlags |= ImGuiConfigFlags_DockingEnable; // Enable Docking + io.ConfigFlags |= ImGuiConfigFlags_ViewportsEnable; // Enable Multi-Viewport / Platform Windows + //io.ConfigViewportsNoAutoMerge = true; + //io.ConfigViewportsNoTaskBarIcon = true; + + // Setup Dear ImGui style + ImGui::StyleColorsDark(); + //ImGui::StyleColorsLight(); + + // When viewports are enabled we tweak WindowRounding/WindowBg so platform windows can look identical to regular ones. + ImGuiStyle& style = ImGui::GetStyle(); + if (io.ConfigFlags & ImGuiConfigFlags_ViewportsEnable) + { + style.WindowRounding = 0.0f; + style.Colors[ImGuiCol_WindowBg].w = 1.0f; + } + + // Setup Platform/Renderer backends + ImGui_ImplSDL2_InitForD3D(window); + ImGui_ImplDX11_Init(g_pd3dDevice, g_pd3dDeviceContext); + + // Load Fonts + // - If no fonts are loaded, dear imgui will use the default font. You can also load multiple fonts and use ImGui::PushFont()/PopFont() to select them. + // - AddFontFromFileTTF() will return the ImFont* so you can store it if you need to select the font among multiple. + // - If the file cannot be loaded, the function will return a nullptr. Please handle those errors in your application (e.g. use an assertion, or display an error and quit). + // - The fonts will be rasterized at a given size (w/ oversampling) and stored into a texture when calling ImFontAtlas::Build()/GetTexDataAsXXXX(), which ImGui_ImplXXXX_NewFrame below will call. + // - Use '#define IMGUI_ENABLE_FREETYPE' in your imconfig file to use Freetype for higher quality font rendering. + // - Read 'docs/FONTS.md' for more instructions and details. + // - Remember that in C/C++ if you want to include a backslash \ in a string literal you need to write a double backslash \\ ! + //io.Fonts->AddFontDefault(); + //io.Fonts->AddFontFromFileTTF("c:\\Windows\\Fonts\\segoeui.ttf", 18.0f); + //io.Fonts->AddFontFromFileTTF("../../misc/fonts/DroidSans.ttf", 16.0f); + //io.Fonts->AddFontFromFileTTF("../../misc/fonts/Roboto-Medium.ttf", 16.0f); + //io.Fonts->AddFontFromFileTTF("../../misc/fonts/Cousine-Regular.ttf", 15.0f); + //ImFont* font = io.Fonts->AddFontFromFileTTF("c:\\Windows\\Fonts\\ArialUni.ttf", 18.0f, nullptr, io.Fonts->GetGlyphRangesJapanese()); + //IM_ASSERT(font != nullptr); + + // Our state + bool show_demo_window = true; + bool show_another_window = false; + ImVec4 clear_color = ImVec4(0.45f, 0.55f, 0.60f, 1.00f); + + // Main loop + bool done = false; + while (!done) + { + // Poll and handle events (inputs, window resize, etc.) + // You can read the io.WantCaptureMouse, io.WantCaptureKeyboard flags to tell if dear imgui wants to use your inputs. + // - When io.WantCaptureMouse is true, do not dispatch mouse input data to your main application, or clear/overwrite your copy of the mouse data. + // - When io.WantCaptureKeyboard is true, do not dispatch keyboard input data to your main application, or clear/overwrite your copy of the keyboard data. + // Generally you may always pass all inputs to dear imgui, and hide them from your application based on those two flags. + SDL_Event event; + while (SDL_PollEvent(&event)) + { + ImGui_ImplSDL2_ProcessEvent(&event); + if (event.type == SDL_QUIT) + done = true; + if (event.type == SDL_WINDOWEVENT && event.window.event == SDL_WINDOWEVENT_CLOSE && event.window.windowID == SDL_GetWindowID(window)) + done = true; + if (event.type == SDL_WINDOWEVENT && event.window.event == SDL_WINDOWEVENT_RESIZED && event.window.windowID == SDL_GetWindowID(window)) + { + // Release all outstanding references to the swap chain's buffers before resizing. + CleanupRenderTarget(); + g_pSwapChain->ResizeBuffers(0, 0, 0, DXGI_FORMAT_UNKNOWN, 0); + CreateRenderTarget(); + } + } + + // Start the Dear ImGui frame + ImGui_ImplDX11_NewFrame(); + ImGui_ImplSDL2_NewFrame(); + ImGui::NewFrame(); + + // 1. Show the big demo window (Most of the sample code is in ImGui::ShowDemoWindow()! You can browse its code to learn more about Dear ImGui!). + if (show_demo_window) + ImGui::ShowDemoWindow(&show_demo_window); + + // 2. Show a simple window that we create ourselves. We use a Begin/End pair to create a named window. + { + static float f = 0.0f; + static int counter = 0; + + ImGui::Begin("Hello, world!"); // Create a window called "Hello, world!" and append into it. + + ImGui::Text("This is some useful text."); // Display some text (you can use a format strings too) + ImGui::Checkbox("Demo Window", &show_demo_window); // Edit bools storing our window open/close state + ImGui::Checkbox("Another Window", &show_another_window); + + ImGui::SliderFloat("float", &f, 0.0f, 1.0f); // Edit 1 float using a slider from 0.0f to 1.0f + ImGui::ColorEdit3("clear color", (float*)&clear_color); // Edit 3 floats representing a color + + if (ImGui::Button("Button")) // Buttons return true when clicked (most widgets return true when edited/activated) + counter++; + ImGui::SameLine(); + ImGui::Text("counter = %d", counter); + + ImGui::Text("Application average %.3f ms/frame (%.1f FPS)", 1000.0f / io.Framerate, io.Framerate); + ImGui::End(); + } + + // 3. Show another simple window. + if (show_another_window) + { + ImGui::Begin("Another Window", &show_another_window); // Pass a pointer to our bool variable (the window will have a closing button that will clear the bool when clicked) + ImGui::Text("Hello from another window!"); + if (ImGui::Button("Close Me")) + show_another_window = false; + ImGui::End(); + } + + // Rendering + ImGui::Render(); + const float clear_color_with_alpha[4] = { clear_color.x * clear_color.w, clear_color.y * clear_color.w, clear_color.z * clear_color.w, clear_color.w }; + g_pd3dDeviceContext->OMSetRenderTargets(1, &g_mainRenderTargetView, nullptr); + g_pd3dDeviceContext->ClearRenderTargetView(g_mainRenderTargetView, clear_color_with_alpha); + ImGui_ImplDX11_RenderDrawData(ImGui::GetDrawData()); + + // Update and Render additional Platform Windows + if (io.ConfigFlags & ImGuiConfigFlags_ViewportsEnable) + { + ImGui::UpdatePlatformWindows(); + ImGui::RenderPlatformWindowsDefault(); + } + + g_pSwapChain->Present(1, 0); // Present with vsync + //g_pSwapChain->Present(0, 0); // Present without vsync + } + + // Cleanup + ImGui_ImplDX11_Shutdown(); + ImGui_ImplSDL2_Shutdown(); + ImGui::DestroyContext(); + + CleanupDeviceD3D(); + SDL_DestroyWindow(window); + SDL_Quit(); + + return 0; +} + +// Helper functions to use DirectX11 +bool CreateDeviceD3D(HWND hWnd) +{ + // Setup swap chain + DXGI_SWAP_CHAIN_DESC sd; + ZeroMemory(&sd, sizeof(sd)); + sd.BufferCount = 2; + sd.BufferDesc.Width = 0; + sd.BufferDesc.Height = 0; + sd.BufferDesc.Format = DXGI_FORMAT_R8G8B8A8_UNORM; + sd.BufferDesc.RefreshRate.Numerator = 60; + sd.BufferDesc.RefreshRate.Denominator = 1; + sd.Flags = DXGI_SWAP_CHAIN_FLAG_ALLOW_MODE_SWITCH; + sd.BufferUsage = DXGI_USAGE_RENDER_TARGET_OUTPUT; + sd.OutputWindow = hWnd; + sd.SampleDesc.Count = 1; + sd.SampleDesc.Quality = 0; + sd.Windowed = TRUE; + sd.SwapEffect = DXGI_SWAP_EFFECT_DISCARD; + + UINT createDeviceFlags = 0; + //createDeviceFlags |= D3D11_CREATE_DEVICE_DEBUG; + D3D_FEATURE_LEVEL featureLevel; + const D3D_FEATURE_LEVEL featureLevelArray[2] = { D3D_FEATURE_LEVEL_11_0, D3D_FEATURE_LEVEL_10_0, }; + if (D3D11CreateDeviceAndSwapChain(nullptr, D3D_DRIVER_TYPE_HARDWARE, nullptr, createDeviceFlags, featureLevelArray, 2, D3D11_SDK_VERSION, &sd, &g_pSwapChain, &g_pd3dDevice, &featureLevel, &g_pd3dDeviceContext) != S_OK) + return false; + + CreateRenderTarget(); + return true; +} + +void CleanupDeviceD3D() +{ + CleanupRenderTarget(); + if (g_pSwapChain) { g_pSwapChain->Release(); g_pSwapChain = nullptr; } + if (g_pd3dDeviceContext) { g_pd3dDeviceContext->Release(); g_pd3dDeviceContext = nullptr; } + if (g_pd3dDevice) { g_pd3dDevice->Release(); g_pd3dDevice = nullptr; } +} + +void CreateRenderTarget() +{ + ID3D11Texture2D* pBackBuffer; + g_pSwapChain->GetBuffer(0, IID_PPV_ARGS(&pBackBuffer)); + g_pd3dDevice->CreateRenderTargetView(pBackBuffer, nullptr, &g_mainRenderTargetView); + pBackBuffer->Release(); +} + +void CleanupRenderTarget() +{ + if (g_mainRenderTargetView) { g_mainRenderTargetView->Release(); g_mainRenderTargetView = nullptr; } +} diff --git a/External/imgui-docking/examples/example_sdl2_metal/main.mm b/External/imgui-docking/examples/example_sdl2_metal/main.mm new file mode 100644 index 0000000..5cd7043 --- /dev/null +++ b/External/imgui-docking/examples/example_sdl2_metal/main.mm @@ -0,0 +1,206 @@ +// Dear ImGui: standalone example application for SDL2 + Metal +// (SDL is a cross-platform general purpose library for handling windows, inputs, OpenGL/Vulkan/Metal graphics context creation, etc.) + +// Learn about Dear ImGui: +// - FAQ https://dearimgui.com/faq +// - Getting Started https://dearimgui.com/getting-started +// - Documentation https://dearimgui.com/docs (same as your local docs/ folder). +// - Introduction, links and more at the top of imgui.cpp + +#include "imgui.h" +#include "imgui_impl_sdl2.h" +#include "imgui_impl_metal.h" +#include +#include + +#import +#import + +int main(int, char**) +{ + // Setup Dear ImGui context + IMGUI_CHECKVERSION(); + ImGui::CreateContext(); + ImGuiIO& io = ImGui::GetIO(); (void)io; + io.ConfigFlags |= ImGuiConfigFlags_NavEnableKeyboard; // Enable Keyboard Controls + io.ConfigFlags |= ImGuiConfigFlags_NavEnableGamepad; // Enable Gamepad Controls + io.ConfigFlags |= ImGuiConfigFlags_DockingEnable; // Enable Docking + io.ConfigFlags |= ImGuiConfigFlags_ViewportsEnable; // Enable Multi-Viewport / Platform Windows + + // Setup style + ImGui::StyleColorsDark(); + //ImGui::StyleColorsLight(); + + // When viewports are enabled we tweak WindowRounding/WindowBg so platform windows can look identical to regular ones. + ImGuiStyle& style = ImGui::GetStyle(); + if (io.ConfigFlags & ImGuiConfigFlags_ViewportsEnable) + { + style.WindowRounding = 0.0f; + style.Colors[ImGuiCol_WindowBg].w = 1.0f; + } + + // Load Fonts + // - If no fonts are loaded, dear imgui will use the default font. You can also load multiple fonts and use ImGui::PushFont()/PopFont() to select them. + // - AddFontFromFileTTF() will return the ImFont* so you can store it if you need to select the font among multiple. + // - If the file cannot be loaded, the function will return a nullptr. Please handle those errors in your application (e.g. use an assertion, or display an error and quit). + // - The fonts will be rasterized at a given size (w/ oversampling) and stored into a texture when calling ImFontAtlas::Build()/GetTexDataAsXXXX(), which ImGui_ImplXXXX_NewFrame below will call. + // - Use '#define IMGUI_ENABLE_FREETYPE' in your imconfig file to use Freetype for higher quality font rendering. + // - Read 'docs/FONTS.md' for more instructions and details. + // - Remember that in C/C++ if you want to include a backslash \ in a string literal you need to write a double backslash \\ ! + //io.Fonts->AddFontDefault(); + //io.Fonts->AddFontFromFileTTF("c:\\Windows\\Fonts\\segoeui.ttf", 18.0f); + //io.Fonts->AddFontFromFileTTF("../../misc/fonts/DroidSans.ttf", 16.0f); + //io.Fonts->AddFontFromFileTTF("../../misc/fonts/Roboto-Medium.ttf", 16.0f); + //io.Fonts->AddFontFromFileTTF("../../misc/fonts/Cousine-Regular.ttf", 15.0f); + //ImFont* font = io.Fonts->AddFontFromFileTTF("c:\\Windows\\Fonts\\ArialUni.ttf", 18.0f, nullptr, io.Fonts->GetGlyphRangesJapanese()); + //IM_ASSERT(font != nullptr); + + // Setup SDL + // (Some versions of SDL before <2.0.10 appears to have performance/stalling issues on a minority of Windows systems, + // depending on whether SDL_INIT_GAMECONTROLLER is enabled or disabled.. updating to latest version of SDL is recommended!) + if (SDL_Init(SDL_INIT_VIDEO | SDL_INIT_TIMER | SDL_INIT_GAMECONTROLLER) != 0) + { + printf("Error: %s\n", SDL_GetError()); + return -1; + } + + // Inform SDL that we will be using metal for rendering. Without this hint initialization of metal renderer may fail. + SDL_SetHint(SDL_HINT_RENDER_DRIVER, "metal"); + + // Enable native IME. + SDL_SetHint(SDL_HINT_IME_SHOW_UI, "1"); + + SDL_Window* window = SDL_CreateWindow("Dear ImGui SDL+Metal example", SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED, 1280, 720, SDL_WINDOW_RESIZABLE | SDL_WINDOW_ALLOW_HIGHDPI); + if (window == nullptr) + { + printf("Error creating window: %s\n", SDL_GetError()); + return -2; + } + + SDL_Renderer* renderer = SDL_CreateRenderer(window, -1, SDL_RENDERER_ACCELERATED | SDL_RENDERER_PRESENTVSYNC); + if (renderer == nullptr) + { + printf("Error creating renderer: %s\n", SDL_GetError()); + return -3; + } + + // Setup Platform/Renderer backends + CAMetalLayer* layer = (__bridge CAMetalLayer*)SDL_RenderGetMetalLayer(renderer); + layer.pixelFormat = MTLPixelFormatBGRA8Unorm; + ImGui_ImplMetal_Init(layer.device); + ImGui_ImplSDL2_InitForMetal(window); + + id commandQueue = [layer.device newCommandQueue]; + MTLRenderPassDescriptor* renderPassDescriptor = [MTLRenderPassDescriptor new]; + + // Our state + bool show_demo_window = true; + bool show_another_window = false; + float clear_color[4] = {0.45f, 0.55f, 0.60f, 1.00f}; + + // Main loop + bool done = false; + while (!done) + { + @autoreleasepool + { + // Poll and handle events (inputs, window resize, etc.) + // You can read the io.WantCaptureMouse, io.WantCaptureKeyboard flags to tell if dear imgui wants to use your inputs. + // - When io.WantCaptureMouse is true, do not dispatch mouse input data to your main application, or clear/overwrite your copy of the mouse data. + // - When io.WantCaptureKeyboard is true, do not dispatch keyboard input data to your main application, or clear/overwrite your copy of the keyboard data. + // Generally you may always pass all inputs to dear imgui, and hide them from your application based on those two flags. + SDL_Event event; + while (SDL_PollEvent(&event)) + { + ImGui_ImplSDL2_ProcessEvent(&event); + if (event.type == SDL_QUIT) + done = true; + if (event.type == SDL_WINDOWEVENT && event.window.event == SDL_WINDOWEVENT_CLOSE && event.window.windowID == SDL_GetWindowID(window)) + done = true; + } + + int width, height; + SDL_GetRendererOutputSize(renderer, &width, &height); + layer.drawableSize = CGSizeMake(width, height); + id drawable = [layer nextDrawable]; + + id commandBuffer = [commandQueue commandBuffer]; + renderPassDescriptor.colorAttachments[0].clearColor = MTLClearColorMake(clear_color[0] * clear_color[3], clear_color[1] * clear_color[3], clear_color[2] * clear_color[3], clear_color[3]); + renderPassDescriptor.colorAttachments[0].texture = drawable.texture; + renderPassDescriptor.colorAttachments[0].loadAction = MTLLoadActionClear; + renderPassDescriptor.colorAttachments[0].storeAction = MTLStoreActionStore; + id renderEncoder = [commandBuffer renderCommandEncoderWithDescriptor:renderPassDescriptor]; + [renderEncoder pushDebugGroup:@"ImGui demo"]; + + // Start the Dear ImGui frame + ImGui_ImplMetal_NewFrame(renderPassDescriptor); + ImGui_ImplSDL2_NewFrame(); + ImGui::NewFrame(); + + // 1. Show the big demo window (Most of the sample code is in ImGui::ShowDemoWindow()! You can browse its code to learn more about Dear ImGui!). + if (show_demo_window) + ImGui::ShowDemoWindow(&show_demo_window); + + // 2. Show a simple window that we create ourselves. We use a Begin/End pair to create a named window. + { + static float f = 0.0f; + static int counter = 0; + + ImGui::Begin("Hello, world!"); // Create a window called "Hello, world!" and append into it. + + ImGui::Text("This is some useful text."); // Display some text (you can use a format strings too) + ImGui::Checkbox("Demo Window", &show_demo_window); // Edit bools storing our window open/close state + ImGui::Checkbox("Another Window", &show_another_window); + + ImGui::SliderFloat("float", &f, 0.0f, 1.0f); // Edit 1 float using a slider from 0.0f to 1.0f + ImGui::ColorEdit3("clear color", (float*)&clear_color); // Edit 3 floats representing a color + + if (ImGui::Button("Button")) // Buttons return true when clicked (most widgets return true when edited/activated) + counter++; + ImGui::SameLine(); + ImGui::Text("counter = %d", counter); + + ImGui::Text("Application average %.3f ms/frame (%.1f FPS)", 1000.0f / io.Framerate, io.Framerate); + ImGui::End(); + } + + // 3. Show another simple window. + if (show_another_window) + { + ImGui::Begin("Another Window", &show_another_window); // Pass a pointer to our bool variable (the window will have a closing button that will clear the bool when clicked) + ImGui::Text("Hello from another window!"); + if (ImGui::Button("Close Me")) + show_another_window = false; + ImGui::End(); + } + + // Rendering + ImGui::Render(); + ImGui_ImplMetal_RenderDrawData(ImGui::GetDrawData(), commandBuffer, renderEncoder); + + // Update and Render additional Platform Windows + if (io.ConfigFlags & ImGuiConfigFlags_ViewportsEnable) + { + ImGui::UpdatePlatformWindows(); + ImGui::RenderPlatformWindowsDefault(); + } + + [renderEncoder popDebugGroup]; + [renderEncoder endEncoding]; + + [commandBuffer presentDrawable:drawable]; + [commandBuffer commit]; + } + } + + // Cleanup + ImGui_ImplMetal_Shutdown(); + ImGui_ImplSDL2_Shutdown(); + ImGui::DestroyContext(); + + SDL_DestroyRenderer(renderer); + SDL_DestroyWindow(window); + SDL_Quit(); + + return 0; +} diff --git a/External/imgui-docking/examples/example_sdl2_opengl2/README.md b/External/imgui-docking/examples/example_sdl2_opengl2/README.md new file mode 100644 index 0000000..40a49e6 --- /dev/null +++ b/External/imgui-docking/examples/example_sdl2_opengl2/README.md @@ -0,0 +1,29 @@ + +# How to Build + +- On Windows with Visual Studio's IDE + +Use the provided project file (.vcxproj). Add to solution (imgui_examples.sln) if necessary. + +- On Windows with Visual Studio's CLI + +``` +set SDL2_DIR=path_to_your_sdl2_folder +cl /Zi /MD /I.. /I..\.. /I%SDL2_DIR%\include main.cpp ..\..\backends\imgui_impl_sdl2.cpp ..\..\backends\imgui_impl_opengl2.cpp ..\..\imgui*.cpp /FeDebug/example_sdl2_opengl2.exe /FoDebug/ /link /libpath:%SDL2_DIR%\lib\x86 SDL2.lib SDL2main.lib opengl32.lib /subsystem:console +# ^^ include paths ^^ source files ^^ output exe ^^ output dir ^^ libraries +# or for 64-bit: +cl /Zi /MD /I.. /I..\.. /I%SDL2_DIR%\include main.cpp ..\..\backends\imgui_impl_sdl2.cpp ..\..\backends\imgui_impl_opengl2.cpp ..\..\imgui*.cpp /FeDebug/example_sdl2_opengl2.exe /FoDebug/ /link /libpath:%SDL2_DIR%\lib\x64 SDL2.lib SDL2main.lib opengl32.lib /subsystem:console +``` + +- On Linux and similar Unixes + +``` +c++ `sdl2-config --cflags` -I .. -I ../.. -I ../../backends main.cpp ../../backends/imgui_impl_sdl2.cpp ../../backends/imgui_impl_opengl2.cpp ../../imgui*.cpp `sdl2-config --libs` -lGL +``` + +- On Mac OS X + +``` +brew install sdl2 +c++ `sdl2-config --cflags` -I .. -I ../.. -I ../../backends main.cpp ../../backends/imgui_impl_sdl2.cpp ../../backends/imgui_impl_opengl2.cpp ../../imgui*.cpp `sdl2-config --libs` -framework OpenGl +``` diff --git a/External/imgui-docking/examples/example_sdl2_opengl2/build_win32.bat b/External/imgui-docking/examples/example_sdl2_opengl2/build_win32.bat new file mode 100644 index 0000000..7543eda --- /dev/null +++ b/External/imgui-docking/examples/example_sdl2_opengl2/build_win32.bat @@ -0,0 +1,8 @@ +@REM Build for Visual Studio compiler. Run your copy of vcvars32.bat or vcvarsall.bat to setup command-line compiler. +@set OUT_DIR=Debug +@set OUT_EXE=example_sdl2_opengl2 +@set INCLUDES=/I..\.. /I..\..\backends /I%SDL2_DIR%\include +@set SOURCES=main.cpp ..\..\backends\imgui_impl_sdl2.cpp ..\..\backends\imgui_impl_opengl2.cpp ..\..\imgui*.cpp +@set LIBS=/LIBPATH:%SDL2_DIR%\lib\x86 SDL2.lib SDL2main.lib opengl32.lib shell32.lib +mkdir %OUT_DIR% +cl /nologo /Zi /MD /utf-8 %INCLUDES% %SOURCES% /Fe%OUT_DIR%/%OUT_EXE%.exe /Fo%OUT_DIR%/ /link %LIBS% /subsystem:console diff --git a/External/imgui-docking/examples/example_sdl2_opengl2/example_sdl2_opengl2.vcxproj b/External/imgui-docking/examples/example_sdl2_opengl2/example_sdl2_opengl2.vcxproj new file mode 100644 index 0000000..036463f --- /dev/null +++ b/External/imgui-docking/examples/example_sdl2_opengl2/example_sdl2_opengl2.vcxproj @@ -0,0 +1,186 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {2AE17FDE-F7F3-4CAC-ADAB-0710EDA4F741} + example_sdl2_opengl2 + 8.1 + + + + Application + true + MultiByte + v140 + + + Application + true + MultiByte + v140 + + + Application + false + true + MultiByte + v140 + + + Application + false + true + MultiByte + v140 + + + + + + + + + + + + + + + + + + + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + $(IncludePath) + + + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + $(IncludePath) + + + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + $(IncludePath) + + + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + $(IncludePath) + + + + Level4 + Disabled + ..\..;..\..\backends;%SDL2_DIR%\include;$(VcpkgCurrentInstalledDir)include\SDL2;%(AdditionalIncludeDirectories) + /utf-8 %(AdditionalOptions) + + + true + %SDL2_DIR%\lib\x86;%(AdditionalLibraryDirectories) + opengl32.lib;SDL2.lib;SDL2main.lib;%(AdditionalDependencies) + Console + msvcrt.lib + + + + + Level4 + Disabled + ..\..;..\..\backends;%SDL2_DIR%\include;$(VcpkgCurrentInstalledDir)include\SDL2;%(AdditionalIncludeDirectories) + /utf-8 %(AdditionalOptions) + + + true + %SDL2_DIR%\lib\x64;%(AdditionalLibraryDirectories) + opengl32.lib;SDL2.lib;SDL2main.lib;%(AdditionalDependencies) + Console + msvcrt.lib + + + + + Level4 + MaxSpeed + true + true + ..\..;..\..\backends;%SDL2_DIR%\include;$(VcpkgCurrentInstalledDir)include\SDL2;%(AdditionalIncludeDirectories) + false + /utf-8 %(AdditionalOptions) + + + true + true + true + %SDL2_DIR%\lib\x86;%(AdditionalLibraryDirectories) + opengl32.lib;SDL2.lib;SDL2main.lib;%(AdditionalDependencies) + Console + + + + + + + Level4 + MaxSpeed + true + true + ..\..;..\..\backends;%SDL2_DIR%\include;$(VcpkgCurrentInstalledDir)include\SDL2;%(AdditionalIncludeDirectories) + false + /utf-8 %(AdditionalOptions) + + + true + true + true + %SDL2_DIR%\lib\x64;%(AdditionalLibraryDirectories) + opengl32.lib;SDL2.lib;SDL2main.lib;%(AdditionalDependencies) + Console + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/External/imgui-docking/examples/example_sdl2_opengl2/example_sdl2_opengl2.vcxproj.filters b/External/imgui-docking/examples/example_sdl2_opengl2/example_sdl2_opengl2.vcxproj.filters new file mode 100644 index 0000000..752a196 --- /dev/null +++ b/External/imgui-docking/examples/example_sdl2_opengl2/example_sdl2_opengl2.vcxproj.filters @@ -0,0 +1,64 @@ + + + + + {20b90ce4-7fcb-4731-b9a0-075f875de82d} + + + {f18ab499-84e1-499f-8eff-9754361e0e52} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + + + imgui + + + imgui + + + imgui + + + sources + + + imgui + + + imgui + + + sources + + + sources + + + + + imgui + + + imgui + + + imgui + + + sources + + + sources + + + + + + imgui + + + imgui + + + \ No newline at end of file diff --git a/External/imgui-docking/examples/example_sdl2_opengl2/main.cpp b/External/imgui-docking/examples/example_sdl2_opengl2/main.cpp new file mode 100644 index 0000000..f92c54e --- /dev/null +++ b/External/imgui-docking/examples/example_sdl2_opengl2/main.cpp @@ -0,0 +1,196 @@ +// Dear ImGui: standalone example application for SDL2 + OpenGL +// (SDL is a cross-platform general purpose library for handling windows, inputs, OpenGL/Vulkan/Metal graphics context creation, etc.) + +// Learn about Dear ImGui: +// - FAQ https://dearimgui.com/faq +// - Getting Started https://dearimgui.com/getting-started +// - Documentation https://dearimgui.com/docs (same as your local docs/ folder). +// - Introduction, links and more at the top of imgui.cpp + +// **DO NOT USE THIS CODE IF YOUR CODE/ENGINE IS USING MODERN OPENGL (SHADERS, VBO, VAO, etc.)** +// **Prefer using the code in the example_sdl2_opengl3/ folder** +// See imgui_impl_sdl2.cpp for details. + +#include "imgui.h" +#include "imgui_impl_sdl2.h" +#include "imgui_impl_opengl2.h" +#include +#include +#include + +// Main code +int main(int, char**) +{ + // Setup SDL + if (SDL_Init(SDL_INIT_VIDEO | SDL_INIT_TIMER | SDL_INIT_GAMECONTROLLER) != 0) + { + printf("Error: %s\n", SDL_GetError()); + return -1; + } + + // From 2.0.18: Enable native IME. +#ifdef SDL_HINT_IME_SHOW_UI + SDL_SetHint(SDL_HINT_IME_SHOW_UI, "1"); +#endif + + // Setup window + SDL_GL_SetAttribute(SDL_GL_DOUBLEBUFFER, 1); + SDL_GL_SetAttribute(SDL_GL_DEPTH_SIZE, 24); + SDL_GL_SetAttribute(SDL_GL_STENCIL_SIZE, 8); + SDL_GL_SetAttribute(SDL_GL_CONTEXT_MAJOR_VERSION, 2); + SDL_GL_SetAttribute(SDL_GL_CONTEXT_MINOR_VERSION, 2); + SDL_WindowFlags window_flags = (SDL_WindowFlags)(SDL_WINDOW_OPENGL | SDL_WINDOW_RESIZABLE | SDL_WINDOW_ALLOW_HIGHDPI); + SDL_Window* window = SDL_CreateWindow("Dear ImGui SDL2+OpenGL example", SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED, 1280, 720, window_flags); + if (window == nullptr) + { + printf("Error: SDL_CreateWindow(): %s\n", SDL_GetError()); + return -1; + } + + SDL_GLContext gl_context = SDL_GL_CreateContext(window); + SDL_GL_MakeCurrent(window, gl_context); + SDL_GL_SetSwapInterval(1); // Enable vsync + + // Setup Dear ImGui context + IMGUI_CHECKVERSION(); + ImGui::CreateContext(); + ImGuiIO& io = ImGui::GetIO(); (void)io; + io.ConfigFlags |= ImGuiConfigFlags_NavEnableKeyboard; // Enable Keyboard Controls + io.ConfigFlags |= ImGuiConfigFlags_NavEnableGamepad; // Enable Gamepad Controls + io.ConfigFlags |= ImGuiConfigFlags_DockingEnable; // Enable Docking + io.ConfigFlags |= ImGuiConfigFlags_ViewportsEnable; // Enable Multi-Viewport / Platform Windows + //io.ConfigViewportsNoAutoMerge = true; + //io.ConfigViewportsNoTaskBarIcon = true; + + // Setup Dear ImGui style + ImGui::StyleColorsDark(); + //ImGui::StyleColorsLight(); + + // When viewports are enabled we tweak WindowRounding/WindowBg so platform windows can look identical to regular ones. + ImGuiStyle& style = ImGui::GetStyle(); + if (io.ConfigFlags & ImGuiConfigFlags_ViewportsEnable) + { + style.WindowRounding = 0.0f; + style.Colors[ImGuiCol_WindowBg].w = 1.0f; + } + + // Setup Platform/Renderer backends + ImGui_ImplSDL2_InitForOpenGL(window, gl_context); + ImGui_ImplOpenGL2_Init(); + + // Load Fonts + // - If no fonts are loaded, dear imgui will use the default font. You can also load multiple fonts and use ImGui::PushFont()/PopFont() to select them. + // - AddFontFromFileTTF() will return the ImFont* so you can store it if you need to select the font among multiple. + // - If the file cannot be loaded, the function will return a nullptr. Please handle those errors in your application (e.g. use an assertion, or display an error and quit). + // - The fonts will be rasterized at a given size (w/ oversampling) and stored into a texture when calling ImFontAtlas::Build()/GetTexDataAsXXXX(), which ImGui_ImplXXXX_NewFrame below will call. + // - Use '#define IMGUI_ENABLE_FREETYPE' in your imconfig file to use Freetype for higher quality font rendering. + // - Read 'docs/FONTS.md' for more instructions and details. + // - Remember that in C/C++ if you want to include a backslash \ in a string literal you need to write a double backslash \\ ! + //io.Fonts->AddFontDefault(); + //io.Fonts->AddFontFromFileTTF("c:\\Windows\\Fonts\\segoeui.ttf", 18.0f); + //io.Fonts->AddFontFromFileTTF("../../misc/fonts/DroidSans.ttf", 16.0f); + //io.Fonts->AddFontFromFileTTF("../../misc/fonts/Roboto-Medium.ttf", 16.0f); + //io.Fonts->AddFontFromFileTTF("../../misc/fonts/Cousine-Regular.ttf", 15.0f); + //ImFont* font = io.Fonts->AddFontFromFileTTF("c:\\Windows\\Fonts\\ArialUni.ttf", 18.0f, nullptr, io.Fonts->GetGlyphRangesJapanese()); + //IM_ASSERT(font != nullptr); + + // Our state + bool show_demo_window = true; + bool show_another_window = false; + ImVec4 clear_color = ImVec4(0.45f, 0.55f, 0.60f, 1.00f); + + // Main loop + bool done = false; + while (!done) + { + // Poll and handle events (inputs, window resize, etc.) + // You can read the io.WantCaptureMouse, io.WantCaptureKeyboard flags to tell if dear imgui wants to use your inputs. + // - When io.WantCaptureMouse is true, do not dispatch mouse input data to your main application, or clear/overwrite your copy of the mouse data. + // - When io.WantCaptureKeyboard is true, do not dispatch keyboard input data to your main application, or clear/overwrite your copy of the keyboard data. + // Generally you may always pass all inputs to dear imgui, and hide them from your application based on those two flags. + SDL_Event event; + while (SDL_PollEvent(&event)) + { + ImGui_ImplSDL2_ProcessEvent(&event); + if (event.type == SDL_QUIT) + done = true; + if (event.type == SDL_WINDOWEVENT && event.window.event == SDL_WINDOWEVENT_CLOSE && event.window.windowID == SDL_GetWindowID(window)) + done = true; + } + + // Start the Dear ImGui frame + ImGui_ImplOpenGL2_NewFrame(); + ImGui_ImplSDL2_NewFrame(); + ImGui::NewFrame(); + + // 1. Show the big demo window (Most of the sample code is in ImGui::ShowDemoWindow()! You can browse its code to learn more about Dear ImGui!). + if (show_demo_window) + ImGui::ShowDemoWindow(&show_demo_window); + + // 2. Show a simple window that we create ourselves. We use a Begin/End pair to create a named window. + { + static float f = 0.0f; + static int counter = 0; + + ImGui::Begin("Hello, world!"); // Create a window called "Hello, world!" and append into it. + + ImGui::Text("This is some useful text."); // Display some text (you can use a format strings too) + ImGui::Checkbox("Demo Window", &show_demo_window); // Edit bools storing our window open/close state + ImGui::Checkbox("Another Window", &show_another_window); + + ImGui::SliderFloat("float", &f, 0.0f, 1.0f); // Edit 1 float using a slider from 0.0f to 1.0f + ImGui::ColorEdit3("clear color", (float*)&clear_color); // Edit 3 floats representing a color + + if (ImGui::Button("Button")) // Buttons return true when clicked (most widgets return true when edited/activated) + counter++; + ImGui::SameLine(); + ImGui::Text("counter = %d", counter); + + ImGui::Text("Application average %.3f ms/frame (%.1f FPS)", 1000.0f / io.Framerate, io.Framerate); + ImGui::End(); + } + + // 3. Show another simple window. + if (show_another_window) + { + ImGui::Begin("Another Window", &show_another_window); // Pass a pointer to our bool variable (the window will have a closing button that will clear the bool when clicked) + ImGui::Text("Hello from another window!"); + if (ImGui::Button("Close Me")) + show_another_window = false; + ImGui::End(); + } + + // Rendering + ImGui::Render(); + glViewport(0, 0, (int)io.DisplaySize.x, (int)io.DisplaySize.y); + glClearColor(clear_color.x * clear_color.w, clear_color.y * clear_color.w, clear_color.z * clear_color.w, clear_color.w); + glClear(GL_COLOR_BUFFER_BIT); + //glUseProgram(0); // You may want this if using this code in an OpenGL 3+ context where shaders may be bound + ImGui_ImplOpenGL2_RenderDrawData(ImGui::GetDrawData()); + + // Update and Render additional Platform Windows + // (Platform functions may change the current OpenGL context, so we save/restore it to make it easier to paste this code elsewhere. + // For this specific demo app we could also call SDL_GL_MakeCurrent(window, gl_context) directly) + if (io.ConfigFlags & ImGuiConfigFlags_ViewportsEnable) + { + SDL_Window* backup_current_window = SDL_GL_GetCurrentWindow(); + SDL_GLContext backup_current_context = SDL_GL_GetCurrentContext(); + ImGui::UpdatePlatformWindows(); + ImGui::RenderPlatformWindowsDefault(); + SDL_GL_MakeCurrent(backup_current_window, backup_current_context); + } + + SDL_GL_SwapWindow(window); + } + + // Cleanup + ImGui_ImplOpenGL2_Shutdown(); + ImGui_ImplSDL2_Shutdown(); + ImGui::DestroyContext(); + + SDL_GL_DeleteContext(gl_context); + SDL_DestroyWindow(window); + SDL_Quit(); + + return 0; +} diff --git a/External/imgui-docking/examples/example_sdl2_opengl3/Makefile.emscripten b/External/imgui-docking/examples/example_sdl2_opengl3/Makefile.emscripten new file mode 100644 index 0000000..da03484 --- /dev/null +++ b/External/imgui-docking/examples/example_sdl2_opengl3/Makefile.emscripten @@ -0,0 +1,92 @@ +# +# Makefile to use with SDL+emscripten +# See https://emscripten.org/docs/getting_started/downloads.html +# for installation instructions. +# +# This Makefile assumes you have loaded emscripten's environment. +# (On Windows, you may need to execute emsdk_env.bat or encmdprompt.bat ahead) +# +# Running `make -f Makefile.emscripten` will produce three files: +# - web/index.html +# - web/index.js +# - web/index.wasm +# +# All three are needed to run the demo. + +CC = emcc +CXX = em++ +WEB_DIR = web +EXE = $(WEB_DIR)/index.html +IMGUI_DIR = ../.. +SOURCES = main.cpp +SOURCES += $(IMGUI_DIR)/imgui.cpp $(IMGUI_DIR)/imgui_demo.cpp $(IMGUI_DIR)/imgui_draw.cpp $(IMGUI_DIR)/imgui_tables.cpp $(IMGUI_DIR)/imgui_widgets.cpp +SOURCES += $(IMGUI_DIR)/backends/imgui_impl_sdl2.cpp $(IMGUI_DIR)/backends/imgui_impl_opengl3.cpp +OBJS = $(addsuffix .o, $(basename $(notdir $(SOURCES)))) +UNAME_S := $(shell uname -s) +CPPFLAGS = +LDFLAGS = +EMS = + +##--------------------------------------------------------------------- +## EMSCRIPTEN OPTIONS +##--------------------------------------------------------------------- + +# ("EMS" options gets added to both CPPFLAGS and LDFLAGS, whereas some options are for linker only) +EMS += -s USE_SDL=2 +EMS += -s DISABLE_EXCEPTION_CATCHING=1 +LDFLAGS += -s WASM=1 -s ALLOW_MEMORY_GROWTH=1 -s NO_EXIT_RUNTIME=0 -s ASSERTIONS=1 + +# Uncomment next line to fix possible rendering bugs with Emscripten version older then 1.39.0 (https://github.com/ocornut/imgui/issues/2877) +#EMS += -s BINARYEN_TRAP_MODE=clamp +#EMS += -s SAFE_HEAP=1 ## Adds overhead + +# Emscripten allows preloading a file or folder to be accessible at runtime. +# The Makefile for this example project suggests embedding the misc/fonts/ folder into our application, it will then be accessible as "/fonts" +# See documentation for more details: https://emscripten.org/docs/porting/files/packaging_files.html +# (Default value is 0. Set to 1 to enable file-system and include the misc/fonts/ folder as part of the build.) +USE_FILE_SYSTEM ?= 0 +ifeq ($(USE_FILE_SYSTEM), 0) +LDFLAGS += -s NO_FILESYSTEM=1 +CPPFLAGS += -DIMGUI_DISABLE_FILE_FUNCTIONS +endif +ifeq ($(USE_FILE_SYSTEM), 1) +LDFLAGS += --no-heap-copy --preload-file ../../misc/fonts@/fonts +endif + +##--------------------------------------------------------------------- +## FINAL BUILD FLAGS +##--------------------------------------------------------------------- + +CPPFLAGS += -I$(IMGUI_DIR) -I$(IMGUI_DIR)/backends +#CPPFLAGS += -g +CPPFLAGS += -Wall -Wformat -Os $(EMS) +LDFLAGS += --shell-file ../libs/emscripten/shell_minimal.html +LDFLAGS += $(EMS) + +##--------------------------------------------------------------------- +## BUILD RULES +##--------------------------------------------------------------------- + +%.o:%.cpp + $(CXX) $(CPPFLAGS) $(CXXFLAGS) -c -o $@ $< + +%.o:$(IMGUI_DIR)/%.cpp + $(CXX) $(CPPFLAGS) $(CXXFLAGS) -c -o $@ $< + +%.o:$(IMGUI_DIR)/backends/%.cpp + $(CXX) $(CPPFLAGS) $(CXXFLAGS) -c -o $@ $< + +all: $(EXE) + @echo Build complete for $(EXE) + +$(WEB_DIR): + mkdir $@ + +serve: all + python3 -m http.server -d $(WEB_DIR) + +$(EXE): $(OBJS) $(WEB_DIR) + $(CXX) -o $@ $(OBJS) $(LDFLAGS) + +clean: + rm -rf $(OBJS) $(WEB_DIR) diff --git a/External/imgui-docking/examples/example_sdl2_opengl3/README.md b/External/imgui-docking/examples/example_sdl2_opengl3/README.md new file mode 100644 index 0000000..81fd9fe --- /dev/null +++ b/External/imgui-docking/examples/example_sdl2_opengl3/README.md @@ -0,0 +1,57 @@ + +# How to Build + +## Windows with Visual Studio's IDE + +Use the provided project file (.vcxproj). Add to solution (imgui_examples.sln) if necessary. + +## Windows with Visual Studio's CLI + +Use build_win32.bat or directly: +``` +set SDL2_DIR=path_to_your_sdl2_folder +cl /Zi /MD /utf-8 /I.. /I..\.. /I%SDL2_DIR%\include main.cpp ..\..\backends\imgui_impl_sdl2.cpp ..\..\backends\imgui_impl_opengl3.cpp ..\..\imgui*.cpp /FeDebug/example_sdl2_opengl3.exe /FoDebug/ /link /libpath:%SDL2_DIR%\lib\x86 SDL2.lib SDL2main.lib opengl32.lib /subsystem:console +# ^^ include paths ^^ source files ^^ output exe ^^ output dir ^^ libraries +# or for 64-bit: +cl /Zi /MD /utf-8 /I.. /I..\.. /I%SDL2_DIR%\include main.cpp ..\..\backends\imgui_impl_sdl2.cpp ..\..\backends\imgui_impl_opengl3.cpp ..\..\imgui*.cpp /FeDebug/example_sdl2_opengl3.exe /FoDebug/ /link /libpath:%SDL2_DIR%\lib\x64 SDL2.lib SDL2main.lib opengl32.lib /subsystem:console +``` + +## Linux and similar Unixes + +Use our Makefile or directly: +``` +c++ `sdl2-config --cflags` -I .. -I ../.. -I ../../backends + main.cpp ../../backends/imgui_impl_sdl2.cpp ../../backends/imgui_impl_opengl3.cpp ../../imgui*.cpp + `sdl2-config --libs` -lGL -ldl +``` + +## macOS + +Use our Makefile or directly: +``` +brew install sdl2 +c++ `sdl2-config --cflags` -I .. -I ../.. -I ../../backends + main.cpp ../../backends/imgui_impl_sdl2.cpp ../../backends/imgui_impl_opengl3.cpp ../../imgui*.cpp + `sdl2-config --libs` -framework OpenGl -framework CoreFoundation +``` + +## Emscripten + +**Building** + +You need to install Emscripten from https://emscripten.org/docs/getting_started/downloads.html, and have the environment variables set, as described in https://emscripten.org/docs/getting_started/downloads.html#installation-instructions + +- Depending on your configuration, in Windows you may need to run `emsdk/emsdk_env.bat` in your console to access the Emscripten command-line tools. +- You may also refer to our [Continuous Integration setup](https://github.com/ocornut/imgui/tree/master/.github/workflows) for Emscripten setup. +- Then build using `make -f Makefile.emscripten` while in the current directory. + +**Running an Emscripten project** + +To run on a local machine: +- `make -f Makefile.emscripten serve` will use Python3 to spawn a local webserver, you can then browse http://localhost:8000 to access your build. +- Otherwise, generally you will need a local webserver. Quoting [https://emscripten.org/docs/getting_started](https://emscripten.org/docs/getting_started/Tutorial.html#generating-html):
    +_"Unfortunately several browsers (including Chrome, Safari, and Internet Explorer) do not support file:// [XHR](https://emscripten.org/docs/site/glossary.html#term-xhr) requests, and can’t load extra files needed by the HTML (like a .wasm file, or packaged file data as mentioned lower down). For these browsers you’ll need to serve the files using a [local webserver](https://emscripten.org/docs/getting_started/FAQ.html#faq-local-webserver) and then open http://localhost:8000/hello.html."_ +- Emscripten SDK has a handy `emrun` command: `emrun web/index.html --browser firefox` which will spawn a temporary local webserver (in Firefox). See https://emscripten.org/docs/compiling/Running-html-files-with-emrun.html for details. +- You may use Python 3 builtin webserver: `python -m http.server -d web` (this is what `make serve` uses). +- You may use Python 2 builtin webserver: `cd web && python -m SimpleHTTPServer`. +- If you are accessing the files over a network, certain browsers, such as Firefox, will restrict Gamepad API access to secure contexts only (e.g. https only). diff --git a/External/imgui-docking/examples/example_sdl2_opengl3/build_win32.bat b/External/imgui-docking/examples/example_sdl2_opengl3/build_win32.bat new file mode 100644 index 0000000..7b2fac9 --- /dev/null +++ b/External/imgui-docking/examples/example_sdl2_opengl3/build_win32.bat @@ -0,0 +1,8 @@ +@REM Build for Visual Studio compiler. Run your copy of vcvars32.bat or vcvarsall.bat to setup command-line compiler. +@set OUT_DIR=Debug +@set OUT_EXE=example_sdl2_opengl3 +@set INCLUDES=/I..\.. /I..\..\backends /I%SDL2_DIR%\include +@set SOURCES=main.cpp ..\..\backends\imgui_impl_sdl2.cpp ..\..\backends\imgui_impl_opengl3.cpp ..\..\imgui*.cpp +@set LIBS=/LIBPATH:%SDL2_DIR%\lib\x86 SDL2.lib SDL2main.lib opengl32.lib shell32.lib +mkdir %OUT_DIR% +cl /nologo /Zi /MD /utf-8 %INCLUDES% %SOURCES% /Fe%OUT_DIR%/%OUT_EXE%.exe /Fo%OUT_DIR%/ /link %LIBS% /subsystem:console diff --git a/External/imgui-docking/examples/example_sdl2_opengl3/example_sdl2_opengl3.vcxproj b/External/imgui-docking/examples/example_sdl2_opengl3/example_sdl2_opengl3.vcxproj new file mode 100644 index 0000000..6a81c67 --- /dev/null +++ b/External/imgui-docking/examples/example_sdl2_opengl3/example_sdl2_opengl3.vcxproj @@ -0,0 +1,187 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {BBAEB705-1669-40F3-8567-04CF6A991F4C} + example_sdl2_opengl3 + 8.1 + + + + Application + true + MultiByte + v140 + + + Application + true + MultiByte + v140 + + + Application + false + true + MultiByte + v140 + + + Application + false + true + MultiByte + v140 + + + + + + + + + + + + + + + + + + + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + $(IncludePath) + + + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + $(IncludePath) + + + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + $(IncludePath) + + + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + $(IncludePath) + + + + Level4 + Disabled + ..\..;..\..\backends;%SDL2_DIR%\include;$(VcpkgCurrentInstalledDir)include\SDL2;%(AdditionalIncludeDirectories) + /utf-8 %(AdditionalOptions) + + + true + %SDL2_DIR%\lib\x86;%(AdditionalLibraryDirectories) + opengl32.lib;SDL2.lib;SDL2main.lib;%(AdditionalDependencies) + Console + msvcrt.lib + + + + + Level4 + Disabled + ..\..;..\..\backends;%SDL2_DIR%\include;$(VcpkgCurrentInstalledDir)include\SDL2;%(AdditionalIncludeDirectories) + /utf-8 %(AdditionalOptions) + + + true + %SDL2_DIR%\lib\x64;%(AdditionalLibraryDirectories) + opengl32.lib;SDL2.lib;SDL2main.lib;%(AdditionalDependencies) + Console + msvcrt.lib + + + + + Level4 + MaxSpeed + true + true + ..\..;..\..\backends;%SDL2_DIR%\include;$(VcpkgCurrentInstalledDir)include\SDL2;%(AdditionalIncludeDirectories) + false + /utf-8 %(AdditionalOptions) + + + true + true + true + %SDL2_DIR%\lib\x86;%(AdditionalLibraryDirectories) + opengl32.lib;SDL2.lib;SDL2main.lib;%(AdditionalDependencies) + Console + + + + + + + Level4 + MaxSpeed + true + true + ..\..;..\..\backends;%SDL2_DIR%\include;$(VcpkgCurrentInstalledDir)include\SDL2;%(AdditionalIncludeDirectories) + false + /utf-8 %(AdditionalOptions) + + + true + true + true + %SDL2_DIR%\lib\x64;%(AdditionalLibraryDirectories) + opengl32.lib;SDL2.lib;SDL2main.lib;%(AdditionalDependencies) + Console + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/External/imgui-docking/examples/example_sdl2_opengl3/example_sdl2_opengl3.vcxproj.filters b/External/imgui-docking/examples/example_sdl2_opengl3/example_sdl2_opengl3.vcxproj.filters new file mode 100644 index 0000000..846d557 --- /dev/null +++ b/External/imgui-docking/examples/example_sdl2_opengl3/example_sdl2_opengl3.vcxproj.filters @@ -0,0 +1,67 @@ + + + + + {20b90ce4-7fcb-4731-b9a0-075f875de82d} + + + {f18ab499-84e1-499f-8eff-9754361e0e52} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + + + imgui + + + imgui + + + imgui + + + sources + + + sources + + + sources + + + imgui + + + imgui + + + + + imgui + + + imgui + + + imgui + + + sources + + + sources + + + sources + + + + + + imgui + + + imgui + + + \ No newline at end of file diff --git a/External/imgui-docking/examples/example_sdl2_opengl3/main.cpp b/External/imgui-docking/examples/example_sdl2_opengl3/main.cpp new file mode 100644 index 0000000..9f983d9 --- /dev/null +++ b/External/imgui-docking/examples/example_sdl2_opengl3/main.cpp @@ -0,0 +1,233 @@ +// Dear ImGui: standalone example application for SDL2 + OpenGL +// (SDL is a cross-platform general purpose library for handling windows, inputs, OpenGL/Vulkan/Metal graphics context creation, etc.) + +// Learn about Dear ImGui: +// - FAQ https://dearimgui.com/faq +// - Getting Started https://dearimgui.com/getting-started +// - Documentation https://dearimgui.com/docs (same as your local docs/ folder). +// - Introduction, links and more at the top of imgui.cpp + +#include "imgui.h" +#include "imgui_impl_sdl2.h" +#include "imgui_impl_opengl3.h" +#include +#include +#if defined(IMGUI_IMPL_OPENGL_ES2) +#include +#else +#include +#endif + +// This example can also compile and run with Emscripten! See 'Makefile.emscripten' for details. +#ifdef __EMSCRIPTEN__ +#include "../libs/emscripten/emscripten_mainloop_stub.h" +#endif + +// Main code +int main(int, char**) +{ + // Setup SDL + if (SDL_Init(SDL_INIT_VIDEO | SDL_INIT_TIMER | SDL_INIT_GAMECONTROLLER) != 0) + { + printf("Error: %s\n", SDL_GetError()); + return -1; + } + + // Decide GL+GLSL versions +#if defined(IMGUI_IMPL_OPENGL_ES2) + // GL ES 2.0 + GLSL 100 + const char* glsl_version = "#version 100"; + SDL_GL_SetAttribute(SDL_GL_CONTEXT_FLAGS, 0); + SDL_GL_SetAttribute(SDL_GL_CONTEXT_PROFILE_MASK, SDL_GL_CONTEXT_PROFILE_ES); + SDL_GL_SetAttribute(SDL_GL_CONTEXT_MAJOR_VERSION, 2); + SDL_GL_SetAttribute(SDL_GL_CONTEXT_MINOR_VERSION, 0); +#elif defined(__APPLE__) + // GL 3.2 Core + GLSL 150 + const char* glsl_version = "#version 150"; + SDL_GL_SetAttribute(SDL_GL_CONTEXT_FLAGS, SDL_GL_CONTEXT_FORWARD_COMPATIBLE_FLAG); // Always required on Mac + SDL_GL_SetAttribute(SDL_GL_CONTEXT_PROFILE_MASK, SDL_GL_CONTEXT_PROFILE_CORE); + SDL_GL_SetAttribute(SDL_GL_CONTEXT_MAJOR_VERSION, 3); + SDL_GL_SetAttribute(SDL_GL_CONTEXT_MINOR_VERSION, 2); +#else + // GL 3.0 + GLSL 130 + const char* glsl_version = "#version 130"; + SDL_GL_SetAttribute(SDL_GL_CONTEXT_FLAGS, 0); + SDL_GL_SetAttribute(SDL_GL_CONTEXT_PROFILE_MASK, SDL_GL_CONTEXT_PROFILE_CORE); + SDL_GL_SetAttribute(SDL_GL_CONTEXT_MAJOR_VERSION, 3); + SDL_GL_SetAttribute(SDL_GL_CONTEXT_MINOR_VERSION, 0); +#endif + + // From 2.0.18: Enable native IME. +#ifdef SDL_HINT_IME_SHOW_UI + SDL_SetHint(SDL_HINT_IME_SHOW_UI, "1"); +#endif + + // Create window with graphics context + SDL_GL_SetAttribute(SDL_GL_DOUBLEBUFFER, 1); + SDL_GL_SetAttribute(SDL_GL_DEPTH_SIZE, 24); + SDL_GL_SetAttribute(SDL_GL_STENCIL_SIZE, 8); + SDL_WindowFlags window_flags = (SDL_WindowFlags)(SDL_WINDOW_OPENGL | SDL_WINDOW_RESIZABLE | SDL_WINDOW_ALLOW_HIGHDPI); + SDL_Window* window = SDL_CreateWindow("Dear ImGui SDL2+OpenGL3 example", SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED, 1280, 720, window_flags); + if (window == nullptr) + { + printf("Error: SDL_CreateWindow(): %s\n", SDL_GetError()); + return -1; + } + + SDL_GLContext gl_context = SDL_GL_CreateContext(window); + SDL_GL_MakeCurrent(window, gl_context); + SDL_GL_SetSwapInterval(1); // Enable vsync + + // Setup Dear ImGui context + IMGUI_CHECKVERSION(); + ImGui::CreateContext(); + ImGuiIO& io = ImGui::GetIO(); (void)io; + io.ConfigFlags |= ImGuiConfigFlags_NavEnableKeyboard; // Enable Keyboard Controls + io.ConfigFlags |= ImGuiConfigFlags_NavEnableGamepad; // Enable Gamepad Controls + io.ConfigFlags |= ImGuiConfigFlags_DockingEnable; // Enable Docking + io.ConfigFlags |= ImGuiConfigFlags_ViewportsEnable; // Enable Multi-Viewport / Platform Windows + //io.ConfigViewportsNoAutoMerge = true; + //io.ConfigViewportsNoTaskBarIcon = true; + + // Setup Dear ImGui style + ImGui::StyleColorsDark(); + //ImGui::StyleColorsLight(); + + // When viewports are enabled we tweak WindowRounding/WindowBg so platform windows can look identical to regular ones. + ImGuiStyle& style = ImGui::GetStyle(); + if (io.ConfigFlags & ImGuiConfigFlags_ViewportsEnable) + { + style.WindowRounding = 0.0f; + style.Colors[ImGuiCol_WindowBg].w = 1.0f; + } + + // Setup Platform/Renderer backends + ImGui_ImplSDL2_InitForOpenGL(window, gl_context); + ImGui_ImplOpenGL3_Init(glsl_version); + + // Load Fonts + // - If no fonts are loaded, dear imgui will use the default font. You can also load multiple fonts and use ImGui::PushFont()/PopFont() to select them. + // - AddFontFromFileTTF() will return the ImFont* so you can store it if you need to select the font among multiple. + // - If the file cannot be loaded, the function will return a nullptr. Please handle those errors in your application (e.g. use an assertion, or display an error and quit). + // - The fonts will be rasterized at a given size (w/ oversampling) and stored into a texture when calling ImFontAtlas::Build()/GetTexDataAsXXXX(), which ImGui_ImplXXXX_NewFrame below will call. + // - Use '#define IMGUI_ENABLE_FREETYPE' in your imconfig file to use Freetype for higher quality font rendering. + // - Read 'docs/FONTS.md' for more instructions and details. + // - Remember that in C/C++ if you want to include a backslash \ in a string literal you need to write a double backslash \\ ! + // - Our Emscripten build process allows embedding fonts to be accessible at runtime from the "fonts/" folder. See Makefile.emscripten for details. + //io.Fonts->AddFontDefault(); + //io.Fonts->AddFontFromFileTTF("c:\\Windows\\Fonts\\segoeui.ttf", 18.0f); + //io.Fonts->AddFontFromFileTTF("../../misc/fonts/DroidSans.ttf", 16.0f); + //io.Fonts->AddFontFromFileTTF("../../misc/fonts/Roboto-Medium.ttf", 16.0f); + //io.Fonts->AddFontFromFileTTF("../../misc/fonts/Cousine-Regular.ttf", 15.0f); + //ImFont* font = io.Fonts->AddFontFromFileTTF("c:\\Windows\\Fonts\\ArialUni.ttf", 18.0f, nullptr, io.Fonts->GetGlyphRangesJapanese()); + //IM_ASSERT(font != nullptr); + + // Our state + bool show_demo_window = true; + bool show_another_window = false; + ImVec4 clear_color = ImVec4(0.45f, 0.55f, 0.60f, 1.00f); + + // Main loop + bool done = false; +#ifdef __EMSCRIPTEN__ + // For an Emscripten build we are disabling file-system access, so let's not attempt to do a fopen() of the imgui.ini file. + // You may manually call LoadIniSettingsFromMemory() to load settings from your own storage. + io.IniFilename = nullptr; + EMSCRIPTEN_MAINLOOP_BEGIN +#else + while (!done) +#endif + { + // Poll and handle events (inputs, window resize, etc.) + // You can read the io.WantCaptureMouse, io.WantCaptureKeyboard flags to tell if dear imgui wants to use your inputs. + // - When io.WantCaptureMouse is true, do not dispatch mouse input data to your main application, or clear/overwrite your copy of the mouse data. + // - When io.WantCaptureKeyboard is true, do not dispatch keyboard input data to your main application, or clear/overwrite your copy of the keyboard data. + // Generally you may always pass all inputs to dear imgui, and hide them from your application based on those two flags. + SDL_Event event; + while (SDL_PollEvent(&event)) + { + ImGui_ImplSDL2_ProcessEvent(&event); + if (event.type == SDL_QUIT) + done = true; + if (event.type == SDL_WINDOWEVENT && event.window.event == SDL_WINDOWEVENT_CLOSE && event.window.windowID == SDL_GetWindowID(window)) + done = true; + } + + // Start the Dear ImGui frame + ImGui_ImplOpenGL3_NewFrame(); + ImGui_ImplSDL2_NewFrame(); + ImGui::NewFrame(); + + // 1. Show the big demo window (Most of the sample code is in ImGui::ShowDemoWindow()! You can browse its code to learn more about Dear ImGui!). + if (show_demo_window) + ImGui::ShowDemoWindow(&show_demo_window); + + // 2. Show a simple window that we create ourselves. We use a Begin/End pair to create a named window. + { + static float f = 0.0f; + static int counter = 0; + + ImGui::Begin("Hello, world!"); // Create a window called "Hello, world!" and append into it. + + ImGui::Text("This is some useful text."); // Display some text (you can use a format strings too) + ImGui::Checkbox("Demo Window", &show_demo_window); // Edit bools storing our window open/close state + ImGui::Checkbox("Another Window", &show_another_window); + + ImGui::SliderFloat("float", &f, 0.0f, 1.0f); // Edit 1 float using a slider from 0.0f to 1.0f + ImGui::ColorEdit3("clear color", (float*)&clear_color); // Edit 3 floats representing a color + + if (ImGui::Button("Button")) // Buttons return true when clicked (most widgets return true when edited/activated) + counter++; + ImGui::SameLine(); + ImGui::Text("counter = %d", counter); + + ImGui::Text("Application average %.3f ms/frame (%.1f FPS)", 1000.0f / io.Framerate, io.Framerate); + ImGui::End(); + } + + // 3. Show another simple window. + if (show_another_window) + { + ImGui::Begin("Another Window", &show_another_window); // Pass a pointer to our bool variable (the window will have a closing button that will clear the bool when clicked) + ImGui::Text("Hello from another window!"); + if (ImGui::Button("Close Me")) + show_another_window = false; + ImGui::End(); + } + + // Rendering + ImGui::Render(); + glViewport(0, 0, (int)io.DisplaySize.x, (int)io.DisplaySize.y); + glClearColor(clear_color.x * clear_color.w, clear_color.y * clear_color.w, clear_color.z * clear_color.w, clear_color.w); + glClear(GL_COLOR_BUFFER_BIT); + ImGui_ImplOpenGL3_RenderDrawData(ImGui::GetDrawData()); + + // Update and Render additional Platform Windows + // (Platform functions may change the current OpenGL context, so we save/restore it to make it easier to paste this code elsewhere. + // For this specific demo app we could also call SDL_GL_MakeCurrent(window, gl_context) directly) + if (io.ConfigFlags & ImGuiConfigFlags_ViewportsEnable) + { + SDL_Window* backup_current_window = SDL_GL_GetCurrentWindow(); + SDL_GLContext backup_current_context = SDL_GL_GetCurrentContext(); + ImGui::UpdatePlatformWindows(); + ImGui::RenderPlatformWindowsDefault(); + SDL_GL_MakeCurrent(backup_current_window, backup_current_context); + } + + SDL_GL_SwapWindow(window); + } +#ifdef __EMSCRIPTEN__ + EMSCRIPTEN_MAINLOOP_END; +#endif + + // Cleanup + ImGui_ImplOpenGL3_Shutdown(); + ImGui_ImplSDL2_Shutdown(); + ImGui::DestroyContext(); + + SDL_GL_DeleteContext(gl_context); + SDL_DestroyWindow(window); + SDL_Quit(); + + return 0; +} diff --git a/External/imgui-docking/examples/example_sdl2_sdlrenderer2/README.md b/External/imgui-docking/examples/example_sdl2_sdlrenderer2/README.md new file mode 100644 index 0000000..ef6fe85 --- /dev/null +++ b/External/imgui-docking/examples/example_sdl2_sdlrenderer2/README.md @@ -0,0 +1,25 @@ + +# How to Build + +- On Windows with Visual Studio's CLI + +``` +set SDL2_DIR=path_to_your_sdl2_folder +cl /Zi /MD /utf-8 /I.. /I..\.. /I%SDL2_DIR%\include main.cpp ..\..\backends\imgui_impl_sdl2.cpp ..\..\backends\imgui_impl_sdlrenderer2.cpp ..\..\imgui*.cpp /FeDebug/example_sdl2_sdlrenderer.exe /FoDebug/ /link /libpath:%SDL2_DIR%\lib\x86 SDL2.lib SDL2main.lib /subsystem:console +# ^^ include paths ^^ source files ^^ output exe ^^ output dir ^^ libraries +# or for 64-bit: +cl /Zi /MD /utf-8 /I.. /I..\.. /I%SDL2_DIR%\include main.cpp ..\..\backends\imgui_impl_sdl2.cpp ..\..\backends\imgui_impl_sdlrenderer2.cpp ..\..\imgui*.cpp /FeDebug/example_sdl2_sdlrenderer.exe /FoDebug/ /link /libpath:%SDL2_DIR%\lib\x64 SDL2.lib SDL2main.lib /subsystem:console +``` + +- On Linux and similar Unixes + +``` +c++ `sdl2-config --cflags` -I .. -I ../.. main.cpp ../../backends/imgui_impl_sdl2.cpp ../../backends/imgui_impl_sdlrenderer2.cpp ../../imgui*.cpp `sdl2-config --libs` -lGL +``` + +- On Mac OS X + +``` +brew install sdl2 +c++ `sdl2-config --cflags` -I .. -I ../.. main.cpp ../../backends/imgui_impl_sdl2.cpp ../../backends/imgui_impl_sdlrenderer2.cpp ../../imgui*.cpp `sdl2-config --libs` -framework OpenGl +``` diff --git a/External/imgui-docking/examples/example_sdl2_sdlrenderer2/build_win32.bat b/External/imgui-docking/examples/example_sdl2_sdlrenderer2/build_win32.bat new file mode 100644 index 0000000..e311bfc --- /dev/null +++ b/External/imgui-docking/examples/example_sdl2_sdlrenderer2/build_win32.bat @@ -0,0 +1,8 @@ +@REM Build for Visual Studio compiler. Run your copy of vcvars32.bat or vcvarsall.bat to setup command-line compiler. +@set OUT_DIR=Debug +@set OUT_EXE=example_sdl2_sdlrenderer_ +@set INCLUDES=/I..\.. /I..\..\backends /I%SDL2_DIR%\include +@set SOURCES=main.cpp ..\..\backends\imgui_impl_sdl2.cpp ..\..\backends\imgui_impl_sdlrenderer2.cpp ..\..\imgui*.cpp +@set LIBS=/LIBPATH:%SDL2_DIR%\lib\x86 SDL2.lib SDL2main.lib +mkdir %OUT_DIR% +cl /nologo /Zi /MD /utf-8 %INCLUDES% %SOURCES% /Fe%OUT_DIR%/%OUT_EXE%.exe /Fo%OUT_DIR%/ /link %LIBS% /subsystem:console diff --git a/External/imgui-docking/examples/example_sdl2_sdlrenderer2/example_sdl2_sdlrenderer2.vcxproj b/External/imgui-docking/examples/example_sdl2_sdlrenderer2/example_sdl2_sdlrenderer2.vcxproj new file mode 100644 index 0000000..cf2c890 --- /dev/null +++ b/External/imgui-docking/examples/example_sdl2_sdlrenderer2/example_sdl2_sdlrenderer2.vcxproj @@ -0,0 +1,187 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {0C0B2BEA-311F-473C-9652-87923EF639E3} + example_sdl2_sdlrenderer2 + 8.1 + example_sdl2_sdlrenderer2 + + + + Application + true + MultiByte + v140 + + + Application + true + MultiByte + v140 + + + Application + false + true + MultiByte + v140 + + + Application + false + true + MultiByte + v140 + + + + + + + + + + + + + + + + + + + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + $(IncludePath) + + + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + $(IncludePath) + + + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + $(IncludePath) + + + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + $(IncludePath) + + + + Level4 + Disabled + ..\..;..\..\backends;%SDL2_DIR%\include;%(AdditionalIncludeDirectories) + /utf-8 %(AdditionalOptions) + + + true + %SDL2_DIR%\lib\x86;%(AdditionalLibraryDirectories) + SDL2.lib;SDL2main.lib;%(AdditionalDependencies) + Console + msvcrt.lib + + + + + Level4 + Disabled + ..\..;..\..\backends;%SDL2_DIR%\include;%(AdditionalIncludeDirectories) + /utf-8 %(AdditionalOptions) + + + true + %SDL2_DIR%\lib\x64;%(AdditionalLibraryDirectories) + SDL2.lib;SDL2main.lib;%(AdditionalDependencies) + Console + msvcrt.lib + + + + + Level4 + MaxSpeed + true + true + ..\..;..\..\backends;%SDL2_DIR%\include;%(AdditionalIncludeDirectories) + false + /utf-8 %(AdditionalOptions) + + + true + true + true + %SDL2_DIR%\lib\x86;%(AdditionalLibraryDirectories) + SDL2.lib;SDL2main.lib;%(AdditionalDependencies) + Console + + + + + + + Level4 + MaxSpeed + true + true + ..\..;..\..\backends;%SDL2_DIR%\include;%(AdditionalIncludeDirectories) + false + /utf-8 %(AdditionalOptions) + + + true + true + true + %SDL2_DIR%\lib\x64;%(AdditionalLibraryDirectories) + SDL2.lib;SDL2main.lib;%(AdditionalDependencies) + Console + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/External/imgui-docking/examples/example_sdl2_sdlrenderer2/example_sdl2_sdlrenderer2.vcxproj.filters b/External/imgui-docking/examples/example_sdl2_sdlrenderer2/example_sdl2_sdlrenderer2.vcxproj.filters new file mode 100644 index 0000000..5c6da42 --- /dev/null +++ b/External/imgui-docking/examples/example_sdl2_sdlrenderer2/example_sdl2_sdlrenderer2.vcxproj.filters @@ -0,0 +1,64 @@ + + + + + {20b90ce4-7fcb-4731-b9a0-075f875de82d} + + + {f18ab499-84e1-499f-8eff-9754361e0e52} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + + + imgui + + + imgui + + + imgui + + + sources + + + imgui + + + imgui + + + sources + + + sources + + + + + imgui + + + imgui + + + imgui + + + sources + + + sources + + + + + + imgui + + + imgui + + + diff --git a/External/imgui-docking/examples/example_sdl2_sdlrenderer2/main.cpp b/External/imgui-docking/examples/example_sdl2_sdlrenderer2/main.cpp new file mode 100644 index 0000000..4d0ebff --- /dev/null +++ b/External/imgui-docking/examples/example_sdl2_sdlrenderer2/main.cpp @@ -0,0 +1,173 @@ +// Dear ImGui: standalone example application for SDL2 + SDL_Renderer +// (SDL is a cross-platform general purpose library for handling windows, inputs, OpenGL/Vulkan/Metal graphics context creation, etc.) + +// Learn about Dear ImGui: +// - FAQ https://dearimgui.com/faq +// - Getting Started https://dearimgui.com/getting-started +// - Documentation https://dearimgui.com/docs (same as your local docs/ folder). +// - Introduction, links and more at the top of imgui.cpp + +// Important to understand: SDL_Renderer is an _optional_ component of SDL2. +// For a multi-platform app consider using e.g. SDL+DirectX on Windows and SDL+OpenGL on Linux/OSX. + +#include "imgui.h" +#include "imgui_impl_sdl2.h" +#include "imgui_impl_sdlrenderer2.h" +#include +#include + +#if !SDL_VERSION_ATLEAST(2,0,17) +#error This backend requires SDL 2.0.17+ because of SDL_RenderGeometry() function +#endif + +// Main code +int main(int, char**) +{ + // Setup SDL + if (SDL_Init(SDL_INIT_VIDEO | SDL_INIT_TIMER | SDL_INIT_GAMECONTROLLER) != 0) + { + printf("Error: %s\n", SDL_GetError()); + return -1; + } + + // From 2.0.18: Enable native IME. +#ifdef SDL_HINT_IME_SHOW_UI + SDL_SetHint(SDL_HINT_IME_SHOW_UI, "1"); +#endif + + // Create window with SDL_Renderer graphics context + SDL_WindowFlags window_flags = (SDL_WindowFlags)(SDL_WINDOW_RESIZABLE | SDL_WINDOW_ALLOW_HIGHDPI); + SDL_Window* window = SDL_CreateWindow("Dear ImGui SDL2+SDL_Renderer example", SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED, 1280, 720, window_flags); + if (window == nullptr) + { + printf("Error: SDL_CreateWindow(): %s\n", SDL_GetError()); + return -1; + } + SDL_Renderer* renderer = SDL_CreateRenderer(window, -1, SDL_RENDERER_PRESENTVSYNC | SDL_RENDERER_ACCELERATED); + if (renderer == nullptr) + { + SDL_Log("Error creating SDL_Renderer!"); + return 0; + } + //SDL_RendererInfo info; + //SDL_GetRendererInfo(renderer, &info); + //SDL_Log("Current SDL_Renderer: %s", info.name); + + // Setup Dear ImGui context + IMGUI_CHECKVERSION(); + ImGui::CreateContext(); + ImGuiIO& io = ImGui::GetIO(); (void)io; + io.ConfigFlags |= ImGuiConfigFlags_NavEnableKeyboard; // Enable Keyboard Controls + io.ConfigFlags |= ImGuiConfigFlags_NavEnableGamepad; // Enable Gamepad Controls + io.ConfigFlags |= ImGuiConfigFlags_DockingEnable; // Enable Docking + + // Setup Dear ImGui style + ImGui::StyleColorsDark(); + //ImGui::StyleColorsLight(); + + // Setup Platform/Renderer backends + ImGui_ImplSDL2_InitForSDLRenderer(window, renderer); + ImGui_ImplSDLRenderer2_Init(renderer); + + // Load Fonts + // - If no fonts are loaded, dear imgui will use the default font. You can also load multiple fonts and use ImGui::PushFont()/PopFont() to select them. + // - AddFontFromFileTTF() will return the ImFont* so you can store it if you need to select the font among multiple. + // - If the file cannot be loaded, the function will return a nullptr. Please handle those errors in your application (e.g. use an assertion, or display an error and quit). + // - The fonts will be rasterized at a given size (w/ oversampling) and stored into a texture when calling ImFontAtlas::Build()/GetTexDataAsXXXX(), which ImGui_ImplXXXX_NewFrame below will call. + // - Use '#define IMGUI_ENABLE_FREETYPE' in your imconfig file to use Freetype for higher quality font rendering. + // - Read 'docs/FONTS.md' for more instructions and details. + // - Remember that in C/C++ if you want to include a backslash \ in a string literal you need to write a double backslash \\ ! + //io.Fonts->AddFontDefault(); + //io.Fonts->AddFontFromFileTTF("c:\\Windows\\Fonts\\segoeui.ttf", 18.0f); + //io.Fonts->AddFontFromFileTTF("../../misc/fonts/DroidSans.ttf", 16.0f); + //io.Fonts->AddFontFromFileTTF("../../misc/fonts/Roboto-Medium.ttf", 16.0f); + //io.Fonts->AddFontFromFileTTF("../../misc/fonts/Cousine-Regular.ttf", 15.0f); + //ImFont* font = io.Fonts->AddFontFromFileTTF("c:\\Windows\\Fonts\\ArialUni.ttf", 18.0f, nullptr, io.Fonts->GetGlyphRangesJapanese()); + //IM_ASSERT(font != nullptr); + + // Our state + bool show_demo_window = true; + bool show_another_window = false; + ImVec4 clear_color = ImVec4(0.45f, 0.55f, 0.60f, 1.00f); + + // Main loop + bool done = false; + while (!done) + { + // Poll and handle events (inputs, window resize, etc.) + // You can read the io.WantCaptureMouse, io.WantCaptureKeyboard flags to tell if dear imgui wants to use your inputs. + // - When io.WantCaptureMouse is true, do not dispatch mouse input data to your main application, or clear/overwrite your copy of the mouse data. + // - When io.WantCaptureKeyboard is true, do not dispatch keyboard input data to your main application, or clear/overwrite your copy of the keyboard data. + // Generally you may always pass all inputs to dear imgui, and hide them from your application based on those two flags. + SDL_Event event; + while (SDL_PollEvent(&event)) + { + ImGui_ImplSDL2_ProcessEvent(&event); + if (event.type == SDL_QUIT) + done = true; + if (event.type == SDL_WINDOWEVENT && event.window.event == SDL_WINDOWEVENT_CLOSE && event.window.windowID == SDL_GetWindowID(window)) + done = true; + } + + // Start the Dear ImGui frame + ImGui_ImplSDLRenderer2_NewFrame(); + ImGui_ImplSDL2_NewFrame(); + ImGui::NewFrame(); + + // 1. Show the big demo window (Most of the sample code is in ImGui::ShowDemoWindow()! You can browse its code to learn more about Dear ImGui!). + if (show_demo_window) + ImGui::ShowDemoWindow(&show_demo_window); + + // 2. Show a simple window that we create ourselves. We use a Begin/End pair to create a named window. + { + static float f = 0.0f; + static int counter = 0; + + ImGui::Begin("Hello, world!"); // Create a window called "Hello, world!" and append into it. + + ImGui::Text("This is some useful text."); // Display some text (you can use a format strings too) + ImGui::Checkbox("Demo Window", &show_demo_window); // Edit bools storing our window open/close state + ImGui::Checkbox("Another Window", &show_another_window); + + ImGui::SliderFloat("float", &f, 0.0f, 1.0f); // Edit 1 float using a slider from 0.0f to 1.0f + ImGui::ColorEdit3("clear color", (float*)&clear_color); // Edit 3 floats representing a color + + if (ImGui::Button("Button")) // Buttons return true when clicked (most widgets return true when edited/activated) + counter++; + ImGui::SameLine(); + ImGui::Text("counter = %d", counter); + + ImGui::Text("Application average %.3f ms/frame (%.1f FPS)", 1000.0f / io.Framerate, io.Framerate); + ImGui::End(); + } + + // 3. Show another simple window. + if (show_another_window) + { + ImGui::Begin("Another Window", &show_another_window); // Pass a pointer to our bool variable (the window will have a closing button that will clear the bool when clicked) + ImGui::Text("Hello from another window!"); + if (ImGui::Button("Close Me")) + show_another_window = false; + ImGui::End(); + } + + // Rendering + ImGui::Render(); + SDL_RenderSetScale(renderer, io.DisplayFramebufferScale.x, io.DisplayFramebufferScale.y); + SDL_SetRenderDrawColor(renderer, (Uint8)(clear_color.x * 255), (Uint8)(clear_color.y * 255), (Uint8)(clear_color.z * 255), (Uint8)(clear_color.w * 255)); + SDL_RenderClear(renderer); + ImGui_ImplSDLRenderer2_RenderDrawData(ImGui::GetDrawData(), renderer); + SDL_RenderPresent(renderer); + } + + // Cleanup + ImGui_ImplSDLRenderer2_Shutdown(); + ImGui_ImplSDL2_Shutdown(); + ImGui::DestroyContext(); + + SDL_DestroyRenderer(renderer); + SDL_DestroyWindow(window); + SDL_Quit(); + + return 0; +} diff --git a/External/imgui-docking/examples/example_sdl2_vulkan/build_win32.bat b/External/imgui-docking/examples/example_sdl2_vulkan/build_win32.bat new file mode 100644 index 0000000..8a4aefc --- /dev/null +++ b/External/imgui-docking/examples/example_sdl2_vulkan/build_win32.bat @@ -0,0 +1,10 @@ +@REM Build for Visual Studio compiler. Run your copy of vcvars32.bat or vcvarsall.bat to setup command-line compiler. + +@set OUT_EXE=example_sdl2_vulkan +@set INCLUDES=/I..\.. /I..\..\backends /I%SDL2_DIR%\include /I %VULKAN_SDK%\include +@set SOURCES=main.cpp ..\..\backends\imgui_impl_sdl2.cpp ..\..\backends\imgui_impl_vulkan.cpp ..\..\imgui*.cpp +@set LIBS=/LIBPATH:%SDL2_DIR%\lib\x86 /libpath:%VULKAN_SDK%\lib32 SDL2.lib SDL2main.lib shell32.lib vulkan-1.lib + +@set OUT_DIR=Debug +mkdir %OUT_DIR% +cl /nologo /Zi /MD /utf-8 %INCLUDES% /D ImTextureID=ImU64 %SOURCES% /Fe%OUT_DIR%/%OUT_EXE%.exe /Fo%OUT_DIR%/ /link %LIBS% /subsystem:console diff --git a/External/imgui-docking/examples/example_sdl2_vulkan/example_sdl2_vulkan.vcxproj b/External/imgui-docking/examples/example_sdl2_vulkan/example_sdl2_vulkan.vcxproj new file mode 100644 index 0000000..ba6afaf --- /dev/null +++ b/External/imgui-docking/examples/example_sdl2_vulkan/example_sdl2_vulkan.vcxproj @@ -0,0 +1,190 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {BAE3D0B5-9695-4EB1-AD0F-75890EB4A3B3} + example_sdl2_vulkan + 8.1 + + + + Application + true + MultiByte + v140 + + + Application + true + MultiByte + v140 + + + Application + false + true + MultiByte + v140 + + + Application + false + true + MultiByte + v140 + + + + + + + + + + + + + + + + + + + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + $(IncludePath) + + + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + $(IncludePath) + + + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + $(IncludePath) + + + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + $(IncludePath) + + + + Level4 + Disabled + ..\..;..\..\backends;%VULKAN_SDK%\include;%SDL2_DIR%\include;$(VcpkgCurrentInstalledDir)include\SDL2;%(AdditionalIncludeDirectories) + ImTextureID=ImU64;_MBCS;%(PreprocessorDefinitions) + /utf-8 %(AdditionalOptions) + + + true + %VULKAN_SDK%\lib32;%SDL2_DIR%\lib\x86;%(AdditionalLibraryDirectories) + vulkan-1.lib;SDL2.lib;SDL2main.lib;%(AdditionalDependencies) + Console + msvcrt.lib + + + + + Level4 + Disabled + ..\..;..\..\backends;%VULKAN_SDK%\include;%SDL2_DIR%\include;$(VcpkgCurrentInstalledDir)include\SDL2;%(AdditionalIncludeDirectories) + ImTextureID=ImU64;_MBCS;%(PreprocessorDefinitions) + /utf-8 %(AdditionalOptions) + + + true + %VULKAN_SDK%\lib;%SDL2_DIR%\lib\x64;%(AdditionalLibraryDirectories) + vulkan-1.lib;SDL2.lib;SDL2main.lib;%(AdditionalDependencies) + Console + msvcrt.lib + + + + + Level4 + MaxSpeed + true + true + ..\..;..\..\backends;%VULKAN_SDK%\include;%SDL2_DIR%\include;$(VcpkgCurrentInstalledDir)include\SDL2;%(AdditionalIncludeDirectories) + false + ImTextureID=ImU64;_MBCS;%(PreprocessorDefinitions) + /utf-8 %(AdditionalOptions) + + + true + true + true + %VULKAN_SDK%\lib32;%SDL2_DIR%\lib\x86;%(AdditionalLibraryDirectories) + vulkan-1.lib;SDL2.lib;SDL2main.lib;%(AdditionalDependencies) + Console + + + + + + + Level4 + MaxSpeed + true + true + ..\..;..\..\backends;%VULKAN_SDK%\include;%SDL2_DIR%\include;$(VcpkgCurrentInstalledDir)include\SDL2;%(AdditionalIncludeDirectories) + false + ImTextureID=ImU64;_MBCS;%(PreprocessorDefinitions) + /utf-8 %(AdditionalOptions) + + + true + true + true + %VULKAN_SDK%\lib;%SDL2_DIR%\lib\x64;%(AdditionalLibraryDirectories) + vulkan-1.lib;SDL2.lib;SDL2main.lib;%(AdditionalDependencies) + Console + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/External/imgui-docking/examples/example_sdl2_vulkan/example_sdl2_vulkan.vcxproj.filters b/External/imgui-docking/examples/example_sdl2_vulkan/example_sdl2_vulkan.vcxproj.filters new file mode 100644 index 0000000..ab42485 --- /dev/null +++ b/External/imgui-docking/examples/example_sdl2_vulkan/example_sdl2_vulkan.vcxproj.filters @@ -0,0 +1,64 @@ + + + + + {20b90ce4-7fcb-4731-b9a0-075f875de82d} + + + {f18ab499-84e1-499f-8eff-9754361e0e52} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + + + imgui + + + imgui + + + imgui + + + sources + + + sources + + + sources + + + imgui + + + imgui + + + + + imgui + + + imgui + + + imgui + + + sources + + + sources + + + + + + imgui + + + imgui + + + \ No newline at end of file diff --git a/External/imgui-docking/examples/example_sdl2_vulkan/main.cpp b/External/imgui-docking/examples/example_sdl2_vulkan/main.cpp new file mode 100644 index 0000000..8b4da9a --- /dev/null +++ b/External/imgui-docking/examples/example_sdl2_vulkan/main.cpp @@ -0,0 +1,598 @@ +// Dear ImGui: standalone example application for SDL2 + Vulkan + +// Learn about Dear ImGui: +// - FAQ https://dearimgui.com/faq +// - Getting Started https://dearimgui.com/getting-started +// - Documentation https://dearimgui.com/docs (same as your local docs/ folder). +// - Introduction, links and more at the top of imgui.cpp + +// Important note to the reader who wish to integrate imgui_impl_vulkan.cpp/.h in their own engine/app. +// - Common ImGui_ImplVulkan_XXX functions and structures are used to interface with imgui_impl_vulkan.cpp/.h. +// You will use those if you want to use this rendering backend in your engine/app. +// - Helper ImGui_ImplVulkanH_XXX functions and structures are only used by this example (main.cpp) and by +// the backend itself (imgui_impl_vulkan.cpp), but should PROBABLY NOT be used by your own engine/app code. +// Read comments in imgui_impl_vulkan.h. + +#include "imgui.h" +#include "imgui_impl_sdl2.h" +#include "imgui_impl_vulkan.h" +#include // printf, fprintf +#include // abort +#include +#include + +// Volk headers +#ifdef IMGUI_IMPL_VULKAN_USE_VOLK +#define VOLK_IMPLEMENTATION +#include +#endif + +//#define APP_USE_UNLIMITED_FRAME_RATE +#ifdef _DEBUG +#define APP_USE_VULKAN_DEBUG_REPORT +#endif + +// Data +static VkAllocationCallbacks* g_Allocator = nullptr; +static VkInstance g_Instance = VK_NULL_HANDLE; +static VkPhysicalDevice g_PhysicalDevice = VK_NULL_HANDLE; +static VkDevice g_Device = VK_NULL_HANDLE; +static uint32_t g_QueueFamily = (uint32_t)-1; +static VkQueue g_Queue = VK_NULL_HANDLE; +static VkDebugReportCallbackEXT g_DebugReport = VK_NULL_HANDLE; +static VkPipelineCache g_PipelineCache = VK_NULL_HANDLE; +static VkDescriptorPool g_DescriptorPool = VK_NULL_HANDLE; + +static ImGui_ImplVulkanH_Window g_MainWindowData; +static uint32_t g_MinImageCount = 2; +static bool g_SwapChainRebuild = false; + +static void check_vk_result(VkResult err) +{ + if (err == 0) + return; + fprintf(stderr, "[vulkan] Error: VkResult = %d\n", err); + if (err < 0) + abort(); +} + +#ifdef APP_USE_VULKAN_DEBUG_REPORT +static VKAPI_ATTR VkBool32 VKAPI_CALL debug_report(VkDebugReportFlagsEXT flags, VkDebugReportObjectTypeEXT objectType, uint64_t object, size_t location, int32_t messageCode, const char* pLayerPrefix, const char* pMessage, void* pUserData) +{ + (void)flags; (void)object; (void)location; (void)messageCode; (void)pUserData; (void)pLayerPrefix; // Unused arguments + fprintf(stderr, "[vulkan] Debug report from ObjectType: %i\nMessage: %s\n\n", objectType, pMessage); + return VK_FALSE; +} +#endif // APP_USE_VULKAN_DEBUG_REPORT + +static bool IsExtensionAvailable(const ImVector& properties, const char* extension) +{ + for (const VkExtensionProperties& p : properties) + if (strcmp(p.extensionName, extension) == 0) + return true; + return false; +} + +static VkPhysicalDevice SetupVulkan_SelectPhysicalDevice() +{ + uint32_t gpu_count; + VkResult err = vkEnumeratePhysicalDevices(g_Instance, &gpu_count, nullptr); + check_vk_result(err); + IM_ASSERT(gpu_count > 0); + + ImVector gpus; + gpus.resize(gpu_count); + err = vkEnumeratePhysicalDevices(g_Instance, &gpu_count, gpus.Data); + check_vk_result(err); + + // If a number >1 of GPUs got reported, find discrete GPU if present, or use first one available. This covers + // most common cases (multi-gpu/integrated+dedicated graphics). Handling more complicated setups (multiple + // dedicated GPUs) is out of scope of this sample. + for (VkPhysicalDevice& device : gpus) + { + VkPhysicalDeviceProperties properties; + vkGetPhysicalDeviceProperties(device, &properties); + if (properties.deviceType == VK_PHYSICAL_DEVICE_TYPE_DISCRETE_GPU) + return device; + } + + // Use first GPU (Integrated) is a Discrete one is not available. + if (gpu_count > 0) + return gpus[0]; + return VK_NULL_HANDLE; +} + +static void SetupVulkan(ImVector instance_extensions) +{ + VkResult err; +#ifdef IMGUI_IMPL_VULKAN_USE_VOLK + volkInitialize(); +#endif + + // Create Vulkan Instance + { + VkInstanceCreateInfo create_info = {}; + create_info.sType = VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO; + + // Enumerate available extensions + uint32_t properties_count; + ImVector properties; + vkEnumerateInstanceExtensionProperties(nullptr, &properties_count, nullptr); + properties.resize(properties_count); + err = vkEnumerateInstanceExtensionProperties(nullptr, &properties_count, properties.Data); + check_vk_result(err); + + // Enable required extensions + if (IsExtensionAvailable(properties, VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME)) + instance_extensions.push_back(VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME); +#ifdef VK_KHR_PORTABILITY_ENUMERATION_EXTENSION_NAME + if (IsExtensionAvailable(properties, VK_KHR_PORTABILITY_ENUMERATION_EXTENSION_NAME)) + { + instance_extensions.push_back(VK_KHR_PORTABILITY_ENUMERATION_EXTENSION_NAME); + create_info.flags |= VK_INSTANCE_CREATE_ENUMERATE_PORTABILITY_BIT_KHR; + } +#endif + + // Enabling validation layers +#ifdef APP_USE_VULKAN_DEBUG_REPORT + const char* layers[] = { "VK_LAYER_KHRONOS_validation" }; + create_info.enabledLayerCount = 1; + create_info.ppEnabledLayerNames = layers; + instance_extensions.push_back("VK_EXT_debug_report"); +#endif + + // Create Vulkan Instance + create_info.enabledExtensionCount = (uint32_t)instance_extensions.Size; + create_info.ppEnabledExtensionNames = instance_extensions.Data; + err = vkCreateInstance(&create_info, g_Allocator, &g_Instance); + check_vk_result(err); +#ifdef IMGUI_IMPL_VULKAN_USE_VOLK + volkLoadInstance(g_Instance); +#endif + + // Setup the debug report callback +#ifdef APP_USE_VULKAN_DEBUG_REPORT + auto f_vkCreateDebugReportCallbackEXT = (PFN_vkCreateDebugReportCallbackEXT)vkGetInstanceProcAddr(g_Instance, "vkCreateDebugReportCallbackEXT"); + IM_ASSERT(f_vkCreateDebugReportCallbackEXT != nullptr); + VkDebugReportCallbackCreateInfoEXT debug_report_ci = {}; + debug_report_ci.sType = VK_STRUCTURE_TYPE_DEBUG_REPORT_CALLBACK_CREATE_INFO_EXT; + debug_report_ci.flags = VK_DEBUG_REPORT_ERROR_BIT_EXT | VK_DEBUG_REPORT_WARNING_BIT_EXT | VK_DEBUG_REPORT_PERFORMANCE_WARNING_BIT_EXT; + debug_report_ci.pfnCallback = debug_report; + debug_report_ci.pUserData = nullptr; + err = f_vkCreateDebugReportCallbackEXT(g_Instance, &debug_report_ci, g_Allocator, &g_DebugReport); + check_vk_result(err); +#endif + } + + // Select Physical Device (GPU) + g_PhysicalDevice = SetupVulkan_SelectPhysicalDevice(); + + // Select graphics queue family + { + uint32_t count; + vkGetPhysicalDeviceQueueFamilyProperties(g_PhysicalDevice, &count, nullptr); + VkQueueFamilyProperties* queues = (VkQueueFamilyProperties*)malloc(sizeof(VkQueueFamilyProperties) * count); + vkGetPhysicalDeviceQueueFamilyProperties(g_PhysicalDevice, &count, queues); + for (uint32_t i = 0; i < count; i++) + if (queues[i].queueFlags & VK_QUEUE_GRAPHICS_BIT) + { + g_QueueFamily = i; + break; + } + free(queues); + IM_ASSERT(g_QueueFamily != (uint32_t)-1); + } + + // Create Logical Device (with 1 queue) + { + ImVector device_extensions; + device_extensions.push_back("VK_KHR_swapchain"); + + // Enumerate physical device extension + uint32_t properties_count; + ImVector properties; + vkEnumerateDeviceExtensionProperties(g_PhysicalDevice, nullptr, &properties_count, nullptr); + properties.resize(properties_count); + vkEnumerateDeviceExtensionProperties(g_PhysicalDevice, nullptr, &properties_count, properties.Data); +#ifdef VK_KHR_PORTABILITY_SUBSET_EXTENSION_NAME + if (IsExtensionAvailable(properties, VK_KHR_PORTABILITY_SUBSET_EXTENSION_NAME)) + device_extensions.push_back(VK_KHR_PORTABILITY_SUBSET_EXTENSION_NAME); +#endif + + const float queue_priority[] = { 1.0f }; + VkDeviceQueueCreateInfo queue_info[1] = {}; + queue_info[0].sType = VK_STRUCTURE_TYPE_DEVICE_QUEUE_CREATE_INFO; + queue_info[0].queueFamilyIndex = g_QueueFamily; + queue_info[0].queueCount = 1; + queue_info[0].pQueuePriorities = queue_priority; + VkDeviceCreateInfo create_info = {}; + create_info.sType = VK_STRUCTURE_TYPE_DEVICE_CREATE_INFO; + create_info.queueCreateInfoCount = sizeof(queue_info) / sizeof(queue_info[0]); + create_info.pQueueCreateInfos = queue_info; + create_info.enabledExtensionCount = (uint32_t)device_extensions.Size; + create_info.ppEnabledExtensionNames = device_extensions.Data; + err = vkCreateDevice(g_PhysicalDevice, &create_info, g_Allocator, &g_Device); + check_vk_result(err); + vkGetDeviceQueue(g_Device, g_QueueFamily, 0, &g_Queue); + } + + // Create Descriptor Pool + // The example only requires a single combined image sampler descriptor for the font image and only uses one descriptor set (for that) + // If you wish to load e.g. additional textures you may need to alter pools sizes. + { + VkDescriptorPoolSize pool_sizes[] = + { + { VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER, 1 }, + }; + VkDescriptorPoolCreateInfo pool_info = {}; + pool_info.sType = VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_CREATE_INFO; + pool_info.flags = VK_DESCRIPTOR_POOL_CREATE_FREE_DESCRIPTOR_SET_BIT; + pool_info.maxSets = 1; + pool_info.poolSizeCount = (uint32_t)IM_ARRAYSIZE(pool_sizes); + pool_info.pPoolSizes = pool_sizes; + err = vkCreateDescriptorPool(g_Device, &pool_info, g_Allocator, &g_DescriptorPool); + check_vk_result(err); + } +} + +// All the ImGui_ImplVulkanH_XXX structures/functions are optional helpers used by the demo. +// Your real engine/app may not use them. +static void SetupVulkanWindow(ImGui_ImplVulkanH_Window* wd, VkSurfaceKHR surface, int width, int height) +{ + wd->Surface = surface; + + // Check for WSI support + VkBool32 res; + vkGetPhysicalDeviceSurfaceSupportKHR(g_PhysicalDevice, g_QueueFamily, wd->Surface, &res); + if (res != VK_TRUE) + { + fprintf(stderr, "Error no WSI support on physical device 0\n"); + exit(-1); + } + + // Select Surface Format + const VkFormat requestSurfaceImageFormat[] = { VK_FORMAT_B8G8R8A8_UNORM, VK_FORMAT_R8G8B8A8_UNORM, VK_FORMAT_B8G8R8_UNORM, VK_FORMAT_R8G8B8_UNORM }; + const VkColorSpaceKHR requestSurfaceColorSpace = VK_COLORSPACE_SRGB_NONLINEAR_KHR; + wd->SurfaceFormat = ImGui_ImplVulkanH_SelectSurfaceFormat(g_PhysicalDevice, wd->Surface, requestSurfaceImageFormat, (size_t)IM_ARRAYSIZE(requestSurfaceImageFormat), requestSurfaceColorSpace); + + // Select Present Mode +#ifdef APP_UNLIMITED_FRAME_RATE + VkPresentModeKHR present_modes[] = { VK_PRESENT_MODE_MAILBOX_KHR, VK_PRESENT_MODE_IMMEDIATE_KHR, VK_PRESENT_MODE_FIFO_KHR }; +#else + VkPresentModeKHR present_modes[] = { VK_PRESENT_MODE_FIFO_KHR }; +#endif + wd->PresentMode = ImGui_ImplVulkanH_SelectPresentMode(g_PhysicalDevice, wd->Surface, &present_modes[0], IM_ARRAYSIZE(present_modes)); + //printf("[vulkan] Selected PresentMode = %d\n", wd->PresentMode); + + // Create SwapChain, RenderPass, Framebuffer, etc. + IM_ASSERT(g_MinImageCount >= 2); + ImGui_ImplVulkanH_CreateOrResizeWindow(g_Instance, g_PhysicalDevice, g_Device, wd, g_QueueFamily, g_Allocator, width, height, g_MinImageCount); +} + +static void CleanupVulkan() +{ + vkDestroyDescriptorPool(g_Device, g_DescriptorPool, g_Allocator); + +#ifdef APP_USE_VULKAN_DEBUG_REPORT + // Remove the debug report callback + auto f_vkDestroyDebugReportCallbackEXT = (PFN_vkDestroyDebugReportCallbackEXT)vkGetInstanceProcAddr(g_Instance, "vkDestroyDebugReportCallbackEXT"); + f_vkDestroyDebugReportCallbackEXT(g_Instance, g_DebugReport, g_Allocator); +#endif // APP_USE_VULKAN_DEBUG_REPORT + + vkDestroyDevice(g_Device, g_Allocator); + vkDestroyInstance(g_Instance, g_Allocator); +} + +static void CleanupVulkanWindow() +{ + ImGui_ImplVulkanH_DestroyWindow(g_Instance, g_Device, &g_MainWindowData, g_Allocator); +} + +static void FrameRender(ImGui_ImplVulkanH_Window* wd, ImDrawData* draw_data) +{ + VkResult err; + + VkSemaphore image_acquired_semaphore = wd->FrameSemaphores[wd->SemaphoreIndex].ImageAcquiredSemaphore; + VkSemaphore render_complete_semaphore = wd->FrameSemaphores[wd->SemaphoreIndex].RenderCompleteSemaphore; + err = vkAcquireNextImageKHR(g_Device, wd->Swapchain, UINT64_MAX, image_acquired_semaphore, VK_NULL_HANDLE, &wd->FrameIndex); + if (err == VK_ERROR_OUT_OF_DATE_KHR || err == VK_SUBOPTIMAL_KHR) + { + g_SwapChainRebuild = true; + return; + } + check_vk_result(err); + + ImGui_ImplVulkanH_Frame* fd = &wd->Frames[wd->FrameIndex]; + { + err = vkWaitForFences(g_Device, 1, &fd->Fence, VK_TRUE, UINT64_MAX); // wait indefinitely instead of periodically checking + check_vk_result(err); + + err = vkResetFences(g_Device, 1, &fd->Fence); + check_vk_result(err); + } + { + err = vkResetCommandPool(g_Device, fd->CommandPool, 0); + check_vk_result(err); + VkCommandBufferBeginInfo info = {}; + info.sType = VK_STRUCTURE_TYPE_COMMAND_BUFFER_BEGIN_INFO; + info.flags |= VK_COMMAND_BUFFER_USAGE_ONE_TIME_SUBMIT_BIT; + err = vkBeginCommandBuffer(fd->CommandBuffer, &info); + check_vk_result(err); + } + { + VkRenderPassBeginInfo info = {}; + info.sType = VK_STRUCTURE_TYPE_RENDER_PASS_BEGIN_INFO; + info.renderPass = wd->RenderPass; + info.framebuffer = fd->Framebuffer; + info.renderArea.extent.width = wd->Width; + info.renderArea.extent.height = wd->Height; + info.clearValueCount = 1; + info.pClearValues = &wd->ClearValue; + vkCmdBeginRenderPass(fd->CommandBuffer, &info, VK_SUBPASS_CONTENTS_INLINE); + } + + // Record dear imgui primitives into command buffer + ImGui_ImplVulkan_RenderDrawData(draw_data, fd->CommandBuffer); + + // Submit command buffer + vkCmdEndRenderPass(fd->CommandBuffer); + { + VkPipelineStageFlags wait_stage = VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT; + VkSubmitInfo info = {}; + info.sType = VK_STRUCTURE_TYPE_SUBMIT_INFO; + info.waitSemaphoreCount = 1; + info.pWaitSemaphores = &image_acquired_semaphore; + info.pWaitDstStageMask = &wait_stage; + info.commandBufferCount = 1; + info.pCommandBuffers = &fd->CommandBuffer; + info.signalSemaphoreCount = 1; + info.pSignalSemaphores = &render_complete_semaphore; + + err = vkEndCommandBuffer(fd->CommandBuffer); + check_vk_result(err); + err = vkQueueSubmit(g_Queue, 1, &info, fd->Fence); + check_vk_result(err); + } +} + +static void FramePresent(ImGui_ImplVulkanH_Window* wd) +{ + if (g_SwapChainRebuild) + return; + VkSemaphore render_complete_semaphore = wd->FrameSemaphores[wd->SemaphoreIndex].RenderCompleteSemaphore; + VkPresentInfoKHR info = {}; + info.sType = VK_STRUCTURE_TYPE_PRESENT_INFO_KHR; + info.waitSemaphoreCount = 1; + info.pWaitSemaphores = &render_complete_semaphore; + info.swapchainCount = 1; + info.pSwapchains = &wd->Swapchain; + info.pImageIndices = &wd->FrameIndex; + VkResult err = vkQueuePresentKHR(g_Queue, &info); + if (err == VK_ERROR_OUT_OF_DATE_KHR || err == VK_SUBOPTIMAL_KHR) + { + g_SwapChainRebuild = true; + return; + } + check_vk_result(err); + wd->SemaphoreIndex = (wd->SemaphoreIndex + 1) % wd->SemaphoreCount; // Now we can use the next set of semaphores +} + +// Main code +int main(int, char**) +{ + // Setup SDL + if (SDL_Init(SDL_INIT_VIDEO | SDL_INIT_TIMER | SDL_INIT_GAMECONTROLLER) != 0) + { + printf("Error: %s\n", SDL_GetError()); + return -1; + } + + // From 2.0.18: Enable native IME. +#ifdef SDL_HINT_IME_SHOW_UI + SDL_SetHint(SDL_HINT_IME_SHOW_UI, "1"); +#endif + + // Create window with Vulkan graphics context + SDL_WindowFlags window_flags = (SDL_WindowFlags)(SDL_WINDOW_VULKAN | SDL_WINDOW_RESIZABLE | SDL_WINDOW_ALLOW_HIGHDPI); + SDL_Window* window = SDL_CreateWindow("Dear ImGui SDL2+Vulkan example", SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED, 1280, 720, window_flags); + if (window == nullptr) + { + printf("Error: SDL_CreateWindow(): %s\n", SDL_GetError()); + return -1; + } + + ImVector extensions; + uint32_t extensions_count = 0; + SDL_Vulkan_GetInstanceExtensions(window, &extensions_count, nullptr); + extensions.resize(extensions_count); + SDL_Vulkan_GetInstanceExtensions(window, &extensions_count, extensions.Data); + SetupVulkan(extensions); + + // Create Window Surface + VkSurfaceKHR surface; + VkResult err; + if (SDL_Vulkan_CreateSurface(window, g_Instance, &surface) == 0) + { + printf("Failed to create Vulkan surface.\n"); + return 1; + } + + // Create Framebuffers + int w, h; + SDL_GetWindowSize(window, &w, &h); + ImGui_ImplVulkanH_Window* wd = &g_MainWindowData; + SetupVulkanWindow(wd, surface, w, h); + + // Setup Dear ImGui context + IMGUI_CHECKVERSION(); + ImGui::CreateContext(); + ImGuiIO& io = ImGui::GetIO(); (void)io; + io.ConfigFlags |= ImGuiConfigFlags_NavEnableKeyboard; // Enable Keyboard Controls + io.ConfigFlags |= ImGuiConfigFlags_NavEnableGamepad; // Enable Gamepad Controls + io.ConfigFlags |= ImGuiConfigFlags_DockingEnable; // Enable Docking + io.ConfigFlags |= ImGuiConfigFlags_ViewportsEnable; // Enable Multi-Viewport / Platform Windows + //io.ConfigFlags |= ImGuiConfigFlags_ViewportsNoTaskBarIcons; + //io.ConfigFlags |= ImGuiConfigFlags_ViewportsNoMerge; + + // Setup Dear ImGui style + ImGui::StyleColorsDark(); + //ImGui::StyleColorsLight(); + + // When viewports are enabled we tweak WindowRounding/WindowBg so platform windows can look identical to regular ones. + ImGuiStyle& style = ImGui::GetStyle(); + if (io.ConfigFlags & ImGuiConfigFlags_ViewportsEnable) + { + style.WindowRounding = 0.0f; + style.Colors[ImGuiCol_WindowBg].w = 1.0f; + } + + // Setup Platform/Renderer backends + ImGui_ImplSDL2_InitForVulkan(window); + ImGui_ImplVulkan_InitInfo init_info = {}; + init_info.Instance = g_Instance; + init_info.PhysicalDevice = g_PhysicalDevice; + init_info.Device = g_Device; + init_info.QueueFamily = g_QueueFamily; + init_info.Queue = g_Queue; + init_info.PipelineCache = g_PipelineCache; + init_info.DescriptorPool = g_DescriptorPool; + init_info.RenderPass = wd->RenderPass; + init_info.Subpass = 0; + init_info.MinImageCount = g_MinImageCount; + init_info.ImageCount = wd->ImageCount; + init_info.MSAASamples = VK_SAMPLE_COUNT_1_BIT; + init_info.Allocator = g_Allocator; + init_info.CheckVkResultFn = check_vk_result; + ImGui_ImplVulkan_Init(&init_info); + + // Load Fonts + // - If no fonts are loaded, dear imgui will use the default font. You can also load multiple fonts and use ImGui::PushFont()/PopFont() to select them. + // - AddFontFromFileTTF() will return the ImFont* so you can store it if you need to select the font among multiple. + // - If the file cannot be loaded, the function will return a nullptr. Please handle those errors in your application (e.g. use an assertion, or display an error and quit). + // - The fonts will be rasterized at a given size (w/ oversampling) and stored into a texture when calling ImFontAtlas::Build()/GetTexDataAsXXXX(), which ImGui_ImplXXXX_NewFrame below will call. + // - Use '#define IMGUI_ENABLE_FREETYPE' in your imconfig file to use Freetype for higher quality font rendering. + // - Read 'docs/FONTS.md' for more instructions and details. + // - Remember that in C/C++ if you want to include a backslash \ in a string literal you need to write a double backslash \\ ! + //io.Fonts->AddFontDefault(); + //io.Fonts->AddFontFromFileTTF("c:\\Windows\\Fonts\\segoeui.ttf", 18.0f); + //io.Fonts->AddFontFromFileTTF("../../misc/fonts/DroidSans.ttf", 16.0f); + //io.Fonts->AddFontFromFileTTF("../../misc/fonts/Roboto-Medium.ttf", 16.0f); + //io.Fonts->AddFontFromFileTTF("../../misc/fonts/Cousine-Regular.ttf", 15.0f); + //ImFont* font = io.Fonts->AddFontFromFileTTF("c:\\Windows\\Fonts\\ArialUni.ttf", 18.0f, nullptr, io.Fonts->GetGlyphRangesJapanese()); + //IM_ASSERT(font != nullptr); + + // Our state + bool show_demo_window = true; + bool show_another_window = false; + ImVec4 clear_color = ImVec4(0.45f, 0.55f, 0.60f, 1.00f); + + // Main loop + bool done = false; + while (!done) + { + // Poll and handle events (inputs, window resize, etc.) + // You can read the io.WantCaptureMouse, io.WantCaptureKeyboard flags to tell if dear imgui wants to use your inputs. + // - When io.WantCaptureMouse is true, do not dispatch mouse input data to your main application, or clear/overwrite your copy of the mouse data. + // - When io.WantCaptureKeyboard is true, do not dispatch keyboard input data to your main application, or clear/overwrite your copy of the keyboard data. + // Generally you may always pass all inputs to dear imgui, and hide them from your application based on those two flags. + SDL_Event event; + while (SDL_PollEvent(&event)) + { + ImGui_ImplSDL2_ProcessEvent(&event); + if (event.type == SDL_QUIT) + done = true; + if (event.type == SDL_WINDOWEVENT && event.window.event == SDL_WINDOWEVENT_CLOSE && event.window.windowID == SDL_GetWindowID(window)) + done = true; + } + + // Resize swap chain? + int fb_width, fb_height; + SDL_GetWindowSize(window, &fb_width, &fb_height); + if (fb_width > 0 && fb_height > 0 && (g_SwapChainRebuild || g_MainWindowData.Width != fb_width || g_MainWindowData.Height != fb_height)) + { + ImGui_ImplVulkan_SetMinImageCount(g_MinImageCount); + ImGui_ImplVulkanH_CreateOrResizeWindow(g_Instance, g_PhysicalDevice, g_Device, &g_MainWindowData, g_QueueFamily, g_Allocator, fb_width, fb_height, g_MinImageCount); + g_MainWindowData.FrameIndex = 0; + g_SwapChainRebuild = false; + } + + // Start the Dear ImGui frame + ImGui_ImplVulkan_NewFrame(); + ImGui_ImplSDL2_NewFrame(); + ImGui::NewFrame(); + + // 1. Show the big demo window (Most of the sample code is in ImGui::ShowDemoWindow()! You can browse its code to learn more about Dear ImGui!). + if (show_demo_window) + ImGui::ShowDemoWindow(&show_demo_window); + + // 2. Show a simple window that we create ourselves. We use a Begin/End pair to create a named window. + { + static float f = 0.0f; + static int counter = 0; + + ImGui::Begin("Hello, world!"); // Create a window called "Hello, world!" and append into it. + + ImGui::Text("This is some useful text."); // Display some text (you can use a format strings too) + ImGui::Checkbox("Demo Window", &show_demo_window); // Edit bools storing our window open/close state + ImGui::Checkbox("Another Window", &show_another_window); + + ImGui::SliderFloat("float", &f, 0.0f, 1.0f); // Edit 1 float using a slider from 0.0f to 1.0f + ImGui::ColorEdit3("clear color", (float*)&clear_color); // Edit 3 floats representing a color + + if (ImGui::Button("Button")) // Buttons return true when clicked (most widgets return true when edited/activated) + counter++; + ImGui::SameLine(); + ImGui::Text("counter = %d", counter); + + ImGui::Text("Application average %.3f ms/frame (%.1f FPS)", 1000.0f / io.Framerate, io.Framerate); + ImGui::End(); + } + + // 3. Show another simple window. + if (show_another_window) + { + ImGui::Begin("Another Window", &show_another_window); // Pass a pointer to our bool variable (the window will have a closing button that will clear the bool when clicked) + ImGui::Text("Hello from another window!"); + if (ImGui::Button("Close Me")) + show_another_window = false; + ImGui::End(); + } + + // Rendering + ImGui::Render(); + ImDrawData* main_draw_data = ImGui::GetDrawData(); + const bool main_is_minimized = (main_draw_data->DisplaySize.x <= 0.0f || main_draw_data->DisplaySize.y <= 0.0f); + wd->ClearValue.color.float32[0] = clear_color.x * clear_color.w; + wd->ClearValue.color.float32[1] = clear_color.y * clear_color.w; + wd->ClearValue.color.float32[2] = clear_color.z * clear_color.w; + wd->ClearValue.color.float32[3] = clear_color.w; + if (!main_is_minimized) + FrameRender(wd, main_draw_data); + + // Update and Render additional Platform Windows + if (io.ConfigFlags & ImGuiConfigFlags_ViewportsEnable) + { + ImGui::UpdatePlatformWindows(); + ImGui::RenderPlatformWindowsDefault(); + } + + // Present Main Platform Window + if (!main_is_minimized) + FramePresent(wd); + } + + // Cleanup + err = vkDeviceWaitIdle(g_Device); + check_vk_result(err); + ImGui_ImplVulkan_Shutdown(); + ImGui_ImplSDL2_Shutdown(); + ImGui::DestroyContext(); + + CleanupVulkanWindow(); + CleanupVulkan(); + + SDL_DestroyWindow(window); + SDL_Quit(); + + return 0; +} diff --git a/External/imgui-docking/examples/example_sdl3_opengl3/Makefile.emscripten b/External/imgui-docking/examples/example_sdl3_opengl3/Makefile.emscripten new file mode 100644 index 0000000..9e9ffd6 --- /dev/null +++ b/External/imgui-docking/examples/example_sdl3_opengl3/Makefile.emscripten @@ -0,0 +1,96 @@ + +# IMPORTANT: SDL3 IS IN DEVELOPMENT, AS OF 2023-05-30, EMSCRIPTEN DOESN'T SUPPORT SDL3 YET. +# WE ARE LEAVING THIS MAKEFILE AROUND FOR THE DAY IT WILL SUPPORT IT. + +# +# Makefile to use with SDL+emscripten +# See https://emscripten.org/docs/getting_started/downloads.html +# for installation instructions. +# +# This Makefile assumes you have loaded emscripten's environment. +# (On Windows, you may need to execute emsdk_env.bat or encmdprompt.bat ahead) +# +# Running `make -f Makefile.emscripten` will produce three files: +# - web/index.html +# - web/index.js +# - web/index.wasm +# +# All three are needed to run the demo. + +CC = emcc +CXX = em++ +WEB_DIR = web +EXE = $(WEB_DIR)/index.html +IMGUI_DIR = ../.. +SOURCES = main.cpp +SOURCES += $(IMGUI_DIR)/imgui.cpp $(IMGUI_DIR)/imgui_demo.cpp $(IMGUI_DIR)/imgui_draw.cpp $(IMGUI_DIR)/imgui_tables.cpp $(IMGUI_DIR)/imgui_widgets.cpp +SOURCES += $(IMGUI_DIR)/backends/imgui_impl_sdl3.cpp $(IMGUI_DIR)/backends/imgui_impl_opengl3.cpp +OBJS = $(addsuffix .o, $(basename $(notdir $(SOURCES)))) +UNAME_S := $(shell uname -s) +CPPFLAGS = +LDFLAGS = +EMS = + +##--------------------------------------------------------------------- +## EMSCRIPTEN OPTIONS +##--------------------------------------------------------------------- + +# ("EMS" options gets added to both CPPFLAGS and LDFLAGS, whereas some options are for linker only) +EMS += -s USE_SDL=2 +EMS += -s DISABLE_EXCEPTION_CATCHING=1 +LDFLAGS += -s WASM=1 -s ALLOW_MEMORY_GROWTH=1 -s NO_EXIT_RUNTIME=0 -s ASSERTIONS=1 + +# Uncomment next line to fix possible rendering bugs with Emscripten version older then 1.39.0 (https://github.com/ocornut/imgui/issues/2877) +#EMS += -s BINARYEN_TRAP_MODE=clamp +#EMS += -s SAFE_HEAP=1 ## Adds overhead + +# Emscripten allows preloading a file or folder to be accessible at runtime. +# The Makefile for this example project suggests embedding the misc/fonts/ folder into our application, it will then be accessible as "/fonts" +# See documentation for more details: https://emscripten.org/docs/porting/files/packaging_files.html +# (Default value is 0. Set to 1 to enable file-system and include the misc/fonts/ folder as part of the build.) +USE_FILE_SYSTEM ?= 0 +ifeq ($(USE_FILE_SYSTEM), 0) +LDFLAGS += -s NO_FILESYSTEM=1 +CPPFLAGS += -DIMGUI_DISABLE_FILE_FUNCTIONS +endif +ifeq ($(USE_FILE_SYSTEM), 1) +LDFLAGS += --no-heap-copy --preload-file ../../misc/fonts@/fonts +endif + +##--------------------------------------------------------------------- +## FINAL BUILD FLAGS +##--------------------------------------------------------------------- + +CPPFLAGS += -I$(IMGUI_DIR) -I$(IMGUI_DIR)/backends +#CPPFLAGS += -g +CPPFLAGS += -Wall -Wformat -Os $(EMS) +LDFLAGS += --shell-file ../libs/emscripten/shell_minimal.html +LDFLAGS += $(EMS) + +##--------------------------------------------------------------------- +## BUILD RULES +##--------------------------------------------------------------------- + +%.o:%.cpp + $(CXX) $(CPPFLAGS) $(CXXFLAGS) -c -o $@ $< + +%.o:$(IMGUI_DIR)/%.cpp + $(CXX) $(CPPFLAGS) $(CXXFLAGS) -c -o $@ $< + +%.o:$(IMGUI_DIR)/backends/%.cpp + $(CXX) $(CPPFLAGS) $(CXXFLAGS) -c -o $@ $< + +all: $(EXE) + @echo Build complete for $(EXE) + +$(WEB_DIR): + mkdir $@ + +serve: all + python3 -m http.server -d $(WEB_DIR) + +$(EXE): $(OBJS) $(WEB_DIR) + $(CXX) -o $@ $(OBJS) $(LDFLAGS) + +clean: + rm -rf $(OBJS) $(WEB_DIR) diff --git a/External/imgui-docking/examples/example_sdl3_opengl3/README.md b/External/imgui-docking/examples/example_sdl3_opengl3/README.md new file mode 100644 index 0000000..5828e4b --- /dev/null +++ b/External/imgui-docking/examples/example_sdl3_opengl3/README.md @@ -0,0 +1,40 @@ + +# How to Build + +## Windows with Visual Studio's IDE + +Use the provided project file (.vcxproj). Add to solution (imgui_examples.sln) if necessary. + +## Windows with Visual Studio's CLI + +Use build_win32.bat or directly: +``` +set SDL2_DIR=path_to_your_sdl3_folder +cl /Zi /MD /utf-8 /I.. /I..\.. /I%SDL2_DIR%\include main.cpp ..\..\backends\imgui_impl_sdl3.cpp ..\..\backends\imgui_impl_opengl3.cpp ..\..\imgui*.cpp /FeDebug/example_sdl3_opengl3.exe /FoDebug/ /link /libpath:%SDL2_DIR%\lib\x86 SDL3.lib opengl32.lib /subsystem:console +# ^^ include paths ^^ source files ^^ output exe ^^ output dir ^^ libraries +# or for 64-bit: +cl /Zi /MD /utf-8 /I.. /I..\.. /I%SDL2_DIR%\include main.cpp ..\..\backends\imgui_impl_sdl3.cpp ..\..\backends\imgui_impl_opengl3.cpp ..\..\imgui*.cpp /FeDebug/example_sdl3_opengl3.exe /FoDebug/ /link /libpath:%SDL2_DIR%\lib\x64 SDL3.lib SDL2mainopengl32.lib /subsystem:console +``` + +## Linux and similar Unixes + +Use our Makefile or directly: +``` +c++ `sdl3-config --cflags` -I .. -I ../.. -I ../../backends + main.cpp ../../backends/imgui_impl_sdl3.cpp ../../backends/imgui_impl_opengl3.cpp ../../imgui*.cpp + `sdl3-config --libs` -lGL -ldl +``` + +## macOS + +Use our Makefile or directly: +``` +brew install sdl3 +c++ `sdl3-config --cflags` -I .. -I ../.. -I ../../backends + main.cpp ../../backends/imgui_impl_sdl3.cpp ../../backends/imgui_impl_opengl3.cpp ../../imgui*.cpp + `sdl3-config --libs` -framework OpenGl -framework CoreFoundation +``` + +## Emscripten + +As of 2023-05-30 Emscripten doesn't support SDL3 yet. diff --git a/External/imgui-docking/examples/example_sdl3_opengl3/build_win32.bat b/External/imgui-docking/examples/example_sdl3_opengl3/build_win32.bat new file mode 100644 index 0000000..5b8d5f8 --- /dev/null +++ b/External/imgui-docking/examples/example_sdl3_opengl3/build_win32.bat @@ -0,0 +1,8 @@ +@REM Build for Visual Studio compiler. Run your copy of vcvars32.bat or vcvarsall.bat to setup command-line compiler. +@set OUT_DIR=Debug +@set OUT_EXE=example_sdl3_opengl3 +@set INCLUDES=/I..\.. /I..\..\backends /I%SDL3_DIR%\include +@set SOURCES=main.cpp ..\..\backends\imgui_impl_sdl3.cpp ..\..\backends\imgui_impl_opengl3.cpp ..\..\imgui*.cpp +@set LIBS=/LIBPATH:%SDL3_DIR%\lib\x86 SDL3.lib opengl32.lib shell32.lib +mkdir %OUT_DIR% +cl /nologo /Zi /MD /utf-8 %INCLUDES% %SOURCES% /Fe%OUT_DIR%/%OUT_EXE%.exe /Fo%OUT_DIR%/ /link %LIBS% /subsystem:console diff --git a/External/imgui-docking/examples/example_sdl3_opengl3/example_sdl3_opengl3.vcxproj b/External/imgui-docking/examples/example_sdl3_opengl3/example_sdl3_opengl3.vcxproj new file mode 100644 index 0000000..051f87d --- /dev/null +++ b/External/imgui-docking/examples/example_sdl3_opengl3/example_sdl3_opengl3.vcxproj @@ -0,0 +1,187 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {84AAA301-84FE-428B-9E3E-817BC8123C0C} + example_sdl3_opengl3 + 8.1 + + + + Application + true + MultiByte + v140 + + + Application + true + MultiByte + v140 + + + Application + false + true + MultiByte + v140 + + + Application + false + true + MultiByte + v140 + + + + + + + + + + + + + + + + + + + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + $(IncludePath) + + + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + $(IncludePath) + + + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + $(IncludePath) + + + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + $(IncludePath) + + + + Level4 + Disabled + ..\..;..\..\backends;%SDL3_DIR%\include;$(VcpkgCurrentInstalledDir)include\SDL3;%(AdditionalIncludeDirectories) + /utf-8 %(AdditionalOptions) + + + true + %SDL3_DIR%\lib\x86;%(AdditionalLibraryDirectories) + opengl32.lib;SDL3.lib;%(AdditionalDependencies) + Console + msvcrt.lib + + + + + Level4 + Disabled + ..\..;..\..\backends;%SDL3_DIR%\include;$(VcpkgCurrentInstalledDir)include\SDL3;%(AdditionalIncludeDirectories) + /utf-8 %(AdditionalOptions) + + + true + %SDL3_DIR%\lib\x64;%(AdditionalLibraryDirectories) + opengl32.lib;SDL3.lib;%(AdditionalDependencies) + Console + msvcrt.lib + + + + + Level4 + MaxSpeed + true + true + ..\..;..\..\backends;%SDL3_DIR%\include;$(VcpkgCurrentInstalledDir)include\SDL3;%(AdditionalIncludeDirectories) + false + /utf-8 %(AdditionalOptions) + + + true + true + true + %SDL3_DIR%\lib\x86;%(AdditionalLibraryDirectories) + opengl32.lib;SDL3.lib;%(AdditionalDependencies) + Console + + + + + + + Level4 + MaxSpeed + true + true + ..\..;..\..\backends;%SDL3_DIR%\include;$(VcpkgCurrentInstalledDir)include\SDL3;%(AdditionalIncludeDirectories) + false + /utf-8 %(AdditionalOptions) + + + true + true + true + %SDL3_DIR%\lib\x64;%(AdditionalLibraryDirectories) + opengl32.lib;SDL3.lib;%(AdditionalDependencies) + Console + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/External/imgui-docking/examples/example_sdl3_opengl3/example_sdl3_opengl3.vcxproj.filters b/External/imgui-docking/examples/example_sdl3_opengl3/example_sdl3_opengl3.vcxproj.filters new file mode 100644 index 0000000..f365473 --- /dev/null +++ b/External/imgui-docking/examples/example_sdl3_opengl3/example_sdl3_opengl3.vcxproj.filters @@ -0,0 +1,67 @@ + + + + + {20b90ce4-7fcb-4731-b9a0-075f875de82d} + + + {f18ab499-84e1-499f-8eff-9754361e0e52} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + + + imgui + + + imgui + + + imgui + + + sources + + + sources + + + sources + + + imgui + + + imgui + + + + + imgui + + + imgui + + + imgui + + + sources + + + sources + + + sources + + + + + + imgui + + + imgui + + + \ No newline at end of file diff --git a/External/imgui-docking/examples/example_sdl3_opengl3/main.cpp b/External/imgui-docking/examples/example_sdl3_opengl3/main.cpp new file mode 100644 index 0000000..3d504e9 --- /dev/null +++ b/External/imgui-docking/examples/example_sdl3_opengl3/main.cpp @@ -0,0 +1,229 @@ +// Dear ImGui: standalone example application for SDL3 + OpenGL +// (SDL is a cross-platform general purpose library for handling windows, inputs, OpenGL/Vulkan/Metal graphics context creation, etc.) + +// Learn about Dear ImGui: +// - FAQ https://dearimgui.com/faq +// - Getting Started https://dearimgui.com/getting-started +// - Documentation https://dearimgui.com/docs (same as your local docs/ folder). +// - Introduction, links and more at the top of imgui.cpp + +#include "imgui.h" +#include "imgui_impl_sdl3.h" +#include "imgui_impl_opengl3.h" +#include +#include +#if defined(IMGUI_IMPL_OPENGL_ES2) +#include +#else +#include +#endif + +// This example doesn't compile with Emscripten yet! Awaiting SDL3 support. +#ifdef __EMSCRIPTEN__ +#include "../libs/emscripten/emscripten_mainloop_stub.h" +#endif + +// Main code +int main(int, char**) +{ + // Setup SDL + if (SDL_Init(SDL_INIT_VIDEO | SDL_INIT_TIMER | SDL_INIT_GAMEPAD) != 0) + { + printf("Error: SDL_Init(): %s\n", SDL_GetError()); + return -1; + } + + // Decide GL+GLSL versions +#if defined(IMGUI_IMPL_OPENGL_ES2) + // GL ES 2.0 + GLSL 100 + const char* glsl_version = "#version 100"; + SDL_GL_SetAttribute(SDL_GL_CONTEXT_FLAGS, 0); + SDL_GL_SetAttribute(SDL_GL_CONTEXT_PROFILE_MASK, SDL_GL_CONTEXT_PROFILE_ES); + SDL_GL_SetAttribute(SDL_GL_CONTEXT_MAJOR_VERSION, 2); + SDL_GL_SetAttribute(SDL_GL_CONTEXT_MINOR_VERSION, 0); +#elif defined(__APPLE__) + // GL 3.2 Core + GLSL 150 + const char* glsl_version = "#version 150"; + SDL_GL_SetAttribute(SDL_GL_CONTEXT_FLAGS, SDL_GL_CONTEXT_FORWARD_COMPATIBLE_FLAG); // Always required on Mac + SDL_GL_SetAttribute(SDL_GL_CONTEXT_PROFILE_MASK, SDL_GL_CONTEXT_PROFILE_CORE); + SDL_GL_SetAttribute(SDL_GL_CONTEXT_MAJOR_VERSION, 3); + SDL_GL_SetAttribute(SDL_GL_CONTEXT_MINOR_VERSION, 2); +#else + // GL 3.0 + GLSL 130 + const char* glsl_version = "#version 130"; + SDL_GL_SetAttribute(SDL_GL_CONTEXT_FLAGS, 0); + SDL_GL_SetAttribute(SDL_GL_CONTEXT_PROFILE_MASK, SDL_GL_CONTEXT_PROFILE_CORE); + SDL_GL_SetAttribute(SDL_GL_CONTEXT_MAJOR_VERSION, 3); + SDL_GL_SetAttribute(SDL_GL_CONTEXT_MINOR_VERSION, 0); +#endif + + // Create window with graphics context + SDL_GL_SetAttribute(SDL_GL_DOUBLEBUFFER, 1); + SDL_GL_SetAttribute(SDL_GL_DEPTH_SIZE, 24); + SDL_GL_SetAttribute(SDL_GL_STENCIL_SIZE, 8); + Uint32 window_flags = SDL_WINDOW_OPENGL | SDL_WINDOW_RESIZABLE | SDL_WINDOW_HIDDEN; + SDL_Window* window = SDL_CreateWindow("Dear ImGui SDL3+OpenGL3 example", 1280, 720, window_flags); + if (window == nullptr) + { + printf("Error: SDL_CreateWindow(): %s\n", SDL_GetError()); + return -1; + } + SDL_SetWindowPosition(window, SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED); + SDL_GLContext gl_context = SDL_GL_CreateContext(window); + SDL_GL_MakeCurrent(window, gl_context); + SDL_GL_SetSwapInterval(1); // Enable vsync + SDL_ShowWindow(window); + + // Setup Dear ImGui context + IMGUI_CHECKVERSION(); + ImGui::CreateContext(); + ImGuiIO& io = ImGui::GetIO(); (void)io; + io.ConfigFlags |= ImGuiConfigFlags_NavEnableKeyboard; // Enable Keyboard Controls + io.ConfigFlags |= ImGuiConfigFlags_NavEnableGamepad; // Enable Gamepad Controls + io.ConfigFlags |= ImGuiConfigFlags_DockingEnable; // Enable Docking + io.ConfigFlags |= ImGuiConfigFlags_ViewportsEnable; // Enable Multi-Viewport / Platform Windows + //io.ConfigViewportsNoAutoMerge = true; + //io.ConfigViewportsNoTaskBarIcon = true; + + // Setup Dear ImGui style + ImGui::StyleColorsDark(); + //ImGui::StyleColorsLight(); + + // When viewports are enabled we tweak WindowRounding/WindowBg so platform windows can look identical to regular ones. + ImGuiStyle& style = ImGui::GetStyle(); + if (io.ConfigFlags & ImGuiConfigFlags_ViewportsEnable) + { + style.WindowRounding = 0.0f; + style.Colors[ImGuiCol_WindowBg].w = 1.0f; + } + + // Setup Platform/Renderer backends + ImGui_ImplSDL3_InitForOpenGL(window, gl_context); + ImGui_ImplOpenGL3_Init(glsl_version); + + // Load Fonts + // - If no fonts are loaded, dear imgui will use the default font. You can also load multiple fonts and use ImGui::PushFont()/PopFont() to select them. + // - AddFontFromFileTTF() will return the ImFont* so you can store it if you need to select the font among multiple. + // - If the file cannot be loaded, the function will return a nullptr. Please handle those errors in your application (e.g. use an assertion, or display an error and quit). + // - The fonts will be rasterized at a given size (w/ oversampling) and stored into a texture when calling ImFontAtlas::Build()/GetTexDataAsXXXX(), which ImGui_ImplXXXX_NewFrame below will call. + // - Use '#define IMGUI_ENABLE_FREETYPE' in your imconfig file to use Freetype for higher quality font rendering. + // - Read 'docs/FONTS.md' for more instructions and details. + // - Remember that in C/C++ if you want to include a backslash \ in a string literal you need to write a double backslash \\ ! + // - Our Emscripten build process allows embedding fonts to be accessible at runtime from the "fonts/" folder. See Makefile.emscripten for details. + //io.Fonts->AddFontDefault(); + //io.Fonts->AddFontFromFileTTF("c:\\Windows\\Fonts\\segoeui.ttf", 18.0f); + //io.Fonts->AddFontFromFileTTF("../../misc/fonts/DroidSans.ttf", 16.0f); + //io.Fonts->AddFontFromFileTTF("../../misc/fonts/Roboto-Medium.ttf", 16.0f); + //io.Fonts->AddFontFromFileTTF("../../misc/fonts/Cousine-Regular.ttf", 15.0f); + //ImFont* font = io.Fonts->AddFontFromFileTTF("c:\\Windows\\Fonts\\ArialUni.ttf", 18.0f, nullptr, io.Fonts->GetGlyphRangesJapanese()); + //IM_ASSERT(font != nullptr); + + // Our state + bool show_demo_window = true; + bool show_another_window = false; + ImVec4 clear_color = ImVec4(0.45f, 0.55f, 0.60f, 1.00f); + + // Main loop + bool done = false; +#ifdef __EMSCRIPTEN__ + // For an Emscripten build we are disabling file-system access, so let's not attempt to do a fopen() of the imgui.ini file. + // You may manually call LoadIniSettingsFromMemory() to load settings from your own storage. + io.IniFilename = nullptr; + EMSCRIPTEN_MAINLOOP_BEGIN +#else + while (!done) +#endif + { + // Poll and handle events (inputs, window resize, etc.) + // You can read the io.WantCaptureMouse, io.WantCaptureKeyboard flags to tell if dear imgui wants to use your inputs. + // - When io.WantCaptureMouse is true, do not dispatch mouse input data to your main application, or clear/overwrite your copy of the mouse data. + // - When io.WantCaptureKeyboard is true, do not dispatch keyboard input data to your main application, or clear/overwrite your copy of the keyboard data. + // Generally you may always pass all inputs to dear imgui, and hide them from your application based on those two flags. + SDL_Event event; + while (SDL_PollEvent(&event)) + { + ImGui_ImplSDL3_ProcessEvent(&event); + if (event.type == SDL_EVENT_QUIT) + done = true; + if (event.type == SDL_EVENT_WINDOW_CLOSE_REQUESTED && event.window.windowID == SDL_GetWindowID(window)) + done = true; + } + + // Start the Dear ImGui frame + ImGui_ImplOpenGL3_NewFrame(); + ImGui_ImplSDL3_NewFrame(); + ImGui::NewFrame(); + + // 1. Show the big demo window (Most of the sample code is in ImGui::ShowDemoWindow()! You can browse its code to learn more about Dear ImGui!). + if (show_demo_window) + ImGui::ShowDemoWindow(&show_demo_window); + + // 2. Show a simple window that we create ourselves. We use a Begin/End pair to create a named window. + { + static float f = 0.0f; + static int counter = 0; + + ImGui::Begin("Hello, world!"); // Create a window called "Hello, world!" and append into it. + + ImGui::Text("This is some useful text."); // Display some text (you can use a format strings too) + ImGui::Checkbox("Demo Window", &show_demo_window); // Edit bools storing our window open/close state + ImGui::Checkbox("Another Window", &show_another_window); + + ImGui::SliderFloat("float", &f, 0.0f, 1.0f); // Edit 1 float using a slider from 0.0f to 1.0f + ImGui::ColorEdit3("clear color", (float*)&clear_color); // Edit 3 floats representing a color + + if (ImGui::Button("Button")) // Buttons return true when clicked (most widgets return true when edited/activated) + counter++; + ImGui::SameLine(); + ImGui::Text("counter = %d", counter); + + ImGui::Text("Application average %.3f ms/frame (%.1f FPS)", 1000.0f / io.Framerate, io.Framerate); + ImGui::End(); + } + + // 3. Show another simple window. + if (show_another_window) + { + ImGui::Begin("Another Window", &show_another_window); // Pass a pointer to our bool variable (the window will have a closing button that will clear the bool when clicked) + ImGui::Text("Hello from another window!"); + if (ImGui::Button("Close Me")) + show_another_window = false; + ImGui::End(); + } + + // Rendering + ImGui::Render(); + glViewport(0, 0, (int)io.DisplaySize.x, (int)io.DisplaySize.y); + glClearColor(clear_color.x * clear_color.w, clear_color.y * clear_color.w, clear_color.z * clear_color.w, clear_color.w); + glClear(GL_COLOR_BUFFER_BIT); + ImGui_ImplOpenGL3_RenderDrawData(ImGui::GetDrawData()); + + // Update and Render additional Platform Windows + // (Platform functions may change the current OpenGL context, so we save/restore it to make it easier to paste this code elsewhere. + // For this specific demo app we could also call SDL_GL_MakeCurrent(window, gl_context) directly) + if (io.ConfigFlags & ImGuiConfigFlags_ViewportsEnable) + { + SDL_Window* backup_current_window = SDL_GL_GetCurrentWindow(); + SDL_GLContext backup_current_context = SDL_GL_GetCurrentContext(); + ImGui::UpdatePlatformWindows(); + ImGui::RenderPlatformWindowsDefault(); + SDL_GL_MakeCurrent(backup_current_window, backup_current_context); + } + + SDL_GL_SwapWindow(window); + } +#ifdef __EMSCRIPTEN__ + EMSCRIPTEN_MAINLOOP_END; +#endif + + // Cleanup + ImGui_ImplOpenGL3_Shutdown(); + ImGui_ImplSDL3_Shutdown(); + ImGui::DestroyContext(); + + SDL_GL_DeleteContext(gl_context); + SDL_DestroyWindow(window); + SDL_Quit(); + + return 0; +} diff --git a/External/imgui-docking/examples/example_sdl3_sdlrenderer3/build_win32.bat b/External/imgui-docking/examples/example_sdl3_sdlrenderer3/build_win32.bat new file mode 100644 index 0000000..7bc131a --- /dev/null +++ b/External/imgui-docking/examples/example_sdl3_sdlrenderer3/build_win32.bat @@ -0,0 +1,8 @@ +@REM Build for Visual Studio compiler. Run your copy of vcvars32.bat or vcvarsall.bat to setup command-line compiler. +@set OUT_DIR=Debug +@set OUT_EXE=example_sdl3_sdlrenderer3 +@set INCLUDES=/I..\.. /I..\..\backends /I%SDL3_DIR%\include +@set SOURCES=main.cpp ..\..\backends\imgui_impl_sdl3.cpp ..\..\backends\imgui_impl_sdlrenderer3.cpp ..\..\imgui*.cpp +@set LIBS=/LIBPATH:%SDL3_DIR%\lib\x86 SDL3.lib +mkdir %OUT_DIR% +cl /nologo /Zi /MD /utf-8 %INCLUDES% %SOURCES% /Fe%OUT_DIR%/%OUT_EXE%.exe /Fo%OUT_DIR%/ /link %LIBS% /subsystem:console diff --git a/External/imgui-docking/examples/example_sdl3_sdlrenderer3/example_sdl3_sdlrenderer3.vcxproj b/External/imgui-docking/examples/example_sdl3_sdlrenderer3/example_sdl3_sdlrenderer3.vcxproj new file mode 100644 index 0000000..8b71324 --- /dev/null +++ b/External/imgui-docking/examples/example_sdl3_sdlrenderer3/example_sdl3_sdlrenderer3.vcxproj @@ -0,0 +1,186 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {C0290D21-3AD2-4A35-ABBC-A2F5F48326DA} + example_sdl3_opengl3 + 8.1 + + + + Application + true + MultiByte + v140 + + + Application + true + MultiByte + v140 + + + Application + false + true + MultiByte + v140 + + + Application + false + true + MultiByte + v140 + + + + + + + + + + + + + + + + + + + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + $(IncludePath) + + + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + $(IncludePath) + + + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + $(IncludePath) + + + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + $(IncludePath) + + + + Level4 + Disabled + ..\..;..\..\backends;%SDL3_DIR%\include;$(VcpkgCurrentInstalledDir)include\SDL3;%(AdditionalIncludeDirectories) + /utf-8 %(AdditionalOptions) + + + true + %SDL3_DIR%\lib\x86;%(AdditionalLibraryDirectories) + opengl32.lib;SDL3.lib;%(AdditionalDependencies) + Console + msvcrt.lib + + + + + Level4 + Disabled + ..\..;..\..\backends;%SDL3_DIR%\include;$(VcpkgCurrentInstalledDir)include\SDL3;%(AdditionalIncludeDirectories) + /utf-8 %(AdditionalOptions) + + + true + %SDL3_DIR%\lib\x64;%(AdditionalLibraryDirectories) + opengl32.lib;SDL3.lib;%(AdditionalDependencies) + Console + msvcrt.lib + + + + + Level4 + MaxSpeed + true + true + ..\..;..\..\backends;%SDL3_DIR%\include;$(VcpkgCurrentInstalledDir)include\SDL3;%(AdditionalIncludeDirectories) + false + /utf-8 %(AdditionalOptions) + + + true + true + true + %SDL3_DIR%\lib\x86;%(AdditionalLibraryDirectories) + opengl32.lib;SDL3.lib;%(AdditionalDependencies) + Console + + + + + + + Level4 + MaxSpeed + true + true + ..\..;..\..\backends;%SDL3_DIR%\include;$(VcpkgCurrentInstalledDir)include\SDL3;%(AdditionalIncludeDirectories) + false + /utf-8 %(AdditionalOptions) + + + true + true + true + %SDL3_DIR%\lib\x64;%(AdditionalLibraryDirectories) + opengl32.lib;SDL3.lib;%(AdditionalDependencies) + Console + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/External/imgui-docking/examples/example_sdl3_sdlrenderer3/example_sdl3_sdlrenderer3.vcxproj.filters b/External/imgui-docking/examples/example_sdl3_sdlrenderer3/example_sdl3_sdlrenderer3.vcxproj.filters new file mode 100644 index 0000000..c41210d --- /dev/null +++ b/External/imgui-docking/examples/example_sdl3_sdlrenderer3/example_sdl3_sdlrenderer3.vcxproj.filters @@ -0,0 +1,64 @@ + + + + + {20b90ce4-7fcb-4731-b9a0-075f875de82d} + + + {f18ab499-84e1-499f-8eff-9754361e0e52} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + + + imgui + + + imgui + + + imgui + + + sources + + + sources + + + imgui + + + imgui + + + sources + + + + + imgui + + + imgui + + + imgui + + + sources + + + sources + + + + + + imgui + + + imgui + + + \ No newline at end of file diff --git a/External/imgui-docking/examples/example_sdl3_sdlrenderer3/main.cpp b/External/imgui-docking/examples/example_sdl3_sdlrenderer3/main.cpp new file mode 100644 index 0000000..64c82ca --- /dev/null +++ b/External/imgui-docking/examples/example_sdl3_sdlrenderer3/main.cpp @@ -0,0 +1,177 @@ +// Dear ImGui: standalone example application for SDL3 + SDL_Renderer +// (SDL is a cross-platform general purpose library for handling windows, inputs, OpenGL/Vulkan/Metal graphics context creation, etc.) + +// Learn about Dear ImGui: +// - FAQ https://dearimgui.com/faq +// - Getting Started https://dearimgui.com/getting-started +// - Documentation https://dearimgui.com/docs (same as your local docs/ folder). +// - Introduction, links and more at the top of imgui.cpp + +// Important to understand: SDL_Renderer is an _optional_ component of SDL3. +// For a multi-platform app consider using e.g. SDL+DirectX on Windows and SDL+OpenGL on Linux/OSX. + +#include "imgui.h" +#include "imgui_impl_sdl3.h" +#include "imgui_impl_sdlrenderer3.h" +#include +#include +#if defined(IMGUI_IMPL_OPENGL_ES2) +#include +#else +#include +#endif + +// Main code +int main(int, char**) +{ + // Setup SDL + if (SDL_Init(SDL_INIT_VIDEO | SDL_INIT_TIMER | SDL_INIT_GAMEPAD) != 0) + { + printf("Error: SDL_Init(): %s\n", SDL_GetError()); + return -1; + } + + // Create window with SDL_Renderer graphics context + Uint32 window_flags = SDL_WINDOW_OPENGL | SDL_WINDOW_RESIZABLE | SDL_WINDOW_HIDDEN; + SDL_Window* window = SDL_CreateWindow("Dear ImGui SDL3+SDL_Renderer example", 1280, 720, window_flags); + if (window == nullptr) + { + printf("Error: SDL_CreateWindow(): %s\n", SDL_GetError()); + return -1; + } + SDL_Renderer* renderer = SDL_CreateRenderer(window, nullptr); + SDL_SetRenderVSync(renderer, 1); + if (renderer == nullptr) + { + SDL_Log("Error: SDL_CreateRenderer(): %s\n", SDL_GetError()); + return -1; + } + SDL_SetWindowPosition(window, SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED); + SDL_ShowWindow(window); + + // Setup Dear ImGui context + IMGUI_CHECKVERSION(); + ImGui::CreateContext(); + ImGuiIO& io = ImGui::GetIO(); (void)io; + io.ConfigFlags |= ImGuiConfigFlags_NavEnableKeyboard; // Enable Keyboard Controls + io.ConfigFlags |= ImGuiConfigFlags_NavEnableGamepad; // Enable Gamepad Controls + io.ConfigFlags |= ImGuiConfigFlags_DockingEnable; // Enable Docking + + // Setup Dear ImGui style + ImGui::StyleColorsDark(); + //ImGui::StyleColorsLight(); + + // Setup Platform/Renderer backends + ImGui_ImplSDL3_InitForSDLRenderer(window, renderer); + ImGui_ImplSDLRenderer3_Init(renderer); + + // Load Fonts + // - If no fonts are loaded, dear imgui will use the default font. You can also load multiple fonts and use ImGui::PushFont()/PopFont() to select them. + // - AddFontFromFileTTF() will return the ImFont* so you can store it if you need to select the font among multiple. + // - If the file cannot be loaded, the function will return a nullptr. Please handle those errors in your application (e.g. use an assertion, or display an error and quit). + // - The fonts will be rasterized at a given size (w/ oversampling) and stored into a texture when calling ImFontAtlas::Build()/GetTexDataAsXXXX(), which ImGui_ImplXXXX_NewFrame below will call. + // - Use '#define IMGUI_ENABLE_FREETYPE' in your imconfig file to use Freetype for higher quality font rendering. + // - Read 'docs/FONTS.md' for more instructions and details. + // - Remember that in C/C++ if you want to include a backslash \ in a string literal you need to write a double backslash \\ ! + // - Our Emscripten build process allows embedding fonts to be accessible at runtime from the "fonts/" folder. See Makefile.emscripten for details. + //io.Fonts->AddFontDefault(); + //io.Fonts->AddFontFromFileTTF("c:\\Windows\\Fonts\\segoeui.ttf", 18.0f); + //io.Fonts->AddFontFromFileTTF("../../misc/fonts/DroidSans.ttf", 16.0f); + //io.Fonts->AddFontFromFileTTF("../../misc/fonts/Roboto-Medium.ttf", 16.0f); + //io.Fonts->AddFontFromFileTTF("../../misc/fonts/Cousine-Regular.ttf", 15.0f); + //ImFont* font = io.Fonts->AddFontFromFileTTF("c:\\Windows\\Fonts\\ArialUni.ttf", 18.0f, nullptr, io.Fonts->GetGlyphRangesJapanese()); + //IM_ASSERT(font != nullptr); + + // Our state + bool show_demo_window = true; + bool show_another_window = false; + ImVec4 clear_color = ImVec4(0.45f, 0.55f, 0.60f, 1.00f); + + // Main loop + bool done = false; +#ifdef __EMSCRIPTEN__ + // For an Emscripten build we are disabling file-system access, so let's not attempt to do a fopen() of the imgui.ini file. + // You may manually call LoadIniSettingsFromMemory() to load settings from your own storage. + io.IniFilename = nullptr; + EMSCRIPTEN_MAINLOOP_BEGIN +#else + while (!done) +#endif + { + // Poll and handle events (inputs, window resize, etc.) + // You can read the io.WantCaptureMouse, io.WantCaptureKeyboard flags to tell if dear imgui wants to use your inputs. + // - When io.WantCaptureMouse is true, do not dispatch mouse input data to your main application, or clear/overwrite your copy of the mouse data. + // - When io.WantCaptureKeyboard is true, do not dispatch keyboard input data to your main application, or clear/overwrite your copy of the keyboard data. + // Generally you may always pass all inputs to dear imgui, and hide them from your application based on those two flags. + SDL_Event event; + while (SDL_PollEvent(&event)) + { + ImGui_ImplSDL3_ProcessEvent(&event); + if (event.type == SDL_EVENT_QUIT) + done = true; + if (event.type == SDL_EVENT_WINDOW_CLOSE_REQUESTED && event.window.windowID == SDL_GetWindowID(window)) + done = true; + } + + // Start the Dear ImGui frame + ImGui_ImplSDLRenderer3_NewFrame(); + ImGui_ImplSDL3_NewFrame(); + ImGui::NewFrame(); + + // 1. Show the big demo window (Most of the sample code is in ImGui::ShowDemoWindow()! You can browse its code to learn more about Dear ImGui!). + if (show_demo_window) + ImGui::ShowDemoWindow(&show_demo_window); + + // 2. Show a simple window that we create ourselves. We use a Begin/End pair to create a named window. + { + static float f = 0.0f; + static int counter = 0; + + ImGui::Begin("Hello, world!"); // Create a window called "Hello, world!" and append into it. + + ImGui::Text("This is some useful text."); // Display some text (you can use a format strings too) + ImGui::Checkbox("Demo Window", &show_demo_window); // Edit bools storing our window open/close state + ImGui::Checkbox("Another Window", &show_another_window); + + ImGui::SliderFloat("float", &f, 0.0f, 1.0f); // Edit 1 float using a slider from 0.0f to 1.0f + ImGui::ColorEdit3("clear color", (float*)&clear_color); // Edit 3 floats representing a color + + if (ImGui::Button("Button")) // Buttons return true when clicked (most widgets return true when edited/activated) + counter++; + ImGui::SameLine(); + ImGui::Text("counter = %d", counter); + + ImGui::Text("Application average %.3f ms/frame (%.1f FPS)", 1000.0f / io.Framerate, io.Framerate); + ImGui::End(); + } + + // 3. Show another simple window. + if (show_another_window) + { + ImGui::Begin("Another Window", &show_another_window); // Pass a pointer to our bool variable (the window will have a closing button that will clear the bool when clicked) + ImGui::Text("Hello from another window!"); + if (ImGui::Button("Close Me")) + show_another_window = false; + ImGui::End(); + } + + // Rendering + ImGui::Render(); + //SDL_RenderSetScale(renderer, io.DisplayFramebufferScale.x, io.DisplayFramebufferScale.y); + SDL_SetRenderDrawColorFloat(renderer, clear_color.x, clear_color.y, clear_color.z, clear_color.w); + SDL_RenderClear(renderer); + ImGui_ImplSDLRenderer3_RenderDrawData(ImGui::GetDrawData(), renderer); + SDL_RenderPresent(renderer); + } + + // Cleanup + ImGui_ImplSDLRenderer3_Shutdown(); + ImGui_ImplSDL3_Shutdown(); + ImGui::DestroyContext(); + + SDL_DestroyRenderer(renderer); + SDL_DestroyWindow(window); + SDL_Quit(); + + return 0; +} diff --git a/External/imgui-docking/examples/example_win32_directx10/build_win32.bat b/External/imgui-docking/examples/example_win32_directx10/build_win32.bat new file mode 100644 index 0000000..78a6e37 --- /dev/null +++ b/External/imgui-docking/examples/example_win32_directx10/build_win32.bat @@ -0,0 +1,8 @@ +@REM Build for Visual Studio compiler. Run your copy of vcvars32.bat or vcvarsall.bat to setup command-line compiler. +@set OUT_DIR=Debug +@set OUT_EXE=example_win32_directx10 +@set INCLUDES=/I..\.. /I..\..\backends /I "%WindowsSdkDir%Include\um" /I "%WindowsSdkDir%Include\shared" /I "%DXSDK_DIR%Include" +@set SOURCES=main.cpp ..\..\backends\imgui_impl_win32.cpp ..\..\backends\imgui_impl_dx10.cpp ..\..\imgui*.cpp +@set LIBS=/LIBPATH:"%DXSDK_DIR%/Lib/x86" d3d10.lib d3dcompiler.lib +mkdir %OUT_DIR% +cl /nologo /Zi /MD /utf-8 %INCLUDES% /D UNICODE /D _UNICODE %SOURCES% /Fe%OUT_DIR%/%OUT_EXE%.exe /Fo%OUT_DIR%/ /link %LIBS% diff --git a/External/imgui-docking/examples/example_win32_directx10/example_win32_directx10.vcxproj b/External/imgui-docking/examples/example_win32_directx10/example_win32_directx10.vcxproj new file mode 100644 index 0000000..d11aed8 --- /dev/null +++ b/External/imgui-docking/examples/example_win32_directx10/example_win32_directx10.vcxproj @@ -0,0 +1,176 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {345A953E-A004-4648-B442-DC5F9F11068C} + example_win32_directx10 + 8.1 + + + + Application + true + Unicode + v140 + + + Application + true + Unicode + v140 + + + Application + false + true + Unicode + v140 + + + Application + false + true + Unicode + v140 + + + + + + + + + + + + + + + + + + + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + + + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + + + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + + + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + + + + Level4 + Disabled + ..\..;..\..\backends;%(AdditionalIncludeDirectories); + /utf-8 %(AdditionalOptions) + + + true + d3d10.lib;d3dcompiler.lib;dxgi.lib;%(AdditionalDependencies) + $(DXSDK_DIR)/Lib/x86;%(AdditionalLibraryDirectories) + Console + + + + + Level4 + Disabled + ..\..;..\..\backends;%(AdditionalIncludeDirectories); + /utf-8 %(AdditionalOptions) + + + true + d3d10.lib;d3dcompiler.lib;dxgi.lib;%(AdditionalDependencies) + $(DXSDK_DIR)/Lib/x64;%(AdditionalLibraryDirectories) + Console + + + + + Level4 + MaxSpeed + true + true + ..\..;..\..\backends;%(AdditionalIncludeDirectories); + false + /utf-8 %(AdditionalOptions) + + + true + true + true + d3d10.lib;d3dcompiler.lib;dxgi.lib;%(AdditionalDependencies) + $(DXSDK_DIR)/Lib/x86;%(AdditionalLibraryDirectories) + Console + + + + + Level4 + MaxSpeed + true + true + ..\..;..\..\backends;%(AdditionalIncludeDirectories); + false + /utf-8 %(AdditionalOptions) + + + true + true + true + d3d10.lib;d3dcompiler.lib;dxgi.lib;%(AdditionalDependencies) + $(DXSDK_DIR)/Lib/x64;%(AdditionalLibraryDirectories) + Console + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/External/imgui-docking/examples/example_win32_directx10/example_win32_directx10.vcxproj.filters b/External/imgui-docking/examples/example_win32_directx10/example_win32_directx10.vcxproj.filters new file mode 100644 index 0000000..33ab99b --- /dev/null +++ b/External/imgui-docking/examples/example_win32_directx10/example_win32_directx10.vcxproj.filters @@ -0,0 +1,63 @@ + + + + + {0587d7a3-f2ce-4d56-b84f-a0005d3bfce6} + + + {08e36723-ce4f-4cff-9662-c40801cf1acf} + + + + + imgui + + + imgui + + + imgui + + + sources + + + sources + + + + + imgui + + + sources + + + imgui + + + imgui + + + sources + + + sources + + + imgui + + + imgui + + + + + + imgui + + + imgui + + + \ No newline at end of file diff --git a/External/imgui-docking/examples/example_win32_directx10/main.cpp b/External/imgui-docking/examples/example_win32_directx10/main.cpp new file mode 100644 index 0000000..a9e5e31 --- /dev/null +++ b/External/imgui-docking/examples/example_win32_directx10/main.cpp @@ -0,0 +1,289 @@ +// Dear ImGui: standalone example application for DirectX 10 + +// Learn about Dear ImGui: +// - FAQ https://dearimgui.com/faq +// - Getting Started https://dearimgui.com/getting-started +// - Documentation https://dearimgui.com/docs (same as your local docs/ folder). +// - Introduction, links and more at the top of imgui.cpp + +#include "imgui.h" +#include "imgui_impl_win32.h" +#include "imgui_impl_dx10.h" +#include +#include +#include + +// Data +static ID3D10Device* g_pd3dDevice = nullptr; +static IDXGISwapChain* g_pSwapChain = nullptr; +static bool g_SwapChainOccluded = false; +static UINT g_ResizeWidth = 0, g_ResizeHeight = 0; +static ID3D10RenderTargetView* g_mainRenderTargetView = nullptr; + +// Forward declarations of helper functions +bool CreateDeviceD3D(HWND hWnd); +void CleanupDeviceD3D(); +void CreateRenderTarget(); +void CleanupRenderTarget(); +LRESULT WINAPI WndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam); + +// Main code +int main(int, char**) +{ + // Create application window + //ImGui_ImplWin32_EnableDpiAwareness(); + WNDCLASSEXW wc = { sizeof(wc), CS_CLASSDC, WndProc, 0L, 0L, GetModuleHandle(nullptr), nullptr, nullptr, nullptr, nullptr, L"ImGui Example", nullptr }; + ::RegisterClassExW(&wc); + HWND hwnd = ::CreateWindowW(wc.lpszClassName, L"Dear ImGui DirectX10 Example", WS_OVERLAPPEDWINDOW, 100, 100, 1280, 800, nullptr, nullptr, wc.hInstance, nullptr); + + // Initialize Direct3D + if (!CreateDeviceD3D(hwnd)) + { + CleanupDeviceD3D(); + ::UnregisterClassW(wc.lpszClassName, wc.hInstance); + return 1; + } + + // Show the window + ::ShowWindow(hwnd, SW_SHOWDEFAULT); + ::UpdateWindow(hwnd); + + // Setup Dear ImGui context + IMGUI_CHECKVERSION(); + ImGui::CreateContext(); + ImGuiIO& io = ImGui::GetIO(); (void)io; + io.ConfigFlags |= ImGuiConfigFlags_NavEnableKeyboard; // Enable Keyboard Controls + io.ConfigFlags |= ImGuiConfigFlags_NavEnableGamepad; // Enable Gamepad Controls + io.ConfigFlags |= ImGuiConfigFlags_DockingEnable; // Enable Docking + io.ConfigFlags |= ImGuiConfigFlags_ViewportsEnable; // Enable Multi-Viewport / Platform Windows + //io.ConfigViewportsNoAutoMerge = true; + //io.ConfigViewportsNoTaskBarIcon = true; + + // Setup Dear ImGui style + ImGui::StyleColorsDark(); + //ImGui::StyleColorsLight(); + + // When viewports are enabled we tweak WindowRounding/WindowBg so platform windows can look identical to regular ones. + ImGuiStyle& style = ImGui::GetStyle(); + if (io.ConfigFlags & ImGuiConfigFlags_ViewportsEnable) + { + style.WindowRounding = 0.0f; + style.Colors[ImGuiCol_WindowBg].w = 1.0f; + } + + // Setup Platform/Renderer backends + ImGui_ImplWin32_Init(hwnd); + ImGui_ImplDX10_Init(g_pd3dDevice); + + // Load Fonts + // - If no fonts are loaded, dear imgui will use the default font. You can also load multiple fonts and use ImGui::PushFont()/PopFont() to select them. + // - AddFontFromFileTTF() will return the ImFont* so you can store it if you need to select the font among multiple. + // - If the file cannot be loaded, the function will return a nullptr. Please handle those errors in your application (e.g. use an assertion, or display an error and quit). + // - The fonts will be rasterized at a given size (w/ oversampling) and stored into a texture when calling ImFontAtlas::Build()/GetTexDataAsXXXX(), which ImGui_ImplXXXX_NewFrame below will call. + // - Use '#define IMGUI_ENABLE_FREETYPE' in your imconfig file to use Freetype for higher quality font rendering. + // - Read 'docs/FONTS.md' for more instructions and details. + // - Remember that in C/C++ if you want to include a backslash \ in a string literal you need to write a double backslash \\ ! + //io.Fonts->AddFontDefault(); + //io.Fonts->AddFontFromFileTTF("c:\\Windows\\Fonts\\segoeui.ttf", 18.0f); + //io.Fonts->AddFontFromFileTTF("../../misc/fonts/DroidSans.ttf", 16.0f); + //io.Fonts->AddFontFromFileTTF("../../misc/fonts/Roboto-Medium.ttf", 16.0f); + //io.Fonts->AddFontFromFileTTF("../../misc/fonts/Cousine-Regular.ttf", 15.0f); + //ImFont* font = io.Fonts->AddFontFromFileTTF("c:\\Windows\\Fonts\\ArialUni.ttf", 18.0f, nullptr, io.Fonts->GetGlyphRangesJapanese()); + //IM_ASSERT(font != nullptr); + + // Our state + bool show_demo_window = true; + bool show_another_window = false; + ImVec4 clear_color = ImVec4(0.45f, 0.55f, 0.60f, 1.00f); + + // Main loop + bool done = false; + while (!done) + { + // Poll and handle messages (inputs, window resize, etc.) + // See the WndProc() function below for our to dispatch events to the Win32 backend. + MSG msg; + while (::PeekMessage(&msg, nullptr, 0U, 0U, PM_REMOVE)) + { + ::TranslateMessage(&msg); + ::DispatchMessage(&msg); + if (msg.message == WM_QUIT) + done = true; + } + if (done) + break; + + // Handle window being minimized or screen locked + if (g_SwapChainOccluded && g_pSwapChain->Present(0, DXGI_PRESENT_TEST) == DXGI_STATUS_OCCLUDED) + { + ::Sleep(10); + continue; + } + g_SwapChainOccluded = false; + + // Handle window resize (we don't resize directly in the WM_SIZE handler) + if (g_ResizeWidth != 0 && g_ResizeHeight != 0) + { + CleanupRenderTarget(); + g_pSwapChain->ResizeBuffers(0, g_ResizeWidth, g_ResizeHeight, DXGI_FORMAT_UNKNOWN, 0); + g_ResizeWidth = g_ResizeHeight = 0; + CreateRenderTarget(); + } + + // Start the Dear ImGui frame + ImGui_ImplDX10_NewFrame(); + ImGui_ImplWin32_NewFrame(); + ImGui::NewFrame(); + + // 1. Show the big demo window (Most of the sample code is in ImGui::ShowDemoWindow()! You can browse its code to learn more about Dear ImGui!). + if (show_demo_window) + ImGui::ShowDemoWindow(&show_demo_window); + + // 2. Show a simple window that we create ourselves. We use a Begin/End pair to create a named window. + { + static float f = 0.0f; + static int counter = 0; + + ImGui::Begin("Hello, world!"); // Create a window called "Hello, world!" and append into it. + + ImGui::Text("This is some useful text."); // Display some text (you can use a format strings too) + ImGui::Checkbox("Demo Window", &show_demo_window); // Edit bools storing our window open/close state + ImGui::Checkbox("Another Window", &show_another_window); + + ImGui::SliderFloat("float", &f, 0.0f, 1.0f); // Edit 1 float using a slider from 0.0f to 1.0f + ImGui::ColorEdit3("clear color", (float*)&clear_color); // Edit 3 floats representing a color + + if (ImGui::Button("Button")) // Buttons return true when clicked (most widgets return true when edited/activated) + counter++; + ImGui::SameLine(); + ImGui::Text("counter = %d", counter); + + ImGui::Text("Application average %.3f ms/frame (%.1f FPS)", 1000.0f / io.Framerate, io.Framerate); + ImGui::End(); + } + + // 3. Show another simple window. + if (show_another_window) + { + ImGui::Begin("Another Window", &show_another_window); // Pass a pointer to our bool variable (the window will have a closing button that will clear the bool when clicked) + ImGui::Text("Hello from another window!"); + if (ImGui::Button("Close Me")) + show_another_window = false; + ImGui::End(); + } + + // Rendering + ImGui::Render(); + const float clear_color_with_alpha[4] = { clear_color.x * clear_color.w, clear_color.y * clear_color.w, clear_color.z * clear_color.w, clear_color.w }; + g_pd3dDevice->OMSetRenderTargets(1, &g_mainRenderTargetView, nullptr); + g_pd3dDevice->ClearRenderTargetView(g_mainRenderTargetView, clear_color_with_alpha); + ImGui_ImplDX10_RenderDrawData(ImGui::GetDrawData()); + + // Update and Render additional Platform Windows + if (io.ConfigFlags & ImGuiConfigFlags_ViewportsEnable) + { + ImGui::UpdatePlatformWindows(); + ImGui::RenderPlatformWindowsDefault(); + } + + // Present + HRESULT hr = g_pSwapChain->Present(1, 0); // Present with vsync + //HRESULT hr = g_pSwapChain->Present(0, 0); // Present without vsync + g_SwapChainOccluded = (hr == DXGI_STATUS_OCCLUDED); + } + + // Cleanup + ImGui_ImplDX10_Shutdown(); + ImGui_ImplWin32_Shutdown(); + ImGui::DestroyContext(); + + CleanupDeviceD3D(); + ::DestroyWindow(hwnd); + ::UnregisterClassW(wc.lpszClassName, wc.hInstance); + + return 0; +} + +// Helper functions +bool CreateDeviceD3D(HWND hWnd) +{ + // Setup swap chain + DXGI_SWAP_CHAIN_DESC sd; + ZeroMemory(&sd, sizeof(sd)); + sd.BufferCount = 2; + sd.BufferDesc.Width = 0; + sd.BufferDesc.Height = 0; + sd.BufferDesc.Format = DXGI_FORMAT_R8G8B8A8_UNORM; + sd.BufferDesc.RefreshRate.Numerator = 60; + sd.BufferDesc.RefreshRate.Denominator = 1; + sd.Flags = DXGI_SWAP_CHAIN_FLAG_ALLOW_MODE_SWITCH; + sd.BufferUsage = DXGI_USAGE_RENDER_TARGET_OUTPUT; + sd.OutputWindow = hWnd; + sd.SampleDesc.Count = 1; + sd.SampleDesc.Quality = 0; + sd.Windowed = TRUE; + sd.SwapEffect = DXGI_SWAP_EFFECT_DISCARD; + + UINT createDeviceFlags = 0; + //createDeviceFlags |= D3D10_CREATE_DEVICE_DEBUG; + HRESULT res = D3D10CreateDeviceAndSwapChain(nullptr, D3D10_DRIVER_TYPE_HARDWARE, nullptr, createDeviceFlags, D3D10_SDK_VERSION, &sd, &g_pSwapChain, &g_pd3dDevice); + if (res == DXGI_ERROR_UNSUPPORTED) // Try high-performance WARP software driver if hardware is not available. + res = D3D10CreateDeviceAndSwapChain(nullptr, D3D10_DRIVER_TYPE_WARP, nullptr, createDeviceFlags, D3D10_SDK_VERSION, &sd, &g_pSwapChain, &g_pd3dDevice); + if (res != S_OK) + return false; + + CreateRenderTarget(); + return true; +} + +void CleanupDeviceD3D() +{ + CleanupRenderTarget(); + if (g_pSwapChain) { g_pSwapChain->Release(); g_pSwapChain = nullptr; } + if (g_pd3dDevice) { g_pd3dDevice->Release(); g_pd3dDevice = nullptr; } +} + +void CreateRenderTarget() +{ + ID3D10Texture2D* pBackBuffer; + g_pSwapChain->GetBuffer(0, IID_PPV_ARGS(&pBackBuffer)); + g_pd3dDevice->CreateRenderTargetView(pBackBuffer, nullptr, &g_mainRenderTargetView); + pBackBuffer->Release(); +} + +void CleanupRenderTarget() +{ + if (g_mainRenderTargetView) { g_mainRenderTargetView->Release(); g_mainRenderTargetView = nullptr; } +} + +// Forward declare message handler from imgui_impl_win32.cpp +extern IMGUI_IMPL_API LRESULT ImGui_ImplWin32_WndProcHandler(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam); + +// Win32 message handler +// You can read the io.WantCaptureMouse, io.WantCaptureKeyboard flags to tell if dear imgui wants to use your inputs. +// - When io.WantCaptureMouse is true, do not dispatch mouse input data to your main application, or clear/overwrite your copy of the mouse data. +// - When io.WantCaptureKeyboard is true, do not dispatch keyboard input data to your main application, or clear/overwrite your copy of the keyboard data. +// Generally you may always pass all inputs to dear imgui, and hide them from your application based on those two flags. +LRESULT WINAPI WndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam) +{ + if (ImGui_ImplWin32_WndProcHandler(hWnd, msg, wParam, lParam)) + return true; + + switch (msg) + { + case WM_SIZE: + if (wParam == SIZE_MINIMIZED) + return 0; + g_ResizeWidth = (UINT)LOWORD(lParam); // Queue resize + g_ResizeHeight = (UINT)HIWORD(lParam); + return 0; + case WM_SYSCOMMAND: + if ((wParam & 0xfff0) == SC_KEYMENU) // Disable ALT application menu + return 0; + break; + case WM_DESTROY: + ::PostQuitMessage(0); + return 0; + } + return ::DefWindowProcW(hWnd, msg, wParam, lParam); +} diff --git a/External/imgui-docking/examples/example_win32_directx11/build_win32.bat b/External/imgui-docking/examples/example_win32_directx11/build_win32.bat new file mode 100644 index 0000000..c9a717c --- /dev/null +++ b/External/imgui-docking/examples/example_win32_directx11/build_win32.bat @@ -0,0 +1,9 @@ +@REM Build for Visual Studio compiler. Run your copy of vcvars32.bat or vcvarsall.bat to setup command-line compiler. +@set OUT_DIR=Debug +@set OUT_EXE=example_win32_directx11 +@set INCLUDES=/I..\.. /I..\..\backends /I "%WindowsSdkDir%Include\um" /I "%WindowsSdkDir%Include\shared" /I "%DXSDK_DIR%Include" +@set SOURCES=main.cpp ..\..\backends\imgui_impl_dx11.cpp ..\..\backends\imgui_impl_win32.cpp ..\..\imgui*.cpp +@set LIBS=/LIBPATH:"%DXSDK_DIR%/Lib/x86" d3d11.lib d3dcompiler.lib +mkdir %OUT_DIR% +cl /nologo /Zi /MD /utf-8 %INCLUDES% /D UNICODE /D _UNICODE %SOURCES% /Fe%OUT_DIR%/%OUT_EXE%.exe /Fo%OUT_DIR%/ /link %LIBS% + diff --git a/External/imgui-docking/examples/example_win32_directx11/example_win32_directx11.vcxproj b/External/imgui-docking/examples/example_win32_directx11/example_win32_directx11.vcxproj new file mode 100644 index 0000000..bace6a2 --- /dev/null +++ b/External/imgui-docking/examples/example_win32_directx11/example_win32_directx11.vcxproj @@ -0,0 +1,175 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {9F316E83-5AE5-4939-A723-305A94F48005} + example_win32_directx11 + + + + Application + true + Unicode + v140 + + + Application + true + Unicode + v140 + + + Application + false + true + Unicode + v140 + + + Application + false + true + Unicode + v140 + + + + + + + + + + + + + + + + + + + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + + + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + + + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + + + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + + + + Level4 + Disabled + ..\..;..\..\backends;%(AdditionalIncludeDirectories); + /utf-8 %(AdditionalOptions) + + + true + d3d11.lib;d3dcompiler.lib;dxgi.lib;%(AdditionalDependencies) + $(DXSDK_DIR)/Lib/x86;%(AdditionalLibraryDirectories) + Console + + + + + Level4 + Disabled + ..\..;..\..\backends;%(AdditionalIncludeDirectories); + /utf-8 %(AdditionalOptions) + + + true + d3d11.lib;d3dcompiler.lib;dxgi.lib;%(AdditionalDependencies) + $(DXSDK_DIR)/Lib/x64;%(AdditionalLibraryDirectories) + Console + + + + + Level4 + MaxSpeed + true + true + ..\..;..\..\backends;%(AdditionalIncludeDirectories); + false + /utf-8 %(AdditionalOptions) + + + true + true + true + d3d11.lib;d3dcompiler.lib;dxgi.lib;%(AdditionalDependencies) + $(DXSDK_DIR)/Lib/x86;%(AdditionalLibraryDirectories) + Console + + + + + Level4 + MaxSpeed + true + true + ..\..;..\..\backends;%(AdditionalIncludeDirectories); + false + /utf-8 %(AdditionalOptions) + + + true + true + true + d3d11.lib;d3dcompiler.lib;dxgi.lib;%(AdditionalDependencies) + $(DXSDK_DIR)/Lib/x64;%(AdditionalLibraryDirectories) + Console + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/External/imgui-docking/examples/example_win32_directx11/example_win32_directx11.vcxproj.filters b/External/imgui-docking/examples/example_win32_directx11/example_win32_directx11.vcxproj.filters new file mode 100644 index 0000000..63032a6 --- /dev/null +++ b/External/imgui-docking/examples/example_win32_directx11/example_win32_directx11.vcxproj.filters @@ -0,0 +1,63 @@ + + + + + {0587d7a3-f2ce-4d56-b84f-a0005d3bfce6} + + + {08e36723-ce4f-4cff-9662-c40801cf1acf} + + + + + imgui + + + imgui + + + imgui + + + sources + + + sources + + + + + imgui + + + sources + + + imgui + + + imgui + + + imgui + + + sources + + + sources + + + imgui + + + + + + imgui + + + imgui + + + \ No newline at end of file diff --git a/External/imgui-docking/examples/example_win32_directx11/main.cpp b/External/imgui-docking/examples/example_win32_directx11/main.cpp new file mode 100644 index 0000000..d25213b --- /dev/null +++ b/External/imgui-docking/examples/example_win32_directx11/main.cpp @@ -0,0 +1,310 @@ +// Dear ImGui: standalone example application for DirectX 11 + +// Learn about Dear ImGui: +// - FAQ https://dearimgui.com/faq +// - Getting Started https://dearimgui.com/getting-started +// - Documentation https://dearimgui.com/docs (same as your local docs/ folder). +// - Introduction, links and more at the top of imgui.cpp + +#include "imgui.h" +#include "imgui_impl_win32.h" +#include "imgui_impl_dx11.h" +#include +#include + +// Data +static ID3D11Device* g_pd3dDevice = nullptr; +static ID3D11DeviceContext* g_pd3dDeviceContext = nullptr; +static IDXGISwapChain* g_pSwapChain = nullptr; +static bool g_SwapChainOccluded = false; +static UINT g_ResizeWidth = 0, g_ResizeHeight = 0; +static ID3D11RenderTargetView* g_mainRenderTargetView = nullptr; + +// Forward declarations of helper functions +bool CreateDeviceD3D(HWND hWnd); +void CleanupDeviceD3D(); +void CreateRenderTarget(); +void CleanupRenderTarget(); +LRESULT WINAPI WndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam); + +// Main code +int main(int, char**) +{ + // Create application window + //ImGui_ImplWin32_EnableDpiAwareness(); + WNDCLASSEXW wc = { sizeof(wc), CS_CLASSDC, WndProc, 0L, 0L, GetModuleHandle(nullptr), nullptr, nullptr, nullptr, nullptr, L"ImGui Example", nullptr }; + ::RegisterClassExW(&wc); + HWND hwnd = ::CreateWindowW(wc.lpszClassName, L"Dear ImGui DirectX11 Example", WS_OVERLAPPEDWINDOW, 100, 100, 1280, 800, nullptr, nullptr, wc.hInstance, nullptr); + + // Initialize Direct3D + if (!CreateDeviceD3D(hwnd)) + { + CleanupDeviceD3D(); + ::UnregisterClassW(wc.lpszClassName, wc.hInstance); + return 1; + } + + // Show the window + ::ShowWindow(hwnd, SW_SHOWDEFAULT); + ::UpdateWindow(hwnd); + + // Setup Dear ImGui context + IMGUI_CHECKVERSION(); + ImGui::CreateContext(); + ImGuiIO& io = ImGui::GetIO(); (void)io; + io.ConfigFlags |= ImGuiConfigFlags_NavEnableKeyboard; // Enable Keyboard Controls + io.ConfigFlags |= ImGuiConfigFlags_NavEnableGamepad; // Enable Gamepad Controls + io.ConfigFlags |= ImGuiConfigFlags_DockingEnable; // Enable Docking + io.ConfigFlags |= ImGuiConfigFlags_ViewportsEnable; // Enable Multi-Viewport / Platform Windows + //io.ConfigViewportsNoAutoMerge = true; + //io.ConfigViewportsNoTaskBarIcon = true; + //io.ConfigViewportsNoDefaultParent = true; + //io.ConfigDockingAlwaysTabBar = true; + //io.ConfigDockingTransparentPayload = true; + //io.ConfigFlags |= ImGuiConfigFlags_DpiEnableScaleFonts; // FIXME-DPI: Experimental. THIS CURRENTLY DOESN'T WORK AS EXPECTED. DON'T USE IN USER APP! + //io.ConfigFlags |= ImGuiConfigFlags_DpiEnableScaleViewports; // FIXME-DPI: Experimental. + + // Setup Dear ImGui style + ImGui::StyleColorsDark(); + //ImGui::StyleColorsLight(); + + // When viewports are enabled we tweak WindowRounding/WindowBg so platform windows can look identical to regular ones. + ImGuiStyle& style = ImGui::GetStyle(); + if (io.ConfigFlags & ImGuiConfigFlags_ViewportsEnable) + { + style.WindowRounding = 0.0f; + style.Colors[ImGuiCol_WindowBg].w = 1.0f; + } + + // Setup Platform/Renderer backends + ImGui_ImplWin32_Init(hwnd); + ImGui_ImplDX11_Init(g_pd3dDevice, g_pd3dDeviceContext); + + // Load Fonts + // - If no fonts are loaded, dear imgui will use the default font. You can also load multiple fonts and use ImGui::PushFont()/PopFont() to select them. + // - AddFontFromFileTTF() will return the ImFont* so you can store it if you need to select the font among multiple. + // - If the file cannot be loaded, the function will return a nullptr. Please handle those errors in your application (e.g. use an assertion, or display an error and quit). + // - The fonts will be rasterized at a given size (w/ oversampling) and stored into a texture when calling ImFontAtlas::Build()/GetTexDataAsXXXX(), which ImGui_ImplXXXX_NewFrame below will call. + // - Use '#define IMGUI_ENABLE_FREETYPE' in your imconfig file to use Freetype for higher quality font rendering. + // - Read 'docs/FONTS.md' for more instructions and details. + // - Remember that in C/C++ if you want to include a backslash \ in a string literal you need to write a double backslash \\ ! + //io.Fonts->AddFontDefault(); + //io.Fonts->AddFontFromFileTTF("c:\\Windows\\Fonts\\segoeui.ttf", 18.0f); + //io.Fonts->AddFontFromFileTTF("../../misc/fonts/DroidSans.ttf", 16.0f); + //io.Fonts->AddFontFromFileTTF("../../misc/fonts/Roboto-Medium.ttf", 16.0f); + //io.Fonts->AddFontFromFileTTF("../../misc/fonts/Cousine-Regular.ttf", 15.0f); + //ImFont* font = io.Fonts->AddFontFromFileTTF("c:\\Windows\\Fonts\\ArialUni.ttf", 18.0f, nullptr, io.Fonts->GetGlyphRangesJapanese()); + //IM_ASSERT(font != nullptr); + + // Our state + bool show_demo_window = true; + bool show_another_window = false; + ImVec4 clear_color = ImVec4(0.45f, 0.55f, 0.60f, 1.00f); + + // Main loop + bool done = false; + while (!done) + { + // Poll and handle messages (inputs, window resize, etc.) + // See the WndProc() function below for our to dispatch events to the Win32 backend. + MSG msg; + while (::PeekMessage(&msg, nullptr, 0U, 0U, PM_REMOVE)) + { + ::TranslateMessage(&msg); + ::DispatchMessage(&msg); + if (msg.message == WM_QUIT) + done = true; + } + if (done) + break; + + // Handle window being minimized or screen locked + if (g_SwapChainOccluded && g_pSwapChain->Present(0, DXGI_PRESENT_TEST) == DXGI_STATUS_OCCLUDED) + { + ::Sleep(10); + continue; + } + g_SwapChainOccluded = false; + + // Handle window resize (we don't resize directly in the WM_SIZE handler) + if (g_ResizeWidth != 0 && g_ResizeHeight != 0) + { + CleanupRenderTarget(); + g_pSwapChain->ResizeBuffers(0, g_ResizeWidth, g_ResizeHeight, DXGI_FORMAT_UNKNOWN, 0); + g_ResizeWidth = g_ResizeHeight = 0; + CreateRenderTarget(); + } + + // Start the Dear ImGui frame + ImGui_ImplDX11_NewFrame(); + ImGui_ImplWin32_NewFrame(); + ImGui::NewFrame(); + + // 1. Show the big demo window (Most of the sample code is in ImGui::ShowDemoWindow()! You can browse its code to learn more about Dear ImGui!). + if (show_demo_window) + ImGui::ShowDemoWindow(&show_demo_window); + + // 2. Show a simple window that we create ourselves. We use a Begin/End pair to create a named window. + { + static float f = 0.0f; + static int counter = 0; + + ImGui::Begin("Hello, world!"); // Create a window called "Hello, world!" and append into it. + + ImGui::Text("This is some useful text."); // Display some text (you can use a format strings too) + ImGui::Checkbox("Demo Window", &show_demo_window); // Edit bools storing our window open/close state + ImGui::Checkbox("Another Window", &show_another_window); + + ImGui::SliderFloat("float", &f, 0.0f, 1.0f); // Edit 1 float using a slider from 0.0f to 1.0f + ImGui::ColorEdit3("clear color", (float*)&clear_color); // Edit 3 floats representing a color + + if (ImGui::Button("Button")) // Buttons return true when clicked (most widgets return true when edited/activated) + counter++; + ImGui::SameLine(); + ImGui::Text("counter = %d", counter); + + ImGui::Text("Application average %.3f ms/frame (%.1f FPS)", 1000.0f / io.Framerate, io.Framerate); + ImGui::End(); + } + + // 3. Show another simple window. + if (show_another_window) + { + ImGui::Begin("Another Window", &show_another_window); // Pass a pointer to our bool variable (the window will have a closing button that will clear the bool when clicked) + ImGui::Text("Hello from another window!"); + if (ImGui::Button("Close Me")) + show_another_window = false; + ImGui::End(); + } + + // Rendering + ImGui::Render(); + const float clear_color_with_alpha[4] = { clear_color.x * clear_color.w, clear_color.y * clear_color.w, clear_color.z * clear_color.w, clear_color.w }; + g_pd3dDeviceContext->OMSetRenderTargets(1, &g_mainRenderTargetView, nullptr); + g_pd3dDeviceContext->ClearRenderTargetView(g_mainRenderTargetView, clear_color_with_alpha); + ImGui_ImplDX11_RenderDrawData(ImGui::GetDrawData()); + + // Update and Render additional Platform Windows + if (io.ConfigFlags & ImGuiConfigFlags_ViewportsEnable) + { + ImGui::UpdatePlatformWindows(); + ImGui::RenderPlatformWindowsDefault(); + } + + // Present + HRESULT hr = g_pSwapChain->Present(1, 0); // Present with vsync + //HRESULT hr = g_pSwapChain->Present(0, 0); // Present without vsync + g_SwapChainOccluded = (hr == DXGI_STATUS_OCCLUDED); + } + + // Cleanup + ImGui_ImplDX11_Shutdown(); + ImGui_ImplWin32_Shutdown(); + ImGui::DestroyContext(); + + CleanupDeviceD3D(); + ::DestroyWindow(hwnd); + ::UnregisterClassW(wc.lpszClassName, wc.hInstance); + + return 0; +} + +// Helper functions +bool CreateDeviceD3D(HWND hWnd) +{ + // Setup swap chain + DXGI_SWAP_CHAIN_DESC sd; + ZeroMemory(&sd, sizeof(sd)); + sd.BufferCount = 2; + sd.BufferDesc.Width = 0; + sd.BufferDesc.Height = 0; + sd.BufferDesc.Format = DXGI_FORMAT_R8G8B8A8_UNORM; + sd.BufferDesc.RefreshRate.Numerator = 60; + sd.BufferDesc.RefreshRate.Denominator = 1; + sd.Flags = DXGI_SWAP_CHAIN_FLAG_ALLOW_MODE_SWITCH; + sd.BufferUsage = DXGI_USAGE_RENDER_TARGET_OUTPUT; + sd.OutputWindow = hWnd; + sd.SampleDesc.Count = 1; + sd.SampleDesc.Quality = 0; + sd.Windowed = TRUE; + sd.SwapEffect = DXGI_SWAP_EFFECT_DISCARD; + + UINT createDeviceFlags = 0; + //createDeviceFlags |= D3D11_CREATE_DEVICE_DEBUG; + D3D_FEATURE_LEVEL featureLevel; + const D3D_FEATURE_LEVEL featureLevelArray[2] = { D3D_FEATURE_LEVEL_11_0, D3D_FEATURE_LEVEL_10_0, }; + HRESULT res = D3D11CreateDeviceAndSwapChain(nullptr, D3D_DRIVER_TYPE_HARDWARE, nullptr, createDeviceFlags, featureLevelArray, 2, D3D11_SDK_VERSION, &sd, &g_pSwapChain, &g_pd3dDevice, &featureLevel, &g_pd3dDeviceContext); + if (res == DXGI_ERROR_UNSUPPORTED) // Try high-performance WARP software driver if hardware is not available. + res = D3D11CreateDeviceAndSwapChain(nullptr, D3D_DRIVER_TYPE_WARP, nullptr, createDeviceFlags, featureLevelArray, 2, D3D11_SDK_VERSION, &sd, &g_pSwapChain, &g_pd3dDevice, &featureLevel, &g_pd3dDeviceContext); + if (res != S_OK) + return false; + + CreateRenderTarget(); + return true; +} + +void CleanupDeviceD3D() +{ + CleanupRenderTarget(); + if (g_pSwapChain) { g_pSwapChain->Release(); g_pSwapChain = nullptr; } + if (g_pd3dDeviceContext) { g_pd3dDeviceContext->Release(); g_pd3dDeviceContext = nullptr; } + if (g_pd3dDevice) { g_pd3dDevice->Release(); g_pd3dDevice = nullptr; } +} + +void CreateRenderTarget() +{ + ID3D11Texture2D* pBackBuffer; + g_pSwapChain->GetBuffer(0, IID_PPV_ARGS(&pBackBuffer)); + g_pd3dDevice->CreateRenderTargetView(pBackBuffer, nullptr, &g_mainRenderTargetView); + pBackBuffer->Release(); +} + +void CleanupRenderTarget() +{ + if (g_mainRenderTargetView) { g_mainRenderTargetView->Release(); g_mainRenderTargetView = nullptr; } +} + +#ifndef WM_DPICHANGED +#define WM_DPICHANGED 0x02E0 // From Windows SDK 8.1+ headers +#endif + +// Forward declare message handler from imgui_impl_win32.cpp +extern IMGUI_IMPL_API LRESULT ImGui_ImplWin32_WndProcHandler(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam); + +// Win32 message handler +// You can read the io.WantCaptureMouse, io.WantCaptureKeyboard flags to tell if dear imgui wants to use your inputs. +// - When io.WantCaptureMouse is true, do not dispatch mouse input data to your main application, or clear/overwrite your copy of the mouse data. +// - When io.WantCaptureKeyboard is true, do not dispatch keyboard input data to your main application, or clear/overwrite your copy of the keyboard data. +// Generally you may always pass all inputs to dear imgui, and hide them from your application based on those two flags. +LRESULT WINAPI WndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam) +{ + if (ImGui_ImplWin32_WndProcHandler(hWnd, msg, wParam, lParam)) + return true; + + switch (msg) + { + case WM_SIZE: + if (wParam == SIZE_MINIMIZED) + return 0; + g_ResizeWidth = (UINT)LOWORD(lParam); // Queue resize + g_ResizeHeight = (UINT)HIWORD(lParam); + return 0; + case WM_SYSCOMMAND: + if ((wParam & 0xfff0) == SC_KEYMENU) // Disable ALT application menu + return 0; + break; + case WM_DESTROY: + ::PostQuitMessage(0); + return 0; + case WM_DPICHANGED: + if (ImGui::GetIO().ConfigFlags & ImGuiConfigFlags_DpiEnableScaleViewports) + { + //const int dpi = HIWORD(wParam); + //printf("WM_DPICHANGED to %d (%.0f%%)\n", dpi, (float)dpi / 96.0f * 100.0f); + const RECT* suggested_rect = (RECT*)lParam; + ::SetWindowPos(hWnd, nullptr, suggested_rect->left, suggested_rect->top, suggested_rect->right - suggested_rect->left, suggested_rect->bottom - suggested_rect->top, SWP_NOZORDER | SWP_NOACTIVATE); + } + break; + } + return ::DefWindowProcW(hWnd, msg, wParam, lParam); +} diff --git a/External/imgui-docking/examples/example_win32_directx12/build_win32.bat b/External/imgui-docking/examples/example_win32_directx12/build_win32.bat new file mode 100644 index 0000000..68e3c92 --- /dev/null +++ b/External/imgui-docking/examples/example_win32_directx12/build_win32.bat @@ -0,0 +1,9 @@ +@REM Build for Visual Studio compiler. Run your copy of vcvars32.bat or vcvarsall.bat to setup command-line compiler. +@REM Important: to build on 32-bit systems, the DX12 backends needs '#define ImTextureID ImU64', so we pass it here. +@set OUT_DIR=Debug +@set OUT_EXE=example_win32_directx12 +@set INCLUDES=/I..\.. /I..\..\backends /I "%WindowsSdkDir%Include\um" /I "%WindowsSdkDir%Include\shared" +@set SOURCES=main.cpp ..\..\backends\imgui_impl_dx12.cpp ..\..\backends\imgui_impl_win32.cpp ..\..\imgui*.cpp +@set LIBS=d3d12.lib d3dcompiler.lib dxgi.lib +mkdir Debug +cl /nologo /Zi /MD /utf-8 %INCLUDES% /D ImTextureID=ImU64 /D UNICODE /D _UNICODE %SOURCES% /Fe%OUT_DIR%/%OUT_EXE%.exe /Fo%OUT_DIR%/ /link %LIBS% diff --git a/External/imgui-docking/examples/example_win32_directx12/example_win32_directx12.vcxproj b/External/imgui-docking/examples/example_win32_directx12/example_win32_directx12.vcxproj new file mode 100644 index 0000000..7b64371 --- /dev/null +++ b/External/imgui-docking/examples/example_win32_directx12/example_win32_directx12.vcxproj @@ -0,0 +1,180 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {b4cf9797-519d-4afe-a8f4-5141a6b521d3} + example_win32_directx12 + 10.0.18362.0 + + + + Application + true + Unicode + v140 + + + Application + true + Unicode + v140 + + + Application + false + true + Unicode + v140 + + + Application + false + true + Unicode + v140 + + + + + + + + + + + + + + + + + + + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + + + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + + + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + + + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + + + + Level4 + Disabled + ..\..;..\..\backends;%(AdditionalIncludeDirectories) + ImTextureID=ImU64;_UNICODE;UNICODE;%(PreprocessorDefinitions) + /utf-8 %(AdditionalOptions) + + + true + d3d12.lib;d3dcompiler.lib;dxgi.lib;%(AdditionalDependencies) + %(AdditionalLibraryDirectories) + Console + + + + + Level4 + Disabled + ..\..;..\..\backends;%(AdditionalIncludeDirectories) + ImTextureID=ImU64;_UNICODE;UNICODE;%(PreprocessorDefinitions) + /utf-8 %(AdditionalOptions) + + + true + d3d12.lib;d3dcompiler.lib;dxgi.lib;%(AdditionalDependencies) + %(AdditionalLibraryDirectories) + Console + + + + + Level4 + MaxSpeed + true + true + ..\..;..\..\backends;%(AdditionalIncludeDirectories) + ImTextureID=ImU64;_UNICODE;UNICODE;%(PreprocessorDefinitions) + /utf-8 %(AdditionalOptions) + + + true + true + true + d3d12.lib;d3dcompiler.lib;dxgi.lib;%(AdditionalDependencies) + %(AdditionalLibraryDirectories) + Console + + + + + Level4 + MaxSpeed + true + true + ..\..;..\..\backends;%(AdditionalIncludeDirectories) + ImTextureID=ImU64;_UNICODE;UNICODE;%(PreprocessorDefinitions) + /utf-8 %(AdditionalOptions) + + + true + true + true + d3d12.lib;d3dcompiler.lib;dxgi.lib;%(AdditionalDependencies) + %(AdditionalLibraryDirectories) + Console + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/External/imgui-docking/examples/example_win32_directx12/example_win32_directx12.vcxproj.filters b/External/imgui-docking/examples/example_win32_directx12/example_win32_directx12.vcxproj.filters new file mode 100644 index 0000000..23a9952 --- /dev/null +++ b/External/imgui-docking/examples/example_win32_directx12/example_win32_directx12.vcxproj.filters @@ -0,0 +1,65 @@ + + + + + {fb3d294f-51ec-478e-a627-25831c80fefd} + + + {4f33ddea-9910-456d-b868-4267eb3c2b19} + + + + + imgui + + + imgui + + + imgui + + + sources + + + sources + + + + + imgui + + + sources + + + imgui + + + imgui + + + sources + + + sources + + + imgui + + + imgui + + + + + + imgui + + + + + imgui + + + \ No newline at end of file diff --git a/External/imgui-docking/examples/example_win32_directx12/main.cpp b/External/imgui-docking/examples/example_win32_directx12/main.cpp new file mode 100644 index 0000000..9479b43 --- /dev/null +++ b/External/imgui-docking/examples/example_win32_directx12/main.cpp @@ -0,0 +1,501 @@ +// Dear ImGui: standalone example application for DirectX 12 + +// Learn about Dear ImGui: +// - FAQ https://dearimgui.com/faq +// - Getting Started https://dearimgui.com/getting-started +// - Documentation https://dearimgui.com/docs (same as your local docs/ folder). +// - Introduction, links and more at the top of imgui.cpp + +// Important: to compile on 32-bit systems, the DirectX12 backend requires code to be compiled with '#define ImTextureID ImU64'. +// This is because we need ImTextureID to carry a 64-bit value and by default ImTextureID is defined as void*. +// This define is set in the example .vcxproj file and need to be replicated in your app or by adding it to your imconfig.h file. + +#include "imgui.h" +#include "imgui_impl_win32.h" +#include "imgui_impl_dx12.h" +#include +#include +#include + +#ifdef _DEBUG +#define DX12_ENABLE_DEBUG_LAYER +#endif + +#ifdef DX12_ENABLE_DEBUG_LAYER +#include +#pragma comment(lib, "dxguid.lib") +#endif + +#include "imgui_internal.h" + +struct FrameContext +{ + ID3D12CommandAllocator* CommandAllocator; + UINT64 FenceValue; +}; + +// Data +static int const NUM_FRAMES_IN_FLIGHT = 3; +static FrameContext g_frameContext[NUM_FRAMES_IN_FLIGHT] = {}; +static UINT g_frameIndex = 0; + +static int const NUM_BACK_BUFFERS = 3; +static ID3D12Device* g_pd3dDevice = nullptr; +static ID3D12DescriptorHeap* g_pd3dRtvDescHeap = nullptr; +static ID3D12DescriptorHeap* g_pd3dSrvDescHeap = nullptr; +static ID3D12CommandQueue* g_pd3dCommandQueue = nullptr; +static ID3D12GraphicsCommandList* g_pd3dCommandList = nullptr; +static ID3D12Fence* g_fence = nullptr; +static HANDLE g_fenceEvent = nullptr; +static UINT64 g_fenceLastSignaledValue = 0; +static IDXGISwapChain3* g_pSwapChain = nullptr; +static bool g_SwapChainOccluded = false; +static HANDLE g_hSwapChainWaitableObject = nullptr; +static ID3D12Resource* g_mainRenderTargetResource[NUM_BACK_BUFFERS] = {}; +static D3D12_CPU_DESCRIPTOR_HANDLE g_mainRenderTargetDescriptor[NUM_BACK_BUFFERS] = {}; + +// Forward declarations of helper functions +bool CreateDeviceD3D(HWND hWnd); +void CleanupDeviceD3D(); +void CreateRenderTarget(); +void CleanupRenderTarget(); +void WaitForLastSubmittedFrame(); +FrameContext* WaitForNextFrameResources(); +LRESULT WINAPI WndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam); + +// Main code +int main(int, char**) +{ + // Create application window + //ImGui_ImplWin32_EnableDpiAwareness(); + WNDCLASSEXW wc = { sizeof(wc), CS_CLASSDC, WndProc, 0L, 0L, GetModuleHandle(nullptr), nullptr, nullptr, nullptr, nullptr, L"ImGui Example", nullptr }; + ::RegisterClassExW(&wc); + HWND hwnd = ::CreateWindowW(wc.lpszClassName, L"Dear ImGui DirectX12 Example", WS_OVERLAPPEDWINDOW, 100, 100, 1280, 800, nullptr, nullptr, wc.hInstance, nullptr); + + // Initialize Direct3D + if (!CreateDeviceD3D(hwnd)) + { + CleanupDeviceD3D(); + ::UnregisterClassW(wc.lpszClassName, wc.hInstance); + return 1; + } + + // Show the window + ::ShowWindow(hwnd, SW_SHOWDEFAULT); + ::UpdateWindow(hwnd); + + // Setup Dear ImGui context + IMGUI_CHECKVERSION(); + ImGui::CreateContext(); + ImGuiIO& io = ImGui::GetIO(); (void)io; + io.ConfigFlags |= ImGuiConfigFlags_NavEnableKeyboard; // Enable Keyboard Controls + io.ConfigFlags |= ImGuiConfigFlags_NavEnableGamepad; // Enable Gamepad Controls + io.ConfigFlags |= ImGuiConfigFlags_DockingEnable; // Enable Docking + io.ConfigFlags |= ImGuiConfigFlags_ViewportsEnable; // Enable Multi-Viewport / Platform Windows + //io.ConfigViewportsNoAutoMerge = true; + //io.ConfigViewportsNoTaskBarIcon = true; + + // Setup Dear ImGui style + ImGui::StyleColorsDark(); + //ImGui::StyleColorsLight(); + + // When viewports are enabled we tweak WindowRounding/WindowBg so platform windows can look identical to regular ones. + ImGuiStyle& style = ImGui::GetStyle(); + if (io.ConfigFlags & ImGuiConfigFlags_ViewportsEnable) + { + style.WindowRounding = 0.0f; + style.Colors[ImGuiCol_WindowBg].w = 1.0f; + } + + // Setup Platform/Renderer backends + ImGui_ImplWin32_Init(hwnd); + ImGui_ImplDX12_Init(g_pd3dDevice, NUM_FRAMES_IN_FLIGHT, + DXGI_FORMAT_R8G8B8A8_UNORM, g_pd3dSrvDescHeap, + g_pd3dSrvDescHeap->GetCPUDescriptorHandleForHeapStart(), + g_pd3dSrvDescHeap->GetGPUDescriptorHandleForHeapStart()); + + // Load Fonts + // - If no fonts are loaded, dear imgui will use the default font. You can also load multiple fonts and use ImGui::PushFont()/PopFont() to select them. + // - AddFontFromFileTTF() will return the ImFont* so you can store it if you need to select the font among multiple. + // - If the file cannot be loaded, the function will return a nullptr. Please handle those errors in your application (e.g. use an assertion, or display an error and quit). + // - The fonts will be rasterized at a given size (w/ oversampling) and stored into a texture when calling ImFontAtlas::Build()/GetTexDataAsXXXX(), which ImGui_ImplXXXX_NewFrame below will call. + // - Use '#define IMGUI_ENABLE_FREETYPE' in your imconfig file to use Freetype for higher quality font rendering. + // - Read 'docs/FONTS.md' for more instructions and details. + // - Remember that in C/C++ if you want to include a backslash \ in a string literal you need to write a double backslash \\ ! + //io.Fonts->AddFontDefault(); + //io.Fonts->AddFontFromFileTTF("c:\\Windows\\Fonts\\segoeui.ttf", 18.0f); + //io.Fonts->AddFontFromFileTTF("../../misc/fonts/DroidSans.ttf", 16.0f); + //io.Fonts->AddFontFromFileTTF("../../misc/fonts/Roboto-Medium.ttf", 16.0f); + //io.Fonts->AddFontFromFileTTF("../../misc/fonts/Cousine-Regular.ttf", 15.0f); + //ImFont* font = io.Fonts->AddFontFromFileTTF("c:\\Windows\\Fonts\\ArialUni.ttf", 18.0f, nullptr, io.Fonts->GetGlyphRangesJapanese()); + //IM_ASSERT(font != nullptr); + + // Our state + bool show_demo_window = true; + bool show_another_window = false; + ImVec4 clear_color = ImVec4(0.45f, 0.55f, 0.60f, 1.00f); + + // Main loop + bool done = false; + while (!done) + { + // Poll and handle messages (inputs, window resize, etc.) + // See the WndProc() function below for our to dispatch events to the Win32 backend. + MSG msg; + while (::PeekMessage(&msg, nullptr, 0U, 0U, PM_REMOVE)) + { + ::TranslateMessage(&msg); + ::DispatchMessage(&msg); + if (msg.message == WM_QUIT) + done = true; + } + if (done) + break; + + // Handle window screen locked + if (g_SwapChainOccluded && g_pSwapChain->Present(0, DXGI_PRESENT_TEST) == DXGI_STATUS_OCCLUDED) + { + ::Sleep(10); + continue; + } + g_SwapChainOccluded = false; + + // Start the Dear ImGui frame + ImGui_ImplDX12_NewFrame(); + ImGui_ImplWin32_NewFrame(); + ImGui::NewFrame(); + + // 1. Show the big demo window (Most of the sample code is in ImGui::ShowDemoWindow()! You can browse its code to learn more about Dear ImGui!). + if (show_demo_window) + ImGui::ShowDemoWindow(&show_demo_window); + + // 2. Show a simple window that we create ourselves. We use a Begin/End pair to create a named window. + { + static float f = 0.0f; + static int counter = 0; + + ImGui::Begin("Hello, world!"); // Create a window called "Hello, world!" and append into it. + + ImGui::Text("This is some useful text."); // Display some text (you can use a format strings too) + ImGui::Checkbox("Demo Window", &show_demo_window); // Edit bools storing our window open/close state + ImGui::Checkbox("Another Window", &show_another_window); + + ImGui::SliderFloat("float", &f, 0.0f, 1.0f); // Edit 1 float using a slider from 0.0f to 1.0f + ImGui::ColorEdit3("clear color", (float*)&clear_color); // Edit 3 floats representing a color + + if (ImGui::Button("Button")) // Buttons return true when clicked (most widgets return true when edited/activated) + counter++; + ImGui::SameLine(); + ImGui::Text("counter = %d", counter); + + ImGui::Text("Application average %.3f ms/frame (%.1f FPS)", 1000.0f / io.Framerate, io.Framerate); + ImGui::End(); + } + + // 3. Show another simple window. + if (show_another_window) + { + ImGui::Begin("Another Window", &show_another_window); // Pass a pointer to our bool variable (the window will have a closing button that will clear the bool when clicked) + ImGui::Text("Hello from another window!"); + if (ImGui::Button("Close Me")) + show_another_window = false; + ImGui::End(); + } + + // Rendering + ImGui::Render(); + + FrameContext* frameCtx = WaitForNextFrameResources(); + UINT backBufferIdx = g_pSwapChain->GetCurrentBackBufferIndex(); + frameCtx->CommandAllocator->Reset(); + + D3D12_RESOURCE_BARRIER barrier = {}; + barrier.Type = D3D12_RESOURCE_BARRIER_TYPE_TRANSITION; + barrier.Flags = D3D12_RESOURCE_BARRIER_FLAG_NONE; + barrier.Transition.pResource = g_mainRenderTargetResource[backBufferIdx]; + barrier.Transition.Subresource = D3D12_RESOURCE_BARRIER_ALL_SUBRESOURCES; + barrier.Transition.StateBefore = D3D12_RESOURCE_STATE_PRESENT; + barrier.Transition.StateAfter = D3D12_RESOURCE_STATE_RENDER_TARGET; + g_pd3dCommandList->Reset(frameCtx->CommandAllocator, nullptr); + g_pd3dCommandList->ResourceBarrier(1, &barrier); + + // Render Dear ImGui graphics + const float clear_color_with_alpha[4] = { clear_color.x * clear_color.w, clear_color.y * clear_color.w, clear_color.z * clear_color.w, clear_color.w }; + g_pd3dCommandList->ClearRenderTargetView(g_mainRenderTargetDescriptor[backBufferIdx], clear_color_with_alpha, 0, nullptr); + g_pd3dCommandList->OMSetRenderTargets(1, &g_mainRenderTargetDescriptor[backBufferIdx], FALSE, nullptr); + g_pd3dCommandList->SetDescriptorHeaps(1, &g_pd3dSrvDescHeap); + ImGui_ImplDX12_RenderDrawData(ImGui::GetDrawData(), g_pd3dCommandList); + barrier.Transition.StateBefore = D3D12_RESOURCE_STATE_RENDER_TARGET; + barrier.Transition.StateAfter = D3D12_RESOURCE_STATE_PRESENT; + g_pd3dCommandList->ResourceBarrier(1, &barrier); + g_pd3dCommandList->Close(); + + g_pd3dCommandQueue->ExecuteCommandLists(1, (ID3D12CommandList* const*)&g_pd3dCommandList); + + // Update and Render additional Platform Windows + if (io.ConfigFlags & ImGuiConfigFlags_ViewportsEnable) + { + ImGui::UpdatePlatformWindows(); + ImGui::RenderPlatformWindowsDefault(nullptr, (void*)g_pd3dCommandList); + } + + // Present + HRESULT hr = g_pSwapChain->Present(1, 0); // Present with vsync + //HRESULT hr = g_pSwapChain->Present(0, 0); // Present without vsync + g_SwapChainOccluded = (hr == DXGI_STATUS_OCCLUDED); + + UINT64 fenceValue = g_fenceLastSignaledValue + 1; + g_pd3dCommandQueue->Signal(g_fence, fenceValue); + g_fenceLastSignaledValue = fenceValue; + frameCtx->FenceValue = fenceValue; + } + + WaitForLastSubmittedFrame(); + + // Cleanup + ImGui_ImplDX12_Shutdown(); + ImGui_ImplWin32_Shutdown(); + ImGui::DestroyContext(); + + CleanupDeviceD3D(); + ::DestroyWindow(hwnd); + ::UnregisterClassW(wc.lpszClassName, wc.hInstance); + + return 0; +} + +// Helper functions +bool CreateDeviceD3D(HWND hWnd) +{ + // Setup swap chain + DXGI_SWAP_CHAIN_DESC1 sd; + { + ZeroMemory(&sd, sizeof(sd)); + sd.BufferCount = NUM_BACK_BUFFERS; + sd.Width = 0; + sd.Height = 0; + sd.Format = DXGI_FORMAT_R8G8B8A8_UNORM; + sd.Flags = DXGI_SWAP_CHAIN_FLAG_FRAME_LATENCY_WAITABLE_OBJECT; + sd.BufferUsage = DXGI_USAGE_RENDER_TARGET_OUTPUT; + sd.SampleDesc.Count = 1; + sd.SampleDesc.Quality = 0; + sd.SwapEffect = DXGI_SWAP_EFFECT_FLIP_DISCARD; + sd.AlphaMode = DXGI_ALPHA_MODE_UNSPECIFIED; + sd.Scaling = DXGI_SCALING_STRETCH; + sd.Stereo = FALSE; + } + + // [DEBUG] Enable debug interface +#ifdef DX12_ENABLE_DEBUG_LAYER + ID3D12Debug* pdx12Debug = nullptr; + if (SUCCEEDED(D3D12GetDebugInterface(IID_PPV_ARGS(&pdx12Debug)))) + pdx12Debug->EnableDebugLayer(); +#endif + + // Create device + D3D_FEATURE_LEVEL featureLevel = D3D_FEATURE_LEVEL_11_0; + if (D3D12CreateDevice(nullptr, featureLevel, IID_PPV_ARGS(&g_pd3dDevice)) != S_OK) + return false; + + // [DEBUG] Setup debug interface to break on any warnings/errors +#ifdef DX12_ENABLE_DEBUG_LAYER + if (pdx12Debug != nullptr) + { + ID3D12InfoQueue* pInfoQueue = nullptr; + g_pd3dDevice->QueryInterface(IID_PPV_ARGS(&pInfoQueue)); + pInfoQueue->SetBreakOnSeverity(D3D12_MESSAGE_SEVERITY_ERROR, true); + pInfoQueue->SetBreakOnSeverity(D3D12_MESSAGE_SEVERITY_CORRUPTION, true); + pInfoQueue->SetBreakOnSeverity(D3D12_MESSAGE_SEVERITY_WARNING, true); + pInfoQueue->Release(); + pdx12Debug->Release(); + } +#endif + + { + D3D12_DESCRIPTOR_HEAP_DESC desc = {}; + desc.Type = D3D12_DESCRIPTOR_HEAP_TYPE_RTV; + desc.NumDescriptors = NUM_BACK_BUFFERS; + desc.Flags = D3D12_DESCRIPTOR_HEAP_FLAG_NONE; + desc.NodeMask = 1; + if (g_pd3dDevice->CreateDescriptorHeap(&desc, IID_PPV_ARGS(&g_pd3dRtvDescHeap)) != S_OK) + return false; + + SIZE_T rtvDescriptorSize = g_pd3dDevice->GetDescriptorHandleIncrementSize(D3D12_DESCRIPTOR_HEAP_TYPE_RTV); + D3D12_CPU_DESCRIPTOR_HANDLE rtvHandle = g_pd3dRtvDescHeap->GetCPUDescriptorHandleForHeapStart(); + for (UINT i = 0; i < NUM_BACK_BUFFERS; i++) + { + g_mainRenderTargetDescriptor[i] = rtvHandle; + rtvHandle.ptr += rtvDescriptorSize; + } + } + + { + D3D12_DESCRIPTOR_HEAP_DESC desc = {}; + desc.Type = D3D12_DESCRIPTOR_HEAP_TYPE_CBV_SRV_UAV; + desc.NumDescriptors = 1; + desc.Flags = D3D12_DESCRIPTOR_HEAP_FLAG_SHADER_VISIBLE; + if (g_pd3dDevice->CreateDescriptorHeap(&desc, IID_PPV_ARGS(&g_pd3dSrvDescHeap)) != S_OK) + return false; + } + + { + D3D12_COMMAND_QUEUE_DESC desc = {}; + desc.Type = D3D12_COMMAND_LIST_TYPE_DIRECT; + desc.Flags = D3D12_COMMAND_QUEUE_FLAG_NONE; + desc.NodeMask = 1; + if (g_pd3dDevice->CreateCommandQueue(&desc, IID_PPV_ARGS(&g_pd3dCommandQueue)) != S_OK) + return false; + } + + for (UINT i = 0; i < NUM_FRAMES_IN_FLIGHT; i++) + if (g_pd3dDevice->CreateCommandAllocator(D3D12_COMMAND_LIST_TYPE_DIRECT, IID_PPV_ARGS(&g_frameContext[i].CommandAllocator)) != S_OK) + return false; + + if (g_pd3dDevice->CreateCommandList(0, D3D12_COMMAND_LIST_TYPE_DIRECT, g_frameContext[0].CommandAllocator, nullptr, IID_PPV_ARGS(&g_pd3dCommandList)) != S_OK || + g_pd3dCommandList->Close() != S_OK) + return false; + + if (g_pd3dDevice->CreateFence(0, D3D12_FENCE_FLAG_NONE, IID_PPV_ARGS(&g_fence)) != S_OK) + return false; + + g_fenceEvent = CreateEvent(nullptr, FALSE, FALSE, nullptr); + if (g_fenceEvent == nullptr) + return false; + + { + IDXGIFactory4* dxgiFactory = nullptr; + IDXGISwapChain1* swapChain1 = nullptr; + if (CreateDXGIFactory1(IID_PPV_ARGS(&dxgiFactory)) != S_OK) + return false; + if (dxgiFactory->CreateSwapChainForHwnd(g_pd3dCommandQueue, hWnd, &sd, nullptr, nullptr, &swapChain1) != S_OK) + return false; + if (swapChain1->QueryInterface(IID_PPV_ARGS(&g_pSwapChain)) != S_OK) + return false; + swapChain1->Release(); + dxgiFactory->Release(); + g_pSwapChain->SetMaximumFrameLatency(NUM_BACK_BUFFERS); + g_hSwapChainWaitableObject = g_pSwapChain->GetFrameLatencyWaitableObject(); + } + + CreateRenderTarget(); + return true; +} + +void CleanupDeviceD3D() +{ + CleanupRenderTarget(); + if (g_pSwapChain) { g_pSwapChain->SetFullscreenState(false, nullptr); g_pSwapChain->Release(); g_pSwapChain = nullptr; } + if (g_hSwapChainWaitableObject != nullptr) { CloseHandle(g_hSwapChainWaitableObject); } + for (UINT i = 0; i < NUM_FRAMES_IN_FLIGHT; i++) + if (g_frameContext[i].CommandAllocator) { g_frameContext[i].CommandAllocator->Release(); g_frameContext[i].CommandAllocator = nullptr; } + if (g_pd3dCommandQueue) { g_pd3dCommandQueue->Release(); g_pd3dCommandQueue = nullptr; } + if (g_pd3dCommandList) { g_pd3dCommandList->Release(); g_pd3dCommandList = nullptr; } + if (g_pd3dRtvDescHeap) { g_pd3dRtvDescHeap->Release(); g_pd3dRtvDescHeap = nullptr; } + if (g_pd3dSrvDescHeap) { g_pd3dSrvDescHeap->Release(); g_pd3dSrvDescHeap = nullptr; } + if (g_fence) { g_fence->Release(); g_fence = nullptr; } + if (g_fenceEvent) { CloseHandle(g_fenceEvent); g_fenceEvent = nullptr; } + if (g_pd3dDevice) { g_pd3dDevice->Release(); g_pd3dDevice = nullptr; } + +#ifdef DX12_ENABLE_DEBUG_LAYER + IDXGIDebug1* pDebug = nullptr; + if (SUCCEEDED(DXGIGetDebugInterface1(0, IID_PPV_ARGS(&pDebug)))) + { + pDebug->ReportLiveObjects(DXGI_DEBUG_ALL, DXGI_DEBUG_RLO_SUMMARY); + pDebug->Release(); + } +#endif +} + +void CreateRenderTarget() +{ + for (UINT i = 0; i < NUM_BACK_BUFFERS; i++) + { + ID3D12Resource* pBackBuffer = nullptr; + g_pSwapChain->GetBuffer(i, IID_PPV_ARGS(&pBackBuffer)); + g_pd3dDevice->CreateRenderTargetView(pBackBuffer, nullptr, g_mainRenderTargetDescriptor[i]); + g_mainRenderTargetResource[i] = pBackBuffer; + } +} + +void CleanupRenderTarget() +{ + WaitForLastSubmittedFrame(); + + for (UINT i = 0; i < NUM_BACK_BUFFERS; i++) + if (g_mainRenderTargetResource[i]) { g_mainRenderTargetResource[i]->Release(); g_mainRenderTargetResource[i] = nullptr; } +} + +void WaitForLastSubmittedFrame() +{ + FrameContext* frameCtx = &g_frameContext[g_frameIndex % NUM_FRAMES_IN_FLIGHT]; + + UINT64 fenceValue = frameCtx->FenceValue; + if (fenceValue == 0) + return; // No fence was signaled + + frameCtx->FenceValue = 0; + if (g_fence->GetCompletedValue() >= fenceValue) + return; + + g_fence->SetEventOnCompletion(fenceValue, g_fenceEvent); + WaitForSingleObject(g_fenceEvent, INFINITE); +} + +FrameContext* WaitForNextFrameResources() +{ + UINT nextFrameIndex = g_frameIndex + 1; + g_frameIndex = nextFrameIndex; + + HANDLE waitableObjects[] = { g_hSwapChainWaitableObject, nullptr }; + DWORD numWaitableObjects = 1; + + FrameContext* frameCtx = &g_frameContext[nextFrameIndex % NUM_FRAMES_IN_FLIGHT]; + UINT64 fenceValue = frameCtx->FenceValue; + if (fenceValue != 0) // means no fence was signaled + { + frameCtx->FenceValue = 0; + g_fence->SetEventOnCompletion(fenceValue, g_fenceEvent); + waitableObjects[1] = g_fenceEvent; + numWaitableObjects = 2; + } + + WaitForMultipleObjects(numWaitableObjects, waitableObjects, TRUE, INFINITE); + + return frameCtx; +} + +// Forward declare message handler from imgui_impl_win32.cpp +extern IMGUI_IMPL_API LRESULT ImGui_ImplWin32_WndProcHandler(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam); + +// Win32 message handler +// You can read the io.WantCaptureMouse, io.WantCaptureKeyboard flags to tell if dear imgui wants to use your inputs. +// - When io.WantCaptureMouse is true, do not dispatch mouse input data to your main application, or clear/overwrite your copy of the mouse data. +// - When io.WantCaptureKeyboard is true, do not dispatch keyboard input data to your main application, or clear/overwrite your copy of the keyboard data. +// Generally you may always pass all inputs to dear imgui, and hide them from your application based on those two flags. +LRESULT WINAPI WndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam) +{ + if (ImGui_ImplWin32_WndProcHandler(hWnd, msg, wParam, lParam)) + return true; + + switch (msg) + { + case WM_SIZE: + if (g_pd3dDevice != nullptr && wParam != SIZE_MINIMIZED) + { + WaitForLastSubmittedFrame(); + CleanupRenderTarget(); + HRESULT result = g_pSwapChain->ResizeBuffers(0, (UINT)LOWORD(lParam), (UINT)HIWORD(lParam), DXGI_FORMAT_UNKNOWN, DXGI_SWAP_CHAIN_FLAG_FRAME_LATENCY_WAITABLE_OBJECT); + assert(SUCCEEDED(result) && "Failed to resize swapchain."); + CreateRenderTarget(); + } + return 0; + case WM_SYSCOMMAND: + if ((wParam & 0xfff0) == SC_KEYMENU) // Disable ALT application menu + return 0; + break; + case WM_DESTROY: + ::PostQuitMessage(0); + return 0; + } + return ::DefWindowProcW(hWnd, msg, wParam, lParam); +} diff --git a/External/imgui-docking/examples/example_win32_directx9/build_win32.bat b/External/imgui-docking/examples/example_win32_directx9/build_win32.bat new file mode 100644 index 0000000..ece5ea1 --- /dev/null +++ b/External/imgui-docking/examples/example_win32_directx9/build_win32.bat @@ -0,0 +1,8 @@ +@REM Build for Visual Studio compiler. Run your copy of vcvars32.bat or vcvarsall.bat to setup command-line compiler. +@set OUT_DIR=Debug +@set OUT_EXE=example_win32_directx9 +@set INCLUDES=/I..\.. /I..\..\backends /I "%DXSDK_DIR%/Include" +@set SOURCES=main.cpp ..\..\backends\imgui_impl_dx9.cpp ..\..\backends\imgui_impl_win32.cpp ..\..\imgui*.cpp +@set LIBS=/LIBPATH:"%DXSDK_DIR%/Lib/x86" d3d9.lib +mkdir %OUT_DIR% +cl /nologo /Zi /MD /utf-8 %INCLUDES% /D UNICODE /D _UNICODE %SOURCES% /Fe%OUT_DIR%/%OUT_EXE%.exe /Fo%OUT_DIR%/ /link %LIBS% diff --git a/External/imgui-docking/examples/example_win32_directx9/example_win32_directx9.vcxproj b/External/imgui-docking/examples/example_win32_directx9/example_win32_directx9.vcxproj new file mode 100644 index 0000000..8c3f995 --- /dev/null +++ b/External/imgui-docking/examples/example_win32_directx9/example_win32_directx9.vcxproj @@ -0,0 +1,176 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {4165A294-21F2-44CA-9B38-E3F935ABADF5} + example_win32_directx9 + 8.1 + + + + Application + true + Unicode + v140 + + + Application + true + Unicode + v140 + + + Application + false + true + Unicode + v140 + + + Application + false + true + Unicode + v140 + + + + + + + + + + + + + + + + + + + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + + + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + + + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + + + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + + + + Level4 + Disabled + ..\..;..\..\backends;%(AdditionalIncludeDirectories);$(DXSDK_DIR)Include; + /utf-8 %(AdditionalOptions) + + + true + $(DXSDK_DIR)/Lib/x86;%(AdditionalLibraryDirectories) + d3d9.lib;%(AdditionalDependencies) + Console + + + + + Level4 + Disabled + ..\..;..\..\backends;%(AdditionalIncludeDirectories);$(DXSDK_DIR)Include; + /utf-8 %(AdditionalOptions) + + + true + $(DXSDK_DIR)/Lib/x64;%(AdditionalLibraryDirectories) + d3d9.lib;%(AdditionalDependencies) + Console + + + + + Level4 + MaxSpeed + true + true + ..\..;..\..\backends;%(AdditionalIncludeDirectories);$(DXSDK_DIR)Include; + false + /utf-8 %(AdditionalOptions) + + + true + true + true + $(DXSDK_DIR)/Lib/x86;%(AdditionalLibraryDirectories) + d3d9.lib;%(AdditionalDependencies) + Console + + + + + Level4 + MaxSpeed + true + true + ..\..;..\..\backends;%(AdditionalIncludeDirectories);$(DXSDK_DIR)Include; + false + /utf-8 %(AdditionalOptions) + + + true + true + true + $(DXSDK_DIR)/Lib/x64;%(AdditionalLibraryDirectories) + d3d9.lib;%(AdditionalDependencies) + Console + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/External/imgui-docking/examples/example_win32_directx9/example_win32_directx9.vcxproj.filters b/External/imgui-docking/examples/example_win32_directx9/example_win32_directx9.vcxproj.filters new file mode 100644 index 0000000..5ed89d6 --- /dev/null +++ b/External/imgui-docking/examples/example_win32_directx9/example_win32_directx9.vcxproj.filters @@ -0,0 +1,64 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {a82cba23-9de0-45c2-b1e3-2eb1666702de} + + + + + sources + + + imgui + + + imgui + + + imgui + + + sources + + + sources + + + imgui + + + imgui + + + + + imgui + + + imgui + + + imgui + + + sources + + + sources + + + + + + imgui + + + imgui + + + \ No newline at end of file diff --git a/External/imgui-docking/examples/example_win32_directx9/main.cpp b/External/imgui-docking/examples/example_win32_directx9/main.cpp new file mode 100644 index 0000000..8063636 --- /dev/null +++ b/External/imgui-docking/examples/example_win32_directx9/main.cpp @@ -0,0 +1,296 @@ +// Dear ImGui: standalone example application for DirectX 9 + +// Learn about Dear ImGui: +// - FAQ https://dearimgui.com/faq +// - Getting Started https://dearimgui.com/getting-started +// - Documentation https://dearimgui.com/docs (same as your local docs/ folder). +// - Introduction, links and more at the top of imgui.cpp + +#include "imgui.h" +#include "imgui_impl_dx9.h" +#include "imgui_impl_win32.h" +#include +#include + +// Data +static LPDIRECT3D9 g_pD3D = nullptr; +static LPDIRECT3DDEVICE9 g_pd3dDevice = nullptr; +static bool g_DeviceLost = false; +static UINT g_ResizeWidth = 0, g_ResizeHeight = 0; +static D3DPRESENT_PARAMETERS g_d3dpp = {}; + +// Forward declarations of helper functions +bool CreateDeviceD3D(HWND hWnd); +void CleanupDeviceD3D(); +void ResetDevice(); +LRESULT WINAPI WndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam); + +// Main code +int main(int, char**) +{ + // Create application window + //ImGui_ImplWin32_EnableDpiAwareness(); + WNDCLASSEXW wc = { sizeof(wc), CS_CLASSDC, WndProc, 0L, 0L, GetModuleHandle(nullptr), nullptr, nullptr, nullptr, nullptr, L"ImGui Example", nullptr }; + ::RegisterClassExW(&wc); + HWND hwnd = ::CreateWindowW(wc.lpszClassName, L"Dear ImGui DirectX9 Example", WS_OVERLAPPEDWINDOW, 100, 100, 1280, 800, nullptr, nullptr, wc.hInstance, nullptr); + + // Initialize Direct3D + if (!CreateDeviceD3D(hwnd)) + { + CleanupDeviceD3D(); + ::UnregisterClassW(wc.lpszClassName, wc.hInstance); + return 1; + } + + // Show the window + ::ShowWindow(hwnd, SW_SHOWDEFAULT); + ::UpdateWindow(hwnd); + + // Setup Dear ImGui context + IMGUI_CHECKVERSION(); + ImGui::CreateContext(); + ImGuiIO& io = ImGui::GetIO(); (void)io; + io.ConfigFlags |= ImGuiConfigFlags_NavEnableKeyboard; // Enable Keyboard Controls + io.ConfigFlags |= ImGuiConfigFlags_NavEnableGamepad; // Enable Gamepad Controls + io.ConfigFlags |= ImGuiConfigFlags_DockingEnable; // Enable Docking + io.ConfigFlags |= ImGuiConfigFlags_ViewportsEnable; // Enable Multi-Viewport / Platform Windows + //io.ConfigViewportsNoAutoMerge = true; + //io.ConfigViewportsNoTaskBarIcon = true; + + // Setup Dear ImGui style + ImGui::StyleColorsDark(); + //ImGui::StyleColorsLight(); + + // When viewports are enabled we tweak WindowRounding/WindowBg so platform windows can look identical to regular ones. + ImGuiStyle& style = ImGui::GetStyle(); + if (io.ConfigFlags & ImGuiConfigFlags_ViewportsEnable) + { + style.WindowRounding = 0.0f; + style.Colors[ImGuiCol_WindowBg].w = 1.0f; + } + + // Setup Platform/Renderer backends + ImGui_ImplWin32_Init(hwnd); + ImGui_ImplDX9_Init(g_pd3dDevice); + + // Load Fonts + // - If no fonts are loaded, dear imgui will use the default font. You can also load multiple fonts and use ImGui::PushFont()/PopFont() to select them. + // - AddFontFromFileTTF() will return the ImFont* so you can store it if you need to select the font among multiple. + // - If the file cannot be loaded, the function will return a nullptr. Please handle those errors in your application (e.g. use an assertion, or display an error and quit). + // - The fonts will be rasterized at a given size (w/ oversampling) and stored into a texture when calling ImFontAtlas::Build()/GetTexDataAsXXXX(), which ImGui_ImplXXXX_NewFrame below will call. + // - Use '#define IMGUI_ENABLE_FREETYPE' in your imconfig file to use Freetype for higher quality font rendering. + // - Read 'docs/FONTS.md' for more instructions and details. + // - Remember that in C/C++ if you want to include a backslash \ in a string literal you need to write a double backslash \\ ! + //io.Fonts->AddFontDefault(); + //io.Fonts->AddFontFromFileTTF("c:\\Windows\\Fonts\\segoeui.ttf", 18.0f); + //io.Fonts->AddFontFromFileTTF("../../misc/fonts/DroidSans.ttf", 16.0f); + //io.Fonts->AddFontFromFileTTF("../../misc/fonts/Roboto-Medium.ttf", 16.0f); + //io.Fonts->AddFontFromFileTTF("../../misc/fonts/Cousine-Regular.ttf", 15.0f); + //ImFont* font = io.Fonts->AddFontFromFileTTF("c:\\Windows\\Fonts\\ArialUni.ttf", 18.0f, nullptr, io.Fonts->GetGlyphRangesJapanese()); + //IM_ASSERT(font != nullptr); + + // Our state + bool show_demo_window = true; + bool show_another_window = false; + ImVec4 clear_color = ImVec4(0.45f, 0.55f, 0.60f, 1.00f); + + // Main loop + bool done = false; + while (!done) + { + // Poll and handle messages (inputs, window resize, etc.) + // See the WndProc() function below for our to dispatch events to the Win32 backend. + MSG msg; + while (::PeekMessage(&msg, nullptr, 0U, 0U, PM_REMOVE)) + { + ::TranslateMessage(&msg); + ::DispatchMessage(&msg); + if (msg.message == WM_QUIT) + done = true; + } + if (done) + break; + + // Handle lost D3D9 device + if (g_DeviceLost) + { + HRESULT hr = g_pd3dDevice->TestCooperativeLevel(); + if (hr == D3DERR_DEVICELOST) + { + ::Sleep(10); + continue; + } + if (hr == D3DERR_DEVICENOTRESET) + ResetDevice(); + g_DeviceLost = false; + } + + // Handle window resize (we don't resize directly in the WM_SIZE handler) + if (g_ResizeWidth != 0 && g_ResizeHeight != 0) + { + g_d3dpp.BackBufferWidth = g_ResizeWidth; + g_d3dpp.BackBufferHeight = g_ResizeHeight; + g_ResizeWidth = g_ResizeHeight = 0; + ResetDevice(); + } + + // Start the Dear ImGui frame + ImGui_ImplDX9_NewFrame(); + ImGui_ImplWin32_NewFrame(); + ImGui::NewFrame(); + + // 1. Show the big demo window (Most of the sample code is in ImGui::ShowDemoWindow()! You can browse its code to learn more about Dear ImGui!). + if (show_demo_window) + ImGui::ShowDemoWindow(&show_demo_window); + + // 2. Show a simple window that we create ourselves. We use a Begin/End pair to create a named window. + { + static float f = 0.0f; + static int counter = 0; + + ImGui::Begin("Hello, world!"); // Create a window called "Hello, world!" and append into it. + + ImGui::Text("This is some useful text."); // Display some text (you can use a format strings too) + ImGui::Checkbox("Demo Window", &show_demo_window); // Edit bools storing our window open/close state + ImGui::Checkbox("Another Window", &show_another_window); + + ImGui::SliderFloat("float", &f, 0.0f, 1.0f); // Edit 1 float using a slider from 0.0f to 1.0f + ImGui::ColorEdit3("clear color", (float*)&clear_color); // Edit 3 floats representing a color + + if (ImGui::Button("Button")) // Buttons return true when clicked (most widgets return true when edited/activated) + counter++; + ImGui::SameLine(); + ImGui::Text("counter = %d", counter); + + ImGui::Text("Application average %.3f ms/frame (%.1f FPS)", 1000.0f / io.Framerate, io.Framerate); + ImGui::End(); + } + + // 3. Show another simple window. + if (show_another_window) + { + ImGui::Begin("Another Window", &show_another_window); // Pass a pointer to our bool variable (the window will have a closing button that will clear the bool when clicked) + ImGui::Text("Hello from another window!"); + if (ImGui::Button("Close Me")) + show_another_window = false; + ImGui::End(); + } + + // Rendering + ImGui::EndFrame(); + g_pd3dDevice->SetRenderState(D3DRS_ZENABLE, FALSE); + g_pd3dDevice->SetRenderState(D3DRS_ALPHABLENDENABLE, FALSE); + g_pd3dDevice->SetRenderState(D3DRS_SCISSORTESTENABLE, FALSE); + D3DCOLOR clear_col_dx = D3DCOLOR_RGBA((int)(clear_color.x*clear_color.w*255.0f), (int)(clear_color.y*clear_color.w*255.0f), (int)(clear_color.z*clear_color.w*255.0f), (int)(clear_color.w*255.0f)); + g_pd3dDevice->Clear(0, nullptr, D3DCLEAR_TARGET | D3DCLEAR_ZBUFFER, clear_col_dx, 1.0f, 0); + if (g_pd3dDevice->BeginScene() >= 0) + { + ImGui::Render(); + ImGui_ImplDX9_RenderDrawData(ImGui::GetDrawData()); + g_pd3dDevice->EndScene(); + } + + // Update and Render additional Platform Windows + if (io.ConfigFlags & ImGuiConfigFlags_ViewportsEnable) + { + ImGui::UpdatePlatformWindows(); + ImGui::RenderPlatformWindowsDefault(); + } + + HRESULT result = g_pd3dDevice->Present(nullptr, nullptr, nullptr, nullptr); + if (result == D3DERR_DEVICELOST) + g_DeviceLost = true; + } + + // Cleanup + ImGui_ImplDX9_Shutdown(); + ImGui_ImplWin32_Shutdown(); + ImGui::DestroyContext(); + + CleanupDeviceD3D(); + ::DestroyWindow(hwnd); + ::UnregisterClassW(wc.lpszClassName, wc.hInstance); + + return 0; +} + +// Helper functions +bool CreateDeviceD3D(HWND hWnd) +{ + if ((g_pD3D = Direct3DCreate9(D3D_SDK_VERSION)) == nullptr) + return false; + + // Create the D3DDevice + ZeroMemory(&g_d3dpp, sizeof(g_d3dpp)); + g_d3dpp.Windowed = TRUE; + g_d3dpp.SwapEffect = D3DSWAPEFFECT_DISCARD; + g_d3dpp.BackBufferFormat = D3DFMT_UNKNOWN; // Need to use an explicit format with alpha if needing per-pixel alpha composition. + g_d3dpp.EnableAutoDepthStencil = TRUE; + g_d3dpp.AutoDepthStencilFormat = D3DFMT_D16; + g_d3dpp.PresentationInterval = D3DPRESENT_INTERVAL_ONE; // Present with vsync + //g_d3dpp.PresentationInterval = D3DPRESENT_INTERVAL_IMMEDIATE; // Present without vsync, maximum unthrottled framerate + if (g_pD3D->CreateDevice(D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, hWnd, D3DCREATE_HARDWARE_VERTEXPROCESSING, &g_d3dpp, &g_pd3dDevice) < 0) + return false; + + return true; +} + +void CleanupDeviceD3D() +{ + if (g_pd3dDevice) { g_pd3dDevice->Release(); g_pd3dDevice = nullptr; } + if (g_pD3D) { g_pD3D->Release(); g_pD3D = nullptr; } +} + +void ResetDevice() +{ + ImGui_ImplDX9_InvalidateDeviceObjects(); + HRESULT hr = g_pd3dDevice->Reset(&g_d3dpp); + if (hr == D3DERR_INVALIDCALL) + IM_ASSERT(0); + ImGui_ImplDX9_CreateDeviceObjects(); +} + +#ifndef WM_DPICHANGED +#define WM_DPICHANGED 0x02E0 // From Windows SDK 8.1+ headers +#endif + +// Forward declare message handler from imgui_impl_win32.cpp +extern IMGUI_IMPL_API LRESULT ImGui_ImplWin32_WndProcHandler(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam); + +// Win32 message handler +// You can read the io.WantCaptureMouse, io.WantCaptureKeyboard flags to tell if dear imgui wants to use your inputs. +// - When io.WantCaptureMouse is true, do not dispatch mouse input data to your main application, or clear/overwrite your copy of the mouse data. +// - When io.WantCaptureKeyboard is true, do not dispatch keyboard input data to your main application, or clear/overwrite your copy of the keyboard data. +// Generally you may always pass all inputs to dear imgui, and hide them from your application based on those two flags. +LRESULT WINAPI WndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam) +{ + if (ImGui_ImplWin32_WndProcHandler(hWnd, msg, wParam, lParam)) + return true; + + switch (msg) + { + case WM_SIZE: + if (wParam == SIZE_MINIMIZED) + return 0; + g_ResizeWidth = (UINT)LOWORD(lParam); // Queue resize + g_ResizeHeight = (UINT)HIWORD(lParam); + return 0; + case WM_SYSCOMMAND: + if ((wParam & 0xfff0) == SC_KEYMENU) // Disable ALT application menu + return 0; + break; + case WM_DESTROY: + ::PostQuitMessage(0); + return 0; + case WM_DPICHANGED: + if (ImGui::GetIO().ConfigFlags & ImGuiConfigFlags_DpiEnableScaleViewports) + { + //const int dpi = HIWORD(wParam); + //printf("WM_DPICHANGED to %d (%.0f%%)\n", dpi, (float)dpi / 96.0f * 100.0f); + const RECT* suggested_rect = (RECT*)lParam; + ::SetWindowPos(hWnd, nullptr, suggested_rect->left, suggested_rect->top, suggested_rect->right - suggested_rect->left, suggested_rect->bottom - suggested_rect->top, SWP_NOZORDER | SWP_NOACTIVATE); + } + break; + } + return ::DefWindowProcW(hWnd, msg, wParam, lParam); +} diff --git a/External/imgui-docking/examples/example_win32_opengl3/build_win32.bat b/External/imgui-docking/examples/example_win32_opengl3/build_win32.bat new file mode 100644 index 0000000..48df080 --- /dev/null +++ b/External/imgui-docking/examples/example_win32_opengl3/build_win32.bat @@ -0,0 +1,8 @@ +@REM Build for Visual Studio compiler. Run your copy of vcvars32.bat or vcvarsall.bat to setup command-line compiler. +@set OUT_DIR=Debug +@set OUT_EXE=example_win32_opengl3 +@set INCLUDES=/I..\.. /I..\..\backends +@set SOURCES=main.cpp ..\..\backends\imgui_impl_opengl3.cpp ..\..\backends\imgui_impl_win32.cpp ..\..\imgui*.cpp +@set LIBS=opengl32.lib +mkdir %OUT_DIR% +cl /nologo /Zi /MD /utf-8 %INCLUDES% /D UNICODE /D _UNICODE %SOURCES% /Fe%OUT_DIR%/%OUT_EXE%.exe /Fo%OUT_DIR%/ /link %LIBS% diff --git a/External/imgui-docking/examples/example_win32_opengl3/example_win32_opengl3.vcxproj b/External/imgui-docking/examples/example_win32_opengl3/example_win32_opengl3.vcxproj new file mode 100644 index 0000000..98fc38f --- /dev/null +++ b/External/imgui-docking/examples/example_win32_opengl3/example_win32_opengl3.vcxproj @@ -0,0 +1,176 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {C624E5FF-D4FE-4D35-9164-B8A91864F98E} + example_win32_opengl2 + 8.1 + + + + Application + true + Unicode + v140 + + + Application + true + Unicode + v140 + + + Application + false + true + Unicode + v140 + + + Application + false + true + Unicode + v140 + + + + + + + + + + + + + + + + + + + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + + + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + + + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + + + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + + + + Level4 + Disabled + ..\..;..\..\backends; + /utf-8 %(AdditionalOptions) + + + true + %(AdditionalLibraryDirectories) + opengl32.lib;%(AdditionalDependencies) + Console + + + + + Level4 + Disabled + ..\..;..\..\backends; + /utf-8 %(AdditionalOptions) + + + true + %(AdditionalLibraryDirectories) + opengl32.lib;%(AdditionalDependencies) + Console + + + + + Level4 + MaxSpeed + true + true + ..\..;..\..\backends; + false + /utf-8 %(AdditionalOptions) + + + true + true + true + %(AdditionalLibraryDirectories) + opengl32.lib;%(AdditionalDependencies) + Console + + + + + Level4 + MaxSpeed + true + true + ..\..;..\..\backends; + false + /utf-8 %(AdditionalOptions) + + + true + true + true + %(AdditionalLibraryDirectories) + opengl32.lib;%(AdditionalDependencies) + Console + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/External/imgui-docking/examples/example_win32_opengl3/example_win32_opengl3.vcxproj.filters b/External/imgui-docking/examples/example_win32_opengl3/example_win32_opengl3.vcxproj.filters new file mode 100644 index 0000000..47ed299 --- /dev/null +++ b/External/imgui-docking/examples/example_win32_opengl3/example_win32_opengl3.vcxproj.filters @@ -0,0 +1,64 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {a82cba23-9de0-45c2-b1e3-2eb1666702de} + + + + + sources + + + imgui + + + imgui + + + imgui + + + imgui + + + sources + + + imgui + + + sources + + + + + imgui + + + imgui + + + imgui + + + sources + + + sources + + + sources + + + + + + sources + + + \ No newline at end of file diff --git a/External/imgui-docking/examples/example_win32_opengl3/main.cpp b/External/imgui-docking/examples/example_win32_opengl3/main.cpp new file mode 100644 index 0000000..a6af3fd --- /dev/null +++ b/External/imgui-docking/examples/example_win32_opengl3/main.cpp @@ -0,0 +1,308 @@ +// Dear ImGui: standalone example application for Win32 + OpenGL 3 + +// Learn about Dear ImGui: +// - FAQ https://dearimgui.com/faq +// - Getting Started https://dearimgui.com/getting-started +// - Documentation https://dearimgui.com/docs (same as your local docs/ folder). +// - Introduction, links and more at the top of imgui.cpp + +// This is provided for completeness, however it is strongly recommended you use OpenGL with SDL or GLFW. + +#include "imgui.h" +#include "imgui_impl_opengl3.h" +#include "imgui_impl_win32.h" +#ifndef WIN32_LEAN_AND_MEAN +#define WIN32_LEAN_AND_MEAN +#endif +#include +#include +#include + +// Data stored per platform window +struct WGL_WindowData { HDC hDC; }; + +// Data +static HGLRC g_hRC; +static WGL_WindowData g_MainWindow; +static int g_Width; +static int g_Height; + +// Forward declarations of helper functions +bool CreateDeviceWGL(HWND hWnd, WGL_WindowData* data); +void CleanupDeviceWGL(HWND hWnd, WGL_WindowData* data); +void ResetDeviceWGL(); +LRESULT WINAPI WndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam); + +// Support function for multi-viewports +// Unlike most other backend combination, we need specific hooks to combine Win32+OpenGL. +// We could in theory decide to support Win32-specific code in OpenGL backend via e.g. an hypothetical ImGui_ImplOpenGL3_InitForRawWin32(). +static void Hook_Renderer_CreateWindow(ImGuiViewport* viewport) +{ + assert(viewport->RendererUserData == NULL); + + WGL_WindowData* data = IM_NEW(WGL_WindowData); + CreateDeviceWGL((HWND)viewport->PlatformHandle, data); + viewport->RendererUserData = data; +} + +static void Hook_Renderer_DestroyWindow(ImGuiViewport* viewport) +{ + if (viewport->RendererUserData != NULL) + { + WGL_WindowData* data = (WGL_WindowData*)viewport->RendererUserData; + CleanupDeviceWGL((HWND)viewport->PlatformHandle, data); + IM_DELETE(data); + viewport->RendererUserData = NULL; + } +} + +static void Hook_Platform_RenderWindow(ImGuiViewport* viewport, void*) +{ + // Activate the platform window DC in the OpenGL rendering context + if (WGL_WindowData* data = (WGL_WindowData*)viewport->RendererUserData) + wglMakeCurrent(data->hDC, g_hRC); +} + +static void Hook_Renderer_SwapBuffers(ImGuiViewport* viewport, void*) +{ + if (WGL_WindowData* data = (WGL_WindowData*)viewport->RendererUserData) + ::SwapBuffers(data->hDC); +} + +// Main code +int main(int, char**) +{ + // Create application window + //ImGui_ImplWin32_EnableDpiAwareness(); + WNDCLASSEXW wc = { sizeof(wc), CS_OWNDC, WndProc, 0L, 0L, GetModuleHandle(nullptr), nullptr, nullptr, nullptr, nullptr, L"ImGui Example", nullptr }; + ::RegisterClassExW(&wc); + HWND hwnd = ::CreateWindowW(wc.lpszClassName, L"Dear ImGui Win32+OpenGL3 Example", WS_OVERLAPPEDWINDOW, 100, 100, 1280, 800, nullptr, nullptr, wc.hInstance, nullptr); + + // Initialize OpenGL + if (!CreateDeviceWGL(hwnd, &g_MainWindow)) + { + CleanupDeviceWGL(hwnd, &g_MainWindow); + ::DestroyWindow(hwnd); + ::UnregisterClassW(wc.lpszClassName, wc.hInstance); + return 1; + } + wglMakeCurrent(g_MainWindow.hDC, g_hRC); + + // Show the window + ::ShowWindow(hwnd, SW_SHOWDEFAULT); + ::UpdateWindow(hwnd); + + // Setup Dear ImGui context + IMGUI_CHECKVERSION(); + ImGui::CreateContext(); + ImGuiIO& io = ImGui::GetIO(); (void)io; + io.ConfigFlags |= ImGuiConfigFlags_NavEnableKeyboard; // Enable Keyboard Controls + io.ConfigFlags |= ImGuiConfigFlags_NavEnableGamepad; // Enable Gamepad Controls + io.ConfigFlags |= ImGuiConfigFlags_DockingEnable; // Enable Docking + io.ConfigFlags |= ImGuiConfigFlags_ViewportsEnable; // Enable Multi-Viewport / Platform Windows + + // Setup Dear ImGui style + ImGui::StyleColorsDark(); + //ImGui::StyleColorsClassic(); + + // When viewports are enabled we tweak WindowRounding/WindowBg so platform windows can look identical to regular ones. + ImGuiStyle& style = ImGui::GetStyle(); + if (io.ConfigFlags & ImGuiConfigFlags_ViewportsEnable) + { + style.WindowRounding = 0.0f; + style.Colors[ImGuiCol_WindowBg].w = 1.0f; + } + + // Setup Platform/Renderer backends + ImGui_ImplWin32_InitForOpenGL(hwnd); + ImGui_ImplOpenGL3_Init(); + + // Win32+GL needs specific hooks for viewport, as there are specific things needed to tie Win32 and GL api. + if (io.ConfigFlags & ImGuiConfigFlags_ViewportsEnable) + { + ImGuiPlatformIO& platform_io = ImGui::GetPlatformIO(); + IM_ASSERT(platform_io.Renderer_CreateWindow == NULL); + IM_ASSERT(platform_io.Renderer_DestroyWindow == NULL); + IM_ASSERT(platform_io.Renderer_SwapBuffers == NULL); + IM_ASSERT(platform_io.Platform_RenderWindow == NULL); + platform_io.Renderer_CreateWindow = Hook_Renderer_CreateWindow; + platform_io.Renderer_DestroyWindow = Hook_Renderer_DestroyWindow; + platform_io.Renderer_SwapBuffers = Hook_Renderer_SwapBuffers; + platform_io.Platform_RenderWindow = Hook_Platform_RenderWindow; + } + + // Load Fonts + // - If no fonts are loaded, dear imgui will use the default font. You can also load multiple fonts and use ImGui::PushFont()/PopFont() to select them. + // - AddFontFromFileTTF() will return the ImFont* so you can store it if you need to select the font among multiple. + // - If the file cannot be loaded, the function will return a nullptr. Please handle those errors in your application (e.g. use an assertion, or display an error and quit). + // - The fonts will be rasterized at a given size (w/ oversampling) and stored into a texture when calling ImFontAtlas::Build()/GetTexDataAsXXXX(), which ImGui_ImplXXXX_NewFrame below will call. + // - Use '#define IMGUI_ENABLE_FREETYPE' in your imconfig file to use Freetype for higher quality font rendering. + // - Read 'docs/FONTS.md' for more instructions and details. + // - Remember that in C/C++ if you want to include a backslash \ in a string literal you need to write a double backslash \\ ! + //io.Fonts->AddFontDefault(); + //io.Fonts->AddFontFromFileTTF("c:\\Windows\\Fonts\\segoeui.ttf", 18.0f); + //io.Fonts->AddFontFromFileTTF("../../misc/fonts/DroidSans.ttf", 16.0f); + //io.Fonts->AddFontFromFileTTF("../../misc/fonts/Roboto-Medium.ttf", 16.0f); + //io.Fonts->AddFontFromFileTTF("../../misc/fonts/Cousine-Regular.ttf", 15.0f); + //ImFont* font = io.Fonts->AddFontFromFileTTF("c:\\Windows\\Fonts\\ArialUni.ttf", 18.0f, nullptr, io.Fonts->GetGlyphRangesJapanese()); + //IM_ASSERT(font != nullptr); + + // Our state + bool show_demo_window = true; + bool show_another_window = false; + ImVec4 clear_color = ImVec4(0.45f, 0.55f, 0.60f, 1.00f); + + // Main loop + bool done = false; + while (!done) + { + // Poll and handle messages (inputs, window resize, etc.) + // See the WndProc() function below for our to dispatch events to the Win32 backend. + MSG msg; + while (::PeekMessage(&msg, nullptr, 0U, 0U, PM_REMOVE)) + { + ::TranslateMessage(&msg); + ::DispatchMessage(&msg); + if (msg.message == WM_QUIT) + done = true; + } + if (done) + break; + + // Start the Dear ImGui frame + ImGui_ImplOpenGL3_NewFrame(); + ImGui_ImplWin32_NewFrame(); + ImGui::NewFrame(); + + // 1. Show the big demo window (Most of the sample code is in ImGui::ShowDemoWindow()! You can browse its code to learn more about Dear ImGui!). + if (show_demo_window) + ImGui::ShowDemoWindow(&show_demo_window); + + // 2. Show a simple window that we create ourselves. We use a Begin/End pair to create a named window. + { + static float f = 0.0f; + static int counter = 0; + + ImGui::Begin("Hello, world!"); // Create a window called "Hello, world!" and append into it. + + ImGui::Text("This is some useful text."); // Display some text (you can use a format strings too) + ImGui::Checkbox("Demo Window", &show_demo_window); // Edit bools storing our window open/close state + ImGui::Checkbox("Another Window", &show_another_window); + + ImGui::SliderFloat("float", &f, 0.0f, 1.0f); // Edit 1 float using a slider from 0.0f to 1.0f + ImGui::ColorEdit3("clear color", (float*)&clear_color); // Edit 3 floats representing a color + + if (ImGui::Button("Button")) // Buttons return true when clicked (most widgets return true when edited/activated) + counter++; + ImGui::SameLine(); + ImGui::Text("counter = %d", counter); + + ImGui::Text("Application average %.3f ms/frame (%.1f FPS)", 1000.0f / io.Framerate, io.Framerate); + ImGui::End(); + } + + // 3. Show another simple window. + if (show_another_window) + { + ImGui::Begin("Another Window", &show_another_window); // Pass a pointer to our bool variable (the window will have a closing button that will clear the bool when clicked) + ImGui::Text("Hello from another window!"); + if (ImGui::Button("Close Me")) + show_another_window = false; + ImGui::End(); + } + + // Rendering + ImGui::Render(); + glViewport(0, 0, g_Width, g_Height); + glClearColor(clear_color.x, clear_color.y, clear_color.z, clear_color.w); + glClear(GL_COLOR_BUFFER_BIT); + ImGui_ImplOpenGL3_RenderDrawData(ImGui::GetDrawData()); + + // Update and Render additional Platform Windows + if (io.ConfigFlags & ImGuiConfigFlags_ViewportsEnable) + { + ImGui::UpdatePlatformWindows(); + ImGui::RenderPlatformWindowsDefault(); + + // Restore the OpenGL rendering context to the main window DC, since platform windows might have changed it. + wglMakeCurrent(g_MainWindow.hDC, g_hRC); + } + + // Present + ::SwapBuffers(g_MainWindow.hDC); + } + + ImGui_ImplOpenGL3_Shutdown(); + ImGui_ImplWin32_Shutdown(); + ImGui::DestroyContext(); + + CleanupDeviceWGL(hwnd, &g_MainWindow); + wglDeleteContext(g_hRC); + ::DestroyWindow(hwnd); + ::UnregisterClassW(wc.lpszClassName, wc.hInstance); + + return 0; +} + +// Helper functions +bool CreateDeviceWGL(HWND hWnd, WGL_WindowData* data) +{ + HDC hDc = ::GetDC(hWnd); + PIXELFORMATDESCRIPTOR pfd = { 0 }; + pfd.nSize = sizeof(pfd); + pfd.nVersion = 1; + pfd.dwFlags = PFD_DRAW_TO_WINDOW | PFD_SUPPORT_OPENGL | PFD_DOUBLEBUFFER; + pfd.iPixelType = PFD_TYPE_RGBA; + pfd.cColorBits = 32; + + const int pf = ::ChoosePixelFormat(hDc, &pfd); + if (pf == 0) + return false; + if (::SetPixelFormat(hDc, pf, &pfd) == FALSE) + return false; + ::ReleaseDC(hWnd, hDc); + + data->hDC = ::GetDC(hWnd); + if (!g_hRC) + g_hRC = wglCreateContext(data->hDC); + return true; +} + +void CleanupDeviceWGL(HWND hWnd, WGL_WindowData* data) +{ + wglMakeCurrent(nullptr, nullptr); + ::ReleaseDC(hWnd, data->hDC); +} + +// Forward declare message handler from imgui_impl_win32.cpp +extern IMGUI_IMPL_API LRESULT ImGui_ImplWin32_WndProcHandler(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam); + +// Win32 message handler +// You can read the io.WantCaptureMouse, io.WantCaptureKeyboard flags to tell if dear imgui wants to use your inputs. +// - When io.WantCaptureMouse is true, do not dispatch mouse input data to your main application, or clear/overwrite your copy of the mouse data. +// - When io.WantCaptureKeyboard is true, do not dispatch keyboard input data to your main application, or clear/overwrite your copy of the keyboard data. +// Generally you may always pass all inputs to dear imgui, and hide them from your application based on those two flags. +LRESULT WINAPI WndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam) +{ + if (ImGui_ImplWin32_WndProcHandler(hWnd, msg, wParam, lParam)) + return true; + + switch (msg) + { + case WM_SIZE: + if (wParam != SIZE_MINIMIZED) + { + g_Width = LOWORD(lParam); + g_Height = HIWORD(lParam); + } + return 0; + case WM_SYSCOMMAND: + if ((wParam & 0xfff0) == SC_KEYMENU) // Disable ALT application menu + return 0; + break; + case WM_DESTROY: + ::PostQuitMessage(0); + return 0; + } + return ::DefWindowProcW(hWnd, msg, wParam, lParam); +} diff --git a/External/imgui-docking/examples/imgui_examples.sln b/External/imgui-docking/examples/imgui_examples.sln new file mode 100644 index 0000000..9aee4a9 --- /dev/null +++ b/External/imgui-docking/examples/imgui_examples.sln @@ -0,0 +1,171 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.2.32616.157 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "example_win32_directx9", "example_win32_directx9\example_win32_directx9.vcxproj", "{4165A294-21F2-44CA-9B38-E3F935ABADF5}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "example_win32_directx10", "example_win32_directx10\example_win32_directx10.vcxproj", "{345A953E-A004-4648-B442-DC5F9F11068C}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "example_win32_directx11", "example_win32_directx11\example_win32_directx11.vcxproj", "{9F316E83-5AE5-4939-A723-305A94F48005}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "example_win32_directx12", "example_win32_directx12\example_win32_directx12.vcxproj", "{B4CF9797-519D-4AFE-A8F4-5141A6B521D3}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "example_glfw_opengl2", "example_glfw_opengl2\example_glfw_opengl2.vcxproj", "{9CDA7840-B7A5-496D-A527-E95571496D18}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "example_glfw_opengl3", "example_glfw_opengl3\example_glfw_opengl3.vcxproj", "{4A1FB5EA-22F5-42A8-AB92-1D2DF5D47FB9}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "example_glfw_vulkan", "example_glfw_vulkan\example_glfw_vulkan.vcxproj", "{57E2DF5A-6FC8-45BB-99DD-91A18C646E80}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "example_sdl2_directx11", "example_sdl2_directx11\example_sdl2_directx11.vcxproj", "{9E1987E3-1F19-45CA-B9C9-D31E791836D8}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "example_sdl2_opengl2", "example_sdl2_opengl2\example_sdl2_opengl2.vcxproj", "{2AE17FDE-F7F3-4CAC-ADAB-0710EDA4F741}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "example_sdl2_opengl3", "example_sdl2_opengl3\example_sdl2_opengl3.vcxproj", "{BBAEB705-1669-40F3-8567-04CF6A991F4C}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "example_sdl2_vulkan", "example_sdl2_vulkan\example_sdl2_vulkan.vcxproj", "{BAE3D0B5-9695-4EB1-AD0F-75890EB4A3B3}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "example_win32_opengl3", "example_win32_opengl3\example_win32_opengl3.vcxproj", "{C624E5FF-D4FE-4D35-9164-B8A91864F98E}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "example_sdl2_sdlrenderer2", "example_sdl2_sdlrenderer2\example_sdl2_sdlrenderer2.vcxproj", "{0C0B2BEA-311F-473C-9652-87923EF639E3}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "example_sdl3_opengl3", "example_sdl3_opengl3\example_sdl3_opengl3.vcxproj", "{84AAA301-84FE-428B-9E3E-817BC8123C0C}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "example_sdl3_sdlrenderer3", "example_sdl3_sdlrenderer3\example_sdl3_sdlrenderer3.vcxproj", "{C0290D21-3AD2-4A35-ABBC-A2F5F48326DA}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Debug|x64 = Debug|x64 + Release|Win32 = Release|Win32 + Release|x64 = Release|x64 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {4165A294-21F2-44CA-9B38-E3F935ABADF5}.Debug|Win32.ActiveCfg = Debug|Win32 + {4165A294-21F2-44CA-9B38-E3F935ABADF5}.Debug|Win32.Build.0 = Debug|Win32 + {4165A294-21F2-44CA-9B38-E3F935ABADF5}.Debug|x64.ActiveCfg = Debug|x64 + {4165A294-21F2-44CA-9B38-E3F935ABADF5}.Debug|x64.Build.0 = Debug|x64 + {4165A294-21F2-44CA-9B38-E3F935ABADF5}.Release|Win32.ActiveCfg = Release|Win32 + {4165A294-21F2-44CA-9B38-E3F935ABADF5}.Release|Win32.Build.0 = Release|Win32 + {4165A294-21F2-44CA-9B38-E3F935ABADF5}.Release|x64.ActiveCfg = Release|x64 + {4165A294-21F2-44CA-9B38-E3F935ABADF5}.Release|x64.Build.0 = Release|x64 + {345A953E-A004-4648-B442-DC5F9F11068C}.Debug|Win32.ActiveCfg = Debug|Win32 + {345A953E-A004-4648-B442-DC5F9F11068C}.Debug|Win32.Build.0 = Debug|Win32 + {345A953E-A004-4648-B442-DC5F9F11068C}.Debug|x64.ActiveCfg = Debug|x64 + {345A953E-A004-4648-B442-DC5F9F11068C}.Debug|x64.Build.0 = Debug|x64 + {345A953E-A004-4648-B442-DC5F9F11068C}.Release|Win32.ActiveCfg = Release|Win32 + {345A953E-A004-4648-B442-DC5F9F11068C}.Release|Win32.Build.0 = Release|Win32 + {345A953E-A004-4648-B442-DC5F9F11068C}.Release|x64.ActiveCfg = Release|x64 + {345A953E-A004-4648-B442-DC5F9F11068C}.Release|x64.Build.0 = Release|x64 + {9F316E83-5AE5-4939-A723-305A94F48005}.Debug|Win32.ActiveCfg = Debug|Win32 + {9F316E83-5AE5-4939-A723-305A94F48005}.Debug|Win32.Build.0 = Debug|Win32 + {9F316E83-5AE5-4939-A723-305A94F48005}.Debug|x64.ActiveCfg = Debug|x64 + {9F316E83-5AE5-4939-A723-305A94F48005}.Debug|x64.Build.0 = Debug|x64 + {9F316E83-5AE5-4939-A723-305A94F48005}.Release|Win32.ActiveCfg = Release|Win32 + {9F316E83-5AE5-4939-A723-305A94F48005}.Release|Win32.Build.0 = Release|Win32 + {9F316E83-5AE5-4939-A723-305A94F48005}.Release|x64.ActiveCfg = Release|x64 + {9F316E83-5AE5-4939-A723-305A94F48005}.Release|x64.Build.0 = Release|x64 + {B4CF9797-519D-4AFE-A8F4-5141A6B521D3}.Debug|Win32.ActiveCfg = Debug|Win32 + {B4CF9797-519D-4AFE-A8F4-5141A6B521D3}.Debug|Win32.Build.0 = Debug|Win32 + {B4CF9797-519D-4AFE-A8F4-5141A6B521D3}.Debug|x64.ActiveCfg = Debug|x64 + {B4CF9797-519D-4AFE-A8F4-5141A6B521D3}.Debug|x64.Build.0 = Debug|x64 + {B4CF9797-519D-4AFE-A8F4-5141A6B521D3}.Release|Win32.ActiveCfg = Release|Win32 + {B4CF9797-519D-4AFE-A8F4-5141A6B521D3}.Release|Win32.Build.0 = Release|Win32 + {B4CF9797-519D-4AFE-A8F4-5141A6B521D3}.Release|x64.ActiveCfg = Release|x64 + {B4CF9797-519D-4AFE-A8F4-5141A6B521D3}.Release|x64.Build.0 = Release|x64 + {9CDA7840-B7A5-496D-A527-E95571496D18}.Debug|Win32.ActiveCfg = Debug|Win32 + {9CDA7840-B7A5-496D-A527-E95571496D18}.Debug|Win32.Build.0 = Debug|Win32 + {9CDA7840-B7A5-496D-A527-E95571496D18}.Debug|x64.ActiveCfg = Debug|x64 + {9CDA7840-B7A5-496D-A527-E95571496D18}.Debug|x64.Build.0 = Debug|x64 + {9CDA7840-B7A5-496D-A527-E95571496D18}.Release|Win32.ActiveCfg = Release|Win32 + {9CDA7840-B7A5-496D-A527-E95571496D18}.Release|Win32.Build.0 = Release|Win32 + {9CDA7840-B7A5-496D-A527-E95571496D18}.Release|x64.ActiveCfg = Release|x64 + {9CDA7840-B7A5-496D-A527-E95571496D18}.Release|x64.Build.0 = Release|x64 + {4A1FB5EA-22F5-42A8-AB92-1D2DF5D47FB9}.Debug|Win32.ActiveCfg = Debug|Win32 + {4A1FB5EA-22F5-42A8-AB92-1D2DF5D47FB9}.Debug|Win32.Build.0 = Debug|Win32 + {4A1FB5EA-22F5-42A8-AB92-1D2DF5D47FB9}.Debug|x64.ActiveCfg = Debug|x64 + {4A1FB5EA-22F5-42A8-AB92-1D2DF5D47FB9}.Debug|x64.Build.0 = Debug|x64 + {4A1FB5EA-22F5-42A8-AB92-1D2DF5D47FB9}.Release|Win32.ActiveCfg = Release|Win32 + {4A1FB5EA-22F5-42A8-AB92-1D2DF5D47FB9}.Release|Win32.Build.0 = Release|Win32 + {4A1FB5EA-22F5-42A8-AB92-1D2DF5D47FB9}.Release|x64.ActiveCfg = Release|x64 + {4A1FB5EA-22F5-42A8-AB92-1D2DF5D47FB9}.Release|x64.Build.0 = Release|x64 + {57E2DF5A-6FC8-45BB-99DD-91A18C646E80}.Debug|Win32.ActiveCfg = Debug|Win32 + {57E2DF5A-6FC8-45BB-99DD-91A18C646E80}.Debug|Win32.Build.0 = Debug|Win32 + {57E2DF5A-6FC8-45BB-99DD-91A18C646E80}.Debug|x64.ActiveCfg = Debug|x64 + {57E2DF5A-6FC8-45BB-99DD-91A18C646E80}.Debug|x64.Build.0 = Debug|x64 + {57E2DF5A-6FC8-45BB-99DD-91A18C646E80}.Release|Win32.ActiveCfg = Release|Win32 + {57E2DF5A-6FC8-45BB-99DD-91A18C646E80}.Release|Win32.Build.0 = Release|Win32 + {57E2DF5A-6FC8-45BB-99DD-91A18C646E80}.Release|x64.ActiveCfg = Release|x64 + {57E2DF5A-6FC8-45BB-99DD-91A18C646E80}.Release|x64.Build.0 = Release|x64 + {9E1987E3-1F19-45CA-B9C9-D31E791836D8}.Debug|Win32.ActiveCfg = Debug|Win32 + {9E1987E3-1F19-45CA-B9C9-D31E791836D8}.Debug|Win32.Build.0 = Debug|Win32 + {9E1987E3-1F19-45CA-B9C9-D31E791836D8}.Debug|x64.ActiveCfg = Debug|x64 + {9E1987E3-1F19-45CA-B9C9-D31E791836D8}.Debug|x64.Build.0 = Debug|x64 + {9E1987E3-1F19-45CA-B9C9-D31E791836D8}.Release|Win32.ActiveCfg = Release|Win32 + {9E1987E3-1F19-45CA-B9C9-D31E791836D8}.Release|Win32.Build.0 = Release|Win32 + {9E1987E3-1F19-45CA-B9C9-D31E791836D8}.Release|x64.ActiveCfg = Release|x64 + {9E1987E3-1F19-45CA-B9C9-D31E791836D8}.Release|x64.Build.0 = Release|x64 + {2AE17FDE-F7F3-4CAC-ADAB-0710EDA4F741}.Debug|Win32.ActiveCfg = Debug|Win32 + {2AE17FDE-F7F3-4CAC-ADAB-0710EDA4F741}.Debug|Win32.Build.0 = Debug|Win32 + {2AE17FDE-F7F3-4CAC-ADAB-0710EDA4F741}.Debug|x64.ActiveCfg = Debug|x64 + {2AE17FDE-F7F3-4CAC-ADAB-0710EDA4F741}.Debug|x64.Build.0 = Debug|x64 + {2AE17FDE-F7F3-4CAC-ADAB-0710EDA4F741}.Release|Win32.ActiveCfg = Release|Win32 + {2AE17FDE-F7F3-4CAC-ADAB-0710EDA4F741}.Release|Win32.Build.0 = Release|Win32 + {2AE17FDE-F7F3-4CAC-ADAB-0710EDA4F741}.Release|x64.ActiveCfg = Release|x64 + {2AE17FDE-F7F3-4CAC-ADAB-0710EDA4F741}.Release|x64.Build.0 = Release|x64 + {BBAEB705-1669-40F3-8567-04CF6A991F4C}.Debug|Win32.ActiveCfg = Debug|Win32 + {BBAEB705-1669-40F3-8567-04CF6A991F4C}.Debug|Win32.Build.0 = Debug|Win32 + {BBAEB705-1669-40F3-8567-04CF6A991F4C}.Debug|x64.ActiveCfg = Debug|x64 + {BBAEB705-1669-40F3-8567-04CF6A991F4C}.Debug|x64.Build.0 = Debug|x64 + {BBAEB705-1669-40F3-8567-04CF6A991F4C}.Release|Win32.ActiveCfg = Release|Win32 + {BBAEB705-1669-40F3-8567-04CF6A991F4C}.Release|Win32.Build.0 = Release|Win32 + {BBAEB705-1669-40F3-8567-04CF6A991F4C}.Release|x64.ActiveCfg = Release|x64 + {BBAEB705-1669-40F3-8567-04CF6A991F4C}.Release|x64.Build.0 = Release|x64 + {BAE3D0B5-9695-4EB1-AD0F-75890EB4A3B3}.Debug|Win32.ActiveCfg = Debug|Win32 + {BAE3D0B5-9695-4EB1-AD0F-75890EB4A3B3}.Debug|Win32.Build.0 = Debug|Win32 + {BAE3D0B5-9695-4EB1-AD0F-75890EB4A3B3}.Debug|x64.ActiveCfg = Debug|x64 + {BAE3D0B5-9695-4EB1-AD0F-75890EB4A3B3}.Debug|x64.Build.0 = Debug|x64 + {BAE3D0B5-9695-4EB1-AD0F-75890EB4A3B3}.Release|Win32.ActiveCfg = Release|Win32 + {BAE3D0B5-9695-4EB1-AD0F-75890EB4A3B3}.Release|Win32.Build.0 = Release|Win32 + {BAE3D0B5-9695-4EB1-AD0F-75890EB4A3B3}.Release|x64.ActiveCfg = Release|x64 + {BAE3D0B5-9695-4EB1-AD0F-75890EB4A3B3}.Release|x64.Build.0 = Release|x64 + {C624E5FF-D4FE-4D35-9164-B8A91864F98E}.Debug|Win32.ActiveCfg = Debug|Win32 + {C624E5FF-D4FE-4D35-9164-B8A91864F98E}.Debug|Win32.Build.0 = Debug|Win32 + {C624E5FF-D4FE-4D35-9164-B8A91864F98E}.Debug|x64.ActiveCfg = Debug|x64 + {C624E5FF-D4FE-4D35-9164-B8A91864F98E}.Debug|x64.Build.0 = Debug|x64 + {C624E5FF-D4FE-4D35-9164-B8A91864F98E}.Release|Win32.ActiveCfg = Release|Win32 + {C624E5FF-D4FE-4D35-9164-B8A91864F98E}.Release|Win32.Build.0 = Release|Win32 + {C624E5FF-D4FE-4D35-9164-B8A91864F98E}.Release|x64.ActiveCfg = Release|x64 + {C624E5FF-D4FE-4D35-9164-B8A91864F98E}.Release|x64.Build.0 = Release|x64 + {0C0B2BEA-311F-473C-9652-87923EF639E3}.Debug|Win32.ActiveCfg = Debug|Win32 + {0C0B2BEA-311F-473C-9652-87923EF639E3}.Debug|Win32.Build.0 = Debug|Win32 + {0C0B2BEA-311F-473C-9652-87923EF639E3}.Debug|x64.ActiveCfg = Debug|x64 + {0C0B2BEA-311F-473C-9652-87923EF639E3}.Debug|x64.Build.0 = Debug|x64 + {0C0B2BEA-311F-473C-9652-87923EF639E3}.Release|Win32.ActiveCfg = Release|Win32 + {0C0B2BEA-311F-473C-9652-87923EF639E3}.Release|Win32.Build.0 = Release|Win32 + {0C0B2BEA-311F-473C-9652-87923EF639E3}.Release|x64.ActiveCfg = Release|x64 + {0C0B2BEA-311F-473C-9652-87923EF639E3}.Release|x64.Build.0 = Release|x64 + {84AAA301-84FE-428B-9E3E-817BC8123C0C}.Debug|Win32.ActiveCfg = Debug|Win32 + {84AAA301-84FE-428B-9E3E-817BC8123C0C}.Debug|Win32.Build.0 = Debug|Win32 + {84AAA301-84FE-428B-9E3E-817BC8123C0C}.Debug|x64.ActiveCfg = Debug|x64 + {84AAA301-84FE-428B-9E3E-817BC8123C0C}.Debug|x64.Build.0 = Debug|x64 + {84AAA301-84FE-428B-9E3E-817BC8123C0C}.Release|Win32.ActiveCfg = Release|Win32 + {84AAA301-84FE-428B-9E3E-817BC8123C0C}.Release|Win32.Build.0 = Release|Win32 + {84AAA301-84FE-428B-9E3E-817BC8123C0C}.Release|x64.ActiveCfg = Release|x64 + {84AAA301-84FE-428B-9E3E-817BC8123C0C}.Release|x64.Build.0 = Release|x64 + {C0290D21-3AD2-4A35-ABBC-A2F5F48326DA}.Debug|Win32.ActiveCfg = Debug|Win32 + {C0290D21-3AD2-4A35-ABBC-A2F5F48326DA}.Debug|Win32.Build.0 = Debug|Win32 + {C0290D21-3AD2-4A35-ABBC-A2F5F48326DA}.Debug|x64.ActiveCfg = Debug|x64 + {C0290D21-3AD2-4A35-ABBC-A2F5F48326DA}.Debug|x64.Build.0 = Debug|x64 + {C0290D21-3AD2-4A35-ABBC-A2F5F48326DA}.Release|Win32.ActiveCfg = Release|Win32 + {C0290D21-3AD2-4A35-ABBC-A2F5F48326DA}.Release|Win32.Build.0 = Release|Win32 + {C0290D21-3AD2-4A35-ABBC-A2F5F48326DA}.Release|x64.ActiveCfg = Release|x64 + {C0290D21-3AD2-4A35-ABBC-A2F5F48326DA}.Release|x64.Build.0 = Release|x64 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {B1ACFD20-A0A9-4A4C-ADBA-E7608F0E2BEE} + EndGlobalSection +EndGlobal diff --git a/External/imgui-docking/examples/libs/emscripten/emscripten_mainloop_stub.h b/External/imgui-docking/examples/libs/emscripten/emscripten_mainloop_stub.h new file mode 100644 index 0000000..05cf60f --- /dev/null +++ b/External/imgui-docking/examples/libs/emscripten/emscripten_mainloop_stub.h @@ -0,0 +1,37 @@ +// What does this file solves? +// - Since Dear ImGui 1.00 we took pride that most of our examples applications had their entire +// main-loop inside the main() function. That's because: +// - It makes the examples easier to read, keeping the code sequential. +// - It permit the use of local variables, making it easier to try things and perform quick +// changes when someone needs to quickly test something (vs having to structure the example +// in order to pass data around). This is very important because people use those examples +// to craft easy-to-past repro when they want to discuss features or report issues. +// - It conveys at a glance that this is a no-BS framework, it won't take your main loop away from you. +// - It is generally nice and elegant. +// - However, comes Emscripten... it is a wonderful and magical tech but it requires a "main loop" function. +// - Only some of our examples would run on Emscripten. Typically the ones rendering with GL or WGPU ones. +// - I tried to refactor those examples but felt it was problematic that other examples didn't follow the +// same layout. Why would the SDL+GL example be structured one way and the SGL+DX11 be structured differently? +// Especially as we are trying hard to convey that using a Dear ImGui backend in an *existing application* +// should requires only a few dozens lines of code, and this should be consistent and symmetrical for all backends. +// - So the next logical step was to refactor all examples to follow that layout of using a "main loop" function. +// This worked, but it made us lose all the nice things we had... + +// Since only about 3 examples really need to run with Emscripten, here's our solution: +// - Use some weird macros and capturing lambda to turn a loop in main() into a function. +// - Hide all that crap in this file so it doesn't make our examples unusually ugly. +// As a stance and principle of Dear ImGui development we don't use C++ headers and we don't +// want to suggest to the newcomer that we would ever use C++ headers as this would affect +// the initial judgment of many of our target audience. +// - Technique is based on this idea: https://github.com/ocornut/imgui/pull/2492/ +#ifdef __EMSCRIPTEN__ +#include +#include +static std::function MainLoopForEmscriptenP; +static void MainLoopForEmscripten() { MainLoopForEmscriptenP(); } +#define EMSCRIPTEN_MAINLOOP_BEGIN MainLoopForEmscriptenP = [&]() +#define EMSCRIPTEN_MAINLOOP_END ; emscripten_set_main_loop(MainLoopForEmscripten, 0, true) +#else +#define EMSCRIPTEN_MAINLOOP_BEGIN +#define EMSCRIPTEN_MAINLOOP_END +#endif diff --git a/External/imgui-docking/examples/libs/emscripten/shell_minimal.html b/External/imgui-docking/examples/libs/emscripten/shell_minimal.html new file mode 100644 index 0000000..bcf6262 --- /dev/null +++ b/External/imgui-docking/examples/libs/emscripten/shell_minimal.html @@ -0,0 +1,65 @@ + + + + + + Dear ImGui Emscripten example + + + + + + {{{ SCRIPT }}} + + diff --git a/External/imgui-docking/examples/libs/glfw/COPYING.txt b/External/imgui-docking/examples/libs/glfw/COPYING.txt new file mode 100644 index 0000000..b30c701 --- /dev/null +++ b/External/imgui-docking/examples/libs/glfw/COPYING.txt @@ -0,0 +1,22 @@ +Copyright (c) 2002-2006 Marcus Geelnard +Copyright (c) 2006-2010 Camilla Berglund + +This software is provided 'as-is', without any express or implied +warranty. In no event will the authors be held liable for any damages +arising from the use of this software. + +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it +freely, subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must not + claim that you wrote the original software. If you use this software + in a product, an acknowledgment in the product documentation would + be appreciated but is not required. + +2. Altered source versions must be plainly marked as such, and must not + be misrepresented as being the original software. + +3. This notice may not be removed or altered from any source + distribution. + diff --git a/External/imgui-docking/examples/libs/glfw/include/GLFW/glfw3.h b/External/imgui-docking/examples/libs/glfw/include/GLFW/glfw3.h new file mode 100644 index 0000000..f8ca3d6 --- /dev/null +++ b/External/imgui-docking/examples/libs/glfw/include/GLFW/glfw3.h @@ -0,0 +1,4227 @@ +/************************************************************************* + * GLFW 3.2 - www.glfw.org + * A library for OpenGL, window and input + *------------------------------------------------------------------------ + * Copyright (c) 2002-2006 Marcus Geelnard + * Copyright (c) 2006-2010 Camilla Berglund + * + * This software is provided 'as-is', without any express or implied + * warranty. In no event will the authors be held liable for any damages + * arising from the use of this software. + * + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it + * freely, subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not + * claim that you wrote the original software. If you use this software + * in a product, an acknowledgment in the product documentation would + * be appreciated but is not required. + * + * 2. Altered source versions must be plainly marked as such, and must not + * be misrepresented as being the original software. + * + * 3. This notice may not be removed or altered from any source + * distribution. + * + *************************************************************************/ + +#ifndef _glfw3_h_ +#define _glfw3_h_ + +#ifdef __cplusplus +extern "C" { +#endif + + +/************************************************************************* + * Doxygen documentation + *************************************************************************/ + +/*! @file glfw3.h + * @brief The header of the GLFW 3 API. + * + * This is the header file of the GLFW 3 API. It defines all its types and + * declares all its functions. + * + * For more information about how to use this file, see @ref build_include. + */ +/*! @defgroup context Context reference + * + * This is the reference documentation for OpenGL and OpenGL ES context related + * functions. For more task-oriented information, see the @ref context_guide. + */ +/*! @defgroup vulkan Vulkan reference + * + * This is the reference documentation for Vulkan related functions and types. + * For more task-oriented information, see the @ref vulkan_guide. + */ +/*! @defgroup init Initialization, version and error reference + * + * This is the reference documentation for initialization and termination of + * the library, version management and error handling. For more task-oriented + * information, see the @ref intro_guide. + */ +/*! @defgroup input Input reference + * + * This is the reference documentation for input related functions and types. + * For more task-oriented information, see the @ref input_guide. + */ +/*! @defgroup monitor Monitor reference + * + * This is the reference documentation for monitor related functions and types. + * For more task-oriented information, see the @ref monitor_guide. + */ +/*! @defgroup window Window reference + * + * This is the reference documentation for window related functions and types, + * including creation, deletion and event polling. For more task-oriented + * information, see the @ref window_guide. + */ + + +/************************************************************************* + * Compiler- and platform-specific preprocessor work + *************************************************************************/ + +/* If we are we on Windows, we want a single define for it. + */ +#if !defined(_WIN32) && (defined(__WIN32__) || defined(WIN32) || defined(__MINGW32__)) + #define _WIN32 +#endif /* _WIN32 */ + +/* It is customary to use APIENTRY for OpenGL function pointer declarations on + * all platforms. Additionally, the Windows OpenGL header needs APIENTRY. + */ +#ifndef APIENTRY + #ifdef _WIN32 + #define APIENTRY __stdcall + #else + #define APIENTRY + #endif +#endif /* APIENTRY */ + +/* Some Windows OpenGL headers need this. + */ +#if !defined(WINGDIAPI) && defined(_WIN32) + #define WINGDIAPI __declspec(dllimport) + #define GLFW_WINGDIAPI_DEFINED +#endif /* WINGDIAPI */ + +/* Some Windows GLU headers need this. + */ +#if !defined(CALLBACK) && defined(_WIN32) + #define CALLBACK __stdcall + #define GLFW_CALLBACK_DEFINED +#endif /* CALLBACK */ + +/* Most Windows GLU headers need wchar_t. + * The OS X OpenGL header blocks the definition of ptrdiff_t by glext.h. + * Include it unconditionally to avoid surprising side-effects. + */ +#include +#include + +/* Include the chosen client API headers. + */ +#if defined(__APPLE__) + #if defined(GLFW_INCLUDE_GLCOREARB) + #include + #if defined(GLFW_INCLUDE_GLEXT) + #include + #endif + #elif !defined(GLFW_INCLUDE_NONE) + #if !defined(GLFW_INCLUDE_GLEXT) + #define GL_GLEXT_LEGACY + #endif + #include + #endif + #if defined(GLFW_INCLUDE_GLU) + #include + #endif +#else + #if defined(GLFW_INCLUDE_GLCOREARB) + #include + #elif defined(GLFW_INCLUDE_ES1) + #include + #if defined(GLFW_INCLUDE_GLEXT) + #include + #endif + #elif defined(GLFW_INCLUDE_ES2) + #include + #if defined(GLFW_INCLUDE_GLEXT) + #include + #endif + #elif defined(GLFW_INCLUDE_ES3) + #include + #if defined(GLFW_INCLUDE_GLEXT) + #include + #endif + #elif defined(GLFW_INCLUDE_ES31) + #include + #if defined(GLFW_INCLUDE_GLEXT) + #include + #endif + #elif defined(GLFW_INCLUDE_VULKAN) + #include + #elif !defined(GLFW_INCLUDE_NONE) + #include + #if defined(GLFW_INCLUDE_GLEXT) + #include + #endif + #endif + #if defined(GLFW_INCLUDE_GLU) + #include + #endif +#endif + +#if defined(GLFW_DLL) && defined(_GLFW_BUILD_DLL) + /* GLFW_DLL must be defined by applications that are linking against the DLL + * version of the GLFW library. _GLFW_BUILD_DLL is defined by the GLFW + * configuration header when compiling the DLL version of the library. + */ + #error "You must not have both GLFW_DLL and _GLFW_BUILD_DLL defined" +#endif + +/* GLFWAPI is used to declare public API functions for export + * from the DLL / shared library / dynamic library. + */ +#if defined(_WIN32) && defined(_GLFW_BUILD_DLL) + /* We are building GLFW as a Win32 DLL */ + #define GLFWAPI __declspec(dllexport) +#elif defined(_WIN32) && defined(GLFW_DLL) + /* We are calling GLFW as a Win32 DLL */ + #define GLFWAPI __declspec(dllimport) +#elif defined(__GNUC__) && defined(_GLFW_BUILD_DLL) + /* We are building GLFW as a shared / dynamic library */ + #define GLFWAPI __attribute__((visibility("default"))) +#else + /* We are building or calling GLFW as a static library */ + #define GLFWAPI +#endif + + +/************************************************************************* + * GLFW API tokens + *************************************************************************/ + +/*! @name GLFW version macros + * @{ */ +/*! @brief The major version number of the GLFW library. + * + * This is incremented when the API is changed in non-compatible ways. + * @ingroup init + */ +#define GLFW_VERSION_MAJOR 3 +/*! @brief The minor version number of the GLFW library. + * + * This is incremented when features are added to the API but it remains + * backward-compatible. + * @ingroup init + */ +#define GLFW_VERSION_MINOR 2 +/*! @brief The revision number of the GLFW library. + * + * This is incremented when a bug fix release is made that does not contain any + * API changes. + * @ingroup init + */ +#define GLFW_VERSION_REVISION 0 +/*! @} */ + +/*! @name Boolean values + * @{ */ +/*! @brief One. + * + * One. Seriously. You don't _need_ to use this symbol in your code. It's + * just semantic sugar for the number 1. You can use `1` or `true` or `_True` + * or `GL_TRUE` or whatever you want. + */ +#define GLFW_TRUE 1 +/*! @brief Zero. + * + * Zero. Seriously. You don't _need_ to use this symbol in your code. It's + * just just semantic sugar for the number 0. You can use `0` or `false` or + * `_False` or `GL_FALSE` or whatever you want. + */ +#define GLFW_FALSE 0 +/*! @} */ + +/*! @name Key and button actions + * @{ */ +/*! @brief The key or mouse button was released. + * + * The key or mouse button was released. + * + * @ingroup input + */ +#define GLFW_RELEASE 0 +/*! @brief The key or mouse button was pressed. + * + * The key or mouse button was pressed. + * + * @ingroup input + */ +#define GLFW_PRESS 1 +/*! @brief The key was held down until it repeated. + * + * The key was held down until it repeated. + * + * @ingroup input + */ +#define GLFW_REPEAT 2 +/*! @} */ + +/*! @defgroup keys Keyboard keys + * + * See [key input](@ref input_key) for how these are used. + * + * These key codes are inspired by the _USB HID Usage Tables v1.12_ (p. 53-60), + * but re-arranged to map to 7-bit ASCII for printable keys (function keys are + * put in the 256+ range). + * + * The naming of the key codes follow these rules: + * - The US keyboard layout is used + * - Names of printable alpha-numeric characters are used (e.g. "A", "R", + * "3", etc.) + * - For non-alphanumeric characters, Unicode:ish names are used (e.g. + * "COMMA", "LEFT_SQUARE_BRACKET", etc.). Note that some names do not + * correspond to the Unicode standard (usually for brevity) + * - Keys that lack a clear US mapping are named "WORLD_x" + * - For non-printable keys, custom names are used (e.g. "F4", + * "BACKSPACE", etc.) + * + * @ingroup input + * @{ + */ + +/* The unknown key */ +#define GLFW_KEY_UNKNOWN -1 + +/* Printable keys */ +#define GLFW_KEY_SPACE 32 +#define GLFW_KEY_APOSTROPHE 39 /* ' */ +#define GLFW_KEY_COMMA 44 /* , */ +#define GLFW_KEY_MINUS 45 /* - */ +#define GLFW_KEY_PERIOD 46 /* . */ +#define GLFW_KEY_SLASH 47 /* / */ +#define GLFW_KEY_0 48 +#define GLFW_KEY_1 49 +#define GLFW_KEY_2 50 +#define GLFW_KEY_3 51 +#define GLFW_KEY_4 52 +#define GLFW_KEY_5 53 +#define GLFW_KEY_6 54 +#define GLFW_KEY_7 55 +#define GLFW_KEY_8 56 +#define GLFW_KEY_9 57 +#define GLFW_KEY_SEMICOLON 59 /* ; */ +#define GLFW_KEY_EQUAL 61 /* = */ +#define GLFW_KEY_A 65 +#define GLFW_KEY_B 66 +#define GLFW_KEY_C 67 +#define GLFW_KEY_D 68 +#define GLFW_KEY_E 69 +#define GLFW_KEY_F 70 +#define GLFW_KEY_G 71 +#define GLFW_KEY_H 72 +#define GLFW_KEY_I 73 +#define GLFW_KEY_J 74 +#define GLFW_KEY_K 75 +#define GLFW_KEY_L 76 +#define GLFW_KEY_M 77 +#define GLFW_KEY_N 78 +#define GLFW_KEY_O 79 +#define GLFW_KEY_P 80 +#define GLFW_KEY_Q 81 +#define GLFW_KEY_R 82 +#define GLFW_KEY_S 83 +#define GLFW_KEY_T 84 +#define GLFW_KEY_U 85 +#define GLFW_KEY_V 86 +#define GLFW_KEY_W 87 +#define GLFW_KEY_X 88 +#define GLFW_KEY_Y 89 +#define GLFW_KEY_Z 90 +#define GLFW_KEY_LEFT_BRACKET 91 /* [ */ +#define GLFW_KEY_BACKSLASH 92 /* \ */ +#define GLFW_KEY_RIGHT_BRACKET 93 /* ] */ +#define GLFW_KEY_GRAVE_ACCENT 96 /* ` */ +#define GLFW_KEY_WORLD_1 161 /* non-US #1 */ +#define GLFW_KEY_WORLD_2 162 /* non-US #2 */ + +/* Function keys */ +#define GLFW_KEY_ESCAPE 256 +#define GLFW_KEY_ENTER 257 +#define GLFW_KEY_TAB 258 +#define GLFW_KEY_BACKSPACE 259 +#define GLFW_KEY_INSERT 260 +#define GLFW_KEY_DELETE 261 +#define GLFW_KEY_RIGHT 262 +#define GLFW_KEY_LEFT 263 +#define GLFW_KEY_DOWN 264 +#define GLFW_KEY_UP 265 +#define GLFW_KEY_PAGE_UP 266 +#define GLFW_KEY_PAGE_DOWN 267 +#define GLFW_KEY_HOME 268 +#define GLFW_KEY_END 269 +#define GLFW_KEY_CAPS_LOCK 280 +#define GLFW_KEY_SCROLL_LOCK 281 +#define GLFW_KEY_NUM_LOCK 282 +#define GLFW_KEY_PRINT_SCREEN 283 +#define GLFW_KEY_PAUSE 284 +#define GLFW_KEY_F1 290 +#define GLFW_KEY_F2 291 +#define GLFW_KEY_F3 292 +#define GLFW_KEY_F4 293 +#define GLFW_KEY_F5 294 +#define GLFW_KEY_F6 295 +#define GLFW_KEY_F7 296 +#define GLFW_KEY_F8 297 +#define GLFW_KEY_F9 298 +#define GLFW_KEY_F10 299 +#define GLFW_KEY_F11 300 +#define GLFW_KEY_F12 301 +#define GLFW_KEY_F13 302 +#define GLFW_KEY_F14 303 +#define GLFW_KEY_F15 304 +#define GLFW_KEY_F16 305 +#define GLFW_KEY_F17 306 +#define GLFW_KEY_F18 307 +#define GLFW_KEY_F19 308 +#define GLFW_KEY_F20 309 +#define GLFW_KEY_F21 310 +#define GLFW_KEY_F22 311 +#define GLFW_KEY_F23 312 +#define GLFW_KEY_F24 313 +#define GLFW_KEY_F25 314 +#define GLFW_KEY_KP_0 320 +#define GLFW_KEY_KP_1 321 +#define GLFW_KEY_KP_2 322 +#define GLFW_KEY_KP_3 323 +#define GLFW_KEY_KP_4 324 +#define GLFW_KEY_KP_5 325 +#define GLFW_KEY_KP_6 326 +#define GLFW_KEY_KP_7 327 +#define GLFW_KEY_KP_8 328 +#define GLFW_KEY_KP_9 329 +#define GLFW_KEY_KP_DECIMAL 330 +#define GLFW_KEY_KP_DIVIDE 331 +#define GLFW_KEY_KP_MULTIPLY 332 +#define GLFW_KEY_KP_SUBTRACT 333 +#define GLFW_KEY_KP_ADD 334 +#define GLFW_KEY_KP_ENTER 335 +#define GLFW_KEY_KP_EQUAL 336 +#define GLFW_KEY_LEFT_SHIFT 340 +#define GLFW_KEY_LEFT_CONTROL 341 +#define GLFW_KEY_LEFT_ALT 342 +#define GLFW_KEY_LEFT_SUPER 343 +#define GLFW_KEY_RIGHT_SHIFT 344 +#define GLFW_KEY_RIGHT_CONTROL 345 +#define GLFW_KEY_RIGHT_ALT 346 +#define GLFW_KEY_RIGHT_SUPER 347 +#define GLFW_KEY_MENU 348 + +#define GLFW_KEY_LAST GLFW_KEY_MENU + +/*! @} */ + +/*! @defgroup mods Modifier key flags + * + * See [key input](@ref input_key) for how these are used. + * + * @ingroup input + * @{ */ + +/*! @brief If this bit is set one or more Shift keys were held down. + */ +#define GLFW_MOD_SHIFT 0x0001 +/*! @brief If this bit is set one or more Control keys were held down. + */ +#define GLFW_MOD_CONTROL 0x0002 +/*! @brief If this bit is set one or more Alt keys were held down. + */ +#define GLFW_MOD_ALT 0x0004 +/*! @brief If this bit is set one or more Super keys were held down. + */ +#define GLFW_MOD_SUPER 0x0008 + +/*! @} */ + +/*! @defgroup buttons Mouse buttons + * + * See [mouse button input](@ref input_mouse_button) for how these are used. + * + * @ingroup input + * @{ */ +#define GLFW_MOUSE_BUTTON_1 0 +#define GLFW_MOUSE_BUTTON_2 1 +#define GLFW_MOUSE_BUTTON_3 2 +#define GLFW_MOUSE_BUTTON_4 3 +#define GLFW_MOUSE_BUTTON_5 4 +#define GLFW_MOUSE_BUTTON_6 5 +#define GLFW_MOUSE_BUTTON_7 6 +#define GLFW_MOUSE_BUTTON_8 7 +#define GLFW_MOUSE_BUTTON_LAST GLFW_MOUSE_BUTTON_8 +#define GLFW_MOUSE_BUTTON_LEFT GLFW_MOUSE_BUTTON_1 +#define GLFW_MOUSE_BUTTON_RIGHT GLFW_MOUSE_BUTTON_2 +#define GLFW_MOUSE_BUTTON_MIDDLE GLFW_MOUSE_BUTTON_3 +/*! @} */ + +/*! @defgroup joysticks Joysticks + * + * See [joystick input](@ref joystick) for how these are used. + * + * @ingroup input + * @{ */ +#define GLFW_JOYSTICK_1 0 +#define GLFW_JOYSTICK_2 1 +#define GLFW_JOYSTICK_3 2 +#define GLFW_JOYSTICK_4 3 +#define GLFW_JOYSTICK_5 4 +#define GLFW_JOYSTICK_6 5 +#define GLFW_JOYSTICK_7 6 +#define GLFW_JOYSTICK_8 7 +#define GLFW_JOYSTICK_9 8 +#define GLFW_JOYSTICK_10 9 +#define GLFW_JOYSTICK_11 10 +#define GLFW_JOYSTICK_12 11 +#define GLFW_JOYSTICK_13 12 +#define GLFW_JOYSTICK_14 13 +#define GLFW_JOYSTICK_15 14 +#define GLFW_JOYSTICK_16 15 +#define GLFW_JOYSTICK_LAST GLFW_JOYSTICK_16 +/*! @} */ + +/*! @defgroup errors Error codes + * + * See [error handling](@ref error_handling) for how these are used. + * + * @ingroup init + * @{ */ +/*! @brief GLFW has not been initialized. + * + * This occurs if a GLFW function was called that must not be called unless the + * library is [initialized](@ref intro_init). + * + * @analysis Application programmer error. Initialize GLFW before calling any + * function that requires initialization. + */ +#define GLFW_NOT_INITIALIZED 0x00010001 +/*! @brief No context is current for this thread. + * + * This occurs if a GLFW function was called that needs and operates on the + * current OpenGL or OpenGL ES context but no context is current on the calling + * thread. One such function is @ref glfwSwapInterval. + * + * @analysis Application programmer error. Ensure a context is current before + * calling functions that require a current context. + */ +#define GLFW_NO_CURRENT_CONTEXT 0x00010002 +/*! @brief One of the arguments to the function was an invalid enum value. + * + * One of the arguments to the function was an invalid enum value, for example + * requesting [GLFW_RED_BITS](@ref window_hints_fb) with @ref + * glfwGetWindowAttrib. + * + * @analysis Application programmer error. Fix the offending call. + */ +#define GLFW_INVALID_ENUM 0x00010003 +/*! @brief One of the arguments to the function was an invalid value. + * + * One of the arguments to the function was an invalid value, for example + * requesting a non-existent OpenGL or OpenGL ES version like 2.7. + * + * Requesting a valid but unavailable OpenGL or OpenGL ES version will instead + * result in a @ref GLFW_VERSION_UNAVAILABLE error. + * + * @analysis Application programmer error. Fix the offending call. + */ +#define GLFW_INVALID_VALUE 0x00010004 +/*! @brief A memory allocation failed. + * + * A memory allocation failed. + * + * @analysis A bug in GLFW or the underlying operating system. Report the bug + * to our [issue tracker](https://github.com/glfw/glfw/issues). + */ +#define GLFW_OUT_OF_MEMORY 0x00010005 +/*! @brief GLFW could not find support for the requested API on the system. + * + * GLFW could not find support for the requested API on the system. + * + * @analysis The installed graphics driver does not support the requested + * API, or does not support it via the chosen context creation backend. + * Below are a few examples. + * + * @par + * Some pre-installed Windows graphics drivers do not support OpenGL. AMD only + * supports OpenGL ES via EGL, while Nvidia and Intel only support it via + * a WGL or GLX extension. OS X does not provide OpenGL ES at all. The Mesa + * EGL, OpenGL and OpenGL ES libraries do not interface with the Nvidia binary + * driver. Older graphics drivers do not support Vulkan. + */ +#define GLFW_API_UNAVAILABLE 0x00010006 +/*! @brief The requested OpenGL or OpenGL ES version is not available. + * + * The requested OpenGL or OpenGL ES version (including any requested context + * or framebuffer hints) is not available on this machine. + * + * @analysis The machine does not support your requirements. If your + * application is sufficiently flexible, downgrade your requirements and try + * again. Otherwise, inform the user that their machine does not match your + * requirements. + * + * @par + * Future invalid OpenGL and OpenGL ES versions, for example OpenGL 4.8 if 5.0 + * comes out before the 4.x series gets that far, also fail with this error and + * not @ref GLFW_INVALID_VALUE, because GLFW cannot know what future versions + * will exist. + */ +#define GLFW_VERSION_UNAVAILABLE 0x00010007 +/*! @brief A platform-specific error occurred that does not match any of the + * more specific categories. + * + * A platform-specific error occurred that does not match any of the more + * specific categories. + * + * @analysis A bug or configuration error in GLFW, the underlying operating + * system or its drivers, or a lack of required resources. Report the issue to + * our [issue tracker](https://github.com/glfw/glfw/issues). + */ +#define GLFW_PLATFORM_ERROR 0x00010008 +/*! @brief The requested format is not supported or available. + * + * If emitted during window creation, the requested pixel format is not + * supported. + * + * If emitted when querying the clipboard, the contents of the clipboard could + * not be converted to the requested format. + * + * @analysis If emitted during window creation, one or more + * [hard constraints](@ref window_hints_hard) did not match any of the + * available pixel formats. If your application is sufficiently flexible, + * downgrade your requirements and try again. Otherwise, inform the user that + * their machine does not match your requirements. + * + * @par + * If emitted when querying the clipboard, ignore the error or report it to + * the user, as appropriate. + */ +#define GLFW_FORMAT_UNAVAILABLE 0x00010009 +/*! @brief The specified window does not have an OpenGL or OpenGL ES context. + * + * A window that does not have an OpenGL or OpenGL ES context was passed to + * a function that requires it to have one. + * + * @analysis Application programmer error. Fix the offending call. + */ +#define GLFW_NO_WINDOW_CONTEXT 0x0001000A +/*! @} */ + +#define GLFW_FOCUSED 0x00020001 +#define GLFW_ICONIFIED 0x00020002 +#define GLFW_RESIZABLE 0x00020003 +#define GLFW_VISIBLE 0x00020004 +#define GLFW_DECORATED 0x00020005 +#define GLFW_AUTO_ICONIFY 0x00020006 +#define GLFW_FLOATING 0x00020007 +#define GLFW_MAXIMIZED 0x00020008 + +#define GLFW_RED_BITS 0x00021001 +#define GLFW_GREEN_BITS 0x00021002 +#define GLFW_BLUE_BITS 0x00021003 +#define GLFW_ALPHA_BITS 0x00021004 +#define GLFW_DEPTH_BITS 0x00021005 +#define GLFW_STENCIL_BITS 0x00021006 +#define GLFW_ACCUM_RED_BITS 0x00021007 +#define GLFW_ACCUM_GREEN_BITS 0x00021008 +#define GLFW_ACCUM_BLUE_BITS 0x00021009 +#define GLFW_ACCUM_ALPHA_BITS 0x0002100A +#define GLFW_AUX_BUFFERS 0x0002100B +#define GLFW_STEREO 0x0002100C +#define GLFW_SAMPLES 0x0002100D +#define GLFW_SRGB_CAPABLE 0x0002100E +#define GLFW_REFRESH_RATE 0x0002100F +#define GLFW_DOUBLEBUFFER 0x00021010 + +#define GLFW_CLIENT_API 0x00022001 +#define GLFW_CONTEXT_VERSION_MAJOR 0x00022002 +#define GLFW_CONTEXT_VERSION_MINOR 0x00022003 +#define GLFW_CONTEXT_REVISION 0x00022004 +#define GLFW_CONTEXT_ROBUSTNESS 0x00022005 +#define GLFW_OPENGL_FORWARD_COMPAT 0x00022006 +#define GLFW_OPENGL_DEBUG_CONTEXT 0x00022007 +#define GLFW_OPENGL_PROFILE 0x00022008 +#define GLFW_CONTEXT_RELEASE_BEHAVIOR 0x00022009 +#define GLFW_CONTEXT_NO_ERROR 0x0002200A + +#define GLFW_NO_API 0 +#define GLFW_OPENGL_API 0x00030001 +#define GLFW_OPENGL_ES_API 0x00030002 + +#define GLFW_NO_ROBUSTNESS 0 +#define GLFW_NO_RESET_NOTIFICATION 0x00031001 +#define GLFW_LOSE_CONTEXT_ON_RESET 0x00031002 + +#define GLFW_OPENGL_ANY_PROFILE 0 +#define GLFW_OPENGL_CORE_PROFILE 0x00032001 +#define GLFW_OPENGL_COMPAT_PROFILE 0x00032002 + +#define GLFW_CURSOR 0x00033001 +#define GLFW_STICKY_KEYS 0x00033002 +#define GLFW_STICKY_MOUSE_BUTTONS 0x00033003 + +#define GLFW_CURSOR_NORMAL 0x00034001 +#define GLFW_CURSOR_HIDDEN 0x00034002 +#define GLFW_CURSOR_DISABLED 0x00034003 + +#define GLFW_ANY_RELEASE_BEHAVIOR 0 +#define GLFW_RELEASE_BEHAVIOR_FLUSH 0x00035001 +#define GLFW_RELEASE_BEHAVIOR_NONE 0x00035002 + +/*! @defgroup shapes Standard cursor shapes + * + * See [standard cursor creation](@ref cursor_standard) for how these are used. + * + * @ingroup input + * @{ */ + +/*! @brief The regular arrow cursor shape. + * + * The regular arrow cursor. + */ +#define GLFW_ARROW_CURSOR 0x00036001 +/*! @brief The text input I-beam cursor shape. + * + * The text input I-beam cursor shape. + */ +#define GLFW_IBEAM_CURSOR 0x00036002 +/*! @brief The crosshair shape. + * + * The crosshair shape. + */ +#define GLFW_CROSSHAIR_CURSOR 0x00036003 +/*! @brief The hand shape. + * + * The hand shape. + */ +#define GLFW_HAND_CURSOR 0x00036004 +/*! @brief The horizontal resize arrow shape. + * + * The horizontal resize arrow shape. + */ +#define GLFW_HRESIZE_CURSOR 0x00036005 +/*! @brief The vertical resize arrow shape. + * + * The vertical resize arrow shape. + */ +#define GLFW_VRESIZE_CURSOR 0x00036006 +/*! @} */ + +#define GLFW_CONNECTED 0x00040001 +#define GLFW_DISCONNECTED 0x00040002 + +#define GLFW_DONT_CARE -1 + + +/************************************************************************* + * GLFW API types + *************************************************************************/ + +/*! @brief Client API function pointer type. + * + * Generic function pointer used for returning client API function pointers + * without forcing a cast from a regular pointer. + * + * @sa @ref context_glext + * @sa glfwGetProcAddress + * + * @since Added in version 3.0. + + * @ingroup context + */ +typedef void (*GLFWglproc)(void); + +/*! @brief Vulkan API function pointer type. + * + * Generic function pointer used for returning Vulkan API function pointers + * without forcing a cast from a regular pointer. + * + * @sa @ref vulkan_proc + * @sa glfwGetInstanceProcAddress + * + * @since Added in version 3.2. + * + * @ingroup vulkan + */ +typedef void (*GLFWvkproc)(void); + +/*! @brief Opaque monitor object. + * + * Opaque monitor object. + * + * @see @ref monitor_object + * + * @since Added in version 3.0. + * + * @ingroup monitor + */ +typedef struct GLFWmonitor GLFWmonitor; + +/*! @brief Opaque window object. + * + * Opaque window object. + * + * @see @ref window_object + * + * @since Added in version 3.0. + * + * @ingroup window + */ +typedef struct GLFWwindow GLFWwindow; + +/*! @brief Opaque cursor object. + * + * Opaque cursor object. + * + * @see @ref cursor_object + * + * @since Added in version 3.1. + * + * @ingroup cursor + */ +typedef struct GLFWcursor GLFWcursor; + +/*! @brief The function signature for error callbacks. + * + * This is the function signature for error callback functions. + * + * @param[in] error An [error code](@ref errors). + * @param[in] description A UTF-8 encoded string describing the error. + * + * @sa @ref error_handling + * @sa glfwSetErrorCallback + * + * @since Added in version 3.0. + * + * @ingroup init + */ +typedef void (* GLFWerrorfun)(int,const char*); + +/*! @brief The function signature for window position callbacks. + * + * This is the function signature for window position callback functions. + * + * @param[in] window The window that was moved. + * @param[in] xpos The new x-coordinate, in screen coordinates, of the + * upper-left corner of the client area of the window. + * @param[in] ypos The new y-coordinate, in screen coordinates, of the + * upper-left corner of the client area of the window. + * + * @sa @ref window_pos + * @sa glfwSetWindowPosCallback + * + * @since Added in version 3.0. + * + * @ingroup window + */ +typedef void (* GLFWwindowposfun)(GLFWwindow*,int,int); + +/*! @brief The function signature for window resize callbacks. + * + * This is the function signature for window size callback functions. + * + * @param[in] window The window that was resized. + * @param[in] width The new width, in screen coordinates, of the window. + * @param[in] height The new height, in screen coordinates, of the window. + * + * @sa @ref window_size + * @sa glfwSetWindowSizeCallback + * + * @since Added in version 1.0. + * @glfw3 Added window handle parameter. + * + * @ingroup window + */ +typedef void (* GLFWwindowsizefun)(GLFWwindow*,int,int); + +/*! @brief The function signature for window close callbacks. + * + * This is the function signature for window close callback functions. + * + * @param[in] window The window that the user attempted to close. + * + * @sa @ref window_close + * @sa glfwSetWindowCloseCallback + * + * @since Added in version 2.5. + * @glfw3 Added window handle parameter. + * + * @ingroup window + */ +typedef void (* GLFWwindowclosefun)(GLFWwindow*); + +/*! @brief The function signature for window content refresh callbacks. + * + * This is the function signature for window refresh callback functions. + * + * @param[in] window The window whose content needs to be refreshed. + * + * @sa @ref window_refresh + * @sa glfwSetWindowRefreshCallback + * + * @since Added in version 2.5. + * @glfw3 Added window handle parameter. + * + * @ingroup window + */ +typedef void (* GLFWwindowrefreshfun)(GLFWwindow*); + +/*! @brief The function signature for window focus/defocus callbacks. + * + * This is the function signature for window focus callback functions. + * + * @param[in] window The window that gained or lost input focus. + * @param[in] focused `GLFW_TRUE` if the window was given input focus, or + * `GLFW_FALSE` if it lost it. + * + * @sa @ref window_focus + * @sa glfwSetWindowFocusCallback + * + * @since Added in version 3.0. + * + * @ingroup window + */ +typedef void (* GLFWwindowfocusfun)(GLFWwindow*,int); + +/*! @brief The function signature for window iconify/restore callbacks. + * + * This is the function signature for window iconify/restore callback + * functions. + * + * @param[in] window The window that was iconified or restored. + * @param[in] iconified `GLFW_TRUE` if the window was iconified, or + * `GLFW_FALSE` if it was restored. + * + * @sa @ref window_iconify + * @sa glfwSetWindowIconifyCallback + * + * @since Added in version 3.0. + * + * @ingroup window + */ +typedef void (* GLFWwindowiconifyfun)(GLFWwindow*,int); + +/*! @brief The function signature for framebuffer resize callbacks. + * + * This is the function signature for framebuffer resize callback + * functions. + * + * @param[in] window The window whose framebuffer was resized. + * @param[in] width The new width, in pixels, of the framebuffer. + * @param[in] height The new height, in pixels, of the framebuffer. + * + * @sa @ref window_fbsize + * @sa glfwSetFramebufferSizeCallback + * + * @since Added in version 3.0. + * + * @ingroup window + */ +typedef void (* GLFWframebuffersizefun)(GLFWwindow*,int,int); + +/*! @brief The function signature for mouse button callbacks. + * + * This is the function signature for mouse button callback functions. + * + * @param[in] window The window that received the event. + * @param[in] button The [mouse button](@ref buttons) that was pressed or + * released. + * @param[in] action One of `GLFW_PRESS` or `GLFW_RELEASE`. + * @param[in] mods Bit field describing which [modifier keys](@ref mods) were + * held down. + * + * @sa @ref input_mouse_button + * @sa glfwSetMouseButtonCallback + * + * @since Added in version 1.0. + * @glfw3 Added window handle and modifier mask parameters. + * + * @ingroup input + */ +typedef void (* GLFWmousebuttonfun)(GLFWwindow*,int,int,int); + +/*! @brief The function signature for cursor position callbacks. + * + * This is the function signature for cursor position callback functions. + * + * @param[in] window The window that received the event. + * @param[in] xpos The new cursor x-coordinate, relative to the left edge of + * the client area. + * @param[in] ypos The new cursor y-coordinate, relative to the top edge of the + * client area. + * + * @sa @ref cursor_pos + * @sa glfwSetCursorPosCallback + * + * @since Added in version 3.0. Replaces `GLFWmouseposfun`. + * + * @ingroup input + */ +typedef void (* GLFWcursorposfun)(GLFWwindow*,double,double); + +/*! @brief The function signature for cursor enter/leave callbacks. + * + * This is the function signature for cursor enter/leave callback functions. + * + * @param[in] window The window that received the event. + * @param[in] entered `GLFW_TRUE` if the cursor entered the window's client + * area, or `GLFW_FALSE` if it left it. + * + * @sa @ref cursor_enter + * @sa glfwSetCursorEnterCallback + * + * @since Added in version 3.0. + * + * @ingroup input + */ +typedef void (* GLFWcursorenterfun)(GLFWwindow*,int); + +/*! @brief The function signature for scroll callbacks. + * + * This is the function signature for scroll callback functions. + * + * @param[in] window The window that received the event. + * @param[in] xoffset The scroll offset along the x-axis. + * @param[in] yoffset The scroll offset along the y-axis. + * + * @sa @ref scrolling + * @sa glfwSetScrollCallback + * + * @since Added in version 3.0. Replaces `GLFWmousewheelfun`. + * + * @ingroup input + */ +typedef void (* GLFWscrollfun)(GLFWwindow*,double,double); + +/*! @brief The function signature for keyboard key callbacks. + * + * This is the function signature for keyboard key callback functions. + * + * @param[in] window The window that received the event. + * @param[in] key The [keyboard key](@ref keys) that was pressed or released. + * @param[in] scancode The system-specific scancode of the key. + * @param[in] action `GLFW_PRESS`, `GLFW_RELEASE` or `GLFW_REPEAT`. + * @param[in] mods Bit field describing which [modifier keys](@ref mods) were + * held down. + * + * @sa @ref input_key + * @sa glfwSetKeyCallback + * + * @since Added in version 1.0. + * @glfw3 Added window handle, scancode and modifier mask parameters. + * + * @ingroup input + */ +typedef void (* GLFWkeyfun)(GLFWwindow*,int,int,int,int); + +/*! @brief The function signature for Unicode character callbacks. + * + * This is the function signature for Unicode character callback functions. + * + * @param[in] window The window that received the event. + * @param[in] codepoint The Unicode code point of the character. + * + * @sa @ref input_char + * @sa glfwSetCharCallback + * + * @since Added in version 2.4. + * @glfw3 Added window handle parameter. + * + * @ingroup input + */ +typedef void (* GLFWcharfun)(GLFWwindow*,unsigned int); + +/*! @brief The function signature for Unicode character with modifiers + * callbacks. + * + * This is the function signature for Unicode character with modifiers callback + * functions. It is called for each input character, regardless of what + * modifier keys are held down. + * + * @param[in] window The window that received the event. + * @param[in] codepoint The Unicode code point of the character. + * @param[in] mods Bit field describing which [modifier keys](@ref mods) were + * held down. + * + * @sa @ref input_char + * @sa glfwSetCharModsCallback + * + * @since Added in version 3.1. + * + * @ingroup input + */ +typedef void (* GLFWcharmodsfun)(GLFWwindow*,unsigned int,int); + +/*! @brief The function signature for file drop callbacks. + * + * This is the function signature for file drop callbacks. + * + * @param[in] window The window that received the event. + * @param[in] count The number of dropped files. + * @param[in] paths The UTF-8 encoded file and/or directory path names. + * + * @sa @ref path_drop + * @sa glfwSetDropCallback + * + * @since Added in version 3.1. + * + * @ingroup input + */ +typedef void (* GLFWdropfun)(GLFWwindow*,int,const char**); + +/*! @brief The function signature for monitor configuration callbacks. + * + * This is the function signature for monitor configuration callback functions. + * + * @param[in] monitor The monitor that was connected or disconnected. + * @param[in] event One of `GLFW_CONNECTED` or `GLFW_DISCONNECTED`. + * + * @sa @ref monitor_event + * @sa glfwSetMonitorCallback + * + * @since Added in version 3.0. + * + * @ingroup monitor + */ +typedef void (* GLFWmonitorfun)(GLFWmonitor*,int); + +/*! @brief The function signature for joystick configuration callbacks. + * + * This is the function signature for joystick configuration callback + * functions. + * + * @param[in] joy The joystick that was connected or disconnected. + * @param[in] event One of `GLFW_CONNECTED` or `GLFW_DISCONNECTED`. + * + * @sa @ref joystick_event + * @sa glfwSetJoystickCallback + * + * @since Added in version 3.2. + * + * @ingroup input + */ +typedef void (* GLFWjoystickfun)(int,int); + +/*! @brief Video mode type. + * + * This describes a single video mode. + * + * @sa @ref monitor_modes + * @sa glfwGetVideoMode glfwGetVideoModes + * + * @since Added in version 1.0. + * @glfw3 Added refresh rate member. + * + * @ingroup monitor + */ +typedef struct GLFWvidmode +{ + /*! The width, in screen coordinates, of the video mode. + */ + int width; + /*! The height, in screen coordinates, of the video mode. + */ + int height; + /*! The bit depth of the red channel of the video mode. + */ + int redBits; + /*! The bit depth of the green channel of the video mode. + */ + int greenBits; + /*! The bit depth of the blue channel of the video mode. + */ + int blueBits; + /*! The refresh rate, in Hz, of the video mode. + */ + int refreshRate; +} GLFWvidmode; + +/*! @brief Gamma ramp. + * + * This describes the gamma ramp for a monitor. + * + * @sa @ref monitor_gamma + * @sa glfwGetGammaRamp glfwSetGammaRamp + * + * @since Added in version 3.0. + * + * @ingroup monitor + */ +typedef struct GLFWgammaramp +{ + /*! An array of value describing the response of the red channel. + */ + unsigned short* red; + /*! An array of value describing the response of the green channel. + */ + unsigned short* green; + /*! An array of value describing the response of the blue channel. + */ + unsigned short* blue; + /*! The number of elements in each array. + */ + unsigned int size; +} GLFWgammaramp; + +/*! @brief Image data. + * + * @sa @ref cursor_custom + * + * @since Added in version 2.1. + * @glfw3 Removed format and bytes-per-pixel members. + */ +typedef struct GLFWimage +{ + /*! The width, in pixels, of this image. + */ + int width; + /*! The height, in pixels, of this image. + */ + int height; + /*! The pixel data of this image, arranged left-to-right, top-to-bottom. + */ + unsigned char* pixels; +} GLFWimage; + + +/************************************************************************* + * GLFW API functions + *************************************************************************/ + +/*! @brief Initializes the GLFW library. + * + * This function initializes the GLFW library. Before most GLFW functions can + * be used, GLFW must be initialized, and before an application terminates GLFW + * should be terminated in order to free any resources allocated during or + * after initialization. + * + * If this function fails, it calls @ref glfwTerminate before returning. If it + * succeeds, you should call @ref glfwTerminate before the application exits. + * + * Additional calls to this function after successful initialization but before + * termination will return `GLFW_TRUE` immediately. + * + * @return `GLFW_TRUE` if successful, or `GLFW_FALSE` if an + * [error](@ref error_handling) occurred. + * + * @errors Possible errors include @ref GLFW_PLATFORM_ERROR. + * + * @remark @osx This function will change the current directory of the + * application to the `Contents/Resources` subdirectory of the application's + * bundle, if present. This can be disabled with a + * [compile-time option](@ref compile_options_osx). + * + * @thread_safety This function must only be called from the main thread. + * + * @sa @ref intro_init + * @sa glfwTerminate + * + * @since Added in version 1.0. + * + * @ingroup init + */ +GLFWAPI int glfwInit(void); + +/*! @brief Terminates the GLFW library. + * + * This function destroys all remaining windows and cursors, restores any + * modified gamma ramps and frees any other allocated resources. Once this + * function is called, you must again call @ref glfwInit successfully before + * you will be able to use most GLFW functions. + * + * If GLFW has been successfully initialized, this function should be called + * before the application exits. If initialization fails, there is no need to + * call this function, as it is called by @ref glfwInit before it returns + * failure. + * + * @errors Possible errors include @ref GLFW_PLATFORM_ERROR. + * + * @remark This function may be called before @ref glfwInit. + * + * @warning The contexts of any remaining windows must not be current on any + * other thread when this function is called. + * + * @reentrancy This function must not be called from a callback. + * + * @thread_safety This function must only be called from the main thread. + * + * @sa @ref intro_init + * @sa glfwInit + * + * @since Added in version 1.0. + * + * @ingroup init + */ +GLFWAPI void glfwTerminate(void); + +/*! @brief Retrieves the version of the GLFW library. + * + * This function retrieves the major, minor and revision numbers of the GLFW + * library. It is intended for when you are using GLFW as a shared library and + * want to ensure that you are using the minimum required version. + * + * Any or all of the version arguments may be `NULL`. + * + * @param[out] major Where to store the major version number, or `NULL`. + * @param[out] minor Where to store the minor version number, or `NULL`. + * @param[out] rev Where to store the revision number, or `NULL`. + * + * @errors None. + * + * @remark This function may be called before @ref glfwInit. + * + * @thread_safety This function may be called from any thread. + * + * @sa @ref intro_version + * @sa glfwGetVersionString + * + * @since Added in version 1.0. + * + * @ingroup init + */ +GLFWAPI void glfwGetVersion(int* major, int* minor, int* rev); + +/*! @brief Returns a string describing the compile-time configuration. + * + * This function returns the compile-time generated + * [version string](@ref intro_version_string) of the GLFW library binary. It + * describes the version, platform, compiler and any platform-specific + * compile-time options. It should not be confused with the OpenGL or OpenGL + * ES version string, queried with `glGetString`. + * + * __Do not use the version string__ to parse the GLFW library version. The + * @ref glfwGetVersion function provides the version of the running library + * binary in numerical format. + * + * @return The ASCII encoded GLFW version string. + * + * @errors None. + * + * @remark This function may be called before @ref glfwInit. + * + * @pointer_lifetime The returned string is static and compile-time generated. + * + * @thread_safety This function may be called from any thread. + * + * @sa @ref intro_version + * @sa glfwGetVersion + * + * @since Added in version 3.0. + * + * @ingroup init + */ +GLFWAPI const char* glfwGetVersionString(void); + +/*! @brief Sets the error callback. + * + * This function sets the error callback, which is called with an error code + * and a human-readable description each time a GLFW error occurs. + * + * The error callback is called on the thread where the error occurred. If you + * are using GLFW from multiple threads, your error callback needs to be + * written accordingly. + * + * Because the description string may have been generated specifically for that + * error, it is not guaranteed to be valid after the callback has returned. If + * you wish to use it after the callback returns, you need to make a copy. + * + * Once set, the error callback remains set even after the library has been + * terminated. + * + * @param[in] cbfun The new callback, or `NULL` to remove the currently set + * callback. + * @return The previously set callback, or `NULL` if no callback was set. + * + * @errors None. + * + * @remark This function may be called before @ref glfwInit. + * + * @thread_safety This function must only be called from the main thread. + * + * @sa @ref error_handling + * + * @since Added in version 3.0. + * + * @ingroup init + */ +GLFWAPI GLFWerrorfun glfwSetErrorCallback(GLFWerrorfun cbfun); + +/*! @brief Returns the currently connected monitors. + * + * This function returns an array of handles for all currently connected + * monitors. The primary monitor is always first in the returned array. If no + * monitors were found, this function returns `NULL`. + * + * @param[out] count Where to store the number of monitors in the returned + * array. This is set to zero if an error occurred. + * @return An array of monitor handles, or `NULL` if no monitors were found or + * if an [error](@ref error_handling) occurred. + * + * @errors Possible errors include @ref GLFW_NOT_INITIALIZED. + * + * @pointer_lifetime The returned array is allocated and freed by GLFW. You + * should not free it yourself. It is guaranteed to be valid only until the + * monitor configuration changes or the library is terminated. + * + * @thread_safety This function must only be called from the main thread. + * + * @sa @ref monitor_monitors + * @sa @ref monitor_event + * @sa glfwGetPrimaryMonitor + * + * @since Added in version 3.0. + * + * @ingroup monitor + */ +GLFWAPI GLFWmonitor** glfwGetMonitors(int* count); + +/*! @brief Returns the primary monitor. + * + * This function returns the primary monitor. This is usually the monitor + * where elements like the task bar or global menu bar are located. + * + * @return The primary monitor, or `NULL` if no monitors were found or if an + * [error](@ref error_handling) occurred. + * + * @errors Possible errors include @ref GLFW_NOT_INITIALIZED. + * + * @thread_safety This function must only be called from the main thread. + * + * @remark The primary monitor is always first in the array returned by @ref + * glfwGetMonitors. + * + * @sa @ref monitor_monitors + * @sa glfwGetMonitors + * + * @since Added in version 3.0. + * + * @ingroup monitor + */ +GLFWAPI GLFWmonitor* glfwGetPrimaryMonitor(void); + +/*! @brief Returns the position of the monitor's viewport on the virtual screen. + * + * This function returns the position, in screen coordinates, of the upper-left + * corner of the specified monitor. + * + * Any or all of the position arguments may be `NULL`. If an error occurs, all + * non-`NULL` position arguments will be set to zero. + * + * @param[in] monitor The monitor to query. + * @param[out] xpos Where to store the monitor x-coordinate, or `NULL`. + * @param[out] ypos Where to store the monitor y-coordinate, or `NULL`. + * + * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref + * GLFW_PLATFORM_ERROR. + * + * @thread_safety This function must only be called from the main thread. + * + * @sa @ref monitor_properties + * + * @since Added in version 3.0. + * + * @ingroup monitor + */ +GLFWAPI void glfwGetMonitorPos(GLFWmonitor* monitor, int* xpos, int* ypos); + +/*! @brief Returns the physical size of the monitor. + * + * This function returns the size, in millimetres, of the display area of the + * specified monitor. + * + * Some systems do not provide accurate monitor size information, either + * because the monitor + * [EDID](https://en.wikipedia.org/wiki/Extended_display_identification_data) + * data is incorrect or because the driver does not report it accurately. + * + * Any or all of the size arguments may be `NULL`. If an error occurs, all + * non-`NULL` size arguments will be set to zero. + * + * @param[in] monitor The monitor to query. + * @param[out] widthMM Where to store the width, in millimetres, of the + * monitor's display area, or `NULL`. + * @param[out] heightMM Where to store the height, in millimetres, of the + * monitor's display area, or `NULL`. + * + * @errors Possible errors include @ref GLFW_NOT_INITIALIZED. + * + * @remark @win32 calculates the returned physical size from the + * current resolution and system DPI instead of querying the monitor EDID data. + * + * @thread_safety This function must only be called from the main thread. + * + * @sa @ref monitor_properties + * + * @since Added in version 3.0. + * + * @ingroup monitor + */ +GLFWAPI void glfwGetMonitorPhysicalSize(GLFWmonitor* monitor, int* widthMM, int* heightMM); + +/*! @brief Returns the name of the specified monitor. + * + * This function returns a human-readable name, encoded as UTF-8, of the + * specified monitor. The name typically reflects the make and model of the + * monitor and is not guaranteed to be unique among the connected monitors. + * + * @param[in] monitor The monitor to query. + * @return The UTF-8 encoded name of the monitor, or `NULL` if an + * [error](@ref error_handling) occurred. + * + * @errors Possible errors include @ref GLFW_NOT_INITIALIZED. + * + * @pointer_lifetime The returned string is allocated and freed by GLFW. You + * should not free it yourself. It is valid until the specified monitor is + * disconnected or the library is terminated. + * + * @thread_safety This function must only be called from the main thread. + * + * @sa @ref monitor_properties + * + * @since Added in version 3.0. + * + * @ingroup monitor + */ +GLFWAPI const char* glfwGetMonitorName(GLFWmonitor* monitor); + +/*! @brief Sets the monitor configuration callback. + * + * This function sets the monitor configuration callback, or removes the + * currently set callback. This is called when a monitor is connected to or + * disconnected from the system. + * + * @param[in] cbfun The new callback, or `NULL` to remove the currently set + * callback. + * @return The previously set callback, or `NULL` if no callback was set or the + * library had not been [initialized](@ref intro_init). + * + * @errors Possible errors include @ref GLFW_NOT_INITIALIZED. + * + * @thread_safety This function must only be called from the main thread. + * + * @sa @ref monitor_event + * + * @since Added in version 3.0. + * + * @ingroup monitor + */ +GLFWAPI GLFWmonitorfun glfwSetMonitorCallback(GLFWmonitorfun cbfun); + +/*! @brief Returns the available video modes for the specified monitor. + * + * This function returns an array of all video modes supported by the specified + * monitor. The returned array is sorted in ascending order, first by color + * bit depth (the sum of all channel depths) and then by resolution area (the + * product of width and height). + * + * @param[in] monitor The monitor to query. + * @param[out] count Where to store the number of video modes in the returned + * array. This is set to zero if an error occurred. + * @return An array of video modes, or `NULL` if an + * [error](@ref error_handling) occurred. + * + * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref + * GLFW_PLATFORM_ERROR. + * + * @pointer_lifetime The returned array is allocated and freed by GLFW. You + * should not free it yourself. It is valid until the specified monitor is + * disconnected, this function is called again for that monitor or the library + * is terminated. + * + * @thread_safety This function must only be called from the main thread. + * + * @sa @ref monitor_modes + * @sa glfwGetVideoMode + * + * @since Added in version 1.0. + * @glfw3 Changed to return an array of modes for a specific monitor. + * + * @ingroup monitor + */ +GLFWAPI const GLFWvidmode* glfwGetVideoModes(GLFWmonitor* monitor, int* count); + +/*! @brief Returns the current mode of the specified monitor. + * + * This function returns the current video mode of the specified monitor. If + * you have created a full screen window for that monitor, the return value + * will depend on whether that window is iconified. + * + * @param[in] monitor The monitor to query. + * @return The current mode of the monitor, or `NULL` if an + * [error](@ref error_handling) occurred. + * + * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref + * GLFW_PLATFORM_ERROR. + * + * @pointer_lifetime The returned array is allocated and freed by GLFW. You + * should not free it yourself. It is valid until the specified monitor is + * disconnected or the library is terminated. + * + * @thread_safety This function must only be called from the main thread. + * + * @sa @ref monitor_modes + * @sa glfwGetVideoModes + * + * @since Added in version 3.0. Replaces `glfwGetDesktopMode`. + * + * @ingroup monitor + */ +GLFWAPI const GLFWvidmode* glfwGetVideoMode(GLFWmonitor* monitor); + +/*! @brief Generates a gamma ramp and sets it for the specified monitor. + * + * This function generates a 256-element gamma ramp from the specified exponent + * and then calls @ref glfwSetGammaRamp with it. The value must be a finite + * number greater than zero. + * + * @param[in] monitor The monitor whose gamma ramp to set. + * @param[in] gamma The desired exponent. + * + * @errors Possible errors include @ref GLFW_NOT_INITIALIZED, @ref + * GLFW_INVALID_VALUE and @ref GLFW_PLATFORM_ERROR. + * + * @thread_safety This function must only be called from the main thread. + * + * @sa @ref monitor_gamma + * + * @since Added in version 3.0. + * + * @ingroup monitor + */ +GLFWAPI void glfwSetGamma(GLFWmonitor* monitor, float gamma); + +/*! @brief Returns the current gamma ramp for the specified monitor. + * + * This function returns the current gamma ramp of the specified monitor. + * + * @param[in] monitor The monitor to query. + * @return The current gamma ramp, or `NULL` if an + * [error](@ref error_handling) occurred. + * + * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref + * GLFW_PLATFORM_ERROR. + * + * @pointer_lifetime The returned structure and its arrays are allocated and + * freed by GLFW. You should not free them yourself. They are valid until the + * specified monitor is disconnected, this function is called again for that + * monitor or the library is terminated. + * + * @thread_safety This function must only be called from the main thread. + * + * @sa @ref monitor_gamma + * + * @since Added in version 3.0. + * + * @ingroup monitor + */ +GLFWAPI const GLFWgammaramp* glfwGetGammaRamp(GLFWmonitor* monitor); + +/*! @brief Sets the current gamma ramp for the specified monitor. + * + * This function sets the current gamma ramp for the specified monitor. The + * original gamma ramp for that monitor is saved by GLFW the first time this + * function is called and is restored by @ref glfwTerminate. + * + * @param[in] monitor The monitor whose gamma ramp to set. + * @param[in] ramp The gamma ramp to use. + * + * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref + * GLFW_PLATFORM_ERROR. + * + * @remark Gamma ramp sizes other than 256 are not supported by all platforms + * or graphics hardware. + * + * @remark @win32 The gamma ramp size must be 256. + * + * @pointer_lifetime The specified gamma ramp is copied before this function + * returns. + * + * @thread_safety This function must only be called from the main thread. + * + * @sa @ref monitor_gamma + * + * @since Added in version 3.0. + * + * @ingroup monitor + */ +GLFWAPI void glfwSetGammaRamp(GLFWmonitor* monitor, const GLFWgammaramp* ramp); + +/*! @brief Resets all window hints to their default values. + * + * This function resets all window hints to their + * [default values](@ref window_hints_values). + * + * @errors Possible errors include @ref GLFW_NOT_INITIALIZED. + * + * @thread_safety This function must only be called from the main thread. + * + * @sa @ref window_hints + * @sa glfwWindowHint + * + * @since Added in version 3.0. + * + * @ingroup window + */ +GLFWAPI void glfwDefaultWindowHints(void); + +/*! @brief Sets the specified window hint to the desired value. + * + * This function sets hints for the next call to @ref glfwCreateWindow. The + * hints, once set, retain their values until changed by a call to @ref + * glfwWindowHint or @ref glfwDefaultWindowHints, or until the library is + * terminated. + * + * This function does not check whether the specified hint values are valid. + * If you set hints to invalid values this will instead be reported by the next + * call to @ref glfwCreateWindow. + * + * @param[in] hint The [window hint](@ref window_hints) to set. + * @param[in] value The new value of the window hint. + * + * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref + * GLFW_INVALID_ENUM. + * + * @thread_safety This function must only be called from the main thread. + * + * @sa @ref window_hints + * @sa glfwDefaultWindowHints + * + * @since Added in version 3.0. Replaces `glfwOpenWindowHint`. + * + * @ingroup window + */ +GLFWAPI void glfwWindowHint(int hint, int value); + +/*! @brief Creates a window and its associated context. + * + * This function creates a window and its associated OpenGL or OpenGL ES + * context. Most of the options controlling how the window and its context + * should be created are specified with [window hints](@ref window_hints). + * + * Successful creation does not change which context is current. Before you + * can use the newly created context, you need to + * [make it current](@ref context_current). For information about the `share` + * parameter, see @ref context_sharing. + * + * The created window, framebuffer and context may differ from what you + * requested, as not all parameters and hints are + * [hard constraints](@ref window_hints_hard). This includes the size of the + * window, especially for full screen windows. To query the actual attributes + * of the created window, framebuffer and context, see @ref + * glfwGetWindowAttrib, @ref glfwGetWindowSize and @ref glfwGetFramebufferSize. + * + * To create a full screen window, you need to specify the monitor the window + * will cover. If no monitor is specified, the window will be windowed mode. + * Unless you have a way for the user to choose a specific monitor, it is + * recommended that you pick the primary monitor. For more information on how + * to query connected monitors, see @ref monitor_monitors. + * + * For full screen windows, the specified size becomes the resolution of the + * window's _desired video mode_. As long as a full screen window is not + * iconified, the supported video mode most closely matching the desired video + * mode is set for the specified monitor. For more information about full + * screen windows, including the creation of so called _windowed full screen_ + * or _borderless full screen_ windows, see @ref window_windowed_full_screen. + * + * By default, newly created windows use the placement recommended by the + * window system. To create the window at a specific position, make it + * initially invisible using the [GLFW_VISIBLE](@ref window_hints_wnd) window + * hint, set its [position](@ref window_pos) and then [show](@ref window_hide) + * it. + * + * As long as at least one full screen window is not iconified, the screensaver + * is prohibited from starting. + * + * Window systems put limits on window sizes. Very large or very small window + * dimensions may be overridden by the window system on creation. Check the + * actual [size](@ref window_size) after creation. + * + * The [swap interval](@ref buffer_swap) is not set during window creation and + * the initial value may vary depending on driver settings and defaults. + * + * @param[in] width The desired width, in screen coordinates, of the window. + * This must be greater than zero. + * @param[in] height The desired height, in screen coordinates, of the window. + * This must be greater than zero. + * @param[in] title The initial, UTF-8 encoded window title. + * @param[in] monitor The monitor to use for full screen mode, or `NULL` for + * windowed mode. + * @param[in] share The window whose context to share resources with, or `NULL` + * to not share resources. + * @return The handle of the created window, or `NULL` if an + * [error](@ref error_handling) occurred. + * + * @errors Possible errors include @ref GLFW_NOT_INITIALIZED, @ref + * GLFW_INVALID_ENUM, @ref GLFW_INVALID_VALUE, @ref GLFW_API_UNAVAILABLE, @ref + * GLFW_VERSION_UNAVAILABLE, @ref GLFW_FORMAT_UNAVAILABLE and @ref + * GLFW_PLATFORM_ERROR. + * + * @remark @win32 Window creation will fail if the Microsoft GDI software + * OpenGL implementation is the only one available. + * + * @remark @win32 If the executable has an icon resource named `GLFW_ICON,` + * it will be set as the icon for the window. If no such icon is present, the + * `IDI_WINLOGO` icon will be used instead. + * + * @remark @win32 The context to share resources with must not be current on + * any other thread. + * + * @remark @osx The GLFW window has no icon, as it is not a document + * window, but the dock icon will be the same as the application bundle's icon. + * For more information on bundles, see the + * [Bundle Programming Guide](https://developer.apple.com/library/mac/documentation/CoreFoundation/Conceptual/CFBundles/) + * in the Mac Developer Library. + * + * @remark @osx The first time a window is created the menu bar is populated + * with common commands like Hide, Quit and About. The About entry opens + * a minimal about dialog with information from the application's bundle. The + * menu bar can be disabled with a + * [compile-time option](@ref compile_options_osx). + * + * @remark @osx On OS X 10.10 and later the window frame will not be rendered + * at full resolution on Retina displays unless the `NSHighResolutionCapable` + * key is enabled in the application bundle's `Info.plist`. For more + * information, see + * [High Resolution Guidelines for OS X](https://developer.apple.com/library/mac/documentation/GraphicsAnimation/Conceptual/HighResolutionOSX/Explained/Explained.html) + * in the Mac Developer Library. The GLFW test and example programs use + * a custom `Info.plist` template for this, which can be found as + * `CMake/MacOSXBundleInfo.plist.in` in the source tree. + * + * @remark @x11 There is no mechanism for setting the window icon yet. + * + * @remark @x11 Some window managers will not respect the placement of + * initially hidden windows. + * + * @remark @x11 Due to the asynchronous nature of X11, it may take a moment for + * a window to reach its requested state. This means you may not be able to + * query the final size, position or other attributes directly after window + * creation. + * + * @reentrancy This function must not be called from a callback. + * + * @thread_safety This function must only be called from the main thread. + * + * @sa @ref window_creation + * @sa glfwDestroyWindow + * + * @since Added in version 3.0. Replaces `glfwOpenWindow`. + * + * @ingroup window + */ +GLFWAPI GLFWwindow* glfwCreateWindow(int width, int height, const char* title, GLFWmonitor* monitor, GLFWwindow* share); + +/*! @brief Destroys the specified window and its context. + * + * This function destroys the specified window and its context. On calling + * this function, no further callbacks will be called for that window. + * + * If the context of the specified window is current on the main thread, it is + * detached before being destroyed. + * + * @param[in] window The window to destroy. + * + * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref + * GLFW_PLATFORM_ERROR. + * + * @note The context of the specified window must not be current on any other + * thread when this function is called. + * + * @reentrancy This function must not be called from a callback. + * + * @thread_safety This function must only be called from the main thread. + * + * @sa @ref window_creation + * @sa glfwCreateWindow + * + * @since Added in version 3.0. Replaces `glfwCloseWindow`. + * + * @ingroup window + */ +GLFWAPI void glfwDestroyWindow(GLFWwindow* window); + +/*! @brief Checks the close flag of the specified window. + * + * This function returns the value of the close flag of the specified window. + * + * @param[in] window The window to query. + * @return The value of the close flag. + * + * @errors Possible errors include @ref GLFW_NOT_INITIALIZED. + * + * @thread_safety This function may be called from any thread. Access is not + * synchronized. + * + * @sa @ref window_close + * + * @since Added in version 3.0. + * + * @ingroup window + */ +GLFWAPI int glfwWindowShouldClose(GLFWwindow* window); + +/*! @brief Sets the close flag of the specified window. + * + * This function sets the value of the close flag of the specified window. + * This can be used to override the user's attempt to close the window, or + * to signal that it should be closed. + * + * @param[in] window The window whose flag to change. + * @param[in] value The new value. + * + * @errors Possible errors include @ref GLFW_NOT_INITIALIZED. + * + * @thread_safety This function may be called from any thread. Access is not + * synchronized. + * + * @sa @ref window_close + * + * @since Added in version 3.0. + * + * @ingroup window + */ +GLFWAPI void glfwSetWindowShouldClose(GLFWwindow* window, int value); + +/*! @brief Sets the title of the specified window. + * + * This function sets the window title, encoded as UTF-8, of the specified + * window. + * + * @param[in] window The window whose title to change. + * @param[in] title The UTF-8 encoded window title. + * + * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref + * GLFW_PLATFORM_ERROR. + * + * @remark @osx The window title will not be updated until the next time you + * process events. + * + * @thread_safety This function must only be called from the main thread. + * + * @sa @ref window_title + * + * @since Added in version 1.0. + * @glfw3 Added window handle parameter. + * + * @ingroup window + */ +GLFWAPI void glfwSetWindowTitle(GLFWwindow* window, const char* title); + +/*! @brief Sets the icon for the specified window. + * + * This function sets the icon of the specified window. If passed an array of + * candidate images, those of or closest to the sizes desired by the system are + * selected. If no images are specified, the window reverts to its default + * icon. + * + * The desired image sizes varies depending on platform and system settings. + * The selected images will be rescaled as needed. Good sizes include 16x16, + * 32x32 and 48x48. + * + * @param[in] window The window whose icon to set. + * @param[in] count The number of images in the specified array, or zero to + * revert to the default window icon. + * @param[in] images The images to create the icon from. This is ignored if + * count is zero. + * + * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref + * GLFW_PLATFORM_ERROR. + * + * @pointer_lifetime The specified image data is copied before this function + * returns. + * + * @remark @osx The GLFW window has no icon, as it is not a document + * window, but the dock icon will be the same as the application bundle's icon. + * For more information on bundles, see the + * [Bundle Programming Guide](https://developer.apple.com/library/mac/documentation/CoreFoundation/Conceptual/CFBundles/) + * in the Mac Developer Library. + * + * @thread_safety This function must only be called from the main thread. + * + * @sa @ref window_icon + * + * @since Added in version 3.2. + * + * @ingroup window + */ +GLFWAPI void glfwSetWindowIcon(GLFWwindow* window, int count, const GLFWimage* images); + +/*! @brief Retrieves the position of the client area of the specified window. + * + * This function retrieves the position, in screen coordinates, of the + * upper-left corner of the client area of the specified window. + * + * Any or all of the position arguments may be `NULL`. If an error occurs, all + * non-`NULL` position arguments will be set to zero. + * + * @param[in] window The window to query. + * @param[out] xpos Where to store the x-coordinate of the upper-left corner of + * the client area, or `NULL`. + * @param[out] ypos Where to store the y-coordinate of the upper-left corner of + * the client area, or `NULL`. + * + * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref + * GLFW_PLATFORM_ERROR. + * + * @thread_safety This function must only be called from the main thread. + * + * @sa @ref window_pos + * @sa glfwSetWindowPos + * + * @since Added in version 3.0. + * + * @ingroup window + */ +GLFWAPI void glfwGetWindowPos(GLFWwindow* window, int* xpos, int* ypos); + +/*! @brief Sets the position of the client area of the specified window. + * + * This function sets the position, in screen coordinates, of the upper-left + * corner of the client area of the specified windowed mode window. If the + * window is a full screen window, this function does nothing. + * + * __Do not use this function__ to move an already visible window unless you + * have very good reasons for doing so, as it will confuse and annoy the user. + * + * The window manager may put limits on what positions are allowed. GLFW + * cannot and should not override these limits. + * + * @param[in] window The window to query. + * @param[in] xpos The x-coordinate of the upper-left corner of the client area. + * @param[in] ypos The y-coordinate of the upper-left corner of the client area. + * + * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref + * GLFW_PLATFORM_ERROR. + * + * @thread_safety This function must only be called from the main thread. + * + * @sa @ref window_pos + * @sa glfwGetWindowPos + * + * @since Added in version 1.0. + * @glfw3 Added window handle parameter. + * + * @ingroup window + */ +GLFWAPI void glfwSetWindowPos(GLFWwindow* window, int xpos, int ypos); + +/*! @brief Retrieves the size of the client area of the specified window. + * + * This function retrieves the size, in screen coordinates, of the client area + * of the specified window. If you wish to retrieve the size of the + * framebuffer of the window in pixels, see @ref glfwGetFramebufferSize. + * + * Any or all of the size arguments may be `NULL`. If an error occurs, all + * non-`NULL` size arguments will be set to zero. + * + * @param[in] window The window whose size to retrieve. + * @param[out] width Where to store the width, in screen coordinates, of the + * client area, or `NULL`. + * @param[out] height Where to store the height, in screen coordinates, of the + * client area, or `NULL`. + * + * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref + * GLFW_PLATFORM_ERROR. + * + * @thread_safety This function must only be called from the main thread. + * + * @sa @ref window_size + * @sa glfwSetWindowSize + * + * @since Added in version 1.0. + * @glfw3 Added window handle parameter. + * + * @ingroup window + */ +GLFWAPI void glfwGetWindowSize(GLFWwindow* window, int* width, int* height); + +/*! @brief Sets the size limits of the specified window. + * + * This function sets the size limits of the client area of the specified + * window. If the window is full screen, the size limits only take effect if + * once it is made windowed. If the window is not resizable, this function + * does nothing. + * + * The size limits are applied immediately to a windowed mode window and may + * cause it to be resized. + * + * @param[in] window The window to set limits for. + * @param[in] minwidth The minimum width, in screen coordinates, of the client + * area, or `GLFW_DONT_CARE`. + * @param[in] minheight The minimum height, in screen coordinates, of the + * client area, or `GLFW_DONT_CARE`. + * @param[in] maxwidth The maximum width, in screen coordinates, of the client + * area, or `GLFW_DONT_CARE`. + * @param[in] maxheight The maximum height, in screen coordinates, of the + * client area, or `GLFW_DONT_CARE`. + * + * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref + * GLFW_PLATFORM_ERROR. + * + * @remark If you set size limits and an aspect ratio that conflict, the + * results are undefined. + * + * @thread_safety This function must only be called from the main thread. + * + * @sa @ref window_sizelimits + * @sa glfwSetWindowAspectRatio + * + * @since Added in version 3.2. + * + * @ingroup window + */ +GLFWAPI void glfwSetWindowSizeLimits(GLFWwindow* window, int minwidth, int minheight, int maxwidth, int maxheight); + +/*! @brief Sets the aspect ratio of the specified window. + * + * This function sets the required aspect ratio of the client area of the + * specified window. If the window is full screen, the aspect ratio only takes + * effect once it is made windowed. If the window is not resizable, this + * function does nothing. + * + * The aspect ratio is specified as a numerator and a denominator and both + * values must be greater than zero. For example, the common 16:9 aspect ratio + * is specified as 16 and 9, respectively. + * + * If the numerator and denominator is set to `GLFW_DONT_CARE` then the aspect + * ratio limit is disabled. + * + * The aspect ratio is applied immediately to a windowed mode window and may + * cause it to be resized. + * + * @param[in] window The window to set limits for. + * @param[in] numer The numerator of the desired aspect ratio, or + * `GLFW_DONT_CARE`. + * @param[in] denom The denominator of the desired aspect ratio, or + * `GLFW_DONT_CARE`. + * + * @errors Possible errors include @ref GLFW_NOT_INITIALIZED, @ref + * GLFW_INVALID_VALUE and @ref GLFW_PLATFORM_ERROR. + * + * @remark If you set size limits and an aspect ratio that conflict, the + * results are undefined. + * + * @thread_safety This function must only be called from the main thread. + * + * @sa @ref window_sizelimits + * @sa glfwSetWindowSizeLimits + * + * @since Added in version 3.2. + * + * @ingroup window + */ +GLFWAPI void glfwSetWindowAspectRatio(GLFWwindow* window, int numer, int denom); + +/*! @brief Sets the size of the client area of the specified window. + * + * This function sets the size, in screen coordinates, of the client area of + * the specified window. + * + * For full screen windows, this function updates the resolution of its desired + * video mode and switches to the video mode closest to it, without affecting + * the window's context. As the context is unaffected, the bit depths of the + * framebuffer remain unchanged. + * + * If you wish to update the refresh rate of the desired video mode in addition + * to its resolution, see @ref glfwSetWindowMonitor. + * + * The window manager may put limits on what sizes are allowed. GLFW cannot + * and should not override these limits. + * + * @param[in] window The window to resize. + * @param[in] width The desired width, in screen coordinates, of the window + * client area. + * @param[in] height The desired height, in screen coordinates, of the window + * client area. + * + * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref + * GLFW_PLATFORM_ERROR. + * + * @thread_safety This function must only be called from the main thread. + * + * @sa @ref window_size + * @sa glfwGetWindowSize + * @sa glfwSetWindowMonitor + * + * @since Added in version 1.0. + * @glfw3 Added window handle parameter. + * + * @ingroup window + */ +GLFWAPI void glfwSetWindowSize(GLFWwindow* window, int width, int height); + +/*! @brief Retrieves the size of the framebuffer of the specified window. + * + * This function retrieves the size, in pixels, of the framebuffer of the + * specified window. If you wish to retrieve the size of the window in screen + * coordinates, see @ref glfwGetWindowSize. + * + * Any or all of the size arguments may be `NULL`. If an error occurs, all + * non-`NULL` size arguments will be set to zero. + * + * @param[in] window The window whose framebuffer to query. + * @param[out] width Where to store the width, in pixels, of the framebuffer, + * or `NULL`. + * @param[out] height Where to store the height, in pixels, of the framebuffer, + * or `NULL`. + * + * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref + * GLFW_PLATFORM_ERROR. + * + * @thread_safety This function must only be called from the main thread. + * + * @sa @ref window_fbsize + * @sa glfwSetFramebufferSizeCallback + * + * @since Added in version 3.0. + * + * @ingroup window + */ +GLFWAPI void glfwGetFramebufferSize(GLFWwindow* window, int* width, int* height); + +/*! @brief Retrieves the size of the frame of the window. + * + * This function retrieves the size, in screen coordinates, of each edge of the + * frame of the specified window. This size includes the title bar, if the + * window has one. The size of the frame may vary depending on the + * [window-related hints](@ref window_hints_wnd) used to create it. + * + * Because this function retrieves the size of each window frame edge and not + * the offset along a particular coordinate axis, the retrieved values will + * always be zero or positive. + * + * Any or all of the size arguments may be `NULL`. If an error occurs, all + * non-`NULL` size arguments will be set to zero. + * + * @param[in] window The window whose frame size to query. + * @param[out] left Where to store the size, in screen coordinates, of the left + * edge of the window frame, or `NULL`. + * @param[out] top Where to store the size, in screen coordinates, of the top + * edge of the window frame, or `NULL`. + * @param[out] right Where to store the size, in screen coordinates, of the + * right edge of the window frame, or `NULL`. + * @param[out] bottom Where to store the size, in screen coordinates, of the + * bottom edge of the window frame, or `NULL`. + * + * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref + * GLFW_PLATFORM_ERROR. + * + * @thread_safety This function must only be called from the main thread. + * + * @sa @ref window_size + * + * @since Added in version 3.1. + * + * @ingroup window + */ +GLFWAPI void glfwGetWindowFrameSize(GLFWwindow* window, int* left, int* top, int* right, int* bottom); + +/*! @brief Iconifies the specified window. + * + * This function iconifies (minimizes) the specified window if it was + * previously restored. If the window is already iconified, this function does + * nothing. + * + * If the specified window is a full screen window, the original monitor + * resolution is restored until the window is restored. + * + * @param[in] window The window to iconify. + * + * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref + * GLFW_PLATFORM_ERROR. + * + * @thread_safety This function must only be called from the main thread. + * + * @sa @ref window_iconify + * @sa glfwRestoreWindow + * @sa glfwMaximizeWindow + * + * @since Added in version 2.1. + * @glfw3 Added window handle parameter. + * + * @ingroup window + */ +GLFWAPI void glfwIconifyWindow(GLFWwindow* window); + +/*! @brief Restores the specified window. + * + * This function restores the specified window if it was previously iconified + * (minimized) or maximized. If the window is already restored, this function + * does nothing. + * + * If the specified window is a full screen window, the resolution chosen for + * the window is restored on the selected monitor. + * + * @param[in] window The window to restore. + * + * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref + * GLFW_PLATFORM_ERROR. + * + * @thread_safety This function must only be called from the main thread. + * + * @sa @ref window_iconify + * @sa glfwIconifyWindow + * @sa glfwMaximizeWindow + * + * @since Added in version 2.1. + * @glfw3 Added window handle parameter. + * + * @ingroup window + */ +GLFWAPI void glfwRestoreWindow(GLFWwindow* window); + +/*! @brief Maximizes the specified window. + * + * This function maximizes the specified window if it was previously not + * maximized. If the window is already maximized, this function does nothing. + * + * If the specified window is a full screen window, this function does nothing. + * + * @param[in] window The window to maximize. + * + * @par Thread Safety + * This function may only be called from the main thread. + * + * @sa @ref window_iconify + * @sa glfwIconifyWindow + * @sa glfwRestoreWindow + * + * @since Added in GLFW 3.2. + * + * @ingroup window + */ +GLFWAPI void glfwMaximizeWindow(GLFWwindow* window); + +/*! @brief Makes the specified window visible. + * + * This function makes the specified window visible if it was previously + * hidden. If the window is already visible or is in full screen mode, this + * function does nothing. + * + * @param[in] window The window to make visible. + * + * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref + * GLFW_PLATFORM_ERROR. + * + * @thread_safety This function must only be called from the main thread. + * + * @sa @ref window_hide + * @sa glfwHideWindow + * + * @since Added in version 3.0. + * + * @ingroup window + */ +GLFWAPI void glfwShowWindow(GLFWwindow* window); + +/*! @brief Hides the specified window. + * + * This function hides the specified window if it was previously visible. If + * the window is already hidden or is in full screen mode, this function does + * nothing. + * + * @param[in] window The window to hide. + * + * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref + * GLFW_PLATFORM_ERROR. + * + * @thread_safety This function must only be called from the main thread. + * + * @sa @ref window_hide + * @sa glfwShowWindow + * + * @since Added in version 3.0. + * + * @ingroup window + */ +GLFWAPI void glfwHideWindow(GLFWwindow* window); + +/*! @brief Brings the specified window to front and sets input focus. + * + * This function brings the specified window to front and sets input focus. + * The window should already be visible and not iconified. + * + * By default, both windowed and full screen mode windows are focused when + * initially created. Set the [GLFW_FOCUSED](@ref window_hints_wnd) to disable + * this behavior. + * + * __Do not use this function__ to steal focus from other applications unless + * you are certain that is what the user wants. Focus stealing can be + * extremely disruptive. + * + * @param[in] window The window to give input focus. + * + * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref + * GLFW_PLATFORM_ERROR. + * + * @thread_safety This function must only be called from the main thread. + * + * @sa @ref window_focus + * + * @since Added in version 3.2. + * + * @ingroup window + */ +GLFWAPI void glfwFocusWindow(GLFWwindow* window); + +/*! @brief Returns the monitor that the window uses for full screen mode. + * + * This function returns the handle of the monitor that the specified window is + * in full screen on. + * + * @param[in] window The window to query. + * @return The monitor, or `NULL` if the window is in windowed mode or an error + * occurred. + * + * @errors Possible errors include @ref GLFW_NOT_INITIALIZED. + * + * @thread_safety This function must only be called from the main thread. + * + * @sa @ref window_monitor + * @sa glfwSetWindowMonitor + * + * @since Added in version 3.0. + * + * @ingroup window + */ +GLFWAPI GLFWmonitor* glfwGetWindowMonitor(GLFWwindow* window); + +/*! @brief Sets the mode, monitor, video mode and placement of a window. + * + * This function sets the monitor that the window uses for full screen mode or, + * if the monitor is `NULL`, makes it windowed mode. + * + * When setting a monitor, this function updates the width, height and refresh + * rate of the desired video mode and switches to the video mode closest to it. + * The window position is ignored when setting a monitor. + * + * When the monitor is `NULL`, the position, width and height are used to + * place the window client area. The refresh rate is ignored when no monitor + * is specified. + * + * If you only wish to update the resolution of a full screen window or the + * size of a windowed mode window, see @ref glfwSetWindowSize. + * + * When a window transitions from full screen to windowed mode, this function + * restores any previous window settings such as whether it is decorated, + * floating, resizable, has size or aspect ratio limits, etc.. + * + * @param[in] window The window whose monitor, size or video mode to set. + * @param[in] monitor The desired monitor, or `NULL` to set windowed mode. + * @param[in] xpos The desired x-coordinate of the upper-left corner of the + * client area. + * @param[in] ypos The desired y-coordinate of the upper-left corner of the + * client area. + * @param[in] width The desired with, in screen coordinates, of the client area + * or video mode. + * @param[in] height The desired height, in screen coordinates, of the client + * area or video mode. + * @param[in] refreshRate The desired refresh rate, in Hz, of the video mode. + * + * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref + * GLFW_PLATFORM_ERROR. + * + * @thread_safety This function must only be called from the main thread. + * + * @sa @ref window_monitor + * @sa @ref window_full_screen + * @sa glfwGetWindowMonitor + * @sa glfwSetWindowSize + * + * @since Added in version 3.2. + * + * @ingroup window + */ +GLFWAPI void glfwSetWindowMonitor(GLFWwindow* window, GLFWmonitor* monitor, int xpos, int ypos, int width, int height, int refreshRate); + +/*! @brief Returns an attribute of the specified window. + * + * This function returns the value of an attribute of the specified window or + * its OpenGL or OpenGL ES context. + * + * @param[in] window The window to query. + * @param[in] attrib The [window attribute](@ref window_attribs) whose value to + * return. + * @return The value of the attribute, or zero if an + * [error](@ref error_handling) occurred. + * + * @errors Possible errors include @ref GLFW_NOT_INITIALIZED, @ref + * GLFW_INVALID_ENUM and @ref GLFW_PLATFORM_ERROR. + * + * @remark Framebuffer related hints are not window attributes. See @ref + * window_attribs_fb for more information. + * + * @remark Zero is a valid value for many window and context related + * attributes so you cannot use a return value of zero as an indication of + * errors. However, this function should not fail as long as it is passed + * valid arguments and the library has been [initialized](@ref intro_init). + * + * @thread_safety This function must only be called from the main thread. + * + * @sa @ref window_attribs + * + * @since Added in version 3.0. Replaces `glfwGetWindowParam` and + * `glfwGetGLVersion`. + * + * @ingroup window + */ +GLFWAPI int glfwGetWindowAttrib(GLFWwindow* window, int attrib); + +/*! @brief Sets the user pointer of the specified window. + * + * This function sets the user-defined pointer of the specified window. The + * current value is retained until the window is destroyed. The initial value + * is `NULL`. + * + * @param[in] window The window whose pointer to set. + * @param[in] pointer The new value. + * + * @errors Possible errors include @ref GLFW_NOT_INITIALIZED. + * + * @thread_safety This function may be called from any thread. Access is not + * synchronized. + * + * @sa @ref window_userptr + * @sa glfwGetWindowUserPointer + * + * @since Added in version 3.0. + * + * @ingroup window + */ +GLFWAPI void glfwSetWindowUserPointer(GLFWwindow* window, void* pointer); + +/*! @brief Returns the user pointer of the specified window. + * + * This function returns the current value of the user-defined pointer of the + * specified window. The initial value is `NULL`. + * + * @param[in] window The window whose pointer to return. + * + * @errors Possible errors include @ref GLFW_NOT_INITIALIZED. + * + * @thread_safety This function may be called from any thread. Access is not + * synchronized. + * + * @sa @ref window_userptr + * @sa glfwSetWindowUserPointer + * + * @since Added in version 3.0. + * + * @ingroup window + */ +GLFWAPI void* glfwGetWindowUserPointer(GLFWwindow* window); + +/*! @brief Sets the position callback for the specified window. + * + * This function sets the position callback of the specified window, which is + * called when the window is moved. The callback is provided with the screen + * position of the upper-left corner of the client area of the window. + * + * @param[in] window The window whose callback to set. + * @param[in] cbfun The new callback, or `NULL` to remove the currently set + * callback. + * @return The previously set callback, or `NULL` if no callback was set or the + * library had not been [initialized](@ref intro_init). + * + * @errors Possible errors include @ref GLFW_NOT_INITIALIZED. + * + * @thread_safety This function must only be called from the main thread. + * + * @sa @ref window_pos + * + * @since Added in version 3.0. + * + * @ingroup window + */ +GLFWAPI GLFWwindowposfun glfwSetWindowPosCallback(GLFWwindow* window, GLFWwindowposfun cbfun); + +/*! @brief Sets the size callback for the specified window. + * + * This function sets the size callback of the specified window, which is + * called when the window is resized. The callback is provided with the size, + * in screen coordinates, of the client area of the window. + * + * @param[in] window The window whose callback to set. + * @param[in] cbfun The new callback, or `NULL` to remove the currently set + * callback. + * @return The previously set callback, or `NULL` if no callback was set or the + * library had not been [initialized](@ref intro_init). + * + * @errors Possible errors include @ref GLFW_NOT_INITIALIZED. + * + * @thread_safety This function must only be called from the main thread. + * + * @sa @ref window_size + * + * @since Added in version 1.0. + * @glfw3 Added window handle parameter and return value. + * + * @ingroup window + */ +GLFWAPI GLFWwindowsizefun glfwSetWindowSizeCallback(GLFWwindow* window, GLFWwindowsizefun cbfun); + +/*! @brief Sets the close callback for the specified window. + * + * This function sets the close callback of the specified window, which is + * called when the user attempts to close the window, for example by clicking + * the close widget in the title bar. + * + * The close flag is set before this callback is called, but you can modify it + * at any time with @ref glfwSetWindowShouldClose. + * + * The close callback is not triggered by @ref glfwDestroyWindow. + * + * @param[in] window The window whose callback to set. + * @param[in] cbfun The new callback, or `NULL` to remove the currently set + * callback. + * @return The previously set callback, or `NULL` if no callback was set or the + * library had not been [initialized](@ref intro_init). + * + * @errors Possible errors include @ref GLFW_NOT_INITIALIZED. + * + * @remark @osx Selecting Quit from the application menu will trigger the close + * callback for all windows. + * + * @thread_safety This function must only be called from the main thread. + * + * @sa @ref window_close + * + * @since Added in version 2.5. + * @glfw3 Added window handle parameter and return value. + * + * @ingroup window + */ +GLFWAPI GLFWwindowclosefun glfwSetWindowCloseCallback(GLFWwindow* window, GLFWwindowclosefun cbfun); + +/*! @brief Sets the refresh callback for the specified window. + * + * This function sets the refresh callback of the specified window, which is + * called when the client area of the window needs to be redrawn, for example + * if the window has been exposed after having been covered by another window. + * + * On compositing window systems such as Aero, Compiz or Aqua, where the window + * contents are saved off-screen, this callback may be called only very + * infrequently or never at all. + * + * @param[in] window The window whose callback to set. + * @param[in] cbfun The new callback, or `NULL` to remove the currently set + * callback. + * @return The previously set callback, or `NULL` if no callback was set or the + * library had not been [initialized](@ref intro_init). + * + * @errors Possible errors include @ref GLFW_NOT_INITIALIZED. + * + * @thread_safety This function must only be called from the main thread. + * + * @sa @ref window_refresh + * + * @since Added in version 2.5. + * @glfw3 Added window handle parameter and return value. + * + * @ingroup window + */ +GLFWAPI GLFWwindowrefreshfun glfwSetWindowRefreshCallback(GLFWwindow* window, GLFWwindowrefreshfun cbfun); + +/*! @brief Sets the focus callback for the specified window. + * + * This function sets the focus callback of the specified window, which is + * called when the window gains or loses input focus. + * + * After the focus callback is called for a window that lost input focus, + * synthetic key and mouse button release events will be generated for all such + * that had been pressed. For more information, see @ref glfwSetKeyCallback + * and @ref glfwSetMouseButtonCallback. + * + * @param[in] window The window whose callback to set. + * @param[in] cbfun The new callback, or `NULL` to remove the currently set + * callback. + * @return The previously set callback, or `NULL` if no callback was set or the + * library had not been [initialized](@ref intro_init). + * + * @errors Possible errors include @ref GLFW_NOT_INITIALIZED. + * + * @thread_safety This function must only be called from the main thread. + * + * @sa @ref window_focus + * + * @since Added in version 3.0. + * + * @ingroup window + */ +GLFWAPI GLFWwindowfocusfun glfwSetWindowFocusCallback(GLFWwindow* window, GLFWwindowfocusfun cbfun); + +/*! @brief Sets the iconify callback for the specified window. + * + * This function sets the iconification callback of the specified window, which + * is called when the window is iconified or restored. + * + * @param[in] window The window whose callback to set. + * @param[in] cbfun The new callback, or `NULL` to remove the currently set + * callback. + * @return The previously set callback, or `NULL` if no callback was set or the + * library had not been [initialized](@ref intro_init). + * + * @errors Possible errors include @ref GLFW_NOT_INITIALIZED. + * + * @thread_safety This function must only be called from the main thread. + * + * @sa @ref window_iconify + * + * @since Added in version 3.0. + * + * @ingroup window + */ +GLFWAPI GLFWwindowiconifyfun glfwSetWindowIconifyCallback(GLFWwindow* window, GLFWwindowiconifyfun cbfun); + +/*! @brief Sets the framebuffer resize callback for the specified window. + * + * This function sets the framebuffer resize callback of the specified window, + * which is called when the framebuffer of the specified window is resized. + * + * @param[in] window The window whose callback to set. + * @param[in] cbfun The new callback, or `NULL` to remove the currently set + * callback. + * @return The previously set callback, or `NULL` if no callback was set or the + * library had not been [initialized](@ref intro_init). + * + * @errors Possible errors include @ref GLFW_NOT_INITIALIZED. + * + * @thread_safety This function must only be called from the main thread. + * + * @sa @ref window_fbsize + * + * @since Added in version 3.0. + * + * @ingroup window + */ +GLFWAPI GLFWframebuffersizefun glfwSetFramebufferSizeCallback(GLFWwindow* window, GLFWframebuffersizefun cbfun); + +/*! @brief Processes all pending events. + * + * This function processes only those events that are already in the event + * queue and then returns immediately. Processing events will cause the window + * and input callbacks associated with those events to be called. + * + * On some platforms, a window move, resize or menu operation will cause event + * processing to block. This is due to how event processing is designed on + * those platforms. You can use the + * [window refresh callback](@ref window_refresh) to redraw the contents of + * your window when necessary during such operations. + * + * On some platforms, certain events are sent directly to the application + * without going through the event queue, causing callbacks to be called + * outside of a call to one of the event processing functions. + * + * Event processing is not required for joystick input to work. + * + * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref + * GLFW_PLATFORM_ERROR. + * + * @reentrancy This function must not be called from a callback. + * + * @thread_safety This function must only be called from the main thread. + * + * @sa @ref events + * @sa glfwWaitEvents + * @sa glfwWaitEventsTimeout + * + * @since Added in version 1.0. + * + * @ingroup window + */ +GLFWAPI void glfwPollEvents(void); + +/*! @brief Waits until events are queued and processes them. + * + * This function puts the calling thread to sleep until at least one event is + * available in the event queue. Once one or more events are available, + * it behaves exactly like @ref glfwPollEvents, i.e. the events in the queue + * are processed and the function then returns immediately. Processing events + * will cause the window and input callbacks associated with those events to be + * called. + * + * Since not all events are associated with callbacks, this function may return + * without a callback having been called even if you are monitoring all + * callbacks. + * + * On some platforms, a window move, resize or menu operation will cause event + * processing to block. This is due to how event processing is designed on + * those platforms. You can use the + * [window refresh callback](@ref window_refresh) to redraw the contents of + * your window when necessary during such operations. + * + * On some platforms, certain callbacks may be called outside of a call to one + * of the event processing functions. + * + * If no windows exist, this function returns immediately. For synchronization + * of threads in applications that do not create windows, use your threading + * library of choice. + * + * Event processing is not required for joystick input to work. + * + * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref + * GLFW_PLATFORM_ERROR. + * + * @reentrancy This function must not be called from a callback. + * + * @thread_safety This function must only be called from the main thread. + * + * @sa @ref events + * @sa glfwPollEvents + * @sa glfwWaitEventsTimeout + * + * @since Added in version 2.5. + * + * @ingroup window + */ +GLFWAPI void glfwWaitEvents(void); + +/*! @brief Waits with timeout until events are queued and processes them. + * + * This function puts the calling thread to sleep until at least one event is + * available in the event queue, or until the specified timeout is reached. If + * one or more events are available, it behaves exactly like @ref + * glfwPollEvents, i.e. the events in the queue are processed and the function + * then returns immediately. Processing events will cause the window and input + * callbacks associated with those events to be called. + * + * The timeout value must be a positive finite number. + * + * Since not all events are associated with callbacks, this function may return + * without a callback having been called even if you are monitoring all + * callbacks. + * + * On some platforms, a window move, resize or menu operation will cause event + * processing to block. This is due to how event processing is designed on + * those platforms. You can use the + * [window refresh callback](@ref window_refresh) to redraw the contents of + * your window when necessary during such operations. + * + * On some platforms, certain callbacks may be called outside of a call to one + * of the event processing functions. + * + * If no windows exist, this function returns immediately. For synchronization + * of threads in applications that do not create windows, use your threading + * library of choice. + * + * Event processing is not required for joystick input to work. + * + * @param[in] timeout The maximum amount of time, in seconds, to wait. + * + * @reentrancy This function must not be called from a callback. + * + * @thread_safety This function must only be called from the main thread. + * + * @sa @ref events + * @sa glfwPollEvents + * @sa glfwWaitEvents + * + * @since Added in version 3.2. + * + * @ingroup window + */ +GLFWAPI void glfwWaitEventsTimeout(double timeout); + +/*! @brief Posts an empty event to the event queue. + * + * This function posts an empty event from the current thread to the event + * queue, causing @ref glfwWaitEvents to return. + * + * If no windows exist, this function returns immediately. For synchronization + * of threads in applications that do not create windows, use your threading + * library of choice. + * + * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref + * GLFW_PLATFORM_ERROR. + * + * @thread_safety This function may be called from any thread. + * + * @sa @ref events + * @sa glfwWaitEvents + * + * @since Added in version 3.1. + * + * @ingroup window + */ +GLFWAPI void glfwPostEmptyEvent(void); + +/*! @brief Returns the value of an input option for the specified window. + * + * This function returns the value of an input option for the specified window. + * The mode must be one of `GLFW_CURSOR`, `GLFW_STICKY_KEYS` or + * `GLFW_STICKY_MOUSE_BUTTONS`. + * + * @param[in] window The window to query. + * @param[in] mode One of `GLFW_CURSOR`, `GLFW_STICKY_KEYS` or + * `GLFW_STICKY_MOUSE_BUTTONS`. + * + * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref + * GLFW_INVALID_ENUM. + * + * @thread_safety This function must only be called from the main thread. + * + * @sa glfwSetInputMode + * + * @since Added in version 3.0. + * + * @ingroup input + */ +GLFWAPI int glfwGetInputMode(GLFWwindow* window, int mode); + +/*! @brief Sets an input option for the specified window. + * + * This function sets an input mode option for the specified window. The mode + * must be one of `GLFW_CURSOR`, `GLFW_STICKY_KEYS` or + * `GLFW_STICKY_MOUSE_BUTTONS`. + * + * If the mode is `GLFW_CURSOR`, the value must be one of the following cursor + * modes: + * - `GLFW_CURSOR_NORMAL` makes the cursor visible and behaving normally. + * - `GLFW_CURSOR_HIDDEN` makes the cursor invisible when it is over the client + * area of the window but does not restrict the cursor from leaving. + * - `GLFW_CURSOR_DISABLED` hides and grabs the cursor, providing virtual + * and unlimited cursor movement. This is useful for implementing for + * example 3D camera controls. + * + * If the mode is `GLFW_STICKY_KEYS`, the value must be either `GLFW_TRUE` to + * enable sticky keys, or `GLFW_FALSE` to disable it. If sticky keys are + * enabled, a key press will ensure that @ref glfwGetKey returns `GLFW_PRESS` + * the next time it is called even if the key had been released before the + * call. This is useful when you are only interested in whether keys have been + * pressed but not when or in which order. + * + * If the mode is `GLFW_STICKY_MOUSE_BUTTONS`, the value must be either + * `GLFW_TRUE` to enable sticky mouse buttons, or `GLFW_FALSE` to disable it. + * If sticky mouse buttons are enabled, a mouse button press will ensure that + * @ref glfwGetMouseButton returns `GLFW_PRESS` the next time it is called even + * if the mouse button had been released before the call. This is useful when + * you are only interested in whether mouse buttons have been pressed but not + * when or in which order. + * + * @param[in] window The window whose input mode to set. + * @param[in] mode One of `GLFW_CURSOR`, `GLFW_STICKY_KEYS` or + * `GLFW_STICKY_MOUSE_BUTTONS`. + * @param[in] value The new value of the specified input mode. + * + * @errors Possible errors include @ref GLFW_NOT_INITIALIZED, @ref + * GLFW_INVALID_ENUM and @ref GLFW_PLATFORM_ERROR. + * + * @thread_safety This function must only be called from the main thread. + * + * @sa glfwGetInputMode + * + * @since Added in version 3.0. Replaces `glfwEnable` and `glfwDisable`. + * + * @ingroup input + */ +GLFWAPI void glfwSetInputMode(GLFWwindow* window, int mode, int value); + +/*! @brief Returns the localized name of the specified printable key. + * + * This function returns the localized name of the specified printable key. + * This is intended for displaying key bindings to the user. + * + * If the key is `GLFW_KEY_UNKNOWN`, the scancode is used instead, otherwise + * the scancode is ignored. If a non-printable key or (if the key is + * `GLFW_KEY_UNKNOWN`) a scancode that maps to a non-printable key is + * specified, this function returns `NULL`. + * + * This behavior allows you to pass in the arguments passed to the + * [key callback](@ref input_key) without modification. + * + * The printable keys are: + * - `GLFW_KEY_APOSTROPHE` + * - `GLFW_KEY_COMMA` + * - `GLFW_KEY_MINUS` + * - `GLFW_KEY_PERIOD` + * - `GLFW_KEY_SLASH` + * - `GLFW_KEY_SEMICOLON` + * - `GLFW_KEY_EQUAL` + * - `GLFW_KEY_LEFT_BRACKET` + * - `GLFW_KEY_RIGHT_BRACKET` + * - `GLFW_KEY_BACKSLASH` + * - `GLFW_KEY_WORLD_1` + * - `GLFW_KEY_WORLD_2` + * - `GLFW_KEY_0` to `GLFW_KEY_9` + * - `GLFW_KEY_A` to `GLFW_KEY_Z` + * - `GLFW_KEY_KP_0` to `GLFW_KEY_KP_9` + * - `GLFW_KEY_KP_DECIMAL` + * - `GLFW_KEY_KP_DIVIDE` + * - `GLFW_KEY_KP_MULTIPLY` + * - `GLFW_KEY_KP_SUBTRACT` + * - `GLFW_KEY_KP_ADD` + * - `GLFW_KEY_KP_EQUAL` + * + * @param[in] key The key to query, or `GLFW_KEY_UNKNOWN`. + * @param[in] scancode The scancode of the key to query. + * @return The localized name of the key, or `NULL`. + * + * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref + * GLFW_PLATFORM_ERROR. + * + * @pointer_lifetime The returned string is allocated and freed by GLFW. You + * should not free it yourself. It is valid until the next call to @ref + * glfwGetKeyName, or until the library is terminated. + * + * @thread_safety This function must only be called from the main thread. + * + * @sa @ref input_key_name + * + * @since Added in version 3.2. + * + * @ingroup input + */ +GLFWAPI const char* glfwGetKeyName(int key, int scancode); + +/*! @brief Returns the last reported state of a keyboard key for the specified + * window. + * + * This function returns the last state reported for the specified key to the + * specified window. The returned state is one of `GLFW_PRESS` or + * `GLFW_RELEASE`. The higher-level action `GLFW_REPEAT` is only reported to + * the key callback. + * + * If the `GLFW_STICKY_KEYS` input mode is enabled, this function returns + * `GLFW_PRESS` the first time you call it for a key that was pressed, even if + * that key has already been released. + * + * The key functions deal with physical keys, with [key tokens](@ref keys) + * named after their use on the standard US keyboard layout. If you want to + * input text, use the Unicode character callback instead. + * + * The [modifier key bit masks](@ref mods) are not key tokens and cannot be + * used with this function. + * + * __Do not use this function__ to implement [text input](@ref input_char). + * + * @param[in] window The desired window. + * @param[in] key The desired [keyboard key](@ref keys). `GLFW_KEY_UNKNOWN` is + * not a valid key for this function. + * @return One of `GLFW_PRESS` or `GLFW_RELEASE`. + * + * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref + * GLFW_INVALID_ENUM. + * + * @thread_safety This function must only be called from the main thread. + * + * @sa @ref input_key + * + * @since Added in version 1.0. + * @glfw3 Added window handle parameter. + * + * @ingroup input + */ +GLFWAPI int glfwGetKey(GLFWwindow* window, int key); + +/*! @brief Returns the last reported state of a mouse button for the specified + * window. + * + * This function returns the last state reported for the specified mouse button + * to the specified window. The returned state is one of `GLFW_PRESS` or + * `GLFW_RELEASE`. + * + * If the `GLFW_STICKY_MOUSE_BUTTONS` input mode is enabled, this function + * `GLFW_PRESS` the first time you call it for a mouse button that was pressed, + * even if that mouse button has already been released. + * + * @param[in] window The desired window. + * @param[in] button The desired [mouse button](@ref buttons). + * @return One of `GLFW_PRESS` or `GLFW_RELEASE`. + * + * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref + * GLFW_INVALID_ENUM. + * + * @thread_safety This function must only be called from the main thread. + * + * @sa @ref input_mouse_button + * + * @since Added in version 1.0. + * @glfw3 Added window handle parameter. + * + * @ingroup input + */ +GLFWAPI int glfwGetMouseButton(GLFWwindow* window, int button); + +/*! @brief Retrieves the position of the cursor relative to the client area of + * the window. + * + * This function returns the position of the cursor, in screen coordinates, + * relative to the upper-left corner of the client area of the specified + * window. + * + * If the cursor is disabled (with `GLFW_CURSOR_DISABLED`) then the cursor + * position is unbounded and limited only by the minimum and maximum values of + * a `double`. + * + * The coordinate can be converted to their integer equivalents with the + * `floor` function. Casting directly to an integer type works for positive + * coordinates, but fails for negative ones. + * + * Any or all of the position arguments may be `NULL`. If an error occurs, all + * non-`NULL` position arguments will be set to zero. + * + * @param[in] window The desired window. + * @param[out] xpos Where to store the cursor x-coordinate, relative to the + * left edge of the client area, or `NULL`. + * @param[out] ypos Where to store the cursor y-coordinate, relative to the to + * top edge of the client area, or `NULL`. + * + * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref + * GLFW_PLATFORM_ERROR. + * + * @thread_safety This function must only be called from the main thread. + * + * @sa @ref cursor_pos + * @sa glfwSetCursorPos + * + * @since Added in version 3.0. Replaces `glfwGetMousePos`. + * + * @ingroup input + */ +GLFWAPI void glfwGetCursorPos(GLFWwindow* window, double* xpos, double* ypos); + +/*! @brief Sets the position of the cursor, relative to the client area of the + * window. + * + * This function sets the position, in screen coordinates, of the cursor + * relative to the upper-left corner of the client area of the specified + * window. The window must have input focus. If the window does not have + * input focus when this function is called, it fails silently. + * + * __Do not use this function__ to implement things like camera controls. GLFW + * already provides the `GLFW_CURSOR_DISABLED` cursor mode that hides the + * cursor, transparently re-centers it and provides unconstrained cursor + * motion. See @ref glfwSetInputMode for more information. + * + * If the cursor mode is `GLFW_CURSOR_DISABLED` then the cursor position is + * unconstrained and limited only by the minimum and maximum values of + * a `double`. + * + * @param[in] window The desired window. + * @param[in] xpos The desired x-coordinate, relative to the left edge of the + * client area. + * @param[in] ypos The desired y-coordinate, relative to the top edge of the + * client area. + * + * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref + * GLFW_PLATFORM_ERROR. + * + * @remark @x11 Due to the asynchronous nature of X11, it may take a moment for + * the window focus event to arrive. This means you may not be able to set the + * cursor position directly after window creation. + * + * @thread_safety This function must only be called from the main thread. + * + * @sa @ref cursor_pos + * @sa glfwGetCursorPos + * + * @since Added in version 3.0. Replaces `glfwSetMousePos`. + * + * @ingroup input + */ +GLFWAPI void glfwSetCursorPos(GLFWwindow* window, double xpos, double ypos); + +/*! @brief Creates a custom cursor. + * + * Creates a new custom cursor image that can be set for a window with @ref + * glfwSetCursor. The cursor can be destroyed with @ref glfwDestroyCursor. + * Any remaining cursors are destroyed by @ref glfwTerminate. + * + * The pixels are 32-bit, little-endian, non-premultiplied RGBA, i.e. eight + * bits per channel. They are arranged canonically as packed sequential rows, + * starting from the top-left corner. + * + * The cursor hotspot is specified in pixels, relative to the upper-left corner + * of the cursor image. Like all other coordinate systems in GLFW, the X-axis + * points to the right and the Y-axis points down. + * + * @param[in] image The desired cursor image. + * @param[in] xhot The desired x-coordinate, in pixels, of the cursor hotspot. + * @param[in] yhot The desired y-coordinate, in pixels, of the cursor hotspot. + * @return The handle of the created cursor, or `NULL` if an + * [error](@ref error_handling) occurred. + * + * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref + * GLFW_PLATFORM_ERROR. + * + * @pointer_lifetime The specified image data is copied before this function + * returns. + * + * @reentrancy This function must not be called from a callback. + * + * @thread_safety This function must only be called from the main thread. + * + * @sa @ref cursor_object + * @sa glfwDestroyCursor + * @sa glfwCreateStandardCursor + * + * @since Added in version 3.1. + * + * @ingroup input + */ +GLFWAPI GLFWcursor* glfwCreateCursor(const GLFWimage* image, int xhot, int yhot); + +/*! @brief Creates a cursor with a standard shape. + * + * Returns a cursor with a [standard shape](@ref shapes), that can be set for + * a window with @ref glfwSetCursor. + * + * @param[in] shape One of the [standard shapes](@ref shapes). + * @return A new cursor ready to use or `NULL` if an + * [error](@ref error_handling) occurred. + * + * @errors Possible errors include @ref GLFW_NOT_INITIALIZED, @ref + * GLFW_INVALID_ENUM and @ref GLFW_PLATFORM_ERROR. + * + * @reentrancy This function must not be called from a callback. + * + * @thread_safety This function must only be called from the main thread. + * + * @sa @ref cursor_object + * @sa glfwCreateCursor + * + * @since Added in version 3.1. + * + * @ingroup input + */ +GLFWAPI GLFWcursor* glfwCreateStandardCursor(int shape); + +/*! @brief Destroys a cursor. + * + * This function destroys a cursor previously created with @ref + * glfwCreateCursor. Any remaining cursors will be destroyed by @ref + * glfwTerminate. + * + * @param[in] cursor The cursor object to destroy. + * + * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref + * GLFW_PLATFORM_ERROR. + * + * @reentrancy This function must not be called from a callback. + * + * @thread_safety This function must only be called from the main thread. + * + * @sa @ref cursor_object + * @sa glfwCreateCursor + * + * @since Added in version 3.1. + * + * @ingroup input + */ +GLFWAPI void glfwDestroyCursor(GLFWcursor* cursor); + +/*! @brief Sets the cursor for the window. + * + * This function sets the cursor image to be used when the cursor is over the + * client area of the specified window. The set cursor will only be visible + * when the [cursor mode](@ref cursor_mode) of the window is + * `GLFW_CURSOR_NORMAL`. + * + * On some platforms, the set cursor may not be visible unless the window also + * has input focus. + * + * @param[in] window The window to set the cursor for. + * @param[in] cursor The cursor to set, or `NULL` to switch back to the default + * arrow cursor. + * + * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref + * GLFW_PLATFORM_ERROR. + * + * @thread_safety This function must only be called from the main thread. + * + * @sa @ref cursor_object + * + * @since Added in version 3.1. + * + * @ingroup input + */ +GLFWAPI void glfwSetCursor(GLFWwindow* window, GLFWcursor* cursor); + +/*! @brief Sets the key callback. + * + * This function sets the key callback of the specified window, which is called + * when a key is pressed, repeated or released. + * + * The key functions deal with physical keys, with layout independent + * [key tokens](@ref keys) named after their values in the standard US keyboard + * layout. If you want to input text, use the + * [character callback](@ref glfwSetCharCallback) instead. + * + * When a window loses input focus, it will generate synthetic key release + * events for all pressed keys. You can tell these events from user-generated + * events by the fact that the synthetic ones are generated after the focus + * loss event has been processed, i.e. after the + * [window focus callback](@ref glfwSetWindowFocusCallback) has been called. + * + * The scancode of a key is specific to that platform or sometimes even to that + * machine. Scancodes are intended to allow users to bind keys that don't have + * a GLFW key token. Such keys have `key` set to `GLFW_KEY_UNKNOWN`, their + * state is not saved and so it cannot be queried with @ref glfwGetKey. + * + * Sometimes GLFW needs to generate synthetic key events, in which case the + * scancode may be zero. + * + * @param[in] window The window whose callback to set. + * @param[in] cbfun The new key callback, or `NULL` to remove the currently + * set callback. + * @return The previously set callback, or `NULL` if no callback was set or the + * library had not been [initialized](@ref intro_init). + * + * @errors Possible errors include @ref GLFW_NOT_INITIALIZED. + * + * @thread_safety This function must only be called from the main thread. + * + * @sa @ref input_key + * + * @since Added in version 1.0. + * @glfw3 Added window handle parameter and return value. + * + * @ingroup input + */ +GLFWAPI GLFWkeyfun glfwSetKeyCallback(GLFWwindow* window, GLFWkeyfun cbfun); + +/*! @brief Sets the Unicode character callback. + * + * This function sets the character callback of the specified window, which is + * called when a Unicode character is input. + * + * The character callback is intended for Unicode text input. As it deals with + * characters, it is keyboard layout dependent, whereas the + * [key callback](@ref glfwSetKeyCallback) is not. Characters do not map 1:1 + * to physical keys, as a key may produce zero, one or more characters. If you + * want to know whether a specific physical key was pressed or released, see + * the key callback instead. + * + * The character callback behaves as system text input normally does and will + * not be called if modifier keys are held down that would prevent normal text + * input on that platform, for example a Super (Command) key on OS X or Alt key + * on Windows. There is a + * [character with modifiers callback](@ref glfwSetCharModsCallback) that + * receives these events. + * + * @param[in] window The window whose callback to set. + * @param[in] cbfun The new callback, or `NULL` to remove the currently set + * callback. + * @return The previously set callback, or `NULL` if no callback was set or the + * library had not been [initialized](@ref intro_init). + * + * @errors Possible errors include @ref GLFW_NOT_INITIALIZED. + * + * @thread_safety This function must only be called from the main thread. + * + * @sa @ref input_char + * + * @since Added in version 2.4. + * @glfw3 Added window handle parameter and return value. + * + * @ingroup input + */ +GLFWAPI GLFWcharfun glfwSetCharCallback(GLFWwindow* window, GLFWcharfun cbfun); + +/*! @brief Sets the Unicode character with modifiers callback. + * + * This function sets the character with modifiers callback of the specified + * window, which is called when a Unicode character is input regardless of what + * modifier keys are used. + * + * The character with modifiers callback is intended for implementing custom + * Unicode character input. For regular Unicode text input, see the + * [character callback](@ref glfwSetCharCallback). Like the character + * callback, the character with modifiers callback deals with characters and is + * keyboard layout dependent. Characters do not map 1:1 to physical keys, as + * a key may produce zero, one or more characters. If you want to know whether + * a specific physical key was pressed or released, see the + * [key callback](@ref glfwSetKeyCallback) instead. + * + * @param[in] window The window whose callback to set. + * @param[in] cbfun The new callback, or `NULL` to remove the currently set + * callback. + * @return The previously set callback, or `NULL` if no callback was set or an + * error occurred. + * + * @errors Possible errors include @ref GLFW_NOT_INITIALIZED. + * + * @thread_safety This function must only be called from the main thread. + * + * @sa @ref input_char + * + * @since Added in version 3.1. + * + * @ingroup input + */ +GLFWAPI GLFWcharmodsfun glfwSetCharModsCallback(GLFWwindow* window, GLFWcharmodsfun cbfun); + +/*! @brief Sets the mouse button callback. + * + * This function sets the mouse button callback of the specified window, which + * is called when a mouse button is pressed or released. + * + * When a window loses input focus, it will generate synthetic mouse button + * release events for all pressed mouse buttons. You can tell these events + * from user-generated events by the fact that the synthetic ones are generated + * after the focus loss event has been processed, i.e. after the + * [window focus callback](@ref glfwSetWindowFocusCallback) has been called. + * + * @param[in] window The window whose callback to set. + * @param[in] cbfun The new callback, or `NULL` to remove the currently set + * callback. + * @return The previously set callback, or `NULL` if no callback was set or the + * library had not been [initialized](@ref intro_init). + * + * @errors Possible errors include @ref GLFW_NOT_INITIALIZED. + * + * @thread_safety This function must only be called from the main thread. + * + * @sa @ref input_mouse_button + * + * @since Added in version 1.0. + * @glfw3 Added window handle parameter and return value. + * + * @ingroup input + */ +GLFWAPI GLFWmousebuttonfun glfwSetMouseButtonCallback(GLFWwindow* window, GLFWmousebuttonfun cbfun); + +/*! @brief Sets the cursor position callback. + * + * This function sets the cursor position callback of the specified window, + * which is called when the cursor is moved. The callback is provided with the + * position, in screen coordinates, relative to the upper-left corner of the + * client area of the window. + * + * @param[in] window The window whose callback to set. + * @param[in] cbfun The new callback, or `NULL` to remove the currently set + * callback. + * @return The previously set callback, or `NULL` if no callback was set or the + * library had not been [initialized](@ref intro_init). + * + * @errors Possible errors include @ref GLFW_NOT_INITIALIZED. + * + * @thread_safety This function must only be called from the main thread. + * + * @sa @ref cursor_pos + * + * @since Added in version 3.0. Replaces `glfwSetMousePosCallback`. + * + * @ingroup input + */ +GLFWAPI GLFWcursorposfun glfwSetCursorPosCallback(GLFWwindow* window, GLFWcursorposfun cbfun); + +/*! @brief Sets the cursor enter/exit callback. + * + * This function sets the cursor boundary crossing callback of the specified + * window, which is called when the cursor enters or leaves the client area of + * the window. + * + * @param[in] window The window whose callback to set. + * @param[in] cbfun The new callback, or `NULL` to remove the currently set + * callback. + * @return The previously set callback, or `NULL` if no callback was set or the + * library had not been [initialized](@ref intro_init). + * + * @errors Possible errors include @ref GLFW_NOT_INITIALIZED. + * + * @thread_safety This function must only be called from the main thread. + * + * @sa @ref cursor_enter + * + * @since Added in version 3.0. + * + * @ingroup input + */ +GLFWAPI GLFWcursorenterfun glfwSetCursorEnterCallback(GLFWwindow* window, GLFWcursorenterfun cbfun); + +/*! @brief Sets the scroll callback. + * + * This function sets the scroll callback of the specified window, which is + * called when a scrolling device is used, such as a mouse wheel or scrolling + * area of a touchpad. + * + * The scroll callback receives all scrolling input, like that from a mouse + * wheel or a touchpad scrolling area. + * + * @param[in] window The window whose callback to set. + * @param[in] cbfun The new scroll callback, or `NULL` to remove the currently + * set callback. + * @return The previously set callback, or `NULL` if no callback was set or the + * library had not been [initialized](@ref intro_init). + * + * @errors Possible errors include @ref GLFW_NOT_INITIALIZED. + * + * @thread_safety This function must only be called from the main thread. + * + * @sa @ref scrolling + * + * @since Added in version 3.0. Replaces `glfwSetMouseWheelCallback`. + * + * @ingroup input + */ +GLFWAPI GLFWscrollfun glfwSetScrollCallback(GLFWwindow* window, GLFWscrollfun cbfun); + +/*! @brief Sets the file drop callback. + * + * This function sets the file drop callback of the specified window, which is + * called when one or more dragged files are dropped on the window. + * + * Because the path array and its strings may have been generated specifically + * for that event, they are not guaranteed to be valid after the callback has + * returned. If you wish to use them after the callback returns, you need to + * make a deep copy. + * + * @param[in] window The window whose callback to set. + * @param[in] cbfun The new file drop callback, or `NULL` to remove the + * currently set callback. + * @return The previously set callback, or `NULL` if no callback was set or the + * library had not been [initialized](@ref intro_init). + * + * @errors Possible errors include @ref GLFW_NOT_INITIALIZED. + * + * @thread_safety This function must only be called from the main thread. + * + * @sa @ref path_drop + * + * @since Added in version 3.1. + * + * @ingroup input + */ +GLFWAPI GLFWdropfun glfwSetDropCallback(GLFWwindow* window, GLFWdropfun cbfun); + +/*! @brief Returns whether the specified joystick is present. + * + * This function returns whether the specified joystick is present. + * + * @param[in] joy The [joystick](@ref joysticks) to query. + * @return `GLFW_TRUE` if the joystick is present, or `GLFW_FALSE` otherwise. + * + * @errors Possible errors include @ref GLFW_NOT_INITIALIZED, @ref + * GLFW_INVALID_ENUM and @ref GLFW_PLATFORM_ERROR. + * + * @thread_safety This function must only be called from the main thread. + * + * @sa @ref joystick + * + * @since Added in version 3.0. Replaces `glfwGetJoystickParam`. + * + * @ingroup input + */ +GLFWAPI int glfwJoystickPresent(int joy); + +/*! @brief Returns the values of all axes of the specified joystick. + * + * This function returns the values of all axes of the specified joystick. + * Each element in the array is a value between -1.0 and 1.0. + * + * Querying a joystick slot with no device present is not an error, but will + * cause this function to return `NULL`. Call @ref glfwJoystickPresent to + * check device presence. + * + * @param[in] joy The [joystick](@ref joysticks) to query. + * @param[out] count Where to store the number of axis values in the returned + * array. This is set to zero if an error occurred. + * @return An array of axis values, or `NULL` if the joystick is not present. + * + * @errors Possible errors include @ref GLFW_NOT_INITIALIZED, @ref + * GLFW_INVALID_ENUM and @ref GLFW_PLATFORM_ERROR. + * + * @pointer_lifetime The returned array is allocated and freed by GLFW. You + * should not free it yourself. It is valid until the specified joystick is + * disconnected, this function is called again for that joystick or the library + * is terminated. + * + * @thread_safety This function must only be called from the main thread. + * + * @sa @ref joystick_axis + * + * @since Added in version 3.0. Replaces `glfwGetJoystickPos`. + * + * @ingroup input + */ +GLFWAPI const float* glfwGetJoystickAxes(int joy, int* count); + +/*! @brief Returns the state of all buttons of the specified joystick. + * + * This function returns the state of all buttons of the specified joystick. + * Each element in the array is either `GLFW_PRESS` or `GLFW_RELEASE`. + * + * Querying a joystick slot with no device present is not an error, but will + * cause this function to return `NULL`. Call @ref glfwJoystickPresent to + * check device presence. + * + * @param[in] joy The [joystick](@ref joysticks) to query. + * @param[out] count Where to store the number of button states in the returned + * array. This is set to zero if an error occurred. + * @return An array of button states, or `NULL` if the joystick is not present. + * + * @errors Possible errors include @ref GLFW_NOT_INITIALIZED, @ref + * GLFW_INVALID_ENUM and @ref GLFW_PLATFORM_ERROR. + * + * @pointer_lifetime The returned array is allocated and freed by GLFW. You + * should not free it yourself. It is valid until the specified joystick is + * disconnected, this function is called again for that joystick or the library + * is terminated. + * + * @thread_safety This function must only be called from the main thread. + * + * @sa @ref joystick_button + * + * @since Added in version 2.2. + * @glfw3 Changed to return a dynamic array. + * + * @ingroup input + */ +GLFWAPI const unsigned char* glfwGetJoystickButtons(int joy, int* count); + +/*! @brief Returns the name of the specified joystick. + * + * This function returns the name, encoded as UTF-8, of the specified joystick. + * The returned string is allocated and freed by GLFW. You should not free it + * yourself. + * + * Querying a joystick slot with no device present is not an error, but will + * cause this function to return `NULL`. Call @ref glfwJoystickPresent to + * check device presence. + * + * @param[in] joy The [joystick](@ref joysticks) to query. + * @return The UTF-8 encoded name of the joystick, or `NULL` if the joystick + * is not present. + * + * @errors Possible errors include @ref GLFW_NOT_INITIALIZED, @ref + * GLFW_INVALID_ENUM and @ref GLFW_PLATFORM_ERROR. + * + * @pointer_lifetime The returned string is allocated and freed by GLFW. You + * should not free it yourself. It is valid until the specified joystick is + * disconnected, this function is called again for that joystick or the library + * is terminated. + * + * @thread_safety This function must only be called from the main thread. + * + * @sa @ref joystick_name + * + * @since Added in version 3.0. + * + * @ingroup input + */ +GLFWAPI const char* glfwGetJoystickName(int joy); + +/*! @brief Sets the joystick configuration callback. + * + * This function sets the joystick configuration callback, or removes the + * currently set callback. This is called when a joystick is connected to or + * disconnected from the system. + * + * @param[in] cbfun The new callback, or `NULL` to remove the currently set + * callback. + * @return The previously set callback, or `NULL` if no callback was set or the + * library had not been [initialized](@ref intro_init). + * + * @errors Possible errors include @ref GLFW_NOT_INITIALIZED. + * + * @thread_safety This function must only be called from the main thread. + * + * @sa @ref joystick_event + * + * @since Added in version 3.2. + * + * @ingroup input + */ +GLFWAPI GLFWjoystickfun glfwSetJoystickCallback(GLFWjoystickfun cbfun); + +/*! @brief Sets the clipboard to the specified string. + * + * This function sets the system clipboard to the specified, UTF-8 encoded + * string. + * + * @param[in] window The window that will own the clipboard contents. + * @param[in] string A UTF-8 encoded string. + * + * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref + * GLFW_PLATFORM_ERROR. + * + * @pointer_lifetime The specified string is copied before this function + * returns. + * + * @thread_safety This function must only be called from the main thread. + * + * @sa @ref clipboard + * @sa glfwGetClipboardString + * + * @since Added in version 3.0. + * + * @ingroup input + */ +GLFWAPI void glfwSetClipboardString(GLFWwindow* window, const char* string); + +/*! @brief Returns the contents of the clipboard as a string. + * + * This function returns the contents of the system clipboard, if it contains + * or is convertible to a UTF-8 encoded string. If the clipboard is empty or + * if its contents cannot be converted, `NULL` is returned and a @ref + * GLFW_FORMAT_UNAVAILABLE error is generated. + * + * @param[in] window The window that will request the clipboard contents. + * @return The contents of the clipboard as a UTF-8 encoded string, or `NULL` + * if an [error](@ref error_handling) occurred. + * + * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref + * GLFW_PLATFORM_ERROR. + * + * @pointer_lifetime The returned string is allocated and freed by GLFW. You + * should not free it yourself. It is valid until the next call to @ref + * glfwGetClipboardString or @ref glfwSetClipboardString, or until the library + * is terminated. + * + * @thread_safety This function must only be called from the main thread. + * + * @sa @ref clipboard + * @sa glfwSetClipboardString + * + * @since Added in version 3.0. + * + * @ingroup input + */ +GLFWAPI const char* glfwGetClipboardString(GLFWwindow* window); + +/*! @brief Returns the value of the GLFW timer. + * + * This function returns the value of the GLFW timer. Unless the timer has + * been set using @ref glfwSetTime, the timer measures time elapsed since GLFW + * was initialized. + * + * The resolution of the timer is system dependent, but is usually on the order + * of a few micro- or nanoseconds. It uses the highest-resolution monotonic + * time source on each supported platform. + * + * @return The current value, in seconds, or zero if an + * [error](@ref error_handling) occurred. + * + * @errors Possible errors include @ref GLFW_NOT_INITIALIZED. + * + * @thread_safety This function may be called from any thread. Reading of the + * internal timer offset is not atomic. + * + * @sa @ref time + * + * @since Added in version 1.0. + * + * @ingroup input + */ +GLFWAPI double glfwGetTime(void); + +/*! @brief Sets the GLFW timer. + * + * This function sets the value of the GLFW timer. It then continues to count + * up from that value. The value must be a positive finite number less than + * or equal to 18446744073.0, which is approximately 584.5 years. + * + * @param[in] time The new value, in seconds. + * + * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref + * GLFW_INVALID_VALUE. + * + * @remark The upper limit of the timer is calculated as + * floor((264 - 1) / 109) and is due to implementations + * storing nanoseconds in 64 bits. The limit may be increased in the future. + * + * @thread_safety This function may be called from any thread. Writing of the + * internal timer offset is not atomic. + * + * @sa @ref time + * + * @since Added in version 2.2. + * + * @ingroup input + */ +GLFWAPI void glfwSetTime(double time); + +/*! @brief Returns the current value of the raw timer. + * + * This function returns the current value of the raw timer, measured in + * 1 / frequency seconds. To get the frequency, call @ref + * glfwGetTimerFrequency. + * + * @return The value of the timer, or zero if an + * [error](@ref error_handling) occurred. + * + * @errors Possible errors include @ref GLFW_NOT_INITIALIZED. + * + * @thread_safety This function may be called from any thread. + * + * @sa @ref time + * @sa glfwGetTimerFrequency + * + * @since Added in version 3.2. + * + * @ingroup input + */ +GLFWAPI uint64_t glfwGetTimerValue(void); + +/*! @brief Returns the frequency, in Hz, of the raw timer. + * + * This function returns the frequency, in Hz, of the raw timer. + * + * @return The frequency of the timer, in Hz, or zero if an + * [error](@ref error_handling) occurred. + * + * @errors Possible errors include @ref GLFW_NOT_INITIALIZED. + * + * @thread_safety This function may be called from any thread. + * + * @sa @ref time + * @sa glfwGetTimerValue + * + * @since Added in version 3.2. + * + * @ingroup input + */ +GLFWAPI uint64_t glfwGetTimerFrequency(void); + +/*! @brief Makes the context of the specified window current for the calling + * thread. + * + * This function makes the OpenGL or OpenGL ES context of the specified window + * current on the calling thread. A context can only be made current on + * a single thread at a time and each thread can have only a single current + * context at a time. + * + * By default, making a context non-current implicitly forces a pipeline flush. + * On machines that support `GL_KHR_context_flush_control`, you can control + * whether a context performs this flush by setting the + * [GLFW_CONTEXT_RELEASE_BEHAVIOR](@ref window_hints_ctx) window hint. + * + * The specified window must have an OpenGL or OpenGL ES context. Specifying + * a window without a context will generate a @ref GLFW_NO_WINDOW_CONTEXT + * error. + * + * @param[in] window The window whose context to make current, or `NULL` to + * detach the current context. + * + * @errors Possible errors include @ref GLFW_NOT_INITIALIZED, @ref + * GLFW_NO_WINDOW_CONTEXT and @ref GLFW_PLATFORM_ERROR. + * + * @thread_safety This function may be called from any thread. + * + * @sa @ref context_current + * @sa glfwGetCurrentContext + * + * @since Added in version 3.0. + * + * @ingroup context + */ +GLFWAPI void glfwMakeContextCurrent(GLFWwindow* window); + +/*! @brief Returns the window whose context is current on the calling thread. + * + * This function returns the window whose OpenGL or OpenGL ES context is + * current on the calling thread. + * + * @return The window whose context is current, or `NULL` if no window's + * context is current. + * + * @errors Possible errors include @ref GLFW_NOT_INITIALIZED. + * + * @thread_safety This function may be called from any thread. + * + * @sa @ref context_current + * @sa glfwMakeContextCurrent + * + * @since Added in version 3.0. + * + * @ingroup context + */ +GLFWAPI GLFWwindow* glfwGetCurrentContext(void); + +/*! @brief Swaps the front and back buffers of the specified window. + * + * This function swaps the front and back buffers of the specified window when + * rendering with OpenGL or OpenGL ES. If the swap interval is greater than + * zero, the GPU driver waits the specified number of screen updates before + * swapping the buffers. + * + * The specified window must have an OpenGL or OpenGL ES context. Specifying + * a window without a context will generate a @ref GLFW_NO_WINDOW_CONTEXT + * error. + * + * This function does not apply to Vulkan. If you are rendering with Vulkan, + * see `vkQueuePresentKHR` instead. + * + * @param[in] window The window whose buffers to swap. + * + * @errors Possible errors include @ref GLFW_NOT_INITIALIZED, @ref + * GLFW_NO_WINDOW_CONTEXT and @ref GLFW_PLATFORM_ERROR. + * + * @remark __EGL:__ The context of the specified window must be current on the + * calling thread. + * + * @thread_safety This function may be called from any thread. + * + * @sa @ref buffer_swap + * @sa glfwSwapInterval + * + * @since Added in version 1.0. + * @glfw3 Added window handle parameter. + * + * @ingroup window + */ +GLFWAPI void glfwSwapBuffers(GLFWwindow* window); + +/*! @brief Sets the swap interval for the current context. + * + * This function sets the swap interval for the current OpenGL or OpenGL ES + * context, i.e. the number of screen updates to wait from the time @ref + * glfwSwapBuffers was called before swapping the buffers and returning. This + * is sometimes called _vertical synchronization_, _vertical retrace + * synchronization_ or just _vsync_. + * + * Contexts that support either of the `WGL_EXT_swap_control_tear` and + * `GLX_EXT_swap_control_tear` extensions also accept negative swap intervals, + * which allow the driver to swap even if a frame arrives a little bit late. + * You can check for the presence of these extensions using @ref + * glfwExtensionSupported. For more information about swap tearing, see the + * extension specifications. + * + * A context must be current on the calling thread. Calling this function + * without a current context will cause a @ref GLFW_NO_CURRENT_CONTEXT error. + * + * This function does not apply to Vulkan. If you are rendering with Vulkan, + * see the present mode of your swapchain instead. + * + * @param[in] interval The minimum number of screen updates to wait for + * until the buffers are swapped by @ref glfwSwapBuffers. + * + * @errors Possible errors include @ref GLFW_NOT_INITIALIZED, @ref + * GLFW_NO_CURRENT_CONTEXT and @ref GLFW_PLATFORM_ERROR. + * + * @remark This function is not called during context creation, leaving the + * swap interval set to whatever is the default on that platform. This is done + * because some swap interval extensions used by GLFW do not allow the swap + * interval to be reset to zero once it has been set to a non-zero value. + * + * @remark Some GPU drivers do not honor the requested swap interval, either + * because of a user setting that overrides the application's request or due to + * bugs in the driver. + * + * @thread_safety This function may be called from any thread. + * + * @sa @ref buffer_swap + * @sa glfwSwapBuffers + * + * @since Added in version 1.0. + * + * @ingroup context + */ +GLFWAPI void glfwSwapInterval(int interval); + +/*! @brief Returns whether the specified extension is available. + * + * This function returns whether the specified + * [API extension](@ref context_glext) is supported by the current OpenGL or + * OpenGL ES context. It searches both for client API extension and context + * creation API extensions. + * + * A context must be current on the calling thread. Calling this function + * without a current context will cause a @ref GLFW_NO_CURRENT_CONTEXT error. + * + * As this functions retrieves and searches one or more extension strings each + * call, it is recommended that you cache its results if it is going to be used + * frequently. The extension strings will not change during the lifetime of + * a context, so there is no danger in doing this. + * + * This function does not apply to Vulkan. If you are using Vulkan, see @ref + * glfwGetRequiredInstanceExtensions, `vkEnumerateInstanceExtensionProperties` + * and `vkEnumerateDeviceExtensionProperties` instead. + * + * @param[in] extension The ASCII encoded name of the extension. + * @return `GLFW_TRUE` if the extension is available, or `GLFW_FALSE` + * otherwise. + * + * @errors Possible errors include @ref GLFW_NOT_INITIALIZED, @ref + * GLFW_NO_CURRENT_CONTEXT, @ref GLFW_INVALID_VALUE and @ref + * GLFW_PLATFORM_ERROR. + * + * @thread_safety This function may be called from any thread. + * + * @sa @ref context_glext + * @sa glfwGetProcAddress + * + * @since Added in version 1.0. + * + * @ingroup context + */ +GLFWAPI int glfwExtensionSupported(const char* extension); + +/*! @brief Returns the address of the specified function for the current + * context. + * + * This function returns the address of the specified OpenGL or OpenGL ES + * [core or extension function](@ref context_glext), if it is supported + * by the current context. + * + * A context must be current on the calling thread. Calling this function + * without a current context will cause a @ref GLFW_NO_CURRENT_CONTEXT error. + * + * This function does not apply to Vulkan. If you are rendering with Vulkan, + * see @ref glfwGetInstanceProcAddress, `vkGetInstanceProcAddr` and + * `vkGetDeviceProcAddr` instead. + * + * @param[in] procname The ASCII encoded name of the function. + * @return The address of the function, or `NULL` if an + * [error](@ref error_handling) occurred. + * + * @errors Possible errors include @ref GLFW_NOT_INITIALIZED, @ref + * GLFW_NO_CURRENT_CONTEXT and @ref GLFW_PLATFORM_ERROR. + * + * @remark The address of a given function is not guaranteed to be the same + * between contexts. + * + * @remark This function may return a non-`NULL` address despite the + * associated version or extension not being available. Always check the + * context version or extension string first. + * + * @pointer_lifetime The returned function pointer is valid until the context + * is destroyed or the library is terminated. + * + * @thread_safety This function may be called from any thread. + * + * @sa @ref context_glext + * @sa glfwExtensionSupported + * + * @since Added in version 1.0. + * + * @ingroup context + */ +GLFWAPI GLFWglproc glfwGetProcAddress(const char* procname); + +/*! @brief Returns whether the Vulkan loader has been found. + * + * This function returns whether the Vulkan loader has been found. This check + * is performed by @ref glfwInit. + * + * The availability of a Vulkan loader does not by itself guarantee that window + * surface creation or even device creation is possible. Call @ref + * glfwGetRequiredInstanceExtensions to check whether the extensions necessary + * for Vulkan surface creation are available and @ref + * glfwGetPhysicalDevicePresentationSupport to check whether a queue family of + * a physical device supports image presentation. + * + * @return `GLFW_TRUE` if Vulkan is available, or `GLFW_FALSE` otherwise. + * + * @errors Possible errors include @ref GLFW_NOT_INITIALIZED. + * + * @thread_safety This function may be called from any thread. + * + * @sa @ref vulkan_support + * + * @since Added in version 3.2. + * + * @ingroup vulkan + */ +GLFWAPI int glfwVulkanSupported(void); + +/*! @brief Returns the Vulkan instance extensions required by GLFW. + * + * This function returns an array of names of Vulkan instance extensions required + * by GLFW for creating Vulkan surfaces for GLFW windows. If successful, the + * list will always contains `VK_KHR_surface`, so if you don't require any + * additional extensions you can pass this list directly to the + * `VkInstanceCreateInfo` struct. + * + * If Vulkan is not available on the machine, this function returns `NULL` and + * generates a @ref GLFW_API_UNAVAILABLE error. Call @ref glfwVulkanSupported + * to check whether Vulkan is available. + * + * If Vulkan is available but no set of extensions allowing window surface + * creation was found, this function returns `NULL`. You may still use Vulkan + * for off-screen rendering and compute work. + * + * @param[out] count Where to store the number of extensions in the returned + * array. This is set to zero if an error occurred. + * @return An array of ASCII encoded extension names, or `NULL` if an + * [error](@ref error_handling) occurred. + * + * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref + * GLFW_API_UNAVAILABLE. + * + * @remarks Additional extensions may be required by future versions of GLFW. + * You should check if any extensions you wish to enable are already in the + * returned array, as it is an error to specify an extension more than once in + * the `VkInstanceCreateInfo` struct. + * + * @pointer_lifetime The returned array is allocated and freed by GLFW. You + * should not free it yourself. It is guaranteed to be valid only until the + * library is terminated. + * + * @thread_safety This function may be called from any thread. + * + * @sa @ref vulkan_ext + * @sa glfwCreateWindowSurface + * + * @since Added in version 3.2. + * + * @ingroup vulkan + */ +GLFWAPI const char** glfwGetRequiredInstanceExtensions(uint32_t* count); + +#if defined(VK_VERSION_1_0) + +/*! @brief Returns the address of the specified Vulkan instance function. + * + * This function returns the address of the specified Vulkan core or extension + * function for the specified instance. If instance is set to `NULL` it can + * return any function exported from the Vulkan loader, including at least the + * following functions: + * + * - `vkEnumerateInstanceExtensionProperties` + * - `vkEnumerateInstanceLayerProperties` + * - `vkCreateInstance` + * - `vkGetInstanceProcAddr` + * + * If Vulkan is not available on the machine, this function returns `NULL` and + * generates a @ref GLFW_API_UNAVAILABLE error. Call @ref glfwVulkanSupported + * to check whether Vulkan is available. + * + * This function is equivalent to calling `vkGetInstanceProcAddr` with + * a platform-specific query of the Vulkan loader as a fallback. + * + * @param[in] instance The Vulkan instance to query, or `NULL` to retrieve + * functions related to instance creation. + * @param[in] procname The ASCII encoded name of the function. + * @return The address of the function, or `NULL` if an + * [error](@ref error_handling) occurred. + * + * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref + * GLFW_API_UNAVAILABLE. + * + * @pointer_lifetime The returned function pointer is valid until the library + * is terminated. + * + * @thread_safety This function may be called from any thread. + * + * @sa @ref vulkan_proc + * + * @since Added in version 3.2. + * + * @ingroup vulkan + */ +GLFWAPI GLFWvkproc glfwGetInstanceProcAddress(VkInstance instance, const char* procname); + +/*! @brief Returns whether the specified queue family can present images. + * + * This function returns whether the specified queue family of the specified + * physical device supports presentation to the platform GLFW was built for. + * + * If Vulkan or the required window surface creation instance extensions are + * not available on the machine, or if the specified instance was not created + * with the required extensions, this function returns `GLFW_FALSE` and + * generates a @ref GLFW_API_UNAVAILABLE error. Call @ref glfwVulkanSupported + * to check whether Vulkan is available and @ref + * glfwGetRequiredInstanceExtensions to check what instance extensions are + * required. + * + * @param[in] instance The instance that the physical device belongs to. + * @param[in] device The physical device that the queue family belongs to. + * @param[in] queuefamily The index of the queue family to query. + * @return `GLFW_TRUE` if the queue family supports presentation, or + * `GLFW_FALSE` otherwise. + * + * @errors Possible errors include @ref GLFW_NOT_INITIALIZED, @ref + * GLFW_API_UNAVAILABLE and @ref GLFW_PLATFORM_ERROR. + * + * @thread_safety This function may be called from any thread. For + * synchronization details of Vulkan objects, see the Vulkan specification. + * + * @sa @ref vulkan_present + * + * @since Added in version 3.2. + * + * @ingroup vulkan + */ +GLFWAPI int glfwGetPhysicalDevicePresentationSupport(VkInstance instance, VkPhysicalDevice device, uint32_t queuefamily); + +/*! @brief Creates a Vulkan surface for the specified window. + * + * This function creates a Vulkan surface for the specified window. + * + * If the Vulkan loader was not found at initialization, this function returns + * `VK_ERROR_INITIALIZATION_FAILED` and generates a @ref GLFW_API_UNAVAILABLE + * error. Call @ref glfwVulkanSupported to check whether the Vulkan loader was + * found. + * + * If the required window surface creation instance extensions are not + * available or if the specified instance was not created with these extensions + * enabled, this function returns `VK_ERROR_EXTENSION_NOT_PRESENT` and + * generates a @ref GLFW_API_UNAVAILABLE error. Call @ref + * glfwGetRequiredInstanceExtensions to check what instance extensions are + * required. + * + * The window surface must be destroyed before the specified Vulkan instance. + * It is the responsibility of the caller to destroy the window surface. GLFW + * does not destroy it for you. Call `vkDestroySurfaceKHR` to destroy the + * surface. + * + * @param[in] instance The Vulkan instance to create the surface in. + * @param[in] window The window to create the surface for. + * @param[in] allocator The allocator to use, or `NULL` to use the default + * allocator. + * @param[out] surface Where to store the handle of the surface. This is set + * to `VK_NULL_HANDLE` if an error occurred. + * @return `VK_SUCCESS` if successful, or a Vulkan error code if an + * [error](@ref error_handling) occurred. + * + * @errors Possible errors include @ref GLFW_NOT_INITIALIZED, @ref + * GLFW_API_UNAVAILABLE and @ref GLFW_PLATFORM_ERROR. + * + * @remarks If an error occurs before the creation call is made, GLFW returns + * the Vulkan error code most appropriate for the error. Appropriate use of + * @ref glfwVulkanSupported and @ref glfwGetRequiredInstanceExtensions should + * eliminate almost all occurrences of these errors. + * + * @thread_safety This function may be called from any thread. For + * synchronization details of Vulkan objects, see the Vulkan specification. + * + * @sa @ref vulkan_surface + * @sa glfwGetRequiredInstanceExtensions + * + * @since Added in version 3.2. + * + * @ingroup vulkan + */ +GLFWAPI VkResult glfwCreateWindowSurface(VkInstance instance, GLFWwindow* window, const VkAllocationCallbacks* allocator, VkSurfaceKHR* surface); + +#endif /*VK_VERSION_1_0*/ + + +/************************************************************************* + * Global definition cleanup + *************************************************************************/ + +/* ------------------- BEGIN SYSTEM/COMPILER SPECIFIC -------------------- */ + +#ifdef GLFW_WINGDIAPI_DEFINED + #undef WINGDIAPI + #undef GLFW_WINGDIAPI_DEFINED +#endif + +#ifdef GLFW_CALLBACK_DEFINED + #undef CALLBACK + #undef GLFW_CALLBACK_DEFINED +#endif + +/* -------------------- END SYSTEM/COMPILER SPECIFIC --------------------- */ + + +#ifdef __cplusplus +} +#endif + +#endif /* _glfw3_h_ */ + diff --git a/External/imgui-docking/examples/libs/glfw/include/GLFW/glfw3native.h b/External/imgui-docking/examples/libs/glfw/include/GLFW/glfw3native.h new file mode 100644 index 0000000..9fa955e --- /dev/null +++ b/External/imgui-docking/examples/libs/glfw/include/GLFW/glfw3native.h @@ -0,0 +1,456 @@ +/************************************************************************* + * GLFW 3.2 - www.glfw.org + * A library for OpenGL, window and input + *------------------------------------------------------------------------ + * Copyright (c) 2002-2006 Marcus Geelnard + * Copyright (c) 2006-2010 Camilla Berglund + * + * This software is provided 'as-is', without any express or implied + * warranty. In no event will the authors be held liable for any damages + * arising from the use of this software. + * + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it + * freely, subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not + * claim that you wrote the original software. If you use this software + * in a product, an acknowledgment in the product documentation would + * be appreciated but is not required. + * + * 2. Altered source versions must be plainly marked as such, and must not + * be misrepresented as being the original software. + * + * 3. This notice may not be removed or altered from any source + * distribution. + * + *************************************************************************/ + +#ifndef _glfw3_native_h_ +#define _glfw3_native_h_ + +#ifdef __cplusplus +extern "C" { +#endif + + +/************************************************************************* + * Doxygen documentation + *************************************************************************/ + +/*! @file glfw3native.h + * @brief The header of the native access functions. + * + * This is the header file of the native access functions. See @ref native for + * more information. + */ +/*! @defgroup native Native access + * + * **By using the native access functions you assert that you know what you're + * doing and how to fix problems caused by using them. If you don't, you + * shouldn't be using them.** + * + * Before the inclusion of @ref glfw3native.h, you may define exactly one + * window system API macro and zero or more context creation API macros. + * + * The chosen backends must match those the library was compiled for. Failure + * to do this will cause a link-time error. + * + * The available window API macros are: + * * `GLFW_EXPOSE_NATIVE_WIN32` + * * `GLFW_EXPOSE_NATIVE_COCOA` + * * `GLFW_EXPOSE_NATIVE_X11` + * * `GLFW_EXPOSE_NATIVE_WAYLAND` + * * `GLFW_EXPOSE_NATIVE_MIR` + * + * The available context API macros are: + * * `GLFW_EXPOSE_NATIVE_WGL` + * * `GLFW_EXPOSE_NATIVE_NSGL` + * * `GLFW_EXPOSE_NATIVE_GLX` + * * `GLFW_EXPOSE_NATIVE_EGL` + * + * These macros select which of the native access functions that are declared + * and which platform-specific headers to include. It is then up your (by + * definition platform-specific) code to handle which of these should be + * defined. + */ + + +/************************************************************************* + * System headers and types + *************************************************************************/ + +#if defined(GLFW_EXPOSE_NATIVE_WIN32) + // This is a workaround for the fact that glfw3.h needs to export APIENTRY (for + // example to allow applications to correctly declare a GL_ARB_debug_output + // callback) but windows.h assumes no one will define APIENTRY before it does + #undef APIENTRY + #include +#elif defined(GLFW_EXPOSE_NATIVE_COCOA) + #include + #if defined(__OBJC__) + #import + #else + typedef void* id; + #endif +#elif defined(GLFW_EXPOSE_NATIVE_X11) + #include + #include +#elif defined(GLFW_EXPOSE_NATIVE_WAYLAND) + #include +#elif defined(GLFW_EXPOSE_NATIVE_MIR) + #include +#endif + +#if defined(GLFW_EXPOSE_NATIVE_WGL) + /* WGL is declared by windows.h */ +#endif +#if defined(GLFW_EXPOSE_NATIVE_NSGL) + /* NSGL is declared by Cocoa.h */ +#endif +#if defined(GLFW_EXPOSE_NATIVE_GLX) + #include +#endif +#if defined(GLFW_EXPOSE_NATIVE_EGL) + #include +#endif + + +/************************************************************************* + * Functions + *************************************************************************/ + +#if defined(GLFW_EXPOSE_NATIVE_WIN32) +/*! @brief Returns the adapter device name of the specified monitor. + * + * @return The UTF-8 encoded adapter device name (for example `\\.\DISPLAY1`) + * of the specified monitor, or `NULL` if an [error](@ref error_handling) + * occurred. + * + * @thread_safety This function may be called from any thread. Access is not + * synchronized. + * + * @since Added in version 3.1. + * + * @ingroup native + */ +GLFWAPI const char* glfwGetWin32Adapter(GLFWmonitor* monitor); + +/*! @brief Returns the display device name of the specified monitor. + * + * @return The UTF-8 encoded display device name (for example + * `\\.\DISPLAY1\Monitor0`) of the specified monitor, or `NULL` if an + * [error](@ref error_handling) occurred. + * + * @thread_safety This function may be called from any thread. Access is not + * synchronized. + * + * @since Added in version 3.1. + * + * @ingroup native + */ +GLFWAPI const char* glfwGetWin32Monitor(GLFWmonitor* monitor); + +/*! @brief Returns the `HWND` of the specified window. + * + * @return The `HWND` of the specified window, or `NULL` if an + * [error](@ref error_handling) occurred. + * + * @thread_safety This function may be called from any thread. Access is not + * synchronized. + * + * @since Added in version 3.0. + * + * @ingroup native + */ +GLFWAPI HWND glfwGetWin32Window(GLFWwindow* window); +#endif + +#if defined(GLFW_EXPOSE_NATIVE_WGL) +/*! @brief Returns the `HGLRC` of the specified window. + * + * @return The `HGLRC` of the specified window, or `NULL` if an + * [error](@ref error_handling) occurred. + * + * @thread_safety This function may be called from any thread. Access is not + * synchronized. + * + * @since Added in version 3.0. + * + * @ingroup native + */ +GLFWAPI HGLRC glfwGetWGLContext(GLFWwindow* window); +#endif + +#if defined(GLFW_EXPOSE_NATIVE_COCOA) +/*! @brief Returns the `CGDirectDisplayID` of the specified monitor. + * + * @return The `CGDirectDisplayID` of the specified monitor, or + * `kCGNullDirectDisplay` if an [error](@ref error_handling) occurred. + * + * @thread_safety This function may be called from any thread. Access is not + * synchronized. + * + * @since Added in version 3.1. + * + * @ingroup native + */ +GLFWAPI CGDirectDisplayID glfwGetCocoaMonitor(GLFWmonitor* monitor); + +/*! @brief Returns the `NSWindow` of the specified window. + * + * @return The `NSWindow` of the specified window, or `nil` if an + * [error](@ref error_handling) occurred. + * + * @thread_safety This function may be called from any thread. Access is not + * synchronized. + * + * @since Added in version 3.0. + * + * @ingroup native + */ +GLFWAPI id glfwGetCocoaWindow(GLFWwindow* window); +#endif + +#if defined(GLFW_EXPOSE_NATIVE_NSGL) +/*! @brief Returns the `NSOpenGLContext` of the specified window. + * + * @return The `NSOpenGLContext` of the specified window, or `nil` if an + * [error](@ref error_handling) occurred. + * + * @thread_safety This function may be called from any thread. Access is not + * synchronized. + * + * @since Added in version 3.0. + * + * @ingroup native + */ +GLFWAPI id glfwGetNSGLContext(GLFWwindow* window); +#endif + +#if defined(GLFW_EXPOSE_NATIVE_X11) +/*! @brief Returns the `Display` used by GLFW. + * + * @return The `Display` used by GLFW, or `NULL` if an + * [error](@ref error_handling) occurred. + * + * @thread_safety This function may be called from any thread. Access is not + * synchronized. + * + * @since Added in version 3.0. + * + * @ingroup native + */ +GLFWAPI Display* glfwGetX11Display(void); + +/*! @brief Returns the `RRCrtc` of the specified monitor. + * + * @return The `RRCrtc` of the specified monitor, or `None` if an + * [error](@ref error_handling) occurred. + * + * @thread_safety This function may be called from any thread. Access is not + * synchronized. + * + * @since Added in version 3.1. + * + * @ingroup native + */ +GLFWAPI RRCrtc glfwGetX11Adapter(GLFWmonitor* monitor); + +/*! @brief Returns the `RROutput` of the specified monitor. + * + * @return The `RROutput` of the specified monitor, or `None` if an + * [error](@ref error_handling) occurred. + * + * @thread_safety This function may be called from any thread. Access is not + * synchronized. + * + * @since Added in version 3.1. + * + * @ingroup native + */ +GLFWAPI RROutput glfwGetX11Monitor(GLFWmonitor* monitor); + +/*! @brief Returns the `Window` of the specified window. + * + * @return The `Window` of the specified window, or `None` if an + * [error](@ref error_handling) occurred. + * + * @thread_safety This function may be called from any thread. Access is not + * synchronized. + * + * @since Added in version 3.0. + * + * @ingroup native + */ +GLFWAPI Window glfwGetX11Window(GLFWwindow* window); +#endif + +#if defined(GLFW_EXPOSE_NATIVE_GLX) +/*! @brief Returns the `GLXContext` of the specified window. + * + * @return The `GLXContext` of the specified window, or `NULL` if an + * [error](@ref error_handling) occurred. + * + * @thread_safety This function may be called from any thread. Access is not + * synchronized. + * + * @since Added in version 3.0. + * + * @ingroup native + */ +GLFWAPI GLXContext glfwGetGLXContext(GLFWwindow* window); + +/*! @brief Returns the `GLXWindow` of the specified window. + * + * @return The `GLXWindow` of the specified window, or `None` if an + * [error](@ref error_handling) occurred. + * + * @thread_safety This function may be called from any thread. Access is not + * synchronized. + * + * @since Added in version 3.2. + * + * @ingroup native + */ +GLFWAPI GLXWindow glfwGetGLXWindow(GLFWwindow* window); +#endif + +#if defined(GLFW_EXPOSE_NATIVE_WAYLAND) +/*! @brief Returns the `struct wl_display*` used by GLFW. + * + * @return The `struct wl_display*` used by GLFW, or `NULL` if an + * [error](@ref error_handling) occurred. + * + * @thread_safety This function may be called from any thread. Access is not + * synchronized. + * + * @since Added in version 3.2. + * + * @ingroup native + */ +GLFWAPI struct wl_display* glfwGetWaylandDisplay(void); + +/*! @brief Returns the `struct wl_output*` of the specified monitor. + * + * @return The `struct wl_output*` of the specified monitor, or `NULL` if an + * [error](@ref error_handling) occurred. + * + * @thread_safety This function may be called from any thread. Access is not + * synchronized. + * + * @since Added in version 3.2. + * + * @ingroup native + */ +GLFWAPI struct wl_output* glfwGetWaylandMonitor(GLFWmonitor* monitor); + +/*! @brief Returns the main `struct wl_surface*` of the specified window. + * + * @return The main `struct wl_surface*` of the specified window, or `NULL` if + * an [error](@ref error_handling) occurred. + * + * @thread_safety This function may be called from any thread. Access is not + * synchronized. + * + * @since Added in version 3.2. + * + * @ingroup native + */ +GLFWAPI struct wl_surface* glfwGetWaylandWindow(GLFWwindow* window); +#endif + +#if defined(GLFW_EXPOSE_NATIVE_MIR) +/*! @brief Returns the `MirConnection*` used by GLFW. + * + * @return The `MirConnection*` used by GLFW, or `NULL` if an + * [error](@ref error_handling) occurred. + * + * @thread_safety This function may be called from any thread. Access is not + * synchronized. + * + * @since Added in version 3.2. + * + * @ingroup native + */ +GLFWAPI MirConnection* glfwGetMirDisplay(void); + +/*! @brief Returns the Mir output ID of the specified monitor. + * + * @return The Mir output ID of the specified monitor, or zero if an + * [error](@ref error_handling) occurred. + * + * @thread_safety This function may be called from any thread. Access is not + * synchronized. + * + * @since Added in version 3.2. + * + * @ingroup native + */ +GLFWAPI int glfwGetMirMonitor(GLFWmonitor* monitor); + +/*! @brief Returns the `MirSurface*` of the specified window. + * + * @return The `MirSurface*` of the specified window, or `NULL` if an + * [error](@ref error_handling) occurred. + * + * @thread_safety This function may be called from any thread. Access is not + * synchronized. + * + * @since Added in version 3.2. + * + * @ingroup native + */ +GLFWAPI MirSurface* glfwGetMirWindow(GLFWwindow* window); +#endif + +#if defined(GLFW_EXPOSE_NATIVE_EGL) +/*! @brief Returns the `EGLDisplay` used by GLFW. + * + * @return The `EGLDisplay` used by GLFW, or `EGL_NO_DISPLAY` if an + * [error](@ref error_handling) occurred. + * + * @thread_safety This function may be called from any thread. Access is not + * synchronized. + * + * @since Added in version 3.0. + * + * @ingroup native + */ +GLFWAPI EGLDisplay glfwGetEGLDisplay(void); + +/*! @brief Returns the `EGLContext` of the specified window. + * + * @return The `EGLContext` of the specified window, or `EGL_NO_CONTEXT` if an + * [error](@ref error_handling) occurred. + * + * @thread_safety This function may be called from any thread. Access is not + * synchronized. + * + * @since Added in version 3.0. + * + * @ingroup native + */ +GLFWAPI EGLContext glfwGetEGLContext(GLFWwindow* window); + +/*! @brief Returns the `EGLSurface` of the specified window. + * + * @return The `EGLSurface` of the specified window, or `EGL_NO_SURFACE` if an + * [error](@ref error_handling) occurred. + * + * @thread_safety This function may be called from any thread. Access is not + * synchronized. + * + * @since Added in version 3.0. + * + * @ingroup native + */ +GLFWAPI EGLSurface glfwGetEGLSurface(GLFWwindow* window); +#endif + +#ifdef __cplusplus +} +#endif + +#endif /* _glfw3_native_h_ */ + diff --git a/External/imgui-docking/examples/libs/glfw/lib-vc2010-32/glfw3.lib b/External/imgui-docking/examples/libs/glfw/lib-vc2010-32/glfw3.lib new file mode 100644 index 0000000..348abec Binary files /dev/null and b/External/imgui-docking/examples/libs/glfw/lib-vc2010-32/glfw3.lib differ diff --git a/External/imgui-docking/examples/libs/glfw/lib-vc2010-64/glfw3.lib b/External/imgui-docking/examples/libs/glfw/lib-vc2010-64/glfw3.lib new file mode 100644 index 0000000..768f308 Binary files /dev/null and b/External/imgui-docking/examples/libs/glfw/lib-vc2010-64/glfw3.lib differ diff --git a/External/imgui-docking/examples/libs/usynergy/README.txt b/External/imgui-docking/examples/libs/usynergy/README.txt new file mode 100644 index 0000000..c86b909 --- /dev/null +++ b/External/imgui-docking/examples/libs/usynergy/README.txt @@ -0,0 +1,8 @@ + +uSynergy client -- Implementation for the embedded Synergy client library +version 1.0.0, July 7th, 2012 +Copyright (c) 2012 Alex Evans + +This is a copy of the files once found at: + https://github.com/symless/synergy-core/tree/790d108a56ada9caad8e56ff777d444485a69da9/src/micro + diff --git a/External/imgui-docking/examples/libs/usynergy/uSynergy.c b/External/imgui-docking/examples/libs/usynergy/uSynergy.c new file mode 100644 index 0000000..8dce47b --- /dev/null +++ b/External/imgui-docking/examples/libs/usynergy/uSynergy.c @@ -0,0 +1,636 @@ +/* +uSynergy client -- Implementation for the embedded Synergy client library + version 1.0.0, July 7th, 2012 + +Copyright (c) 2012 Alex Evans + +This software is provided 'as-is', without any express or implied +warranty. In no event will the authors be held liable for any damages +arising from the use of this software. + +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it +freely, subject to the following restrictions: + + 1. The origin of this software must not be misrepresented; you must not + claim that you wrote the original software. If you use this software + in a product, an acknowledgment in the product documentation would be + appreciated but is not required. + + 2. Altered source versions must be plainly marked as such, and must not be + misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. +*/ +#include "uSynergy.h" +#include +#include + + + +//--------------------------------------------------------------------------------------------------------------------- +// Internal helpers +//--------------------------------------------------------------------------------------------------------------------- + + + +/** +@brief Read 16 bit integer in network byte order and convert to native byte order +**/ +static int16_t sNetToNative16(const unsigned char *value) +{ +#ifdef USYNERGY_LITTLE_ENDIAN + return value[1] | (value[0] << 8); +#else + return value[0] | (value[1] << 8); +#endif +} + + + +/** +@brief Read 32 bit integer in network byte order and convert to native byte order +**/ +static int32_t sNetToNative32(const unsigned char *value) +{ +#ifdef USYNERGY_LITTLE_ENDIAN + return value[3] | (value[2] << 8) | (value[1] << 16) | (value[0] << 24); +#else + return value[0] | (value[1] << 8) | (value[2] << 16) | (value[3] << 24); +#endif +} + + + +/** +@brief Trace text to client +**/ +static void sTrace(uSynergyContext *context, const char* text) +{ + // Don't trace if we don't have a trace function + if (context->m_traceFunc != 0L) + context->m_traceFunc(context->m_cookie, text); +} + + + +/** +@brief Add string to reply packet +**/ +static void sAddString(uSynergyContext *context, const char *string) +{ + size_t len = strlen(string); + memcpy(context->m_replyCur, string, len); + context->m_replyCur += len; +} + + + +/** +@brief Add uint8 to reply packet +**/ +static void sAddUInt8(uSynergyContext *context, uint8_t value) +{ + *context->m_replyCur++ = value; +} + + + +/** +@brief Add uint16 to reply packet +**/ +static void sAddUInt16(uSynergyContext *context, uint16_t value) +{ + uint8_t *reply = context->m_replyCur; + *reply++ = (uint8_t)(value >> 8); + *reply++ = (uint8_t)value; + context->m_replyCur = reply; +} + + + +/** +@brief Add uint32 to reply packet +**/ +static void sAddUInt32(uSynergyContext *context, uint32_t value) +{ + uint8_t *reply = context->m_replyCur; + *reply++ = (uint8_t)(value >> 24); + *reply++ = (uint8_t)(value >> 16); + *reply++ = (uint8_t)(value >> 8); + *reply++ = (uint8_t)value; + context->m_replyCur = reply; +} + + + +/** +@brief Send reply packet +**/ +static uSynergyBool sSendReply(uSynergyContext *context) +{ + // Set header size + uint8_t *reply_buf = context->m_replyBuffer; + uint32_t reply_len = (uint32_t)(context->m_replyCur - reply_buf); /* Total size of reply */ + uint32_t body_len = reply_len - 4; /* Size of body */ + uSynergyBool ret; + reply_buf[0] = (uint8_t)(body_len >> 24); + reply_buf[1] = (uint8_t)(body_len >> 16); + reply_buf[2] = (uint8_t)(body_len >> 8); + reply_buf[3] = (uint8_t)body_len; + + // Send reply + ret = context->m_sendFunc(context->m_cookie, context->m_replyBuffer, reply_len); + + // Reset reply buffer write pointer + context->m_replyCur = context->m_replyBuffer+4; + return ret; +} + + + +/** +@brief Call mouse callback after a mouse event +**/ +static void sSendMouseCallback(uSynergyContext *context) +{ + // Skip if no callback is installed + if (context->m_mouseCallback == 0L) + return; + + // Send callback + context->m_mouseCallback(context->m_cookie, context->m_mouseX, context->m_mouseY, context->m_mouseWheelX, + context->m_mouseWheelY, context->m_mouseButtonLeft, context->m_mouseButtonRight, context->m_mouseButtonMiddle); +} + + + +/** +@brief Send keyboard callback when a key has been pressed or released +**/ +static void sSendKeyboardCallback(uSynergyContext *context, uint16_t key, uint16_t modifiers, uSynergyBool down, uSynergyBool repeat) +{ + // Skip if no callback is installed + if (context->m_keyboardCallback == 0L) + return; + + // Send callback + context->m_keyboardCallback(context->m_cookie, key, modifiers, down, repeat); +} + + + +/** +@brief Send joystick callback +**/ +static void sSendJoystickCallback(uSynergyContext *context, uint8_t joyNum) +{ + int8_t *sticks; + + // Skip if no callback is installed + if (context->m_joystickCallback == 0L) + return; + + // Send callback + sticks = context->m_joystickSticks[joyNum]; + context->m_joystickCallback(context->m_cookie, joyNum, context->m_joystickButtons[joyNum], sticks[0], sticks[1], sticks[2], sticks[3]); +} + + + +/** +@brief Parse a single client message, update state, send callbacks and send replies +**/ +#define USYNERGY_IS_PACKET(pkt_id) memcmp(message+4, pkt_id, 4)==0 +static void sProcessMessage(uSynergyContext *context, const uint8_t *message) +{ + // We have a packet! + if (memcmp(message+4, "Synergy", 7)==0) + { + // Welcome message + // kMsgHello = "Synergy%2i%2i" + // kMsgHelloBack = "Synergy%2i%2i%s" + sAddString(context, "Synergy"); + sAddUInt16(context, USYNERGY_PROTOCOL_MAJOR); + sAddUInt16(context, USYNERGY_PROTOCOL_MINOR); + sAddUInt32(context, (uint32_t)strlen(context->m_clientName)); + sAddString(context, context->m_clientName); + if (!sSendReply(context)) + { + // Send reply failed, let's try to reconnect + sTrace(context, "SendReply failed, trying to reconnect in a second"); + context->m_connected = USYNERGY_FALSE; + context->m_sleepFunc(context->m_cookie, 1000); + } + else + { + // Let's assume we're connected + char buffer[256+1]; + sprintf(buffer, "Connected as client \"%s\"", context->m_clientName); + sTrace(context, buffer); + context->m_hasReceivedHello = USYNERGY_TRUE; + } + return; + } + else if (USYNERGY_IS_PACKET("QINF")) + { + // Screen info. Reply with DINF + // kMsgQInfo = "QINF" + // kMsgDInfo = "DINF%2i%2i%2i%2i%2i%2i%2i" + uint16_t x = 0, y = 0, warp = 0; + sAddString(context, "DINF"); + sAddUInt16(context, x); + sAddUInt16(context, y); + sAddUInt16(context, context->m_clientWidth); + sAddUInt16(context, context->m_clientHeight); + sAddUInt16(context, warp); + sAddUInt16(context, 0); // mx? + sAddUInt16(context, 0); // my? + sSendReply(context); + return; + } + else if (USYNERGY_IS_PACKET("CIAK")) + { + // Do nothing? + // kMsgCInfoAck = "CIAK" + return; + } + else if (USYNERGY_IS_PACKET("CROP")) + { + // Do nothing? + // kMsgCResetOptions = "CROP" + return; + } + else if (USYNERGY_IS_PACKET("CINN")) + { + // Screen enter. Reply with CNOP + // kMsgCEnter = "CINN%2i%2i%4i%2i" + + // Obtain the Synergy sequence number + context->m_sequenceNumber = sNetToNative32(message + 12); + context->m_isCaptured = USYNERGY_TRUE; + + // Call callback + if (context->m_screenActiveCallback != 0L) + context->m_screenActiveCallback(context->m_cookie, USYNERGY_TRUE); + } + else if (USYNERGY_IS_PACKET("COUT")) + { + // Screen leave + // kMsgCLeave = "COUT" + context->m_isCaptured = USYNERGY_FALSE; + + // Call callback + if (context->m_screenActiveCallback != 0L) + context->m_screenActiveCallback(context->m_cookie, USYNERGY_FALSE); + } + else if (USYNERGY_IS_PACKET("DMDN")) + { + // Mouse down + // kMsgDMouseDown = "DMDN%1i" + char btn = message[8]-1; + if (btn==2) + context->m_mouseButtonRight = USYNERGY_TRUE; + else if (btn==1) + context->m_mouseButtonMiddle = USYNERGY_TRUE; + else + context->m_mouseButtonLeft = USYNERGY_TRUE; + sSendMouseCallback(context); + } + else if (USYNERGY_IS_PACKET("DMUP")) + { + // Mouse up + // kMsgDMouseUp = "DMUP%1i" + char btn = message[8]-1; + if (btn==2) + context->m_mouseButtonRight = USYNERGY_FALSE; + else if (btn==1) + context->m_mouseButtonMiddle = USYNERGY_FALSE; + else + context->m_mouseButtonLeft = USYNERGY_FALSE; + sSendMouseCallback(context); + } + else if (USYNERGY_IS_PACKET("DMMV")) + { + // Mouse move. Reply with CNOP + // kMsgDMouseMove = "DMMV%2i%2i" + context->m_mouseX = sNetToNative16(message+8); + context->m_mouseY = sNetToNative16(message+10); + sSendMouseCallback(context); + } + else if (USYNERGY_IS_PACKET("DMWM")) + { + // Mouse wheel + // kMsgDMouseWheel = "DMWM%2i%2i" + // kMsgDMouseWheel1_0 = "DMWM%2i" + context->m_mouseWheelX += sNetToNative16(message+8); + context->m_mouseWheelY += sNetToNative16(message+10); + sSendMouseCallback(context); + } + else if (USYNERGY_IS_PACKET("DKDN")) + { + // Key down + // kMsgDKeyDown = "DKDN%2i%2i%2i" + // kMsgDKeyDown1_0 = "DKDN%2i%2i" + //uint16_t id = sNetToNative16(message+8); + uint16_t mod = sNetToNative16(message+10); + uint16_t key = sNetToNative16(message+12); + sSendKeyboardCallback(context, key, mod, USYNERGY_TRUE, USYNERGY_FALSE); + } + else if (USYNERGY_IS_PACKET("DKRP")) + { + // Key repeat + // kMsgDKeyRepeat = "DKRP%2i%2i%2i%2i" + // kMsgDKeyRepeat1_0 = "DKRP%2i%2i%2i" + uint16_t mod = sNetToNative16(message+10); +// uint16_t count = sNetToNative16(message+12); + uint16_t key = sNetToNative16(message+14); + sSendKeyboardCallback(context, key, mod, USYNERGY_TRUE, USYNERGY_TRUE); + } + else if (USYNERGY_IS_PACKET("DKUP")) + { + // Key up + // kMsgDKeyUp = "DKUP%2i%2i%2i" + // kMsgDKeyUp1_0 = "DKUP%2i%2i" + //uint16 id=Endian::sNetToNative(sbuf[4]); + uint16_t mod = sNetToNative16(message+10); + uint16_t key = sNetToNative16(message+12); + sSendKeyboardCallback(context, key, mod, USYNERGY_FALSE, USYNERGY_FALSE); + } + else if (USYNERGY_IS_PACKET("DGBT")) + { + // Joystick buttons + // kMsgDGameButtons = "DGBT%1i%2i"; + uint8_t joy_num = message[8]; + if (joy_numm_joystickButtons[joy_num] = (message[9] << 8) | message[10]; + sSendJoystickCallback(context, joy_num); + } + } + else if (USYNERGY_IS_PACKET("DGST")) + { + // Joystick sticks + // kMsgDGameSticks = "DGST%1i%1i%1i%1i%1i"; + uint8_t joy_num = message[8]; + if (joy_numm_joystickSticks[joy_num], message+9, 4); + sSendJoystickCallback(context, joy_num); + } + } + else if (USYNERGY_IS_PACKET("DSOP")) + { + // Set options + // kMsgDSetOptions = "DSOP%4I" + } + else if (USYNERGY_IS_PACKET("CALV")) + { + // Keepalive, reply with CALV and then CNOP + // kMsgCKeepAlive = "CALV" + sAddString(context, "CALV"); + sSendReply(context); + // now reply with CNOP + } + else if (USYNERGY_IS_PACKET("DCLP")) + { + // Clipboard message + // kMsgDClipboard = "DCLP%1i%4i%s" + // + // The clipboard message contains: + // 1 uint32: The size of the message + // 4 chars: The identifier ("DCLP") + // 1 uint8: The clipboard index + // 1 uint32: The sequence number. It's zero, because this message is always coming from the server? + // 1 uint32: The total size of the remaining 'string' (as per the Synergy %s string format (which is 1 uint32 for size followed by a char buffer (not necessarily null terminated)). + // 1 uint32: The number of formats present in the message + // And then 'number of formats' times the following: + // 1 uint32: The format of the clipboard data + // 1 uint32: The size n of the clipboard data + // n uint8: The clipboard data + const uint8_t * parse_msg = message+17; + uint32_t num_formats = sNetToNative32(parse_msg); + parse_msg += 4; + for (; num_formats; num_formats--) + { + // Parse clipboard format header + uint32_t format = sNetToNative32(parse_msg); + uint32_t size = sNetToNative32(parse_msg+4); + parse_msg += 8; + + // Call callback + if (context->m_clipboardCallback) + context->m_clipboardCallback(context->m_cookie, format, parse_msg, size); + + parse_msg += size; + } + } + else + { + // Unknown packet, could be any of these + // kMsgCNoop = "CNOP" + // kMsgCClose = "CBYE" + // kMsgCClipboard = "CCLP%1i%4i" + // kMsgCScreenSaver = "CSEC%1i" + // kMsgDKeyRepeat = "DKRP%2i%2i%2i%2i" + // kMsgDKeyRepeat1_0 = "DKRP%2i%2i%2i" + // kMsgDMouseRelMove = "DMRM%2i%2i" + // kMsgEIncompatible = "EICV%2i%2i" + // kMsgEBusy = "EBSY" + // kMsgEUnknown = "EUNK" + // kMsgEBad = "EBAD" + char buffer[64]; + sprintf(buffer, "Unknown packet '%c%c%c%c'", message[4], message[5], message[6], message[7]); + sTrace(context, buffer); + return; + } + + // Reply with CNOP maybe? + sAddString(context, "CNOP"); + sSendReply(context); +} +#undef USYNERGY_IS_PACKET + + + +/** +@brief Mark context as being disconnected +**/ +static void sSetDisconnected(uSynergyContext *context) +{ + context->m_connected = USYNERGY_FALSE; + context->m_hasReceivedHello = USYNERGY_FALSE; + context->m_isCaptured = USYNERGY_FALSE; + context->m_replyCur = context->m_replyBuffer + 4; + context->m_sequenceNumber = 0; +} + + + +/** +@brief Update a connected context +**/ +static void sUpdateContext(uSynergyContext *context) +{ + /* Receive data (blocking) */ + int receive_size = USYNERGY_RECEIVE_BUFFER_SIZE - context->m_receiveOfs; + int num_received = 0; + int packlen = 0; + if (context->m_receiveFunc(context->m_cookie, context->m_receiveBuffer + context->m_receiveOfs, receive_size, &num_received) == USYNERGY_FALSE) + { + /* Receive failed, let's try to reconnect */ + char buffer[128]; + sprintf(buffer, "Receive failed (%d bytes asked, %d bytes received), trying to reconnect in a second", receive_size, num_received); + sTrace(context, buffer); + sSetDisconnected(context); + context->m_sleepFunc(context->m_cookie, 1000); + return; + } + context->m_receiveOfs += num_received; + + /* If we didn't receive any data then we're probably still polling to get connected and + therefore not getting any data back. To avoid overloading the system with a Synergy + thread that would hammer on polling, we let it rest for a bit if there's no data. */ + if (num_received == 0) + context->m_sleepFunc(context->m_cookie, 500); + + /* Check for timeouts */ + if (context->m_hasReceivedHello) + { + uint32_t cur_time = context->m_getTimeFunc(); + if (num_received == 0) + { + /* Timeout after 2 secs of inactivity (we received no CALV) */ + if ((cur_time - context->m_lastMessageTime) > USYNERGY_IDLE_TIMEOUT) + sSetDisconnected(context); + } + else + context->m_lastMessageTime = cur_time; + } + + /* Eat packets */ + for (;;) + { + /* Grab packet length and bail out if the packet goes beyond the end of the buffer */ + packlen = sNetToNative32(context->m_receiveBuffer); + if (packlen+4 > context->m_receiveOfs) + break; + + /* Process message */ + sProcessMessage(context, context->m_receiveBuffer); + + /* Move packet to front of buffer */ + memmove(context->m_receiveBuffer, context->m_receiveBuffer+packlen+4, context->m_receiveOfs-packlen-4); + context->m_receiveOfs -= packlen+4; + } + + /* Throw away over-sized packets */ + if (packlen > USYNERGY_RECEIVE_BUFFER_SIZE) + { + /* Oversized packet, ditch tail end */ + char buffer[128]; + sprintf(buffer, "Oversized packet: '%c%c%c%c' (length %d)", context->m_receiveBuffer[4], context->m_receiveBuffer[5], context->m_receiveBuffer[6], context->m_receiveBuffer[7], packlen); + sTrace(context, buffer); + num_received = context->m_receiveOfs-4; // 4 bytes for the size field + while (num_received != packlen) + { + int buffer_left = packlen - num_received; + int to_receive = buffer_left < USYNERGY_RECEIVE_BUFFER_SIZE ? buffer_left : USYNERGY_RECEIVE_BUFFER_SIZE; + int ditch_received = 0; + if (context->m_receiveFunc(context->m_cookie, context->m_receiveBuffer, to_receive, &ditch_received) == USYNERGY_FALSE) + { + /* Receive failed, let's try to reconnect */ + sTrace(context, "Receive failed, trying to reconnect in a second"); + sSetDisconnected(context); + context->m_sleepFunc(context->m_cookie, 1000); + break; + } + else + { + num_received += ditch_received; + } + } + context->m_receiveOfs = 0; + } +} + + +//--------------------------------------------------------------------------------------------------------------------- +// Public interface +//--------------------------------------------------------------------------------------------------------------------- + + + +/** +@brief Initialize uSynergy context +**/ +void uSynergyInit(uSynergyContext *context) +{ + /* Zero memory */ + memset(context, 0, sizeof(uSynergyContext)); + + /* Initialize to default state */ + sSetDisconnected(context); +} + + +/** +@brief Update uSynergy +**/ +void uSynergyUpdate(uSynergyContext *context) +{ + if (context->m_connected) + { + /* Update context, receive data, call callbacks */ + sUpdateContext(context); + } + else + { + /* Try to connect */ + if (context->m_connectFunc(context->m_cookie)) + context->m_connected = USYNERGY_TRUE; + } +} + + + +/** +@brief Send clipboard data +**/ +void uSynergySendClipboard(uSynergyContext *context, const char *text) +{ + // Calculate maximum size that will fit in a reply packet + uint32_t overhead_size = 4 + /* Message size */ + 4 + /* Message ID */ + 1 + /* Clipboard index */ + 4 + /* Sequence number */ + 4 + /* Rest of message size (because it's a Synergy string from here on) */ + 4 + /* Number of clipboard formats */ + 4 + /* Clipboard format */ + 4; /* Clipboard data length */ + uint32_t max_length = USYNERGY_REPLY_BUFFER_SIZE - overhead_size; + + // Clip text to max length + uint32_t text_length = (uint32_t)strlen(text); + if (text_length > max_length) + { + char buffer[128]; + sprintf(buffer, "Clipboard buffer too small, clipboard truncated at %d characters", max_length); + sTrace(context, buffer); + text_length = max_length; + } + + // Assemble packet + sAddString(context, "DCLP"); + sAddUInt8(context, 0); /* Clipboard index */ + sAddUInt32(context, context->m_sequenceNumber); + sAddUInt32(context, 4+4+4+text_length); /* Rest of message size: numFormats, format, length, data */ + sAddUInt32(context, 1); /* Number of formats (only text for now) */ + sAddUInt32(context, USYNERGY_CLIPBOARD_FORMAT_TEXT); + sAddUInt32(context, text_length); + sAddString(context, text); + sSendReply(context); +} diff --git a/External/imgui-docking/examples/libs/usynergy/uSynergy.h b/External/imgui-docking/examples/libs/usynergy/uSynergy.h new file mode 100644 index 0000000..2d7f9fa --- /dev/null +++ b/External/imgui-docking/examples/libs/usynergy/uSynergy.h @@ -0,0 +1,420 @@ +/* +uSynergy client -- Interface for the embedded Synergy client library + version 1.0.0, July 7th, 2012 + +Copyright (C) 2012 Synergy Si Ltd. +Copyright (c) 2012 Alex Evans + +This software is provided 'as-is', without any express or implied +warranty. In no event will the authors be held liable for any damages +arising from the use of this software. + +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it +freely, subject to the following restrictions: + + 1. The origin of this software must not be misrepresented; you must not + claim that you wrote the original software. If you use this software + in a product, an acknowledgment in the product documentation would be + appreciated but is not required. + + 2. Altered source versions must be plainly marked as such, and must not be + misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. +*/ +#include + +#ifdef __cplusplus +extern "C" { +#endif + + + +//--------------------------------------------------------------------------------------------------------------------- +// Configuration +//--------------------------------------------------------------------------------------------------------------------- + + + +/** +@brief Determine endianness +**/ +#if defined(USYNERGY_LITTLE_ENDIAN) && defined(USYNERGY_BIG_ENDIAN) + /* Ambiguous: both endians specified */ + #error "Can't define both USYNERGY_LITTLE_ENDIAN and USYNERGY_BIG_ENDIAN" +#elif !defined(USYNERGY_LITTLE_ENDIAN) && !defined(USYNERGY_BIG_ENDIAN) + /* Attempt to auto detect */ + #if defined(__LITTLE_ENDIAN__) || defined(LITTLE_ENDIAN) || (_BYTE_ORDER == _LITTLE_ENDIAN) + #define USYNERGY_LITTLE_ENDIAN + #elif defined(__BIG_ENDIAN__) || defined(BIG_ENDIAN) || (_BYTE_ORDER == _BIG_ENDIAN) + #define USYNERGY_BIG_ENDIAN + #else + #error "Can't detect endian-nes, please defined either USYNERGY_LITTLE_ENDIAN or USYNERGY_BIG_ENDIAN"; + #endif +#else + /* User-specified endian-nes, nothing to do for us */ +#endif + + + +//--------------------------------------------------------------------------------------------------------------------- +// Types and Constants +//--------------------------------------------------------------------------------------------------------------------- + + + +/** +@brief Boolean type +**/ +typedef int uSynergyBool; +#define USYNERGY_FALSE 0 /* False value */ +#define USYNERGY_TRUE 1 /* True value */ + + +/** +@brief User context type + +The uSynergyCookie type is an opaque type that is used by uSynergy to communicate to the client. It is passed along to +callback functions as context. +**/ +typedef struct { int ignored; } * uSynergyCookie; + + + +/** +@brief Clipboard types +**/ +enum uSynergyClipboardFormat +{ + USYNERGY_CLIPBOARD_FORMAT_TEXT = 0, /* Text format, UTF-8, newline is LF */ + USYNERGY_CLIPBOARD_FORMAT_BITMAP = 1, /* Bitmap format, BMP 24/32bpp, BI_RGB */ + USYNERGY_CLIPBOARD_FORMAT_HTML = 2, /* HTML format, HTML fragment, UTF-8, newline is LF */ +}; + + + +/** +@brief Constants and limits +**/ +#define USYNERGY_NUM_JOYSTICKS 4 /* Maximum number of supported joysticks */ + +#define USYNERGY_PROTOCOL_MAJOR 1 /* Major protocol version */ +#define USYNERGY_PROTOCOL_MINOR 4 /* Minor protocol version */ + +#define USYNERGY_IDLE_TIMEOUT 2000 /* Timeout in milliseconds before reconnecting */ + +#define USYNERGY_TRACE_BUFFER_SIZE 1024 /* Maximum length of traced message */ +#define USYNERGY_REPLY_BUFFER_SIZE 1024 /* Maximum size of a reply packet */ +#define USYNERGY_RECEIVE_BUFFER_SIZE 4096 /* Maximum size of an incoming packet */ + + + +/** +@brief Keyboard constants +**/ +#define USYNERGY_MODIFIER_SHIFT 0x0001 /* Shift key modifier */ +#define USYNERGY_MODIFIER_CTRL 0x0002 /* Ctrl key modifier */ +#define USYNERGY_MODIFIER_ALT 0x0004 /* Alt key modifier */ +#define USYNERGY_MODIFIER_META 0x0008 /* Meta key modifier */ +#define USYNERGY_MODIFIER_WIN 0x0010 /* Windows key modifier */ +#define USYNERGY_MODIFIER_ALT_GR 0x0020 /* AltGr key modifier */ +#define USYNERGY_MODIFIER_LEVEL5LOCK 0x0040 /* Level5Lock key modifier */ +#define USYNERGY_MODIFIER_CAPSLOCK 0x1000 /* CapsLock key modifier */ +#define USYNERGY_MODIFIER_NUMLOCK 0x2000 /* NumLock key modifier */ +#define USYNERGY_MODIFIER_SCROLLOCK 0x4000 /* ScrollLock key modifier */ + + + + +//--------------------------------------------------------------------------------------------------------------------- +// Functions and Callbacks +//--------------------------------------------------------------------------------------------------------------------- + + + +/** +@brief Connect function + +This function is called when uSynergy needs to connect to the host. It doesn't imply a network implementation or +destination address, that must all be handled on the user side. The function should return USYNERGY_TRUE if a +connection was established or USYNERGY_FALSE if it could not connect. + +When network errors occur (e.g. uSynergySend or uSynergyReceive fail) then the connect call will be called again +so the implementation of the function must close any old connections and clean up resources before retrying. + +@param cookie Cookie supplied in the Synergy context +**/ +typedef uSynergyBool (*uSynergyConnectFunc)(uSynergyCookie cookie); + + + +/** +@brief Send function + +This function is called when uSynergy needs to send something over the default connection. It should return +USYNERGY_TRUE if sending succeeded and USYNERGY_FALSE otherwise. This function should block until the send +operation is completed. + +@param cookie Cookie supplied in the Synergy context +@param buffer Address of buffer to send +@param length Length of buffer to send +**/ +typedef uSynergyBool (*uSynergySendFunc)(uSynergyCookie cookie, const uint8_t *buffer, int length); + + + +/** +@brief Receive function + +This function is called when uSynergy needs to receive data from the default connection. It should return +USYNERGY_TRUE if receiving data succeeded and USYNERGY_FALSE otherwise. This function should block until data +has been received and wait for data to become available. If @a outLength is set to 0 upon completion it is +assumed that the connection is alive, but still in a connecting state and needs time to settle. + +@param cookie Cookie supplied in the Synergy context +@param buffer Address of buffer to receive data into +@param maxLength Maximum amount of bytes to write into the receive buffer +@param outLength Address of integer that receives the actual amount of bytes written into @a buffer +**/ +typedef uSynergyBool (*uSynergyReceiveFunc)(uSynergyCookie cookie, uint8_t *buffer, int maxLength, int* outLength); + + + +/** +@brief Thread sleep function + +This function is called when uSynergy wants to suspend operation for a while before retrying an operation. It +is mostly used when a socket times out or disconnect occurs to prevent uSynergy from continuously hammering a +network connection in case the network is down. + +@param cookie Cookie supplied in the Synergy context +@param timeMs Time to sleep the current thread (in milliseconds) +**/ +typedef void (*uSynergySleepFunc)(uSynergyCookie cookie, int timeMs); + + + +/** +@brief Get time function + +This function is called when uSynergy needs to know the current time. This is used to determine when timeouts +have occurred. The time base should be a cyclic millisecond time value. + +@returns Time value in milliseconds +**/ +typedef uint32_t (*uSynergyGetTimeFunc)(); + + + +/** +@brief Trace function + +This function is called when uSynergy wants to trace something. It is optional to show these messages, but they +are often useful when debugging. uSynergy only traces major events like connecting and disconnecting. Usually +only a single trace is shown when the connection is established and no more trace are called. + +@param cookie Cookie supplied in the Synergy context +@param text Text to be traced +**/ +typedef void (*uSynergyTraceFunc)(uSynergyCookie cookie, const char *text); + + + +/** +@brief Screen active callback + +This callback is called when Synergy makes the screen active or inactive. This +callback is usually sent when the mouse enters or leaves the screen. + +@param cookie Cookie supplied in the Synergy context +@param active Activation flag, 1 if the screen has become active, 0 if the screen has become inactive +**/ +typedef void (*uSynergyScreenActiveCallback)(uSynergyCookie cookie, uSynergyBool active); + + + +/** +@brief Mouse callback + +This callback is called when a mouse events happens. The mouse X and Y position, +wheel and button state is communicated in the message. It's up to the user to +interpret if this is a mouse up, down, double-click or other message. + +@param cookie Cookie supplied in the Synergy context +@param x Mouse X position +@param y Mouse Y position +@param wheelX Mouse wheel X position +@param wheelY Mouse wheel Y position +@param buttonLeft Left button pressed status, 0 for released, 1 for pressed +@param buttonMiddle Middle button pressed status, 0 for released, 1 for pressed +@param buttonRight Right button pressed status, 0 for released, 1 for pressed +**/ +typedef void (*uSynergyMouseCallback)(uSynergyCookie cookie, uint16_t x, uint16_t y, int16_t wheelX, int16_t wheelY, uSynergyBool buttonLeft, uSynergyBool buttonRight, uSynergyBool buttonMiddle); + + + +/** +@brief Key event callback + +This callback is called when a key is pressed or released. + +@param cookie Cookie supplied in the Synergy context +@param key Key code of key that was pressed or released +@param modifiers Status of modifier keys (alt, shift, etc.) +@param down Down or up status, 1 is key is pressed down, 0 if key is released (up) +@param repeat Repeat flag, 1 if the key is down because the key is repeating, 0 if the key is initially pressed by the user +**/ +typedef void (*uSynergyKeyboardCallback)(uSynergyCookie cookie, uint16_t key, uint16_t modifiers, uSynergyBool down, uSynergyBool repeat); + + + +/** +@brief Joystick event callback + +This callback is called when a joystick stick or button changes. It is possible that multiple callbacks are +fired when different sticks or buttons change as these are individual messages in the packet stream. Each +callback will contain all the valid state for the different axes and buttons. The last callback received will +represent the most current joystick state. + +@param cookie Cookie supplied in the Synergy context +@param joyNum Joystick number, always in the range [0 ... USYNERGY_NUM_JOYSTICKS> +@param buttons Button pressed mask +@param leftStickX Left stick X position, in range [-127 ... 127] +@param leftStickY Left stick Y position, in range [-127 ... 127] +@param rightStickX Right stick X position, in range [-127 ... 127] +@param rightStickY Right stick Y position, in range [-127 ... 127] +**/ +typedef void (*uSynergyJoystickCallback)(uSynergyCookie cookie, uint8_t joyNum, uint16_t buttons, int8_t leftStickX, int8_t leftStickY, int8_t rightStickX, int8_t rightStickY); + + + +/** +@brief Clipboard event callback + +This callback is called when something is placed on the clipboard. Multiple callbacks may be fired for +multiple clipboard formats if they are supported. The data provided is read-only and may not be modified +by the application. + +@param cookie Cookie supplied in the Synergy context +@param format Clipboard format +@param data Memory area containing the clipboard raw data +@param size Size of clipboard data +**/ +typedef void (*uSynergyClipboardCallback)(uSynergyCookie cookie, enum uSynergyClipboardFormat format, const uint8_t *data, uint32_t size); + + + +//--------------------------------------------------------------------------------------------------------------------- +// Context +//--------------------------------------------------------------------------------------------------------------------- + + + +/** +@brief uSynergy context +**/ +typedef struct +{ + /* Mandatory configuration data, filled in by client */ + uSynergyConnectFunc m_connectFunc; /* Connect function */ + uSynergySendFunc m_sendFunc; /* Send data function */ + uSynergyReceiveFunc m_receiveFunc; /* Receive data function */ + uSynergySleepFunc m_sleepFunc; /* Thread sleep function */ + uSynergyGetTimeFunc m_getTimeFunc; /* Get current time function */ + const char* m_clientName; /* Name of Synergy Screen / Client */ + uint16_t m_clientWidth; /* Width of screen */ + uint16_t m_clientHeight; /* Height of screen */ + + /* Optional configuration data, filled in by client */ + uSynergyCookie m_cookie; /* Cookie pointer passed to callback functions (can be NULL) */ + uSynergyTraceFunc m_traceFunc; /* Function for tracing status (can be NULL) */ + uSynergyScreenActiveCallback m_screenActiveCallback; /* Callback for entering and leaving screen */ + uSynergyMouseCallback m_mouseCallback; /* Callback for mouse events */ + uSynergyKeyboardCallback m_keyboardCallback; /* Callback for keyboard events */ + uSynergyJoystickCallback m_joystickCallback; /* Callback for joystick events */ + uSynergyClipboardCallback m_clipboardCallback; /* Callback for clipboard events */ + + /* State data, used internall by client, initialized by uSynergyInit() */ + uSynergyBool m_connected; /* Is our socket connected? */ + uSynergyBool m_hasReceivedHello; /* Have we received a 'Hello' from the server? */ + uSynergyBool m_isCaptured; /* Is Synergy active (i.e. this client is receiving input messages?) */ + uint32_t m_lastMessageTime; /* Time at which last message was received */ + uint32_t m_sequenceNumber; /* Packet sequence number */ + uint8_t m_receiveBuffer[USYNERGY_RECEIVE_BUFFER_SIZE]; /* Receive buffer */ + int m_receiveOfs; /* Receive buffer offset */ + uint8_t m_replyBuffer[USYNERGY_REPLY_BUFFER_SIZE]; /* Reply buffer */ + uint8_t* m_replyCur; /* Write offset into reply buffer */ + uint16_t m_mouseX; /* Mouse X position */ + uint16_t m_mouseY; /* Mouse Y position */ + int16_t m_mouseWheelX; /* Mouse wheel X position */ + int16_t m_mouseWheelY; /* Mouse wheel Y position */ + uSynergyBool m_mouseButtonLeft; /* Mouse left button */ + uSynergyBool m_mouseButtonRight; /* Mouse right button */ + uSynergyBool m_mouseButtonMiddle; /* Mouse middle button */ + int8_t m_joystickSticks[USYNERGY_NUM_JOYSTICKS][4]; /* Joystick stick position in 2 axes for 2 sticks */ + uint16_t m_joystickButtons[USYNERGY_NUM_JOYSTICKS]; /* Joystick button state */ +} uSynergyContext; + + + +//--------------------------------------------------------------------------------------------------------------------- +// Interface +//--------------------------------------------------------------------------------------------------------------------- + + + +/** +@brief Initialize uSynergy context + +This function initializes @a context for use. Call this function directly after +creating the context, before filling in any configuration data in it. Not calling +this function will cause undefined behavior. + +@param context Context to be initialized +**/ +extern void uSynergyInit(uSynergyContext *context); + + + +/** +@brief Update uSynergy + +This function updates uSynergy and does the bulk of the work. It does connection management, +receiving data, reconnecting after errors or timeouts and so on. It assumes that networking +operations are blocking and it can suspend the current thread if it needs to wait. It is +best practice to call uSynergyUpdate from a background thread so it is responsive. + +Because uSynergy relies mostly on blocking calls it will mostly stay in thread sleep state +waiting for system mutexes and won't eat much memory. + +uSynergyUpdate doesn't do any memory allocations or have any side effects beyond those of +the callbacks it calls. + +@param context Context to be updated +**/ +extern void uSynergyUpdate(uSynergyContext *context); + + + +/** +@brief Send clipboard data + +This function sets new clipboard data and sends it to the server. Use this function if +your client cuts or copies data onto the clipboard that it needs to share with the +server. + +Currently there is only support for plaintext, but HTML and image data could be +supported with some effort. + +@param context Context to send clipboard data to +@param text Text to set to the clipboard +**/ +extern void uSynergySendClipboard(uSynergyContext *context, const char *text); + + + +#ifdef __cplusplus +}; +#endif diff --git a/External/open-cpp-utils/.gitignore b/External/open-cpp-utils/.gitignore new file mode 100644 index 0000000..47d298d --- /dev/null +++ b/External/open-cpp-utils/.gitignore @@ -0,0 +1,2 @@ +Doxyfile +/Build/ diff --git a/External/open-cpp-utils/CMakeLists.txt b/External/open-cpp-utils/CMakeLists.txt new file mode 100644 index 0000000..a4e9d33 --- /dev/null +++ b/External/open-cpp-utils/CMakeLists.txt @@ -0,0 +1,69 @@ +cmake_minimum_required(VERSION 3.5) + +project(open-cpp-utils) + +set(OPENCPPUTILS_HEADERS + any.h + directed_tree.h + object_pool.h + optional.h + startup.h + template_utils.h + unique_id.h +) + +add_library(open-cpp-utils INTERFACE + ${OPENCPPUTILS_HEADERS} +) + +if (GTest_FOUND) + +# Set CPP Standard +set(CMAKE_CXX_STANDARD 23) +set(CMAKE_C_STANDARD 23) + +find_package(GTest) + +add_executable(open-cpp-utils-test + Test/Test.cpp + + ${OPENCPPUTILS_HEADERS} +) + +target_link_libraries(open-cpp-utils-test PRIVATE + GTest::gtest +) + +endif () + +# DOXYGEN ============================================================================================================== +# https://vicrucann.github.io/tutorials/quick-cmake-doxygen/ + +find_package(Doxygen) + +if(DOXYGEN_FOUND) + get_filename_component(DOXYGEN_PROJECT_NAME ${CMAKE_CURRENT_SOURCE_DIR} NAME) + set(DOXYGEN_CONFIG_IN ${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.in) + set(DOXYGEN_CONFIG_OUT ${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile) + + configure_file(${DOXYGEN_CONFIG_IN} ${DOXYGEN_CONFIG_OUT} @ONLY) + message("Doxygen Build Started.") + + if(WIN32) + add_custom_target(open-cpp-utils-documentation ALL + COMMAND ${DOXYGEN_EXECUTABLE} ${DOXYGEN_CONFIG_OUT} + COMMAND start firefox "${CMAKE_CURRENT_SOURCE_DIR}/Documentation/html/index.html" + WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} + COMMENT "Generating Doxygen Documentation" + VERBATIM) + else() + add_custom_target(open-cpp-utils-documentation ALL + COMMAND ${DOXYGEN_EXECUTABLE} ${DOXYGEN_CONFIG_OUT} + COMMAND firefox "${CMAKE_CURRENT_SOURCE_DIR}/Documentation/html/index.html" + WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} + COMMENT "Generating Doxygen Documentation" + VERBATIM) + endif() +else() + message("Doxygen not found.") +endif() \ No newline at end of file diff --git a/External/open-cpp-utils/Documentation/html/annotated.html b/External/open-cpp-utils/Documentation/html/annotated.html new file mode 100644 index 0000000..cfec6ef --- /dev/null +++ b/External/open-cpp-utils/Documentation/html/annotated.html @@ -0,0 +1,102 @@ + + + + + + + +open-cpp-utils: Class List + + + + + + + + + + + +
    +
    + + + + + + +
    +
    open-cpp-utils 0.0.1 +
    +
    +
    + + + + + + + +
    + +
    +
    + + +
    +
    +
    +
    +
    +
    Loading...
    +
    Searching...
    +
    No Matches
    +
    +
    +
    +
    + +
    +
    Class List
    +
    +
    +
    Here are the classes, structs, unions and interfaces with brief descriptions:
    +
    [detail level 123]
    + + + + + + + + + + + + + + + +
     Nopen_cpp_utils
     CanyWrapper for a value with multiple types
     Cany< T, Rest... >
     Cany<>
     Cconstant_valueCompile-time constant value
     Cdirected_treeClass for creating a directed tree
     Cbreadth_firstBreadth first traversal
     Cin_orderIn-order traversal
     Cpost_orderPost-order traversal
     Cpre_orderPre-order traversal
     CtraverserVisitor pattern for traversing the tree
     Cdyn_array
     Cfixed_array
     Cfixed_array< T, N >Wrapper for array of type T with fixed length N
     Coptional
    +
    +
    + + + + diff --git a/External/open-cpp-utils/Documentation/html/any_8h_source.html b/External/open-cpp-utils/Documentation/html/any_8h_source.html new file mode 100644 index 0000000..09d7b24 --- /dev/null +++ b/External/open-cpp-utils/Documentation/html/any_8h_source.html @@ -0,0 +1,176 @@ + + + + + + + +open-cpp-utils: any.h Source File + + + + + + + + + + + +
    +
    + + + + + + +
    +
    open-cpp-utils 0.0.1 +
    +
    +
    + + + + + + + + +
    + +
    +
    + + +
    +
    +
    +
    +
    +
    Loading...
    +
    Searching...
    +
    No Matches
    +
    +
    +
    +
    + +
    +
    any.h
    +
    +
    +
    1// =====================================================================================================================
    +
    2// Copyright 2024 Medusa Slockbower
    +
    3// Licensed under the Apache License, Version 2.0 (the "License");
    +
    4// you may not use this file except in compliance with the License.
    +
    5// You may obtain a copy of the License at
    +
    6//
    +
    7// http://www.apache.org/licenses/LICENSE-2.0
    +
    8//
    +
    9// Unless required by applicable law or agreed to in writing, software
    +
    10// distributed under the License is distributed on an "AS IS" BASIS,
    +
    11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    +
    12// See the License for the specific language governing permissions and
    +
    13// limitations under the License.
    +
    14// =====================================================================================================================
    +
    15
    +
    16#ifndef ANY_H
    +
    17#define ANY_H
    +
    18
    +
    19#include "template_utils.h"
    +
    20
    +
    21namespace open_cpp_utils
    +
    22{
    +
    23
    +
    28template<typename...Ts> class any;
    +
    29
    +
    30template<typename T, typename...Rest>
    +
    +
    31class any<T, Rest...> : public any<Rest...>
    +
    32{
    +
    33// Assertions ==========================================================================================================
    +
    34
    +
    35 static_assert(is_unique<Rest...>);
    +
    36
    +
    37
    +
    38// Typedefs ============================================================================================================
    +
    39
    +
    40public:
    +
    41 using base_type = any<Rest...>;
    +
    42 using this_type = T;
    +
    43
    +
    44
    +
    45// Constructors ========================================================================================================
    +
    46
    +
    47public:
    +
    48 any() : base_type() , Value() { }
    +
    49 any(const this_type& value, const Rest&...other) : base_type(other...), Value(value) { }
    +
    50 any(this_type&& value, Rest&&...other) : base_type(other...), Value(value) { }
    +
    51 any(const any& other) = default;
    +
    52 any(any&& other) = default;
    +
    53 ~any() = default;
    +
    54
    +
    55
    +
    56// Operators ===========================================================================================================
    +
    57
    +
    58public:
    +
    59
    +
    60// Assignment operators ------------------------------------------------------------------------------------------------
    +
    61 any& operator=(const any&) = default;
    +
    62 any& operator=(any&&) = default;
    +
    63
    +
    64
    +
    65// Cast operators ------------------------------------------------------------------------------------------------------
    +
    66
    +
    67 operator this_type () const { return Value; }
    +
    68 operator this_type& () { return Value; }
    +
    69 operator const this_type& () const { return Value; }
    +
    70 operator this_type&&() { return Value; }
    +
    71 operator this_type* () { return &Value; }
    +
    72 operator const this_type* () const { return &Value; }
    +
    73
    +
    74
    +
    75// Variables ===========================================================================================================
    +
    76
    +
    77private:
    +
    78 static constexpr size_t Size = sizeof...(Rest);
    +
    79 this_type Value;
    +
    80};
    +
    +
    81
    +
    82template<>
    +
    83class any<> { };
    +
    84
    +
    85}
    +
    86
    +
    87
    +
    88#endif //ANY_H
    +
    Wrapper for a value with multiple types.
    Definition any.h:28
    +
    Provides compile time evaluation utilities for templates and template packs.
    +
    + + + + diff --git a/External/open-cpp-utils/Documentation/html/array_8h_source.html b/External/open-cpp-utils/Documentation/html/array_8h_source.html new file mode 100644 index 0000000..fc25cb6 --- /dev/null +++ b/External/open-cpp-utils/Documentation/html/array_8h_source.html @@ -0,0 +1,156 @@ + + + + + + + +open-cpp-utils: array.h Source File + + + + + + + + + + + +
    +
    + + + + + + +
    +
    open-cpp-utils 0.0.1 +
    +
    +
    + + + + + + + + +
    + +
    +
    + + +
    +
    +
    +
    +
    +
    Loading...
    +
    Searching...
    +
    No Matches
    +
    +
    +
    +
    + +
    +
    array.h
    +
    +
    +
    1//
    +
    2// Created by Maddie on 7/25/2024.
    +
    3//
    +
    4
    +
    5#ifndef ARRAY_H
    +
    6#define ARRAY_H
    +
    7
    +
    8#include "template_utils.h"
    +
    9
    +
    10#include <stdint.h>
    +
    11
    +
    12#include <array>
    +
    13
    +
    14namespace open_cpp_utils
    +
    15{
    +
    16
    +
    17// =====================================================================================================================
    +
    18// Forward Definitions
    +
    19// =====================================================================================================================
    +
    20template<typename T, size_t N> struct fixed_array;
    +
    21template<typename T, size_t N> class dyn_array;
    +
    22template<typename T, size_t N> using array = fixed_array<T, N>;
    +
    23
    +
    24
    +
    25// =====================================================================================================================
    +
    26// Fixed Array
    +
    27// =====================================================================================================================
    +
    28
    +
    34template<typename T, size_t N>
    +
    +
    35struct fixed_array<T, N>
    +
    36{
    +
    37// Typedefs ============================================================================================================
    +
    38
    +
    39public:
    +
    40 using value_type = T;
    +
    41 using array_type = value_type[N];
    +
    42 using size_type = size_t;
    +
    43
    +
    44// Functions ===========================================================================================================
    +
    45
    +
    46public:
    +
    47
    +
    48// Constructors & Destructor -------------------------------------------------------------------------------------------
    +
    49
    +
    50 constexpr fixed_array() : data_{ T() } {}
    +
    51 constexpr fixed_array(const fixed_array& array) : data_{ array.data_ } {}
    +
    52 constexpr fixed_array(const array_type& data) : data_{ data } {}
    +
    53
    +
    54 constexpr size_type size() { return N; }
    +
    55
    +
    56
    +
    57// Variables ===========================================================================================================
    +
    58
    +
    59private:
    +
    60 array_type data_;
    +
    61
    +
    62};
    +
    +
    63
    +
    64}
    +
    65
    +
    66
    +
    67#endif //ARRAY_H
    +
    Definition array.h:21
    +
    Wrapper for array of type T with fixed length N.
    Definition array.h:36
    +
    Definition array.h:20
    +
    Provides compile time evaluation utilities for templates and template packs.
    +
    + + + + diff --git a/External/open-cpp-utils/Documentation/html/bc_s.png b/External/open-cpp-utils/Documentation/html/bc_s.png new file mode 100644 index 0000000..224b29a Binary files /dev/null and b/External/open-cpp-utils/Documentation/html/bc_s.png differ diff --git a/External/open-cpp-utils/Documentation/html/bc_sd.png b/External/open-cpp-utils/Documentation/html/bc_sd.png new file mode 100644 index 0000000..31ca888 Binary files /dev/null and b/External/open-cpp-utils/Documentation/html/bc_sd.png differ diff --git a/External/open-cpp-utils/Documentation/html/classes.html b/External/open-cpp-utils/Documentation/html/classes.html new file mode 100644 index 0000000..0c9307c --- /dev/null +++ b/External/open-cpp-utils/Documentation/html/classes.html @@ -0,0 +1,113 @@ + + + + + + + +open-cpp-utils: Class Index + + + + + + + + + + + +
    +
    + + + + + + +
    +
    open-cpp-utils 0.0.1 +
    +
    +
    + + + + + + + +
    + +
    +
    + + +
    +
    +
    +
    +
    +
    Loading...
    +
    Searching...
    +
    No Matches
    +
    +
    +
    +
    + +
    +
    Class Index
    +
    +
    +
    A | B | C | D | F | I | O | P | T
    +
    +
    +
    A
    +
    any (open_cpp_utils)
    any< T, Rest... > (open_cpp_utils)
    any<> (open_cpp_utils)
    +
    +
    B
    +
    directed_tree::breadth_first (open_cpp_utils)
    +
    +
    C
    +
    constant_value (open_cpp_utils)
    +
    +
    D
    +
    directed_tree (open_cpp_utils)
    dyn_array (open_cpp_utils)
    +
    +
    F
    +
    fixed_array (open_cpp_utils)
    fixed_array< T, N > (open_cpp_utils)
    +
    +
    I
    +
    directed_tree::in_order (open_cpp_utils)
    +
    +
    O
    +
    optional (open_cpp_utils)
    +
    +
    P
    +
    directed_tree::post_order (open_cpp_utils)
    directed_tree::pre_order (open_cpp_utils)
    +
    +
    T
    +
    directed_tree::traverser (open_cpp_utils)
    +
    +
    + + + + diff --git a/External/open-cpp-utils/Documentation/html/classopen__cpp__utils_1_1any.html b/External/open-cpp-utils/Documentation/html/classopen__cpp__utils_1_1any.html new file mode 100644 index 0000000..d3b64a1 --- /dev/null +++ b/External/open-cpp-utils/Documentation/html/classopen__cpp__utils_1_1any.html @@ -0,0 +1,102 @@ + + + + + + + +open-cpp-utils: open_cpp_utils::any< Ts > Class Template Reference + + + + + + + + + + + +
    +
    + + + + + + +
    +
    open-cpp-utils 0.0.1 +
    +
    +
    + + + + + + + + +
    +
    + + +
    +
    +
    +
    +
    +
    Loading...
    +
    Searching...
    +
    No Matches
    +
    +
    +
    +
    + + +
    +
    +
    open_cpp_utils::any< Ts > Class Template Reference
    +
    +
    + +

    Wrapper for a value with multiple types. + More...

    +

    Detailed Description

    +
    template<typename... Ts>
    +class open_cpp_utils::any< Ts >

    Wrapper for a value with multiple types.

    +
    Template Parameters
    + + +
    TsTypes to include, must be unique
    +
    +
    +

    The documentation for this class was generated from the following file: +
    + + + + diff --git a/External/open-cpp-utils/Documentation/html/classopen__cpp__utils_1_1any_3_01_t_00_01_rest_8_8_8_01_4-members.html b/External/open-cpp-utils/Documentation/html/classopen__cpp__utils_1_1any_3_01_t_00_01_rest_8_8_8_01_4-members.html new file mode 100644 index 0000000..b8188c8 --- /dev/null +++ b/External/open-cpp-utils/Documentation/html/classopen__cpp__utils_1_1any_3_01_t_00_01_rest_8_8_8_01_4-members.html @@ -0,0 +1,106 @@ + + + + + + + +open-cpp-utils: Member List + + + + + + + + + + + +
    +
    + + + + + + +
    +
    open-cpp-utils 0.0.1 +
    +
    +
    + + + + + + + + +
    +
    + + +
    +
    +
    +
    +
    +
    Loading...
    +
    Searching...
    +
    No Matches
    +
    +
    +
    +
    + + +
    +
    +
    open_cpp_utils::any< T, Rest... > Member List
    +
    +
    + +

    This is the complete list of members for open_cpp_utils::any< T, Rest... >, including all inherited members.

    + + + + + + + + + + + + + + + + + +
    any() (defined in open_cpp_utils::any< T, Rest... >)open_cpp_utils::any< T, Rest... >inline
    any(const this_type &value, const Rest &...other) (defined in open_cpp_utils::any< T, Rest... >)open_cpp_utils::any< T, Rest... >inline
    any(this_type &&value, Rest &&...other) (defined in open_cpp_utils::any< T, Rest... >)open_cpp_utils::any< T, Rest... >inline
    any(const any &other)=default (defined in open_cpp_utils::any< T, Rest... >)open_cpp_utils::any< T, Rest... >
    any(any &&other)=default (defined in open_cpp_utils::any< T, Rest... >)open_cpp_utils::any< T, Rest... >
    base_type typedef (defined in open_cpp_utils::any< T, Rest... >)open_cpp_utils::any< T, Rest... >
    operator const this_type &() const (defined in open_cpp_utils::any< T, Rest... >)open_cpp_utils::any< T, Rest... >inline
    operator const this_type *() const (defined in open_cpp_utils::any< T, Rest... >)open_cpp_utils::any< T, Rest... >inline
    operator this_type() const (defined in open_cpp_utils::any< T, Rest... >)open_cpp_utils::any< T, Rest... >inline
    operator this_type &() (defined in open_cpp_utils::any< T, Rest... >)open_cpp_utils::any< T, Rest... >inline
    operator this_type &&() (defined in open_cpp_utils::any< T, Rest... >)open_cpp_utils::any< T, Rest... >inline
    operator this_type *() (defined in open_cpp_utils::any< T, Rest... >)open_cpp_utils::any< T, Rest... >inline
    operator=(const any &)=default (defined in open_cpp_utils::any< T, Rest... >)open_cpp_utils::any< T, Rest... >
    operator=(any &&)=default (defined in open_cpp_utils::any< T, Rest... >)open_cpp_utils::any< T, Rest... >
    this_type typedef (defined in open_cpp_utils::any< T, Rest... >)open_cpp_utils::any< T, Rest... >
    ~any()=default (defined in open_cpp_utils::any< T, Rest... >)open_cpp_utils::any< T, Rest... >
    + + + + diff --git a/External/open-cpp-utils/Documentation/html/classopen__cpp__utils_1_1any_3_01_t_00_01_rest_8_8_8_01_4.html b/External/open-cpp-utils/Documentation/html/classopen__cpp__utils_1_1any_3_01_t_00_01_rest_8_8_8_01_4.html new file mode 100644 index 0000000..2c67296 --- /dev/null +++ b/External/open-cpp-utils/Documentation/html/classopen__cpp__utils_1_1any_3_01_t_00_01_rest_8_8_8_01_4.html @@ -0,0 +1,152 @@ + + + + + + + +open-cpp-utils: open_cpp_utils::any< T, Rest... > Class Template Reference + + + + + + + + + + + +
    +
    + + + + + + +
    +
    open-cpp-utils 0.0.1 +
    +
    +
    + + + + + + + + +
    +
    + + +
    +
    +
    +
    +
    +
    Loading...
    +
    Searching...
    +
    No Matches
    +
    +
    +
    +
    + + +
    +
    + +
    open_cpp_utils::any< T, Rest... > Class Template Reference
    +
    +
    +
    +Inheritance diagram for open_cpp_utils::any< T, Rest... >:
    +
    +
    + + +open_cpp_utils::any< Rest... > + +
    + + + + + + +

    +Public Types

    +using base_type = any<Rest...>
     
    +using this_type = T
     
    + + + + + + + + + + + + + + + + + + + + + + + + + +

    +Public Member Functions

    any (const this_type &value, const Rest &...other)
     
    any (this_type &&value, Rest &&...other)
     
    any (const any &other)=default
     
    any (any &&other)=default
     
    +anyoperator= (const any &)=default
     
    +anyoperator= (any &&)=default
     
    operator this_type () const
     
    operator this_type & ()
     
    operator const this_type & () const
     
    operator this_type && ()
     
    operator this_type * ()
     
    operator const this_type * () const
     
    +
    The documentation for this class was generated from the following file: +
    + + + + diff --git a/External/open-cpp-utils/Documentation/html/classopen__cpp__utils_1_1any_3_01_t_00_01_rest_8_8_8_01_4.png b/External/open-cpp-utils/Documentation/html/classopen__cpp__utils_1_1any_3_01_t_00_01_rest_8_8_8_01_4.png new file mode 100644 index 0000000..36977e1 Binary files /dev/null and b/External/open-cpp-utils/Documentation/html/classopen__cpp__utils_1_1any_3_01_t_00_01_rest_8_8_8_01_4.png differ diff --git a/External/open-cpp-utils/Documentation/html/classopen__cpp__utils_1_1any_3_4.html b/External/open-cpp-utils/Documentation/html/classopen__cpp__utils_1_1any_3_4.html new file mode 100644 index 0000000..86ecf42 --- /dev/null +++ b/External/open-cpp-utils/Documentation/html/classopen__cpp__utils_1_1any_3_4.html @@ -0,0 +1,90 @@ + + + + + + + +open-cpp-utils: open_cpp_utils::any<> Class Reference + + + + + + + + + + + +
    +
    + + + + + + +
    +
    open-cpp-utils 0.0.1 +
    +
    +
    + + + + + + + + +
    +
    + + +
    +
    +
    +
    +
    +
    Loading...
    +
    Searching...
    +
    No Matches
    +
    +
    +
    +
    + + +
    +
    +
    open_cpp_utils::any<> Class Reference
    +
    +
    +
    The documentation for this class was generated from the following file: +
    + + + + diff --git a/External/open-cpp-utils/Documentation/html/classopen__cpp__utils_1_1directed__tree-members.html b/External/open-cpp-utils/Documentation/html/classopen__cpp__utils_1_1directed__tree-members.html new file mode 100644 index 0000000..4d055b0 --- /dev/null +++ b/External/open-cpp-utils/Documentation/html/classopen__cpp__utils_1_1directed__tree-members.html @@ -0,0 +1,106 @@ + + + + + + + +open-cpp-utils: Member List + + + + + + + + + + + +
    +
    + + + + + + +
    +
    open-cpp-utils 0.0.1 +
    +
    +
    + + + + + + + + +
    +
    + + +
    +
    +
    +
    +
    +
    Loading...
    +
    Searching...
    +
    No Matches
    +
    +
    +
    +
    + + +
    +
    +
    open_cpp_utils::directed_tree< T > Member List
    +
    + + + + + diff --git a/External/open-cpp-utils/Documentation/html/classopen__cpp__utils_1_1directed__tree.html b/External/open-cpp-utils/Documentation/html/classopen__cpp__utils_1_1directed__tree.html new file mode 100644 index 0000000..3aa3e62 --- /dev/null +++ b/External/open-cpp-utils/Documentation/html/classopen__cpp__utils_1_1directed__tree.html @@ -0,0 +1,598 @@ + + + + + + + +open-cpp-utils: open_cpp_utils::directed_tree< T > Class Template Reference + + + + + + + + + + + +
    +
    + + + + + + +
    +
    open-cpp-utils 0.0.1 +
    +
    +
    + + + + + + + + +
    +
    + + +
    +
    +
    +
    +
    +
    Loading...
    +
    Searching...
    +
    No Matches
    +
    +
    +
    +
    + + +
    +
    + +
    open_cpp_utils::directed_tree< T > Class Template Reference
    +
    +
    + +

    Class for creating a directed tree. + More...

    + +

    #include <directed_tree.h>

    + + + + + + + + + + + + + + + + + +

    +Classes

    class  breadth_first
     Breadth first traversal. More...
     
    class  in_order
     In-order traversal. More...
     
    class  post_order
     Post-order traversal. More...
     
    class  pre_order
     Pre-order traversal. More...
     
    class  traverser
     Visitor pattern for traversing the tree. More...
     
    + + + + + + + +

    +Public Types

    +using data_type = T
     
    +using node = uint32_t
     
    +using node_queue = std::deque<node>
     
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

    +Public Member Functions

    directed_tree ()
     Default constructor, creates tree with empty root.
     
    node parent (node id) const
     Get the parent of a node. O(1)
     
    node first_child (node id) const
     Get the first child of a node. O(1)
     
    node prev_sibling (node id) const
     Get the previous sibling of a node. O(1)
     
    node next_sibling (node id) const
     Get the next sibling of a node. O(1)
     
    node left_most (node id) const
     Get the left most child of a node. O(log(n))
     
    uint32_t depth (node id) const
     Get the depth of a node.
     
    node insert (const data_type &data, node p_id)
     Insert a node into the tree as a child of the provided node.
     
    void erase (node id)
     Erase a node in the tree.
     
    data_type & operator[] (node id)
     Getter for data associated with a node.
     
    const data_type & operator[] (node id) const
     Constant getter for data associated with a node.
     
    template<typename O = pre_order, typename V >
    void traverse (V &visitor)
     Traverser-Visitor pattern for accessing the tree.
     
    + + + +

    +Static Public Attributes

    +static constexpr constant_value< node, node(0)> root {}
     
    +

    Detailed Description

    +
    template<typename T>
    +class open_cpp_utils::directed_tree< T >

    Class for creating a directed tree.

    +
    Template Parameters
    + + +
    TType of the data associated with each node
    +
    +
    +

    The tree is a series of child nodes in forward linked lists.

    +

    Member Function Documentation

    + +

    ◆ depth()

    + +
    +
    +
    +template<typename T >
    + + + + + +
    + + + + + + + +
    uint32_t open_cpp_utils::directed_tree< T >::depth (node id) const
    +
    +inline
    +
    + +

    Get the depth of a node.

    +
    Parameters
    + + +
    id
    +
    +
    +
    Returns
    + +
    +
    + +

    ◆ erase()

    + +
    +
    +
    +template<typename T >
    + + + + + +
    + + + + + + + +
    void open_cpp_utils::directed_tree< T >::erase (node id)
    +
    +inline
    +
    + +

    Erase a node in the tree.

    +
    Parameters
    + + +
    idId of the node to erase
    +
    +
    + +
    +
    + +

    ◆ first_child()

    + +
    +
    +
    +template<typename T >
    + + + + + +
    + + + + + + + +
    node open_cpp_utils::directed_tree< T >::first_child (node id) const
    +
    +inline
    +
    + +

    Get the first child of a node. O(1)

    +
    Parameters
    + + +
    idNode id to reference
    +
    +
    +
    Returns
    Node id of the first child
    + +
    +
    + +

    ◆ insert()

    + +
    +
    +
    +template<typename T >
    + + + + + +
    + + + + + + + + + + + +
    node open_cpp_utils::directed_tree< T >::insert (const data_type & data,
    node p_id )
    +
    +inline
    +
    + +

    Insert a node into the tree as a child of the provided node.

    +
    Parameters
    + + + +
    dataValue to insert
    p_idId of the parent node
    +
    +
    +
    Returns
    Id of the inserted node
    + +
    +
    + +

    ◆ left_most()

    + +
    +
    +
    +template<typename T >
    + + + + + +
    + + + + + + + +
    node open_cpp_utils::directed_tree< T >::left_most (node id) const
    +
    +inline
    +
    + +

    Get the left most child of a node. O(log(n))

    +
    Parameters
    + + +
    idNode id to reference
    +
    +
    +
    Returns
    Node id of the left most child
    + +
    +
    + +

    ◆ next_sibling()

    + +
    +
    +
    +template<typename T >
    + + + + + +
    + + + + + + + +
    node open_cpp_utils::directed_tree< T >::next_sibling (node id) const
    +
    +inline
    +
    + +

    Get the next sibling of a node. O(1)

    +
    Parameters
    + + +
    idNode id to reference
    +
    +
    +
    Returns
    Node id of the next sibling in the linked list
    + +
    +
    + +

    ◆ operator[]() [1/2]

    + +
    +
    +
    +template<typename T >
    + + + + + +
    + + + + + + + +
    data_type & open_cpp_utils::directed_tree< T >::operator[] (node id)
    +
    +inline
    +
    + +

    Getter for data associated with a node.

    +
    Parameters
    + + +
    idId of the node to access
    +
    +
    +
    Returns
    Reference to the node's data
    + +
    +
    + +

    ◆ operator[]() [2/2]

    + +
    +
    +
    +template<typename T >
    + + + + + +
    + + + + + + + +
    const data_type & open_cpp_utils::directed_tree< T >::operator[] (node id) const
    +
    +inline
    +
    + +

    Constant getter for data associated with a node.

    +
    Parameters
    + + +
    nodeId of the node to access
    +
    +
    +
    Returns
    Reference to the node's data
    + +
    +
    + +

    ◆ parent()

    + +
    +
    +
    +template<typename T >
    + + + + + +
    + + + + + + + +
    node open_cpp_utils::directed_tree< T >::parent (node id) const
    +
    +inline
    +
    + +

    Get the parent of a node. O(1)

    +
    Parameters
    + + +
    idNode id to reference
    +
    +
    +
    Returns
    Node id of the parent
    + +
    +
    + +

    ◆ prev_sibling()

    + +
    +
    +
    +template<typename T >
    + + + + + +
    + + + + + + + +
    node open_cpp_utils::directed_tree< T >::prev_sibling (node id) const
    +
    +inline
    +
    + +

    Get the previous sibling of a node. O(1)

    +
    Parameters
    + + +
    idNode id to reference
    +
    +
    +
    Returns
    Node id of the next sibling in the linked list
    + +
    +
    + +

    ◆ traverse()

    + +
    +
    +
    +template<typename T >
    +
    +template<typename O = pre_order, typename V >
    + + + + + +
    + + + + + + + +
    void open_cpp_utils::directed_tree< T >::traverse (V & visitor)
    +
    +inline
    +
    + +

    Traverser-Visitor pattern for accessing the tree.

    +
    Template Parameters
    + + + +
    VVisitor type.
    OOrder type. Defaults to Pre-Order Traversal.
    +
    +
    +
    Parameters
    + + +
    visitor
    +
    +
    + +
    +
    +
    The documentation for this class was generated from the following file: +
    + + + + diff --git a/External/open-cpp-utils/Documentation/html/classopen__cpp__utils_1_1directed__tree_1_1breadth__first-members.html b/External/open-cpp-utils/Documentation/html/classopen__cpp__utils_1_1directed__tree_1_1breadth__first-members.html new file mode 100644 index 0000000..2c44efa --- /dev/null +++ b/External/open-cpp-utils/Documentation/html/classopen__cpp__utils_1_1directed__tree_1_1breadth__first-members.html @@ -0,0 +1,92 @@ + + + + + + + +open-cpp-utils: Member List + + + + + + + + + + + +
    +
    + + + + + + +
    +
    open-cpp-utils 0.0.1 +
    +
    +
    + + + + + + + + +
    +
    + + +
    +
    +
    +
    +
    +
    Loading...
    +
    Searching...
    +
    No Matches
    +
    +
    +
    +
    + + +
    +
    +
    open_cpp_utils::directed_tree< T >::breadth_first Member List
    +
    +
    + +

    This is the complete list of members for open_cpp_utils::directed_tree< T >::breadth_first, including all inherited members.

    + + + +
    breadth_first(directed_tree &graph) (defined in open_cpp_utils::directed_tree< T >::breadth_first)open_cpp_utils::directed_tree< T >::breadth_firstinline
    operator()(node node) (defined in open_cpp_utils::directed_tree< T >::breadth_first)open_cpp_utils::directed_tree< T >::breadth_firstinline
    + + + + diff --git a/External/open-cpp-utils/Documentation/html/classopen__cpp__utils_1_1directed__tree_1_1breadth__first.html b/External/open-cpp-utils/Documentation/html/classopen__cpp__utils_1_1directed__tree_1_1breadth__first.html new file mode 100644 index 0000000..613c85d --- /dev/null +++ b/External/open-cpp-utils/Documentation/html/classopen__cpp__utils_1_1directed__tree_1_1breadth__first.html @@ -0,0 +1,111 @@ + + + + + + + +open-cpp-utils: open_cpp_utils::directed_tree< T >::breadth_first Class Reference + + + + + + + + + + + +
    +
    + + + + + + +
    +
    open-cpp-utils 0.0.1 +
    +
    +
    + + + + + + + + +
    +
    + + +
    +
    +
    +
    +
    +
    Loading...
    +
    Searching...
    +
    No Matches
    +
    +
    +
    +
    + + +
    +
    + +
    open_cpp_utils::directed_tree< T >::breadth_first Class Reference
    +
    +
    + +

    Breadth first traversal. + More...

    + +

    #include <directed_tree.h>

    + + + + + + +

    +Public Member Functions

    breadth_first (directed_tree &graph)
     
    +node operator() (node node)
     
    +

    Detailed Description

    +
    template<typename T>
    +class open_cpp_utils::directed_tree< T >::breadth_first

    Breadth first traversal.

    +

    The documentation for this class was generated from the following file: +
    + + + + diff --git a/External/open-cpp-utils/Documentation/html/classopen__cpp__utils_1_1directed__tree_1_1in__order-members.html b/External/open-cpp-utils/Documentation/html/classopen__cpp__utils_1_1directed__tree_1_1in__order-members.html new file mode 100644 index 0000000..2923892 --- /dev/null +++ b/External/open-cpp-utils/Documentation/html/classopen__cpp__utils_1_1directed__tree_1_1in__order-members.html @@ -0,0 +1,92 @@ + + + + + + + +open-cpp-utils: Member List + + + + + + + + + + + +
    +
    + + + + + + +
    +
    open-cpp-utils 0.0.1 +
    +
    +
    + + + + + + + + +
    +
    + + +
    +
    +
    +
    +
    +
    Loading...
    +
    Searching...
    +
    No Matches
    +
    +
    +
    +
    + + +
    +
    +
    open_cpp_utils::directed_tree< T >::in_order Member List
    +
    +
    + +

    This is the complete list of members for open_cpp_utils::directed_tree< T >::in_order, including all inherited members.

    + + + +
    in_order(directed_tree &graph) (defined in open_cpp_utils::directed_tree< T >::in_order)open_cpp_utils::directed_tree< T >::in_orderinline
    operator()(node node) (defined in open_cpp_utils::directed_tree< T >::in_order)open_cpp_utils::directed_tree< T >::in_orderinline
    + + + + diff --git a/External/open-cpp-utils/Documentation/html/classopen__cpp__utils_1_1directed__tree_1_1in__order.html b/External/open-cpp-utils/Documentation/html/classopen__cpp__utils_1_1directed__tree_1_1in__order.html new file mode 100644 index 0000000..f546a73 --- /dev/null +++ b/External/open-cpp-utils/Documentation/html/classopen__cpp__utils_1_1directed__tree_1_1in__order.html @@ -0,0 +1,111 @@ + + + + + + + +open-cpp-utils: open_cpp_utils::directed_tree< T >::in_order Class Reference + + + + + + + + + + + +
    +
    + + + + + + +
    +
    open-cpp-utils 0.0.1 +
    +
    +
    + + + + + + + + +
    +
    + + +
    +
    +
    +
    +
    +
    Loading...
    +
    Searching...
    +
    No Matches
    +
    +
    +
    +
    + + +
    +
    + +
    open_cpp_utils::directed_tree< T >::in_order Class Reference
    +
    +
    + +

    In-order traversal. + More...

    + +

    #include <directed_tree.h>

    + + + + + + +

    +Public Member Functions

    in_order (directed_tree &graph)
     
    +node operator() (node node)
     
    +

    Detailed Description

    +
    template<typename T>
    +class open_cpp_utils::directed_tree< T >::in_order

    In-order traversal.

    +

    The documentation for this class was generated from the following file: +
    + + + + diff --git a/External/open-cpp-utils/Documentation/html/classopen__cpp__utils_1_1directed__tree_1_1post__order-members.html b/External/open-cpp-utils/Documentation/html/classopen__cpp__utils_1_1directed__tree_1_1post__order-members.html new file mode 100644 index 0000000..d68e4cf --- /dev/null +++ b/External/open-cpp-utils/Documentation/html/classopen__cpp__utils_1_1directed__tree_1_1post__order-members.html @@ -0,0 +1,92 @@ + + + + + + + +open-cpp-utils: Member List + + + + + + + + + + + +
    +
    + + + + + + +
    +
    open-cpp-utils 0.0.1 +
    +
    +
    + + + + + + + + +
    +
    + + +
    +
    +
    +
    +
    +
    Loading...
    +
    Searching...
    +
    No Matches
    +
    +
    +
    +
    + + +
    +
    +
    open_cpp_utils::directed_tree< T >::post_order Member List
    +
    +
    + +

    This is the complete list of members for open_cpp_utils::directed_tree< T >::post_order, including all inherited members.

    + + + +
    operator()(node node) (defined in open_cpp_utils::directed_tree< T >::post_order)open_cpp_utils::directed_tree< T >::post_orderinline
    post_order(directed_tree &graph) (defined in open_cpp_utils::directed_tree< T >::post_order)open_cpp_utils::directed_tree< T >::post_orderinline
    + + + + diff --git a/External/open-cpp-utils/Documentation/html/classopen__cpp__utils_1_1directed__tree_1_1post__order.html b/External/open-cpp-utils/Documentation/html/classopen__cpp__utils_1_1directed__tree_1_1post__order.html new file mode 100644 index 0000000..4418033 --- /dev/null +++ b/External/open-cpp-utils/Documentation/html/classopen__cpp__utils_1_1directed__tree_1_1post__order.html @@ -0,0 +1,111 @@ + + + + + + + +open-cpp-utils: open_cpp_utils::directed_tree< T >::post_order Class Reference + + + + + + + + + + + +
    +
    + + + + + + +
    +
    open-cpp-utils 0.0.1 +
    +
    +
    + + + + + + + + +
    +
    + + +
    +
    +
    +
    +
    +
    Loading...
    +
    Searching...
    +
    No Matches
    +
    +
    +
    +
    + + +
    +
    + +
    open_cpp_utils::directed_tree< T >::post_order Class Reference
    +
    +
    + +

    Post-order traversal. + More...

    + +

    #include <directed_tree.h>

    + + + + + + +

    +Public Member Functions

    post_order (directed_tree &graph)
     
    +node operator() (node node)
     
    +

    Detailed Description

    +
    template<typename T>
    +class open_cpp_utils::directed_tree< T >::post_order

    Post-order traversal.

    +

    The documentation for this class was generated from the following file: +
    + + + + diff --git a/External/open-cpp-utils/Documentation/html/classopen__cpp__utils_1_1directed__tree_1_1pre__order-members.html b/External/open-cpp-utils/Documentation/html/classopen__cpp__utils_1_1directed__tree_1_1pre__order-members.html new file mode 100644 index 0000000..c25dcba --- /dev/null +++ b/External/open-cpp-utils/Documentation/html/classopen__cpp__utils_1_1directed__tree_1_1pre__order-members.html @@ -0,0 +1,92 @@ + + + + + + + +open-cpp-utils: Member List + + + + + + + + + + + +
    +
    + + + + + + +
    +
    open-cpp-utils 0.0.1 +
    +
    +
    + + + + + + + + +
    +
    + + +
    +
    +
    +
    +
    +
    Loading...
    +
    Searching...
    +
    No Matches
    +
    +
    +
    +
    + + +
    +
    +
    open_cpp_utils::directed_tree< T >::pre_order Member List
    +
    +
    + +

    This is the complete list of members for open_cpp_utils::directed_tree< T >::pre_order, including all inherited members.

    + + + +
    operator()(node id) (defined in open_cpp_utils::directed_tree< T >::pre_order)open_cpp_utils::directed_tree< T >::pre_orderinline
    pre_order(directed_tree &graph) (defined in open_cpp_utils::directed_tree< T >::pre_order)open_cpp_utils::directed_tree< T >::pre_orderinline
    + + + + diff --git a/External/open-cpp-utils/Documentation/html/classopen__cpp__utils_1_1directed__tree_1_1pre__order.html b/External/open-cpp-utils/Documentation/html/classopen__cpp__utils_1_1directed__tree_1_1pre__order.html new file mode 100644 index 0000000..61c860e --- /dev/null +++ b/External/open-cpp-utils/Documentation/html/classopen__cpp__utils_1_1directed__tree_1_1pre__order.html @@ -0,0 +1,111 @@ + + + + + + + +open-cpp-utils: open_cpp_utils::directed_tree< T >::pre_order Class Reference + + + + + + + + + + + +
    +
    + + + + + + +
    +
    open-cpp-utils 0.0.1 +
    +
    +
    + + + + + + + + +
    +
    + + +
    +
    +
    +
    +
    +
    Loading...
    +
    Searching...
    +
    No Matches
    +
    +
    +
    +
    + + +
    +
    + +
    open_cpp_utils::directed_tree< T >::pre_order Class Reference
    +
    +
    + +

    Pre-order traversal. + More...

    + +

    #include <directed_tree.h>

    + + + + + + +

    +Public Member Functions

    pre_order (directed_tree &graph)
     
    +node operator() (node id)
     
    +

    Detailed Description

    +
    template<typename T>
    +class open_cpp_utils::directed_tree< T >::pre_order

    Pre-order traversal.

    +

    The documentation for this class was generated from the following file: +
    + + + + diff --git a/External/open-cpp-utils/Documentation/html/classopen__cpp__utils_1_1directed__tree_1_1traverser-members.html b/External/open-cpp-utils/Documentation/html/classopen__cpp__utils_1_1directed__tree_1_1traverser-members.html new file mode 100644 index 0000000..8f22af5 --- /dev/null +++ b/External/open-cpp-utils/Documentation/html/classopen__cpp__utils_1_1directed__tree_1_1traverser-members.html @@ -0,0 +1,94 @@ + + + + + + + +open-cpp-utils: Member List + + + + + + + + + + + +
    +
    + + + + + + +
    +
    open-cpp-utils 0.0.1 +
    +
    +
    + + + + + + + + +
    +
    + + +
    +
    +
    +
    +
    +
    Loading...
    +
    Searching...
    +
    No Matches
    +
    +
    +
    +
    + + +
    +
    +
    open_cpp_utils::directed_tree< T >::traverser< V, O > Member List
    +
    + + + + + diff --git a/External/open-cpp-utils/Documentation/html/classopen__cpp__utils_1_1directed__tree_1_1traverser.html b/External/open-cpp-utils/Documentation/html/classopen__cpp__utils_1_1directed__tree_1_1traverser.html new file mode 100644 index 0000000..7380a93 --- /dev/null +++ b/External/open-cpp-utils/Documentation/html/classopen__cpp__utils_1_1directed__tree_1_1traverser.html @@ -0,0 +1,122 @@ + + + + + + + +open-cpp-utils: open_cpp_utils::directed_tree< T >::traverser< V, O > Class Template Reference + + + + + + + + + + + +
    +
    + + + + + + +
    +
    open-cpp-utils 0.0.1 +
    +
    +
    + + + + + + + + +
    +
    + + +
    +
    +
    +
    +
    +
    Loading...
    +
    Searching...
    +
    No Matches
    +
    +
    +
    +
    + + +
    +
    + +
    open_cpp_utils::directed_tree< T >::traverser< V, O > Class Template Reference
    +
    +
    + +

    Visitor pattern for traversing the tree. + More...

    + +

    #include <directed_tree.h>

    + + + + + + +

    +Public Types

    +using visitor_type = V
     
    +using order_type = O
     
    + + + + + +

    +Public Member Functions

    traverser (directed_tree &graph, visitor_type &visitor)
     
    +void operator() ()
     
    +

    Detailed Description

    +
    template<typename T>
    +template<typename V, typename O>
    +class open_cpp_utils::directed_tree< T >::traverser< V, O >

    Visitor pattern for traversing the tree.

    +

    The documentation for this class was generated from the following file: +
    + + + + diff --git a/External/open-cpp-utils/Documentation/html/classopen__cpp__utils_1_1dyn__array.html b/External/open-cpp-utils/Documentation/html/classopen__cpp__utils_1_1dyn__array.html new file mode 100644 index 0000000..49ce8af --- /dev/null +++ b/External/open-cpp-utils/Documentation/html/classopen__cpp__utils_1_1dyn__array.html @@ -0,0 +1,90 @@ + + + + + + + +open-cpp-utils: open_cpp_utils::dyn_array< T, N > Class Template Reference + + + + + + + + + + + +
    +
    + + + + + + +
    +
    open-cpp-utils 0.0.1 +
    +
    +
    + + + + + + + + +
    +
    + + +
    +
    +
    +
    +
    +
    Loading...
    +
    Searching...
    +
    No Matches
    +
    +
    +
    +
    + + +
    +
    +
    open_cpp_utils::dyn_array< T, N > Class Template Reference
    +
    +
    +
    The documentation for this class was generated from the following file: +
    + + + + diff --git a/External/open-cpp-utils/Documentation/html/classopen__cpp__utils_1_1optional-members.html b/External/open-cpp-utils/Documentation/html/classopen__cpp__utils_1_1optional-members.html new file mode 100644 index 0000000..1125cbb --- /dev/null +++ b/External/open-cpp-utils/Documentation/html/classopen__cpp__utils_1_1optional-members.html @@ -0,0 +1,118 @@ + + + + + + + +open-cpp-utils: Member List + + + + + + + + + + + +
    +
    + + + + + + +
    +
    open-cpp-utils 0.0.1 +
    +
    +
    + + + + + + + + +
    +
    + + +
    +
    +
    +
    +
    +
    Loading...
    +
    Searching...
    +
    No Matches
    +
    +
    +
    +
    + + +
    +
    +
    open_cpp_utils::optional< T > Member List
    +
    +
    + +

    This is the complete list of members for open_cpp_utils::optional< T >, including all inherited members.

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    operator const value_type &() const (defined in open_cpp_utils::optional< T >)open_cpp_utils::optional< T >inline
    operator value_type &() (defined in open_cpp_utils::optional< T >)open_cpp_utils::optional< T >inline
    operator%=(const value_type &data) (defined in open_cpp_utils::optional< T >)open_cpp_utils::optional< T >inline
    operator&=(const value_type &data) (defined in open_cpp_utils::optional< T >)open_cpp_utils::optional< T >inline
    operator()() const (defined in open_cpp_utils::optional< T >)open_cpp_utils::optional< T >inline
    operator*() (defined in open_cpp_utils::optional< T >)open_cpp_utils::optional< T >inline
    operator*() const (defined in open_cpp_utils::optional< T >)open_cpp_utils::optional< T >inline
    operator*=(const value_type &data) (defined in open_cpp_utils::optional< T >)open_cpp_utils::optional< T >inline
    operator+=(const value_type &data) (defined in open_cpp_utils::optional< T >)open_cpp_utils::optional< T >inline
    operator-=(const value_type &data) (defined in open_cpp_utils::optional< T >)open_cpp_utils::optional< T >inline
    operator->() (defined in open_cpp_utils::optional< T >)open_cpp_utils::optional< T >inline
    operator->() const (defined in open_cpp_utils::optional< T >)open_cpp_utils::optional< T >inline
    operator/=(const value_type &data) (defined in open_cpp_utils::optional< T >)open_cpp_utils::optional< T >inline
    operator<<=(const value_type &data) (defined in open_cpp_utils::optional< T >)open_cpp_utils::optional< T >inline
    operator=(const optional &other)=default (defined in open_cpp_utils::optional< T >)open_cpp_utils::optional< T >
    operator=(optional &&other)=default (defined in open_cpp_utils::optional< T >)open_cpp_utils::optional< T >
    operator=(const value_type &data) (defined in open_cpp_utils::optional< T >)open_cpp_utils::optional< T >inline
    operator=(value_type &&data) (defined in open_cpp_utils::optional< T >)open_cpp_utils::optional< T >inline
    operator>>=(const value_type &data) (defined in open_cpp_utils::optional< T >)open_cpp_utils::optional< T >inline
    operator^=(const value_type &data) (defined in open_cpp_utils::optional< T >)open_cpp_utils::optional< T >inline
    operator|=(const value_type &data) (defined in open_cpp_utils::optional< T >)open_cpp_utils::optional< T >inline
    optional() (defined in open_cpp_utils::optional< T >)open_cpp_utils::optional< T >inline
    optional(const value_type &data) (defined in open_cpp_utils::optional< T >)open_cpp_utils::optional< T >inline
    optional(value_type &&data) (defined in open_cpp_utils::optional< T >)open_cpp_utils::optional< T >inline
    optional(const optional &other)=default (defined in open_cpp_utils::optional< T >)open_cpp_utils::optional< T >
    optional(optional &&other)=default (defined in open_cpp_utils::optional< T >)open_cpp_utils::optional< T >
    reset() (defined in open_cpp_utils::optional< T >)open_cpp_utils::optional< T >inline
    value_type typedef (defined in open_cpp_utils::optional< T >)open_cpp_utils::optional< T >
    + + + + diff --git a/External/open-cpp-utils/Documentation/html/classopen__cpp__utils_1_1optional.html b/External/open-cpp-utils/Documentation/html/classopen__cpp__utils_1_1optional.html new file mode 100644 index 0000000..b854d0e --- /dev/null +++ b/External/open-cpp-utils/Documentation/html/classopen__cpp__utils_1_1optional.html @@ -0,0 +1,182 @@ + + + + + + + +open-cpp-utils: open_cpp_utils::optional< T > Class Template Reference + + + + + + + + + + + +
    +
    + + + + + + +
    +
    open-cpp-utils 0.0.1 +
    +
    +
    + + + + + + + + +
    +
    + + +
    +
    +
    +
    +
    +
    Loading...
    +
    Searching...
    +
    No Matches
    +
    +
    +
    +
    + + +
    +
    + +
    open_cpp_utils::optional< T > Class Template Reference
    +
    +
    + + + + +

    +Public Types

    +using value_type = T
     
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

    +Public Member Functions

    optional (const value_type &data)
     
    optional (value_type &&data)
     
    optional (const optional &other)=default
     
    optional (optional &&other)=default
     
    +optionaloperator= (const optional &other)=default
     
    +optionaloperator= (optional &&other)=default
     
    +optionaloperator= (const value_type &data)
     
    +optionaloperator= (value_type &&data)
     
    +value_type & operator+= (const value_type &data)
     
    +value_type & operator-= (const value_type &data)
     
    +value_type & operator*= (const value_type &data)
     
    +value_type & operator/= (const value_type &data)
     
    +value_type & operator%= (const value_type &data)
     
    +value_type & operator<<= (const value_type &data)
     
    +value_type & operator>>= (const value_type &data)
     
    +value_type & operator|= (const value_type &data)
     
    +value_type & operator&= (const value_type &data)
     
    +value_type & operator^= (const value_type &data)
     
    +bool operator() () const
     
    operator value_type & ()
     
    operator const value_type & () const
     
    +value_type * operator-> ()
     
    +const value_type * operator-> () const
     
    +value_type & operator* ()
     
    +const value_type & operator* () const
     
    +void reset ()
     
    +
    The documentation for this class was generated from the following file: +
    + + + + diff --git a/External/open-cpp-utils/Documentation/html/clipboard.js b/External/open-cpp-utils/Documentation/html/clipboard.js new file mode 100644 index 0000000..42c1fb0 --- /dev/null +++ b/External/open-cpp-utils/Documentation/html/clipboard.js @@ -0,0 +1,61 @@ +/** + +The code below is based on the Doxygen Awesome project, see +https://github.com/jothepro/doxygen-awesome-css + +MIT License + +Copyright (c) 2021 - 2022 jothepro + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +*/ + +let clipboard_title = "Copy to clipboard" +let clipboard_icon = `` +let clipboard_successIcon = `` +let clipboard_successDuration = 1000 + +$(function() { + if(navigator.clipboard) { + const fragments = document.getElementsByClassName("fragment") + for(const fragment of fragments) { + const clipboard_div = document.createElement("div") + clipboard_div.classList.add("clipboard") + clipboard_div.innerHTML = clipboard_icon + clipboard_div.title = clipboard_title + $(clipboard_div).click(function() { + const content = this.parentNode.cloneNode(true) + // filter out line number and folded fragments from file listings + content.querySelectorAll(".lineno, .ttc, .foldclosed").forEach((node) => { node.remove() }) + let text = content.textContent + // remove trailing newlines and trailing spaces from empty lines + text = text.replace(/^\s*\n/gm,'\n').replace(/\n*$/,'') + navigator.clipboard.writeText(text); + this.classList.add("success") + this.innerHTML = clipboard_successIcon + window.setTimeout(() => { // switch back to normal icon after timeout + this.classList.remove("success") + this.innerHTML = clipboard_icon + }, clipboard_successDuration); + }) + fragment.insertBefore(clipboard_div, fragment.firstChild) + } + } +}) diff --git a/External/open-cpp-utils/Documentation/html/closed.png b/External/open-cpp-utils/Documentation/html/closed.png new file mode 100644 index 0000000..98cc2c9 Binary files /dev/null and b/External/open-cpp-utils/Documentation/html/closed.png differ diff --git a/External/open-cpp-utils/Documentation/html/cookie.js b/External/open-cpp-utils/Documentation/html/cookie.js new file mode 100644 index 0000000..53ad21d --- /dev/null +++ b/External/open-cpp-utils/Documentation/html/cookie.js @@ -0,0 +1,58 @@ +/*! + Cookie helper functions + Copyright (c) 2023 Dimitri van Heesch + Released under MIT license. +*/ +let Cookie = { + cookie_namespace: 'doxygen_', + + readSetting(cookie,defVal) { + if (window.chrome) { + const val = localStorage.getItem(this.cookie_namespace+cookie) || + sessionStorage.getItem(this.cookie_namespace+cookie); + if (val) return val; + } else { + let myCookie = this.cookie_namespace+cookie+"="; + if (document.cookie) { + const index = document.cookie.indexOf(myCookie); + if (index != -1) { + const valStart = index + myCookie.length; + let valEnd = document.cookie.indexOf(";", valStart); + if (valEnd == -1) { + valEnd = document.cookie.length; + } + return document.cookie.substring(valStart, valEnd); + } + } + } + return defVal; + }, + + writeSetting(cookie,val,days=10*365) { // default days='forever', 0=session cookie, -1=delete + if (window.chrome) { + if (days==0) { + sessionStorage.setItem(this.cookie_namespace+cookie,val); + } else { + localStorage.setItem(this.cookie_namespace+cookie,val); + } + } else { + let date = new Date(); + date.setTime(date.getTime()+(days*24*60*60*1000)); + const expiration = days!=0 ? "expires="+date.toGMTString()+";" : ""; + document.cookie = this.cookie_namespace + cookie + "=" + + val + "; SameSite=Lax;" + expiration + "path=/"; + } + }, + + eraseSetting(cookie) { + if (window.chrome) { + if (localStorage.getItem(this.cookie_namespace+cookie)) { + localStorage.removeItem(this.cookie_namespace+cookie); + } else if (sessionStorage.getItem(this.cookie_namespace+cookie)) { + sessionStorage.removeItem(this.cookie_namespace+cookie); + } + } else { + this.writeSetting(cookie,'',-1); + } + }, +} diff --git a/External/open-cpp-utils/Documentation/html/directed__tree_8h_source.html b/External/open-cpp-utils/Documentation/html/directed__tree_8h_source.html new file mode 100644 index 0000000..ccd65e9 --- /dev/null +++ b/External/open-cpp-utils/Documentation/html/directed__tree_8h_source.html @@ -0,0 +1,462 @@ + + + + + + + +open-cpp-utils: directed_tree.h Source File + + + + + + + + + + + +
    +
    + + + + + + +
    +
    open-cpp-utils 0.0.1 +
    +
    +
    + + + + + + + + +
    + +
    +
    + + +
    +
    +
    +
    +
    +
    Loading...
    +
    Searching...
    +
    No Matches
    +
    +
    +
    +
    + +
    +
    directed_tree.h
    +
    +
    +
    1// =====================================================================================================================
    +
    2// Copyright 2024 Medusa Slockbower
    +
    3// Licensed under the Apache License, Version 2.0 (the "License");
    +
    4// you may not use this file except in compliance with the License.
    +
    5// You may obtain a copy of the License at
    +
    6//
    +
    7// http://www.apache.org/licenses/LICENSE-2.0
    +
    8//
    +
    9// Unless required by applicable law or agreed to in writing, software
    +
    10// distributed under the License is distributed on an "AS IS" BASIS,
    +
    11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    +
    12// See the License for the specific language governing permissions and
    +
    13// limitations under the License.
    +
    14// =====================================================================================================================
    +
    15
    +
    16#ifndef DIRECTEDGRAPH_H
    +
    17#define DIRECTEDGRAPH_H
    +
    18
    +
    19#include "template_utils.h"
    +
    20
    +
    21namespace open_cpp_utils
    +
    22{
    +
    23
    +
    31template<typename T>
    +
    + +
    33{
    +
    34// Forward Definitions =================================================================================================
    +
    35
    +
    36public:
    +
    37 class breadth_first;
    +
    38 class pre_order;
    +
    39 class in_order;
    +
    40 class post_order;
    +
    41
    +
    42private:
    +
    43 struct director;
    +
    44
    +
    45
    +
    46// Typedefs ============================================================================================================
    +
    47
    +
    48public:
    +
    49 using data_type = T;
    +
    50 using node = uint32_t;
    +
    51 using node_queue = std::deque<node>;
    +
    52
    +
    53private:
    +
    54 using hierarchy = std::vector<director>;
    +
    55 using storage = std::vector<data_type>;
    +
    56
    +
    57
    +
    58// Constants ===========================================================================================================
    +
    59
    +
    60public:
    +
    61 static constexpr constant_value<node, node(0)> root{};
    +
    62
    +
    63
    +
    64// Data Structures =====================================================================================================
    +
    65
    +
    66private:
    +
    67 struct director
    +
    68 {
    +
    69 enum flags
    +
    70 {
    +
    71 VALID = 0x0001
    +
    72 };
    +
    73
    +
    74 node parent, child, prev_sibling, next_sibling;
    +
    75 uint32_t flags, depth;
    +
    76
    +
    77 director() : parent(0), child(0), prev_sibling(0), next_sibling(0), flags(VALID) { }
    +
    78 };
    +
    79
    +
    80
    +
    81// Functions ===========================================================================================================
    +
    82
    +
    83public:
    +
    84
    +
    85// Constructors & Destructor ---------------------------------------------------------------------------------------
    +
    86
    +
    90 directed_tree() : graph_{ director() }, data_{ data_type() }, freed_{ } { }
    +
    91
    +
    92
    +
    93// Tree Navigation -------------------------------------------------------------------------------------------------
    +
    94
    +
    100 [[nodiscard]] node parent(node id) const { return graph_[id].parent; }
    +
    101
    +
    107 [[nodiscard]] node first_child(node id) const { return graph_[id].child; }
    +
    108
    +
    114 [[nodiscard]] node prev_sibling(node id) const { return graph_[id].prev_sibling; }
    +
    115
    +
    121 [[nodiscard]] node next_sibling(node id) const { return graph_[id].next_sibling; }
    +
    122
    +
    +
    128 [[nodiscard]] node left_most(node id) const
    +
    129 {
    +
    130 node current = id;
    +
    131 while(id = first_child(current)) current = id;
    +
    132 return current;
    +
    133 }
    +
    +
    134
    +
    +
    140 [[nodiscard]] uint32_t depth(node id) const
    +
    141 {
    +
    142 uint32_t depth = 0;
    +
    143 while (id)
    +
    144 {
    +
    145 id = parent(id);
    +
    146 ++depth;
    +
    147 }
    +
    148 return depth;
    +
    149 }
    +
    +
    150
    +
    151
    +
    152// Tree Modification ---------------------------------------------------------------------------------------------------
    +
    153
    +
    +
    160 node insert(const data_type& data, node p_id)
    +
    161 {
    +
    162 if(freed_.empty())
    +
    163 {
    +
    164 freed_.push_back(static_cast<node>(graph_.size()));
    +
    165 graph_.push_back(director()); data_.push_back(data);
    +
    166 }
    +
    167
    +
    168 node id = freed_.front(); freed_.pop_front();
    +
    169 director& node = graph_[id];
    +
    170 director& parent = graph_[p_id];
    +
    171
    +
    172
    +
    173 if(parent.child)
    +
    174 {
    +
    175 director& nchild = graph_[parent.child];
    +
    176 node.prev_sibling = nchild.prev_sibling;
    +
    177 nchild.prev_sibling = id;
    +
    178
    +
    179 if(nchild.prev_sibling)
    +
    180 {
    +
    181 director& pchild = graph_[nchild.prev_sibling];
    +
    182 pchild.next_sibling = id;
    +
    183 }
    +
    184 }
    +
    185
    +
    186 // Setup node
    +
    187 node.parent = p_id;
    +
    188 node.next_sibling = parent.child;
    +
    189 node.child = 0;
    +
    190 node.flags = director::VALID;
    +
    191
    +
    192 // Set parent's child
    +
    193 parent.child = id;
    +
    194
    +
    195
    +
    196 data_[id] = data;
    +
    197
    +
    198 return id;
    +
    199 }
    +
    +
    200
    +
    +
    205 void erase(node id)
    +
    206 {
    +
    207 if(id == 0) return;
    +
    208
    +
    209 director& erased = graph_[id];
    +
    210 erased.Flags &= ~director::VALID;
    +
    211 freed_.push_back(id);
    +
    212
    +
    213 graph_[erased.parent].Child = erased.Sibling;
    +
    214
    +
    215 node_queue stack{ erased.Child };
    +
    216
    +
    217 while(stack.empty() == false)
    +
    218 {
    +
    219 node next = stack.front(); stack.pop_front();
    +
    220 director& child = graph_[next];
    +
    221 child.Flags &= ~director::VALID;
    +
    222 freed_.push_back(next);
    +
    223
    +
    224 if(child.Sibling) stack.push_front(child.Sibling);
    +
    225 if(child.Child) stack.push_front(child.Child);
    +
    226 }
    +
    227 }
    +
    +
    228
    +
    229
    +
    230// Tree Access ---------------------------------------------------------------------------------------------------------
    +
    231
    +
    237 data_type& operator[](node id) { return data_[id]; }
    +
    238
    +
    244 [[nodiscard]] const data_type& operator[](node id) const { return data_[id]; }
    +
    245
    +
    246
    +
    247// Visitor Pattern -----------------------------------------------------------------------------------------------------
    +
    248
    +
    255 template<typename O = pre_order, typename V>
    +
    +
    256 void traverse(V& visitor)
    +
    257 {
    +
    258 traverser<V, O> traverser(*this, visitor);
    +
    259 traverser();
    +
    260 }
    +
    +
    261
    +
    262
    +
    263// Variables =======================================================================================================
    +
    264
    +
    265private:
    +
    266 hierarchy graph_;
    +
    267 storage data_;
    +
    268 node_queue freed_;
    +
    269
    +
    270
    +
    271// Navigation ======================================================================================================
    +
    272
    +
    273public:
    +
    274
    +
    + +
    279 {
    +
    280 public:
    +
    281 breadth_first(directed_tree& graph) : graph_(graph), visit_queue_(0) { }
    +
    282
    +
    283 node operator()(node node)
    +
    284 {
    +
    285 node = visit_queue_.back(); visit_queue_.pop_back();
    +
    286 director& current = graph_.graph_[node];
    +
    287
    +
    288 if(current.next_sibling) visit_queue_.push_back(current.next_sibling);
    +
    289 if(current.child) visit_queue_.push_front(current.child);
    +
    290
    +
    291 if(visit_queue_.empty()) return 0;
    +
    292 return node;
    +
    293 }
    +
    294
    +
    295 private:
    +
    296 directed_tree& graph_;
    +
    297 node_queue visit_queue_;
    +
    298 };
    +
    +
    299
    +
    300
    +
    + +
    305 {
    +
    306 public:
    +
    307 pre_order(directed_tree& graph) : graph_(graph) { }
    +
    308
    +
    309 node operator()(node id)
    +
    310 {
    +
    311 director& current = graph_.graph_[id];
    +
    312
    +
    313 if(current.next_sibling) visit_queue_.push_front(current.next_sibling);
    +
    314 if(current.child) visit_queue_.push_front(current.child);
    +
    315
    +
    316 if(visit_queue_.empty()) return 0;
    +
    317 node next = visit_queue_.front(); visit_queue_.pop_front();
    +
    318 return next;
    +
    319 }
    +
    320
    +
    321 private:
    +
    322 directed_tree& graph_;
    +
    323 node_queue visit_queue_;
    +
    324 };
    +
    +
    325
    +
    326
    +
    + +
    331 {
    +
    332 public:
    +
    333 in_order(directed_tree& graph) : graph_(graph) { }
    +
    334
    +
    335 node operator()(node node)
    +
    336 {
    +
    337 if(node == 0) visit_queue_.push_back(graph_.left_most(node));
    +
    338
    +
    339 node = visit_queue_.front(); visit_queue_.pop_front();
    +
    340 director& current = graph_.graph_[node];
    +
    341
    +
    342 if(current.Sibling)
    +
    343 {
    +
    344 if(graph_.next_sibling(current.Sibling)) visit_queue_.push_back(current.parent);
    +
    345 visit_queue_.push_back(graph_.left_most(current.Sibling));
    +
    346 }
    +
    347
    +
    348 return node;
    +
    349 }
    +
    350
    +
    351 private:
    +
    352 directed_tree& graph_;
    +
    353 node_queue visit_queue_;
    +
    354 };
    +
    +
    355
    +
    356
    +
    + +
    361 {
    +
    362 public:
    +
    363 post_order(directed_tree& graph) : graph_(graph) { }
    +
    364
    +
    365 node operator()(node node)
    +
    366 {
    +
    367 if(visit_queue_.empty()) visit_queue_.push_back(graph_.left_most(node));
    +
    368
    +
    369 node = visit_queue_.front(); visit_queue_.pop_front();
    +
    370 if(node == 0) return node;
    +
    371 director& current = graph_.graph_[node];
    +
    372
    +
    373 visit_queue_.push_back(current.Sibling ? graph_.left_most(current.Sibling) : graph_.parent(node));
    +
    374
    +
    375 return node;
    +
    376 }
    +
    377
    +
    378 private:
    +
    379 directed_tree& graph_;
    +
    380 node_queue visit_queue_;
    +
    381 };
    +
    +
    382
    +
    383
    +
    387 template<typename V, typename O>
    +
    + +
    389 {
    +
    390 public:
    +
    391 using visitor_type = V;
    +
    392 using order_type = O;
    +
    393
    +
    394 traverser(directed_tree& graph, visitor_type& visitor) : graph_(graph), visitor_(visitor), order_(graph) { }
    +
    395
    +
    396 void operator()()
    +
    397 {
    +
    398 node node = 0;
    +
    399 while(node = order_(node))
    +
    400 {
    +
    401 if(visitor_(graph_[node], node)) break;
    +
    402 }
    +
    403 }
    +
    404
    +
    405 private:
    +
    406 directed_tree& graph_;
    +
    407 visitor_type& visitor_;
    +
    408 order_type order_;
    +
    409 };
    +
    +
    410};
    +
    +
    411}
    +
    412
    +
    413#endif //DIRECTEDGRAPH_H
    +
    Breadth first traversal.
    Definition directed_tree.h:279
    +
    In-order traversal.
    Definition directed_tree.h:331
    +
    Post-order traversal.
    Definition directed_tree.h:361
    +
    Pre-order traversal.
    Definition directed_tree.h:305
    +
    Visitor pattern for traversing the tree.
    Definition directed_tree.h:389
    +
    Class for creating a directed tree.
    Definition directed_tree.h:33
    +
    void erase(node id)
    Erase a node in the tree.
    Definition directed_tree.h:205
    +
    node insert(const data_type &data, node p_id)
    Insert a node into the tree as a child of the provided node.
    Definition directed_tree.h:160
    +
    directed_tree()
    Default constructor, creates tree with empty root.
    Definition directed_tree.h:90
    +
    node prev_sibling(node id) const
    Get the previous sibling of a node. O(1)
    Definition directed_tree.h:114
    +
    node next_sibling(node id) const
    Get the next sibling of a node. O(1)
    Definition directed_tree.h:121
    +
    node parent(node id) const
    Get the parent of a node. O(1)
    Definition directed_tree.h:100
    +
    node first_child(node id) const
    Get the first child of a node. O(1)
    Definition directed_tree.h:107
    +
    node left_most(node id) const
    Get the left most child of a node. O(log(n))
    Definition directed_tree.h:128
    +
    uint32_t depth(node id) const
    Get the depth of a node.
    Definition directed_tree.h:140
    +
    void traverse(V &visitor)
    Traverser-Visitor pattern for accessing the tree.
    Definition directed_tree.h:256
    +
    const data_type & operator[](node id) const
    Constant getter for data associated with a node.
    Definition directed_tree.h:244
    +
    data_type & operator[](node id)
    Getter for data associated with a node.
    Definition directed_tree.h:237
    +
    Compile-time constant value.
    Definition template_utils.h:34
    +
    Provides compile time evaluation utilities for templates and template packs.
    +
    + + + + diff --git a/External/open-cpp-utils/Documentation/html/doc.svg b/External/open-cpp-utils/Documentation/html/doc.svg new file mode 100644 index 0000000..0b928a5 --- /dev/null +++ b/External/open-cpp-utils/Documentation/html/doc.svg @@ -0,0 +1,12 @@ + + + + + + + + + + + diff --git a/External/open-cpp-utils/Documentation/html/docd.svg b/External/open-cpp-utils/Documentation/html/docd.svg new file mode 100644 index 0000000..ac18b27 --- /dev/null +++ b/External/open-cpp-utils/Documentation/html/docd.svg @@ -0,0 +1,12 @@ + + + + + + + + + + + diff --git a/External/open-cpp-utils/Documentation/html/doxygen.css b/External/open-cpp-utils/Documentation/html/doxygen.css new file mode 100644 index 0000000..7b7d851 --- /dev/null +++ b/External/open-cpp-utils/Documentation/html/doxygen.css @@ -0,0 +1,2225 @@ +/* The standard CSS for doxygen 1.10.0*/ + +html { +/* page base colors */ +--page-background-color: white; +--page-foreground-color: black; +--page-link-color: #3D578C; +--page-visited-link-color: #4665A2; + +/* index */ +--index-odd-item-bg-color: #F8F9FC; +--index-even-item-bg-color: white; +--index-header-color: black; +--index-separator-color: #A0A0A0; + +/* header */ +--header-background-color: #F9FAFC; +--header-separator-color: #C4CFE5; +--header-gradient-image: url('nav_h.png'); +--group-header-separator-color: #879ECB; +--group-header-color: #354C7B; +--inherit-header-color: gray; + +--footer-foreground-color: #2A3D61; +--footer-logo-width: 104px; +--citation-label-color: #334975; +--glow-color: cyan; + +--title-background-color: white; +--title-separator-color: #5373B4; +--directory-separator-color: #9CAFD4; +--separator-color: #4A6AAA; + +--blockquote-background-color: #F7F8FB; +--blockquote-border-color: #9CAFD4; + +--scrollbar-thumb-color: #9CAFD4; +--scrollbar-background-color: #F9FAFC; + +--icon-background-color: #728DC1; +--icon-foreground-color: white; +--icon-doc-image: url('doc.svg'); +--icon-folder-open-image: url('folderopen.svg'); +--icon-folder-closed-image: url('folderclosed.svg'); + +/* brief member declaration list */ +--memdecl-background-color: #F9FAFC; +--memdecl-separator-color: #DEE4F0; +--memdecl-foreground-color: #555; +--memdecl-template-color: #4665A2; + +/* detailed member list */ +--memdef-border-color: #A8B8D9; +--memdef-title-background-color: #E2E8F2; +--memdef-title-gradient-image: url('nav_f.png'); +--memdef-proto-background-color: #DFE5F1; +--memdef-proto-text-color: #253555; +--memdef-proto-text-shadow: 0px 1px 1px rgba(255, 255, 255, 0.9); +--memdef-doc-background-color: white; +--memdef-param-name-color: #602020; +--memdef-template-color: #4665A2; + +/* tables */ +--table-cell-border-color: #2D4068; +--table-header-background-color: #374F7F; +--table-header-foreground-color: #FFFFFF; + +/* labels */ +--label-background-color: #728DC1; +--label-left-top-border-color: #5373B4; +--label-right-bottom-border-color: #C4CFE5; +--label-foreground-color: white; + +/** navigation bar/tree/menu */ +--nav-background-color: #F9FAFC; +--nav-foreground-color: #364D7C; +--nav-gradient-image: url('tab_b.png'); +--nav-gradient-hover-image: url('tab_h.png'); +--nav-gradient-active-image: url('tab_a.png'); +--nav-gradient-active-image-parent: url("../tab_a.png"); +--nav-separator-image: url('tab_s.png'); +--nav-breadcrumb-image: url('bc_s.png'); +--nav-breadcrumb-border-color: #C2CDE4; +--nav-splitbar-image: url('splitbar.png'); +--nav-font-size-level1: 13px; +--nav-font-size-level2: 10px; +--nav-font-size-level3: 9px; +--nav-text-normal-color: #283A5D; +--nav-text-hover-color: white; +--nav-text-active-color: white; +--nav-text-normal-shadow: 0px 1px 1px rgba(255, 255, 255, 0.9); +--nav-text-hover-shadow: 0px 1px 1px rgba(0, 0, 0, 1.0); +--nav-text-active-shadow: 0px 1px 1px rgba(0, 0, 0, 1.0); +--nav-menu-button-color: #364D7C; +--nav-menu-background-color: white; +--nav-menu-foreground-color: #555555; +--nav-menu-toggle-color: rgba(255, 255, 255, 0.5); +--nav-arrow-color: #9CAFD4; +--nav-arrow-selected-color: #9CAFD4; + +/* table of contents */ +--toc-background-color: #F4F6FA; +--toc-border-color: #D8DFEE; +--toc-header-color: #4665A2; +--toc-down-arrow-image: url("data:image/svg+xml;utf8,&%238595;"); + +/** search field */ +--search-background-color: white; +--search-foreground-color: #909090; +--search-magnification-image: url('mag.svg'); +--search-magnification-select-image: url('mag_sel.svg'); +--search-active-color: black; +--search-filter-background-color: #F9FAFC; +--search-filter-foreground-color: black; +--search-filter-border-color: #90A5CE; +--search-filter-highlight-text-color: white; +--search-filter-highlight-bg-color: #3D578C; +--search-results-foreground-color: #425E97; +--search-results-background-color: #EEF1F7; +--search-results-border-color: black; +--search-box-shadow: inset 0.5px 0.5px 3px 0px #555; + +/** code fragments */ +--code-keyword-color: #008000; +--code-type-keyword-color: #604020; +--code-flow-keyword-color: #E08000; +--code-comment-color: #800000; +--code-preprocessor-color: #806020; +--code-string-literal-color: #002080; +--code-char-literal-color: #008080; +--code-xml-cdata-color: black; +--code-vhdl-digit-color: #FF00FF; +--code-vhdl-char-color: #000000; +--code-vhdl-keyword-color: #700070; +--code-vhdl-logic-color: #FF0000; +--code-link-color: #4665A2; +--code-external-link-color: #4665A2; +--fragment-foreground-color: black; +--fragment-background-color: #FBFCFD; +--fragment-border-color: #C4CFE5; +--fragment-lineno-border-color: #00FF00; +--fragment-lineno-background-color: #E8E8E8; +--fragment-lineno-foreground-color: black; +--fragment-lineno-link-fg-color: #4665A2; +--fragment-lineno-link-bg-color: #D8D8D8; +--fragment-lineno-link-hover-fg-color: #4665A2; +--fragment-lineno-link-hover-bg-color: #C8C8C8; +--fragment-copy-ok-color: #2EC82E; +--tooltip-foreground-color: black; +--tooltip-background-color: white; +--tooltip-border-color: gray; +--tooltip-doc-color: grey; +--tooltip-declaration-color: #006318; +--tooltip-link-color: #4665A2; +--tooltip-shadow: 1px 1px 7px gray; +--fold-line-color: #808080; +--fold-minus-image: url('minus.svg'); +--fold-plus-image: url('plus.svg'); +--fold-minus-image-relpath: url('../../minus.svg'); +--fold-plus-image-relpath: url('../../plus.svg'); + +/** font-family */ +--font-family-normal: Roboto,sans-serif; +--font-family-monospace: 'JetBrains Mono',Consolas,Monaco,'Andale Mono','Ubuntu Mono',monospace,fixed; +--font-family-nav: 'Lucida Grande',Geneva,Helvetica,Arial,sans-serif; +--font-family-title: Tahoma,Arial,sans-serif; +--font-family-toc: Verdana,'DejaVu Sans',Geneva,sans-serif; +--font-family-search: Arial,Verdana,sans-serif; +--font-family-icon: Arial,Helvetica; +--font-family-tooltip: Roboto,sans-serif; + +/** special sections */ +--warning-color-bg: #f8d1cc; +--warning-color-hl: #b61825; +--warning-color-text: #75070f; +--note-color-bg: #faf3d8; +--note-color-hl: #f3a600; +--note-color-text: #5f4204; +--todo-color-bg: #e4f3ff; +--todo-color-hl: #1879C4; +--todo-color-text: #274a5c; +--test-color-bg: #e8e8ff; +--test-color-hl: #3939C4; +--test-color-text: #1a1a5c; +--deprecated-color-bg: #ecf0f3; +--deprecated-color-hl: #5b6269; +--deprecated-color-text: #43454a; +--bug-color-bg: #e4dafd; +--bug-color-hl: #5b2bdd; +--bug-color-text: #2a0d72; +--invariant-color-bg: #d8f1e3; +--invariant-color-hl: #44b86f; +--invariant-color-text: #265532; +} + +@media (prefers-color-scheme: dark) { + html:not(.dark-mode) { + color-scheme: dark; + +/* page base colors */ +--page-background-color: black; +--page-foreground-color: #C9D1D9; +--page-link-color: #90A5CE; +--page-visited-link-color: #A3B4D7; + +/* index */ +--index-odd-item-bg-color: #0B101A; +--index-even-item-bg-color: black; +--index-header-color: #C4CFE5; +--index-separator-color: #334975; + +/* header */ +--header-background-color: #070B11; +--header-separator-color: #141C2E; +--header-gradient-image: url('nav_hd.png'); +--group-header-separator-color: #283A5D; +--group-header-color: #90A5CE; +--inherit-header-color: #A0A0A0; + +--footer-foreground-color: #5B7AB7; +--footer-logo-width: 60px; +--citation-label-color: #90A5CE; +--glow-color: cyan; + +--title-background-color: #090D16; +--title-separator-color: #354C79; +--directory-separator-color: #283A5D; +--separator-color: #283A5D; + +--blockquote-background-color: #101826; +--blockquote-border-color: #283A5D; + +--scrollbar-thumb-color: #283A5D; +--scrollbar-background-color: #070B11; + +--icon-background-color: #334975; +--icon-foreground-color: #C4CFE5; +--icon-doc-image: url('docd.svg'); +--icon-folder-open-image: url('folderopend.svg'); +--icon-folder-closed-image: url('folderclosedd.svg'); + +/* brief member declaration list */ +--memdecl-background-color: #0B101A; +--memdecl-separator-color: #2C3F65; +--memdecl-foreground-color: #BBB; +--memdecl-template-color: #7C95C6; + +/* detailed member list */ +--memdef-border-color: #233250; +--memdef-title-background-color: #1B2840; +--memdef-title-gradient-image: url('nav_fd.png'); +--memdef-proto-background-color: #19243A; +--memdef-proto-text-color: #9DB0D4; +--memdef-proto-text-shadow: 0px 1px 1px rgba(0, 0, 0, 0.9); +--memdef-doc-background-color: black; +--memdef-param-name-color: #D28757; +--memdef-template-color: #7C95C6; + +/* tables */ +--table-cell-border-color: #283A5D; +--table-header-background-color: #283A5D; +--table-header-foreground-color: #C4CFE5; + +/* labels */ +--label-background-color: #354C7B; +--label-left-top-border-color: #4665A2; +--label-right-bottom-border-color: #283A5D; +--label-foreground-color: #CCCCCC; + +/** navigation bar/tree/menu */ +--nav-background-color: #101826; +--nav-foreground-color: #364D7C; +--nav-gradient-image: url('tab_bd.png'); +--nav-gradient-hover-image: url('tab_hd.png'); +--nav-gradient-active-image: url('tab_ad.png'); +--nav-gradient-active-image-parent: url("../tab_ad.png"); +--nav-separator-image: url('tab_sd.png'); +--nav-breadcrumb-image: url('bc_sd.png'); +--nav-breadcrumb-border-color: #2A3D61; +--nav-splitbar-image: url('splitbard.png'); +--nav-font-size-level1: 13px; +--nav-font-size-level2: 10px; +--nav-font-size-level3: 9px; +--nav-text-normal-color: #B6C4DF; +--nav-text-hover-color: #DCE2EF; +--nav-text-active-color: #DCE2EF; +--nav-text-normal-shadow: 0px 1px 1px black; +--nav-text-hover-shadow: 0px 1px 1px rgba(0, 0, 0, 1.0); +--nav-text-active-shadow: 0px 1px 1px rgba(0, 0, 0, 1.0); +--nav-menu-button-color: #B6C4DF; +--nav-menu-background-color: #05070C; +--nav-menu-foreground-color: #BBBBBB; +--nav-menu-toggle-color: rgba(255, 255, 255, 0.2); +--nav-arrow-color: #334975; +--nav-arrow-selected-color: #90A5CE; + +/* table of contents */ +--toc-background-color: #151E30; +--toc-border-color: #202E4A; +--toc-header-color: #A3B4D7; +--toc-down-arrow-image: url("data:image/svg+xml;utf8,&%238595;"); + +/** search field */ +--search-background-color: black; +--search-foreground-color: #C5C5C5; +--search-magnification-image: url('mag_d.svg'); +--search-magnification-select-image: url('mag_seld.svg'); +--search-active-color: #C5C5C5; +--search-filter-background-color: #101826; +--search-filter-foreground-color: #90A5CE; +--search-filter-border-color: #7C95C6; +--search-filter-highlight-text-color: #BCC9E2; +--search-filter-highlight-bg-color: #283A5D; +--search-results-background-color: #101826; +--search-results-foreground-color: #90A5CE; +--search-results-border-color: #7C95C6; +--search-box-shadow: inset 0.5px 0.5px 3px 0px #2F436C; + +/** code fragments */ +--code-keyword-color: #CC99CD; +--code-type-keyword-color: #AB99CD; +--code-flow-keyword-color: #E08000; +--code-comment-color: #717790; +--code-preprocessor-color: #65CABE; +--code-string-literal-color: #7EC699; +--code-char-literal-color: #00E0F0; +--code-xml-cdata-color: #C9D1D9; +--code-vhdl-digit-color: #FF00FF; +--code-vhdl-char-color: #C0C0C0; +--code-vhdl-keyword-color: #CF53C9; +--code-vhdl-logic-color: #FF0000; +--code-link-color: #79C0FF; +--code-external-link-color: #79C0FF; +--fragment-foreground-color: #C9D1D9; +--fragment-background-color: #090D16; +--fragment-border-color: #30363D; +--fragment-lineno-border-color: #30363D; +--fragment-lineno-background-color: black; +--fragment-lineno-foreground-color: #6E7681; +--fragment-lineno-link-fg-color: #6E7681; +--fragment-lineno-link-bg-color: #303030; +--fragment-lineno-link-hover-fg-color: #8E96A1; +--fragment-lineno-link-hover-bg-color: #505050; +--fragment-copy-ok-color: #0EA80E; +--tooltip-foreground-color: #C9D1D9; +--tooltip-background-color: #202020; +--tooltip-border-color: #C9D1D9; +--tooltip-doc-color: #D9E1E9; +--tooltip-declaration-color: #20C348; +--tooltip-link-color: #79C0FF; +--tooltip-shadow: none; +--fold-line-color: #808080; +--fold-minus-image: url('minusd.svg'); +--fold-plus-image: url('plusd.svg'); +--fold-minus-image-relpath: url('../../minusd.svg'); +--fold-plus-image-relpath: url('../../plusd.svg'); + +/** font-family */ +--font-family-normal: Roboto,sans-serif; +--font-family-monospace: 'JetBrains Mono',Consolas,Monaco,'Andale Mono','Ubuntu Mono',monospace,fixed; +--font-family-nav: 'Lucida Grande',Geneva,Helvetica,Arial,sans-serif; +--font-family-title: Tahoma,Arial,sans-serif; +--font-family-toc: Verdana,'DejaVu Sans',Geneva,sans-serif; +--font-family-search: Arial,Verdana,sans-serif; +--font-family-icon: Arial,Helvetica; +--font-family-tooltip: Roboto,sans-serif; + +/** special sections */ +--warning-color-bg: #2e1917; +--warning-color-hl: #ad2617; +--warning-color-text: #f5b1aa; +--note-color-bg: #3b2e04; +--note-color-hl: #f1b602; +--note-color-text: #ceb670; +--todo-color-bg: #163750; +--todo-color-hl: #1982D2; +--todo-color-text: #dcf0fa; +--test-color-bg: #121258; +--test-color-hl: #4242cf; +--test-color-text: #c0c0da; +--deprecated-color-bg: #2e323b; +--deprecated-color-hl: #738396; +--deprecated-color-text: #abb0bd; +--bug-color-bg: #2a2536; +--bug-color-hl: #7661b3; +--bug-color-text: #ae9ed6; +--invariant-color-bg: #303a35; +--invariant-color-hl: #76ce96; +--invariant-color-text: #cceed5; +}} +body { + background-color: var(--page-background-color); + color: var(--page-foreground-color); +} + +body, table, div, p, dl { + font-weight: 400; + font-size: 14px; + font-family: var(--font-family-normal); + line-height: 22px; +} + +/* @group Heading Levels */ + +.title { + font-family: var(--font-family-normal); + line-height: 28px; + font-size: 150%; + font-weight: bold; + margin: 10px 2px; +} + +h1.groupheader { + font-size: 150%; +} + +h2.groupheader { + border-bottom: 1px solid var(--group-header-separator-color); + color: var(--group-header-color); + font-size: 150%; + font-weight: normal; + margin-top: 1.75em; + padding-top: 8px; + padding-bottom: 4px; + width: 100%; +} + +h3.groupheader { + font-size: 100%; +} + +h1, h2, h3, h4, h5, h6 { + -webkit-transition: text-shadow 0.5s linear; + -moz-transition: text-shadow 0.5s linear; + -ms-transition: text-shadow 0.5s linear; + -o-transition: text-shadow 0.5s linear; + transition: text-shadow 0.5s linear; + margin-right: 15px; +} + +h1.glow, h2.glow, h3.glow, h4.glow, h5.glow, h6.glow { + text-shadow: 0 0 15px var(--glow-color); +} + +dt { + font-weight: bold; +} + +p.startli, p.startdd { + margin-top: 2px; +} + +th p.starttd, th p.intertd, th p.endtd { + font-size: 100%; + font-weight: 700; +} + +p.starttd { + margin-top: 0px; +} + +p.endli { + margin-bottom: 0px; +} + +p.enddd { + margin-bottom: 4px; +} + +p.endtd { + margin-bottom: 2px; +} + +p.interli { +} + +p.interdd { +} + +p.intertd { +} + +/* @end */ + +caption { + font-weight: bold; +} + +span.legend { + font-size: 70%; + text-align: center; +} + +h3.version { + font-size: 90%; + text-align: center; +} + +div.navtab { + padding-right: 15px; + text-align: right; + line-height: 110%; +} + +div.navtab table { + border-spacing: 0; +} + +td.navtab { + padding-right: 6px; + padding-left: 6px; +} + +td.navtabHL { + background-image: var(--nav-gradient-active-image); + background-repeat:repeat-x; + padding-right: 6px; + padding-left: 6px; +} + +td.navtabHL a, td.navtabHL a:visited { + color: var(--nav-text-hover-color); + text-shadow: var(--nav-text-hover-shadow); +} + +a.navtab { + font-weight: bold; +} + +div.qindex{ + text-align: center; + width: 100%; + line-height: 140%; + font-size: 130%; + color: var(--index-separator-color); +} + +#main-menu a:focus { + outline: auto; + z-index: 10; + position: relative; +} + +dt.alphachar{ + font-size: 180%; + font-weight: bold; +} + +.alphachar a{ + color: var(--index-header-color); +} + +.alphachar a:hover, .alphachar a:visited{ + text-decoration: none; +} + +.classindex dl { + padding: 25px; + column-count:1 +} + +.classindex dd { + display:inline-block; + margin-left: 50px; + width: 90%; + line-height: 1.15em; +} + +.classindex dl.even { + background-color: var(--index-even-item-bg-color); +} + +.classindex dl.odd { + background-color: var(--index-odd-item-bg-color); +} + +@media(min-width: 1120px) { + .classindex dl { + column-count:2 + } +} + +@media(min-width: 1320px) { + .classindex dl { + column-count:3 + } +} + + +/* @group Link Styling */ + +a { + color: var(--page-link-color); + font-weight: normal; + text-decoration: none; +} + +.contents a:visited { + color: var(--page-visited-link-color); +} + +a:hover { + text-decoration: none; + background: linear-gradient(to bottom, transparent 0,transparent calc(100% - 1px), currentColor 100%); +} + +a:hover > span.arrow { + text-decoration: none; + background : var(--nav-background-color); +} + +a.el { + font-weight: bold; +} + +a.elRef { +} + +a.code, a.code:visited, a.line, a.line:visited { + color: var(--code-link-color); +} + +a.codeRef, a.codeRef:visited, a.lineRef, a.lineRef:visited { + color: var(--code-external-link-color); +} + +a.code.hl_class { /* style for links to class names in code snippets */ } +a.code.hl_struct { /* style for links to struct names in code snippets */ } +a.code.hl_union { /* style for links to union names in code snippets */ } +a.code.hl_interface { /* style for links to interface names in code snippets */ } +a.code.hl_protocol { /* style for links to protocol names in code snippets */ } +a.code.hl_category { /* style for links to category names in code snippets */ } +a.code.hl_exception { /* style for links to exception names in code snippets */ } +a.code.hl_service { /* style for links to service names in code snippets */ } +a.code.hl_singleton { /* style for links to singleton names in code snippets */ } +a.code.hl_concept { /* style for links to concept names in code snippets */ } +a.code.hl_namespace { /* style for links to namespace names in code snippets */ } +a.code.hl_package { /* style for links to package names in code snippets */ } +a.code.hl_define { /* style for links to macro names in code snippets */ } +a.code.hl_function { /* style for links to function names in code snippets */ } +a.code.hl_variable { /* style for links to variable names in code snippets */ } +a.code.hl_typedef { /* style for links to typedef names in code snippets */ } +a.code.hl_enumvalue { /* style for links to enum value names in code snippets */ } +a.code.hl_enumeration { /* style for links to enumeration names in code snippets */ } +a.code.hl_signal { /* style for links to Qt signal names in code snippets */ } +a.code.hl_slot { /* style for links to Qt slot names in code snippets */ } +a.code.hl_friend { /* style for links to friend names in code snippets */ } +a.code.hl_dcop { /* style for links to KDE3 DCOP names in code snippets */ } +a.code.hl_property { /* style for links to property names in code snippets */ } +a.code.hl_event { /* style for links to event names in code snippets */ } +a.code.hl_sequence { /* style for links to sequence names in code snippets */ } +a.code.hl_dictionary { /* style for links to dictionary names in code snippets */ } + +/* @end */ + +dl.el { + margin-left: -1cm; +} + +ul { + overflow: visible; +} + +ul.multicol { + -moz-column-gap: 1em; + -webkit-column-gap: 1em; + column-gap: 1em; + -moz-column-count: 3; + -webkit-column-count: 3; + column-count: 3; + list-style-type: none; +} + +#side-nav ul { + overflow: visible; /* reset ul rule for scroll bar in GENERATE_TREEVIEW window */ +} + +#main-nav ul { + overflow: visible; /* reset ul rule for the navigation bar drop down lists */ +} + +.fragment { + text-align: left; + direction: ltr; + overflow-x: auto; + overflow-y: hidden; + position: relative; + min-height: 12px; + margin: 10px 0px; + padding: 10px 10px; + border: 1px solid var(--fragment-border-color); + border-radius: 4px; + background-color: var(--fragment-background-color); + color: var(--fragment-foreground-color); +} + +pre.fragment { + word-wrap: break-word; + font-size: 10pt; + line-height: 125%; + font-family: var(--font-family-monospace); +} + +.clipboard { + width: 24px; + height: 24px; + right: 5px; + top: 5px; + opacity: 0; + position: absolute; + display: inline; + overflow: auto; + fill: var(--fragment-foreground-color); + justify-content: center; + align-items: center; + cursor: pointer; +} + +.clipboard.success { + border: 1px solid var(--fragment-foreground-color); + border-radius: 4px; +} + +.fragment:hover .clipboard, .clipboard.success { + opacity: .28; +} + +.clipboard:hover, .clipboard.success { + opacity: 1 !important; +} + +.clipboard:active:not([class~=success]) svg { + transform: scale(.91); +} + +.clipboard.success svg { + fill: var(--fragment-copy-ok-color); +} + +.clipboard.success { + border-color: var(--fragment-copy-ok-color); +} + +div.line { + font-family: var(--font-family-monospace); + font-size: 13px; + min-height: 13px; + line-height: 1.2; + text-wrap: unrestricted; + white-space: -moz-pre-wrap; /* Moz */ + white-space: -pre-wrap; /* Opera 4-6 */ + white-space: -o-pre-wrap; /* Opera 7 */ + white-space: pre-wrap; /* CSS3 */ + word-wrap: break-word; /* IE 5.5+ */ + text-indent: -53px; + padding-left: 53px; + padding-bottom: 0px; + margin: 0px; + -webkit-transition-property: background-color, box-shadow; + -webkit-transition-duration: 0.5s; + -moz-transition-property: background-color, box-shadow; + -moz-transition-duration: 0.5s; + -ms-transition-property: background-color, box-shadow; + -ms-transition-duration: 0.5s; + -o-transition-property: background-color, box-shadow; + -o-transition-duration: 0.5s; + transition-property: background-color, box-shadow; + transition-duration: 0.5s; +} + +div.line:after { + content:"\000A"; + white-space: pre; +} + +div.line.glow { + background-color: var(--glow-color); + box-shadow: 0 0 10px var(--glow-color); +} + +span.fold { + margin-left: 5px; + margin-right: 1px; + margin-top: 0px; + margin-bottom: 0px; + padding: 0px; + display: inline-block; + width: 12px; + height: 12px; + background-repeat:no-repeat; + background-position:center; +} + +span.lineno { + padding-right: 4px; + margin-right: 9px; + text-align: right; + border-right: 2px solid var(--fragment-lineno-border-color); + color: var(--fragment-lineno-foreground-color); + background-color: var(--fragment-lineno-background-color); + white-space: pre; +} +span.lineno a, span.lineno a:visited { + color: var(--fragment-lineno-link-fg-color); + background-color: var(--fragment-lineno-link-bg-color); +} + +span.lineno a:hover { + color: var(--fragment-lineno-link-hover-fg-color); + background-color: var(--fragment-lineno-link-hover-bg-color); +} + +.lineno { + -webkit-touch-callout: none; + -webkit-user-select: none; + -khtml-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; +} + +div.classindex ul { + list-style: none; + padding-left: 0; +} + +div.classindex span.ai { + display: inline-block; +} + +div.groupHeader { + margin-left: 16px; + margin-top: 12px; + font-weight: bold; +} + +div.groupText { + margin-left: 16px; + font-style: italic; +} + +body { + color: var(--page-foreground-color); + margin: 0; +} + +div.contents { + margin-top: 10px; + margin-left: 12px; + margin-right: 8px; +} + +p.formulaDsp { + text-align: center; +} + +img.dark-mode-visible { + display: none; +} +img.light-mode-visible { + display: none; +} + +img.formulaInl, img.inline { + vertical-align: middle; +} + +div.center { + text-align: center; + margin-top: 0px; + margin-bottom: 0px; + padding: 0px; +} + +div.center img { + border: 0px; +} + +address.footer { + text-align: right; + padding-right: 12px; +} + +img.footer { + border: 0px; + vertical-align: middle; + width: var(--footer-logo-width); +} + +.compoundTemplParams { + color: var(--memdecl-template-color); + font-size: 80%; + line-height: 120%; +} + +/* @group Code Colorization */ + +span.keyword { + color: var(--code-keyword-color); +} + +span.keywordtype { + color: var(--code-type-keyword-color); +} + +span.keywordflow { + color: var(--code-flow-keyword-color); +} + +span.comment { + color: var(--code-comment-color); +} + +span.preprocessor { + color: var(--code-preprocessor-color); +} + +span.stringliteral { + color: var(--code-string-literal-color); +} + +span.charliteral { + color: var(--code-char-literal-color); +} + +span.xmlcdata { + color: var(--code-xml-cdata-color); +} + +span.vhdldigit { + color: var(--code-vhdl-digit-color); +} + +span.vhdlchar { + color: var(--code-vhdl-char-color); +} + +span.vhdlkeyword { + color: var(--code-vhdl-keyword-color); +} + +span.vhdllogic { + color: var(--code-vhdl-logic-color); +} + +blockquote { + background-color: var(--blockquote-background-color); + border-left: 2px solid var(--blockquote-border-color); + margin: 0 24px 0 4px; + padding: 0 12px 0 16px; +} + +/* @end */ + +td.tiny { + font-size: 75%; +} + +.dirtab { + padding: 4px; + border-collapse: collapse; + border: 1px solid var(--table-cell-border-color); +} + +th.dirtab { + background-color: var(--table-header-background-color); + color: var(--table-header-foreground-color); + font-weight: bold; +} + +hr { + height: 0px; + border: none; + border-top: 1px solid var(--separator-color); +} + +hr.footer { + height: 1px; +} + +/* @group Member Descriptions */ + +table.memberdecls { + border-spacing: 0px; + padding: 0px; +} + +.memberdecls td, .fieldtable tr { + -webkit-transition-property: background-color, box-shadow; + -webkit-transition-duration: 0.5s; + -moz-transition-property: background-color, box-shadow; + -moz-transition-duration: 0.5s; + -ms-transition-property: background-color, box-shadow; + -ms-transition-duration: 0.5s; + -o-transition-property: background-color, box-shadow; + -o-transition-duration: 0.5s; + transition-property: background-color, box-shadow; + transition-duration: 0.5s; +} + +.memberdecls td.glow, .fieldtable tr.glow { + background-color: var(--glow-color); + box-shadow: 0 0 15px var(--glow-color); +} + +.mdescLeft, .mdescRight, +.memItemLeft, .memItemRight, +.memTemplItemLeft, .memTemplItemRight, .memTemplParams { + background-color: var(--memdecl-background-color); + border: none; + margin: 4px; + padding: 1px 0 0 8px; +} + +.mdescLeft, .mdescRight { + padding: 0px 8px 4px 8px; + color: var(--memdecl-foreground-color); +} + +.memSeparator { + border-bottom: 1px solid var(--memdecl-separator-color); + line-height: 1px; + margin: 0px; + padding: 0px; +} + +.memItemLeft, .memTemplItemLeft { + white-space: nowrap; +} + +.memItemRight, .memTemplItemRight { + width: 100%; +} + +.memTemplParams { + color: var(--memdecl-template-color); + white-space: nowrap; + font-size: 80%; +} + +/* @end */ + +/* @group Member Details */ + +/* Styles for detailed member documentation */ + +.memtitle { + padding: 8px; + border-top: 1px solid var(--memdef-border-color); + border-left: 1px solid var(--memdef-border-color); + border-right: 1px solid var(--memdef-border-color); + border-top-right-radius: 4px; + border-top-left-radius: 4px; + margin-bottom: -1px; + background-image: var(--memdef-title-gradient-image); + background-repeat: repeat-x; + background-color: var(--memdef-title-background-color); + line-height: 1.25; + font-weight: 300; + float:left; +} + +.permalink +{ + font-size: 65%; + display: inline-block; + vertical-align: middle; +} + +.memtemplate { + font-size: 80%; + color: var(--memdef-template-color); + font-weight: normal; + margin-left: 9px; +} + +.mempage { + width: 100%; +} + +.memitem { + padding: 0; + margin-bottom: 10px; + margin-right: 5px; + -webkit-transition: box-shadow 0.5s linear; + -moz-transition: box-shadow 0.5s linear; + -ms-transition: box-shadow 0.5s linear; + -o-transition: box-shadow 0.5s linear; + transition: box-shadow 0.5s linear; + display: table !important; + width: 100%; +} + +.memitem.glow { + box-shadow: 0 0 15px var(--glow-color); +} + +.memname { + font-weight: 400; + margin-left: 6px; +} + +.memname td { + vertical-align: bottom; +} + +.memproto, dl.reflist dt { + border-top: 1px solid var(--memdef-border-color); + border-left: 1px solid var(--memdef-border-color); + border-right: 1px solid var(--memdef-border-color); + padding: 6px 0px 6px 0px; + color: var(--memdef-proto-text-color); + font-weight: bold; + text-shadow: var(--memdef-proto-text-shadow); + background-color: var(--memdef-proto-background-color); + box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); + border-top-right-radius: 4px; +} + +.overload { + font-family: var(--font-family-monospace); + font-size: 65%; +} + +.memdoc, dl.reflist dd { + border-bottom: 1px solid var(--memdef-border-color); + border-left: 1px solid var(--memdef-border-color); + border-right: 1px solid var(--memdef-border-color); + padding: 6px 10px 2px 10px; + border-top-width: 0; + background-image:url('nav_g.png'); + background-repeat:repeat-x; + background-color: var(--memdef-doc-background-color); + /* opera specific markup */ + border-bottom-left-radius: 4px; + border-bottom-right-radius: 4px; + box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); + /* firefox specific markup */ + -moz-border-radius-bottomleft: 4px; + -moz-border-radius-bottomright: 4px; + -moz-box-shadow: rgba(0, 0, 0, 0.15) 5px 5px 5px; + /* webkit specific markup */ + -webkit-border-bottom-left-radius: 4px; + -webkit-border-bottom-right-radius: 4px; + -webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); +} + +dl.reflist dt { + padding: 5px; +} + +dl.reflist dd { + margin: 0px 0px 10px 0px; + padding: 5px; +} + +.paramkey { + text-align: right; +} + +.paramtype { + white-space: nowrap; + padding: 0px; + padding-bottom: 1px; +} + +.paramname { + white-space: nowrap; + padding: 0px; + padding-bottom: 1px; + margin-left: 2px; +} + +.paramname em { + color: var(--memdef-param-name-color); + font-style: normal; + margin-right: 1px; +} + +.paramname .paramdefval { + font-family: var(--font-family-monospace); +} + +.params, .retval, .exception, .tparams { + margin-left: 0px; + padding-left: 0px; +} + +.params .paramname, .retval .paramname, .tparams .paramname, .exception .paramname { + font-weight: bold; + vertical-align: top; +} + +.params .paramtype, .tparams .paramtype { + font-style: italic; + vertical-align: top; +} + +.params .paramdir, .tparams .paramdir { + font-family: var(--font-family-monospace); + vertical-align: top; +} + +table.mlabels { + border-spacing: 0px; +} + +td.mlabels-left { + width: 100%; + padding: 0px; +} + +td.mlabels-right { + vertical-align: bottom; + padding: 0px; + white-space: nowrap; +} + +span.mlabels { + margin-left: 8px; +} + +span.mlabel { + background-color: var(--label-background-color); + border-top:1px solid var(--label-left-top-border-color); + border-left:1px solid var(--label-left-top-border-color); + border-right:1px solid var(--label-right-bottom-border-color); + border-bottom:1px solid var(--label-right-bottom-border-color); + text-shadow: none; + color: var(--label-foreground-color); + margin-right: 4px; + padding: 2px 3px; + border-radius: 3px; + font-size: 7pt; + white-space: nowrap; + vertical-align: middle; +} + + + +/* @end */ + +/* these are for tree view inside a (index) page */ + +div.directory { + margin: 10px 0px; + border-top: 1px solid var(--directory-separator-color); + border-bottom: 1px solid var(--directory-separator-color); + width: 100%; +} + +.directory table { + border-collapse:collapse; +} + +.directory td { + margin: 0px; + padding: 0px; + vertical-align: top; +} + +.directory td.entry { + white-space: nowrap; + padding-right: 6px; + padding-top: 3px; +} + +.directory td.entry a { + outline:none; +} + +.directory td.entry a img { + border: none; +} + +.directory td.desc { + width: 100%; + padding-left: 6px; + padding-right: 6px; + padding-top: 3px; + border-left: 1px solid rgba(0,0,0,0.05); +} + +.directory tr.odd { + padding-left: 6px; + background-color: var(--index-odd-item-bg-color); +} + +.directory tr.even { + padding-left: 6px; + background-color: var(--index-even-item-bg-color); +} + +.directory img { + vertical-align: -30%; +} + +.directory .levels { + white-space: nowrap; + width: 100%; + text-align: right; + font-size: 9pt; +} + +.directory .levels span { + cursor: pointer; + padding-left: 2px; + padding-right: 2px; + color: var(--page-link-color); +} + +.arrow { + color: var(--nav-arrow-color); + -webkit-user-select: none; + -khtml-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; + cursor: pointer; + font-size: 80%; + display: inline-block; + width: 16px; + height: 22px; +} + +.icon { + font-family: var(--font-family-icon); + line-height: normal; + font-weight: bold; + font-size: 12px; + height: 14px; + width: 16px; + display: inline-block; + background-color: var(--icon-background-color); + color: var(--icon-foreground-color); + text-align: center; + border-radius: 4px; + margin-left: 2px; + margin-right: 2px; +} + +.icona { + width: 24px; + height: 22px; + display: inline-block; +} + +.iconfopen { + width: 24px; + height: 18px; + margin-bottom: 4px; + background-image:var(--icon-folder-open-image); + background-repeat: repeat-y; + vertical-align:top; + display: inline-block; +} + +.iconfclosed { + width: 24px; + height: 18px; + margin-bottom: 4px; + background-image:var(--icon-folder-closed-image); + background-repeat: repeat-y; + vertical-align:top; + display: inline-block; +} + +.icondoc { + width: 24px; + height: 18px; + margin-bottom: 4px; + background-image:var(--icon-doc-image); + background-position: 0px -4px; + background-repeat: repeat-y; + vertical-align:top; + display: inline-block; +} + +/* @end */ + +div.dynheader { + margin-top: 8px; + -webkit-touch-callout: none; + -webkit-user-select: none; + -khtml-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; +} + +address { + font-style: normal; + color: var(--footer-foreground-color); +} + +table.doxtable caption { + caption-side: top; +} + +table.doxtable { + border-collapse:collapse; + margin-top: 4px; + margin-bottom: 4px; +} + +table.doxtable td, table.doxtable th { + border: 1px solid var(--table-cell-border-color); + padding: 3px 7px 2px; +} + +table.doxtable th { + background-color: var(--table-header-background-color); + color: var(--table-header-foreground-color); + font-size: 110%; + padding-bottom: 4px; + padding-top: 5px; +} + +table.fieldtable { + margin-bottom: 10px; + border: 1px solid var(--memdef-border-color); + border-spacing: 0px; + border-radius: 4px; + box-shadow: 2px 2px 2px rgba(0, 0, 0, 0.15); +} + +.fieldtable td, .fieldtable th { + padding: 3px 7px 2px; +} + +.fieldtable td.fieldtype, .fieldtable td.fieldname { + white-space: nowrap; + border-right: 1px solid var(--memdef-border-color); + border-bottom: 1px solid var(--memdef-border-color); + vertical-align: top; +} + +.fieldtable td.fieldname { + padding-top: 3px; +} + +.fieldtable td.fielddoc { + border-bottom: 1px solid var(--memdef-border-color); +} + +.fieldtable td.fielddoc p:first-child { + margin-top: 0px; +} + +.fieldtable td.fielddoc p:last-child { + margin-bottom: 2px; +} + +.fieldtable tr:last-child td { + border-bottom: none; +} + +.fieldtable th { + background-image: var(--memdef-title-gradient-image); + background-repeat:repeat-x; + background-color: var(--memdef-title-background-color); + font-size: 90%; + color: var(--memdef-proto-text-color); + padding-bottom: 4px; + padding-top: 5px; + text-align:left; + font-weight: 400; + border-top-left-radius: 4px; + border-top-right-radius: 4px; + border-bottom: 1px solid var(--memdef-border-color); +} + + +.tabsearch { + top: 0px; + left: 10px; + height: 36px; + background-image: var(--nav-gradient-image); + z-index: 101; + overflow: hidden; + font-size: 13px; +} + +.navpath ul +{ + font-size: 11px; + background-image: var(--nav-gradient-image); + background-repeat:repeat-x; + background-position: 0 -5px; + height:30px; + line-height:30px; + color:var(--nav-text-normal-color); + border:solid 1px var(--nav-breadcrumb-border-color); + overflow:hidden; + margin:0px; + padding:0px; +} + +.navpath li +{ + list-style-type:none; + float:left; + padding-left:10px; + padding-right:15px; + background-image:var(--nav-breadcrumb-image); + background-repeat:no-repeat; + background-position:right; + color: var(--nav-foreground-color); +} + +.navpath li.navelem a +{ + height:32px; + display:block; + outline: none; + color: var(--nav-text-normal-color); + font-family: var(--font-family-nav); + text-shadow: var(--nav-text-normal-shadow); + text-decoration: none; +} + +.navpath li.navelem a:hover +{ + color: var(--nav-text-hover-color); + text-shadow: var(--nav-text-hover-shadow); +} + +.navpath li.footer +{ + list-style-type:none; + float:right; + padding-left:10px; + padding-right:15px; + background-image:none; + background-repeat:no-repeat; + background-position:right; + color: var(--footer-foreground-color); + font-size: 8pt; +} + + +div.summary +{ + float: right; + font-size: 8pt; + padding-right: 5px; + width: 50%; + text-align: right; +} + +div.summary a +{ + white-space: nowrap; +} + +table.classindex +{ + margin: 10px; + white-space: nowrap; + margin-left: 3%; + margin-right: 3%; + width: 94%; + border: 0; + border-spacing: 0; + padding: 0; +} + +div.ingroups +{ + font-size: 8pt; + width: 50%; + text-align: left; +} + +div.ingroups a +{ + white-space: nowrap; +} + +div.header +{ + background-image: var(--header-gradient-image); + background-repeat:repeat-x; + background-color: var(--header-background-color); + margin: 0px; + border-bottom: 1px solid var(--header-separator-color); +} + +div.headertitle +{ + padding: 5px 5px 5px 10px; +} + +.PageDocRTL-title div.headertitle { + text-align: right; + direction: rtl; +} + +dl { + padding: 0 0 0 0; +} + +/* + +dl.section { + margin-left: 0px; + padding-left: 0px; +} + +dl.note { + margin-left: -7px; + padding-left: 3px; + border-left: 4px solid; + border-color: #D0C000; +} + +dl.warning, dl.attention { + margin-left: -7px; + padding-left: 3px; + border-left: 4px solid; + border-color: #FF0000; +} + +dl.pre, dl.post, dl.invariant { + margin-left: -7px; + padding-left: 3px; + border-left: 4px solid; + border-color: #00D000; +} + +dl.deprecated { + margin-left: -7px; + padding-left: 3px; + border-left: 4px solid; + border-color: #505050; +} + +dl.todo { + margin-left: -7px; + padding-left: 3px; + border-left: 4px solid; + border-color: #00C0E0; +} + +dl.test { + margin-left: -7px; + padding-left: 3px; + border-left: 4px solid; + border-color: #3030E0; +} + +dl.bug { + margin-left: -7px; + padding-left: 3px; + border-left: 4px solid; + border-color: #C08050; +} + +*/ + +dl.bug dt a, dl.deprecated dt a, dl.todo dt a, dl.test a { + font-weight: bold !important; +} + +dl.warning, dl.attention, dl.note, dl.deprecated, dl.bug, +dl.invariant, dl.pre, dl.post, dl.todo, dl.test, dl.remark { + padding: 10px; + margin: 10px 0px; + overflow: hidden; + margin-left: 0; + border-radius: 4px; +} + +dl.section dd { + margin-bottom: 2px; +} + +dl.warning, dl.attention { + background: var(--warning-color-bg); + border-left: 8px solid var(--warning-color-hl); + color: var(--warning-color-text); +} + +dl.warning dt, dl.attention dt { + color: var(--warning-color-hl); +} + +dl.note, dl.remark { + background: var(--note-color-bg); + border-left: 8px solid var(--note-color-hl); + color: var(--note-color-text); +} + +dl.note dt, dl.remark dt { + color: var(--note-color-hl); +} + +dl.todo { + background: var(--todo-color-bg); + border-left: 8px solid var(--todo-color-hl); + color: var(--todo-color-text); +} + +dl.todo dt { + color: var(--todo-color-hl); +} + +dl.test { + background: var(--test-color-bg); + border-left: 8px solid var(--test-color-hl); + color: var(--test-color-text); +} + +dl.test dt { + color: var(--test-color-hl); +} + +dl.bug dt a { + color: var(--bug-color-hl) !important; +} + +dl.bug { + background: var(--bug-color-bg); + border-left: 8px solid var(--bug-color-hl); + color: var(--bug-color-text); +} + +dl.bug dt a { + color: var(--bug-color-hl) !important; +} + +dl.deprecated { + background: var(--deprecated-color-bg); + border-left: 8px solid var(--deprecated-color-hl); + color: var(--deprecated-color-text); +} + +dl.deprecated dt a { + color: var(--deprecated-color-hl) !important; +} + +dl.section dd, dl.bug dd, dl.deprecated dd, dl.todo dd, dl.test dd { + margin-inline-start: 0px; +} + +dl.invariant, dl.pre, dl.post { + background: var(--invariant-color-bg); + border-left: 8px solid var(--invariant-color-hl); + color: var(--invariant-color-text); +} + +dl.invariant dt, dl.pre dt, dl.post dt { + color: var(--invariant-color-hl); +} + + +#projectrow +{ + height: 56px; +} + +#projectlogo +{ + text-align: center; + vertical-align: bottom; + border-collapse: separate; +} + +#projectlogo img +{ + border: 0px none; +} + +#projectalign +{ + vertical-align: middle; + padding-left: 0.5em; +} + +#projectname +{ + font-size: 200%; + font-family: var(--font-family-title); + margin: 0px; + padding: 2px 0px; +} + +#projectbrief +{ + font-size: 90%; + font-family: var(--font-family-title); + margin: 0px; + padding: 0px; +} + +#projectnumber +{ + font-size: 50%; + font-family: 50% var(--font-family-title); + margin: 0px; + padding: 0px; +} + +#titlearea +{ + padding: 0px; + margin: 0px; + width: 100%; + border-bottom: 1px solid var(--title-separator-color); + background-color: var(--title-background-color); +} + +.image +{ + text-align: center; +} + +.dotgraph +{ + text-align: center; +} + +.mscgraph +{ + text-align: center; +} + +.plantumlgraph +{ + text-align: center; +} + +.diagraph +{ + text-align: center; +} + +.caption +{ + font-weight: bold; +} + +dl.citelist { + margin-bottom:50px; +} + +dl.citelist dt { + color:var(--citation-label-color); + float:left; + font-weight:bold; + margin-right:10px; + padding:5px; + text-align:right; + width:52px; +} + +dl.citelist dd { + margin:2px 0 2px 72px; + padding:5px 0; +} + +div.toc { + padding: 14px 25px; + background-color: var(--toc-background-color); + border: 1px solid var(--toc-border-color); + border-radius: 7px 7px 7px 7px; + float: right; + height: auto; + margin: 0 8px 10px 10px; + width: 200px; +} + +div.toc li { + background: var(--toc-down-arrow-image) no-repeat scroll 0 5px transparent; + font: 10px/1.2 var(--font-family-toc); + margin-top: 5px; + padding-left: 10px; + padding-top: 2px; +} + +div.toc h3 { + font: bold 12px/1.2 var(--font-family-toc); + color: var(--toc-header-color); + border-bottom: 0 none; + margin: 0; +} + +div.toc ul { + list-style: none outside none; + border: medium none; + padding: 0px; +} + +div.toc li.level1 { + margin-left: 0px; +} + +div.toc li.level2 { + margin-left: 15px; +} + +div.toc li.level3 { + margin-left: 15px; +} + +div.toc li.level4 { + margin-left: 15px; +} + +span.emoji { + /* font family used at the site: https://unicode.org/emoji/charts/full-emoji-list.html + * font-family: "Noto Color Emoji", "Apple Color Emoji", "Segoe UI Emoji", Times, Symbola, Aegyptus, Code2000, Code2001, Code2002, Musica, serif, LastResort; + */ +} + +span.obfuscator { + display: none; +} + +.inherit_header { + font-weight: bold; + color: var(--inherit-header-color); + cursor: pointer; + -webkit-touch-callout: none; + -webkit-user-select: none; + -khtml-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; +} + +.inherit_header td { + padding: 6px 0px 2px 5px; +} + +.inherit { + display: none; +} + +tr.heading h2 { + margin-top: 12px; + margin-bottom: 4px; +} + +/* tooltip related style info */ + +.ttc { + position: absolute; + display: none; +} + +#powerTip { + cursor: default; + /*white-space: nowrap;*/ + color: var(--tooltip-foreground-color); + background-color: var(--tooltip-background-color); + border: 1px solid var(--tooltip-border-color); + border-radius: 4px 4px 4px 4px; + box-shadow: var(--tooltip-shadow); + display: none; + font-size: smaller; + max-width: 80%; + opacity: 0.9; + padding: 1ex 1em 1em; + position: absolute; + z-index: 2147483647; +} + +#powerTip div.ttdoc { + color: var(--tooltip-doc-color); + font-style: italic; +} + +#powerTip div.ttname a { + font-weight: bold; +} + +#powerTip a { + color: var(--tooltip-link-color); +} + +#powerTip div.ttname { + font-weight: bold; +} + +#powerTip div.ttdeci { + color: var(--tooltip-declaration-color); +} + +#powerTip div { + margin: 0px; + padding: 0px; + font-size: 12px; + font-family: var(--font-family-tooltip); + line-height: 16px; +} + +#powerTip:before, #powerTip:after { + content: ""; + position: absolute; + margin: 0px; +} + +#powerTip.n:after, #powerTip.n:before, +#powerTip.s:after, #powerTip.s:before, +#powerTip.w:after, #powerTip.w:before, +#powerTip.e:after, #powerTip.e:before, +#powerTip.ne:after, #powerTip.ne:before, +#powerTip.se:after, #powerTip.se:before, +#powerTip.nw:after, #powerTip.nw:before, +#powerTip.sw:after, #powerTip.sw:before { + border: solid transparent; + content: " "; + height: 0; + width: 0; + position: absolute; +} + +#powerTip.n:after, #powerTip.s:after, +#powerTip.w:after, #powerTip.e:after, +#powerTip.nw:after, #powerTip.ne:after, +#powerTip.sw:after, #powerTip.se:after { + border-color: rgba(255, 255, 255, 0); +} + +#powerTip.n:before, #powerTip.s:before, +#powerTip.w:before, #powerTip.e:before, +#powerTip.nw:before, #powerTip.ne:before, +#powerTip.sw:before, #powerTip.se:before { + border-color: rgba(128, 128, 128, 0); +} + +#powerTip.n:after, #powerTip.n:before, +#powerTip.ne:after, #powerTip.ne:before, +#powerTip.nw:after, #powerTip.nw:before { + top: 100%; +} + +#powerTip.n:after, #powerTip.ne:after, #powerTip.nw:after { + border-top-color: var(--tooltip-background-color); + border-width: 10px; + margin: 0px -10px; +} +#powerTip.n:before, #powerTip.ne:before, #powerTip.nw:before { + border-top-color: var(--tooltip-border-color); + border-width: 11px; + margin: 0px -11px; +} +#powerTip.n:after, #powerTip.n:before { + left: 50%; +} + +#powerTip.nw:after, #powerTip.nw:before { + right: 14px; +} + +#powerTip.ne:after, #powerTip.ne:before { + left: 14px; +} + +#powerTip.s:after, #powerTip.s:before, +#powerTip.se:after, #powerTip.se:before, +#powerTip.sw:after, #powerTip.sw:before { + bottom: 100%; +} + +#powerTip.s:after, #powerTip.se:after, #powerTip.sw:after { + border-bottom-color: var(--tooltip-background-color); + border-width: 10px; + margin: 0px -10px; +} + +#powerTip.s:before, #powerTip.se:before, #powerTip.sw:before { + border-bottom-color: var(--tooltip-border-color); + border-width: 11px; + margin: 0px -11px; +} + +#powerTip.s:after, #powerTip.s:before { + left: 50%; +} + +#powerTip.sw:after, #powerTip.sw:before { + right: 14px; +} + +#powerTip.se:after, #powerTip.se:before { + left: 14px; +} + +#powerTip.e:after, #powerTip.e:before { + left: 100%; +} +#powerTip.e:after { + border-left-color: var(--tooltip-border-color); + border-width: 10px; + top: 50%; + margin-top: -10px; +} +#powerTip.e:before { + border-left-color: var(--tooltip-border-color); + border-width: 11px; + top: 50%; + margin-top: -11px; +} + +#powerTip.w:after, #powerTip.w:before { + right: 100%; +} +#powerTip.w:after { + border-right-color: var(--tooltip-border-color); + border-width: 10px; + top: 50%; + margin-top: -10px; +} +#powerTip.w:before { + border-right-color: var(--tooltip-border-color); + border-width: 11px; + top: 50%; + margin-top: -11px; +} + +@media print +{ + #top { display: none; } + #side-nav { display: none; } + #nav-path { display: none; } + body { overflow:visible; } + h1, h2, h3, h4, h5, h6 { page-break-after: avoid; } + .summary { display: none; } + .memitem { page-break-inside: avoid; } + #doc-content + { + margin-left:0 !important; + height:auto !important; + width:auto !important; + overflow:inherit; + display:inline; + } +} + +/* @group Markdown */ + +table.markdownTable { + border-collapse:collapse; + margin-top: 4px; + margin-bottom: 4px; +} + +table.markdownTable td, table.markdownTable th { + border: 1px solid var(--table-cell-border-color); + padding: 3px 7px 2px; +} + +table.markdownTable tr { +} + +th.markdownTableHeadLeft, th.markdownTableHeadRight, th.markdownTableHeadCenter, th.markdownTableHeadNone { + background-color: var(--table-header-background-color); + color: var(--table-header-foreground-color); + font-size: 110%; + padding-bottom: 4px; + padding-top: 5px; +} + +th.markdownTableHeadLeft, td.markdownTableBodyLeft { + text-align: left +} + +th.markdownTableHeadRight, td.markdownTableBodyRight { + text-align: right +} + +th.markdownTableHeadCenter, td.markdownTableBodyCenter { + text-align: center +} + +tt, code, kbd, samp +{ + display: inline-block; +} +/* @end */ + +u { + text-decoration: underline; +} + +details>summary { + list-style-type: none; +} + +details > summary::-webkit-details-marker { + display: none; +} + +details>summary::before { + content: "\25ba"; + padding-right:4px; + font-size: 80%; +} + +details[open]>summary::before { + content: "\25bc"; + padding-right:4px; + font-size: 80%; +} + +body { + scrollbar-color: var(--scrollbar-thumb-color) var(--scrollbar-background-color); +} + +::-webkit-scrollbar { + background-color: var(--scrollbar-background-color); + height: 12px; + width: 12px; +} +::-webkit-scrollbar-thumb { + border-radius: 6px; + box-shadow: inset 0 0 12px 12px var(--scrollbar-thumb-color); + border: solid 2px transparent; +} +::-webkit-scrollbar-corner { + background-color: var(--scrollbar-background-color); +} + diff --git a/External/open-cpp-utils/Documentation/html/doxygen.svg b/External/open-cpp-utils/Documentation/html/doxygen.svg new file mode 100644 index 0000000..79a7635 --- /dev/null +++ b/External/open-cpp-utils/Documentation/html/doxygen.svg @@ -0,0 +1,28 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/External/open-cpp-utils/Documentation/html/doxygen_crawl.html b/External/open-cpp-utils/Documentation/html/doxygen_crawl.html new file mode 100644 index 0000000..ef8e0c3 --- /dev/null +++ b/External/open-cpp-utils/Documentation/html/doxygen_crawl.html @@ -0,0 +1,71 @@ + + + +Validator / crawler helper + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/External/open-cpp-utils/Documentation/html/dynsections.js b/External/open-cpp-utils/Documentation/html/dynsections.js new file mode 100644 index 0000000..8f49326 --- /dev/null +++ b/External/open-cpp-utils/Documentation/html/dynsections.js @@ -0,0 +1,194 @@ +/* + @licstart The following is the entire license notice for the JavaScript code in this file. + + The MIT License (MIT) + + Copyright (C) 1997-2020 by Dimitri van Heesch + + Permission is hereby granted, free of charge, to any person obtaining a copy of this software + and associated documentation files (the "Software"), to deal in the Software without restriction, + including without limitation the rights to use, copy, modify, merge, publish, distribute, + sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all copies or + substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING + BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, + DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + @licend The above is the entire license notice for the JavaScript code in this file + */ + +let dynsection = { + + // helper function + updateStripes : function() { + $('table.directory tr'). + removeClass('even').filter(':visible:even').addClass('even'); + $('table.directory tr'). + removeClass('odd').filter(':visible:odd').addClass('odd'); + }, + + toggleVisibility : function(linkObj) { + const base = $(linkObj).attr('id'); + const summary = $('#'+base+'-summary'); + const content = $('#'+base+'-content'); + const trigger = $('#'+base+'-trigger'); + const src=$(trigger).attr('src'); + if (content.is(':visible')===true) { + content.hide(); + summary.show(); + $(linkObj).addClass('closed').removeClass('opened'); + $(trigger).attr('src',src.substring(0,src.length-8)+'closed.png'); + } else { + content.show(); + summary.hide(); + $(linkObj).removeClass('closed').addClass('opened'); + $(trigger).attr('src',src.substring(0,src.length-10)+'open.png'); + } + return false; + }, + + toggleLevel : function(level) { + $('table.directory tr').each(function() { + const l = this.id.split('_').length-1; + const i = $('#img'+this.id.substring(3)); + const a = $('#arr'+this.id.substring(3)); + if (l'); + // add vertical lines to other rows + $('span[class=lineno]').not(':eq(0)').append(''); + // add toggle controls to lines with fold divs + $('div[class=foldopen]').each(function() { + // extract specific id to use + const id = $(this).attr('id').replace('foldopen',''); + // extract start and end foldable fragment attributes + const start = $(this).attr('data-start'); + const end = $(this).attr('data-end'); + // replace normal fold span with controls for the first line of a foldable fragment + $(this).find('span[class=fold]:first').replaceWith(''); + // append div for folded (closed) representation + $(this).after(''); + // extract the first line from the "open" section to represent closed content + const line = $(this).children().first().clone(); + // remove any glow that might still be active on the original line + $(line).removeClass('glow'); + if (start) { + // if line already ends with a start marker (e.g. trailing {), remove it + $(line).html($(line).html().replace(new RegExp('\\s*'+start+'\\s*$','g'),'')); + } + // replace minus with plus symbol + $(line).find('span[class=fold]').css('background-image',codefold.plusImg[relPath]); + // append ellipsis + $(line).append(' '+start+''+end); + // insert constructed line into closed div + $('#foldclosed'+id).html(line); + }); + }, +}; +/* @license-end */ diff --git a/External/open-cpp-utils/Documentation/html/files.html b/External/open-cpp-utils/Documentation/html/files.html new file mode 100644 index 0000000..0efd854 --- /dev/null +++ b/External/open-cpp-utils/Documentation/html/files.html @@ -0,0 +1,95 @@ + + + + + + + +open-cpp-utils: File List + + + + + + + + + + + +
    +
    + + + + + + +
    +
    open-cpp-utils 0.0.1 +
    +
    +
    + + + + + + + +
    + +
    +
    + + +
    +
    +
    +
    +
    +
    Loading...
    +
    Searching...
    +
    No Matches
    +
    +
    +
    +
    + +
    +
    File List
    +
    +
    +
    Here is a list of all documented files with brief descriptions:
    + + + + + + + + + +
     any.h
     array.h
     directed_tree.h
     optional.h
     startup.h
     template_utils.hProvides compile time evaluation utilities for templates and template packs
     types.h
     unique_id.h
    +
    +
    + + + + diff --git a/External/open-cpp-utils/Documentation/html/folderclosed.svg b/External/open-cpp-utils/Documentation/html/folderclosed.svg new file mode 100644 index 0000000..b04bed2 --- /dev/null +++ b/External/open-cpp-utils/Documentation/html/folderclosed.svg @@ -0,0 +1,11 @@ + + + + + + + + + + diff --git a/External/open-cpp-utils/Documentation/html/folderclosedd.svg b/External/open-cpp-utils/Documentation/html/folderclosedd.svg new file mode 100644 index 0000000..52f0166 --- /dev/null +++ b/External/open-cpp-utils/Documentation/html/folderclosedd.svg @@ -0,0 +1,11 @@ + + + + + + + + + + diff --git a/External/open-cpp-utils/Documentation/html/folderopen.svg b/External/open-cpp-utils/Documentation/html/folderopen.svg new file mode 100644 index 0000000..f6896dd --- /dev/null +++ b/External/open-cpp-utils/Documentation/html/folderopen.svg @@ -0,0 +1,17 @@ + + + + + + + + + + diff --git a/External/open-cpp-utils/Documentation/html/folderopend.svg b/External/open-cpp-utils/Documentation/html/folderopend.svg new file mode 100644 index 0000000..2d1f06e --- /dev/null +++ b/External/open-cpp-utils/Documentation/html/folderopend.svg @@ -0,0 +1,12 @@ + + + + + + + + + + + diff --git a/External/open-cpp-utils/Documentation/html/functions.html b/External/open-cpp-utils/Documentation/html/functions.html new file mode 100644 index 0000000..25f6ad1 --- /dev/null +++ b/External/open-cpp-utils/Documentation/html/functions.html @@ -0,0 +1,93 @@ + + + + + + + +open-cpp-utils: Class Members + + + + + + + + + + + +
    +
    + + + + + + +
    +
    open-cpp-utils 0.0.1 +
    +
    +
    + + + + + + + +
    + +
    +
    + + +
    +
    +
    +
    +
    +
    Loading...
    +
    Searching...
    +
    No Matches
    +
    +
    +
    +
    + +
    +
    Here is a list of all documented class members with links to the class documentation for each member:
    +
    + + + + diff --git a/External/open-cpp-utils/Documentation/html/functions_func.html b/External/open-cpp-utils/Documentation/html/functions_func.html new file mode 100644 index 0000000..e6a65ff --- /dev/null +++ b/External/open-cpp-utils/Documentation/html/functions_func.html @@ -0,0 +1,93 @@ + + + + + + + +open-cpp-utils: Class Members - Functions + + + + + + + + + + + +
    +
    + + + + + + +
    +
    open-cpp-utils 0.0.1 +
    +
    +
    + + + + + + + +
    + +
    +
    + + +
    +
    +
    +
    +
    +
    Loading...
    +
    Searching...
    +
    No Matches
    +
    +
    +
    +
    + +
    +
    Here is a list of all documented functions with links to the class documentation for each member:
    +
    + + + + diff --git a/External/open-cpp-utils/Documentation/html/hierarchy.html b/External/open-cpp-utils/Documentation/html/hierarchy.html new file mode 100644 index 0000000..37fc50d --- /dev/null +++ b/External/open-cpp-utils/Documentation/html/hierarchy.html @@ -0,0 +1,103 @@ + + + + + + + +open-cpp-utils: Class Hierarchy + + + + + + + + + + + +
    +
    + + + + + + +
    +
    open-cpp-utils 0.0.1 +
    +
    +
    + + + + + + + +
    + +
    +
    + + +
    +
    +
    +
    +
    +
    Loading...
    +
    Searching...
    +
    No Matches
    +
    +
    +
    +
    + +
    +
    Class Hierarchy
    +
    +
    +
    This inheritance list is sorted roughly, but not completely, alphabetically:
    +
    + + + + diff --git a/External/open-cpp-utils/Documentation/html/index.html b/External/open-cpp-utils/Documentation/html/index.html new file mode 100644 index 0000000..221988b --- /dev/null +++ b/External/open-cpp-utils/Documentation/html/index.html @@ -0,0 +1,84 @@ + + + + + + + +open-cpp-utils: Main Page + + + + + + + + + + + +
    +
    + + + + + + +
    +
    open-cpp-utils 0.0.1 +
    +
    +
    + + + + + + + +
    + +
    +
    + + +
    +
    +
    +
    +
    +
    Loading...
    +
    Searching...
    +
    No Matches
    +
    +
    +
    +
    + +
    +
    open-cpp-utils Documentation
    +
    +
    + +
    + + + + diff --git a/External/open-cpp-utils/Documentation/html/jquery.js b/External/open-cpp-utils/Documentation/html/jquery.js new file mode 100644 index 0000000..1dffb65 --- /dev/null +++ b/External/open-cpp-utils/Documentation/html/jquery.js @@ -0,0 +1,34 @@ +/*! jQuery v3.6.0 | (c) OpenJS Foundation and other contributors | jquery.org/license */ +!function(e,t){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(C,e){"use strict";var t=[],r=Object.getPrototypeOf,s=t.slice,g=t.flat?function(e){return t.flat.call(e)}:function(e){return t.concat.apply([],e)},u=t.push,i=t.indexOf,n={},o=n.toString,v=n.hasOwnProperty,a=v.toString,l=a.call(Object),y={},m=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType&&"function"!=typeof e.item},x=function(e){return null!=e&&e===e.window},E=C.document,c={type:!0,src:!0,nonce:!0,noModule:!0};function b(e,t,n){var r,i,o=(n=n||E).createElement("script");if(o.text=e,t)for(r in c)(i=t[r]||t.getAttribute&&t.getAttribute(r))&&o.setAttribute(r,i);n.head.appendChild(o).parentNode.removeChild(o)}function w(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?n[o.call(e)]||"object":typeof e}var f="3.6.0",S=function(e,t){return new S.fn.init(e,t)};function p(e){var t=!!e&&"length"in e&&e.length,n=w(e);return!m(e)&&!x(e)&&("array"===n||0===t||"number"==typeof t&&0+~]|"+M+")"+M+"*"),U=new RegExp(M+"|>"),X=new RegExp(F),V=new RegExp("^"+I+"$"),G={ID:new RegExp("^#("+I+")"),CLASS:new RegExp("^\\.("+I+")"),TAG:new RegExp("^("+I+"|[*])"),ATTR:new RegExp("^"+W),PSEUDO:new RegExp("^"+F),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+M+"*(even|odd|(([+-]|)(\\d*)n|)"+M+"*(?:([+-]|)"+M+"*(\\d+)|))"+M+"*\\)|)","i"),bool:new RegExp("^(?:"+R+")$","i"),needsContext:new RegExp("^"+M+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+M+"*((?:-\\d)?\\d*)"+M+"*\\)|)(?=[^-]|$)","i")},Y=/HTML$/i,Q=/^(?:input|select|textarea|button)$/i,J=/^h\d$/i,K=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ee=/[+~]/,te=new RegExp("\\\\[\\da-fA-F]{1,6}"+M+"?|\\\\([^\\r\\n\\f])","g"),ne=function(e,t){var n="0x"+e.slice(1)-65536;return t||(n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320))},re=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,ie=function(e,t){return t?"\0"===e?"\ufffd":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},oe=function(){T()},ae=be(function(e){return!0===e.disabled&&"fieldset"===e.nodeName.toLowerCase()},{dir:"parentNode",next:"legend"});try{H.apply(t=O.call(p.childNodes),p.childNodes),t[p.childNodes.length].nodeType}catch(e){H={apply:t.length?function(e,t){L.apply(e,O.call(t))}:function(e,t){var n=e.length,r=0;while(e[n++]=t[r++]);e.length=n-1}}}function se(t,e,n,r){var i,o,a,s,u,l,c,f=e&&e.ownerDocument,p=e?e.nodeType:9;if(n=n||[],"string"!=typeof t||!t||1!==p&&9!==p&&11!==p)return n;if(!r&&(T(e),e=e||C,E)){if(11!==p&&(u=Z.exec(t)))if(i=u[1]){if(9===p){if(!(a=e.getElementById(i)))return n;if(a.id===i)return n.push(a),n}else if(f&&(a=f.getElementById(i))&&y(e,a)&&a.id===i)return n.push(a),n}else{if(u[2])return H.apply(n,e.getElementsByTagName(t)),n;if((i=u[3])&&d.getElementsByClassName&&e.getElementsByClassName)return H.apply(n,e.getElementsByClassName(i)),n}if(d.qsa&&!N[t+" "]&&(!v||!v.test(t))&&(1!==p||"object"!==e.nodeName.toLowerCase())){if(c=t,f=e,1===p&&(U.test(t)||z.test(t))){(f=ee.test(t)&&ye(e.parentNode)||e)===e&&d.scope||((s=e.getAttribute("id"))?s=s.replace(re,ie):e.setAttribute("id",s=S)),o=(l=h(t)).length;while(o--)l[o]=(s?"#"+s:":scope")+" "+xe(l[o]);c=l.join(",")}try{return H.apply(n,f.querySelectorAll(c)),n}catch(e){N(t,!0)}finally{s===S&&e.removeAttribute("id")}}}return g(t.replace($,"$1"),e,n,r)}function ue(){var r=[];return function e(t,n){return r.push(t+" ")>b.cacheLength&&delete e[r.shift()],e[t+" "]=n}}function le(e){return e[S]=!0,e}function ce(e){var t=C.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function fe(e,t){var n=e.split("|"),r=n.length;while(r--)b.attrHandle[n[r]]=t}function pe(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(r)return r;if(n)while(n=n.nextSibling)if(n===t)return-1;return e?1:-1}function de(t){return function(e){return"input"===e.nodeName.toLowerCase()&&e.type===t}}function he(n){return function(e){var t=e.nodeName.toLowerCase();return("input"===t||"button"===t)&&e.type===n}}function ge(t){return function(e){return"form"in e?e.parentNode&&!1===e.disabled?"label"in e?"label"in e.parentNode?e.parentNode.disabled===t:e.disabled===t:e.isDisabled===t||e.isDisabled!==!t&&ae(e)===t:e.disabled===t:"label"in e&&e.disabled===t}}function ve(a){return le(function(o){return o=+o,le(function(e,t){var n,r=a([],e.length,o),i=r.length;while(i--)e[n=r[i]]&&(e[n]=!(t[n]=e[n]))})})}function ye(e){return e&&"undefined"!=typeof e.getElementsByTagName&&e}for(e in d=se.support={},i=se.isXML=function(e){var t=e&&e.namespaceURI,n=e&&(e.ownerDocument||e).documentElement;return!Y.test(t||n&&n.nodeName||"HTML")},T=se.setDocument=function(e){var t,n,r=e?e.ownerDocument||e:p;return r!=C&&9===r.nodeType&&r.documentElement&&(a=(C=r).documentElement,E=!i(C),p!=C&&(n=C.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",oe,!1):n.attachEvent&&n.attachEvent("onunload",oe)),d.scope=ce(function(e){return a.appendChild(e).appendChild(C.createElement("div")),"undefined"!=typeof e.querySelectorAll&&!e.querySelectorAll(":scope fieldset div").length}),d.attributes=ce(function(e){return e.className="i",!e.getAttribute("className")}),d.getElementsByTagName=ce(function(e){return e.appendChild(C.createComment("")),!e.getElementsByTagName("*").length}),d.getElementsByClassName=K.test(C.getElementsByClassName),d.getById=ce(function(e){return a.appendChild(e).id=S,!C.getElementsByName||!C.getElementsByName(S).length}),d.getById?(b.filter.ID=function(e){var t=e.replace(te,ne);return function(e){return e.getAttribute("id")===t}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n=t.getElementById(e);return n?[n]:[]}}):(b.filter.ID=function(e){var n=e.replace(te,ne);return function(e){var t="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return t&&t.value===n}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n,r,i,o=t.getElementById(e);if(o){if((n=o.getAttributeNode("id"))&&n.value===e)return[o];i=t.getElementsByName(e),r=0;while(o=i[r++])if((n=o.getAttributeNode("id"))&&n.value===e)return[o]}return[]}}),b.find.TAG=d.getElementsByTagName?function(e,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e):d.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){while(n=o[i++])1===n.nodeType&&r.push(n);return r}return o},b.find.CLASS=d.getElementsByClassName&&function(e,t){if("undefined"!=typeof t.getElementsByClassName&&E)return t.getElementsByClassName(e)},s=[],v=[],(d.qsa=K.test(C.querySelectorAll))&&(ce(function(e){var t;a.appendChild(e).innerHTML="",e.querySelectorAll("[msallowcapture^='']").length&&v.push("[*^$]="+M+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||v.push("\\["+M+"*(?:value|"+R+")"),e.querySelectorAll("[id~="+S+"-]").length||v.push("~="),(t=C.createElement("input")).setAttribute("name",""),e.appendChild(t),e.querySelectorAll("[name='']").length||v.push("\\["+M+"*name"+M+"*="+M+"*(?:''|\"\")"),e.querySelectorAll(":checked").length||v.push(":checked"),e.querySelectorAll("a#"+S+"+*").length||v.push(".#.+[+~]"),e.querySelectorAll("\\\f"),v.push("[\\r\\n\\f]")}),ce(function(e){e.innerHTML="";var t=C.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&v.push("name"+M+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&v.push(":enabled",":disabled"),a.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&v.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),v.push(",.*:")})),(d.matchesSelector=K.test(c=a.matches||a.webkitMatchesSelector||a.mozMatchesSelector||a.oMatchesSelector||a.msMatchesSelector))&&ce(function(e){d.disconnectedMatch=c.call(e,"*"),c.call(e,"[s!='']:x"),s.push("!=",F)}),v=v.length&&new RegExp(v.join("|")),s=s.length&&new RegExp(s.join("|")),t=K.test(a.compareDocumentPosition),y=t||K.test(a.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)while(t=t.parentNode)if(t===e)return!0;return!1},j=t?function(e,t){if(e===t)return l=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)==(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!d.sortDetached&&t.compareDocumentPosition(e)===n?e==C||e.ownerDocument==p&&y(p,e)?-1:t==C||t.ownerDocument==p&&y(p,t)?1:u?P(u,e)-P(u,t):0:4&n?-1:1)}:function(e,t){if(e===t)return l=!0,0;var n,r=0,i=e.parentNode,o=t.parentNode,a=[e],s=[t];if(!i||!o)return e==C?-1:t==C?1:i?-1:o?1:u?P(u,e)-P(u,t):0;if(i===o)return pe(e,t);n=e;while(n=n.parentNode)a.unshift(n);n=t;while(n=n.parentNode)s.unshift(n);while(a[r]===s[r])r++;return r?pe(a[r],s[r]):a[r]==p?-1:s[r]==p?1:0}),C},se.matches=function(e,t){return se(e,null,null,t)},se.matchesSelector=function(e,t){if(T(e),d.matchesSelector&&E&&!N[t+" "]&&(!s||!s.test(t))&&(!v||!v.test(t)))try{var n=c.call(e,t);if(n||d.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(e){N(t,!0)}return 0":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(te,ne),e[3]=(e[3]||e[4]||e[5]||"").replace(te,ne),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||se.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&se.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return G.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&X.test(n)&&(t=h(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(te,ne).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=m[e+" "];return t||(t=new RegExp("(^|"+M+")"+e+"("+M+"|$)"))&&m(e,function(e){return t.test("string"==typeof e.className&&e.className||"undefined"!=typeof e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(n,r,i){return function(e){var t=se.attr(e,n);return null==t?"!="===r:!r||(t+="","="===r?t===i:"!="===r?t!==i:"^="===r?i&&0===t.indexOf(i):"*="===r?i&&-1:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function j(e,n,r){return m(n)?S.grep(e,function(e,t){return!!n.call(e,t,e)!==r}):n.nodeType?S.grep(e,function(e){return e===n!==r}):"string"!=typeof n?S.grep(e,function(e){return-1)[^>]*|#([\w-]+))$/;(S.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||D,"string"==typeof e){if(!(r="<"===e[0]&&">"===e[e.length-1]&&3<=e.length?[null,e,null]:q.exec(e))||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof S?t[0]:t,S.merge(this,S.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:E,!0)),N.test(r[1])&&S.isPlainObject(t))for(r in t)m(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return(i=E.getElementById(r[2]))&&(this[0]=i,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):m(e)?void 0!==n.ready?n.ready(e):e(S):S.makeArray(e,this)}).prototype=S.fn,D=S(E);var L=/^(?:parents|prev(?:Until|All))/,H={children:!0,contents:!0,next:!0,prev:!0};function O(e,t){while((e=e[t])&&1!==e.nodeType);return e}S.fn.extend({has:function(e){var t=S(e,this),n=t.length;return this.filter(function(){for(var e=0;e\x20\t\r\n\f]*)/i,he=/^$|^module$|\/(?:java|ecma)script/i;ce=E.createDocumentFragment().appendChild(E.createElement("div")),(fe=E.createElement("input")).setAttribute("type","radio"),fe.setAttribute("checked","checked"),fe.setAttribute("name","t"),ce.appendChild(fe),y.checkClone=ce.cloneNode(!0).cloneNode(!0).lastChild.checked,ce.innerHTML="",y.noCloneChecked=!!ce.cloneNode(!0).lastChild.defaultValue,ce.innerHTML="",y.option=!!ce.lastChild;var ge={thead:[1,"","
    "],col:[2,"","
    "],tr:[2,"","
    "],td:[3,"","
    "],_default:[0,"",""]};function ve(e,t){var n;return n="undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t||"*"):"undefined"!=typeof e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&A(e,t)?S.merge([e],n):n}function ye(e,t){for(var n=0,r=e.length;n",""]);var me=/<|&#?\w+;/;function xe(e,t,n,r,i){for(var o,a,s,u,l,c,f=t.createDocumentFragment(),p=[],d=0,h=e.length;d\s*$/g;function je(e,t){return A(e,"table")&&A(11!==t.nodeType?t:t.firstChild,"tr")&&S(e).children("tbody")[0]||e}function De(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function qe(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Le(e,t){var n,r,i,o,a,s;if(1===t.nodeType){if(Y.hasData(e)&&(s=Y.get(e).events))for(i in Y.remove(t,"handle events"),s)for(n=0,r=s[i].length;n").attr(n.scriptAttrs||{}).prop({charset:n.scriptCharset,src:n.url}).on("load error",i=function(e){r.remove(),i=null,e&&t("error"===e.type?404:200,e.type)}),E.head.appendChild(r[0])},abort:function(){i&&i()}}});var _t,zt=[],Ut=/(=)\?(?=&|$)|\?\?/;S.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=zt.pop()||S.expando+"_"+wt.guid++;return this[e]=!0,e}}),S.ajaxPrefilter("json jsonp",function(e,t,n){var r,i,o,a=!1!==e.jsonp&&(Ut.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&Ut.test(e.data)&&"data");if(a||"jsonp"===e.dataTypes[0])return r=e.jsonpCallback=m(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,a?e[a]=e[a].replace(Ut,"$1"+r):!1!==e.jsonp&&(e.url+=(Tt.test(e.url)?"&":"?")+e.jsonp+"="+r),e.converters["script json"]=function(){return o||S.error(r+" was not called"),o[0]},e.dataTypes[0]="json",i=C[r],C[r]=function(){o=arguments},n.always(function(){void 0===i?S(C).removeProp(r):C[r]=i,e[r]&&(e.jsonpCallback=t.jsonpCallback,zt.push(r)),o&&m(i)&&i(o[0]),o=i=void 0}),"script"}),y.createHTMLDocument=((_t=E.implementation.createHTMLDocument("").body).innerHTML="
    ",2===_t.childNodes.length),S.parseHTML=function(e,t,n){return"string"!=typeof e?[]:("boolean"==typeof t&&(n=t,t=!1),t||(y.createHTMLDocument?((r=(t=E.implementation.createHTMLDocument("")).createElement("base")).href=E.location.href,t.head.appendChild(r)):t=E),o=!n&&[],(i=N.exec(e))?[t.createElement(i[1])]:(i=xe([e],t,o),o&&o.length&&S(o).remove(),S.merge([],i.childNodes)));var r,i,o},S.fn.load=function(e,t,n){var r,i,o,a=this,s=e.indexOf(" ");return-1").append(S.parseHTML(e)).find(r):e)}).always(n&&function(e,t){a.each(function(){n.apply(this,o||[e.responseText,t,e])})}),this},S.expr.pseudos.animated=function(t){return S.grep(S.timers,function(e){return t===e.elem}).length},S.offset={setOffset:function(e,t,n){var r,i,o,a,s,u,l=S.css(e,"position"),c=S(e),f={};"static"===l&&(e.style.position="relative"),s=c.offset(),o=S.css(e,"top"),u=S.css(e,"left"),("absolute"===l||"fixed"===l)&&-1<(o+u).indexOf("auto")?(a=(r=c.position()).top,i=r.left):(a=parseFloat(o)||0,i=parseFloat(u)||0),m(t)&&(t=t.call(e,n,S.extend({},s))),null!=t.top&&(f.top=t.top-s.top+a),null!=t.left&&(f.left=t.left-s.left+i),"using"in t?t.using.call(e,f):c.css(f)}},S.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each(function(e){S.offset.setOffset(this,t,e)});var e,n,r=this[0];return r?r.getClientRects().length?(e=r.getBoundingClientRect(),n=r.ownerDocument.defaultView,{top:e.top+n.pageYOffset,left:e.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,n,r=this[0],i={top:0,left:0};if("fixed"===S.css(r,"position"))t=r.getBoundingClientRect();else{t=this.offset(),n=r.ownerDocument,e=r.offsetParent||n.documentElement;while(e&&(e===n.body||e===n.documentElement)&&"static"===S.css(e,"position"))e=e.parentNode;e&&e!==r&&1===e.nodeType&&((i=S(e).offset()).top+=S.css(e,"borderTopWidth",!0),i.left+=S.css(e,"borderLeftWidth",!0))}return{top:t.top-i.top-S.css(r,"marginTop",!0),left:t.left-i.left-S.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var e=this.offsetParent;while(e&&"static"===S.css(e,"position"))e=e.offsetParent;return e||re})}}),S.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,i){var o="pageYOffset"===i;S.fn[t]=function(e){return $(this,function(e,t,n){var r;if(x(e)?r=e:9===e.nodeType&&(r=e.defaultView),void 0===n)return r?r[i]:e[t];r?r.scrollTo(o?r.pageXOffset:n,o?n:r.pageYOffset):e[t]=n},t,e,arguments.length)}}),S.each(["top","left"],function(e,n){S.cssHooks[n]=Fe(y.pixelPosition,function(e,t){if(t)return t=We(e,n),Pe.test(t)?S(e).position()[n]+"px":t})}),S.each({Height:"height",Width:"width"},function(a,s){S.each({padding:"inner"+a,content:s,"":"outer"+a},function(r,o){S.fn[o]=function(e,t){var n=arguments.length&&(r||"boolean"!=typeof e),i=r||(!0===e||!0===t?"margin":"border");return $(this,function(e,t,n){var r;return x(e)?0===o.indexOf("outer")?e["inner"+a]:e.document.documentElement["client"+a]:9===e.nodeType?(r=e.documentElement,Math.max(e.body["scroll"+a],r["scroll"+a],e.body["offset"+a],r["offset"+a],r["client"+a])):void 0===n?S.css(e,t,i):S.style(e,t,n,i)},s,n?e:void 0,n)}})}),S.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){S.fn[t]=function(e){return this.on(t,e)}}),S.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)},hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),S.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(e,n){S.fn[n]=function(e,t){return 0",options:{classes:{},disabled:!1,create:null},_createWidget:function(t,e){e=y(e||this.defaultElement||this)[0],this.element=y(e),this.uuid=i++,this.eventNamespace="."+this.widgetName+this.uuid,this.bindings=y(),this.hoverable=y(),this.focusable=y(),this.classesElementLookup={},e!==this&&(y.data(e,this.widgetFullName,this),this._on(!0,this.element,{remove:function(t){t.target===e&&this.destroy()}}),this.document=y(e.style?e.ownerDocument:e.document||e),this.window=y(this.document[0].defaultView||this.document[0].parentWindow)),this.options=y.widget.extend({},this.options,this._getCreateOptions(),t),this._create(),this.options.disabled&&this._setOptionDisabled(this.options.disabled),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:function(){return{}},_getCreateEventData:y.noop,_create:y.noop,_init:y.noop,destroy:function(){var i=this;this._destroy(),y.each(this.classesElementLookup,function(t,e){i._removeClass(e,t)}),this.element.off(this.eventNamespace).removeData(this.widgetFullName),this.widget().off(this.eventNamespace).removeAttr("aria-disabled"),this.bindings.off(this.eventNamespace)},_destroy:y.noop,widget:function(){return this.element},option:function(t,e){var i,s,n,o=t;if(0===arguments.length)return y.widget.extend({},this.options);if("string"==typeof t)if(o={},t=(i=t.split(".")).shift(),i.length){for(s=o[t]=y.widget.extend({},this.options[t]),n=0;n
  • "),i=e.children()[0];return y("body").append(e),t=i.offsetWidth,e.css("overflow","scroll"),t===(i=i.offsetWidth)&&(i=e[0].clientWidth),e.remove(),s=t-i},getScrollInfo:function(t){var e=t.isWindow||t.isDocument?"":t.element.css("overflow-x"),i=t.isWindow||t.isDocument?"":t.element.css("overflow-y"),e="scroll"===e||"auto"===e&&t.widthx(D(s),D(n))?o.important="horizontal":o.important="vertical",p.using.call(this,t,o)}),h.offset(y.extend(l,{using:t}))})},y.ui.position={fit:{left:function(t,e){var i=e.within,s=i.isWindow?i.scrollLeft:i.offset.left,n=i.width,o=t.left-e.collisionPosition.marginLeft,h=s-o,a=o+e.collisionWidth-n-s;e.collisionWidth>n?0n?0=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return!0}}),y.ui.plugin={add:function(t,e,i){var s,n=y.ui[t].prototype;for(s in i)n.plugins[s]=n.plugins[s]||[],n.plugins[s].push([e,i[s]])},call:function(t,e,i,s){var n,o=t.plugins[e];if(o&&(s||t.element[0].parentNode&&11!==t.element[0].parentNode.nodeType))for(n=0;n").css({overflow:"hidden",position:this.element.css("position"),width:this.element.outerWidth(),height:this.element.outerHeight(),top:this.element.css("top"),left:this.element.css("left")})),this.element=this.element.parent().data("ui-resizable",this.element.resizable("instance")),this.elementIsWrapper=!0,t={marginTop:this.originalElement.css("marginTop"),marginRight:this.originalElement.css("marginRight"),marginBottom:this.originalElement.css("marginBottom"),marginLeft:this.originalElement.css("marginLeft")},this.element.css(t),this.originalElement.css("margin",0),this.originalResizeStyle=this.originalElement.css("resize"),this.originalElement.css("resize","none"),this._proportionallyResizeElements.push(this.originalElement.css({position:"static",zoom:1,display:"block"})),this.originalElement.css(t),this._proportionallyResize()),this._setupHandles(),e.autoHide&&y(this.element).on("mouseenter",function(){e.disabled||(i._removeClass("ui-resizable-autohide"),i._handles.show())}).on("mouseleave",function(){e.disabled||i.resizing||(i._addClass("ui-resizable-autohide"),i._handles.hide())}),this._mouseInit()},_destroy:function(){this._mouseDestroy(),this._addedHandles.remove();function t(t){y(t).removeData("resizable").removeData("ui-resizable").off(".resizable")}var e;return this.elementIsWrapper&&(t(this.element),e=this.element,this.originalElement.css({position:e.css("position"),width:e.outerWidth(),height:e.outerHeight(),top:e.css("top"),left:e.css("left")}).insertAfter(e),e.remove()),this.originalElement.css("resize",this.originalResizeStyle),t(this.originalElement),this},_setOption:function(t,e){switch(this._super(t,e),t){case"handles":this._removeHandles(),this._setupHandles();break;case"aspectRatio":this._aspectRatio=!!e}},_setupHandles:function(){var t,e,i,s,n,o=this.options,h=this;if(this.handles=o.handles||(y(".ui-resizable-handle",this.element).length?{n:".ui-resizable-n",e:".ui-resizable-e",s:".ui-resizable-s",w:".ui-resizable-w",se:".ui-resizable-se",sw:".ui-resizable-sw",ne:".ui-resizable-ne",nw:".ui-resizable-nw"}:"e,s,se"),this._handles=y(),this._addedHandles=y(),this.handles.constructor===String)for("all"===this.handles&&(this.handles="n,e,s,w,se,sw,ne,nw"),i=this.handles.split(","),this.handles={},e=0;e"),this._addClass(n,"ui-resizable-handle "+s),n.css({zIndex:o.zIndex}),this.handles[t]=".ui-resizable-"+t,this.element.children(this.handles[t]).length||(this.element.append(n),this._addedHandles=this._addedHandles.add(n));this._renderAxis=function(t){var e,i,s;for(e in t=t||this.element,this.handles)this.handles[e].constructor===String?this.handles[e]=this.element.children(this.handles[e]).first().show():(this.handles[e].jquery||this.handles[e].nodeType)&&(this.handles[e]=y(this.handles[e]),this._on(this.handles[e],{mousedown:h._mouseDown})),this.elementIsWrapper&&this.originalElement[0].nodeName.match(/^(textarea|input|select|button)$/i)&&(i=y(this.handles[e],this.element),s=/sw|ne|nw|se|n|s/.test(e)?i.outerHeight():i.outerWidth(),i=["padding",/ne|nw|n/.test(e)?"Top":/se|sw|s/.test(e)?"Bottom":/^e$/.test(e)?"Right":"Left"].join(""),t.css(i,s),this._proportionallyResize()),this._handles=this._handles.add(this.handles[e])},this._renderAxis(this.element),this._handles=this._handles.add(this.element.find(".ui-resizable-handle")),this._handles.disableSelection(),this._handles.on("mouseover",function(){h.resizing||(this.className&&(n=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i)),h.axis=n&&n[1]?n[1]:"se")}),o.autoHide&&(this._handles.hide(),this._addClass("ui-resizable-autohide"))},_removeHandles:function(){this._addedHandles.remove()},_mouseCapture:function(t){var e,i,s=!1;for(e in this.handles)(i=y(this.handles[e])[0])!==t.target&&!y.contains(i,t.target)||(s=!0);return!this.options.disabled&&s},_mouseStart:function(t){var e,i,s=this.options,n=this.element;return this.resizing=!0,this._renderProxy(),e=this._num(this.helper.css("left")),i=this._num(this.helper.css("top")),s.containment&&(e+=y(s.containment).scrollLeft()||0,i+=y(s.containment).scrollTop()||0),this.offset=this.helper.offset(),this.position={left:e,top:i},this.size=this._helper?{width:this.helper.width(),height:this.helper.height()}:{width:n.width(),height:n.height()},this.originalSize=this._helper?{width:n.outerWidth(),height:n.outerHeight()}:{width:n.width(),height:n.height()},this.sizeDiff={width:n.outerWidth()-n.width(),height:n.outerHeight()-n.height()},this.originalPosition={left:e,top:i},this.originalMousePosition={left:t.pageX,top:t.pageY},this.aspectRatio="number"==typeof s.aspectRatio?s.aspectRatio:this.originalSize.width/this.originalSize.height||1,s=y(".ui-resizable-"+this.axis).css("cursor"),y("body").css("cursor","auto"===s?this.axis+"-resize":s),this._addClass("ui-resizable-resizing"),this._propagate("start",t),!0},_mouseDrag:function(t){var e=this.originalMousePosition,i=this.axis,s=t.pageX-e.left||0,e=t.pageY-e.top||0,i=this._change[i];return this._updatePrevProperties(),i&&(e=i.apply(this,[t,s,e]),this._updateVirtualBoundaries(t.shiftKey),(this._aspectRatio||t.shiftKey)&&(e=this._updateRatio(e,t)),e=this._respectSize(e,t),this._updateCache(e),this._propagate("resize",t),e=this._applyChanges(),!this._helper&&this._proportionallyResizeElements.length&&this._proportionallyResize(),y.isEmptyObject(e)||(this._updatePrevProperties(),this._trigger("resize",t,this.ui()),this._applyChanges())),!1},_mouseStop:function(t){this.resizing=!1;var e,i,s,n=this.options,o=this;return this._helper&&(s=(e=(i=this._proportionallyResizeElements).length&&/textarea/i.test(i[0].nodeName))&&this._hasScroll(i[0],"left")?0:o.sizeDiff.height,i=e?0:o.sizeDiff.width,e={width:o.helper.width()-i,height:o.helper.height()-s},i=parseFloat(o.element.css("left"))+(o.position.left-o.originalPosition.left)||null,s=parseFloat(o.element.css("top"))+(o.position.top-o.originalPosition.top)||null,n.animate||this.element.css(y.extend(e,{top:s,left:i})),o.helper.height(o.size.height),o.helper.width(o.size.width),this._helper&&!n.animate&&this._proportionallyResize()),y("body").css("cursor","auto"),this._removeClass("ui-resizable-resizing"),this._propagate("stop",t),this._helper&&this.helper.remove(),!1},_updatePrevProperties:function(){this.prevPosition={top:this.position.top,left:this.position.left},this.prevSize={width:this.size.width,height:this.size.height}},_applyChanges:function(){var t={};return this.position.top!==this.prevPosition.top&&(t.top=this.position.top+"px"),this.position.left!==this.prevPosition.left&&(t.left=this.position.left+"px"),this.size.width!==this.prevSize.width&&(t.width=this.size.width+"px"),this.size.height!==this.prevSize.height&&(t.height=this.size.height+"px"),this.helper.css(t),t},_updateVirtualBoundaries:function(t){var e,i,s=this.options,n={minWidth:this._isNumber(s.minWidth)?s.minWidth:0,maxWidth:this._isNumber(s.maxWidth)?s.maxWidth:1/0,minHeight:this._isNumber(s.minHeight)?s.minHeight:0,maxHeight:this._isNumber(s.maxHeight)?s.maxHeight:1/0};(this._aspectRatio||t)&&(e=n.minHeight*this.aspectRatio,i=n.minWidth/this.aspectRatio,s=n.maxHeight*this.aspectRatio,t=n.maxWidth/this.aspectRatio,e>n.minWidth&&(n.minWidth=e),i>n.minHeight&&(n.minHeight=i),st.width,h=this._isNumber(t.height)&&e.minHeight&&e.minHeight>t.height,a=this.originalPosition.left+this.originalSize.width,r=this.originalPosition.top+this.originalSize.height,l=/sw|nw|w/.test(i),i=/nw|ne|n/.test(i);return o&&(t.width=e.minWidth),h&&(t.height=e.minHeight),s&&(t.width=e.maxWidth),n&&(t.height=e.maxHeight),o&&l&&(t.left=a-e.minWidth),s&&l&&(t.left=a-e.maxWidth),h&&i&&(t.top=r-e.minHeight),n&&i&&(t.top=r-e.maxHeight),t.width||t.height||t.left||!t.top?t.width||t.height||t.top||!t.left||(t.left=null):t.top=null,t},_getPaddingPlusBorderDimensions:function(t){for(var e=0,i=[],s=[t.css("borderTopWidth"),t.css("borderRightWidth"),t.css("borderBottomWidth"),t.css("borderLeftWidth")],n=[t.css("paddingTop"),t.css("paddingRight"),t.css("paddingBottom"),t.css("paddingLeft")];e<4;e++)i[e]=parseFloat(s[e])||0,i[e]+=parseFloat(n[e])||0;return{height:i[0]+i[2],width:i[1]+i[3]}},_proportionallyResize:function(){if(this._proportionallyResizeElements.length)for(var t,e=0,i=this.helper||this.element;e").css({overflow:"hidden"}),this._addClass(this.helper,this._helper),this.helper.css({width:this.element.outerWidth(),height:this.element.outerHeight(),position:"absolute",left:this.elementOffset.left+"px",top:this.elementOffset.top+"px",zIndex:++e.zIndex}),this.helper.appendTo("body").disableSelection()):this.helper=this.element},_change:{e:function(t,e){return{width:this.originalSize.width+e}},w:function(t,e){var i=this.originalSize;return{left:this.originalPosition.left+e,width:i.width-e}},n:function(t,e,i){var s=this.originalSize;return{top:this.originalPosition.top+i,height:s.height-i}},s:function(t,e,i){return{height:this.originalSize.height+i}},se:function(t,e,i){return y.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[t,e,i]))},sw:function(t,e,i){return y.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[t,e,i]))},ne:function(t,e,i){return y.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[t,e,i]))},nw:function(t,e,i){return y.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[t,e,i]))}},_propagate:function(t,e){y.ui.plugin.call(this,t,[e,this.ui()]),"resize"!==t&&this._trigger(t,e,this.ui())},plugins:{},ui:function(){return{originalElement:this.originalElement,element:this.element,helper:this.helper,position:this.position,size:this.size,originalSize:this.originalSize,originalPosition:this.originalPosition}}}),y.ui.plugin.add("resizable","animate",{stop:function(e){var i=y(this).resizable("instance"),t=i.options,s=i._proportionallyResizeElements,n=s.length&&/textarea/i.test(s[0].nodeName),o=n&&i._hasScroll(s[0],"left")?0:i.sizeDiff.height,h=n?0:i.sizeDiff.width,n={width:i.size.width-h,height:i.size.height-o},h=parseFloat(i.element.css("left"))+(i.position.left-i.originalPosition.left)||null,o=parseFloat(i.element.css("top"))+(i.position.top-i.originalPosition.top)||null;i.element.animate(y.extend(n,o&&h?{top:o,left:h}:{}),{duration:t.animateDuration,easing:t.animateEasing,step:function(){var t={width:parseFloat(i.element.css("width")),height:parseFloat(i.element.css("height")),top:parseFloat(i.element.css("top")),left:parseFloat(i.element.css("left"))};s&&s.length&&y(s[0]).css({width:t.width,height:t.height}),i._updateCache(t),i._propagate("resize",e)}})}}),y.ui.plugin.add("resizable","containment",{start:function(){var i,s,n=y(this).resizable("instance"),t=n.options,e=n.element,o=t.containment,h=o instanceof y?o.get(0):/parent/.test(o)?e.parent().get(0):o;h&&(n.containerElement=y(h),/document/.test(o)||o===document?(n.containerOffset={left:0,top:0},n.containerPosition={left:0,top:0},n.parentData={element:y(document),left:0,top:0,width:y(document).width(),height:y(document).height()||document.body.parentNode.scrollHeight}):(i=y(h),s=[],y(["Top","Right","Left","Bottom"]).each(function(t,e){s[t]=n._num(i.css("padding"+e))}),n.containerOffset=i.offset(),n.containerPosition=i.position(),n.containerSize={height:i.innerHeight()-s[3],width:i.innerWidth()-s[1]},t=n.containerOffset,e=n.containerSize.height,o=n.containerSize.width,o=n._hasScroll(h,"left")?h.scrollWidth:o,e=n._hasScroll(h)?h.scrollHeight:e,n.parentData={element:h,left:t.left,top:t.top,width:o,height:e}))},resize:function(t){var e=y(this).resizable("instance"),i=e.options,s=e.containerOffset,n=e.position,o=e._aspectRatio||t.shiftKey,h={top:0,left:0},a=e.containerElement,t=!0;a[0]!==document&&/static/.test(a.css("position"))&&(h=s),n.left<(e._helper?s.left:0)&&(e.size.width=e.size.width+(e._helper?e.position.left-s.left:e.position.left-h.left),o&&(e.size.height=e.size.width/e.aspectRatio,t=!1),e.position.left=i.helper?s.left:0),n.top<(e._helper?s.top:0)&&(e.size.height=e.size.height+(e._helper?e.position.top-s.top:e.position.top),o&&(e.size.width=e.size.height*e.aspectRatio,t=!1),e.position.top=e._helper?s.top:0),i=e.containerElement.get(0)===e.element.parent().get(0),n=/relative|absolute/.test(e.containerElement.css("position")),i&&n?(e.offset.left=e.parentData.left+e.position.left,e.offset.top=e.parentData.top+e.position.top):(e.offset.left=e.element.offset().left,e.offset.top=e.element.offset().top),n=Math.abs(e.sizeDiff.width+(e._helper?e.offset.left-h.left:e.offset.left-s.left)),s=Math.abs(e.sizeDiff.height+(e._helper?e.offset.top-h.top:e.offset.top-s.top)),n+e.size.width>=e.parentData.width&&(e.size.width=e.parentData.width-n,o&&(e.size.height=e.size.width/e.aspectRatio,t=!1)),s+e.size.height>=e.parentData.height&&(e.size.height=e.parentData.height-s,o&&(e.size.width=e.size.height*e.aspectRatio,t=!1)),t||(e.position.left=e.prevPosition.left,e.position.top=e.prevPosition.top,e.size.width=e.prevSize.width,e.size.height=e.prevSize.height)},stop:function(){var t=y(this).resizable("instance"),e=t.options,i=t.containerOffset,s=t.containerPosition,n=t.containerElement,o=y(t.helper),h=o.offset(),a=o.outerWidth()-t.sizeDiff.width,o=o.outerHeight()-t.sizeDiff.height;t._helper&&!e.animate&&/relative/.test(n.css("position"))&&y(this).css({left:h.left-s.left-i.left,width:a,height:o}),t._helper&&!e.animate&&/static/.test(n.css("position"))&&y(this).css({left:h.left-s.left-i.left,width:a,height:o})}}),y.ui.plugin.add("resizable","alsoResize",{start:function(){var t=y(this).resizable("instance").options;y(t.alsoResize).each(function(){var t=y(this);t.data("ui-resizable-alsoresize",{width:parseFloat(t.width()),height:parseFloat(t.height()),left:parseFloat(t.css("left")),top:parseFloat(t.css("top"))})})},resize:function(t,i){var e=y(this).resizable("instance"),s=e.options,n=e.originalSize,o=e.originalPosition,h={height:e.size.height-n.height||0,width:e.size.width-n.width||0,top:e.position.top-o.top||0,left:e.position.left-o.left||0};y(s.alsoResize).each(function(){var t=y(this),s=y(this).data("ui-resizable-alsoresize"),n={},e=t.parents(i.originalElement[0]).length?["width","height"]:["width","height","top","left"];y.each(e,function(t,e){var i=(s[e]||0)+(h[e]||0);i&&0<=i&&(n[e]=i||null)}),t.css(n)})},stop:function(){y(this).removeData("ui-resizable-alsoresize")}}),y.ui.plugin.add("resizable","ghost",{start:function(){var t=y(this).resizable("instance"),e=t.size;t.ghost=t.originalElement.clone(),t.ghost.css({opacity:.25,display:"block",position:"relative",height:e.height,width:e.width,margin:0,left:0,top:0}),t._addClass(t.ghost,"ui-resizable-ghost"),!1!==y.uiBackCompat&&"string"==typeof t.options.ghost&&t.ghost.addClass(this.options.ghost),t.ghost.appendTo(t.helper)},resize:function(){var t=y(this).resizable("instance");t.ghost&&t.ghost.css({position:"relative",height:t.size.height,width:t.size.width})},stop:function(){var t=y(this).resizable("instance");t.ghost&&t.helper&&t.helper.get(0).removeChild(t.ghost.get(0))}}),y.ui.plugin.add("resizable","grid",{resize:function(){var t,e=y(this).resizable("instance"),i=e.options,s=e.size,n=e.originalSize,o=e.originalPosition,h=e.axis,a="number"==typeof i.grid?[i.grid,i.grid]:i.grid,r=a[0]||1,l=a[1]||1,u=Math.round((s.width-n.width)/r)*r,p=Math.round((s.height-n.height)/l)*l,d=n.width+u,c=n.height+p,f=i.maxWidth&&i.maxWidthd,s=i.minHeight&&i.minHeight>c;i.grid=a,m&&(d+=r),s&&(c+=l),f&&(d-=r),g&&(c-=l),/^(se|s|e)$/.test(h)?(e.size.width=d,e.size.height=c):/^(ne)$/.test(h)?(e.size.width=d,e.size.height=c,e.position.top=o.top-p):/^(sw)$/.test(h)?(e.size.width=d,e.size.height=c,e.position.left=o.left-u):((c-l<=0||d-r<=0)&&(t=e._getPaddingPlusBorderDimensions(this)),0=f[g]?0:Math.min(f[g],n));!a&&1-1){targetElements.on(evt+EVENT_NAMESPACE,function elementToggle(event){$.powerTip.toggle(this,event)})}else{targetElements.on(evt+EVENT_NAMESPACE,function elementOpen(event){$.powerTip.show(this,event)})}});$.each(options.closeEvents,function(idx,evt){if($.inArray(evt,options.openEvents)<0){targetElements.on(evt+EVENT_NAMESPACE,function elementClose(event){$.powerTip.hide(this,!isMouseEvent(event))})}});targetElements.on("keydown"+EVENT_NAMESPACE,function elementKeyDown(event){if(event.keyCode===27){$.powerTip.hide(this,true)}})}return targetElements};$.fn.powerTip.defaults={fadeInTime:200,fadeOutTime:100,followMouse:false,popupId:"powerTip",popupClass:null,intentSensitivity:7,intentPollInterval:100,closeDelay:100,placement:"n",smartPlacement:false,offset:10,mouseOnToPopup:false,manual:false,openEvents:["mouseenter","focus"],closeEvents:["mouseleave","blur"]};$.fn.powerTip.smartPlacementLists={n:["n","ne","nw","s"],e:["e","ne","se","w","nw","sw","n","s","e"],s:["s","se","sw","n"],w:["w","nw","sw","e","ne","se","n","s","w"],nw:["nw","w","sw","n","s","se","nw"],ne:["ne","e","se","n","s","sw","ne"],sw:["sw","w","nw","s","n","ne","sw"],se:["se","e","ne","s","n","nw","se"],"nw-alt":["nw-alt","n","ne-alt","sw-alt","s","se-alt","w","e"],"ne-alt":["ne-alt","n","nw-alt","se-alt","s","sw-alt","e","w"],"sw-alt":["sw-alt","s","se-alt","nw-alt","n","ne-alt","w","e"],"se-alt":["se-alt","s","sw-alt","ne-alt","n","nw-alt","e","w"]};$.powerTip={show:function apiShowTip(element,event){if(isMouseEvent(event)){trackMouse(event);session.previousX=event.pageX;session.previousY=event.pageY;$(element).data(DATA_DISPLAYCONTROLLER).show()}else{$(element).first().data(DATA_DISPLAYCONTROLLER).show(true,true)}return element},reposition:function apiResetPosition(element){$(element).first().data(DATA_DISPLAYCONTROLLER).resetPosition();return element},hide:function apiCloseTip(element,immediate){var displayController;immediate=element?immediate:true;if(element){displayController=$(element).first().data(DATA_DISPLAYCONTROLLER)}else if(session.activeHover){displayController=session.activeHover.data(DATA_DISPLAYCONTROLLER)}if(displayController){displayController.hide(immediate)}return element},toggle:function apiToggle(element,event){if(session.activeHover&&session.activeHover.is(element)){$.powerTip.hide(element,!isMouseEvent(event))}else{$.powerTip.show(element,event)}return element}};$.powerTip.showTip=$.powerTip.show;$.powerTip.closeTip=$.powerTip.hide;function CSSCoordinates(){var me=this;me.top="auto";me.left="auto";me.right="auto";me.bottom="auto";me.set=function(property,value){if($.isNumeric(value)){me[property]=Math.round(value)}}}function DisplayController(element,options,tipController){var hoverTimer=null,myCloseDelay=null;function openTooltip(immediate,forceOpen){cancelTimer();if(!element.data(DATA_HASACTIVEHOVER)){if(!immediate){session.tipOpenImminent=true;hoverTimer=setTimeout(function intentDelay(){hoverTimer=null;checkForIntent()},options.intentPollInterval)}else{if(forceOpen){element.data(DATA_FORCEDOPEN,true)}closeAnyDelayed();tipController.showTip(element)}}else{cancelClose()}}function closeTooltip(disableDelay){if(myCloseDelay){myCloseDelay=session.closeDelayTimeout=clearTimeout(myCloseDelay);session.delayInProgress=false}cancelTimer();session.tipOpenImminent=false;if(element.data(DATA_HASACTIVEHOVER)){element.data(DATA_FORCEDOPEN,false);if(!disableDelay){session.delayInProgress=true;session.closeDelayTimeout=setTimeout(function closeDelay(){session.closeDelayTimeout=null;tipController.hideTip(element);session.delayInProgress=false;myCloseDelay=null},options.closeDelay);myCloseDelay=session.closeDelayTimeout}else{tipController.hideTip(element)}}}function checkForIntent(){var xDifference=Math.abs(session.previousX-session.currentX),yDifference=Math.abs(session.previousY-session.currentY),totalDifference=xDifference+yDifference;if(totalDifference",{id:options.popupId});if($body.length===0){$body=$("body")}$body.append(tipElement);session.tooltips=session.tooltips?session.tooltips.add(tipElement):tipElement}if(options.followMouse){if(!tipElement.data(DATA_HASMOUSEMOVE)){$document.on("mousemove"+EVENT_NAMESPACE,positionTipOnCursor);$window.on("scroll"+EVENT_NAMESPACE,positionTipOnCursor);tipElement.data(DATA_HASMOUSEMOVE,true)}}function beginShowTip(element){element.data(DATA_HASACTIVEHOVER,true);tipElement.queue(function queueTipInit(next){showTip(element);next()})}function showTip(element){var tipContent;if(!element.data(DATA_HASACTIVEHOVER)){return}if(session.isTipOpen){if(!session.isClosing){hideTip(session.activeHover)}tipElement.delay(100).queue(function queueTipAgain(next){showTip(element);next()});return}element.trigger("powerTipPreRender");tipContent=getTooltipContent(element);if(tipContent){tipElement.empty().append(tipContent)}else{return}element.trigger("powerTipRender");session.activeHover=element;session.isTipOpen=true;tipElement.data(DATA_MOUSEONTOTIP,options.mouseOnToPopup);tipElement.addClass(options.popupClass);if(!options.followMouse||element.data(DATA_FORCEDOPEN)){positionTipOnElement(element);session.isFixedTipOpen=true}else{positionTipOnCursor()}if(!element.data(DATA_FORCEDOPEN)&&!options.followMouse){$document.on("click"+EVENT_NAMESPACE,function documentClick(event){var target=event.target;if(target!==element[0]){if(options.mouseOnToPopup){if(target!==tipElement[0]&&!$.contains(tipElement[0],target)){$.powerTip.hide()}}else{$.powerTip.hide()}}})}if(options.mouseOnToPopup&&!options.manual){tipElement.on("mouseenter"+EVENT_NAMESPACE,function tipMouseEnter(){if(session.activeHover){session.activeHover.data(DATA_DISPLAYCONTROLLER).cancel()}});tipElement.on("mouseleave"+EVENT_NAMESPACE,function tipMouseLeave(){if(session.activeHover){session.activeHover.data(DATA_DISPLAYCONTROLLER).hide()}})}tipElement.fadeIn(options.fadeInTime,function fadeInCallback(){if(!session.desyncTimeout){session.desyncTimeout=setInterval(closeDesyncedTip,500)}element.trigger("powerTipOpen")})}function hideTip(element){session.isClosing=true;session.isTipOpen=false;session.desyncTimeout=clearInterval(session.desyncTimeout);element.data(DATA_HASACTIVEHOVER,false);element.data(DATA_FORCEDOPEN,false);$document.off("click"+EVENT_NAMESPACE);tipElement.off(EVENT_NAMESPACE);tipElement.fadeOut(options.fadeOutTime,function fadeOutCallback(){var coords=new CSSCoordinates;session.activeHover=null;session.isClosing=false;session.isFixedTipOpen=false;tipElement.removeClass();coords.set("top",session.currentY+options.offset);coords.set("left",session.currentX+options.offset);tipElement.css(coords);element.trigger("powerTipClose")})}function positionTipOnCursor(){var tipWidth,tipHeight,coords,collisions,collisionCount;if(!session.isFixedTipOpen&&(session.isTipOpen||session.tipOpenImminent&&tipElement.data(DATA_HASMOUSEMOVE))){tipWidth=tipElement.outerWidth();tipHeight=tipElement.outerHeight();coords=new CSSCoordinates;coords.set("top",session.currentY+options.offset);coords.set("left",session.currentX+options.offset);collisions=getViewportCollisions(coords,tipWidth,tipHeight);if(collisions!==Collision.none){collisionCount=countFlags(collisions);if(collisionCount===1){if(collisions===Collision.right){coords.set("left",session.scrollLeft+session.windowWidth-tipWidth)}else if(collisions===Collision.bottom){coords.set("top",session.scrollTop+session.windowHeight-tipHeight)}}else{coords.set("left",session.currentX-tipWidth-options.offset);coords.set("top",session.currentY-tipHeight-options.offset)}}tipElement.css(coords)}}function positionTipOnElement(element){var priorityList,finalPlacement;if(options.smartPlacement||options.followMouse&&element.data(DATA_FORCEDOPEN)){priorityList=$.fn.powerTip.smartPlacementLists[options.placement];$.each(priorityList,function(idx,pos){var collisions=getViewportCollisions(placeTooltip(element,pos),tipElement.outerWidth(),tipElement.outerHeight());finalPlacement=pos;return collisions!==Collision.none})}else{placeTooltip(element,options.placement);finalPlacement=options.placement}tipElement.removeClass("w nw sw e ne se n s w se-alt sw-alt ne-alt nw-alt");tipElement.addClass(finalPlacement)}function placeTooltip(element,placement){var iterationCount=0,tipWidth,tipHeight,coords=new CSSCoordinates;coords.set("top",0);coords.set("left",0);tipElement.css(coords);do{tipWidth=tipElement.outerWidth();tipHeight=tipElement.outerHeight();coords=placementCalculator.compute(element,placement,tipWidth,tipHeight,options.offset);tipElement.css(coords)}while(++iterationCount<=5&&(tipWidth!==tipElement.outerWidth()||tipHeight!==tipElement.outerHeight()));return coords}function closeDesyncedTip(){var isDesynced=false,hasDesyncableCloseEvent=$.grep(["mouseleave","mouseout","blur","focusout"],function(eventType){return $.inArray(eventType,options.closeEvents)!==-1}).length>0;if(session.isTipOpen&&!session.isClosing&&!session.delayInProgress&&hasDesyncableCloseEvent){if(session.activeHover.data(DATA_HASACTIVEHOVER)===false||session.activeHover.is(":disabled")){isDesynced=true}else if(!isMouseOver(session.activeHover)&&!session.activeHover.is(":focus")&&!session.activeHover.data(DATA_FORCEDOPEN)){if(tipElement.data(DATA_MOUSEONTOTIP)){if(!isMouseOver(tipElement)){isDesynced=true}}else{isDesynced=true}}if(isDesynced){hideTip(session.activeHover)}}}this.showTip=beginShowTip;this.hideTip=hideTip;this.resetPosition=positionTipOnElement}function isSvgElement(element){return Boolean(window.SVGElement&&element[0]instanceof SVGElement)}function isMouseEvent(event){return Boolean(event&&$.inArray(event.type,MOUSE_EVENTS)>-1&&typeof event.pageX==="number")}function initTracking(){if(!session.mouseTrackingActive){session.mouseTrackingActive=true;getViewportDimensions();$(getViewportDimensions);$document.on("mousemove"+EVENT_NAMESPACE,trackMouse);$window.on("resize"+EVENT_NAMESPACE,trackResize);$window.on("scroll"+EVENT_NAMESPACE,trackScroll)}}function getViewportDimensions(){session.scrollLeft=$window.scrollLeft();session.scrollTop=$window.scrollTop();session.windowWidth=$window.width();session.windowHeight=$window.height()}function trackResize(){session.windowWidth=$window.width();session.windowHeight=$window.height()}function trackScroll(){var x=$window.scrollLeft(),y=$window.scrollTop();if(x!==session.scrollLeft){session.currentX+=x-session.scrollLeft;session.scrollLeft=x}if(y!==session.scrollTop){session.currentY+=y-session.scrollTop;session.scrollTop=y}}function trackMouse(event){session.currentX=event.pageX;session.currentY=event.pageY}function isMouseOver(element){var elementPosition=element.offset(),elementBox=element[0].getBoundingClientRect(),elementWidth=elementBox.right-elementBox.left,elementHeight=elementBox.bottom-elementBox.top;return session.currentX>=elementPosition.left&&session.currentX<=elementPosition.left+elementWidth&&session.currentY>=elementPosition.top&&session.currentY<=elementPosition.top+elementHeight}function getTooltipContent(element){var tipText=element.data(DATA_POWERTIP),tipObject=element.data(DATA_POWERTIPJQ),tipTarget=element.data(DATA_POWERTIPTARGET),targetElement,content;if(tipText){if($.isFunction(tipText)){tipText=tipText.call(element[0])}content=tipText}else if(tipObject){if($.isFunction(tipObject)){tipObject=tipObject.call(element[0])}if(tipObject.length>0){content=tipObject.clone(true,true)}}else if(tipTarget){targetElement=$("#"+tipTarget);if(targetElement.length>0){content=targetElement.html()}}return content}function getViewportCollisions(coords,elementWidth,elementHeight){var viewportTop=session.scrollTop,viewportLeft=session.scrollLeft,viewportBottom=viewportTop+session.windowHeight,viewportRight=viewportLeft+session.windowWidth,collisions=Collision.none;if(coords.topviewportBottom||Math.abs(coords.bottom-session.windowHeight)>viewportBottom){collisions|=Collision.bottom}if(coords.leftviewportRight){collisions|=Collision.left}if(coords.left+elementWidth>viewportRight||coords.right1)){a.preventDefault();var c=a.originalEvent.changedTouches[0],d=document.createEvent("MouseEvents");d.initMouseEvent(b,!0,!0,window,1,c.screenX,c.screenY,c.clientX,c.clientY,!1,!1,!1,!1,0,null),a.target.dispatchEvent(d)}}if(a.support.touch="ontouchend"in document,a.support.touch){var e,b=a.ui.mouse.prototype,c=b._mouseInit,d=b._mouseDestroy;b._touchStart=function(a){var b=this;!e&&b._mouseCapture(a.originalEvent.changedTouches[0])&&(e=!0,b._touchMoved=!1,f(a,"mouseover"),f(a,"mousemove"),f(a,"mousedown"))},b._touchMove=function(a){e&&(this._touchMoved=!0,f(a,"mousemove"))},b._touchEnd=function(a){e&&(f(a,"mouseup"),f(a,"mouseout"),this._touchMoved||f(a,"click"),e=!1)},b._mouseInit=function(){var b=this;b.element.bind({touchstart:a.proxy(b,"_touchStart"),touchmove:a.proxy(b,"_touchMove"),touchend:a.proxy(b,"_touchEnd")}),c.call(b)},b._mouseDestroy=function(){var b=this;b.element.unbind({touchstart:a.proxy(b,"_touchStart"),touchmove:a.proxy(b,"_touchMove"),touchend:a.proxy(b,"_touchEnd")}),d.call(b)}}}(jQuery);/*! SmartMenus jQuery Plugin - v1.1.0 - September 17, 2017 + * http://www.smartmenus.org/ + * Copyright Vasil Dinkov, Vadikom Web Ltd. http://vadikom.com; Licensed MIT */(function(t){"function"==typeof define&&define.amd?define(["jquery"],t):"object"==typeof module&&"object"==typeof module.exports?module.exports=t(require("jquery")):t(jQuery)})(function($){function initMouseDetection(t){var e=".smartmenus_mouse";if(mouseDetectionEnabled||t)mouseDetectionEnabled&&t&&($(document).off(e),mouseDetectionEnabled=!1);else{var i=!0,s=null,o={mousemove:function(t){var e={x:t.pageX,y:t.pageY,timeStamp:(new Date).getTime()};if(s){var o=Math.abs(s.x-e.x),a=Math.abs(s.y-e.y);if((o>0||a>0)&&2>=o&&2>=a&&300>=e.timeStamp-s.timeStamp&&(mouse=!0,i)){var n=$(t.target).closest("a");n.is("a")&&$.each(menuTrees,function(){return $.contains(this.$root[0],n[0])?(this.itemEnter({currentTarget:n[0]}),!1):void 0}),i=!1}}s=e}};o[touchEvents?"touchstart":"pointerover pointermove pointerout MSPointerOver MSPointerMove MSPointerOut"]=function(t){isTouchEvent(t.originalEvent)&&(mouse=!1)},$(document).on(getEventsNS(o,e)),mouseDetectionEnabled=!0}}function isTouchEvent(t){return!/^(4|mouse)$/.test(t.pointerType)}function getEventsNS(t,e){e||(e="");var i={};for(var s in t)i[s.split(" ").join(e+" ")+e]=t[s];return i}var menuTrees=[],mouse=!1,touchEvents="ontouchstart"in window,mouseDetectionEnabled=!1,requestAnimationFrame=window.requestAnimationFrame||function(t){return setTimeout(t,1e3/60)},cancelAnimationFrame=window.cancelAnimationFrame||function(t){clearTimeout(t)},canAnimate=!!$.fn.animate;return $.SmartMenus=function(t,e){this.$root=$(t),this.opts=e,this.rootId="",this.accessIdPrefix="",this.$subArrow=null,this.activatedItems=[],this.visibleSubMenus=[],this.showTimeout=0,this.hideTimeout=0,this.scrollTimeout=0,this.clickActivated=!1,this.focusActivated=!1,this.zIndexInc=0,this.idInc=0,this.$firstLink=null,this.$firstSub=null,this.disabled=!1,this.$disableOverlay=null,this.$touchScrollingSub=null,this.cssTransforms3d="perspective"in t.style||"webkitPerspective"in t.style,this.wasCollapsible=!1,this.init()},$.extend($.SmartMenus,{hideAll:function(){$.each(menuTrees,function(){this.menuHideAll()})},destroy:function(){for(;menuTrees.length;)menuTrees[0].destroy();initMouseDetection(!0)},prototype:{init:function(t){var e=this;if(!t){menuTrees.push(this),this.rootId=((new Date).getTime()+Math.random()+"").replace(/\D/g,""),this.accessIdPrefix="sm-"+this.rootId+"-",this.$root.hasClass("sm-rtl")&&(this.opts.rightToLeftSubMenus=!0);var i=".smartmenus";this.$root.data("smartmenus",this).attr("data-smartmenus-id",this.rootId).dataSM("level",1).on(getEventsNS({"mouseover focusin":$.proxy(this.rootOver,this),"mouseout focusout":$.proxy(this.rootOut,this),keydown:$.proxy(this.rootKeyDown,this)},i)).on(getEventsNS({mouseenter:$.proxy(this.itemEnter,this),mouseleave:$.proxy(this.itemLeave,this),mousedown:$.proxy(this.itemDown,this),focus:$.proxy(this.itemFocus,this),blur:$.proxy(this.itemBlur,this),click:$.proxy(this.itemClick,this)},i),"a"),i+=this.rootId,this.opts.hideOnClick&&$(document).on(getEventsNS({touchstart:$.proxy(this.docTouchStart,this),touchmove:$.proxy(this.docTouchMove,this),touchend:$.proxy(this.docTouchEnd,this),click:$.proxy(this.docClick,this)},i)),$(window).on(getEventsNS({"resize orientationchange":$.proxy(this.winResize,this)},i)),this.opts.subIndicators&&(this.$subArrow=$("").addClass("sub-arrow"),this.opts.subIndicatorsText&&this.$subArrow.html(this.opts.subIndicatorsText)),initMouseDetection()}if(this.$firstSub=this.$root.find("ul").each(function(){e.menuInit($(this))}).eq(0),this.$firstLink=this.$root.find("a").eq(0),this.opts.markCurrentItem){var s=/(index|default)\.[^#\?\/]*/i,o=/#.*/,a=window.location.href.replace(s,""),n=a.replace(o,"");this.$root.find("a").each(function(){var t=this.href.replace(s,""),i=$(this);(t==a||t==n)&&(i.addClass("current"),e.opts.markCurrentTree&&i.parentsUntil("[data-smartmenus-id]","ul").each(function(){$(this).dataSM("parent-a").addClass("current")}))})}this.wasCollapsible=this.isCollapsible()},destroy:function(t){if(!t){var e=".smartmenus";this.$root.removeData("smartmenus").removeAttr("data-smartmenus-id").removeDataSM("level").off(e),e+=this.rootId,$(document).off(e),$(window).off(e),this.opts.subIndicators&&(this.$subArrow=null)}this.menuHideAll();var i=this;this.$root.find("ul").each(function(){var t=$(this);t.dataSM("scroll-arrows")&&t.dataSM("scroll-arrows").remove(),t.dataSM("shown-before")&&((i.opts.subMenusMinWidth||i.opts.subMenusMaxWidth)&&t.css({width:"",minWidth:"",maxWidth:""}).removeClass("sm-nowrap"),t.dataSM("scroll-arrows")&&t.dataSM("scroll-arrows").remove(),t.css({zIndex:"",top:"",left:"",marginLeft:"",marginTop:"",display:""})),0==(t.attr("id")||"").indexOf(i.accessIdPrefix)&&t.removeAttr("id")}).removeDataSM("in-mega").removeDataSM("shown-before").removeDataSM("scroll-arrows").removeDataSM("parent-a").removeDataSM("level").removeDataSM("beforefirstshowfired").removeAttr("role").removeAttr("aria-hidden").removeAttr("aria-labelledby").removeAttr("aria-expanded"),this.$root.find("a.has-submenu").each(function(){var t=$(this);0==t.attr("id").indexOf(i.accessIdPrefix)&&t.removeAttr("id")}).removeClass("has-submenu").removeDataSM("sub").removeAttr("aria-haspopup").removeAttr("aria-controls").removeAttr("aria-expanded").closest("li").removeDataSM("sub"),this.opts.subIndicators&&this.$root.find("span.sub-arrow").remove(),this.opts.markCurrentItem&&this.$root.find("a.current").removeClass("current"),t||(this.$root=null,this.$firstLink=null,this.$firstSub=null,this.$disableOverlay&&(this.$disableOverlay.remove(),this.$disableOverlay=null),menuTrees.splice($.inArray(this,menuTrees),1))},disable:function(t){if(!this.disabled){if(this.menuHideAll(),!t&&!this.opts.isPopup&&this.$root.is(":visible")){var e=this.$root.offset();this.$disableOverlay=$('
    ').css({position:"absolute",top:e.top,left:e.left,width:this.$root.outerWidth(),height:this.$root.outerHeight(),zIndex:this.getStartZIndex(!0),opacity:0}).appendTo(document.body)}this.disabled=!0}},docClick:function(t){return this.$touchScrollingSub?(this.$touchScrollingSub=null,void 0):((this.visibleSubMenus.length&&!$.contains(this.$root[0],t.target)||$(t.target).closest("a").length)&&this.menuHideAll(),void 0)},docTouchEnd:function(){if(this.lastTouch){if(!(!this.visibleSubMenus.length||void 0!==this.lastTouch.x2&&this.lastTouch.x1!=this.lastTouch.x2||void 0!==this.lastTouch.y2&&this.lastTouch.y1!=this.lastTouch.y2||this.lastTouch.target&&$.contains(this.$root[0],this.lastTouch.target))){this.hideTimeout&&(clearTimeout(this.hideTimeout),this.hideTimeout=0);var t=this;this.hideTimeout=setTimeout(function(){t.menuHideAll()},350)}this.lastTouch=null}},docTouchMove:function(t){if(this.lastTouch){var e=t.originalEvent.touches[0];this.lastTouch.x2=e.pageX,this.lastTouch.y2=e.pageY}},docTouchStart:function(t){var e=t.originalEvent.touches[0];this.lastTouch={x1:e.pageX,y1:e.pageY,target:e.target}},enable:function(){this.disabled&&(this.$disableOverlay&&(this.$disableOverlay.remove(),this.$disableOverlay=null),this.disabled=!1)},getClosestMenu:function(t){for(var e=$(t).closest("ul");e.dataSM("in-mega");)e=e.parent().closest("ul");return e[0]||null},getHeight:function(t){return this.getOffset(t,!0)},getOffset:function(t,e){var i;"none"==t.css("display")&&(i={position:t[0].style.position,visibility:t[0].style.visibility},t.css({position:"absolute",visibility:"hidden"}).show());var s=t[0].getBoundingClientRect&&t[0].getBoundingClientRect(),o=s&&(e?s.height||s.bottom-s.top:s.width||s.right-s.left);return o||0===o||(o=e?t[0].offsetHeight:t[0].offsetWidth),i&&t.hide().css(i),o},getStartZIndex:function(t){var e=parseInt(this[t?"$root":"$firstSub"].css("z-index"));return!t&&isNaN(e)&&(e=parseInt(this.$root.css("z-index"))),isNaN(e)?1:e},getTouchPoint:function(t){return t.touches&&t.touches[0]||t.changedTouches&&t.changedTouches[0]||t},getViewport:function(t){var e=t?"Height":"Width",i=document.documentElement["client"+e],s=window["inner"+e];return s&&(i=Math.min(i,s)),i},getViewportHeight:function(){return this.getViewport(!0)},getViewportWidth:function(){return this.getViewport()},getWidth:function(t){return this.getOffset(t)},handleEvents:function(){return!this.disabled&&this.isCSSOn()},handleItemEvents:function(t){return this.handleEvents()&&!this.isLinkInMegaMenu(t)},isCollapsible:function(){return"static"==this.$firstSub.css("position")},isCSSOn:function(){return"inline"!=this.$firstLink.css("display")},isFixed:function(){var t="fixed"==this.$root.css("position");return t||this.$root.parentsUntil("body").each(function(){return"fixed"==$(this).css("position")?(t=!0,!1):void 0}),t},isLinkInMegaMenu:function(t){return $(this.getClosestMenu(t[0])).hasClass("mega-menu")},isTouchMode:function(){return!mouse||this.opts.noMouseOver||this.isCollapsible()},itemActivate:function(t,e){var i=t.closest("ul"),s=i.dataSM("level");if(s>1&&(!this.activatedItems[s-2]||this.activatedItems[s-2][0]!=i.dataSM("parent-a")[0])){var o=this;$(i.parentsUntil("[data-smartmenus-id]","ul").get().reverse()).add(i).each(function(){o.itemActivate($(this).dataSM("parent-a"))})}if((!this.isCollapsible()||e)&&this.menuHideSubMenus(this.activatedItems[s-1]&&this.activatedItems[s-1][0]==t[0]?s:s-1),this.activatedItems[s-1]=t,this.$root.triggerHandler("activate.smapi",t[0])!==!1){var a=t.dataSM("sub");a&&(this.isTouchMode()||!this.opts.showOnClick||this.clickActivated)&&this.menuShow(a)}},itemBlur:function(t){var e=$(t.currentTarget);this.handleItemEvents(e)&&this.$root.triggerHandler("blur.smapi",e[0])},itemClick:function(t){var e=$(t.currentTarget);if(this.handleItemEvents(e)){if(this.$touchScrollingSub&&this.$touchScrollingSub[0]==e.closest("ul")[0])return this.$touchScrollingSub=null,t.stopPropagation(),!1;if(this.$root.triggerHandler("click.smapi",e[0])===!1)return!1;var i=$(t.target).is(".sub-arrow"),s=e.dataSM("sub"),o=s?2==s.dataSM("level"):!1,a=this.isCollapsible(),n=/toggle$/.test(this.opts.collapsibleBehavior),r=/link$/.test(this.opts.collapsibleBehavior),h=/^accordion/.test(this.opts.collapsibleBehavior);if(s&&!s.is(":visible")){if((!r||!a||i)&&(this.opts.showOnClick&&o&&(this.clickActivated=!0),this.itemActivate(e,h),s.is(":visible")))return this.focusActivated=!0,!1}else if(a&&(n||i))return this.itemActivate(e,h),this.menuHide(s),n&&(this.focusActivated=!1),!1;return this.opts.showOnClick&&o||e.hasClass("disabled")||this.$root.triggerHandler("select.smapi",e[0])===!1?!1:void 0}},itemDown:function(t){var e=$(t.currentTarget);this.handleItemEvents(e)&&e.dataSM("mousedown",!0)},itemEnter:function(t){var e=$(t.currentTarget);if(this.handleItemEvents(e)){if(!this.isTouchMode()){this.showTimeout&&(clearTimeout(this.showTimeout),this.showTimeout=0);var i=this;this.showTimeout=setTimeout(function(){i.itemActivate(e)},this.opts.showOnClick&&1==e.closest("ul").dataSM("level")?1:this.opts.showTimeout)}this.$root.triggerHandler("mouseenter.smapi",e[0])}},itemFocus:function(t){var e=$(t.currentTarget);this.handleItemEvents(e)&&(!this.focusActivated||this.isTouchMode()&&e.dataSM("mousedown")||this.activatedItems.length&&this.activatedItems[this.activatedItems.length-1][0]==e[0]||this.itemActivate(e,!0),this.$root.triggerHandler("focus.smapi",e[0]))},itemLeave:function(t){var e=$(t.currentTarget);this.handleItemEvents(e)&&(this.isTouchMode()||(e[0].blur(),this.showTimeout&&(clearTimeout(this.showTimeout),this.showTimeout=0)),e.removeDataSM("mousedown"),this.$root.triggerHandler("mouseleave.smapi",e[0]))},menuHide:function(t){if(this.$root.triggerHandler("beforehide.smapi",t[0])!==!1&&(canAnimate&&t.stop(!0,!0),"none"!=t.css("display"))){var e=function(){t.css("z-index","")};this.isCollapsible()?canAnimate&&this.opts.collapsibleHideFunction?this.opts.collapsibleHideFunction.call(this,t,e):t.hide(this.opts.collapsibleHideDuration,e):canAnimate&&this.opts.hideFunction?this.opts.hideFunction.call(this,t,e):t.hide(this.opts.hideDuration,e),t.dataSM("scroll")&&(this.menuScrollStop(t),t.css({"touch-action":"","-ms-touch-action":"","-webkit-transform":"",transform:""}).off(".smartmenus_scroll").removeDataSM("scroll").dataSM("scroll-arrows").hide()),t.dataSM("parent-a").removeClass("highlighted").attr("aria-expanded","false"),t.attr({"aria-expanded":"false","aria-hidden":"true"});var i=t.dataSM("level");this.activatedItems.splice(i-1,1),this.visibleSubMenus.splice($.inArray(t,this.visibleSubMenus),1),this.$root.triggerHandler("hide.smapi",t[0])}},menuHideAll:function(){this.showTimeout&&(clearTimeout(this.showTimeout),this.showTimeout=0);for(var t=this.opts.isPopup?1:0,e=this.visibleSubMenus.length-1;e>=t;e--)this.menuHide(this.visibleSubMenus[e]);this.opts.isPopup&&(canAnimate&&this.$root.stop(!0,!0),this.$root.is(":visible")&&(canAnimate&&this.opts.hideFunction?this.opts.hideFunction.call(this,this.$root):this.$root.hide(this.opts.hideDuration))),this.activatedItems=[],this.visibleSubMenus=[],this.clickActivated=!1,this.focusActivated=!1,this.zIndexInc=0,this.$root.triggerHandler("hideAll.smapi")},menuHideSubMenus:function(t){for(var e=this.activatedItems.length-1;e>=t;e--){var i=this.activatedItems[e].dataSM("sub");i&&this.menuHide(i)}},menuInit:function(t){if(!t.dataSM("in-mega")){t.hasClass("mega-menu")&&t.find("ul").dataSM("in-mega",!0);for(var e=2,i=t[0];(i=i.parentNode.parentNode)!=this.$root[0];)e++;var s=t.prevAll("a").eq(-1);s.length||(s=t.prevAll().find("a").eq(-1)),s.addClass("has-submenu").dataSM("sub",t),t.dataSM("parent-a",s).dataSM("level",e).parent().dataSM("sub",t);var o=s.attr("id")||this.accessIdPrefix+ ++this.idInc,a=t.attr("id")||this.accessIdPrefix+ ++this.idInc;s.attr({id:o,"aria-haspopup":"true","aria-controls":a,"aria-expanded":"false"}),t.attr({id:a,role:"group","aria-hidden":"true","aria-labelledby":o,"aria-expanded":"false"}),this.opts.subIndicators&&s[this.opts.subIndicatorsPos](this.$subArrow.clone())}},menuPosition:function(t){var e,i,s=t.dataSM("parent-a"),o=s.closest("li"),a=o.parent(),n=t.dataSM("level"),r=this.getWidth(t),h=this.getHeight(t),u=s.offset(),l=u.left,c=u.top,d=this.getWidth(s),m=this.getHeight(s),p=$(window),f=p.scrollLeft(),v=p.scrollTop(),b=this.getViewportWidth(),S=this.getViewportHeight(),g=a.parent().is("[data-sm-horizontal-sub]")||2==n&&!a.hasClass("sm-vertical"),M=this.opts.rightToLeftSubMenus&&!o.is("[data-sm-reverse]")||!this.opts.rightToLeftSubMenus&&o.is("[data-sm-reverse]"),w=2==n?this.opts.mainMenuSubOffsetX:this.opts.subMenusSubOffsetX,T=2==n?this.opts.mainMenuSubOffsetY:this.opts.subMenusSubOffsetY;if(g?(e=M?d-r-w:w,i=this.opts.bottomToTopSubMenus?-h-T:m+T):(e=M?w-r:d-w,i=this.opts.bottomToTopSubMenus?m-T-h:T),this.opts.keepInViewport){var y=l+e,I=c+i;if(M&&f>y?e=g?f-y+e:d-w:!M&&y+r>f+b&&(e=g?f+b-r-y+e:w-r),g||(S>h&&I+h>v+S?i+=v+S-h-I:(h>=S||v>I)&&(i+=v-I)),g&&(I+h>v+S+.49||v>I)||!g&&h>S+.49){var x=this;t.dataSM("scroll-arrows")||t.dataSM("scroll-arrows",$([$('')[0],$('')[0]]).on({mouseenter:function(){t.dataSM("scroll").up=$(this).hasClass("scroll-up"),x.menuScroll(t)},mouseleave:function(e){x.menuScrollStop(t),x.menuScrollOut(t,e)},"mousewheel DOMMouseScroll":function(t){t.preventDefault()}}).insertAfter(t));var A=".smartmenus_scroll";if(t.dataSM("scroll",{y:this.cssTransforms3d?0:i-m,step:1,itemH:m,subH:h,arrowDownH:this.getHeight(t.dataSM("scroll-arrows").eq(1))}).on(getEventsNS({mouseover:function(e){x.menuScrollOver(t,e)},mouseout:function(e){x.menuScrollOut(t,e)},"mousewheel DOMMouseScroll":function(e){x.menuScrollMousewheel(t,e)}},A)).dataSM("scroll-arrows").css({top:"auto",left:"0",marginLeft:e+(parseInt(t.css("border-left-width"))||0),width:r-(parseInt(t.css("border-left-width"))||0)-(parseInt(t.css("border-right-width"))||0),zIndex:t.css("z-index")}).eq(g&&this.opts.bottomToTopSubMenus?0:1).show(),this.isFixed()){var C={};C[touchEvents?"touchstart touchmove touchend":"pointerdown pointermove pointerup MSPointerDown MSPointerMove MSPointerUp"]=function(e){x.menuScrollTouch(t,e)},t.css({"touch-action":"none","-ms-touch-action":"none"}).on(getEventsNS(C,A))}}}t.css({top:"auto",left:"0",marginLeft:e,marginTop:i-m})},menuScroll:function(t,e,i){var s,o=t.dataSM("scroll"),a=t.dataSM("scroll-arrows"),n=o.up?o.upEnd:o.downEnd;if(!e&&o.momentum){if(o.momentum*=.92,s=o.momentum,.5>s)return this.menuScrollStop(t),void 0}else s=i||(e||!this.opts.scrollAccelerate?this.opts.scrollStep:Math.floor(o.step));var r=t.dataSM("level");if(this.activatedItems[r-1]&&this.activatedItems[r-1].dataSM("sub")&&this.activatedItems[r-1].dataSM("sub").is(":visible")&&this.menuHideSubMenus(r-1),o.y=o.up&&o.y>=n||!o.up&&n>=o.y?o.y:Math.abs(n-o.y)>s?o.y+(o.up?s:-s):n,t.css(this.cssTransforms3d?{"-webkit-transform":"translate3d(0, "+o.y+"px, 0)",transform:"translate3d(0, "+o.y+"px, 0)"}:{marginTop:o.y}),mouse&&(o.up&&o.y>o.downEnd||!o.up&&o.y0;t.dataSM("scroll-arrows").eq(i?0:1).is(":visible")&&(t.dataSM("scroll").up=i,this.menuScroll(t,!0))}e.preventDefault()},menuScrollOut:function(t,e){mouse&&(/^scroll-(up|down)/.test((e.relatedTarget||"").className)||(t[0]==e.relatedTarget||$.contains(t[0],e.relatedTarget))&&this.getClosestMenu(e.relatedTarget)==t[0]||t.dataSM("scroll-arrows").css("visibility","hidden"))},menuScrollOver:function(t,e){if(mouse&&!/^scroll-(up|down)/.test(e.target.className)&&this.getClosestMenu(e.target)==t[0]){this.menuScrollRefreshData(t);var i=t.dataSM("scroll"),s=$(window).scrollTop()-t.dataSM("parent-a").offset().top-i.itemH;t.dataSM("scroll-arrows").eq(0).css("margin-top",s).end().eq(1).css("margin-top",s+this.getViewportHeight()-i.arrowDownH).end().css("visibility","visible")}},menuScrollRefreshData:function(t){var e=t.dataSM("scroll"),i=$(window).scrollTop()-t.dataSM("parent-a").offset().top-e.itemH;this.cssTransforms3d&&(i=-(parseFloat(t.css("margin-top"))-i)),$.extend(e,{upEnd:i,downEnd:i+this.getViewportHeight()-e.subH})},menuScrollStop:function(t){return this.scrollTimeout?(cancelAnimationFrame(this.scrollTimeout),this.scrollTimeout=0,t.dataSM("scroll").step=1,!0):void 0},menuScrollTouch:function(t,e){if(e=e.originalEvent,isTouchEvent(e)){var i=this.getTouchPoint(e);if(this.getClosestMenu(i.target)==t[0]){var s=t.dataSM("scroll");if(/(start|down)$/i.test(e.type))this.menuScrollStop(t)?(e.preventDefault(),this.$touchScrollingSub=t):this.$touchScrollingSub=null,this.menuScrollRefreshData(t),$.extend(s,{touchStartY:i.pageY,touchStartTime:e.timeStamp});else if(/move$/i.test(e.type)){var o=void 0!==s.touchY?s.touchY:s.touchStartY;if(void 0!==o&&o!=i.pageY){this.$touchScrollingSub=t;var a=i.pageY>o;void 0!==s.up&&s.up!=a&&$.extend(s,{touchStartY:i.pageY,touchStartTime:e.timeStamp}),$.extend(s,{up:a,touchY:i.pageY}),this.menuScroll(t,!0,Math.abs(i.pageY-o))}e.preventDefault()}else void 0!==s.touchY&&((s.momentum=15*Math.pow(Math.abs(i.pageY-s.touchStartY)/(e.timeStamp-s.touchStartTime),2))&&(this.menuScrollStop(t),this.menuScroll(t),e.preventDefault()),delete s.touchY)}}},menuShow:function(t){if((t.dataSM("beforefirstshowfired")||(t.dataSM("beforefirstshowfired",!0),this.$root.triggerHandler("beforefirstshow.smapi",t[0])!==!1))&&this.$root.triggerHandler("beforeshow.smapi",t[0])!==!1&&(t.dataSM("shown-before",!0),canAnimate&&t.stop(!0,!0),!t.is(":visible"))){var e=t.dataSM("parent-a"),i=this.isCollapsible();if((this.opts.keepHighlighted||i)&&e.addClass("highlighted"),i)t.removeClass("sm-nowrap").css({zIndex:"",width:"auto",minWidth:"",maxWidth:"",top:"",left:"",marginLeft:"",marginTop:""});else{if(t.css("z-index",this.zIndexInc=(this.zIndexInc||this.getStartZIndex())+1),(this.opts.subMenusMinWidth||this.opts.subMenusMaxWidth)&&(t.css({width:"auto",minWidth:"",maxWidth:""}).addClass("sm-nowrap"),this.opts.subMenusMinWidth&&t.css("min-width",this.opts.subMenusMinWidth),this.opts.subMenusMaxWidth)){var s=this.getWidth(t);t.css("max-width",this.opts.subMenusMaxWidth),s>this.getWidth(t)&&t.removeClass("sm-nowrap").css("width",this.opts.subMenusMaxWidth)}this.menuPosition(t)}var o=function(){t.css("overflow","")};i?canAnimate&&this.opts.collapsibleShowFunction?this.opts.collapsibleShowFunction.call(this,t,o):t.show(this.opts.collapsibleShowDuration,o):canAnimate&&this.opts.showFunction?this.opts.showFunction.call(this,t,o):t.show(this.opts.showDuration,o),e.attr("aria-expanded","true"),t.attr({"aria-expanded":"true","aria-hidden":"false"}),this.visibleSubMenus.push(t),this.$root.triggerHandler("show.smapi",t[0])}},popupHide:function(t){this.hideTimeout&&(clearTimeout(this.hideTimeout),this.hideTimeout=0);var e=this;this.hideTimeout=setTimeout(function(){e.menuHideAll()},t?1:this.opts.hideTimeout)},popupShow:function(t,e){if(!this.opts.isPopup)return alert('SmartMenus jQuery Error:\n\nIf you want to show this menu via the "popupShow" method, set the isPopup:true option.'),void 0;if(this.hideTimeout&&(clearTimeout(this.hideTimeout),this.hideTimeout=0),this.$root.dataSM("shown-before",!0),canAnimate&&this.$root.stop(!0,!0),!this.$root.is(":visible")){this.$root.css({left:t,top:e});var i=this,s=function(){i.$root.css("overflow","")};canAnimate&&this.opts.showFunction?this.opts.showFunction.call(this,this.$root,s):this.$root.show(this.opts.showDuration,s),this.visibleSubMenus[0]=this.$root}},refresh:function(){this.destroy(!0),this.init(!0)},rootKeyDown:function(t){if(this.handleEvents())switch(t.keyCode){case 27:var e=this.activatedItems[0];if(e){this.menuHideAll(),e[0].focus();var i=e.dataSM("sub");i&&this.menuHide(i)}break;case 32:var s=$(t.target);if(s.is("a")&&this.handleItemEvents(s)){var i=s.dataSM("sub");i&&!i.is(":visible")&&(this.itemClick({currentTarget:t.target}),t.preventDefault())}}},rootOut:function(t){if(this.handleEvents()&&!this.isTouchMode()&&t.target!=this.$root[0]&&(this.hideTimeout&&(clearTimeout(this.hideTimeout),this.hideTimeout=0),!this.opts.showOnClick||!this.opts.hideOnClick)){var e=this;this.hideTimeout=setTimeout(function(){e.menuHideAll()},this.opts.hideTimeout)}},rootOver:function(t){this.handleEvents()&&!this.isTouchMode()&&t.target!=this.$root[0]&&this.hideTimeout&&(clearTimeout(this.hideTimeout),this.hideTimeout=0)},winResize:function(t){if(this.handleEvents()){if(!("onorientationchange"in window)||"orientationchange"==t.type){var e=this.isCollapsible();this.wasCollapsible&&e||(this.activatedItems.length&&this.activatedItems[this.activatedItems.length-1][0].blur(),this.menuHideAll()),this.wasCollapsible=e}}else if(this.$disableOverlay){var i=this.$root.offset();this.$disableOverlay.css({top:i.top,left:i.left,width:this.$root.outerWidth(),height:this.$root.outerHeight()})}}}}),$.fn.dataSM=function(t,e){return e?this.data(t+"_smartmenus",e):this.data(t+"_smartmenus")},$.fn.removeDataSM=function(t){return this.removeData(t+"_smartmenus")},$.fn.smartmenus=function(options){if("string"==typeof options){var args=arguments,method=options;return Array.prototype.shift.call(args),this.each(function(){var t=$(this).data("smartmenus");t&&t[method]&&t[method].apply(t,args)})}return this.each(function(){var dataOpts=$(this).data("sm-options")||null;if(dataOpts)try{dataOpts=eval("("+dataOpts+")")}catch(e){dataOpts=null,alert('ERROR\n\nSmartMenus jQuery init:\nInvalid "data-sm-options" attribute value syntax.')}new $.SmartMenus(this,$.extend({},$.fn.smartmenus.defaults,options,dataOpts))})},$.fn.smartmenus.defaults={isPopup:!1,mainMenuSubOffsetX:0,mainMenuSubOffsetY:0,subMenusSubOffsetX:0,subMenusSubOffsetY:0,subMenusMinWidth:"10em",subMenusMaxWidth:"20em",subIndicators:!0,subIndicatorsPos:"append",subIndicatorsText:"",scrollStep:30,scrollAccelerate:!0,showTimeout:250,hideTimeout:500,showDuration:0,showFunction:null,hideDuration:0,hideFunction:function(t,e){t.fadeOut(200,e)},collapsibleShowDuration:0,collapsibleShowFunction:function(t,e){t.slideDown(200,e)},collapsibleHideDuration:0,collapsibleHideFunction:function(t,e){t.slideUp(200,e)},showOnClick:!1,hideOnClick:!0,noMouseOver:!1,keepInViewport:!0,keepHighlighted:!0,markCurrentItem:!1,markCurrentTree:!0,rightToLeftSubMenus:!1,bottomToTopSubMenus:!1,collapsibleBehavior:"default"},$}); \ No newline at end of file diff --git a/External/open-cpp-utils/Documentation/html/md__r_e_a_d_m_e.html b/External/open-cpp-utils/Documentation/html/md__r_e_a_d_m_e.html new file mode 100644 index 0000000..cc701e9 --- /dev/null +++ b/External/open-cpp-utils/Documentation/html/md__r_e_a_d_m_e.html @@ -0,0 +1,85 @@ + + + + + + + +open-cpp-utils: open-cpp-utils + + + + + + + + + + + +
    +
    + + + + + + +
    +
    open-cpp-utils 0.0.1 +
    +
    +
    + + + + + + + + +
    +
    + + +
    +
    +
    +
    +
    +
    Loading...
    +
    Searching...
    +
    No Matches
    +
    +
    +
    +
    + +
    +
    +
    open-cpp-utils
    +
    +
    +

    Open Source Utilities for C++

    +
    +
    + + + + diff --git a/External/open-cpp-utils/Documentation/html/menu.js b/External/open-cpp-utils/Documentation/html/menu.js new file mode 100644 index 0000000..717761d --- /dev/null +++ b/External/open-cpp-utils/Documentation/html/menu.js @@ -0,0 +1,134 @@ +/* + @licstart The following is the entire license notice for the JavaScript code in this file. + + The MIT License (MIT) + + Copyright (C) 1997-2020 by Dimitri van Heesch + + Permission is hereby granted, free of charge, to any person obtaining a copy of this software + and associated documentation files (the "Software"), to deal in the Software without restriction, + including without limitation the rights to use, copy, modify, merge, publish, distribute, + sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all copies or + substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING + BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, + DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + @licend The above is the entire license notice for the JavaScript code in this file + */ +function initMenu(relPath,searchEnabled,serverSide,searchPage,search) { + function makeTree(data,relPath) { + let result=''; + if ('children' in data) { + result+='
      '; + for (let i in data.children) { + let url; + const link = data.children[i].url; + if (link.substring(0,1)=='^') { + url = link.substring(1); + } else { + url = relPath+link; + } + result+='
    • '+ + data.children[i].text+''+ + makeTree(data.children[i],relPath)+'
    • '; + } + result+='
    '; + } + return result; + } + let searchBoxHtml; + if (searchEnabled) { + if (serverSide) { + searchBoxHtml='
    '+ + '
    '+ + '
     '+ + ''+ + '
    '+ + '
    '+ + '
    '+ + '
    '; + } else { + searchBoxHtml='
    '+ + ''+ + ' '+ + ''+ + ''+ + ''+ + ''+ + ''+ + '
    '; + } + } + + $('#main-nav').before('
    '+ + ''+ + ''+ + '
    '); + $('#main-nav').append(makeTree(menudata,relPath)); + $('#main-nav').children(':first').addClass('sm sm-dox').attr('id','main-menu'); + if (searchBoxHtml) { + $('#main-menu').append('
  • '); + } + const $mainMenuState = $('#main-menu-state'); + let prevWidth = 0; + if ($mainMenuState.length) { + const initResizableIfExists = function() { + if (typeof initResizable==='function') initResizable(); + } + // animate mobile menu + $mainMenuState.change(function() { + const $menu = $('#main-menu'); + let options = { duration: 250, step: initResizableIfExists }; + if (this.checked) { + options['complete'] = () => $menu.css('display', 'block'); + $menu.hide().slideDown(options); + } else { + options['complete'] = () => $menu.css('display', 'none'); + $menu.show().slideUp(options); + } + }); + // set default menu visibility + const resetState = function() { + const $menu = $('#main-menu'); + const newWidth = $(window).outerWidth(); + if (newWidth!=prevWidth) { + if ($(window).outerWidth()<768) { + $mainMenuState.prop('checked',false); $menu.hide(); + $('#searchBoxPos1').html(searchBoxHtml); + $('#searchBoxPos2').hide(); + } else { + $menu.show(); + $('#searchBoxPos1').empty(); + $('#searchBoxPos2').html(searchBoxHtml); + $('#searchBoxPos2').show(); + } + if (typeof searchBox!=='undefined') { + searchBox.CloseResultsWindow(); + } + prevWidth = newWidth; + } + } + $(window).ready(function() { resetState(); initResizableIfExists(); }); + $(window).resize(resetState); + } + $('#main-menu').smartmenus(); +} +/* @license-end */ diff --git a/External/open-cpp-utils/Documentation/html/menudata.js b/External/open-cpp-utils/Documentation/html/menudata.js new file mode 100644 index 0000000..c09ff57 --- /dev/null +++ b/External/open-cpp-utils/Documentation/html/menudata.js @@ -0,0 +1,36 @@ +/* + @licstart The following is the entire license notice for the JavaScript code in this file. + + The MIT License (MIT) + + Copyright (C) 1997-2020 by Dimitri van Heesch + + Permission is hereby granted, free of charge, to any person obtaining a copy of this software + and associated documentation files (the "Software"), to deal in the Software without restriction, + including without limitation the rights to use, copy, modify, merge, publish, distribute, + sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all copies or + substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING + BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, + DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + @licend The above is the entire license notice for the JavaScript code in this file +*/ +var menudata={children:[ +{text:"Main Page",url:"index.html"}, +{text:"Related Pages",url:"pages.html"}, +{text:"Classes",url:"annotated.html",children:[ +{text:"Class List",url:"annotated.html"}, +{text:"Class Index",url:"classes.html"}, +{text:"Class Hierarchy",url:"hierarchy.html"}, +{text:"Class Members",url:"functions.html",children:[ +{text:"All",url:"functions.html"}, +{text:"Functions",url:"functions_func.html"}]}]}, +{text:"Files",url:"files.html",children:[ +{text:"File List",url:"files.html"}]}]} diff --git a/External/open-cpp-utils/Documentation/html/minus.svg b/External/open-cpp-utils/Documentation/html/minus.svg new file mode 100644 index 0000000..f70d0c1 --- /dev/null +++ b/External/open-cpp-utils/Documentation/html/minus.svg @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/External/open-cpp-utils/Documentation/html/minusd.svg b/External/open-cpp-utils/Documentation/html/minusd.svg new file mode 100644 index 0000000..5f8e879 --- /dev/null +++ b/External/open-cpp-utils/Documentation/html/minusd.svg @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/External/open-cpp-utils/Documentation/html/nav_f.png b/External/open-cpp-utils/Documentation/html/nav_f.png new file mode 100644 index 0000000..72a58a5 Binary files /dev/null and b/External/open-cpp-utils/Documentation/html/nav_f.png differ diff --git a/External/open-cpp-utils/Documentation/html/nav_fd.png b/External/open-cpp-utils/Documentation/html/nav_fd.png new file mode 100644 index 0000000..032fbdd Binary files /dev/null and b/External/open-cpp-utils/Documentation/html/nav_fd.png differ diff --git a/External/open-cpp-utils/Documentation/html/nav_g.png b/External/open-cpp-utils/Documentation/html/nav_g.png new file mode 100644 index 0000000..2093a23 Binary files /dev/null and b/External/open-cpp-utils/Documentation/html/nav_g.png differ diff --git a/External/open-cpp-utils/Documentation/html/nav_h.png b/External/open-cpp-utils/Documentation/html/nav_h.png new file mode 100644 index 0000000..33389b1 Binary files /dev/null and b/External/open-cpp-utils/Documentation/html/nav_h.png differ diff --git a/External/open-cpp-utils/Documentation/html/nav_hd.png b/External/open-cpp-utils/Documentation/html/nav_hd.png new file mode 100644 index 0000000..de80f18 Binary files /dev/null and b/External/open-cpp-utils/Documentation/html/nav_hd.png differ diff --git a/External/open-cpp-utils/Documentation/html/open.png b/External/open-cpp-utils/Documentation/html/open.png new file mode 100644 index 0000000..30f75c7 Binary files /dev/null and b/External/open-cpp-utils/Documentation/html/open.png differ diff --git a/External/open-cpp-utils/Documentation/html/optional_8h_source.html b/External/open-cpp-utils/Documentation/html/optional_8h_source.html new file mode 100644 index 0000000..e3405e5 --- /dev/null +++ b/External/open-cpp-utils/Documentation/html/optional_8h_source.html @@ -0,0 +1,161 @@ + + + + + + + +open-cpp-utils: optional.h Source File + + + + + + + + + + + +
    +
    + + + + + + +
    +
    open-cpp-utils 0.0.1 +
    +
    +
    + + + + + + + + +
    + +
    +
    + + +
    +
    +
    +
    +
    +
    Loading...
    +
    Searching...
    +
    No Matches
    +
    +
    +
    +
    + +
    +
    optional.h
    +
    +
    +
    1// =====================================================================================================================
    +
    2// Copyright 2024 Medusa Slockbower
    +
    3// Licensed under the Apache License, Version 2.0 (the "License");
    +
    4// you may not use this file except in compliance with the License.
    +
    5// You may obtain a copy of the License at
    +
    6//
    +
    7// http://www.apache.org/licenses/LICENSE-2.0
    +
    8//
    +
    9// Unless required by applicable law or agreed to in writing, software
    +
    10// distributed under the License is distributed on an "AS IS" BASIS,
    +
    11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    +
    12// See the License for the specific language governing permissions and
    +
    13// limitations under the License.
    +
    14// =====================================================================================================================
    +
    15
    +
    16#ifndef OPTIONAL_H
    +
    17#define OPTIONAL_H
    +
    18
    +
    19namespace open_cpp_utils
    +
    20{
    +
    21 template<typename T>
    +
    + +
    23 {
    +
    24 public:
    +
    25 using value_type = T;
    +
    26
    +
    27 optional() : data_(), valid_(false) { }
    +
    28 optional(const value_type& data) : data_(data), valid_(true) { }
    +
    29 optional(value_type&& data) : data_(data), valid_(true) { }
    +
    30 optional(const optional& other) = default;
    +
    31 optional(optional&& other) = default;
    +
    32
    +
    33 optional& operator=(const optional& other) = default;
    +
    34 optional& operator=(optional&& other) = default;
    +
    35
    +
    36 optional& operator=(const value_type& data) { data_ = data; valid_ = true; return *this; }
    +
    37 optional& operator=(value_type&& data) { data_ = data; valid_ = true; return *this; }
    +
    38
    +
    39 value_type& operator+=(const value_type& data) { assert(valid_); data_ += data; return data_; }
    +
    40 value_type& operator-=(const value_type& data) { assert(valid_); data_ += data; return data_; }
    +
    41 value_type& operator*=(const value_type& data) { assert(valid_); data_ += data; return data_; }
    +
    42 value_type& operator/=(const value_type& data) { assert(valid_); data_ += data; return data_; }
    +
    43 value_type& operator%=(const value_type& data) { assert(valid_); data_ += data; return data_; }
    +
    44
    +
    45 value_type& operator<<=(const value_type& data) { assert(valid_); data_ <<= data; return data_; }
    +
    46 value_type& operator>>=(const value_type& data) { assert(valid_); data_ >>= data; return data_; }
    +
    47 value_type& operator|=(const value_type& data) { assert(valid_); data_ |= data; return data_; }
    +
    48 value_type& operator&=(const value_type& data) { assert(valid_); data_ &= data; return data_; }
    +
    49 value_type& operator^=(const value_type& data) { assert(valid_); data_ ^= data; return data_; }
    +
    50
    +
    51 [[nodiscard]] bool operator()() const { return valid_; }
    +
    52
    +
    53 operator value_type&() { assert(valid_); return data_; }
    +
    54 operator const value_type&() const { assert(valid_); return data_; }
    +
    55
    +
    56 value_type* operator->() { assert(valid_); return &data_; }
    +
    57 const value_type* operator->() const { assert(valid_); return &data_; }
    +
    58
    +
    59 value_type& operator*() { assert(valid_); return data_; }
    +
    60 const value_type& operator*() const { assert(valid_); return data_; }
    +
    61
    +
    62 void reset() { valid_ = false; }
    +
    63
    +
    64 private:
    +
    65 value_type data_;
    +
    66 bool valid_;
    +
    67 };
    +
    +
    68}
    +
    69
    +
    70#endif //OPTIONAL_H
    +
    Definition optional.h:23
    +
    + + + + diff --git a/External/open-cpp-utils/Documentation/html/pages.html b/External/open-cpp-utils/Documentation/html/pages.html new file mode 100644 index 0000000..b541d00 --- /dev/null +++ b/External/open-cpp-utils/Documentation/html/pages.html @@ -0,0 +1,88 @@ + + + + + + + +open-cpp-utils: Related Pages + + + + + + + + + + + +
    +
    + + + + + + +
    +
    open-cpp-utils 0.0.1 +
    +
    +
    + + + + + + + +
    + +
    +
    + + +
    +
    +
    +
    +
    +
    Loading...
    +
    Searching...
    +
    No Matches
    +
    +
    +
    +
    + +
    +
    Related Pages
    +
    +
    +
    Here is a list of all related documentation pages:
    + + +
     open-cpp-utils
    +
    +
    + + + + diff --git a/External/open-cpp-utils/Documentation/html/plus.svg b/External/open-cpp-utils/Documentation/html/plus.svg new file mode 100644 index 0000000..0752016 --- /dev/null +++ b/External/open-cpp-utils/Documentation/html/plus.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/External/open-cpp-utils/Documentation/html/plusd.svg b/External/open-cpp-utils/Documentation/html/plusd.svg new file mode 100644 index 0000000..0c65bfe --- /dev/null +++ b/External/open-cpp-utils/Documentation/html/plusd.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/External/open-cpp-utils/Documentation/html/search/all_0.js b/External/open-cpp-utils/Documentation/html/search/all_0.js new file mode 100644 index 0000000..e0c9959 --- /dev/null +++ b/External/open-cpp-utils/Documentation/html/search/all_0.js @@ -0,0 +1,7 @@ +var searchData= +[ + ['any_0',['any',['../classopen__cpp__utils_1_1any.html',1,'open_cpp_utils']]], + ['any_3c_20rest_2e_2e_2e_20_3e_1',['any< Rest... >',['../classopen__cpp__utils_1_1any.html',1,'open_cpp_utils']]], + ['any_3c_20t_2c_20rest_2e_2e_2e_20_3e_2',['any< T, Rest... >',['../classopen__cpp__utils_1_1any_3_01_t_00_01_rest_8_8_8_01_4.html',1,'open_cpp_utils']]], + ['any_3c_3e_3',['any<>',['../classopen__cpp__utils_1_1any_3_4.html',1,'open_cpp_utils']]] +]; diff --git a/External/open-cpp-utils/Documentation/html/search/all_1.js b/External/open-cpp-utils/Documentation/html/search/all_1.js new file mode 100644 index 0000000..62ba96f --- /dev/null +++ b/External/open-cpp-utils/Documentation/html/search/all_1.js @@ -0,0 +1,5 @@ +var searchData= +[ + ['bool_5fconstant_0',['bool_constant',['../template__utils_8h.html#a74d5cb86637293f20ed9afa2d8b31b2c',1,'open_cpp_utils']]], + ['breadth_5ffirst_1',['breadth_first',['../classopen__cpp__utils_1_1directed__tree_1_1breadth__first.html',1,'open_cpp_utils::directed_tree']]] +]; diff --git a/External/open-cpp-utils/Documentation/html/search/all_2.js b/External/open-cpp-utils/Documentation/html/search/all_2.js new file mode 100644 index 0000000..fbda333 --- /dev/null +++ b/External/open-cpp-utils/Documentation/html/search/all_2.js @@ -0,0 +1,6 @@ +var searchData= +[ + ['constant_5fvalue_0',['constant_value',['../structopen__cpp__utils_1_1constant__value.html',1,'open_cpp_utils']]], + ['constant_5fvalue_3c_20node_2c_20node_280_29_3e_1',['constant_value< node, node(0)>',['../structopen__cpp__utils_1_1constant__value.html',1,'open_cpp_utils']]], + ['cpp_20utils_2',['open-cpp-utils',['../md__r_e_a_d_m_e.html',1,'']]] +]; diff --git a/External/open-cpp-utils/Documentation/html/search/all_3.js b/External/open-cpp-utils/Documentation/html/search/all_3.js new file mode 100644 index 0000000..929ab08 --- /dev/null +++ b/External/open-cpp-utils/Documentation/html/search/all_3.js @@ -0,0 +1,6 @@ +var searchData= +[ + ['depth_0',['depth',['../classopen__cpp__utils_1_1directed__tree.html#aa1c7419056d969b7596a0fa1616f3a11',1,'open_cpp_utils::directed_tree']]], + ['directed_5ftree_1',['directed_tree',['../classopen__cpp__utils_1_1directed__tree.html',1,'open_cpp_utils::directed_tree< T >'],['../classopen__cpp__utils_1_1directed__tree.html#a274ff5c1261c76482ae0539bcd7db282',1,'open_cpp_utils::directed_tree::directed_tree()']]], + ['dyn_5farray_2',['dyn_array',['../classopen__cpp__utils_1_1dyn__array.html',1,'open_cpp_utils']]] +]; diff --git a/External/open-cpp-utils/Documentation/html/search/all_4.js b/External/open-cpp-utils/Documentation/html/search/all_4.js new file mode 100644 index 0000000..c2c2564 --- /dev/null +++ b/External/open-cpp-utils/Documentation/html/search/all_4.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['erase_0',['erase',['../classopen__cpp__utils_1_1directed__tree.html#a03aa9c0faf8c6985cc8e8b22c4dabe18',1,'open_cpp_utils::directed_tree']]] +]; diff --git a/External/open-cpp-utils/Documentation/html/search/all_5.js b/External/open-cpp-utils/Documentation/html/search/all_5.js new file mode 100644 index 0000000..f917b2b --- /dev/null +++ b/External/open-cpp-utils/Documentation/html/search/all_5.js @@ -0,0 +1,7 @@ +var searchData= +[ + ['false_5ftype_0',['false_type',['../template__utils_8h.html#a4ac0ee6113dff45d27ed390839625f7f',1,'open_cpp_utils']]], + ['first_5fchild_1',['first_child',['../classopen__cpp__utils_1_1directed__tree.html#a4724d2a3787f09eb632687cbb8d3b392',1,'open_cpp_utils::directed_tree']]], + ['fixed_5farray_2',['fixed_array',['../structopen__cpp__utils_1_1fixed__array.html',1,'open_cpp_utils']]], + ['fixed_5farray_3c_20t_2c_20n_20_3e_3',['fixed_array< T, N >',['../structopen__cpp__utils_1_1fixed__array_3_01_t_00_01_n_01_4.html',1,'open_cpp_utils']]] +]; diff --git a/External/open-cpp-utils/Documentation/html/search/all_6.js b/External/open-cpp-utils/Documentation/html/search/all_6.js new file mode 100644 index 0000000..13c6f25 --- /dev/null +++ b/External/open-cpp-utils/Documentation/html/search/all_6.js @@ -0,0 +1,5 @@ +var searchData= +[ + ['in_5forder_0',['in_order',['../classopen__cpp__utils_1_1directed__tree_1_1in__order.html',1,'open_cpp_utils::directed_tree']]], + ['insert_1',['insert',['../classopen__cpp__utils_1_1directed__tree.html#a1a23d372ff1a58609686dcbc0e979cdd',1,'open_cpp_utils::directed_tree']]] +]; diff --git a/External/open-cpp-utils/Documentation/html/search/all_7.js b/External/open-cpp-utils/Documentation/html/search/all_7.js new file mode 100644 index 0000000..706abdb --- /dev/null +++ b/External/open-cpp-utils/Documentation/html/search/all_7.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['left_5fmost_0',['left_most',['../classopen__cpp__utils_1_1directed__tree.html#a9a03a3bc0948881348a72d5c21390542',1,'open_cpp_utils::directed_tree']]] +]; diff --git a/External/open-cpp-utils/Documentation/html/search/all_8.js b/External/open-cpp-utils/Documentation/html/search/all_8.js new file mode 100644 index 0000000..5c3a2fd --- /dev/null +++ b/External/open-cpp-utils/Documentation/html/search/all_8.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['next_5fsibling_0',['next_sibling',['../classopen__cpp__utils_1_1directed__tree.html#a2b5a157313e8c92a68d041d1b33514d4',1,'open_cpp_utils::directed_tree']]] +]; diff --git a/External/open-cpp-utils/Documentation/html/search/all_9.js b/External/open-cpp-utils/Documentation/html/search/all_9.js new file mode 100644 index 0000000..a422871 --- /dev/null +++ b/External/open-cpp-utils/Documentation/html/search/all_9.js @@ -0,0 +1,6 @@ +var searchData= +[ + ['open_20cpp_20utils_0',['open-cpp-utils',['../md__r_e_a_d_m_e.html',1,'']]], + ['operator_5b_5d_1',['operator[]',['../classopen__cpp__utils_1_1directed__tree.html#afe497db6dba649dccc3520adc6ee87ac',1,'open_cpp_utils::directed_tree::operator[](node id)'],['../classopen__cpp__utils_1_1directed__tree.html#ae640e0a2ecf325d9f0f9253341d0ce2d',1,'open_cpp_utils::directed_tree::operator[](node id) const']]], + ['optional_2',['optional',['../classopen__cpp__utils_1_1optional.html',1,'open_cpp_utils']]] +]; diff --git a/External/open-cpp-utils/Documentation/html/search/all_a.js b/External/open-cpp-utils/Documentation/html/search/all_a.js new file mode 100644 index 0000000..7e1c0a6 --- /dev/null +++ b/External/open-cpp-utils/Documentation/html/search/all_a.js @@ -0,0 +1,7 @@ +var searchData= +[ + ['parent_0',['parent',['../classopen__cpp__utils_1_1directed__tree.html#a3c5c1406f23aaafa8853670cd8c09e37',1,'open_cpp_utils::directed_tree']]], + ['post_5forder_1',['post_order',['../classopen__cpp__utils_1_1directed__tree_1_1post__order.html',1,'open_cpp_utils::directed_tree']]], + ['pre_5forder_2',['pre_order',['../classopen__cpp__utils_1_1directed__tree_1_1pre__order.html',1,'open_cpp_utils::directed_tree']]], + ['prev_5fsibling_3',['prev_sibling',['../classopen__cpp__utils_1_1directed__tree.html#a2894ba29c0eccf98b50bab5c07fcdf40',1,'open_cpp_utils::directed_tree']]] +]; diff --git a/External/open-cpp-utils/Documentation/html/search/all_b.js b/External/open-cpp-utils/Documentation/html/search/all_b.js new file mode 100644 index 0000000..930da5b --- /dev/null +++ b/External/open-cpp-utils/Documentation/html/search/all_b.js @@ -0,0 +1,7 @@ +var searchData= +[ + ['template_5futils_2eh_0',['template_utils.h',['../template__utils_8h.html',1,'']]], + ['traverse_1',['traverse',['../classopen__cpp__utils_1_1directed__tree.html#aae5dccf63007f5094122dee8fdae986e',1,'open_cpp_utils::directed_tree']]], + ['traverser_2',['traverser',['../classopen__cpp__utils_1_1directed__tree_1_1traverser.html',1,'open_cpp_utils::directed_tree']]], + ['true_5ftype_3',['true_type',['../template__utils_8h.html#ae3d98e273a29dae107e182245e79ed5a',1,'open_cpp_utils']]] +]; diff --git a/External/open-cpp-utils/Documentation/html/search/all_c.js b/External/open-cpp-utils/Documentation/html/search/all_c.js new file mode 100644 index 0000000..3c1413e --- /dev/null +++ b/External/open-cpp-utils/Documentation/html/search/all_c.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['utils_0',['open-cpp-utils',['../md__r_e_a_d_m_e.html',1,'']]] +]; diff --git a/External/open-cpp-utils/Documentation/html/search/classes_0.js b/External/open-cpp-utils/Documentation/html/search/classes_0.js new file mode 100644 index 0000000..e0c9959 --- /dev/null +++ b/External/open-cpp-utils/Documentation/html/search/classes_0.js @@ -0,0 +1,7 @@ +var searchData= +[ + ['any_0',['any',['../classopen__cpp__utils_1_1any.html',1,'open_cpp_utils']]], + ['any_3c_20rest_2e_2e_2e_20_3e_1',['any< Rest... >',['../classopen__cpp__utils_1_1any.html',1,'open_cpp_utils']]], + ['any_3c_20t_2c_20rest_2e_2e_2e_20_3e_2',['any< T, Rest... >',['../classopen__cpp__utils_1_1any_3_01_t_00_01_rest_8_8_8_01_4.html',1,'open_cpp_utils']]], + ['any_3c_3e_3',['any<>',['../classopen__cpp__utils_1_1any_3_4.html',1,'open_cpp_utils']]] +]; diff --git a/External/open-cpp-utils/Documentation/html/search/classes_1.js b/External/open-cpp-utils/Documentation/html/search/classes_1.js new file mode 100644 index 0000000..b63a5a8 --- /dev/null +++ b/External/open-cpp-utils/Documentation/html/search/classes_1.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['breadth_5ffirst_0',['breadth_first',['../classopen__cpp__utils_1_1directed__tree_1_1breadth__first.html',1,'open_cpp_utils::directed_tree']]] +]; diff --git a/External/open-cpp-utils/Documentation/html/search/classes_2.js b/External/open-cpp-utils/Documentation/html/search/classes_2.js new file mode 100644 index 0000000..966f1b4 --- /dev/null +++ b/External/open-cpp-utils/Documentation/html/search/classes_2.js @@ -0,0 +1,5 @@ +var searchData= +[ + ['constant_5fvalue_0',['constant_value',['../structopen__cpp__utils_1_1constant__value.html',1,'open_cpp_utils']]], + ['constant_5fvalue_3c_20node_2c_20node_280_29_3e_1',['constant_value< node, node(0)>',['../structopen__cpp__utils_1_1constant__value.html',1,'open_cpp_utils']]] +]; diff --git a/External/open-cpp-utils/Documentation/html/search/classes_3.js b/External/open-cpp-utils/Documentation/html/search/classes_3.js new file mode 100644 index 0000000..d21547e --- /dev/null +++ b/External/open-cpp-utils/Documentation/html/search/classes_3.js @@ -0,0 +1,5 @@ +var searchData= +[ + ['directed_5ftree_0',['directed_tree',['../classopen__cpp__utils_1_1directed__tree.html',1,'open_cpp_utils']]], + ['dyn_5farray_1',['dyn_array',['../classopen__cpp__utils_1_1dyn__array.html',1,'open_cpp_utils']]] +]; diff --git a/External/open-cpp-utils/Documentation/html/search/classes_4.js b/External/open-cpp-utils/Documentation/html/search/classes_4.js new file mode 100644 index 0000000..0b92a80 --- /dev/null +++ b/External/open-cpp-utils/Documentation/html/search/classes_4.js @@ -0,0 +1,5 @@ +var searchData= +[ + ['fixed_5farray_0',['fixed_array',['../structopen__cpp__utils_1_1fixed__array.html',1,'open_cpp_utils']]], + ['fixed_5farray_3c_20t_2c_20n_20_3e_1',['fixed_array< T, N >',['../structopen__cpp__utils_1_1fixed__array_3_01_t_00_01_n_01_4.html',1,'open_cpp_utils']]] +]; diff --git a/External/open-cpp-utils/Documentation/html/search/classes_5.js b/External/open-cpp-utils/Documentation/html/search/classes_5.js new file mode 100644 index 0000000..ed39e3c --- /dev/null +++ b/External/open-cpp-utils/Documentation/html/search/classes_5.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['in_5forder_0',['in_order',['../classopen__cpp__utils_1_1directed__tree_1_1in__order.html',1,'open_cpp_utils::directed_tree']]] +]; diff --git a/External/open-cpp-utils/Documentation/html/search/classes_6.js b/External/open-cpp-utils/Documentation/html/search/classes_6.js new file mode 100644 index 0000000..b9d5340 --- /dev/null +++ b/External/open-cpp-utils/Documentation/html/search/classes_6.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['optional_0',['optional',['../classopen__cpp__utils_1_1optional.html',1,'open_cpp_utils']]] +]; diff --git a/External/open-cpp-utils/Documentation/html/search/classes_7.js b/External/open-cpp-utils/Documentation/html/search/classes_7.js new file mode 100644 index 0000000..8a1b52f --- /dev/null +++ b/External/open-cpp-utils/Documentation/html/search/classes_7.js @@ -0,0 +1,5 @@ +var searchData= +[ + ['post_5forder_0',['post_order',['../classopen__cpp__utils_1_1directed__tree_1_1post__order.html',1,'open_cpp_utils::directed_tree']]], + ['pre_5forder_1',['pre_order',['../classopen__cpp__utils_1_1directed__tree_1_1pre__order.html',1,'open_cpp_utils::directed_tree']]] +]; diff --git a/External/open-cpp-utils/Documentation/html/search/classes_8.js b/External/open-cpp-utils/Documentation/html/search/classes_8.js new file mode 100644 index 0000000..cc695ef --- /dev/null +++ b/External/open-cpp-utils/Documentation/html/search/classes_8.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['traverser_0',['traverser',['../classopen__cpp__utils_1_1directed__tree_1_1traverser.html',1,'open_cpp_utils::directed_tree']]] +]; diff --git a/External/open-cpp-utils/Documentation/html/search/close.svg b/External/open-cpp-utils/Documentation/html/search/close.svg new file mode 100644 index 0000000..337d6cc --- /dev/null +++ b/External/open-cpp-utils/Documentation/html/search/close.svg @@ -0,0 +1,18 @@ + + + + + + diff --git a/External/open-cpp-utils/Documentation/html/search/files_0.js b/External/open-cpp-utils/Documentation/html/search/files_0.js new file mode 100644 index 0000000..ec7fd43 --- /dev/null +++ b/External/open-cpp-utils/Documentation/html/search/files_0.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['template_5futils_2eh_0',['template_utils.h',['../template__utils_8h.html',1,'']]] +]; diff --git a/External/open-cpp-utils/Documentation/html/search/functions_0.js b/External/open-cpp-utils/Documentation/html/search/functions_0.js new file mode 100644 index 0000000..8ab3f3e --- /dev/null +++ b/External/open-cpp-utils/Documentation/html/search/functions_0.js @@ -0,0 +1,5 @@ +var searchData= +[ + ['depth_0',['depth',['../classopen__cpp__utils_1_1directed__tree.html#aa1c7419056d969b7596a0fa1616f3a11',1,'open_cpp_utils::directed_tree']]], + ['directed_5ftree_1',['directed_tree',['../classopen__cpp__utils_1_1directed__tree.html#a274ff5c1261c76482ae0539bcd7db282',1,'open_cpp_utils::directed_tree']]] +]; diff --git a/External/open-cpp-utils/Documentation/html/search/functions_1.js b/External/open-cpp-utils/Documentation/html/search/functions_1.js new file mode 100644 index 0000000..c2c2564 --- /dev/null +++ b/External/open-cpp-utils/Documentation/html/search/functions_1.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['erase_0',['erase',['../classopen__cpp__utils_1_1directed__tree.html#a03aa9c0faf8c6985cc8e8b22c4dabe18',1,'open_cpp_utils::directed_tree']]] +]; diff --git a/External/open-cpp-utils/Documentation/html/search/functions_2.js b/External/open-cpp-utils/Documentation/html/search/functions_2.js new file mode 100644 index 0000000..4fb2455 --- /dev/null +++ b/External/open-cpp-utils/Documentation/html/search/functions_2.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['first_5fchild_0',['first_child',['../classopen__cpp__utils_1_1directed__tree.html#a4724d2a3787f09eb632687cbb8d3b392',1,'open_cpp_utils::directed_tree']]] +]; diff --git a/External/open-cpp-utils/Documentation/html/search/functions_3.js b/External/open-cpp-utils/Documentation/html/search/functions_3.js new file mode 100644 index 0000000..12fe491 --- /dev/null +++ b/External/open-cpp-utils/Documentation/html/search/functions_3.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['insert_0',['insert',['../classopen__cpp__utils_1_1directed__tree.html#a1a23d372ff1a58609686dcbc0e979cdd',1,'open_cpp_utils::directed_tree']]] +]; diff --git a/External/open-cpp-utils/Documentation/html/search/functions_4.js b/External/open-cpp-utils/Documentation/html/search/functions_4.js new file mode 100644 index 0000000..706abdb --- /dev/null +++ b/External/open-cpp-utils/Documentation/html/search/functions_4.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['left_5fmost_0',['left_most',['../classopen__cpp__utils_1_1directed__tree.html#a9a03a3bc0948881348a72d5c21390542',1,'open_cpp_utils::directed_tree']]] +]; diff --git a/External/open-cpp-utils/Documentation/html/search/functions_5.js b/External/open-cpp-utils/Documentation/html/search/functions_5.js new file mode 100644 index 0000000..5c3a2fd --- /dev/null +++ b/External/open-cpp-utils/Documentation/html/search/functions_5.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['next_5fsibling_0',['next_sibling',['../classopen__cpp__utils_1_1directed__tree.html#a2b5a157313e8c92a68d041d1b33514d4',1,'open_cpp_utils::directed_tree']]] +]; diff --git a/External/open-cpp-utils/Documentation/html/search/functions_6.js b/External/open-cpp-utils/Documentation/html/search/functions_6.js new file mode 100644 index 0000000..75c3dcc --- /dev/null +++ b/External/open-cpp-utils/Documentation/html/search/functions_6.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['operator_5b_5d_0',['operator[]',['../classopen__cpp__utils_1_1directed__tree.html#afe497db6dba649dccc3520adc6ee87ac',1,'open_cpp_utils::directed_tree::operator[](node id)'],['../classopen__cpp__utils_1_1directed__tree.html#ae640e0a2ecf325d9f0f9253341d0ce2d',1,'open_cpp_utils::directed_tree::operator[](node id) const']]] +]; diff --git a/External/open-cpp-utils/Documentation/html/search/functions_7.js b/External/open-cpp-utils/Documentation/html/search/functions_7.js new file mode 100644 index 0000000..ee34622 --- /dev/null +++ b/External/open-cpp-utils/Documentation/html/search/functions_7.js @@ -0,0 +1,5 @@ +var searchData= +[ + ['parent_0',['parent',['../classopen__cpp__utils_1_1directed__tree.html#a3c5c1406f23aaafa8853670cd8c09e37',1,'open_cpp_utils::directed_tree']]], + ['prev_5fsibling_1',['prev_sibling',['../classopen__cpp__utils_1_1directed__tree.html#a2894ba29c0eccf98b50bab5c07fcdf40',1,'open_cpp_utils::directed_tree']]] +]; diff --git a/External/open-cpp-utils/Documentation/html/search/functions_8.js b/External/open-cpp-utils/Documentation/html/search/functions_8.js new file mode 100644 index 0000000..83c5a88 --- /dev/null +++ b/External/open-cpp-utils/Documentation/html/search/functions_8.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['traverse_0',['traverse',['../classopen__cpp__utils_1_1directed__tree.html#aae5dccf63007f5094122dee8fdae986e',1,'open_cpp_utils::directed_tree']]] +]; diff --git a/External/open-cpp-utils/Documentation/html/search/mag.svg b/External/open-cpp-utils/Documentation/html/search/mag.svg new file mode 100644 index 0000000..ffb6cf0 --- /dev/null +++ b/External/open-cpp-utils/Documentation/html/search/mag.svg @@ -0,0 +1,24 @@ + + + + + + + diff --git a/External/open-cpp-utils/Documentation/html/search/mag_d.svg b/External/open-cpp-utils/Documentation/html/search/mag_d.svg new file mode 100644 index 0000000..4122773 --- /dev/null +++ b/External/open-cpp-utils/Documentation/html/search/mag_d.svg @@ -0,0 +1,24 @@ + + + + + + + diff --git a/External/open-cpp-utils/Documentation/html/search/mag_sel.svg b/External/open-cpp-utils/Documentation/html/search/mag_sel.svg new file mode 100644 index 0000000..553dba8 --- /dev/null +++ b/External/open-cpp-utils/Documentation/html/search/mag_sel.svg @@ -0,0 +1,31 @@ + + + + + + + + + diff --git a/External/open-cpp-utils/Documentation/html/search/mag_seld.svg b/External/open-cpp-utils/Documentation/html/search/mag_seld.svg new file mode 100644 index 0000000..c906f84 --- /dev/null +++ b/External/open-cpp-utils/Documentation/html/search/mag_seld.svg @@ -0,0 +1,31 @@ + + + + + + + + + diff --git a/External/open-cpp-utils/Documentation/html/search/pages_0.js b/External/open-cpp-utils/Documentation/html/search/pages_0.js new file mode 100644 index 0000000..4c247cf --- /dev/null +++ b/External/open-cpp-utils/Documentation/html/search/pages_0.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['cpp_20utils_0',['open-cpp-utils',['../md__r_e_a_d_m_e.html',1,'']]] +]; diff --git a/External/open-cpp-utils/Documentation/html/search/pages_1.js b/External/open-cpp-utils/Documentation/html/search/pages_1.js new file mode 100644 index 0000000..0e0dfc0 --- /dev/null +++ b/External/open-cpp-utils/Documentation/html/search/pages_1.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['open_20cpp_20utils_0',['open-cpp-utils',['../md__r_e_a_d_m_e.html',1,'']]] +]; diff --git a/External/open-cpp-utils/Documentation/html/search/pages_2.js b/External/open-cpp-utils/Documentation/html/search/pages_2.js new file mode 100644 index 0000000..3c1413e --- /dev/null +++ b/External/open-cpp-utils/Documentation/html/search/pages_2.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['utils_0',['open-cpp-utils',['../md__r_e_a_d_m_e.html',1,'']]] +]; diff --git a/External/open-cpp-utils/Documentation/html/search/search.css b/External/open-cpp-utils/Documentation/html/search/search.css new file mode 100644 index 0000000..19f76f9 --- /dev/null +++ b/External/open-cpp-utils/Documentation/html/search/search.css @@ -0,0 +1,291 @@ +/*---------------- Search Box positioning */ + +#main-menu > li:last-child { + /* This
  • object is the parent of the search bar */ + display: flex; + justify-content: center; + align-items: center; + height: 36px; + margin-right: 1em; +} + +/*---------------- Search box styling */ + +.SRPage * { + font-weight: normal; + line-height: normal; +} + +dark-mode-toggle { + margin-left: 5px; + display: flex; + float: right; +} + +#MSearchBox { + display: inline-block; + white-space : nowrap; + background: var(--search-background-color); + border-radius: 0.65em; + box-shadow: var(--search-box-shadow); + z-index: 102; +} + +#MSearchBox .left { + display: inline-block; + vertical-align: middle; + height: 1.4em; +} + +#MSearchSelect { + display: inline-block; + vertical-align: middle; + width: 20px; + height: 19px; + background-image: var(--search-magnification-select-image); + margin: 0 0 0 0.3em; + padding: 0; +} + +#MSearchSelectExt { + display: inline-block; + vertical-align: middle; + width: 10px; + height: 19px; + background-image: var(--search-magnification-image); + margin: 0 0 0 0.5em; + padding: 0; +} + + +#MSearchField { + display: inline-block; + vertical-align: middle; + width: 7.5em; + height: 19px; + margin: 0 0.15em; + padding: 0; + line-height: 1em; + border:none; + color: var(--search-foreground-color); + outline: none; + font-family: var(--font-family-search); + -webkit-border-radius: 0px; + border-radius: 0px; + background: none; +} + +@media(hover: none) { + /* to avoid zooming on iOS */ + #MSearchField { + font-size: 16px; + } +} + +#MSearchBox .right { + display: inline-block; + vertical-align: middle; + width: 1.4em; + height: 1.4em; +} + +#MSearchClose { + display: none; + font-size: inherit; + background : none; + border: none; + margin: 0; + padding: 0; + outline: none; + +} + +#MSearchCloseImg { + padding: 0.3em; + margin: 0; +} + +.MSearchBoxActive #MSearchField { + color: var(--search-active-color); +} + + + +/*---------------- Search filter selection */ + +#MSearchSelectWindow { + display: none; + position: absolute; + left: 0; top: 0; + border: 1px solid var(--search-filter-border-color); + background-color: var(--search-filter-background-color); + z-index: 10001; + padding-top: 4px; + padding-bottom: 4px; + -moz-border-radius: 4px; + -webkit-border-top-left-radius: 4px; + -webkit-border-top-right-radius: 4px; + -webkit-border-bottom-left-radius: 4px; + -webkit-border-bottom-right-radius: 4px; + -webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); +} + +.SelectItem { + font: 8pt var(--font-family-search); + padding-left: 2px; + padding-right: 12px; + border: 0px; +} + +span.SelectionMark { + margin-right: 4px; + font-family: var(--font-family-monospace); + outline-style: none; + text-decoration: none; +} + +a.SelectItem { + display: block; + outline-style: none; + color: var(--search-filter-foreground-color); + text-decoration: none; + padding-left: 6px; + padding-right: 12px; +} + +a.SelectItem:focus, +a.SelectItem:active { + color: var(--search-filter-foreground-color); + outline-style: none; + text-decoration: none; +} + +a.SelectItem:hover { + color: var(--search-filter-highlight-text-color); + background-color: var(--search-filter-highlight-bg-color); + outline-style: none; + text-decoration: none; + cursor: pointer; + display: block; +} + +/*---------------- Search results window */ + +iframe#MSearchResults { + /*width: 60ex;*/ + height: 15em; +} + +#MSearchResultsWindow { + display: none; + position: absolute; + left: 0; top: 0; + border: 1px solid var(--search-results-border-color); + background-color: var(--search-results-background-color); + z-index:10000; + width: 300px; + height: 400px; + overflow: auto; +} + +/* ----------------------------------- */ + + +#SRIndex { + clear:both; +} + +.SREntry { + font-size: 10pt; + padding-left: 1ex; +} + +.SRPage .SREntry { + font-size: 8pt; + padding: 1px 5px; +} + +div.SRPage { + margin: 5px 2px; + background-color: var(--search-results-background-color); +} + +.SRChildren { + padding-left: 3ex; padding-bottom: .5em +} + +.SRPage .SRChildren { + display: none; +} + +.SRSymbol { + font-weight: bold; + color: var(--search-results-foreground-color); + font-family: var(--font-family-search); + text-decoration: none; + outline: none; +} + +a.SRScope { + display: block; + color: var(--search-results-foreground-color); + font-family: var(--font-family-search); + font-size: 8pt; + text-decoration: none; + outline: none; +} + +a.SRSymbol:focus, a.SRSymbol:active, +a.SRScope:focus, a.SRScope:active { + text-decoration: underline; +} + +span.SRScope { + padding-left: 4px; + font-family: var(--font-family-search); +} + +.SRPage .SRStatus { + padding: 2px 5px; + font-size: 8pt; + font-style: italic; + font-family: var(--font-family-search); +} + +.SRResult { + display: none; +} + +div.searchresults { + margin-left: 10px; + margin-right: 10px; +} + +/*---------------- External search page results */ + +.pages b { + color: white; + padding: 5px 5px 3px 5px; + background-image: var(--nav-gradient-active-image-parent); + background-repeat: repeat-x; + text-shadow: 0 1px 1px #000000; +} + +.pages { + line-height: 17px; + margin-left: 4px; + text-decoration: none; +} + +.hl { + font-weight: bold; +} + +#searchresults { + margin-bottom: 20px; +} + +.searchpages { + margin-top: 10px; +} + diff --git a/External/open-cpp-utils/Documentation/html/search/search.js b/External/open-cpp-utils/Documentation/html/search/search.js new file mode 100644 index 0000000..666af01 --- /dev/null +++ b/External/open-cpp-utils/Documentation/html/search/search.js @@ -0,0 +1,694 @@ +/* + @licstart The following is the entire license notice for the JavaScript code in this file. + + The MIT License (MIT) + + Copyright (C) 1997-2020 by Dimitri van Heesch + + Permission is hereby granted, free of charge, to any person obtaining a copy of this software + and associated documentation files (the "Software"), to deal in the Software without restriction, + including without limitation the rights to use, copy, modify, merge, publish, distribute, + sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all copies or + substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING + BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, + DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + @licend The above is the entire license notice for the JavaScript code in this file + */ +const SEARCH_COOKIE_NAME = ''+'search_grp'; + +const searchResults = new SearchResults(); + +/* A class handling everything associated with the search panel. + + Parameters: + name - The name of the global variable that will be + storing this instance. Is needed to be able to set timeouts. + resultPath - path to use for external files +*/ +function SearchBox(name, resultsPath, extension) { + if (!name || !resultsPath) { alert("Missing parameters to SearchBox."); } + if (!extension || extension == "") { extension = ".html"; } + + function getXPos(item) { + let x = 0; + if (item.offsetWidth) { + while (item && item!=document.body) { + x += item.offsetLeft; + item = item.offsetParent; + } + } + return x; + } + + function getYPos(item) { + let y = 0; + if (item.offsetWidth) { + while (item && item!=document.body) { + y += item.offsetTop; + item = item.offsetParent; + } + } + return y; + } + + // ---------- Instance variables + this.name = name; + this.resultsPath = resultsPath; + this.keyTimeout = 0; + this.keyTimeoutLength = 500; + this.closeSelectionTimeout = 300; + this.lastSearchValue = ""; + this.lastResultsPage = ""; + this.hideTimeout = 0; + this.searchIndex = 0; + this.searchActive = false; + this.extension = extension; + + // ----------- DOM Elements + + this.DOMSearchField = () => document.getElementById("MSearchField"); + this.DOMSearchSelect = () => document.getElementById("MSearchSelect"); + this.DOMSearchSelectWindow = () => document.getElementById("MSearchSelectWindow"); + this.DOMPopupSearchResults = () => document.getElementById("MSearchResults"); + this.DOMPopupSearchResultsWindow = () => document.getElementById("MSearchResultsWindow"); + this.DOMSearchClose = () => document.getElementById("MSearchClose"); + this.DOMSearchBox = () => document.getElementById("MSearchBox"); + + // ------------ Event Handlers + + // Called when focus is added or removed from the search field. + this.OnSearchFieldFocus = function(isActive) { + this.Activate(isActive); + } + + this.OnSearchSelectShow = function() { + const searchSelectWindow = this.DOMSearchSelectWindow(); + const searchField = this.DOMSearchSelect(); + + const left = getXPos(searchField); + const top = getYPos(searchField) + searchField.offsetHeight; + + // show search selection popup + searchSelectWindow.style.display='block'; + searchSelectWindow.style.left = left + 'px'; + searchSelectWindow.style.top = top + 'px'; + + // stop selection hide timer + if (this.hideTimeout) { + clearTimeout(this.hideTimeout); + this.hideTimeout=0; + } + return false; // to avoid "image drag" default event + } + + this.OnSearchSelectHide = function() { + this.hideTimeout = setTimeout(this.CloseSelectionWindow.bind(this), + this.closeSelectionTimeout); + } + + // Called when the content of the search field is changed. + this.OnSearchFieldChange = function(evt) { + if (this.keyTimeout) { // kill running timer + clearTimeout(this.keyTimeout); + this.keyTimeout = 0; + } + + const e = evt ? evt : window.event; // for IE + if (e.keyCode==40 || e.keyCode==13) { + if (e.shiftKey==1) { + this.OnSearchSelectShow(); + const win=this.DOMSearchSelectWindow(); + for (let i=0;i do a search + this.Search(); + } + } + + this.OnSearchSelectKey = function(evt) { + const e = (evt) ? evt : window.event; // for IE + if (e.keyCode==40 && this.searchIndex0) { // Up + this.searchIndex--; + this.OnSelectItem(this.searchIndex); + } else if (e.keyCode==13 || e.keyCode==27) { + e.stopPropagation(); + this.OnSelectItem(this.searchIndex); + this.CloseSelectionWindow(); + this.DOMSearchField().focus(); + } + return false; + } + + // --------- Actions + + // Closes the results window. + this.CloseResultsWindow = function() { + this.DOMPopupSearchResultsWindow().style.display = 'none'; + this.DOMSearchClose().style.display = 'none'; + this.Activate(false); + } + + this.CloseSelectionWindow = function() { + this.DOMSearchSelectWindow().style.display = 'none'; + } + + // Performs a search. + this.Search = function() { + this.keyTimeout = 0; + + // strip leading whitespace + const searchValue = this.DOMSearchField().value.replace(/^ +/, ""); + + const code = searchValue.toLowerCase().charCodeAt(0); + let idxChar = searchValue.substr(0, 1).toLowerCase(); + if ( 0xD800 <= code && code <= 0xDBFF && searchValue > 1) { // surrogate pair + idxChar = searchValue.substr(0, 2); + } + + let jsFile; + let idx = indexSectionsWithContent[this.searchIndex].indexOf(idxChar); + if (idx!=-1) { + const hexCode=idx.toString(16); + jsFile = this.resultsPath + indexSectionNames[this.searchIndex] + '_' + hexCode + '.js'; + } + + const loadJS = function(url, impl, loc) { + const scriptTag = document.createElement('script'); + scriptTag.src = url; + scriptTag.onload = impl; + scriptTag.onreadystatechange = impl; + loc.appendChild(scriptTag); + } + + const domPopupSearchResultsWindow = this.DOMPopupSearchResultsWindow(); + const domSearchBox = this.DOMSearchBox(); + const domPopupSearchResults = this.DOMPopupSearchResults(); + const domSearchClose = this.DOMSearchClose(); + const resultsPath = this.resultsPath; + + const handleResults = function() { + document.getElementById("Loading").style.display="none"; + if (typeof searchData !== 'undefined') { + createResults(resultsPath); + document.getElementById("NoMatches").style.display="none"; + } + + if (idx!=-1) { + searchResults.Search(searchValue); + } else { // no file with search results => force empty search results + searchResults.Search('===='); + } + + if (domPopupSearchResultsWindow.style.display!='block') { + domSearchClose.style.display = 'inline-block'; + let left = getXPos(domSearchBox) + 150; + let top = getYPos(domSearchBox) + 20; + domPopupSearchResultsWindow.style.display = 'block'; + left -= domPopupSearchResults.offsetWidth; + const maxWidth = document.body.clientWidth; + const maxHeight = document.body.clientHeight; + let width = 300; + if (left<10) left=10; + if (width+left+8>maxWidth) width=maxWidth-left-8; + let height = 400; + if (height+top+8>maxHeight) height=maxHeight-top-8; + domPopupSearchResultsWindow.style.top = top + 'px'; + domPopupSearchResultsWindow.style.left = left + 'px'; + domPopupSearchResultsWindow.style.width = width + 'px'; + domPopupSearchResultsWindow.style.height = height + 'px'; + } + } + + if (jsFile) { + loadJS(jsFile, handleResults, this.DOMPopupSearchResultsWindow()); + } else { + handleResults(); + } + + this.lastSearchValue = searchValue; + } + + // -------- Activation Functions + + // Activates or deactivates the search panel, resetting things to + // their default values if necessary. + this.Activate = function(isActive) { + if (isActive || // open it + this.DOMPopupSearchResultsWindow().style.display == 'block' + ) { + this.DOMSearchBox().className = 'MSearchBoxActive'; + this.searchActive = true; + } else if (!isActive) { // directly remove the panel + this.DOMSearchBox().className = 'MSearchBoxInactive'; + this.searchActive = false; + this.lastSearchValue = '' + this.lastResultsPage = ''; + this.DOMSearchField().value = ''; + } + } +} + +// ----------------------------------------------------------------------- + +// The class that handles everything on the search results page. +function SearchResults() { + + function convertToId(search) { + let result = ''; + for (let i=0;i. + this.lastMatchCount = 0; + this.lastKey = 0; + this.repeatOn = false; + + // Toggles the visibility of the passed element ID. + this.FindChildElement = function(id) { + const parentElement = document.getElementById(id); + let element = parentElement.firstChild; + + while (element && element!=parentElement) { + if (element.nodeName.toLowerCase() == 'div' && element.className == 'SRChildren') { + return element; + } + + if (element.nodeName.toLowerCase() == 'div' && element.hasChildNodes()) { + element = element.firstChild; + } else if (element.nextSibling) { + element = element.nextSibling; + } else { + do { + element = element.parentNode; + } + while (element && element!=parentElement && !element.nextSibling); + + if (element && element!=parentElement) { + element = element.nextSibling; + } + } + } + } + + this.Toggle = function(id) { + const element = this.FindChildElement(id); + if (element) { + if (element.style.display == 'block') { + element.style.display = 'none'; + } else { + element.style.display = 'block'; + } + } + } + + // Searches for the passed string. If there is no parameter, + // it takes it from the URL query. + // + // Always returns true, since other documents may try to call it + // and that may or may not be possible. + this.Search = function(search) { + if (!search) { // get search word from URL + search = window.location.search; + search = search.substring(1); // Remove the leading '?' + search = unescape(search); + } + + search = search.replace(/^ +/, ""); // strip leading spaces + search = search.replace(/ +$/, ""); // strip trailing spaces + search = search.toLowerCase(); + search = convertToId(search); + + const resultRows = document.getElementsByTagName("div"); + let matches = 0; + + let i = 0; + while (i < resultRows.length) { + const row = resultRows.item(i); + if (row.className == "SRResult") { + let rowMatchName = row.id.toLowerCase(); + rowMatchName = rowMatchName.replace(/^sr\d*_/, ''); // strip 'sr123_' + + if (search.length<=rowMatchName.length && + rowMatchName.substr(0, search.length)==search) { + row.style.display = 'block'; + matches++; + } else { + row.style.display = 'none'; + } + } + i++; + } + document.getElementById("Searching").style.display='none'; + if (matches == 0) { // no results + document.getElementById("NoMatches").style.display='block'; + } else { // at least one result + document.getElementById("NoMatches").style.display='none'; + } + this.lastMatchCount = matches; + return true; + } + + // return the first item with index index or higher that is visible + this.NavNext = function(index) { + let focusItem; + for (;;) { + const focusName = 'Item'+index; + focusItem = document.getElementById(focusName); + if (focusItem && focusItem.parentNode.parentNode.style.display=='block') { + break; + } else if (!focusItem) { // last element + break; + } + focusItem=null; + index++; + } + return focusItem; + } + + this.NavPrev = function(index) { + let focusItem; + for (;;) { + const focusName = 'Item'+index; + focusItem = document.getElementById(focusName); + if (focusItem && focusItem.parentNode.parentNode.style.display=='block') { + break; + } else if (!focusItem) { // last element + break; + } + focusItem=null; + index--; + } + return focusItem; + } + + this.ProcessKeys = function(e) { + if (e.type == "keydown") { + this.repeatOn = false; + this.lastKey = e.keyCode; + } else if (e.type == "keypress") { + if (!this.repeatOn) { + if (this.lastKey) this.repeatOn = true; + return false; // ignore first keypress after keydown + } + } else if (e.type == "keyup") { + this.lastKey = 0; + this.repeatOn = false; + } + return this.lastKey!=0; + } + + this.Nav = function(evt,itemIndex) { + const e = (evt) ? evt : window.event; // for IE + if (e.keyCode==13) return true; + if (!this.ProcessKeys(e)) return false; + + if (this.lastKey==38) { // Up + const newIndex = itemIndex-1; + let focusItem = this.NavPrev(newIndex); + if (focusItem) { + let child = this.FindChildElement(focusItem.parentNode.parentNode.id); + if (child && child.style.display == 'block') { // children visible + let n=0; + let tmpElem; + for (;;) { // search for last child + tmpElem = document.getElementById('Item'+newIndex+'_c'+n); + if (tmpElem) { + focusItem = tmpElem; + } else { // found it! + break; + } + n++; + } + } + } + if (focusItem) { + focusItem.focus(); + } else { // return focus to search field + document.getElementById("MSearchField").focus(); + } + } else if (this.lastKey==40) { // Down + const newIndex = itemIndex+1; + let focusItem; + const item = document.getElementById('Item'+itemIndex); + const elem = this.FindChildElement(item.parentNode.parentNode.id); + if (elem && elem.style.display == 'block') { // children visible + focusItem = document.getElementById('Item'+itemIndex+'_c0'); + } + if (!focusItem) focusItem = this.NavNext(newIndex); + if (focusItem) focusItem.focus(); + } else if (this.lastKey==39) { // Right + const item = document.getElementById('Item'+itemIndex); + const elem = this.FindChildElement(item.parentNode.parentNode.id); + if (elem) elem.style.display = 'block'; + } else if (this.lastKey==37) { // Left + const item = document.getElementById('Item'+itemIndex); + const elem = this.FindChildElement(item.parentNode.parentNode.id); + if (elem) elem.style.display = 'none'; + } else if (this.lastKey==27) { // Escape + e.stopPropagation(); + searchBox.CloseResultsWindow(); + document.getElementById("MSearchField").focus(); + } else if (this.lastKey==13) { // Enter + return true; + } + return false; + } + + this.NavChild = function(evt,itemIndex,childIndex) { + const e = (evt) ? evt : window.event; // for IE + if (e.keyCode==13) return true; + if (!this.ProcessKeys(e)) return false; + + if (this.lastKey==38) { // Up + if (childIndex>0) { + const newIndex = childIndex-1; + document.getElementById('Item'+itemIndex+'_c'+newIndex).focus(); + } else { // already at first child, jump to parent + document.getElementById('Item'+itemIndex).focus(); + } + } else if (this.lastKey==40) { // Down + const newIndex = childIndex+1; + let elem = document.getElementById('Item'+itemIndex+'_c'+newIndex); + if (!elem) { // last child, jump to parent next parent + elem = this.NavNext(itemIndex+1); + } + if (elem) { + elem.focus(); + } + } else if (this.lastKey==27) { // Escape + e.stopPropagation(); + searchBox.CloseResultsWindow(); + document.getElementById("MSearchField").focus(); + } else if (this.lastKey==13) { // Enter + return true; + } + return false; + } +} + +function createResults(resultsPath) { + + function setKeyActions(elem,action) { + elem.setAttribute('onkeydown',action); + elem.setAttribute('onkeypress',action); + elem.setAttribute('onkeyup',action); + } + + function setClassAttr(elem,attr) { + elem.setAttribute('class',attr); + elem.setAttribute('className',attr); + } + + const results = document.getElementById("SRResults"); + results.innerHTML = ''; + searchData.forEach((elem,index) => { + const id = elem[0]; + const srResult = document.createElement('div'); + srResult.setAttribute('id','SR_'+id); + setClassAttr(srResult,'SRResult'); + const srEntry = document.createElement('div'); + setClassAttr(srEntry,'SREntry'); + const srLink = document.createElement('a'); + srLink.setAttribute('id','Item'+index); + setKeyActions(srLink,'return searchResults.Nav(event,'+index+')'); + setClassAttr(srLink,'SRSymbol'); + srLink.innerHTML = elem[1][0]; + srEntry.appendChild(srLink); + if (elem[1].length==2) { // single result + srLink.setAttribute('href',resultsPath+elem[1][1][0]); + srLink.setAttribute('onclick','searchBox.CloseResultsWindow()'); + if (elem[1][1][1]) { + srLink.setAttribute('target','_parent'); + } else { + srLink.setAttribute('target','_blank'); + } + const srScope = document.createElement('span'); + setClassAttr(srScope,'SRScope'); + srScope.innerHTML = elem[1][1][2]; + srEntry.appendChild(srScope); + } else { // multiple results + srLink.setAttribute('href','javascript:searchResults.Toggle("SR_'+id+'")'); + const srChildren = document.createElement('div'); + setClassAttr(srChildren,'SRChildren'); + for (let c=0; c + + + + + + +open-cpp-utils: startup.h Source File + + + + + + + + + + + +
    +
    + + + + + + +
    +
    open-cpp-utils 0.0.1 +
    +
    +
    + + + + + + + + +
    + +
    +
    + + +
    +
    +
    +
    +
    +
    Loading...
    +
    Searching...
    +
    No Matches
    +
    +
    +
    +
    + +
    +
    startup.h
    +
    +
    +
    1// =====================================================================================================================
    +
    2// Copyright 2024 Medusa Slockbower
    +
    3// Licensed under the Apache License, Version 2.0 (the "License");
    +
    4// you may not use this file except in compliance with the License.
    +
    5// You may obtain a copy of the License at
    +
    6//
    +
    7// http://www.apache.org/licenses/LICENSE-2.0
    +
    8//
    +
    9// Unless required by applicable law or agreed to in writing, software
    +
    10// distributed under the License is distributed on an "AS IS" BASIS,
    +
    11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    +
    12// See the License for the specific language governing permissions and
    +
    13// limitations under the License.
    +
    14// =====================================================================================================================
    +
    15
    +
    16#ifndef STARTUP_H
    +
    17#define STARTUP_H
    +
    18
    +
    19#ifdef __cplusplus
    +
    20#define STARTUP(f) \
    +
    21 static void f(void); \
    +
    22 struct f##_t_ { f##_t_(void) { f(); } }; inline static f##_t_ f##_; \
    +
    23 static void f(void)
    +
    24#elif defined(_MSC_VER)
    +
    25#pragma section(".CRT$XCU",read)
    +
    26 #define INITIALIZER2_(f,p) \
    +
    27 static void f(void); \
    +
    28 __declspec(allocate(".CRT$XCU")) void (*f##_)(void) = f; \
    +
    29 __pragma(comment(linker,"/include:" p #f "_")) \
    +
    30 static void f(void)
    +
    31 #ifdef _WIN64
    +
    32 #define STARTUP(f) INITIALIZER2_(f,"")
    +
    33 #else
    +
    34 #define STARTUP(f) INITIALIZER2_(f,"_")
    +
    35 #endif
    +
    36#else
    +
    37 #define STARTUP(f) \
    +
    38 static void f(void) __attribute__((constructor)); \
    +
    39 static void f(void)
    +
    40#endif
    +
    41
    +
    42#endif //STARTUP_H
    +
    + + + + diff --git a/External/open-cpp-utils/Documentation/html/structopen__cpp__utils_1_1constant__value-members.html b/External/open-cpp-utils/Documentation/html/structopen__cpp__utils_1_1constant__value-members.html new file mode 100644 index 0000000..7738749 --- /dev/null +++ b/External/open-cpp-utils/Documentation/html/structopen__cpp__utils_1_1constant__value-members.html @@ -0,0 +1,94 @@ + + + + + + + +open-cpp-utils: Member List + + + + + + + + + + + +
    +
    + + + + + + +
    +
    open-cpp-utils 0.0.1 +
    +
    +
    + + + + + + + + +
    +
    + + +
    +
    +
    +
    +
    +
    Loading...
    +
    Searching...
    +
    No Matches
    +
    +
    +
    +
    + + +
    +
    +
    open_cpp_utils::constant_value< T, V > Member List
    +
    +
    + +

    This is the complete list of members for open_cpp_utils::constant_value< T, V >, including all inherited members.

    + + + + + +
    operator type() const noexcept (defined in open_cpp_utils::constant_value< T, V >)open_cpp_utils::constant_value< T, V >inline
    operator()() const (defined in open_cpp_utils::constant_value< T, V >)open_cpp_utils::constant_value< T, V >inline
    type typedef (defined in open_cpp_utils::constant_value< T, V >)open_cpp_utils::constant_value< T, V >
    value (defined in open_cpp_utils::constant_value< T, V >)open_cpp_utils::constant_value< T, V >static
    + + + + diff --git a/External/open-cpp-utils/Documentation/html/structopen__cpp__utils_1_1constant__value.html b/External/open-cpp-utils/Documentation/html/structopen__cpp__utils_1_1constant__value.html new file mode 100644 index 0000000..af9baf0 --- /dev/null +++ b/External/open-cpp-utils/Documentation/html/structopen__cpp__utils_1_1constant__value.html @@ -0,0 +1,132 @@ + + + + + + + +open-cpp-utils: open_cpp_utils::constant_value< T, V > Struct Template Reference + + + + + + + + + + + +
    +
    + + + + + + +
    +
    open-cpp-utils 0.0.1 +
    +
    +
    + + + + + + + + +
    +
    + + +
    +
    +
    +
    +
    +
    Loading...
    +
    Searching...
    +
    No Matches
    +
    +
    +
    +
    + + +
    +
    + +
    open_cpp_utils::constant_value< T, V > Struct Template Reference
    +
    +
    + +

    Compile-time constant value. + More...

    + +

    #include <template_utils.h>

    + + + + +

    +Public Types

    +using type = T
     
    + + + + + +

    +Public Member Functions

    +constexpr operator type () const noexcept
     
    +constexpr type operator() () const
     
    + + + +

    +Static Public Attributes

    +static constexpr type value = V
     
    +

    Detailed Description

    +
    template<typename T, T V>
    +struct open_cpp_utils::constant_value< T, V >

    Compile-time constant value.

    +
    Template Parameters
    + + + +
    TType
    VValue
    +
    +
    +

    The documentation for this struct was generated from the following file: +
    + + + + diff --git a/External/open-cpp-utils/Documentation/html/structopen__cpp__utils_1_1fixed__array.html b/External/open-cpp-utils/Documentation/html/structopen__cpp__utils_1_1fixed__array.html new file mode 100644 index 0000000..7994c93 --- /dev/null +++ b/External/open-cpp-utils/Documentation/html/structopen__cpp__utils_1_1fixed__array.html @@ -0,0 +1,90 @@ + + + + + + + +open-cpp-utils: open_cpp_utils::fixed_array< T, N > Struct Template Reference + + + + + + + + + + + +
    +
    + + + + + + +
    +
    open-cpp-utils 0.0.1 +
    +
    +
    + + + + + + + + +
    +
    + + +
    +
    +
    +
    +
    +
    Loading...
    +
    Searching...
    +
    No Matches
    +
    +
    +
    +
    + + +
    +
    +
    open_cpp_utils::fixed_array< T, N > Struct Template Reference
    +
    +
    +
    The documentation for this struct was generated from the following file: +
    + + + + diff --git a/External/open-cpp-utils/Documentation/html/structopen__cpp__utils_1_1fixed__array_3_01_t_00_01_n_01_4-members.html b/External/open-cpp-utils/Documentation/html/structopen__cpp__utils_1_1fixed__array_3_01_t_00_01_n_01_4-members.html new file mode 100644 index 0000000..6d223d7 --- /dev/null +++ b/External/open-cpp-utils/Documentation/html/structopen__cpp__utils_1_1fixed__array_3_01_t_00_01_n_01_4-members.html @@ -0,0 +1,97 @@ + + + + + + + +open-cpp-utils: Member List + + + + + + + + + + + +
    +
    + + + + + + +
    +
    open-cpp-utils 0.0.1 +
    +
    +
    + + + + + + + + +
    +
    + + +
    +
    +
    +
    +
    +
    Loading...
    +
    Searching...
    +
    No Matches
    +
    +
    +
    +
    + + +
    +
    +
    open_cpp_utils::fixed_array< T, N > Member List
    +
    +
    + +

    This is the complete list of members for open_cpp_utils::fixed_array< T, N >, including all inherited members.

    + + + + + + + + +
    array_type typedef (defined in open_cpp_utils::fixed_array< T, N >)open_cpp_utils::fixed_array< T, N >
    fixed_array() (defined in open_cpp_utils::fixed_array< T, N >)open_cpp_utils::fixed_array< T, N >inline
    fixed_array(const fixed_array &array) (defined in open_cpp_utils::fixed_array< T, N >)open_cpp_utils::fixed_array< T, N >inline
    fixed_array(const array_type &data) (defined in open_cpp_utils::fixed_array< T, N >)open_cpp_utils::fixed_array< T, N >inline
    size() (defined in open_cpp_utils::fixed_array< T, N >)open_cpp_utils::fixed_array< T, N >inline
    size_type typedef (defined in open_cpp_utils::fixed_array< T, N >)open_cpp_utils::fixed_array< T, N >
    value_type typedef (defined in open_cpp_utils::fixed_array< T, N >)open_cpp_utils::fixed_array< T, N >
    + + + + diff --git a/External/open-cpp-utils/Documentation/html/structopen__cpp__utils_1_1fixed__array_3_01_t_00_01_n_01_4.html b/External/open-cpp-utils/Documentation/html/structopen__cpp__utils_1_1fixed__array_3_01_t_00_01_n_01_4.html new file mode 100644 index 0000000..24810a8 --- /dev/null +++ b/External/open-cpp-utils/Documentation/html/structopen__cpp__utils_1_1fixed__array_3_01_t_00_01_n_01_4.html @@ -0,0 +1,134 @@ + + + + + + + +open-cpp-utils: open_cpp_utils::fixed_array< T, N > Struct Template Reference + + + + + + + + + + + +
    +
    + + + + + + +
    +
    open-cpp-utils 0.0.1 +
    +
    +
    + + + + + + + + +
    +
    + + +
    +
    +
    +
    +
    +
    Loading...
    +
    Searching...
    +
    No Matches
    +
    +
    +
    +
    + + +
    +
    + +
    open_cpp_utils::fixed_array< T, N > Struct Template Reference
    +
    +
    + +

    Wrapper for array of type T with fixed length N. + More...

    + +

    #include <array.h>

    + + + + + + + + +

    +Public Types

    +using value_type = T
     
    +using array_type = value_type[N]
     
    +using size_type = size_t
     
    + + + + + + + +

    +Public Member Functions

    +constexpr fixed_array (const fixed_array &array)
     
    +constexpr fixed_array (const array_type &data)
     
    +constexpr size_type size ()
     
    +

    Detailed Description

    +
    template<typename T, size_t N>
    +struct open_cpp_utils::fixed_array< T, N >

    Wrapper for array of type T with fixed length N.

    +
    Template Parameters
    + + + +
    T
    N
    +
    +
    +

    The documentation for this struct was generated from the following file: +
    + + + + diff --git a/External/open-cpp-utils/Documentation/html/sync_off.png b/External/open-cpp-utils/Documentation/html/sync_off.png new file mode 100644 index 0000000..3b443fc Binary files /dev/null and b/External/open-cpp-utils/Documentation/html/sync_off.png differ diff --git a/External/open-cpp-utils/Documentation/html/sync_on.png b/External/open-cpp-utils/Documentation/html/sync_on.png new file mode 100644 index 0000000..e08320f Binary files /dev/null and b/External/open-cpp-utils/Documentation/html/sync_on.png differ diff --git a/External/open-cpp-utils/Documentation/html/tab_a.png b/External/open-cpp-utils/Documentation/html/tab_a.png new file mode 100644 index 0000000..3b725c4 Binary files /dev/null and b/External/open-cpp-utils/Documentation/html/tab_a.png differ diff --git a/External/open-cpp-utils/Documentation/html/tab_ad.png b/External/open-cpp-utils/Documentation/html/tab_ad.png new file mode 100644 index 0000000..e34850a Binary files /dev/null and b/External/open-cpp-utils/Documentation/html/tab_ad.png differ diff --git a/External/open-cpp-utils/Documentation/html/tab_b.png b/External/open-cpp-utils/Documentation/html/tab_b.png new file mode 100644 index 0000000..e2b4a86 Binary files /dev/null and b/External/open-cpp-utils/Documentation/html/tab_b.png differ diff --git a/External/open-cpp-utils/Documentation/html/tab_bd.png b/External/open-cpp-utils/Documentation/html/tab_bd.png new file mode 100644 index 0000000..91c2524 Binary files /dev/null and b/External/open-cpp-utils/Documentation/html/tab_bd.png differ diff --git a/External/open-cpp-utils/Documentation/html/tab_h.png b/External/open-cpp-utils/Documentation/html/tab_h.png new file mode 100644 index 0000000..fd5cb70 Binary files /dev/null and b/External/open-cpp-utils/Documentation/html/tab_h.png differ diff --git a/External/open-cpp-utils/Documentation/html/tab_hd.png b/External/open-cpp-utils/Documentation/html/tab_hd.png new file mode 100644 index 0000000..2489273 Binary files /dev/null and b/External/open-cpp-utils/Documentation/html/tab_hd.png differ diff --git a/External/open-cpp-utils/Documentation/html/tab_s.png b/External/open-cpp-utils/Documentation/html/tab_s.png new file mode 100644 index 0000000..ab478c9 Binary files /dev/null and b/External/open-cpp-utils/Documentation/html/tab_s.png differ diff --git a/External/open-cpp-utils/Documentation/html/tab_sd.png b/External/open-cpp-utils/Documentation/html/tab_sd.png new file mode 100644 index 0000000..757a565 Binary files /dev/null and b/External/open-cpp-utils/Documentation/html/tab_sd.png differ diff --git a/External/open-cpp-utils/Documentation/html/tabs.css b/External/open-cpp-utils/Documentation/html/tabs.css new file mode 100644 index 0000000..fe4854a --- /dev/null +++ b/External/open-cpp-utils/Documentation/html/tabs.css @@ -0,0 +1 @@ +.sm{position:relative;z-index:9999}.sm,.sm ul,.sm li{display:block;list-style:none;margin:0;padding:0;line-height:normal;direction:ltr;text-align:left;-webkit-tap-highlight-color:rgba(0,0,0,0)}.sm-rtl,.sm-rtl ul,.sm-rtl li{direction:rtl;text-align:right}.sm>li>h1,.sm>li>h2,.sm>li>h3,.sm>li>h4,.sm>li>h5,.sm>li>h6{margin:0;padding:0}.sm ul{display:none}.sm li,.sm a{position:relative}.sm a{display:block}.sm a.disabled{cursor:not-allowed}.sm:after{content:"\00a0";display:block;height:0;font:0/0 serif;clear:both;visibility:hidden;overflow:hidden}.sm,.sm *,.sm *:before,.sm *:after{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box}.main-menu-btn{position:relative;display:inline-block;width:36px;height:36px;text-indent:36px;margin-left:8px;white-space:nowrap;overflow:hidden;cursor:pointer;-webkit-tap-highlight-color:rgba(0,0,0,0)}.main-menu-btn-icon,.main-menu-btn-icon:before,.main-menu-btn-icon:after{position:absolute;top:50%;left:2px;height:2px;width:24px;background:var(--nav-menu-button-color);-webkit-transition:all .25s;transition:all .25s}.main-menu-btn-icon:before{content:'';top:-7px;left:0}.main-menu-btn-icon:after{content:'';top:7px;left:0}#main-menu-state:checked ~ .main-menu-btn .main-menu-btn-icon{height:0}#main-menu-state:checked ~ .main-menu-btn .main-menu-btn-icon:before{top:0;-webkit-transform:rotate(-45deg);transform:rotate(-45deg)}#main-menu-state:checked ~ .main-menu-btn .main-menu-btn-icon:after{top:0;-webkit-transform:rotate(45deg);transform:rotate(45deg)}#main-menu-state{position:absolute;width:1px;height:1px;margin:-1px;border:0;padding:0;overflow:hidden;clip:rect(1px,1px,1px,1px)}#main-menu-state:not(:checked) ~ #main-menu{display:none}#main-menu-state:checked ~ #main-menu{display:block}@media(min-width:768px){.main-menu-btn{position:absolute;top:-99999px}#main-menu-state:not(:checked) ~ #main-menu{display:block}}.sm-dox{background-image:var(--nav-gradient-image)}.sm-dox a,.sm-dox a:focus,.sm-dox a:hover,.sm-dox a:active{padding:0 12px;padding-right:43px;font-family:var(--font-family-nav);font-size:13px;font-weight:bold;line-height:36px;text-decoration:none;text-shadow:var(--nav-text-normal-shadow);color:var(--nav-text-normal-color);outline:0}.sm-dox a:hover{background-image:var(--nav-gradient-active-image);background-repeat:repeat-x;color:var(--nav-text-hover-color);text-shadow:var(--nav-text-hover-shadow)}.sm-dox a.current{color:#d23600}.sm-dox a.disabled{color:#bbb}.sm-dox a span.sub-arrow{position:absolute;top:50%;margin-top:-14px;left:auto;right:3px;width:28px;height:28px;overflow:hidden;font:bold 12px/28px monospace !important;text-align:center;text-shadow:none;background:var(--nav-menu-toggle-color);-moz-border-radius:5px;-webkit-border-radius:5px;border-radius:5px}.sm-dox a span.sub-arrow:before{display:block;content:'+'}.sm-dox a.highlighted span.sub-arrow:before{display:block;content:'-'}.sm-dox>li:first-child>a,.sm-dox>li:first-child>:not(ul) a{-moz-border-radius:5px 5px 0 0;-webkit-border-radius:5px;border-radius:5px 5px 0 0}.sm-dox>li:last-child>a,.sm-dox>li:last-child>*:not(ul) a,.sm-dox>li:last-child>ul,.sm-dox>li:last-child>ul>li:last-child>a,.sm-dox>li:last-child>ul>li:last-child>*:not(ul) a,.sm-dox>li:last-child>ul>li:last-child>ul,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>a,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>*:not(ul) a,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>a,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>*:not(ul) a,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>a,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>*:not(ul) a,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul{-moz-border-radius:0 0 5px 5px;-webkit-border-radius:0;border-radius:0 0 5px 5px}.sm-dox>li:last-child>a.highlighted,.sm-dox>li:last-child>*:not(ul) a.highlighted,.sm-dox>li:last-child>ul>li:last-child>a.highlighted,.sm-dox>li:last-child>ul>li:last-child>*:not(ul) a.highlighted,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>a.highlighted,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>*:not(ul) a.highlighted,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>a.highlighted,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>*:not(ul) a.highlighted,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>a.highlighted,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>*:not(ul) a.highlighted{-moz-border-radius:0;-webkit-border-radius:0;border-radius:0}.sm-dox ul{background:var(--nav-menu-background-color)}.sm-dox ul a,.sm-dox ul a:focus,.sm-dox ul a:hover,.sm-dox ul a:active{font-size:12px;border-left:8px solid transparent;line-height:36px;text-shadow:none;background-color:var(--nav-menu-background-color);background-image:none}.sm-dox ul a:hover{background-image:var(--nav-gradient-active-image);background-repeat:repeat-x;color:var(--nav-text-hover-color);text-shadow:0 1px 1px black}.sm-dox ul ul a,.sm-dox ul ul a:hover,.sm-dox ul ul a:focus,.sm-dox ul ul a:active{border-left:16px solid transparent}.sm-dox ul ul ul a,.sm-dox ul ul ul a:hover,.sm-dox ul ul ul a:focus,.sm-dox ul ul ul a:active{border-left:24px solid transparent}.sm-dox ul ul ul ul a,.sm-dox ul ul ul ul a:hover,.sm-dox ul ul ul ul a:focus,.sm-dox ul ul ul ul a:active{border-left:32px solid transparent}.sm-dox ul ul ul ul ul a,.sm-dox ul ul ul ul ul a:hover,.sm-dox ul ul ul ul ul a:focus,.sm-dox ul ul ul ul ul a:active{border-left:40px solid transparent}@media(min-width:768px){.sm-dox ul{position:absolute;width:12em}.sm-dox li{float:left}.sm-dox.sm-rtl li{float:right}.sm-dox ul li,.sm-dox.sm-rtl ul li,.sm-dox.sm-vertical li{float:none}.sm-dox a{white-space:nowrap}.sm-dox ul a,.sm-dox.sm-vertical a{white-space:normal}.sm-dox .sm-nowrap>li>a,.sm-dox .sm-nowrap>li>:not(ul) a{white-space:nowrap}.sm-dox{padding:0 10px;background-image:var(--nav-gradient-image);line-height:36px}.sm-dox a span.sub-arrow{top:50%;margin-top:-2px;right:12px;width:0;height:0;border-width:4px;border-style:solid dashed dashed dashed;border-color:var(--nav-text-normal-color) transparent transparent transparent;background:transparent;-moz-border-radius:0;-webkit-border-radius:0;border-radius:0}.sm-dox a,.sm-dox a:focus,.sm-dox a:active,.sm-dox a:hover,.sm-dox a.highlighted{padding:0 12px;background-image:var(--nav-separator-image);background-repeat:no-repeat;background-position:right;-moz-border-radius:0 !important;-webkit-border-radius:0;border-radius:0 !important}.sm-dox a:hover{background-image:var(--nav-gradient-active-image);background-repeat:repeat-x;color:var(--nav-text-hover-color);text-shadow:var(--nav-text-hover-shadow)}.sm-dox a:hover span.sub-arrow{border-color:var(--nav-text-hover-color) transparent transparent transparent}.sm-dox a.has-submenu{padding-right:24px}.sm-dox li{border-top:0}.sm-dox>li>ul:before,.sm-dox>li>ul:after{content:'';position:absolute;top:-18px;left:30px;width:0;height:0;overflow:hidden;border-width:9px;border-style:dashed dashed solid dashed;border-color:transparent transparent #bbb transparent}.sm-dox>li>ul:after{top:-16px;left:31px;border-width:8px;border-color:transparent transparent var(--nav-menu-background-color) transparent}.sm-dox ul{border:1px solid #bbb;padding:5px 0;background:var(--nav-menu-background-color);-moz-border-radius:5px !important;-webkit-border-radius:5px;border-radius:5px !important;-moz-box-shadow:0 5px 9px rgba(0,0,0,0.2);-webkit-box-shadow:0 5px 9px rgba(0,0,0,0.2);box-shadow:0 5px 9px rgba(0,0,0,0.2)}.sm-dox ul a span.sub-arrow{right:8px;top:50%;margin-top:-5px;border-width:5px;border-color:transparent transparent transparent var(--nav-menu-foreground-color);border-style:dashed dashed dashed solid}.sm-dox ul a,.sm-dox ul a:hover,.sm-dox ul a:focus,.sm-dox ul a:active,.sm-dox ul a.highlighted{color:var(--nav-menu-foreground-color);background-image:none;border:0 !important}.sm-dox ul a:hover{background-image:var(--nav-gradient-active-image);background-repeat:repeat-x;color:var(--nav-text-hover-color);text-shadow:var(--nav-text-hover-shadow)}.sm-dox ul a:hover span.sub-arrow{border-color:transparent transparent transparent var(--nav-text-hover-color)}.sm-dox span.scroll-up,.sm-dox span.scroll-down{position:absolute;display:none;visibility:hidden;overflow:hidden;background:var(--nav-menu-background-color);height:36px}.sm-dox span.scroll-up:hover,.sm-dox span.scroll-down:hover{background:#eee}.sm-dox span.scroll-up:hover span.scroll-up-arrow,.sm-dox span.scroll-up:hover span.scroll-down-arrow{border-color:transparent transparent #d23600 transparent}.sm-dox span.scroll-down:hover span.scroll-down-arrow{border-color:#d23600 transparent transparent transparent}.sm-dox span.scroll-up-arrow,.sm-dox span.scroll-down-arrow{position:absolute;top:0;left:50%;margin-left:-6px;width:0;height:0;overflow:hidden;border-width:6px;border-style:dashed dashed solid dashed;border-color:transparent transparent var(--nav-menu-foreground-color) transparent}.sm-dox span.scroll-down-arrow{top:8px;border-style:solid dashed dashed dashed;border-color:var(--nav-menu-foreground-color) transparent transparent transparent}.sm-dox.sm-rtl a.has-submenu{padding-right:12px;padding-left:24px}.sm-dox.sm-rtl a span.sub-arrow{right:auto;left:12px}.sm-dox.sm-rtl.sm-vertical a.has-submenu{padding:10px 20px}.sm-dox.sm-rtl.sm-vertical a span.sub-arrow{right:auto;left:8px;border-style:dashed solid dashed dashed;border-color:transparent #555 transparent transparent}.sm-dox.sm-rtl>li>ul:before{left:auto;right:30px}.sm-dox.sm-rtl>li>ul:after{left:auto;right:31px}.sm-dox.sm-rtl ul a.has-submenu{padding:10px 20px !important}.sm-dox.sm-rtl ul a span.sub-arrow{right:auto;left:8px;border-style:dashed solid dashed dashed;border-color:transparent #555 transparent transparent}.sm-dox.sm-vertical{padding:10px 0;-moz-border-radius:5px;-webkit-border-radius:5px;border-radius:5px}.sm-dox.sm-vertical a{padding:10px 20px}.sm-dox.sm-vertical a:hover,.sm-dox.sm-vertical a:focus,.sm-dox.sm-vertical a:active,.sm-dox.sm-vertical a.highlighted{background:#fff}.sm-dox.sm-vertical a.disabled{background-image:var(--nav-gradient-image)}.sm-dox.sm-vertical a span.sub-arrow{right:8px;top:50%;margin-top:-5px;border-width:5px;border-style:dashed dashed dashed solid;border-color:transparent transparent transparent #555}.sm-dox.sm-vertical>li>ul:before,.sm-dox.sm-vertical>li>ul:after{display:none}.sm-dox.sm-vertical ul a{padding:10px 20px}.sm-dox.sm-vertical ul a:hover,.sm-dox.sm-vertical ul a:focus,.sm-dox.sm-vertical ul a:active,.sm-dox.sm-vertical ul a.highlighted{background:#eee}.sm-dox.sm-vertical ul a.disabled{background:var(--nav-menu-background-color)}} \ No newline at end of file diff --git a/External/open-cpp-utils/Documentation/html/template__utils_8h.html b/External/open-cpp-utils/Documentation/html/template__utils_8h.html new file mode 100644 index 0000000..7b024dc --- /dev/null +++ b/External/open-cpp-utils/Documentation/html/template__utils_8h.html @@ -0,0 +1,148 @@ + + + + + + + +open-cpp-utils: template_utils.h File Reference + + + + + + + + + + + +
    +
    + + + + + + +
    +
    open-cpp-utils 0.0.1 +
    +
    +
    + + + + + + + + +
    +
    + + +
    +
    +
    +
    +
    +
    Loading...
    +
    Searching...
    +
    No Matches
    +
    +
    +
    +
    + +
    +
    + +
    template_utils.h File Reference
    +
    +
    + +

    Provides compile time evaluation utilities for templates and template packs. +More...

    + +

    Go to the source code of this file.

    + + + + + +

    +Classes

    struct  open_cpp_utils::constant_value< T, V >
     Compile-time constant value. More...
     
    + + + + + + + + + + + +

    +Typedefs

    template<bool V>
    using open_cpp_utils::bool_constant = constant_value<bool, V>
     Compile-time constant boolean value.
     
    +using open_cpp_utils::true_type = bool_constant<true>
     Constant True value.
     
    +using open_cpp_utils::false_type = bool_constant<false>
     Constant False value.
     
    + + + + +

    +Variables

    +template<typename T , typename... Ts>
    constexpr bool open_cpp_utils::is_unique< T, Ts... > = bool_constant<(!is_same<T, Ts> && ...) && is_unique<Ts...>>{}
     
    +

    Detailed Description

    +

    Provides compile time evaluation utilities for templates and template packs.

    +

    Typedef Documentation

    + +

    ◆ bool_constant

    + +
    +
    +
    +template<bool V>
    + + + + +
    using open_cpp_utils::bool_constant = constant_value<bool, V>
    +
    + +

    Compile-time constant boolean value.

    +
    Template Parameters
    + + +
    VValue
    +
    +
    + +
    +
    +
    + + + + diff --git a/External/open-cpp-utils/Documentation/html/template__utils_8h_source.html b/External/open-cpp-utils/Documentation/html/template__utils_8h_source.html new file mode 100644 index 0000000..ab120f8 --- /dev/null +++ b/External/open-cpp-utils/Documentation/html/template__utils_8h_source.html @@ -0,0 +1,145 @@ + + + + + + + +open-cpp-utils: template_utils.h Source File + + + + + + + + + + + +
    +
    + + + + + + +
    +
    open-cpp-utils 0.0.1 +
    +
    +
    + + + + + + + + +
    + +
    +
    + + +
    +
    +
    +
    +
    +
    Loading...
    +
    Searching...
    +
    No Matches
    +
    +
    +
    +
    + +
    +
    template_utils.h
    +
    +
    +Go to the documentation of this file.
    1// =====================================================================================================================
    +
    2// Copyright 2024 Medusa Slockbower
    +
    3// Licensed under the Apache License, Version 2.0 (the "License");
    +
    4// you may not use this file except in compliance with the License.
    +
    5// You may obtain a copy of the License at
    +
    6//
    +
    7// http://www.apache.org/licenses/LICENSE-2.0
    +
    8//
    +
    9// Unless required by applicable law or agreed to in writing, software
    +
    10// distributed under the License is distributed on an "AS IS" BASIS,
    +
    11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    +
    12// See the License for the specific language governing permissions and
    +
    13// limitations under the License.
    +
    14// =====================================================================================================================
    +
    15
    +
    16#ifndef TEMPLATEUTILS_H
    +
    17#define TEMPLATEUTILS_H
    +
    18
    +
    19namespace open_cpp_utils
    +
    20{
    +
    21
    +
    32template<typename T, T V>
    +
    + +
    34{
    +
    35 using type = T;
    +
    36 static constexpr type value = V;
    +
    37
    +
    38 constexpr operator type() const noexcept { return value; }
    +
    39 [[nodiscard]] constexpr type operator()() const { return value; }
    +
    40};
    +
    +
    41
    +
    46template<bool V>
    + +
    48
    + + +
    51
    +
    55template<typename, typename>
    +
    56inline static constexpr bool is_same = false_type{};
    +
    57
    +
    61template<typename T>
    +
    62inline static constexpr bool is_same<T, T> = true_type{};
    +
    63
    +
    68template<typename...Ts>
    +
    69inline static constexpr bool is_unique = true_type{};
    +
    70
    +
    71template<typename T, typename...Ts>
    +
    72inline constexpr bool is_unique<T, Ts...> = bool_constant<(!is_same<T, Ts> && ...) && is_unique<Ts...>>{};
    +
    73
    +
    74}
    +
    75
    +
    76#endif //TEMPLATEUTILS_H
    +
    Compile-time constant value.
    Definition template_utils.h:34
    +
    constant_value< bool, V > bool_constant
    Compile-time constant boolean value.
    Definition template_utils.h:47
    +
    bool_constant< true > true_type
    Constant True value.
    Definition template_utils.h:49
    +
    + + + + diff --git a/External/open-cpp-utils/Documentation/html/types_8h_source.html b/External/open-cpp-utils/Documentation/html/types_8h_source.html new file mode 100644 index 0000000..0e975c5 --- /dev/null +++ b/External/open-cpp-utils/Documentation/html/types_8h_source.html @@ -0,0 +1,140 @@ + + + + + + + +open-cpp-utils: types.h Source File + + + + + + + + + + + +
    +
    + + + + + + +
    +
    open-cpp-utils 0.0.1 +
    +
    +
    + + + + + + + + +
    + +
    +
    + + +
    +
    +
    +
    +
    +
    Loading...
    +
    Searching...
    +
    No Matches
    +
    +
    +
    +
    + +
    +
    types.h
    +
    +
    +
    1//
    +
    2// Created by Maddie on 7/25/2024.
    +
    3//
    +
    4
    +
    5#ifndef TYPES_H
    +
    6#define TYPES_H
    +
    7
    +
    8#include <stdint.h>
    +
    9
    +
    10namespace open_cpp_utils
    +
    11{
    +
    12
    +
    13using ::int8_t;
    +
    14using ::int16_t;
    +
    15using ::int32_t;
    +
    16using ::int64_t;
    +
    17
    +
    18using ::int_fast8_t;
    +
    19using ::int_fast16_t;
    +
    20using ::int_fast32_t;
    +
    21using ::int_fast64_t;
    +
    22
    +
    23using ::int_least8_t;
    +
    24using ::int_least16_t;
    +
    25using ::int_least32_t;
    +
    26using ::int_least64_t;
    +
    27
    +
    28using ::intmax_t;
    +
    29using ::intptr_t;
    +
    30
    +
    31using ::uint8_t;
    +
    32using ::uint16_t;
    +
    33using ::uint32_t;
    +
    34using ::uint64_t;
    +
    35
    +
    36using ::uint_fast8_t;
    +
    37using ::uint_fast16_t;
    +
    38using ::uint_fast32_t;
    +
    39using ::uint_fast64_t;
    +
    40
    +
    41using ::uint_least8_t;
    +
    42using ::uint_least16_t;
    +
    43using ::uint_least32_t;
    +
    44using ::uint_least64_t;
    +
    45
    +
    46using ::uintmax_t;
    +
    47using ::uintptr_t;
    +
    48
    +
    49}
    +
    50
    +
    51
    +
    52#endif //TYPES_H
    +
    + + + + diff --git a/External/open-cpp-utils/Documentation/html/unique__id_8h_source.html b/External/open-cpp-utils/Documentation/html/unique__id_8h_source.html new file mode 100644 index 0000000..5d8262f --- /dev/null +++ b/External/open-cpp-utils/Documentation/html/unique__id_8h_source.html @@ -0,0 +1,131 @@ + + + + + + + +open-cpp-utils: unique_id.h Source File + + + + + + + + + + + +
    +
    + + + + + + +
    +
    open-cpp-utils 0.0.1 +
    +
    +
    + + + + + + + + +
    + +
    +
    + + +
    +
    +
    +
    +
    +
    Loading...
    +
    Searching...
    +
    No Matches
    +
    +
    +
    +
    + +
    +
    unique_id.h
    +
    +
    +
    1// =====================================================================================================================
    +
    2// Copyright 2024 Medusa Slockbower
    +
    3// Licensed under the Apache License, Version 2.0 (the "License");
    +
    4// you may not use this file except in compliance with the License.
    +
    5// You may obtain a copy of the License at
    +
    6//
    +
    7// http://www.apache.org/licenses/LICENSE-2.0
    +
    8//
    +
    9// Unless required by applicable law or agreed to in writing, software
    +
    10// distributed under the License is distributed on an "AS IS" BASIS,
    +
    11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    +
    12// See the License for the specific language governing permissions and
    +
    13// limitations under the License.
    +
    14// =====================================================================================================================
    +
    15
    +
    16#ifndef ENGINE_UNIQUEID_H
    +
    17#define ENGINE_UNIQUEID_H
    +
    18
    +
    19#include "types.h"
    +
    20
    +
    21namespace open_cpp_utils
    +
    22{
    +
    23
    +
    24// Internal function for incrementing an id associated with a type
    +
    25template<typename Base> uint64_t _increment_id()
    +
    26{
    +
    27 static uint64_t current = 0;
    +
    28 return current++;
    +
    29}
    +
    30
    +
    44template<typename Base, typename Type> uint64_t unique_id()
    +
    45{
    +
    46 static bool initialized = false;
    +
    47 static uint64_t id = 0;
    +
    48
    +
    49 if(initialized) return id;
    +
    50 initialized = true;
    +
    51 return id = _increment_id<Base>();
    +
    52}
    +
    53
    +
    54}
    +
    55
    +
    56#endif //ENGINE_UNIQUEID_H
    +
    + + + + diff --git a/External/open-cpp-utils/Documentation/latex/annotated.tex b/External/open-cpp-utils/Documentation/latex/annotated.tex new file mode 100644 index 0000000..a54723e --- /dev/null +++ b/External/open-cpp-utils/Documentation/latex/annotated.tex @@ -0,0 +1,17 @@ +\doxysection{Class List} +Here are the classes, structs, unions and interfaces with brief descriptions\+:\begin{DoxyCompactList} +\item\contentsline{section}{\mbox{\hyperlink{classopen__cpp__utils_1_1any}{open\+\_\+cpp\+\_\+utils\+::any$<$ Ts $>$}} \\*Wrapper for a value with multiple types }{\pageref{classopen__cpp__utils_1_1any}}{} +\item\contentsline{section}{\mbox{\hyperlink{classopen__cpp__utils_1_1any_3_01_t_00_01_rest_8_8_8_01_4}{open\+\_\+cpp\+\_\+utils\+::any$<$ T, Rest... $>$}} }{\pageref{classopen__cpp__utils_1_1any_3_01_t_00_01_rest_8_8_8_01_4}}{} +\item\contentsline{section}{\mbox{\hyperlink{classopen__cpp__utils_1_1any_3_4}{open\+\_\+cpp\+\_\+utils\+::any$<$$>$}} }{\pageref{classopen__cpp__utils_1_1any_3_4}}{} +\item\contentsline{section}{\mbox{\hyperlink{classopen__cpp__utils_1_1directed__tree_1_1breadth__first}{open\+\_\+cpp\+\_\+utils\+::directed\+\_\+tree$<$ T $>$\+::breadth\+\_\+first}} \\*Breadth first traversal }{\pageref{classopen__cpp__utils_1_1directed__tree_1_1breadth__first}}{} +\item\contentsline{section}{\mbox{\hyperlink{structopen__cpp__utils_1_1constant__value}{open\+\_\+cpp\+\_\+utils\+::constant\+\_\+value$<$ T, V $>$}} \\*Compile-\/time constant value }{\pageref{structopen__cpp__utils_1_1constant__value}}{} +\item\contentsline{section}{\mbox{\hyperlink{classopen__cpp__utils_1_1directed__tree}{open\+\_\+cpp\+\_\+utils\+::directed\+\_\+tree$<$ T $>$}} \\*Class for creating a directed tree }{\pageref{classopen__cpp__utils_1_1directed__tree}}{} +\item\contentsline{section}{\mbox{\hyperlink{classopen__cpp__utils_1_1dyn__array}{open\+\_\+cpp\+\_\+utils\+::dyn\+\_\+array$<$ T, N $>$}} }{\pageref{classopen__cpp__utils_1_1dyn__array}}{} +\item\contentsline{section}{\mbox{\hyperlink{structopen__cpp__utils_1_1fixed__array}{open\+\_\+cpp\+\_\+utils\+::fixed\+\_\+array$<$ T, N $>$}} }{\pageref{structopen__cpp__utils_1_1fixed__array}}{} +\item\contentsline{section}{\mbox{\hyperlink{structopen__cpp__utils_1_1fixed__array_3_01_t_00_01_n_01_4}{open\+\_\+cpp\+\_\+utils\+::fixed\+\_\+array$<$ T, N $>$}} \\*Wrapper for array of type T with fixed length N }{\pageref{structopen__cpp__utils_1_1fixed__array_3_01_t_00_01_n_01_4}}{} +\item\contentsline{section}{\mbox{\hyperlink{classopen__cpp__utils_1_1directed__tree_1_1in__order}{open\+\_\+cpp\+\_\+utils\+::directed\+\_\+tree$<$ T $>$\+::in\+\_\+order}} \\*In-\/order traversal }{\pageref{classopen__cpp__utils_1_1directed__tree_1_1in__order}}{} +\item\contentsline{section}{\mbox{\hyperlink{classopen__cpp__utils_1_1optional}{open\+\_\+cpp\+\_\+utils\+::optional$<$ T $>$}} }{\pageref{classopen__cpp__utils_1_1optional}}{} +\item\contentsline{section}{\mbox{\hyperlink{classopen__cpp__utils_1_1directed__tree_1_1post__order}{open\+\_\+cpp\+\_\+utils\+::directed\+\_\+tree$<$ T $>$\+::post\+\_\+order}} \\*Post-\/order traversal }{\pageref{classopen__cpp__utils_1_1directed__tree_1_1post__order}}{} +\item\contentsline{section}{\mbox{\hyperlink{classopen__cpp__utils_1_1directed__tree_1_1pre__order}{open\+\_\+cpp\+\_\+utils\+::directed\+\_\+tree$<$ T $>$\+::pre\+\_\+order}} \\*Pre-\/order traversal }{\pageref{classopen__cpp__utils_1_1directed__tree_1_1pre__order}}{} +\item\contentsline{section}{\mbox{\hyperlink{classopen__cpp__utils_1_1directed__tree_1_1traverser}{open\+\_\+cpp\+\_\+utils\+::directed\+\_\+tree$<$ T $>$\+::traverser$<$ V, O $>$}} \\*Visitor pattern for traversing the tree }{\pageref{classopen__cpp__utils_1_1directed__tree_1_1traverser}}{} +\end{DoxyCompactList} diff --git a/External/open-cpp-utils/Documentation/latex/any_8h_source.tex b/External/open-cpp-utils/Documentation/latex/any_8h_source.tex new file mode 100644 index 0000000..7b7818f --- /dev/null +++ b/External/open-cpp-utils/Documentation/latex/any_8h_source.tex @@ -0,0 +1,89 @@ +\doxysection{any.\+h} +\hypertarget{any_8h_source}{}\label{any_8h_source} +\begin{DoxyCode}{0} +\DoxyCodeLine{00001\ \textcolor{comment}{//\ =====================================================================================================================}} +\DoxyCodeLine{00002\ \textcolor{comment}{//\ Copyright\ 2024\ Medusa\ Slockbower}} +\DoxyCodeLine{00003\ \textcolor{comment}{//\ Licensed\ under\ the\ Apache\ License,\ Version\ 2.0\ (the\ "{}License"{});}} +\DoxyCodeLine{00004\ \textcolor{comment}{//\ you\ may\ not\ use\ this\ file\ except\ in\ compliance\ with\ the\ License.}} +\DoxyCodeLine{00005\ \textcolor{comment}{//\ You\ may\ obtain\ a\ copy\ of\ the\ License\ at}} +\DoxyCodeLine{00006\ \textcolor{comment}{//}} +\DoxyCodeLine{00007\ \textcolor{comment}{//\ \ http://www.apache.org/licenses/LICENSE-\/2.0}} +\DoxyCodeLine{00008\ \textcolor{comment}{//}} +\DoxyCodeLine{00009\ \textcolor{comment}{//\ Unless\ required\ by\ applicable\ law\ or\ agreed\ to\ in\ writing,\ software}} +\DoxyCodeLine{00010\ \textcolor{comment}{//\ distributed\ under\ the\ License\ is\ distributed\ on\ an\ "{}AS\ IS"{}\ BASIS,}} +\DoxyCodeLine{00011\ \textcolor{comment}{//\ WITHOUT\ WARRANTIES\ OR\ CONDITIONS\ OF\ ANY\ KIND,\ either\ express\ or\ implied.}} +\DoxyCodeLine{00012\ \textcolor{comment}{//\ See\ the\ License\ for\ the\ specific\ language\ governing\ permissions\ and}} +\DoxyCodeLine{00013\ \textcolor{comment}{//\ limitations\ under\ the\ License.}} +\DoxyCodeLine{00014\ \textcolor{comment}{//\ =====================================================================================================================}} +\DoxyCodeLine{00015\ } +\DoxyCodeLine{00016\ \textcolor{preprocessor}{\#ifndef\ ANY\_H}} +\DoxyCodeLine{00017\ \textcolor{preprocessor}{\#define\ ANY\_H}} +\DoxyCodeLine{00018\ } +\DoxyCodeLine{00019\ \textcolor{preprocessor}{\#include\ "{}\mbox{\hyperlink{template__utils_8h}{template\_utils.h}}"{}}} +\DoxyCodeLine{00020\ } +\DoxyCodeLine{00021\ \textcolor{keyword}{namespace\ }open\_cpp\_utils} +\DoxyCodeLine{00022\ \{} +\DoxyCodeLine{00023\ } +\DoxyCodeLine{00028\ \textcolor{keyword}{template}<\textcolor{keyword}{typename}...Ts>\ \textcolor{keyword}{class\ }\mbox{\hyperlink{classopen__cpp__utils_1_1any}{any}};} +\DoxyCodeLine{00029\ } +\DoxyCodeLine{00030\ \textcolor{keyword}{template}<\textcolor{keyword}{typename}\ T,\ \textcolor{keyword}{typename}...Rest>} +\DoxyCodeLine{00031\ \textcolor{keyword}{class\ }\mbox{\hyperlink{classopen__cpp__utils_1_1any}{any}}\ :\ \textcolor{keyword}{public}\ \mbox{\hyperlink{classopen__cpp__utils_1_1any}{any}}} +\DoxyCodeLine{00032\ \{} +\DoxyCodeLine{00033\ \textcolor{comment}{//\ Assertions\ ==========================================================================================================}} +\DoxyCodeLine{00034\ } +\DoxyCodeLine{00035\ \ \ \ \ \textcolor{keyword}{static\_assert}(is\_unique);} +\DoxyCodeLine{00036\ } +\DoxyCodeLine{00037\ } +\DoxyCodeLine{00038\ \textcolor{comment}{//\ Typedefs\ ============================================================================================================}} +\DoxyCodeLine{00039\ } +\DoxyCodeLine{00040\ \textcolor{keyword}{public}:} +\DoxyCodeLine{00041\ \ \ \ \ \textcolor{keyword}{using\ }\mbox{\hyperlink{classopen__cpp__utils_1_1any}{base\_type}}\ =\ \mbox{\hyperlink{classopen__cpp__utils_1_1any}{any}};} +\DoxyCodeLine{00042\ \ \ \ \ \textcolor{keyword}{using\ }this\_type\ =\ T;} +\DoxyCodeLine{00043\ } +\DoxyCodeLine{00044\ } +\DoxyCodeLine{00045\ \textcolor{comment}{//\ Constructors\ ========================================================================================================}} +\DoxyCodeLine{00046\ } +\DoxyCodeLine{00047\ \textcolor{keyword}{public}:} +\DoxyCodeLine{00048\ \ \ \ \ \mbox{\hyperlink{classopen__cpp__utils_1_1any}{any}}()\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ :\ \mbox{\hyperlink{classopen__cpp__utils_1_1any}{base\_type}}()\ \ \ \ \ \ \ \ ,\ Value()\ \{\ \}} +\DoxyCodeLine{00049\ \ \ \ \ \mbox{\hyperlink{classopen__cpp__utils_1_1any}{any}}(\textcolor{keyword}{const}\ this\_type\&\ value,\ \textcolor{keyword}{const}\ Rest\&...other)\ :\ \mbox{\hyperlink{classopen__cpp__utils_1_1any}{base\_type}}(other...),\ Value(value)\ \{\ \}} +\DoxyCodeLine{00050\ \ \ \ \ \mbox{\hyperlink{classopen__cpp__utils_1_1any}{any}}(this\_type\&\&\ value,\ Rest\&\&...other)\ \ \ \ \ \ \ \ \ \ \ :\ \mbox{\hyperlink{classopen__cpp__utils_1_1any}{base\_type}}(other...),\ Value(value)\ \{\ \}} +\DoxyCodeLine{00051\ \ \ \ \ \mbox{\hyperlink{classopen__cpp__utils_1_1any}{any}}(\textcolor{keyword}{const}\ \mbox{\hyperlink{classopen__cpp__utils_1_1any}{any}}\&\ other)\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ =\ \textcolor{keywordflow}{default};} +\DoxyCodeLine{00052\ \ \ \ \ \mbox{\hyperlink{classopen__cpp__utils_1_1any}{any}}(\mbox{\hyperlink{classopen__cpp__utils_1_1any}{any}}\&\&\ other)\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ =\ \textcolor{keywordflow}{default};} +\DoxyCodeLine{00053\ \ \ \ \ \mbox{\hyperlink{classopen__cpp__utils_1_1any}{\string~any}}()\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ =\ \textcolor{keywordflow}{default};} +\DoxyCodeLine{00054\ } +\DoxyCodeLine{00055\ } +\DoxyCodeLine{00056\ \textcolor{comment}{//\ Operators\ ===========================================================================================================}} +\DoxyCodeLine{00057\ } +\DoxyCodeLine{00058\ \textcolor{keyword}{public}:} +\DoxyCodeLine{00059\ } +\DoxyCodeLine{00060\ \textcolor{comment}{//\ Assignment\ operators\ -\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/}} +\DoxyCodeLine{00061\ \ \ \ \ \mbox{\hyperlink{classopen__cpp__utils_1_1any}{any}}\&\ operator=(\textcolor{keyword}{const}\ \mbox{\hyperlink{classopen__cpp__utils_1_1any}{any}}\&)\ =\ \textcolor{keywordflow}{default};} +\DoxyCodeLine{00062\ \ \ \ \ \mbox{\hyperlink{classopen__cpp__utils_1_1any}{any}}\&\ operator=(\mbox{\hyperlink{classopen__cpp__utils_1_1any}{any}}\&\&)\ \ \ \ \ \ =\ \textcolor{keywordflow}{default};} +\DoxyCodeLine{00063\ } +\DoxyCodeLine{00064\ } +\DoxyCodeLine{00065\ \textcolor{comment}{//\ Cast\ operators\ -\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/}} +\DoxyCodeLine{00066\ } +\DoxyCodeLine{00067\ \ \ \ \ \textcolor{keyword}{operator}\ \ \ \ \ \ \ this\_type\ \ ()\textcolor{keyword}{\ const\ }\{\ \textcolor{keywordflow}{return}\ \ Value;\ \}} +\DoxyCodeLine{00068\ \ \ \ \ \textcolor{keyword}{operator}\ \ \ \ \ \ \ this\_type\&\ ()\ \ \ \ \ \ \ \{\ \textcolor{keywordflow}{return}\ \ Value;\ \}} +\DoxyCodeLine{00069\ \ \ \ \ \textcolor{keyword}{operator}\ \textcolor{keyword}{const}\ this\_type\&\ ()\ \textcolor{keyword}{const}\ \{\ \textcolor{keywordflow}{return}\ \ Value;\ \}} +\DoxyCodeLine{00070\ \ \ \ \ \textcolor{keyword}{operator}\ \ \ \ \ \ \ this\_type\&\&()\ \ \ \ \ \ \ \{\ \textcolor{keywordflow}{return}\ \ Value;\ \}} +\DoxyCodeLine{00071\ \ \ \ \ \textcolor{keyword}{operator}\ \ \ \ \ \ \ this\_type*\ ()\ \ \ \ \ \ \ \{\ \textcolor{keywordflow}{return}\ \&Value;\ \}} +\DoxyCodeLine{00072\ \ \ \ \ \textcolor{keyword}{operator}\ \textcolor{keyword}{const}\ this\_type*\ ()\ \textcolor{keyword}{const}\ \{\ \textcolor{keywordflow}{return}\ \&Value;\ \}} +\DoxyCodeLine{00073\ } +\DoxyCodeLine{00074\ } +\DoxyCodeLine{00075\ \textcolor{comment}{//\ Variables\ ===========================================================================================================}} +\DoxyCodeLine{00076\ } +\DoxyCodeLine{00077\ \textcolor{keyword}{private}:} +\DoxyCodeLine{00078\ \ \ \ \ \textcolor{keyword}{static}\ \textcolor{keyword}{constexpr}\ \textcolor{keywordtype}{size\_t}\ Size\ =\ \textcolor{keyword}{sizeof}...(Rest);} +\DoxyCodeLine{00079\ \ \ \ \ this\_type\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ Value;} +\DoxyCodeLine{00080\ \};} +\DoxyCodeLine{00081\ } +\DoxyCodeLine{00082\ \textcolor{keyword}{template}<>} +\DoxyCodeLine{00083\ \textcolor{keyword}{class\ }\mbox{\hyperlink{classopen__cpp__utils_1_1any}{any}}<>\ \{\ \};} +\DoxyCodeLine{00084\ } +\DoxyCodeLine{00085\ \}} +\DoxyCodeLine{00086\ } +\DoxyCodeLine{00087\ } +\DoxyCodeLine{00088\ \textcolor{preprocessor}{\#endif\ }\textcolor{comment}{//ANY\_H}} + +\end{DoxyCode} diff --git a/External/open-cpp-utils/Documentation/latex/array_8h_source.tex b/External/open-cpp-utils/Documentation/latex/array_8h_source.tex new file mode 100644 index 0000000..cb86f4c --- /dev/null +++ b/External/open-cpp-utils/Documentation/latex/array_8h_source.tex @@ -0,0 +1,67 @@ +\doxysection{array.\+h} +\hypertarget{array_8h_source}{}\label{array_8h_source} +\begin{DoxyCode}{0} +\DoxyCodeLine{00001\ \textcolor{comment}{//}} +\DoxyCodeLine{00002\ \textcolor{comment}{//\ Created\ by\ Maddie\ on\ 7/25/2024.}} +\DoxyCodeLine{00003\ \textcolor{comment}{//}} +\DoxyCodeLine{00004\ } +\DoxyCodeLine{00005\ \textcolor{preprocessor}{\#ifndef\ ARRAY\_H}} +\DoxyCodeLine{00006\ \textcolor{preprocessor}{\#define\ ARRAY\_H}} +\DoxyCodeLine{00007\ } +\DoxyCodeLine{00008\ \textcolor{preprocessor}{\#include\ "{}\mbox{\hyperlink{template__utils_8h}{template\_utils.h}}"{}}} +\DoxyCodeLine{00009\ } +\DoxyCodeLine{00010\ \textcolor{preprocessor}{\#include\ }} +\DoxyCodeLine{00011\ } +\DoxyCodeLine{00012\ \textcolor{preprocessor}{\#include\ }} +\DoxyCodeLine{00013\ } +\DoxyCodeLine{00014\ \textcolor{keyword}{namespace\ }open\_cpp\_utils} +\DoxyCodeLine{00015\ \{} +\DoxyCodeLine{00016\ } +\DoxyCodeLine{00017\ \textcolor{comment}{//\ =====================================================================================================================}} +\DoxyCodeLine{00018\ \textcolor{comment}{//\ Forward\ Definitions}} +\DoxyCodeLine{00019\ \textcolor{comment}{//\ =====================================================================================================================}} +\DoxyCodeLine{00020\ \textcolor{keyword}{template}<\textcolor{keyword}{typename}\ T,\ \textcolor{keywordtype}{size\_t}\ N>\ \textcolor{keyword}{struct\ }\mbox{\hyperlink{structopen__cpp__utils_1_1fixed__array}{fixed\_array}};} +\DoxyCodeLine{00021\ \textcolor{keyword}{template}<\textcolor{keyword}{typename}\ T,\ \textcolor{keywordtype}{size\_t}\ N>\ \textcolor{keyword}{class\ \ }\mbox{\hyperlink{classopen__cpp__utils_1_1dyn__array}{dyn\_array}};} +\DoxyCodeLine{00022\ \textcolor{keyword}{template}<\textcolor{keyword}{typename}\ T,\ \textcolor{keywordtype}{size\_t}\ N>\ \textcolor{keyword}{using\ \ }\mbox{\hyperlink{structopen__cpp__utils_1_1fixed__array_3_01_t_00_01_n_01_4}{array}}\ =\ \mbox{\hyperlink{structopen__cpp__utils_1_1fixed__array}{fixed\_array}};} +\DoxyCodeLine{00023\ } +\DoxyCodeLine{00024\ } +\DoxyCodeLine{00025\ \textcolor{comment}{//\ =====================================================================================================================}} +\DoxyCodeLine{00026\ \textcolor{comment}{//\ Fixed\ Array}} +\DoxyCodeLine{00027\ \textcolor{comment}{//\ =====================================================================================================================}} +\DoxyCodeLine{00028\ } +\DoxyCodeLine{00034\ \textcolor{keyword}{template}<\textcolor{keyword}{typename}\ T,\ \textcolor{keywordtype}{size\_t}\ N>} +\DoxyCodeLine{00035\ \textcolor{keyword}{struct\ }\mbox{\hyperlink{structopen__cpp__utils_1_1fixed__array}{fixed\_array}}} +\DoxyCodeLine{00036\ \{} +\DoxyCodeLine{00037\ \textcolor{comment}{//\ Typedefs\ ============================================================================================================}} +\DoxyCodeLine{00038\ } +\DoxyCodeLine{00039\ \textcolor{keyword}{public}:} +\DoxyCodeLine{00040\ \ \ \ \ \textcolor{keyword}{using\ }value\_type\ =\ T;} +\DoxyCodeLine{00041\ \ \ \ \ \textcolor{keyword}{using\ }array\_type\ =\ value\_type[N];} +\DoxyCodeLine{00042\ \ \ \ \ \textcolor{keyword}{using\ }size\_type\ =\ size\_t;} +\DoxyCodeLine{00043\ } +\DoxyCodeLine{00044\ \textcolor{comment}{//\ Functions\ ===========================================================================================================}} +\DoxyCodeLine{00045\ } +\DoxyCodeLine{00046\ \textcolor{keyword}{public}:} +\DoxyCodeLine{00047\ } +\DoxyCodeLine{00048\ \textcolor{comment}{//\ Constructors\ \&\ Destructor\ -\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/}} +\DoxyCodeLine{00049\ } +\DoxyCodeLine{00050\ \ \ \ \ \textcolor{keyword}{constexpr}\ \mbox{\hyperlink{structopen__cpp__utils_1_1fixed__array}{fixed\_array}}()\ :\ data\_\{\ T()\ \}\ \{\}} +\DoxyCodeLine{00051\ \ \ \ \ \textcolor{keyword}{constexpr}\ \mbox{\hyperlink{structopen__cpp__utils_1_1fixed__array}{fixed\_array}}(\textcolor{keyword}{const}\ \mbox{\hyperlink{structopen__cpp__utils_1_1fixed__array}{fixed\_array}}\&\ \mbox{\hyperlink{structopen__cpp__utils_1_1fixed__array_3_01_t_00_01_n_01_4}{array}})\ :\ data\_\{\ \mbox{\hyperlink{structopen__cpp__utils_1_1fixed__array_3_01_t_00_01_n_01_4}{array}}.data\_\ \}\ \{\}} +\DoxyCodeLine{00052\ \ \ \ \ \textcolor{keyword}{constexpr}\ \mbox{\hyperlink{structopen__cpp__utils_1_1fixed__array}{fixed\_array}}(\textcolor{keyword}{const}\ array\_type\&\ data)\ :\ data\_\{\ data\ \}\ \{\}} +\DoxyCodeLine{00053\ } +\DoxyCodeLine{00054\ \ \ \ \ \textcolor{keyword}{constexpr}\ size\_type\ size()\ \{\ \textcolor{keywordflow}{return}\ N;\ \}} +\DoxyCodeLine{00055\ } +\DoxyCodeLine{00056\ } +\DoxyCodeLine{00057\ \textcolor{comment}{//\ Variables\ ===========================================================================================================}} +\DoxyCodeLine{00058\ } +\DoxyCodeLine{00059\ \textcolor{keyword}{private}:} +\DoxyCodeLine{00060\ \ \ \ \ array\_type\ data\_;} +\DoxyCodeLine{00061\ } +\DoxyCodeLine{00062\ \};} +\DoxyCodeLine{00063\ } +\DoxyCodeLine{00064\ \}} +\DoxyCodeLine{00065\ } +\DoxyCodeLine{00066\ } +\DoxyCodeLine{00067\ \textcolor{preprocessor}{\#endif\ }\textcolor{comment}{//ARRAY\_H}} + +\end{DoxyCode} diff --git a/External/open-cpp-utils/Documentation/latex/classopen__cpp__utils_1_1any.tex b/External/open-cpp-utils/Documentation/latex/classopen__cpp__utils_1_1any.tex new file mode 100644 index 0000000..b7b58c2 --- /dev/null +++ b/External/open-cpp-utils/Documentation/latex/classopen__cpp__utils_1_1any.tex @@ -0,0 +1,24 @@ +\doxysection{open\+\_\+cpp\+\_\+utils\+::any\texorpdfstring{$<$}{<} Ts \texorpdfstring{$>$}{>} Class Template Reference} +\hypertarget{classopen__cpp__utils_1_1any}{}\label{classopen__cpp__utils_1_1any}\index{open\_cpp\_utils::any$<$ Ts $>$@{open\_cpp\_utils::any$<$ Ts $>$}} + + +Wrapper for a value with multiple types. + + + + +\doxysubsection{Detailed Description} +\subsubsection*{template$<$typename... Ts$>$\newline +class open\+\_\+cpp\+\_\+utils\+::any$<$ Ts $>$} +Wrapper for a value with multiple types. + + +\begin{DoxyTemplParams}{Template Parameters} +{\em Ts} & Types to include, must be unique \\ +\hline +\end{DoxyTemplParams} + + +The documentation for this class was generated from the following file\+:\begin{DoxyCompactItemize} +\item +any.\+h\end{DoxyCompactItemize} diff --git a/External/open-cpp-utils/Documentation/latex/classopen__cpp__utils_1_1any_3_01_t_00_01_rest_8_8_8_01_4.eps b/External/open-cpp-utils/Documentation/latex/classopen__cpp__utils_1_1any_3_01_t_00_01_rest_8_8_8_01_4.eps new file mode 100644 index 0000000..5be477a --- /dev/null +++ b/External/open-cpp-utils/Documentation/latex/classopen__cpp__utils_1_1any_3_01_t_00_01_rest_8_8_8_01_4.eps @@ -0,0 +1,197 @@ +%!PS-Adobe-2.0 EPSF-2.0 +%%Title: ClassName +%%Creator: Doxygen +%%CreationDate: Time +%%For: +%Magnification: 1.00 +%%Orientation: Portrait +%%BoundingBox: 0 0 500 192.307693 +%%Pages: 0 +%%BeginSetup +%%EndSetup +%%EndComments + +% ----- variables ----- + +/boxwidth 0 def +/boxheight 40 def +/fontheight 24 def +/marginwidth 10 def +/distx 20 def +/disty 40 def +/boundaspect 2.600000 def % aspect ratio of the BoundingBox (width/height) +/boundx 500 def +/boundy boundx boundaspect div def +/xspacing 0 def +/yspacing 0 def +/rows 2 def +/cols 1 def +/scalefactor 0 def +/boxfont /Times-Roman findfont fontheight scalefont def + +% ----- procedures ----- + +/dotted { [1 4] 0 setdash } def +/dashed { [5] 0 setdash } def +/solid { [] 0 setdash } def + +/max % result = MAX(arg1,arg2) +{ + /a exch def + /b exch def + a b gt {a} {b} ifelse +} def + +/xoffset % result = MAX(0,(scalefactor-(boxwidth*cols+distx*(cols-1)))/2) +{ + 0 scalefactor boxwidth cols mul distx cols 1 sub mul add sub 2 div max +} def + +/cw % boxwidth = MAX(boxwidth, stringwidth(arg1)) +{ + /str exch def + /boxwidth boxwidth str stringwidth pop max def +} def + +/box % draws a box with text 'arg1' at grid pos (arg2,arg3) +{ gsave + 2 setlinewidth + newpath + exch xspacing mul xoffset add + exch yspacing mul + moveto + boxwidth 0 rlineto + 0 boxheight rlineto + boxwidth neg 0 rlineto + 0 boxheight neg rlineto + closepath + dup stringwidth pop neg boxwidth add 2 div + boxheight fontheight 2 div sub 2 div + rmoveto show stroke + grestore +} def + +/mark +{ newpath + exch xspacing mul xoffset add boxwidth add + exch yspacing mul + moveto + 0 boxheight 4 div rlineto + boxheight neg 4 div boxheight neg 4 div rlineto + closepath + eofill + stroke +} def + +/arrow +{ newpath + moveto + 3 -8 rlineto + -6 0 rlineto + 3 8 rlineto + closepath + eofill + stroke +} def + +/out % draws an output connector for the block at (arg1,arg2) +{ + newpath + exch xspacing mul xoffset add boxwidth 2 div add + exch yspacing mul boxheight add + /y exch def + /x exch def + x y moveto + 0 disty 2 div rlineto + stroke + 1 eq { x y disty 2 div add arrow } if +} def + +/in % draws an input connector for the block at (arg1,arg2) +{ + newpath + exch xspacing mul xoffset add boxwidth 2 div add + exch yspacing mul disty 2 div sub + /y exch def + /x exch def + x y moveto + 0 disty 2 div rlineto + stroke + 1 eq { x y disty 2 div add arrow } if +} def + +/hedge +{ + exch xspacing mul xoffset add boxwidth 2 div add + exch yspacing mul boxheight 2 div sub + /y exch def + /x exch def + newpath + x y moveto + boxwidth 2 div distx add 0 rlineto + stroke + 1 eq + { newpath x boxwidth 2 div distx add add y moveto + -8 3 rlineto + 0 -6 rlineto + 8 3 rlineto + closepath + eofill + stroke + } if +} def + +/vedge +{ + /ye exch def + /ys exch def + /xs exch def + newpath + xs xspacing mul xoffset add boxwidth 2 div add dup + ys yspacing mul boxheight 2 div sub + moveto + ye yspacing mul boxheight 2 div sub + lineto + stroke +} def + +/conn % connections the blocks from col 'arg1' to 'arg2' of row 'arg3' +{ + /ys exch def + /xe exch def + /xs exch def + newpath + xs xspacing mul xoffset add boxwidth 2 div add + ys yspacing mul disty 2 div sub + moveto + xspacing xe xs sub mul 0 + rlineto + stroke +} def + +% ----- main ------ + +boxfont setfont +1 boundaspect scale +(open_cpp_utils::any< T, Rest... >) cw +(open_cpp_utils::any< Rest... >) cw +/boxwidth boxwidth marginwidth 2 mul add def +/xspacing boxwidth distx add def +/yspacing boxheight disty add def +/scalefactor + boxwidth cols mul distx cols 1 sub mul add + boxheight rows mul disty rows 1 sub mul add boundaspect mul + max def +boundx scalefactor div boundy scalefactor div scale + +% ----- classes ----- + + (open_cpp_utils::any< T, Rest... >) 0.000000 0.000000 box + (open_cpp_utils::any< Rest... >) 0.000000 1.000000 box + +% ----- relations ----- + +solid +0 0.000000 0.000000 out +solid +1 0.000000 1.000000 in diff --git a/External/open-cpp-utils/Documentation/latex/classopen__cpp__utils_1_1any_3_01_t_00_01_rest_8_8_8_01_4.pdf b/External/open-cpp-utils/Documentation/latex/classopen__cpp__utils_1_1any_3_01_t_00_01_rest_8_8_8_01_4.pdf new file mode 100644 index 0000000..69a5717 Binary files /dev/null and b/External/open-cpp-utils/Documentation/latex/classopen__cpp__utils_1_1any_3_01_t_00_01_rest_8_8_8_01_4.pdf differ diff --git a/External/open-cpp-utils/Documentation/latex/classopen__cpp__utils_1_1any_3_01_t_00_01_rest_8_8_8_01_4.tex b/External/open-cpp-utils/Documentation/latex/classopen__cpp__utils_1_1any_3_01_t_00_01_rest_8_8_8_01_4.tex new file mode 100644 index 0000000..81c0678 --- /dev/null +++ b/External/open-cpp-utils/Documentation/latex/classopen__cpp__utils_1_1any_3_01_t_00_01_rest_8_8_8_01_4.tex @@ -0,0 +1,61 @@ +\doxysection{open\+\_\+cpp\+\_\+utils\+::any\texorpdfstring{$<$}{<} T, Rest... \texorpdfstring{$>$}{>} Class Template Reference} +\hypertarget{classopen__cpp__utils_1_1any_3_01_t_00_01_rest_8_8_8_01_4}{}\label{classopen__cpp__utils_1_1any_3_01_t_00_01_rest_8_8_8_01_4}\index{open\_cpp\_utils::any$<$ T, Rest... $>$@{open\_cpp\_utils::any$<$ T, Rest... $>$}} +Inheritance diagram for open\+\_\+cpp\+\_\+utils\+::any\texorpdfstring{$<$}{<} T, Rest... \texorpdfstring{$>$}{>}\+:\begin{figure}[H] +\begin{center} +\leavevmode +\includegraphics[height=2.000000cm]{classopen__cpp__utils_1_1any_3_01_t_00_01_rest_8_8_8_01_4} +\end{center} +\end{figure} +\doxysubsubsection*{Public Types} +\begin{DoxyCompactItemize} +\item +\Hypertarget{classopen__cpp__utils_1_1any_3_01_t_00_01_rest_8_8_8_01_4_a916f6bc12813b16c7e4f058d17e1f67e}\label{classopen__cpp__utils_1_1any_3_01_t_00_01_rest_8_8_8_01_4_a916f6bc12813b16c7e4f058d17e1f67e} +using {\bfseries base\+\_\+type} = \mbox{\hyperlink{classopen__cpp__utils_1_1any}{any}}$<$Rest...$>$ +\item +\Hypertarget{classopen__cpp__utils_1_1any_3_01_t_00_01_rest_8_8_8_01_4_a2325f3bf3a6b86f2fc6a2c2b74d110f0}\label{classopen__cpp__utils_1_1any_3_01_t_00_01_rest_8_8_8_01_4_a2325f3bf3a6b86f2fc6a2c2b74d110f0} +using {\bfseries this\+\_\+type} = T +\end{DoxyCompactItemize} +\doxysubsubsection*{Public Member Functions} +\begin{DoxyCompactItemize} +\item +\Hypertarget{classopen__cpp__utils_1_1any_3_01_t_00_01_rest_8_8_8_01_4_a555ea7e7fbc07a7d31f37612c37251e8}\label{classopen__cpp__utils_1_1any_3_01_t_00_01_rest_8_8_8_01_4_a555ea7e7fbc07a7d31f37612c37251e8} +{\bfseries any} (const this\+\_\+type \&value, const Rest \&...other) +\item +\Hypertarget{classopen__cpp__utils_1_1any_3_01_t_00_01_rest_8_8_8_01_4_ac0f2a06bc9fc6641cdcd836a9d7ef658}\label{classopen__cpp__utils_1_1any_3_01_t_00_01_rest_8_8_8_01_4_ac0f2a06bc9fc6641cdcd836a9d7ef658} +{\bfseries any} (this\+\_\+type \&\&value, Rest \&\&...other) +\item +\Hypertarget{classopen__cpp__utils_1_1any_3_01_t_00_01_rest_8_8_8_01_4_a07f2c3fc26448d0986b540441b7d8dbc}\label{classopen__cpp__utils_1_1any_3_01_t_00_01_rest_8_8_8_01_4_a07f2c3fc26448d0986b540441b7d8dbc} +{\bfseries any} (const \mbox{\hyperlink{classopen__cpp__utils_1_1any}{any}} \&other)=default +\item +\Hypertarget{classopen__cpp__utils_1_1any_3_01_t_00_01_rest_8_8_8_01_4_aef0cfcb4b65dc582420e933cf82ad7ec}\label{classopen__cpp__utils_1_1any_3_01_t_00_01_rest_8_8_8_01_4_aef0cfcb4b65dc582420e933cf82ad7ec} +{\bfseries any} (\mbox{\hyperlink{classopen__cpp__utils_1_1any}{any}} \&\&other)=default +\item +\Hypertarget{classopen__cpp__utils_1_1any_3_01_t_00_01_rest_8_8_8_01_4_a438a006be54c7fa1af161c51e118833e}\label{classopen__cpp__utils_1_1any_3_01_t_00_01_rest_8_8_8_01_4_a438a006be54c7fa1af161c51e118833e} +\mbox{\hyperlink{classopen__cpp__utils_1_1any}{any}} \& {\bfseries operator=} (const \mbox{\hyperlink{classopen__cpp__utils_1_1any}{any}} \&)=default +\item +\Hypertarget{classopen__cpp__utils_1_1any_3_01_t_00_01_rest_8_8_8_01_4_a26e3cd88a419d055869b35af4c63ab9d}\label{classopen__cpp__utils_1_1any_3_01_t_00_01_rest_8_8_8_01_4_a26e3cd88a419d055869b35af4c63ab9d} +\mbox{\hyperlink{classopen__cpp__utils_1_1any}{any}} \& {\bfseries operator=} (\mbox{\hyperlink{classopen__cpp__utils_1_1any}{any}} \&\&)=default +\item +\Hypertarget{classopen__cpp__utils_1_1any_3_01_t_00_01_rest_8_8_8_01_4_a15e4e9872f896cb56c85d78318ebf75f}\label{classopen__cpp__utils_1_1any_3_01_t_00_01_rest_8_8_8_01_4_a15e4e9872f896cb56c85d78318ebf75f} +{\bfseries operator this\+\_\+type} () const +\item +\Hypertarget{classopen__cpp__utils_1_1any_3_01_t_00_01_rest_8_8_8_01_4_af03eca4d28a56934cde05a2c74aba647}\label{classopen__cpp__utils_1_1any_3_01_t_00_01_rest_8_8_8_01_4_af03eca4d28a56934cde05a2c74aba647} +{\bfseries operator this\+\_\+type \&} () +\item +\Hypertarget{classopen__cpp__utils_1_1any_3_01_t_00_01_rest_8_8_8_01_4_a123f2fb3fd1f0815847fcf2e5dfcc95d}\label{classopen__cpp__utils_1_1any_3_01_t_00_01_rest_8_8_8_01_4_a123f2fb3fd1f0815847fcf2e5dfcc95d} +{\bfseries operator const this\+\_\+type \&} () const +\item +\Hypertarget{classopen__cpp__utils_1_1any_3_01_t_00_01_rest_8_8_8_01_4_a9688dc07187df689ee116ef3e81eda24}\label{classopen__cpp__utils_1_1any_3_01_t_00_01_rest_8_8_8_01_4_a9688dc07187df689ee116ef3e81eda24} +{\bfseries operator this\+\_\+type \&\&} () +\item +\Hypertarget{classopen__cpp__utils_1_1any_3_01_t_00_01_rest_8_8_8_01_4_a98cc6a4916e3453682eef1e35780b26f}\label{classopen__cpp__utils_1_1any_3_01_t_00_01_rest_8_8_8_01_4_a98cc6a4916e3453682eef1e35780b26f} +{\bfseries operator this\+\_\+type \texorpdfstring{$\ast$}{*}} () +\item +\Hypertarget{classopen__cpp__utils_1_1any_3_01_t_00_01_rest_8_8_8_01_4_aae3b435aedb2efcc5f6b76e6ca1366f3}\label{classopen__cpp__utils_1_1any_3_01_t_00_01_rest_8_8_8_01_4_aae3b435aedb2efcc5f6b76e6ca1366f3} +{\bfseries operator const this\+\_\+type \texorpdfstring{$\ast$}{*}} () const +\end{DoxyCompactItemize} + + +The documentation for this class was generated from the following file\+:\begin{DoxyCompactItemize} +\item +any.\+h\end{DoxyCompactItemize} diff --git a/External/open-cpp-utils/Documentation/latex/classopen__cpp__utils_1_1any_3_4.tex b/External/open-cpp-utils/Documentation/latex/classopen__cpp__utils_1_1any_3_4.tex new file mode 100644 index 0000000..c9fad2a --- /dev/null +++ b/External/open-cpp-utils/Documentation/latex/classopen__cpp__utils_1_1any_3_4.tex @@ -0,0 +1,7 @@ +\doxysection{open\+\_\+cpp\+\_\+utils\+::any\texorpdfstring{$<$}{<}\texorpdfstring{$>$}{>} Class Reference} +\hypertarget{classopen__cpp__utils_1_1any_3_4}{}\label{classopen__cpp__utils_1_1any_3_4}\index{open\_cpp\_utils::any$<$$>$@{open\_cpp\_utils::any$<$$>$}} + + +The documentation for this class was generated from the following file\+:\begin{DoxyCompactItemize} +\item +any.\+h\end{DoxyCompactItemize} diff --git a/External/open-cpp-utils/Documentation/latex/classopen__cpp__utils_1_1directed__tree.tex b/External/open-cpp-utils/Documentation/latex/classopen__cpp__utils_1_1directed__tree.tex new file mode 100644 index 0000000..10c8f1d --- /dev/null +++ b/External/open-cpp-utils/Documentation/latex/classopen__cpp__utils_1_1directed__tree.tex @@ -0,0 +1,303 @@ +\doxysection{open\+\_\+cpp\+\_\+utils\+::directed\+\_\+tree\texorpdfstring{$<$}{<} T \texorpdfstring{$>$}{>} Class Template Reference} +\hypertarget{classopen__cpp__utils_1_1directed__tree}{}\label{classopen__cpp__utils_1_1directed__tree}\index{open\_cpp\_utils::directed\_tree$<$ T $>$@{open\_cpp\_utils::directed\_tree$<$ T $>$}} + + +Class for creating a directed tree. + + + + +{\ttfamily \#include $<$directed\+\_\+tree.\+h$>$} + +\doxysubsubsection*{Classes} +\begin{DoxyCompactItemize} +\item +class \mbox{\hyperlink{classopen__cpp__utils_1_1directed__tree_1_1breadth__first}{breadth\+\_\+first}} +\begin{DoxyCompactList}\small\item\em Breadth first traversal. \end{DoxyCompactList}\item +class \mbox{\hyperlink{classopen__cpp__utils_1_1directed__tree_1_1in__order}{in\+\_\+order}} +\begin{DoxyCompactList}\small\item\em In-\/order traversal. \end{DoxyCompactList}\item +class \mbox{\hyperlink{classopen__cpp__utils_1_1directed__tree_1_1post__order}{post\+\_\+order}} +\begin{DoxyCompactList}\small\item\em Post-\/order traversal. \end{DoxyCompactList}\item +class \mbox{\hyperlink{classopen__cpp__utils_1_1directed__tree_1_1pre__order}{pre\+\_\+order}} +\begin{DoxyCompactList}\small\item\em Pre-\/order traversal. \end{DoxyCompactList}\item +class \mbox{\hyperlink{classopen__cpp__utils_1_1directed__tree_1_1traverser}{traverser}} +\begin{DoxyCompactList}\small\item\em Visitor pattern for traversing the tree. \end{DoxyCompactList}\end{DoxyCompactItemize} +\doxysubsubsection*{Public Types} +\begin{DoxyCompactItemize} +\item +\Hypertarget{classopen__cpp__utils_1_1directed__tree_a7686e85b333769bb5e1de055bb760dd4}\label{classopen__cpp__utils_1_1directed__tree_a7686e85b333769bb5e1de055bb760dd4} +using {\bfseries data\+\_\+type} = T +\item +\Hypertarget{classopen__cpp__utils_1_1directed__tree_a9646a01e68ac858ca7e502b74770a763}\label{classopen__cpp__utils_1_1directed__tree_a9646a01e68ac858ca7e502b74770a763} +using {\bfseries node} = uint32\+\_\+t +\item +\Hypertarget{classopen__cpp__utils_1_1directed__tree_ad2c88a1f3d165568d9d05b5c9abebd54}\label{classopen__cpp__utils_1_1directed__tree_ad2c88a1f3d165568d9d05b5c9abebd54} +using {\bfseries node\+\_\+queue} = std\+::deque$<$node$>$ +\end{DoxyCompactItemize} +\doxysubsubsection*{Public Member Functions} +\begin{DoxyCompactItemize} +\item +\Hypertarget{classopen__cpp__utils_1_1directed__tree_a274ff5c1261c76482ae0539bcd7db282}\label{classopen__cpp__utils_1_1directed__tree_a274ff5c1261c76482ae0539bcd7db282} +{\bfseries directed\+\_\+tree} () +\begin{DoxyCompactList}\small\item\em Default constructor, creates tree with empty root. \end{DoxyCompactList}\item +node \mbox{\hyperlink{classopen__cpp__utils_1_1directed__tree_a3c5c1406f23aaafa8853670cd8c09e37}{parent}} (node id) const +\begin{DoxyCompactList}\small\item\em Get the parent of a node. O(1) \end{DoxyCompactList}\item +node \mbox{\hyperlink{classopen__cpp__utils_1_1directed__tree_a4724d2a3787f09eb632687cbb8d3b392}{first\+\_\+child}} (node id) const +\begin{DoxyCompactList}\small\item\em Get the first child of a node. O(1) \end{DoxyCompactList}\item +node \mbox{\hyperlink{classopen__cpp__utils_1_1directed__tree_a2894ba29c0eccf98b50bab5c07fcdf40}{prev\+\_\+sibling}} (node id) const +\begin{DoxyCompactList}\small\item\em Get the previous sibling of a node. O(1) \end{DoxyCompactList}\item +node \mbox{\hyperlink{classopen__cpp__utils_1_1directed__tree_a2b5a157313e8c92a68d041d1b33514d4}{next\+\_\+sibling}} (node id) const +\begin{DoxyCompactList}\small\item\em Get the next sibling of a node. O(1) \end{DoxyCompactList}\item +node \mbox{\hyperlink{classopen__cpp__utils_1_1directed__tree_a9a03a3bc0948881348a72d5c21390542}{left\+\_\+most}} (node id) const +\begin{DoxyCompactList}\small\item\em Get the left most child of a node. O(log(n)) \end{DoxyCompactList}\item +uint32\+\_\+t \mbox{\hyperlink{classopen__cpp__utils_1_1directed__tree_aa1c7419056d969b7596a0fa1616f3a11}{depth}} (node id) const +\begin{DoxyCompactList}\small\item\em Get the depth of a node. \end{DoxyCompactList}\item +node \mbox{\hyperlink{classopen__cpp__utils_1_1directed__tree_a1a23d372ff1a58609686dcbc0e979cdd}{insert}} (const data\+\_\+type \&data, node p\+\_\+id) +\begin{DoxyCompactList}\small\item\em Insert a node into the tree as a child of the provided node. \end{DoxyCompactList}\item +void \mbox{\hyperlink{classopen__cpp__utils_1_1directed__tree_a03aa9c0faf8c6985cc8e8b22c4dabe18}{erase}} (node id) +\begin{DoxyCompactList}\small\item\em Erase a node in the tree. \end{DoxyCompactList}\item +data\+\_\+type \& \mbox{\hyperlink{classopen__cpp__utils_1_1directed__tree_afe497db6dba649dccc3520adc6ee87ac}{operator\mbox{[}$\,$\mbox{]}}} (node id) +\begin{DoxyCompactList}\small\item\em Getter for data associated with a node. \end{DoxyCompactList}\item +const data\+\_\+type \& \mbox{\hyperlink{classopen__cpp__utils_1_1directed__tree_ae640e0a2ecf325d9f0f9253341d0ce2d}{operator\mbox{[}$\,$\mbox{]}}} (node id) const +\begin{DoxyCompactList}\small\item\em Constant getter for data associated with a node. \end{DoxyCompactList}\item +{\footnotesize template$<$typename O = pre\+\_\+order, typename V $>$ }\\void \mbox{\hyperlink{classopen__cpp__utils_1_1directed__tree_aae5dccf63007f5094122dee8fdae986e}{traverse}} (V \&visitor) +\begin{DoxyCompactList}\small\item\em Traverser-\/\+Visitor pattern for accessing the tree. \end{DoxyCompactList}\end{DoxyCompactItemize} +\doxysubsubsection*{Static Public Attributes} +\begin{DoxyCompactItemize} +\item +\Hypertarget{classopen__cpp__utils_1_1directed__tree_a74286185311460f83ab9bf5d1ba82e98}\label{classopen__cpp__utils_1_1directed__tree_a74286185311460f83ab9bf5d1ba82e98} +static constexpr \mbox{\hyperlink{structopen__cpp__utils_1_1constant__value}{constant\+\_\+value}}$<$ node, node(0)$>$ {\bfseries root} \{\} +\end{DoxyCompactItemize} + + +\doxysubsection{Detailed Description} +\subsubsection*{template$<$typename T$>$\newline +class open\+\_\+cpp\+\_\+utils\+::directed\+\_\+tree$<$ T $>$} +Class for creating a directed tree. + + +\begin{DoxyTemplParams}{Template Parameters} +{\em T} & Type of the data associated with each node\\ +\hline +\end{DoxyTemplParams} +The tree is a series of child nodes in forward linked lists. + +\doxysubsection{Member Function Documentation} +\Hypertarget{classopen__cpp__utils_1_1directed__tree_aa1c7419056d969b7596a0fa1616f3a11}\label{classopen__cpp__utils_1_1directed__tree_aa1c7419056d969b7596a0fa1616f3a11} +\index{open\_cpp\_utils::directed\_tree$<$ T $>$@{open\_cpp\_utils::directed\_tree$<$ T $>$}!depth@{depth}} +\index{depth@{depth}!open\_cpp\_utils::directed\_tree$<$ T $>$@{open\_cpp\_utils::directed\_tree$<$ T $>$}} +\doxysubsubsection{\texorpdfstring{depth()}{depth()}} +{\footnotesize\ttfamily template$<$typename T $>$ \\ +uint32\+\_\+t \mbox{\hyperlink{classopen__cpp__utils_1_1directed__tree}{open\+\_\+cpp\+\_\+utils\+::directed\+\_\+tree}}$<$ T $>$\+::depth (\begin{DoxyParamCaption}\item[{node}]{id }\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [inline]}} + + + +Get the depth of a node. + + +\begin{DoxyParams}{Parameters} +{\em id} & \\ +\hline +\end{DoxyParams} +\begin{DoxyReturn}{Returns} + +\end{DoxyReturn} +\Hypertarget{classopen__cpp__utils_1_1directed__tree_a03aa9c0faf8c6985cc8e8b22c4dabe18}\label{classopen__cpp__utils_1_1directed__tree_a03aa9c0faf8c6985cc8e8b22c4dabe18} +\index{open\_cpp\_utils::directed\_tree$<$ T $>$@{open\_cpp\_utils::directed\_tree$<$ T $>$}!erase@{erase}} +\index{erase@{erase}!open\_cpp\_utils::directed\_tree$<$ T $>$@{open\_cpp\_utils::directed\_tree$<$ T $>$}} +\doxysubsubsection{\texorpdfstring{erase()}{erase()}} +{\footnotesize\ttfamily template$<$typename T $>$ \\ +void \mbox{\hyperlink{classopen__cpp__utils_1_1directed__tree}{open\+\_\+cpp\+\_\+utils\+::directed\+\_\+tree}}$<$ T $>$\+::erase (\begin{DoxyParamCaption}\item[{node}]{id }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}} + + + +Erase a node in the tree. + + +\begin{DoxyParams}{Parameters} +{\em id} & Id of the node to erase \\ +\hline +\end{DoxyParams} +\Hypertarget{classopen__cpp__utils_1_1directed__tree_a4724d2a3787f09eb632687cbb8d3b392}\label{classopen__cpp__utils_1_1directed__tree_a4724d2a3787f09eb632687cbb8d3b392} +\index{open\_cpp\_utils::directed\_tree$<$ T $>$@{open\_cpp\_utils::directed\_tree$<$ T $>$}!first\_child@{first\_child}} +\index{first\_child@{first\_child}!open\_cpp\_utils::directed\_tree$<$ T $>$@{open\_cpp\_utils::directed\_tree$<$ T $>$}} +\doxysubsubsection{\texorpdfstring{first\_child()}{first\_child()}} +{\footnotesize\ttfamily template$<$typename T $>$ \\ +node \mbox{\hyperlink{classopen__cpp__utils_1_1directed__tree}{open\+\_\+cpp\+\_\+utils\+::directed\+\_\+tree}}$<$ T $>$\+::first\+\_\+child (\begin{DoxyParamCaption}\item[{node}]{id }\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [inline]}} + + + +Get the first child of a node. O(1) + + +\begin{DoxyParams}{Parameters} +{\em id} & Node id to reference \\ +\hline +\end{DoxyParams} +\begin{DoxyReturn}{Returns} +Node id of the first child +\end{DoxyReturn} +\Hypertarget{classopen__cpp__utils_1_1directed__tree_a1a23d372ff1a58609686dcbc0e979cdd}\label{classopen__cpp__utils_1_1directed__tree_a1a23d372ff1a58609686dcbc0e979cdd} +\index{open\_cpp\_utils::directed\_tree$<$ T $>$@{open\_cpp\_utils::directed\_tree$<$ T $>$}!insert@{insert}} +\index{insert@{insert}!open\_cpp\_utils::directed\_tree$<$ T $>$@{open\_cpp\_utils::directed\_tree$<$ T $>$}} +\doxysubsubsection{\texorpdfstring{insert()}{insert()}} +{\footnotesize\ttfamily template$<$typename T $>$ \\ +node \mbox{\hyperlink{classopen__cpp__utils_1_1directed__tree}{open\+\_\+cpp\+\_\+utils\+::directed\+\_\+tree}}$<$ T $>$\+::insert (\begin{DoxyParamCaption}\item[{const data\+\_\+type \&}]{data, }\item[{node}]{p\+\_\+id }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}} + + + +Insert a node into the tree as a child of the provided node. + + +\begin{DoxyParams}{Parameters} +{\em data} & Value to insert \\ +\hline +{\em p\+\_\+id} & Id of the parent node \\ +\hline +\end{DoxyParams} +\begin{DoxyReturn}{Returns} +Id of the inserted node +\end{DoxyReturn} +\Hypertarget{classopen__cpp__utils_1_1directed__tree_a9a03a3bc0948881348a72d5c21390542}\label{classopen__cpp__utils_1_1directed__tree_a9a03a3bc0948881348a72d5c21390542} +\index{open\_cpp\_utils::directed\_tree$<$ T $>$@{open\_cpp\_utils::directed\_tree$<$ T $>$}!left\_most@{left\_most}} +\index{left\_most@{left\_most}!open\_cpp\_utils::directed\_tree$<$ T $>$@{open\_cpp\_utils::directed\_tree$<$ T $>$}} +\doxysubsubsection{\texorpdfstring{left\_most()}{left\_most()}} +{\footnotesize\ttfamily template$<$typename T $>$ \\ +node \mbox{\hyperlink{classopen__cpp__utils_1_1directed__tree}{open\+\_\+cpp\+\_\+utils\+::directed\+\_\+tree}}$<$ T $>$\+::left\+\_\+most (\begin{DoxyParamCaption}\item[{node}]{id }\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [inline]}} + + + +Get the left most child of a node. O(log(n)) + + +\begin{DoxyParams}{Parameters} +{\em id} & Node id to reference \\ +\hline +\end{DoxyParams} +\begin{DoxyReturn}{Returns} +Node id of the left most child +\end{DoxyReturn} +\Hypertarget{classopen__cpp__utils_1_1directed__tree_a2b5a157313e8c92a68d041d1b33514d4}\label{classopen__cpp__utils_1_1directed__tree_a2b5a157313e8c92a68d041d1b33514d4} +\index{open\_cpp\_utils::directed\_tree$<$ T $>$@{open\_cpp\_utils::directed\_tree$<$ T $>$}!next\_sibling@{next\_sibling}} +\index{next\_sibling@{next\_sibling}!open\_cpp\_utils::directed\_tree$<$ T $>$@{open\_cpp\_utils::directed\_tree$<$ T $>$}} +\doxysubsubsection{\texorpdfstring{next\_sibling()}{next\_sibling()}} +{\footnotesize\ttfamily template$<$typename T $>$ \\ +node \mbox{\hyperlink{classopen__cpp__utils_1_1directed__tree}{open\+\_\+cpp\+\_\+utils\+::directed\+\_\+tree}}$<$ T $>$\+::next\+\_\+sibling (\begin{DoxyParamCaption}\item[{node}]{id }\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [inline]}} + + + +Get the next sibling of a node. O(1) + + +\begin{DoxyParams}{Parameters} +{\em id} & Node id to reference \\ +\hline +\end{DoxyParams} +\begin{DoxyReturn}{Returns} +Node id of the next sibling in the linked list +\end{DoxyReturn} +\Hypertarget{classopen__cpp__utils_1_1directed__tree_afe497db6dba649dccc3520adc6ee87ac}\label{classopen__cpp__utils_1_1directed__tree_afe497db6dba649dccc3520adc6ee87ac} +\index{open\_cpp\_utils::directed\_tree$<$ T $>$@{open\_cpp\_utils::directed\_tree$<$ T $>$}!operator\mbox{[}\mbox{]}@{operator[]}} +\index{operator\mbox{[}\mbox{]}@{operator[]}!open\_cpp\_utils::directed\_tree$<$ T $>$@{open\_cpp\_utils::directed\_tree$<$ T $>$}} +\doxysubsubsection{\texorpdfstring{operator[]()}{operator[]()}\hspace{0.1cm}{\footnotesize\ttfamily [1/2]}} +{\footnotesize\ttfamily template$<$typename T $>$ \\ +data\+\_\+type \& \mbox{\hyperlink{classopen__cpp__utils_1_1directed__tree}{open\+\_\+cpp\+\_\+utils\+::directed\+\_\+tree}}$<$ T $>$\+::operator\mbox{[}$\,$\mbox{]} (\begin{DoxyParamCaption}\item[{node}]{id }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}} + + + +Getter for data associated with a node. + + +\begin{DoxyParams}{Parameters} +{\em id} & Id of the node to access \\ +\hline +\end{DoxyParams} +\begin{DoxyReturn}{Returns} +Reference to the node\textquotesingle{}s data +\end{DoxyReturn} +\Hypertarget{classopen__cpp__utils_1_1directed__tree_ae640e0a2ecf325d9f0f9253341d0ce2d}\label{classopen__cpp__utils_1_1directed__tree_ae640e0a2ecf325d9f0f9253341d0ce2d} +\index{open\_cpp\_utils::directed\_tree$<$ T $>$@{open\_cpp\_utils::directed\_tree$<$ T $>$}!operator\mbox{[}\mbox{]}@{operator[]}} +\index{operator\mbox{[}\mbox{]}@{operator[]}!open\_cpp\_utils::directed\_tree$<$ T $>$@{open\_cpp\_utils::directed\_tree$<$ T $>$}} +\doxysubsubsection{\texorpdfstring{operator[]()}{operator[]()}\hspace{0.1cm}{\footnotesize\ttfamily [2/2]}} +{\footnotesize\ttfamily template$<$typename T $>$ \\ +const data\+\_\+type \& \mbox{\hyperlink{classopen__cpp__utils_1_1directed__tree}{open\+\_\+cpp\+\_\+utils\+::directed\+\_\+tree}}$<$ T $>$\+::operator\mbox{[}$\,$\mbox{]} (\begin{DoxyParamCaption}\item[{node}]{id }\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [inline]}} + + + +Constant getter for data associated with a node. + + +\begin{DoxyParams}{Parameters} +{\em node} & Id of the node to access \\ +\hline +\end{DoxyParams} +\begin{DoxyReturn}{Returns} +Reference to the node\textquotesingle{}s data +\end{DoxyReturn} +\Hypertarget{classopen__cpp__utils_1_1directed__tree_a3c5c1406f23aaafa8853670cd8c09e37}\label{classopen__cpp__utils_1_1directed__tree_a3c5c1406f23aaafa8853670cd8c09e37} +\index{open\_cpp\_utils::directed\_tree$<$ T $>$@{open\_cpp\_utils::directed\_tree$<$ T $>$}!parent@{parent}} +\index{parent@{parent}!open\_cpp\_utils::directed\_tree$<$ T $>$@{open\_cpp\_utils::directed\_tree$<$ T $>$}} +\doxysubsubsection{\texorpdfstring{parent()}{parent()}} +{\footnotesize\ttfamily template$<$typename T $>$ \\ +node \mbox{\hyperlink{classopen__cpp__utils_1_1directed__tree}{open\+\_\+cpp\+\_\+utils\+::directed\+\_\+tree}}$<$ T $>$\+::parent (\begin{DoxyParamCaption}\item[{node}]{id }\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [inline]}} + + + +Get the parent of a node. O(1) + + +\begin{DoxyParams}{Parameters} +{\em id} & Node id to reference \\ +\hline +\end{DoxyParams} +\begin{DoxyReturn}{Returns} +Node id of the parent +\end{DoxyReturn} +\Hypertarget{classopen__cpp__utils_1_1directed__tree_a2894ba29c0eccf98b50bab5c07fcdf40}\label{classopen__cpp__utils_1_1directed__tree_a2894ba29c0eccf98b50bab5c07fcdf40} +\index{open\_cpp\_utils::directed\_tree$<$ T $>$@{open\_cpp\_utils::directed\_tree$<$ T $>$}!prev\_sibling@{prev\_sibling}} +\index{prev\_sibling@{prev\_sibling}!open\_cpp\_utils::directed\_tree$<$ T $>$@{open\_cpp\_utils::directed\_tree$<$ T $>$}} +\doxysubsubsection{\texorpdfstring{prev\_sibling()}{prev\_sibling()}} +{\footnotesize\ttfamily template$<$typename T $>$ \\ +node \mbox{\hyperlink{classopen__cpp__utils_1_1directed__tree}{open\+\_\+cpp\+\_\+utils\+::directed\+\_\+tree}}$<$ T $>$\+::prev\+\_\+sibling (\begin{DoxyParamCaption}\item[{node}]{id }\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [inline]}} + + + +Get the previous sibling of a node. O(1) + + +\begin{DoxyParams}{Parameters} +{\em id} & Node id to reference \\ +\hline +\end{DoxyParams} +\begin{DoxyReturn}{Returns} +Node id of the next sibling in the linked list +\end{DoxyReturn} +\Hypertarget{classopen__cpp__utils_1_1directed__tree_aae5dccf63007f5094122dee8fdae986e}\label{classopen__cpp__utils_1_1directed__tree_aae5dccf63007f5094122dee8fdae986e} +\index{open\_cpp\_utils::directed\_tree$<$ T $>$@{open\_cpp\_utils::directed\_tree$<$ T $>$}!traverse@{traverse}} +\index{traverse@{traverse}!open\_cpp\_utils::directed\_tree$<$ T $>$@{open\_cpp\_utils::directed\_tree$<$ T $>$}} +\doxysubsubsection{\texorpdfstring{traverse()}{traverse()}} +{\footnotesize\ttfamily template$<$typename T $>$ \\ +template$<$typename O = pre\+\_\+order, typename V $>$ \\ +void \mbox{\hyperlink{classopen__cpp__utils_1_1directed__tree}{open\+\_\+cpp\+\_\+utils\+::directed\+\_\+tree}}$<$ T $>$\+::traverse (\begin{DoxyParamCaption}\item[{V \&}]{visitor }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}} + + + +Traverser-\/\+Visitor pattern for accessing the tree. + + +\begin{DoxyTemplParams}{Template Parameters} +{\em V} & Visitor type. \\ +\hline +{\em O} & Order type. Defaults to Pre-\/\+Order Traversal. \\ +\hline +\end{DoxyTemplParams} + +\begin{DoxyParams}{Parameters} +{\em visitor} & \\ +\hline +\end{DoxyParams} + + +The documentation for this class was generated from the following file\+:\begin{DoxyCompactItemize} +\item +directed\+\_\+tree.\+h\end{DoxyCompactItemize} diff --git a/External/open-cpp-utils/Documentation/latex/classopen__cpp__utils_1_1directed__tree_1_1breadth__first.tex b/External/open-cpp-utils/Documentation/latex/classopen__cpp__utils_1_1directed__tree_1_1breadth__first.tex new file mode 100644 index 0000000..f8bbb25 --- /dev/null +++ b/External/open-cpp-utils/Documentation/latex/classopen__cpp__utils_1_1directed__tree_1_1breadth__first.tex @@ -0,0 +1,30 @@ +\doxysection{open\+\_\+cpp\+\_\+utils\+::directed\+\_\+tree\texorpdfstring{$<$}{<} T \texorpdfstring{$>$}{>}\+::breadth\+\_\+first Class Reference} +\hypertarget{classopen__cpp__utils_1_1directed__tree_1_1breadth__first}{}\label{classopen__cpp__utils_1_1directed__tree_1_1breadth__first}\index{open\_cpp\_utils::directed\_tree$<$ T $>$::breadth\_first@{open\_cpp\_utils::directed\_tree$<$ T $>$::breadth\_first}} + + +Breadth first traversal. + + + + +{\ttfamily \#include $<$directed\+\_\+tree.\+h$>$} + +\doxysubsubsection*{Public Member Functions} +\begin{DoxyCompactItemize} +\item +\Hypertarget{classopen__cpp__utils_1_1directed__tree_1_1breadth__first_afb4e96e0ecdcc328bd62ea3c16ce4ced}\label{classopen__cpp__utils_1_1directed__tree_1_1breadth__first_afb4e96e0ecdcc328bd62ea3c16ce4ced} +{\bfseries breadth\+\_\+first} (\mbox{\hyperlink{classopen__cpp__utils_1_1directed__tree}{directed\+\_\+tree}} \&graph) +\item +\Hypertarget{classopen__cpp__utils_1_1directed__tree_1_1breadth__first_a6dd1de0e646e9ea7d3742d38d14ebca6}\label{classopen__cpp__utils_1_1directed__tree_1_1breadth__first_a6dd1de0e646e9ea7d3742d38d14ebca6} +node {\bfseries operator()} (node node) +\end{DoxyCompactItemize} + + +\doxysubsection{Detailed Description} +\subsubsection*{template$<$typename T$>$\newline +class open\+\_\+cpp\+\_\+utils\+::directed\+\_\+tree$<$ T $>$\+::breadth\+\_\+first} +Breadth first traversal. + +The documentation for this class was generated from the following file\+:\begin{DoxyCompactItemize} +\item +directed\+\_\+tree.\+h\end{DoxyCompactItemize} diff --git a/External/open-cpp-utils/Documentation/latex/classopen__cpp__utils_1_1directed__tree_1_1in__order.tex b/External/open-cpp-utils/Documentation/latex/classopen__cpp__utils_1_1directed__tree_1_1in__order.tex new file mode 100644 index 0000000..0505886 --- /dev/null +++ b/External/open-cpp-utils/Documentation/latex/classopen__cpp__utils_1_1directed__tree_1_1in__order.tex @@ -0,0 +1,30 @@ +\doxysection{open\+\_\+cpp\+\_\+utils\+::directed\+\_\+tree\texorpdfstring{$<$}{<} T \texorpdfstring{$>$}{>}\+::in\+\_\+order Class Reference} +\hypertarget{classopen__cpp__utils_1_1directed__tree_1_1in__order}{}\label{classopen__cpp__utils_1_1directed__tree_1_1in__order}\index{open\_cpp\_utils::directed\_tree$<$ T $>$::in\_order@{open\_cpp\_utils::directed\_tree$<$ T $>$::in\_order}} + + +In-\/order traversal. + + + + +{\ttfamily \#include $<$directed\+\_\+tree.\+h$>$} + +\doxysubsubsection*{Public Member Functions} +\begin{DoxyCompactItemize} +\item +\Hypertarget{classopen__cpp__utils_1_1directed__tree_1_1in__order_a803242d2df561e0a81c44009ed2e93cc}\label{classopen__cpp__utils_1_1directed__tree_1_1in__order_a803242d2df561e0a81c44009ed2e93cc} +{\bfseries in\+\_\+order} (\mbox{\hyperlink{classopen__cpp__utils_1_1directed__tree}{directed\+\_\+tree}} \&graph) +\item +\Hypertarget{classopen__cpp__utils_1_1directed__tree_1_1in__order_a83d159f22e3a5f6a5b03724d9417ec52}\label{classopen__cpp__utils_1_1directed__tree_1_1in__order_a83d159f22e3a5f6a5b03724d9417ec52} +node {\bfseries operator()} (node node) +\end{DoxyCompactItemize} + + +\doxysubsection{Detailed Description} +\subsubsection*{template$<$typename T$>$\newline +class open\+\_\+cpp\+\_\+utils\+::directed\+\_\+tree$<$ T $>$\+::in\+\_\+order} +In-\/order traversal. + +The documentation for this class was generated from the following file\+:\begin{DoxyCompactItemize} +\item +directed\+\_\+tree.\+h\end{DoxyCompactItemize} diff --git a/External/open-cpp-utils/Documentation/latex/classopen__cpp__utils_1_1directed__tree_1_1post__order.tex b/External/open-cpp-utils/Documentation/latex/classopen__cpp__utils_1_1directed__tree_1_1post__order.tex new file mode 100644 index 0000000..cb958e0 --- /dev/null +++ b/External/open-cpp-utils/Documentation/latex/classopen__cpp__utils_1_1directed__tree_1_1post__order.tex @@ -0,0 +1,30 @@ +\doxysection{open\+\_\+cpp\+\_\+utils\+::directed\+\_\+tree\texorpdfstring{$<$}{<} T \texorpdfstring{$>$}{>}\+::post\+\_\+order Class Reference} +\hypertarget{classopen__cpp__utils_1_1directed__tree_1_1post__order}{}\label{classopen__cpp__utils_1_1directed__tree_1_1post__order}\index{open\_cpp\_utils::directed\_tree$<$ T $>$::post\_order@{open\_cpp\_utils::directed\_tree$<$ T $>$::post\_order}} + + +Post-\/order traversal. + + + + +{\ttfamily \#include $<$directed\+\_\+tree.\+h$>$} + +\doxysubsubsection*{Public Member Functions} +\begin{DoxyCompactItemize} +\item +\Hypertarget{classopen__cpp__utils_1_1directed__tree_1_1post__order_a9d3afd094ea19d4d0209d12001fa8b22}\label{classopen__cpp__utils_1_1directed__tree_1_1post__order_a9d3afd094ea19d4d0209d12001fa8b22} +{\bfseries post\+\_\+order} (\mbox{\hyperlink{classopen__cpp__utils_1_1directed__tree}{directed\+\_\+tree}} \&graph) +\item +\Hypertarget{classopen__cpp__utils_1_1directed__tree_1_1post__order_aad1039dce8ad1bcc1497f6e8f8fe2bd8}\label{classopen__cpp__utils_1_1directed__tree_1_1post__order_aad1039dce8ad1bcc1497f6e8f8fe2bd8} +node {\bfseries operator()} (node node) +\end{DoxyCompactItemize} + + +\doxysubsection{Detailed Description} +\subsubsection*{template$<$typename T$>$\newline +class open\+\_\+cpp\+\_\+utils\+::directed\+\_\+tree$<$ T $>$\+::post\+\_\+order} +Post-\/order traversal. + +The documentation for this class was generated from the following file\+:\begin{DoxyCompactItemize} +\item +directed\+\_\+tree.\+h\end{DoxyCompactItemize} diff --git a/External/open-cpp-utils/Documentation/latex/classopen__cpp__utils_1_1directed__tree_1_1pre__order.tex b/External/open-cpp-utils/Documentation/latex/classopen__cpp__utils_1_1directed__tree_1_1pre__order.tex new file mode 100644 index 0000000..c2398fc --- /dev/null +++ b/External/open-cpp-utils/Documentation/latex/classopen__cpp__utils_1_1directed__tree_1_1pre__order.tex @@ -0,0 +1,30 @@ +\doxysection{open\+\_\+cpp\+\_\+utils\+::directed\+\_\+tree\texorpdfstring{$<$}{<} T \texorpdfstring{$>$}{>}\+::pre\+\_\+order Class Reference} +\hypertarget{classopen__cpp__utils_1_1directed__tree_1_1pre__order}{}\label{classopen__cpp__utils_1_1directed__tree_1_1pre__order}\index{open\_cpp\_utils::directed\_tree$<$ T $>$::pre\_order@{open\_cpp\_utils::directed\_tree$<$ T $>$::pre\_order}} + + +Pre-\/order traversal. + + + + +{\ttfamily \#include $<$directed\+\_\+tree.\+h$>$} + +\doxysubsubsection*{Public Member Functions} +\begin{DoxyCompactItemize} +\item +\Hypertarget{classopen__cpp__utils_1_1directed__tree_1_1pre__order_aa355b62393c8e3569828040491e69a8b}\label{classopen__cpp__utils_1_1directed__tree_1_1pre__order_aa355b62393c8e3569828040491e69a8b} +{\bfseries pre\+\_\+order} (\mbox{\hyperlink{classopen__cpp__utils_1_1directed__tree}{directed\+\_\+tree}} \&graph) +\item +\Hypertarget{classopen__cpp__utils_1_1directed__tree_1_1pre__order_a039414d4217044b10027ea1ee2d0d464}\label{classopen__cpp__utils_1_1directed__tree_1_1pre__order_a039414d4217044b10027ea1ee2d0d464} +node {\bfseries operator()} (node id) +\end{DoxyCompactItemize} + + +\doxysubsection{Detailed Description} +\subsubsection*{template$<$typename T$>$\newline +class open\+\_\+cpp\+\_\+utils\+::directed\+\_\+tree$<$ T $>$\+::pre\+\_\+order} +Pre-\/order traversal. + +The documentation for this class was generated from the following file\+:\begin{DoxyCompactItemize} +\item +directed\+\_\+tree.\+h\end{DoxyCompactItemize} diff --git a/External/open-cpp-utils/Documentation/latex/classopen__cpp__utils_1_1directed__tree_1_1traverser.tex b/External/open-cpp-utils/Documentation/latex/classopen__cpp__utils_1_1directed__tree_1_1traverser.tex new file mode 100644 index 0000000..b362b05 --- /dev/null +++ b/External/open-cpp-utils/Documentation/latex/classopen__cpp__utils_1_1directed__tree_1_1traverser.tex @@ -0,0 +1,40 @@ +\doxysection{open\+\_\+cpp\+\_\+utils\+::directed\+\_\+tree\texorpdfstring{$<$}{<} T \texorpdfstring{$>$}{>}\+::traverser\texorpdfstring{$<$}{<} V, O \texorpdfstring{$>$}{>} Class Template Reference} +\hypertarget{classopen__cpp__utils_1_1directed__tree_1_1traverser}{}\label{classopen__cpp__utils_1_1directed__tree_1_1traverser}\index{open\_cpp\_utils::directed\_tree$<$ T $>$::traverser$<$ V, O $>$@{open\_cpp\_utils::directed\_tree$<$ T $>$::traverser$<$ V, O $>$}} + + +Visitor pattern for traversing the tree. + + + + +{\ttfamily \#include $<$directed\+\_\+tree.\+h$>$} + +\doxysubsubsection*{Public Types} +\begin{DoxyCompactItemize} +\item +\Hypertarget{classopen__cpp__utils_1_1directed__tree_1_1traverser_a5c5e682e8a39195c25829752c6786871}\label{classopen__cpp__utils_1_1directed__tree_1_1traverser_a5c5e682e8a39195c25829752c6786871} +using {\bfseries visitor\+\_\+type} = V +\item +\Hypertarget{classopen__cpp__utils_1_1directed__tree_1_1traverser_a98a5ea56241b1c15bcd8e1cdceca9901}\label{classopen__cpp__utils_1_1directed__tree_1_1traverser_a98a5ea56241b1c15bcd8e1cdceca9901} +using {\bfseries order\+\_\+type} = O +\end{DoxyCompactItemize} +\doxysubsubsection*{Public Member Functions} +\begin{DoxyCompactItemize} +\item +\Hypertarget{classopen__cpp__utils_1_1directed__tree_1_1traverser_a6edb806e781864a8bdb945cd4d05db59}\label{classopen__cpp__utils_1_1directed__tree_1_1traverser_a6edb806e781864a8bdb945cd4d05db59} +{\bfseries traverser} (\mbox{\hyperlink{classopen__cpp__utils_1_1directed__tree}{directed\+\_\+tree}} \&graph, visitor\+\_\+type \&visitor) +\item +\Hypertarget{classopen__cpp__utils_1_1directed__tree_1_1traverser_aeea7caf488417468eba6c59b8f4b1a8d}\label{classopen__cpp__utils_1_1directed__tree_1_1traverser_aeea7caf488417468eba6c59b8f4b1a8d} +void {\bfseries operator()} () +\end{DoxyCompactItemize} + + +\doxysubsection{Detailed Description} +\subsubsection*{template$<$typename T$>$\newline +template$<$typename V, typename O$>$\newline +class open\+\_\+cpp\+\_\+utils\+::directed\+\_\+tree$<$ T $>$\+::traverser$<$ V, O $>$} +Visitor pattern for traversing the tree. + +The documentation for this class was generated from the following file\+:\begin{DoxyCompactItemize} +\item +directed\+\_\+tree.\+h\end{DoxyCompactItemize} diff --git a/External/open-cpp-utils/Documentation/latex/classopen__cpp__utils_1_1dyn__array.tex b/External/open-cpp-utils/Documentation/latex/classopen__cpp__utils_1_1dyn__array.tex new file mode 100644 index 0000000..3c50a51 --- /dev/null +++ b/External/open-cpp-utils/Documentation/latex/classopen__cpp__utils_1_1dyn__array.tex @@ -0,0 +1,7 @@ +\doxysection{open\+\_\+cpp\+\_\+utils\+::dyn\+\_\+array\texorpdfstring{$<$}{<} T, N \texorpdfstring{$>$}{>} Class Template Reference} +\hypertarget{classopen__cpp__utils_1_1dyn__array}{}\label{classopen__cpp__utils_1_1dyn__array}\index{open\_cpp\_utils::dyn\_array$<$ T, N $>$@{open\_cpp\_utils::dyn\_array$<$ T, N $>$}} + + +The documentation for this class was generated from the following file\+:\begin{DoxyCompactItemize} +\item +array.\+h\end{DoxyCompactItemize} diff --git a/External/open-cpp-utils/Documentation/latex/classopen__cpp__utils_1_1optional.tex b/External/open-cpp-utils/Documentation/latex/classopen__cpp__utils_1_1optional.tex new file mode 100644 index 0000000..3f3e6e2 --- /dev/null +++ b/External/open-cpp-utils/Documentation/latex/classopen__cpp__utils_1_1optional.tex @@ -0,0 +1,94 @@ +\doxysection{open\+\_\+cpp\+\_\+utils\+::optional\texorpdfstring{$<$}{<} T \texorpdfstring{$>$}{>} Class Template Reference} +\hypertarget{classopen__cpp__utils_1_1optional}{}\label{classopen__cpp__utils_1_1optional}\index{open\_cpp\_utils::optional$<$ T $>$@{open\_cpp\_utils::optional$<$ T $>$}} +\doxysubsubsection*{Public Types} +\begin{DoxyCompactItemize} +\item +\Hypertarget{classopen__cpp__utils_1_1optional_ab3d20652ad7dfd7d7a11973c05c785c5}\label{classopen__cpp__utils_1_1optional_ab3d20652ad7dfd7d7a11973c05c785c5} +using {\bfseries value\+\_\+type} = T +\end{DoxyCompactItemize} +\doxysubsubsection*{Public Member Functions} +\begin{DoxyCompactItemize} +\item +\Hypertarget{classopen__cpp__utils_1_1optional_ab8305b72e074cf245a302f627891ab87}\label{classopen__cpp__utils_1_1optional_ab8305b72e074cf245a302f627891ab87} +{\bfseries optional} (const value\+\_\+type \&data) +\item +\Hypertarget{classopen__cpp__utils_1_1optional_af1f394bae071f8bb7eaaf5fc95b86060}\label{classopen__cpp__utils_1_1optional_af1f394bae071f8bb7eaaf5fc95b86060} +{\bfseries optional} (value\+\_\+type \&\&data) +\item +\Hypertarget{classopen__cpp__utils_1_1optional_a206276b56641e62ac73b3474dc951d00}\label{classopen__cpp__utils_1_1optional_a206276b56641e62ac73b3474dc951d00} +{\bfseries optional} (const \mbox{\hyperlink{classopen__cpp__utils_1_1optional}{optional}} \&other)=default +\item +\Hypertarget{classopen__cpp__utils_1_1optional_a0482994c47410409a71cf81741660661}\label{classopen__cpp__utils_1_1optional_a0482994c47410409a71cf81741660661} +{\bfseries optional} (\mbox{\hyperlink{classopen__cpp__utils_1_1optional}{optional}} \&\&other)=default +\item +\Hypertarget{classopen__cpp__utils_1_1optional_a3b5dfc7f6d5b2eb902940db8751acf13}\label{classopen__cpp__utils_1_1optional_a3b5dfc7f6d5b2eb902940db8751acf13} +\mbox{\hyperlink{classopen__cpp__utils_1_1optional}{optional}} \& {\bfseries operator=} (const \mbox{\hyperlink{classopen__cpp__utils_1_1optional}{optional}} \&other)=default +\item +\Hypertarget{classopen__cpp__utils_1_1optional_ac604979f460d374e23ccafbe68841a49}\label{classopen__cpp__utils_1_1optional_ac604979f460d374e23ccafbe68841a49} +\mbox{\hyperlink{classopen__cpp__utils_1_1optional}{optional}} \& {\bfseries operator=} (\mbox{\hyperlink{classopen__cpp__utils_1_1optional}{optional}} \&\&other)=default +\item +\Hypertarget{classopen__cpp__utils_1_1optional_a47194520a19285ba3434c8d8a45207c2}\label{classopen__cpp__utils_1_1optional_a47194520a19285ba3434c8d8a45207c2} +\mbox{\hyperlink{classopen__cpp__utils_1_1optional}{optional}} \& {\bfseries operator=} (const value\+\_\+type \&data) +\item +\Hypertarget{classopen__cpp__utils_1_1optional_a84262690f2a0f3cb189dccec16e85823}\label{classopen__cpp__utils_1_1optional_a84262690f2a0f3cb189dccec16e85823} +\mbox{\hyperlink{classopen__cpp__utils_1_1optional}{optional}} \& {\bfseries operator=} (value\+\_\+type \&\&data) +\item +\Hypertarget{classopen__cpp__utils_1_1optional_a0daa7ff3b4a6dd8abb4def8a49792174}\label{classopen__cpp__utils_1_1optional_a0daa7ff3b4a6dd8abb4def8a49792174} +value\+\_\+type \& {\bfseries operator+=} (const value\+\_\+type \&data) +\item +\Hypertarget{classopen__cpp__utils_1_1optional_a63fbf1f55b7492e462e9d11b45d75b11}\label{classopen__cpp__utils_1_1optional_a63fbf1f55b7492e462e9d11b45d75b11} +value\+\_\+type \& {\bfseries operator-\/=} (const value\+\_\+type \&data) +\item +\Hypertarget{classopen__cpp__utils_1_1optional_a6d65605d20e0d013427c5a54883cfb8d}\label{classopen__cpp__utils_1_1optional_a6d65605d20e0d013427c5a54883cfb8d} +value\+\_\+type \& {\bfseries operator\texorpdfstring{$\ast$}{*}=} (const value\+\_\+type \&data) +\item +\Hypertarget{classopen__cpp__utils_1_1optional_a315adcabbe5fbf34ec6b394f3f437ef8}\label{classopen__cpp__utils_1_1optional_a315adcabbe5fbf34ec6b394f3f437ef8} +value\+\_\+type \& {\bfseries operator/=} (const value\+\_\+type \&data) +\item +\Hypertarget{classopen__cpp__utils_1_1optional_ab035dba77f01a5480997091833da634f}\label{classopen__cpp__utils_1_1optional_ab035dba77f01a5480997091833da634f} +value\+\_\+type \& {\bfseries operator\%=} (const value\+\_\+type \&data) +\item +\Hypertarget{classopen__cpp__utils_1_1optional_a471b368ae73215501af04f97825ee352}\label{classopen__cpp__utils_1_1optional_a471b368ae73215501af04f97825ee352} +value\+\_\+type \& {\bfseries operator$<$$<$=} (const value\+\_\+type \&data) +\item +\Hypertarget{classopen__cpp__utils_1_1optional_af116ef225312775d62bb9bf3b9ac26ae}\label{classopen__cpp__utils_1_1optional_af116ef225312775d62bb9bf3b9ac26ae} +value\+\_\+type \& {\bfseries operator$>$$>$=} (const value\+\_\+type \&data) +\item +\Hypertarget{classopen__cpp__utils_1_1optional_a1becf6a79b1332eacf449b64bc97cfbd}\label{classopen__cpp__utils_1_1optional_a1becf6a79b1332eacf449b64bc97cfbd} +value\+\_\+type \& {\bfseries operator\texorpdfstring{$\vert$}{|}=} (const value\+\_\+type \&data) +\item +\Hypertarget{classopen__cpp__utils_1_1optional_a166a9c5cbe7230a86d62a2c22c761b3f}\label{classopen__cpp__utils_1_1optional_a166a9c5cbe7230a86d62a2c22c761b3f} +value\+\_\+type \& {\bfseries operator\&=} (const value\+\_\+type \&data) +\item +\Hypertarget{classopen__cpp__utils_1_1optional_a9debaa0adb22300846e351bf2de7f40c}\label{classopen__cpp__utils_1_1optional_a9debaa0adb22300846e351bf2de7f40c} +value\+\_\+type \& {\bfseries operator\texorpdfstring{$^\wedge$}{\string^}=} (const value\+\_\+type \&data) +\item +\Hypertarget{classopen__cpp__utils_1_1optional_a2b4293f79320a4d69ead9139d1f7ffd0}\label{classopen__cpp__utils_1_1optional_a2b4293f79320a4d69ead9139d1f7ffd0} +bool {\bfseries operator()} () const +\item +\Hypertarget{classopen__cpp__utils_1_1optional_a87859eeb97115aba97bf13d8570f1dd3}\label{classopen__cpp__utils_1_1optional_a87859eeb97115aba97bf13d8570f1dd3} +{\bfseries operator value\+\_\+type \&} () +\item +\Hypertarget{classopen__cpp__utils_1_1optional_ac46fab9c48ac54596daf3ad0a46e92dc}\label{classopen__cpp__utils_1_1optional_ac46fab9c48ac54596daf3ad0a46e92dc} +{\bfseries operator const value\+\_\+type \&} () const +\item +\Hypertarget{classopen__cpp__utils_1_1optional_ab8fd12908a6a5efdebf057ffc72859d4}\label{classopen__cpp__utils_1_1optional_ab8fd12908a6a5efdebf057ffc72859d4} +value\+\_\+type \texorpdfstring{$\ast$}{*} {\bfseries operator-\/$>$} () +\item +\Hypertarget{classopen__cpp__utils_1_1optional_aced680841823e7d77155b334ac6cd62c}\label{classopen__cpp__utils_1_1optional_aced680841823e7d77155b334ac6cd62c} +const value\+\_\+type \texorpdfstring{$\ast$}{*} {\bfseries operator-\/$>$} () const +\item +\Hypertarget{classopen__cpp__utils_1_1optional_ac646f9cc1ddd3aaf7c116c70a3aaa381}\label{classopen__cpp__utils_1_1optional_ac646f9cc1ddd3aaf7c116c70a3aaa381} +value\+\_\+type \& {\bfseries operator\texorpdfstring{$\ast$}{*}} () +\item +\Hypertarget{classopen__cpp__utils_1_1optional_ab064435251b5054c0aa703841afb7a94}\label{classopen__cpp__utils_1_1optional_ab064435251b5054c0aa703841afb7a94} +const value\+\_\+type \& {\bfseries operator\texorpdfstring{$\ast$}{*}} () const +\item +\Hypertarget{classopen__cpp__utils_1_1optional_a43d4f7ad14d788c1c53678036a346336}\label{classopen__cpp__utils_1_1optional_a43d4f7ad14d788c1c53678036a346336} +void {\bfseries reset} () +\end{DoxyCompactItemize} + + +The documentation for this class was generated from the following file\+:\begin{DoxyCompactItemize} +\item +optional.\+h\end{DoxyCompactItemize} diff --git a/External/open-cpp-utils/Documentation/latex/directed__tree_8h_source.tex b/External/open-cpp-utils/Documentation/latex/directed__tree_8h_source.tex new file mode 100644 index 0000000..dc0d57e --- /dev/null +++ b/External/open-cpp-utils/Documentation/latex/directed__tree_8h_source.tex @@ -0,0 +1,337 @@ +\doxysection{directed\+\_\+tree.\+h} +\hypertarget{directed__tree_8h_source}{}\label{directed__tree_8h_source} +\begin{DoxyCode}{0} +\DoxyCodeLine{00001\ \textcolor{comment}{//\ =====================================================================================================================}} +\DoxyCodeLine{00002\ \textcolor{comment}{//\ Copyright\ 2024\ Medusa\ Slockbower}} +\DoxyCodeLine{00003\ \textcolor{comment}{//\ Licensed\ under\ the\ Apache\ License,\ Version\ 2.0\ (the\ "{}License"{});}} +\DoxyCodeLine{00004\ \textcolor{comment}{//\ you\ may\ not\ use\ this\ file\ except\ in\ compliance\ with\ the\ License.}} +\DoxyCodeLine{00005\ \textcolor{comment}{//\ You\ may\ obtain\ a\ copy\ of\ the\ License\ at}} +\DoxyCodeLine{00006\ \textcolor{comment}{//}} +\DoxyCodeLine{00007\ \textcolor{comment}{//\ \ http://www.apache.org/licenses/LICENSE-\/2.0}} +\DoxyCodeLine{00008\ \textcolor{comment}{//}} +\DoxyCodeLine{00009\ \textcolor{comment}{//\ Unless\ required\ by\ applicable\ law\ or\ agreed\ to\ in\ writing,\ software}} +\DoxyCodeLine{00010\ \textcolor{comment}{//\ distributed\ under\ the\ License\ is\ distributed\ on\ an\ "{}AS\ IS"{}\ BASIS,}} +\DoxyCodeLine{00011\ \textcolor{comment}{//\ WITHOUT\ WARRANTIES\ OR\ CONDITIONS\ OF\ ANY\ KIND,\ either\ express\ or\ implied.}} +\DoxyCodeLine{00012\ \textcolor{comment}{//\ See\ the\ License\ for\ the\ specific\ language\ governing\ permissions\ and}} +\DoxyCodeLine{00013\ \textcolor{comment}{//\ limitations\ under\ the\ License.}} +\DoxyCodeLine{00014\ \textcolor{comment}{//\ =====================================================================================================================}} +\DoxyCodeLine{00015\ } +\DoxyCodeLine{00016\ \textcolor{preprocessor}{\#ifndef\ DIRECTEDGRAPH\_H}} +\DoxyCodeLine{00017\ \textcolor{preprocessor}{\#define\ DIRECTEDGRAPH\_H}} +\DoxyCodeLine{00018\ } +\DoxyCodeLine{00019\ \textcolor{preprocessor}{\#include\ "{}\mbox{\hyperlink{template__utils_8h}{template\_utils.h}}"{}}} +\DoxyCodeLine{00020\ } +\DoxyCodeLine{00021\ \textcolor{keyword}{namespace\ }open\_cpp\_utils} +\DoxyCodeLine{00022\ \{} +\DoxyCodeLine{00023\ } +\DoxyCodeLine{00031\ \textcolor{keyword}{template}<\textcolor{keyword}{typename}\ T>} +\DoxyCodeLine{00032\ \textcolor{keyword}{class\ }\mbox{\hyperlink{classopen__cpp__utils_1_1directed__tree}{directed\_tree}}} +\DoxyCodeLine{00033\ \{} +\DoxyCodeLine{00034\ \textcolor{comment}{//\ Forward\ Definitions\ =================================================================================================}} +\DoxyCodeLine{00035\ } +\DoxyCodeLine{00036\ \textcolor{keyword}{public}:} +\DoxyCodeLine{00037\ \ \ \ \ \textcolor{keyword}{class\ }\mbox{\hyperlink{classopen__cpp__utils_1_1directed__tree_1_1breadth__first}{breadth\_first}};} +\DoxyCodeLine{00038\ \ \ \ \ \textcolor{keyword}{class\ }\mbox{\hyperlink{classopen__cpp__utils_1_1directed__tree_1_1pre__order}{pre\_order}};} +\DoxyCodeLine{00039\ \ \ \ \ \textcolor{keyword}{class\ }\mbox{\hyperlink{classopen__cpp__utils_1_1directed__tree_1_1in__order}{in\_order}};} +\DoxyCodeLine{00040\ \ \ \ \ \textcolor{keyword}{class\ }\mbox{\hyperlink{classopen__cpp__utils_1_1directed__tree_1_1post__order}{post\_order}};} +\DoxyCodeLine{00041\ } +\DoxyCodeLine{00042\ \textcolor{keyword}{private}:} +\DoxyCodeLine{00043\ \ \ \ \ \textcolor{keyword}{struct\ }director;} +\DoxyCodeLine{00044\ } +\DoxyCodeLine{00045\ } +\DoxyCodeLine{00046\ \textcolor{comment}{//\ Typedefs\ ============================================================================================================}} +\DoxyCodeLine{00047\ } +\DoxyCodeLine{00048\ \textcolor{keyword}{public}:} +\DoxyCodeLine{00049\ \ \ \ \ \textcolor{keyword}{using\ }data\_type\ =\ T;} +\DoxyCodeLine{00050\ \ \ \ \ \textcolor{keyword}{using\ }node\ =\ uint32\_t;} +\DoxyCodeLine{00051\ \ \ \ \ \textcolor{keyword}{using\ }node\_queue\ =\ std::deque;} +\DoxyCodeLine{00052\ } +\DoxyCodeLine{00053\ \textcolor{keyword}{private}:} +\DoxyCodeLine{00054\ \ \ \ \ \textcolor{keyword}{using\ }hierarchy\ =\ std::vector;} +\DoxyCodeLine{00055\ \ \ \ \ \textcolor{keyword}{using\ }storage\ \ \ =\ std::vector;} +\DoxyCodeLine{00056\ } +\DoxyCodeLine{00057\ } +\DoxyCodeLine{00058\ \textcolor{comment}{//\ Constants\ ===========================================================================================================}} +\DoxyCodeLine{00059\ } +\DoxyCodeLine{00060\ \textcolor{keyword}{public}:} +\DoxyCodeLine{00061\ \ \ \ \ \textcolor{keyword}{static}\ \textcolor{keyword}{constexpr}\ \mbox{\hyperlink{structopen__cpp__utils_1_1constant__value}{constant\_value}}\ root\{\};} +\DoxyCodeLine{00062\ } +\DoxyCodeLine{00063\ } +\DoxyCodeLine{00064\ \textcolor{comment}{//\ Data\ Structures\ =====================================================================================================}} +\DoxyCodeLine{00065\ } +\DoxyCodeLine{00066\ \textcolor{keyword}{private}:} +\DoxyCodeLine{00067\ \ \ \ \ \textcolor{keyword}{struct\ }director} +\DoxyCodeLine{00068\ \ \ \ \ \{} +\DoxyCodeLine{00069\ \ \ \ \ \ \ \ \ \textcolor{keyword}{enum}\ flags} +\DoxyCodeLine{00070\ \ \ \ \ \ \ \ \ \{} +\DoxyCodeLine{00071\ \ \ \ \ \ \ \ \ \ \ \ \ VALID\ =\ 0x0001} +\DoxyCodeLine{00072\ \ \ \ \ \ \ \ \ \};} +\DoxyCodeLine{00073\ } +\DoxyCodeLine{00074\ \ \ \ \ \ \ \ \ node\ parent,\ child,\ prev\_sibling,\ next\_sibling;} +\DoxyCodeLine{00075\ \ \ \ \ \ \ \ \ uint32\_t\ flags,\ depth;} +\DoxyCodeLine{00076\ } +\DoxyCodeLine{00077\ \ \ \ \ \ \ \ \ director()\ :\ parent(0),\ child(0),\ prev\_sibling(0),\ next\_sibling(0),\ flags(VALID)\ \{\ \}} +\DoxyCodeLine{00078\ \ \ \ \ \};} +\DoxyCodeLine{00079\ } +\DoxyCodeLine{00080\ } +\DoxyCodeLine{00081\ \textcolor{comment}{//\ Functions\ ===========================================================================================================}} +\DoxyCodeLine{00082\ } +\DoxyCodeLine{00083\ \textcolor{keyword}{public}:} +\DoxyCodeLine{00084\ } +\DoxyCodeLine{00085\ \textcolor{comment}{//\ Constructors\ \&\ Destructor\ -\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/}} +\DoxyCodeLine{00086\ } +\DoxyCodeLine{00090\ \ \ \ \ \mbox{\hyperlink{classopen__cpp__utils_1_1directed__tree_a274ff5c1261c76482ae0539bcd7db282}{directed\_tree}}()\ :\ graph\_\{\ director()\ \},\ data\_\{\ data\_type()\ \},\ freed\_\{\ \}\ \{\ \}} +\DoxyCodeLine{00091\ } +\DoxyCodeLine{00092\ } +\DoxyCodeLine{00093\ \textcolor{comment}{//\ Tree\ Navigation\ -\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/}} +\DoxyCodeLine{00094\ } +\DoxyCodeLine{00100\ \ \ \ \ [[nodiscard]]\ node\ \mbox{\hyperlink{classopen__cpp__utils_1_1directed__tree_a3c5c1406f23aaafa8853670cd8c09e37}{parent}}(node\ \textcolor{keywordtype}{id})\textcolor{keyword}{\ const\ }\{\ \textcolor{keywordflow}{return}\ graph\_[id].parent;\ \}} +\DoxyCodeLine{00101\ } +\DoxyCodeLine{00107\ \ \ \ \ [[nodiscard]]\ node\ \mbox{\hyperlink{classopen__cpp__utils_1_1directed__tree_a4724d2a3787f09eb632687cbb8d3b392}{first\_child}}(node\ \textcolor{keywordtype}{id})\textcolor{keyword}{\ const\ }\{\ \textcolor{keywordflow}{return}\ graph\_[id].child;\ \}} +\DoxyCodeLine{00108\ } +\DoxyCodeLine{00114\ \ \ \ \ [[nodiscard]]\ node\ \mbox{\hyperlink{classopen__cpp__utils_1_1directed__tree_a2894ba29c0eccf98b50bab5c07fcdf40}{prev\_sibling}}(node\ \textcolor{keywordtype}{id})\textcolor{keyword}{\ const\ }\{\ \textcolor{keywordflow}{return}\ graph\_[id].prev\_sibling;\ \}} +\DoxyCodeLine{00115\ } +\DoxyCodeLine{00121\ \ \ \ \ [[nodiscard]]\ node\ \mbox{\hyperlink{classopen__cpp__utils_1_1directed__tree_a2b5a157313e8c92a68d041d1b33514d4}{next\_sibling}}(node\ \textcolor{keywordtype}{id})\textcolor{keyword}{\ const\ }\{\ \textcolor{keywordflow}{return}\ graph\_[id].next\_sibling;\ \}} +\DoxyCodeLine{00122\ } +\DoxyCodeLine{00128\ \ \ \ \ [[nodiscard]]\ node\ \mbox{\hyperlink{classopen__cpp__utils_1_1directed__tree_a9a03a3bc0948881348a72d5c21390542}{left\_most}}(node\ \textcolor{keywordtype}{id})\textcolor{keyword}{\ const}} +\DoxyCodeLine{00129\ \textcolor{keyword}{\ \ \ \ }\{} +\DoxyCodeLine{00130\ \ \ \ \ \ \ \ \ node\ current\ =\ id;} +\DoxyCodeLine{00131\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{while}(\textcolor{keywordtype}{id}\ =\ \mbox{\hyperlink{classopen__cpp__utils_1_1directed__tree_a4724d2a3787f09eb632687cbb8d3b392}{first\_child}}(current))\ current\ =\ id;} +\DoxyCodeLine{00132\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ current;} +\DoxyCodeLine{00133\ \ \ \ \ \}} +\DoxyCodeLine{00134\ } +\DoxyCodeLine{00140\ \ \ \ \ [[nodiscard]]\ uint32\_t\ \mbox{\hyperlink{classopen__cpp__utils_1_1directed__tree_aa1c7419056d969b7596a0fa1616f3a11}{depth}}(node\ \textcolor{keywordtype}{id})\textcolor{keyword}{\ const}} +\DoxyCodeLine{00141\ \textcolor{keyword}{\ \ \ \ }\{} +\DoxyCodeLine{00142\ \ \ \ \ \ \ \ \ uint32\_t\ \mbox{\hyperlink{classopen__cpp__utils_1_1directed__tree_aa1c7419056d969b7596a0fa1616f3a11}{depth}}\ =\ 0;} +\DoxyCodeLine{00143\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{while}\ (\textcolor{keywordtype}{id})} +\DoxyCodeLine{00144\ \ \ \ \ \ \ \ \ \{} +\DoxyCodeLine{00145\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{id}\ =\ \mbox{\hyperlink{classopen__cpp__utils_1_1directed__tree_a3c5c1406f23aaafa8853670cd8c09e37}{parent}}(\textcolor{keywordtype}{id});} +\DoxyCodeLine{00146\ \ \ \ \ \ \ \ \ \ \ \ \ ++\mbox{\hyperlink{classopen__cpp__utils_1_1directed__tree_aa1c7419056d969b7596a0fa1616f3a11}{depth}};} +\DoxyCodeLine{00147\ \ \ \ \ \ \ \ \ \}} +\DoxyCodeLine{00148\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ \mbox{\hyperlink{classopen__cpp__utils_1_1directed__tree_aa1c7419056d969b7596a0fa1616f3a11}{depth}};} +\DoxyCodeLine{00149\ \ \ \ \ \}} +\DoxyCodeLine{00150\ } +\DoxyCodeLine{00151\ } +\DoxyCodeLine{00152\ \textcolor{comment}{//\ Tree\ Modification\ -\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/}} +\DoxyCodeLine{00153\ } +\DoxyCodeLine{00160\ \ \ \ \ node\ \mbox{\hyperlink{classopen__cpp__utils_1_1directed__tree_a1a23d372ff1a58609686dcbc0e979cdd}{insert}}(\textcolor{keyword}{const}\ data\_type\&\ data,\ node\ p\_id)} +\DoxyCodeLine{00161\ \ \ \ \ \{} +\DoxyCodeLine{00162\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}(freed\_.empty())} +\DoxyCodeLine{00163\ \ \ \ \ \ \ \ \ \{} +\DoxyCodeLine{00164\ \ \ \ \ \ \ \ \ \ \ \ \ freed\_.push\_back(\textcolor{keyword}{static\_cast<}node\textcolor{keyword}{>}(graph\_.size()));} +\DoxyCodeLine{00165\ \ \ \ \ \ \ \ \ \ \ \ \ graph\_.push\_back(director());\ data\_.push\_back(data);} +\DoxyCodeLine{00166\ \ \ \ \ \ \ \ \ \}} +\DoxyCodeLine{00167\ } +\DoxyCodeLine{00168\ \ \ \ \ \ \ \ \ node\ \textcolor{keywordtype}{id}\ =\ freed\_.front();\ freed\_.pop\_front();} +\DoxyCodeLine{00169\ \ \ \ \ \ \ \ \ director\&\ node\ \ \ =\ graph\_[id];} +\DoxyCodeLine{00170\ \ \ \ \ \ \ \ \ director\&\ \mbox{\hyperlink{classopen__cpp__utils_1_1directed__tree_a3c5c1406f23aaafa8853670cd8c09e37}{parent}}\ =\ graph\_[p\_id];} +\DoxyCodeLine{00171\ } +\DoxyCodeLine{00172\ } +\DoxyCodeLine{00173\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}(\mbox{\hyperlink{classopen__cpp__utils_1_1directed__tree_a3c5c1406f23aaafa8853670cd8c09e37}{parent}}.child)} +\DoxyCodeLine{00174\ \ \ \ \ \ \ \ \ \{} +\DoxyCodeLine{00175\ \ \ \ \ \ \ \ \ \ \ \ \ director\&\ nchild\ =\ graph\_[\mbox{\hyperlink{classopen__cpp__utils_1_1directed__tree_a3c5c1406f23aaafa8853670cd8c09e37}{parent}}.child];} +\DoxyCodeLine{00176\ \ \ \ \ \ \ \ \ \ \ \ \ node.prev\_sibling\ =\ nchild.prev\_sibling;} +\DoxyCodeLine{00177\ \ \ \ \ \ \ \ \ \ \ \ \ nchild.prev\_sibling\ =\ id;} +\DoxyCodeLine{00178\ } +\DoxyCodeLine{00179\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}(nchild.prev\_sibling)} +\DoxyCodeLine{00180\ \ \ \ \ \ \ \ \ \ \ \ \ \{} +\DoxyCodeLine{00181\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ director\&\ pchild\ =\ graph\_[nchild.prev\_sibling];} +\DoxyCodeLine{00182\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ pchild.next\_sibling\ =\ id;} +\DoxyCodeLine{00183\ \ \ \ \ \ \ \ \ \ \ \ \ \}} +\DoxyCodeLine{00184\ \ \ \ \ \ \ \ \ \}} +\DoxyCodeLine{00185\ } +\DoxyCodeLine{00186\ \ \ \ \ \ \ \ \ \textcolor{comment}{//\ Setup\ node}} +\DoxyCodeLine{00187\ \ \ \ \ \ \ \ \ node.parent\ =\ p\_id;} +\DoxyCodeLine{00188\ \ \ \ \ \ \ \ \ node.next\_sibling\ =\ \mbox{\hyperlink{classopen__cpp__utils_1_1directed__tree_a3c5c1406f23aaafa8853670cd8c09e37}{parent}}.child;} +\DoxyCodeLine{00189\ \ \ \ \ \ \ \ \ node.child\ =\ 0;} +\DoxyCodeLine{00190\ \ \ \ \ \ \ \ \ node.flags\ =\ director::VALID;} +\DoxyCodeLine{00191\ } +\DoxyCodeLine{00192\ \ \ \ \ \ \ \ \ \textcolor{comment}{//\ Set\ parent's\ child}} +\DoxyCodeLine{00193\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{classopen__cpp__utils_1_1directed__tree_a3c5c1406f23aaafa8853670cd8c09e37}{parent}}.child\ =\ id;} +\DoxyCodeLine{00194\ } +\DoxyCodeLine{00195\ } +\DoxyCodeLine{00196\ \ \ \ \ \ \ \ \ data\_[id]\ =\ data;} +\DoxyCodeLine{00197\ } +\DoxyCodeLine{00198\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ id;} +\DoxyCodeLine{00199\ \ \ \ \ \}} +\DoxyCodeLine{00200\ } +\DoxyCodeLine{00205\ \ \ \ \ \textcolor{keywordtype}{void}\ \mbox{\hyperlink{classopen__cpp__utils_1_1directed__tree_a03aa9c0faf8c6985cc8e8b22c4dabe18}{erase}}(node\ \textcolor{keywordtype}{id})} +\DoxyCodeLine{00206\ \ \ \ \ \{} +\DoxyCodeLine{00207\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}(\textcolor{keywordtype}{id}\ ==\ 0)\ \textcolor{keywordflow}{return};} +\DoxyCodeLine{00208\ } +\DoxyCodeLine{00209\ \ \ \ \ \ \ \ \ director\&\ erased\ =\ graph\_[id];} +\DoxyCodeLine{00210\ \ \ \ \ \ \ \ \ erased.Flags\ \&=\ \string~director::VALID;} +\DoxyCodeLine{00211\ \ \ \ \ \ \ \ \ freed\_.push\_back(\textcolor{keywordtype}{id});} +\DoxyCodeLine{00212\ } +\DoxyCodeLine{00213\ \ \ \ \ \ \ \ \ graph\_[erased.parent].Child\ =\ erased.Sibling;} +\DoxyCodeLine{00214\ } +\DoxyCodeLine{00215\ \ \ \ \ \ \ \ \ node\_queue\ stack\{\ erased.Child\ \};} +\DoxyCodeLine{00216\ } +\DoxyCodeLine{00217\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{while}(stack.empty()\ ==\ \textcolor{keyword}{false})} +\DoxyCodeLine{00218\ \ \ \ \ \ \ \ \ \{} +\DoxyCodeLine{00219\ \ \ \ \ \ \ \ \ \ \ \ \ node\ next\ =\ stack.front();\ stack.pop\_front();} +\DoxyCodeLine{00220\ \ \ \ \ \ \ \ \ \ \ \ \ director\&\ child\ =\ graph\_[next];} +\DoxyCodeLine{00221\ \ \ \ \ \ \ \ \ \ \ \ \ child.Flags\ \&=\ \string~director::VALID;} +\DoxyCodeLine{00222\ \ \ \ \ \ \ \ \ \ \ \ \ freed\_.push\_back(next);} +\DoxyCodeLine{00223\ } +\DoxyCodeLine{00224\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}(child.Sibling)\ stack.push\_front(child.Sibling);} +\DoxyCodeLine{00225\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}(child.Child)\ stack.push\_front(child.Child);} +\DoxyCodeLine{00226\ \ \ \ \ \ \ \ \ \}} +\DoxyCodeLine{00227\ \ \ \ \ \}} +\DoxyCodeLine{00228\ } +\DoxyCodeLine{00229\ } +\DoxyCodeLine{00230\ \textcolor{comment}{//\ Tree\ Access\ -\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/}} +\DoxyCodeLine{00231\ } +\DoxyCodeLine{00237\ \ \ \ \ data\_type\&\ \mbox{\hyperlink{classopen__cpp__utils_1_1directed__tree_afe497db6dba649dccc3520adc6ee87ac}{operator[]}}(node\ \textcolor{keywordtype}{id})\ \{\ \textcolor{keywordflow}{return}\ data\_[id];\ \}} +\DoxyCodeLine{00238\ } +\DoxyCodeLine{00244\ \ \ \ \ [[nodiscard]]\ \textcolor{keyword}{const}\ data\_type\&\ \mbox{\hyperlink{classopen__cpp__utils_1_1directed__tree_ae640e0a2ecf325d9f0f9253341d0ce2d}{operator[]}}(node\ \textcolor{keywordtype}{id})\textcolor{keyword}{\ const\ }\{\ \textcolor{keywordflow}{return}\ data\_[id];\ \}} +\DoxyCodeLine{00245\ } +\DoxyCodeLine{00246\ } +\DoxyCodeLine{00247\ \textcolor{comment}{//\ Visitor\ Pattern\ -\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/}} +\DoxyCodeLine{00248\ } +\DoxyCodeLine{00255\ \ \ \ \ \textcolor{keyword}{template}<\textcolor{keyword}{typename}\ O\ =\ pre\_order,\ \textcolor{keyword}{typename}\ V>} +\DoxyCodeLine{00256\ \ \ \ \ \textcolor{keywordtype}{void}\ \mbox{\hyperlink{classopen__cpp__utils_1_1directed__tree_aae5dccf63007f5094122dee8fdae986e}{traverse}}(V\&\ visitor)} +\DoxyCodeLine{00257\ \ \ \ \ \{} +\DoxyCodeLine{00258\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{classopen__cpp__utils_1_1directed__tree_1_1traverser}{traverser}}\ \mbox{\hyperlink{classopen__cpp__utils_1_1directed__tree_1_1traverser}{traverser}}(*\textcolor{keyword}{this},\ visitor);} +\DoxyCodeLine{00259\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{classopen__cpp__utils_1_1directed__tree_1_1traverser}{traverser}}();} +\DoxyCodeLine{00260\ \ \ \ \ \}} +\DoxyCodeLine{00261\ } +\DoxyCodeLine{00262\ } +\DoxyCodeLine{00263\ \textcolor{comment}{//\ Variables\ =======================================================================================================}} +\DoxyCodeLine{00264\ } +\DoxyCodeLine{00265\ \textcolor{keyword}{private}:} +\DoxyCodeLine{00266\ \ \ \ \ hierarchy\ graph\_;} +\DoxyCodeLine{00267\ \ \ \ \ storage\ \ \ data\_;} +\DoxyCodeLine{00268\ \ \ \ \ node\_queue\ freed\_;} +\DoxyCodeLine{00269\ } +\DoxyCodeLine{00270\ } +\DoxyCodeLine{00271\ \textcolor{comment}{//\ Navigation\ ======================================================================================================}} +\DoxyCodeLine{00272\ } +\DoxyCodeLine{00273\ \textcolor{keyword}{public}:} +\DoxyCodeLine{00274\ } +\DoxyCodeLine{00278\ \ \ \ \ \textcolor{keyword}{class\ }\mbox{\hyperlink{classopen__cpp__utils_1_1directed__tree_1_1breadth__first}{breadth\_first}}} +\DoxyCodeLine{00279\ \ \ \ \ \{} +\DoxyCodeLine{00280\ \ \ \ \ \textcolor{keyword}{public}:} +\DoxyCodeLine{00281\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{classopen__cpp__utils_1_1directed__tree_1_1breadth__first}{breadth\_first}}(\mbox{\hyperlink{classopen__cpp__utils_1_1directed__tree}{directed\_tree}}\&\ graph)\ :\ graph\_(graph),\ visit\_queue\_(0)\ \{\ \}} +\DoxyCodeLine{00282\ } +\DoxyCodeLine{00283\ \ \ \ \ \ \ \ \ node\ operator()(node\ node)} +\DoxyCodeLine{00284\ \ \ \ \ \ \ \ \ \{} +\DoxyCodeLine{00285\ \ \ \ \ \ \ \ \ \ \ \ \ node\ =\ visit\_queue\_.back();\ visit\_queue\_.pop\_back();} +\DoxyCodeLine{00286\ \ \ \ \ \ \ \ \ \ \ \ \ director\&\ current\ =\ graph\_.graph\_[node];} +\DoxyCodeLine{00287\ } +\DoxyCodeLine{00288\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}(current.next\_sibling)\ visit\_queue\_.push\_back(current.next\_sibling);} +\DoxyCodeLine{00289\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}(current.child)\ visit\_queue\_.push\_front(current.child);} +\DoxyCodeLine{00290\ } +\DoxyCodeLine{00291\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}(visit\_queue\_.empty())\ \textcolor{keywordflow}{return}\ 0;} +\DoxyCodeLine{00292\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ node;} +\DoxyCodeLine{00293\ \ \ \ \ \ \ \ \ \}} +\DoxyCodeLine{00294\ } +\DoxyCodeLine{00295\ \ \ \ \ \textcolor{keyword}{private}:} +\DoxyCodeLine{00296\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{classopen__cpp__utils_1_1directed__tree}{directed\_tree}}\&\ graph\_;} +\DoxyCodeLine{00297\ \ \ \ \ \ \ \ \ node\_queue\ \ \ \ \ \ visit\_queue\_;} +\DoxyCodeLine{00298\ \ \ \ \ \};} +\DoxyCodeLine{00299\ } +\DoxyCodeLine{00300\ } +\DoxyCodeLine{00304\ \ \ \ \ \textcolor{keyword}{class\ }\mbox{\hyperlink{classopen__cpp__utils_1_1directed__tree_1_1pre__order}{pre\_order}}} +\DoxyCodeLine{00305\ \ \ \ \ \{} +\DoxyCodeLine{00306\ \ \ \ \ \textcolor{keyword}{public}:} +\DoxyCodeLine{00307\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{classopen__cpp__utils_1_1directed__tree_1_1pre__order}{pre\_order}}(\mbox{\hyperlink{classopen__cpp__utils_1_1directed__tree}{directed\_tree}}\&\ graph)\ :\ graph\_(graph)\ \{\ \}} +\DoxyCodeLine{00308\ } +\DoxyCodeLine{00309\ \ \ \ \ \ \ \ \ node\ operator()(node\ \textcolor{keywordtype}{id})} +\DoxyCodeLine{00310\ \ \ \ \ \ \ \ \ \{} +\DoxyCodeLine{00311\ \ \ \ \ \ \ \ \ \ \ \ \ director\&\ current\ =\ graph\_.graph\_[id];} +\DoxyCodeLine{00312\ } +\DoxyCodeLine{00313\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}(current.next\_sibling)\ visit\_queue\_.push\_front(current.next\_sibling);} +\DoxyCodeLine{00314\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}(current.child)\ visit\_queue\_.push\_front(current.child);} +\DoxyCodeLine{00315\ } +\DoxyCodeLine{00316\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}(visit\_queue\_.empty())\ \textcolor{keywordflow}{return}\ 0;} +\DoxyCodeLine{00317\ \ \ \ \ \ \ \ \ \ \ \ \ node\ next\ =\ visit\_queue\_.front();\ visit\_queue\_.pop\_front();} +\DoxyCodeLine{00318\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ next;} +\DoxyCodeLine{00319\ \ \ \ \ \ \ \ \ \}} +\DoxyCodeLine{00320\ } +\DoxyCodeLine{00321\ \ \ \ \ \textcolor{keyword}{private}:} +\DoxyCodeLine{00322\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{classopen__cpp__utils_1_1directed__tree}{directed\_tree}}\&\ graph\_;} +\DoxyCodeLine{00323\ \ \ \ \ \ \ \ \ node\_queue\ \ \ \ \ \ visit\_queue\_;} +\DoxyCodeLine{00324\ \ \ \ \ \};} +\DoxyCodeLine{00325\ } +\DoxyCodeLine{00326\ } +\DoxyCodeLine{00330\ \ \ \ \ \textcolor{keyword}{class\ }\mbox{\hyperlink{classopen__cpp__utils_1_1directed__tree_1_1in__order}{in\_order}}} +\DoxyCodeLine{00331\ \ \ \ \ \{} +\DoxyCodeLine{00332\ \ \ \ \ \textcolor{keyword}{public}:} +\DoxyCodeLine{00333\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{classopen__cpp__utils_1_1directed__tree_1_1in__order}{in\_order}}(\mbox{\hyperlink{classopen__cpp__utils_1_1directed__tree}{directed\_tree}}\&\ graph)\ :\ graph\_(graph)\ \{\ \}} +\DoxyCodeLine{00334\ } +\DoxyCodeLine{00335\ \ \ \ \ \ \ \ \ node\ operator()(node\ node)} +\DoxyCodeLine{00336\ \ \ \ \ \ \ \ \ \{} +\DoxyCodeLine{00337\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}(node\ ==\ 0)\ visit\_queue\_.push\_back(graph\_.left\_most(node));} +\DoxyCodeLine{00338\ } +\DoxyCodeLine{00339\ \ \ \ \ \ \ \ \ \ \ \ \ node\ =\ visit\_queue\_.front();\ visit\_queue\_.pop\_front();} +\DoxyCodeLine{00340\ \ \ \ \ \ \ \ \ \ \ \ \ director\&\ current\ =\ graph\_.graph\_[node];} +\DoxyCodeLine{00341\ } +\DoxyCodeLine{00342\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}(current.Sibling)} +\DoxyCodeLine{00343\ \ \ \ \ \ \ \ \ \ \ \ \ \{} +\DoxyCodeLine{00344\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}(graph\_.next\_sibling(current.Sibling))\ visit\_queue\_.push\_back(current.parent);} +\DoxyCodeLine{00345\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ visit\_queue\_.push\_back(graph\_.left\_most(current.Sibling));} +\DoxyCodeLine{00346\ \ \ \ \ \ \ \ \ \ \ \ \ \}} +\DoxyCodeLine{00347\ } +\DoxyCodeLine{00348\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ node;} +\DoxyCodeLine{00349\ \ \ \ \ \ \ \ \ \}} +\DoxyCodeLine{00350\ } +\DoxyCodeLine{00351\ \ \ \ \ \textcolor{keyword}{private}:} +\DoxyCodeLine{00352\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{classopen__cpp__utils_1_1directed__tree}{directed\_tree}}\&\ graph\_;} +\DoxyCodeLine{00353\ \ \ \ \ \ \ \ \ node\_queue\ \ \ \ \ \ visit\_queue\_;} +\DoxyCodeLine{00354\ \ \ \ \ \};} +\DoxyCodeLine{00355\ } +\DoxyCodeLine{00356\ } +\DoxyCodeLine{00360\ \ \ \ \ \textcolor{keyword}{class\ }\mbox{\hyperlink{classopen__cpp__utils_1_1directed__tree_1_1post__order}{post\_order}}} +\DoxyCodeLine{00361\ \ \ \ \ \{} +\DoxyCodeLine{00362\ \ \ \ \ \textcolor{keyword}{public}:} +\DoxyCodeLine{00363\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{classopen__cpp__utils_1_1directed__tree_1_1post__order}{post\_order}}(\mbox{\hyperlink{classopen__cpp__utils_1_1directed__tree}{directed\_tree}}\&\ graph)\ :\ graph\_(graph)\ \{\ \}} +\DoxyCodeLine{00364\ } +\DoxyCodeLine{00365\ \ \ \ \ \ \ \ \ node\ operator()(node\ node)} +\DoxyCodeLine{00366\ \ \ \ \ \ \ \ \ \{} +\DoxyCodeLine{00367\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}(visit\_queue\_.empty())\ visit\_queue\_.push\_back(graph\_.left\_most(node));} +\DoxyCodeLine{00368\ } +\DoxyCodeLine{00369\ \ \ \ \ \ \ \ \ \ \ \ \ node\ =\ visit\_queue\_.front();\ visit\_queue\_.pop\_front();} +\DoxyCodeLine{00370\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}(node\ ==\ 0)\ \textcolor{keywordflow}{return}\ node;} +\DoxyCodeLine{00371\ \ \ \ \ \ \ \ \ \ \ \ \ director\&\ current\ =\ graph\_.graph\_[node];} +\DoxyCodeLine{00372\ } +\DoxyCodeLine{00373\ \ \ \ \ \ \ \ \ \ \ \ \ visit\_queue\_.push\_back(current.Sibling\ ?\ graph\_.left\_most(current.Sibling)\ :\ graph\_.parent(node));} +\DoxyCodeLine{00374\ } +\DoxyCodeLine{00375\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ node;} +\DoxyCodeLine{00376\ \ \ \ \ \ \ \ \ \}} +\DoxyCodeLine{00377\ } +\DoxyCodeLine{00378\ \ \ \ \ \textcolor{keyword}{private}:} +\DoxyCodeLine{00379\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{classopen__cpp__utils_1_1directed__tree}{directed\_tree}}\&\ graph\_;} +\DoxyCodeLine{00380\ \ \ \ \ \ \ \ \ node\_queue\ \ \ \ \ visit\_queue\_;} +\DoxyCodeLine{00381\ \ \ \ \ \};} +\DoxyCodeLine{00382\ } +\DoxyCodeLine{00383\ } +\DoxyCodeLine{00387\ \ \ \ \ \textcolor{keyword}{template}<\textcolor{keyword}{typename}\ V,\ \textcolor{keyword}{typename}\ O>} +\DoxyCodeLine{00388\ \ \ \ \ \textcolor{keyword}{class\ }\mbox{\hyperlink{classopen__cpp__utils_1_1directed__tree_1_1traverser}{traverser}}} +\DoxyCodeLine{00389\ \ \ \ \ \{} +\DoxyCodeLine{00390\ \ \ \ \ \textcolor{keyword}{public}:} +\DoxyCodeLine{00391\ \ \ \ \ \ \ \ \ \textcolor{keyword}{using\ }visitor\_type\ =\ V;} +\DoxyCodeLine{00392\ \ \ \ \ \ \ \ \ \textcolor{keyword}{using\ }order\_type\ =\ O;} +\DoxyCodeLine{00393\ } +\DoxyCodeLine{00394\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{classopen__cpp__utils_1_1directed__tree_1_1traverser}{traverser}}(\mbox{\hyperlink{classopen__cpp__utils_1_1directed__tree}{directed\_tree}}\&\ graph,\ visitor\_type\&\ visitor)\ :\ graph\_(graph),\ visitor\_(visitor),\ order\_(graph)\ \{\ \}} +\DoxyCodeLine{00395\ } +\DoxyCodeLine{00396\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{void}\ operator()()} +\DoxyCodeLine{00397\ \ \ \ \ \ \ \ \ \{} +\DoxyCodeLine{00398\ \ \ \ \ \ \ \ \ \ \ \ \ node\ node\ =\ 0;} +\DoxyCodeLine{00399\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{while}(node\ =\ order\_(node))} +\DoxyCodeLine{00400\ \ \ \ \ \ \ \ \ \ \ \ \ \{} +\DoxyCodeLine{00401\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}(visitor\_(graph\_[node],\ node))\ \textcolor{keywordflow}{break};} +\DoxyCodeLine{00402\ \ \ \ \ \ \ \ \ \ \ \ \ \}} +\DoxyCodeLine{00403\ \ \ \ \ \ \ \ \ \}} +\DoxyCodeLine{00404\ } +\DoxyCodeLine{00405\ \ \ \ \ \textcolor{keyword}{private}:} +\DoxyCodeLine{00406\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{classopen__cpp__utils_1_1directed__tree}{directed\_tree}}\&\ graph\_;} +\DoxyCodeLine{00407\ \ \ \ \ \ \ \ \ visitor\_type\&\ \ \ visitor\_;} +\DoxyCodeLine{00408\ \ \ \ \ \ \ \ \ order\_type\ \ \ \ \ \ order\_;} +\DoxyCodeLine{00409\ \ \ \ \ \};} +\DoxyCodeLine{00410\ \};} +\DoxyCodeLine{00411\ \}} +\DoxyCodeLine{00412\ } +\DoxyCodeLine{00413\ \textcolor{preprocessor}{\#endif\ }\textcolor{comment}{//DIRECTEDGRAPH\_H}} + +\end{DoxyCode} diff --git a/External/open-cpp-utils/Documentation/latex/doxygen.sty b/External/open-cpp-utils/Documentation/latex/doxygen.sty new file mode 100644 index 0000000..4bfc17f --- /dev/null +++ b/External/open-cpp-utils/Documentation/latex/doxygen.sty @@ -0,0 +1,694 @@ +\NeedsTeXFormat{LaTeX2e} +\ProvidesPackage{doxygen} + +% Packages used by this style file +\RequirePackage{alltt} +%%\RequirePackage{array} %% moved to refman.tex due to workaround for LaTex 2019 version and unmaintained tabu package +\RequirePackage{calc} +\RequirePackage{float} +%%\RequirePackage{ifthen} %% moved to refman.tex due to workaround for LaTex 2019 version and unmaintained tabu package +\RequirePackage{verbatim} +\RequirePackage[table]{xcolor} +\RequirePackage{longtable_doxygen} +\RequirePackage{tabu_doxygen} +\RequirePackage{fancyvrb} +\RequirePackage{tabularx} +\RequirePackage{multicol} +\RequirePackage{multirow} +\RequirePackage{hanging} +\RequirePackage{ifpdf} +\RequirePackage{adjustbox} +\RequirePackage{amssymb} +\RequirePackage{stackengine} +\RequirePackage{enumitem} +\RequirePackage{alphalph} +\RequirePackage[normalem]{ulem} % for strikeout, but don't modify emphasis + +%---------- Internal commands used in this style file ---------------- + +\newcommand{\ensurespace}[1]{% + \begingroup% + \setlength{\dimen@}{#1}% + \vskip\z@\@plus\dimen@% + \penalty -100\vskip\z@\@plus -\dimen@% + \vskip\dimen@% + \penalty 9999% + \vskip -\dimen@% + \vskip\z@skip% hide the previous |\vskip| from |\addvspace| + \endgroup% +} + +\newcommand{\DoxyHorRuler}[1]{% + \setlength{\parskip}{0ex plus 0ex minus 0ex}% + \ifthenelse{#1=0}% + {% + \hrule% + }% + {% + \hrulefilll% + }% +} +\newcommand{\DoxyLabelFont}{} +\newcommand{\entrylabel}[1]{% + {% + \parbox[b]{\labelwidth-4pt}{% + \makebox[0pt][l]{\DoxyLabelFont#1}% + \vspace{1.5\baselineskip}% + }% + }% +} + +\newenvironment{DoxyDesc}[1]{% + \ensurespace{4\baselineskip}% + \begin{list}{}{% + \settowidth{\labelwidth}{20pt}% + %\setlength{\parsep}{0pt}% + \setlength{\itemsep}{0pt}% + \setlength{\leftmargin}{\labelwidth+\labelsep}% + \renewcommand{\makelabel}{\entrylabel}% + }% + \item[#1]% +}{% + \end{list}% +} + +\newsavebox{\xrefbox} +\newlength{\xreflength} +\newcommand{\xreflabel}[1]{% + \sbox{\xrefbox}{#1}% + \setlength{\xreflength}{\wd\xrefbox}% + \ifthenelse{\xreflength>\labelwidth}{% + \begin{minipage}{\textwidth}% + \setlength{\parindent}{0pt}% + \hangindent=15pt\bfseries #1\vspace{1.2\itemsep}% + \end{minipage}% + }{% + \parbox[b]{\labelwidth}{\makebox[0pt][l]{\textbf{#1}}}% + }% +} + +%---------- Commands used by doxygen LaTeX output generator ---------- + +% Used by
     ... 
    +\newenvironment{DoxyPre}{% + \small% + \begin{alltt}% +}{% + \end{alltt}% + \normalsize% +} +% Necessary for redefining not defined characters, i.e. "Replacement Character" in tex output. +\newlength{\CodeWidthChar} +\newlength{\CodeHeightChar} +\settowidth{\CodeWidthChar}{?} +\settoheight{\CodeHeightChar}{?} +% Necessary for hanging indent +\newlength{\DoxyCodeWidth} + +\newcommand\DoxyCodeLine[1]{ + \ifthenelse{\equal{\detokenize{#1}}{}} + { + \vspace*{\baselineskip} + } + { + \hangpara{\DoxyCodeWidth}{1}{#1}\par + } +} + +\newcommand\NiceSpace{% + \discretionary{}{\kern\fontdimen2\font}{\kern\fontdimen2\font}% +} + +% Used by @code ... @endcode +\newenvironment{DoxyCode}[1]{% + \par% + \scriptsize% + \normalfont\ttfamily% + \rightskip0pt plus 1fil% + \settowidth{\DoxyCodeWidth}{000000}% + \settowidth{\CodeWidthChar}{?}% + \settoheight{\CodeHeightChar}{?}% + \setlength{\parskip}{0ex plus 0ex minus 0ex}% + \ifthenelse{\equal{#1}{0}} + { + {\lccode`~32 \lowercase{\global\let~}\NiceSpace}\obeyspaces% + } + { + {\lccode`~32 \lowercase{\global\let~}}\obeyspaces% + } + +}{% + \normalfont% + \normalsize% + \settowidth{\CodeWidthChar}{?}% + \settoheight{\CodeHeightChar}{?}% +} + +% Redefining not defined characters, i.e. "Replacement Character" in tex output. +\def\ucr{\adjustbox{width=\CodeWidthChar,height=\CodeHeightChar}{\stackinset{c}{}{c}{-.2pt}{% + \textcolor{white}{\sffamily\bfseries\small ?}}{% + \rotatebox{45}{$\blacksquare$}}}} + +% Used by @example, @include, @includelineno and @dontinclude +\newenvironment{DoxyCodeInclude}[1]{% + \DoxyCode{#1}% +}{% + \endDoxyCode% +} + +% Used by @verbatim ... @endverbatim +\newenvironment{DoxyVerb}{% + \par% + \footnotesize% + \verbatim% +}{% + \endverbatim% + \normalsize% +} + +% Used by @verbinclude +\newenvironment{DoxyVerbInclude}{% + \DoxyVerb% +}{% + \endDoxyVerb% +} + +% Used by numbered lists (using '-#' or
      ...
    ) +\setlistdepth{12} +\newlist{DoxyEnumerate}{enumerate}{12} +\setlist[DoxyEnumerate,1]{label=\arabic*.} +\setlist[DoxyEnumerate,2]{label=(\enumalphalphcnt*)} +\setlist[DoxyEnumerate,3]{label=\roman*.} +\setlist[DoxyEnumerate,4]{label=\enumAlphAlphcnt*.} +\setlist[DoxyEnumerate,5]{label=\arabic*.} +\setlist[DoxyEnumerate,6]{label=(\enumalphalphcnt*)} +\setlist[DoxyEnumerate,7]{label=\roman*.} +\setlist[DoxyEnumerate,8]{label=\enumAlphAlphcnt*.} +\setlist[DoxyEnumerate,9]{label=\arabic*.} +\setlist[DoxyEnumerate,10]{label=(\enumalphalphcnt*)} +\setlist[DoxyEnumerate,11]{label=\roman*.} +\setlist[DoxyEnumerate,12]{label=\enumAlphAlphcnt*.} + +% Used by bullet lists (using '-', @li, @arg, or
      ...
    ) +\setlistdepth{12} +\newlist{DoxyItemize}{itemize}{12} +\setlist[DoxyItemize]{label=\textperiodcentered} + +\setlist[DoxyItemize,1]{label=\textbullet} +\setlist[DoxyItemize,2]{label=\normalfont\bfseries \textendash} +\setlist[DoxyItemize,3]{label=\textasteriskcentered} +\setlist[DoxyItemize,4]{label=\textperiodcentered} + +% Used by description lists (using
    ...
    ) +\newenvironment{DoxyDescription}{% + \description% +}{% + \enddescription% +} + +% Used by @image, @dotfile, @dot ... @enddot, and @msc ... @endmsc +% (only if caption is specified) +\newenvironment{DoxyImage}{% + \begin{figure}[H]% + \centering% +}{% + \end{figure}% +} + +% Used by @image, @dotfile, @dot ... @enddot, and @msc ... @endmsc +% (only if no caption is specified) +\newenvironment{DoxyImageNoCaption}{% + \begin{center}% +}{% + \end{center}% +} + +% Used by @image +% (only if inline is specified) +\newenvironment{DoxyInlineImage}{% +}{% +} + +% Used by @attention +\newenvironment{DoxyAttention}[1]{% + \begin{DoxyDesc}{#1}% +}{% + \end{DoxyDesc}% +} + +% Used by @author and @authors +\newenvironment{DoxyAuthor}[1]{% + \begin{DoxyDesc}{#1}% +}{% + \end{DoxyDesc}% +} + +% Used by @date +\newenvironment{DoxyDate}[1]{% + \begin{DoxyDesc}{#1}% +}{% + \end{DoxyDesc}% +} + +% Used by @invariant +\newenvironment{DoxyInvariant}[1]{% + \begin{DoxyDesc}{#1}% +}{% + \end{DoxyDesc}% +} + +% Used by @note +\newenvironment{DoxyNote}[1]{% + \begin{DoxyDesc}{#1}% +}{% + \end{DoxyDesc}% +} + +% Used by @post +\newenvironment{DoxyPostcond}[1]{% + \begin{DoxyDesc}{#1}% +}{% + \end{DoxyDesc}% +} + +% Used by @pre +\newenvironment{DoxyPrecond}[1]{% + \begin{DoxyDesc}{#1}% +}{% + \end{DoxyDesc}% +} + +% Used by @copyright +\newenvironment{DoxyCopyright}[1]{% + \begin{DoxyDesc}{#1}% +}{% + \end{DoxyDesc}% +} + +% Used by @remark +\newenvironment{DoxyRemark}[1]{% + \begin{DoxyDesc}{#1}% +}{% + \end{DoxyDesc}% +} + +% Used by @return and @returns +\newenvironment{DoxyReturn}[1]{% + \begin{DoxyDesc}{#1}% +}{% + \end{DoxyDesc}% +} + +% Used by @since +\newenvironment{DoxySince}[1]{% + \begin{DoxyDesc}{#1}% +}{% + \end{DoxyDesc}% +} + +% Used by @see +\newenvironment{DoxySeeAlso}[1]{% + \begin{DoxyDesc}{#1}% +}{% + \end{DoxyDesc}% +} + +% Used by @version +\newenvironment{DoxyVersion}[1]{% + \begin{DoxyDesc}{#1}% +}{% + \end{DoxyDesc}% +} + +% Used by @warning +\newenvironment{DoxyWarning}[1]{% + \begin{DoxyDesc}{#1}% +}{% + \end{DoxyDesc}% +} + +% Used by @par and @paragraph +\newenvironment{DoxyParagraph}[1]{% + \begin{DoxyDesc}{#1}% +}{% + \end{DoxyDesc}% +} + +% Used by parameter lists +\newenvironment{DoxyParams}[2][]{% + \tabulinesep=1mm% + \par% + \ifthenelse{\equal{#1}{}}% + {\begin{longtabu*}spread 0pt [l]{|X[-1,l]|X[-1,l]|}}% name + description + {\ifthenelse{\equal{#1}{1}}% + {\begin{longtabu*}spread 0pt [l]{|X[-1,l]|X[-1,l]|X[-1,l]|}}% in/out + name + desc + {\begin{longtabu*}spread 0pt [l]{|X[-1,l]|X[-1,l]|X[-1,l]|X[-1,l]|}}% in/out + type + name + desc + } + \multicolumn{2}{l}{\hspace{-6pt}\bfseries\fontseries{bc}\selectfont\color{darkgray} #2}\\[1ex]% + \hline% + \endfirsthead% + \multicolumn{2}{l}{\hspace{-6pt}\bfseries\fontseries{bc}\selectfont\color{darkgray} #2}\\[1ex]% + \hline% + \endhead% +}{% + \end{longtabu*}% + \vspace{6pt}% +} + +% Used for fields of simple structs +\newenvironment{DoxyFields}[1]{% + \tabulinesep=1mm% + \par% + \begin{longtabu*}spread 0pt [l]{|X[-1,r]|X[-1,l]|X[-1,l]|}% + \multicolumn{3}{l}{\hspace{-6pt}\bfseries\fontseries{bc}\selectfont\color{darkgray} #1}\\[1ex]% + \hline% + \endfirsthead% + \multicolumn{3}{l}{\hspace{-6pt}\bfseries\fontseries{bc}\selectfont\color{darkgray} #1}\\[1ex]% + \hline% + \endhead% +}{% + \end{longtabu*}% + \vspace{6pt}% +} + +% Used for fields simple class style enums +\newenvironment{DoxyEnumFields}[1]{% + \tabulinesep=1mm% + \par% + \begin{longtabu*}spread 0pt [l]{|X[-1,r]|X[-1,l]|}% + \multicolumn{2}{l}{\hspace{-6pt}\bfseries\fontseries{bc}\selectfont\color{darkgray} #1}\\[1ex]% + \hline% + \endfirsthead% + \multicolumn{2}{l}{\hspace{-6pt}\bfseries\fontseries{bc}\selectfont\color{darkgray} #1}\\[1ex]% + \hline% + \endhead% +}{% + \end{longtabu*}% + \vspace{6pt}% +} + +% Used for parameters within a detailed function description +\newenvironment{DoxyParamCaption}{% + \renewcommand{\item}[2][]{\\ \hspace*{2.0cm} ##1 {\em ##2}}% +}{% +} + +% Used by return value lists +\newenvironment{DoxyRetVals}[1]{% + \tabulinesep=1mm% + \par% + \begin{longtabu*}spread 0pt [l]{|X[-1,r]|X[-1,l]|}% + \multicolumn{2}{l}{\hspace{-6pt}\bfseries\fontseries{bc}\selectfont\color{darkgray} #1}\\[1ex]% + \hline% + \endfirsthead% + \multicolumn{2}{l}{\hspace{-6pt}\bfseries\fontseries{bc}\selectfont\color{darkgray} #1}\\[1ex]% + \hline% + \endhead% +}{% + \end{longtabu*}% + \vspace{6pt}% +} + +% Used by exception lists +\newenvironment{DoxyExceptions}[1]{% + \tabulinesep=1mm% + \par% + \begin{longtabu*}spread 0pt [l]{|X[-1,r]|X[-1,l]|}% + \multicolumn{2}{l}{\hspace{-6pt}\bfseries\fontseries{bc}\selectfont\color{darkgray} #1}\\[1ex]% + \hline% + \endfirsthead% + \multicolumn{2}{l}{\hspace{-6pt}\bfseries\fontseries{bc}\selectfont\color{darkgray} #1}\\[1ex]% + \hline% + \endhead% +}{% + \end{longtabu*}% + \vspace{6pt}% +} + +% Used by template parameter lists +\newenvironment{DoxyTemplParams}[1]{% + \tabulinesep=1mm% + \par% + \begin{longtabu*}spread 0pt [l]{|X[-1,r]|X[-1,l]|}% + \multicolumn{2}{l}{\hspace{-6pt}\bfseries\fontseries{bc}\selectfont\color{darkgray} #1}\\[1ex]% + \hline% + \endfirsthead% + \multicolumn{2}{l}{\hspace{-6pt}\bfseries\fontseries{bc}\selectfont\color{darkgray} #1}\\[1ex]% + \hline% + \endhead% +}{% + \end{longtabu*}% + \vspace{6pt}% +} + +% Used for member lists +\newenvironment{DoxyCompactItemize}{% + \begin{itemize}% + \setlength{\itemsep}{-3pt}% + \setlength{\parsep}{0pt}% + \setlength{\topsep}{0pt}% + \setlength{\partopsep}{0pt}% +}{% + \end{itemize}% +} + +% Used for member descriptions +\newenvironment{DoxyCompactList}{% + \begin{list}{}{% + \setlength{\leftmargin}{0.5cm}% + \setlength{\itemsep}{0pt}% + \setlength{\parsep}{0pt}% + \setlength{\topsep}{0pt}% + \renewcommand{\makelabel}{\hfill}% + }% +}{% + \end{list}% +} + +% Used for reference lists (@bug, @deprecated, @todo, etc.) +\newenvironment{DoxyRefList}{% + \begin{list}{}{% + \setlength{\labelwidth}{10pt}% + \setlength{\leftmargin}{\labelwidth}% + \addtolength{\leftmargin}{\labelsep}% + \renewcommand{\makelabel}{\xreflabel}% + }% +}{% + \end{list}% +} + +% Used by @bug, @deprecated, @todo, etc. +\newenvironment{DoxyRefDesc}[1]{% + \begin{list}{}{% + \renewcommand\makelabel[1]{\textbf{##1}}% + \settowidth\labelwidth{\makelabel{#1}}% + \setlength\leftmargin{\labelwidth+\labelsep}% + }% +}{% + \end{list}% +} + +% Used by parameter lists and simple sections +\newenvironment{Desc} +{\begin{list}{}{% + \settowidth{\labelwidth}{20pt}% + \setlength{\parsep}{0pt}% + \setlength{\itemsep}{0pt}% + \setlength{\leftmargin}{\labelwidth+\labelsep}% + \renewcommand{\makelabel}{\entrylabel}% + } +}{% + \end{list}% +} + +% Used by tables +\newcommand{\PBS}[1]{\let\temp=\\#1\let\\=\temp}% +\newenvironment{TabularC}[1]% +{\tabulinesep=1mm +\begin{longtabu*}spread 0pt [c]{*#1{|X[-1]}|}}% +{\end{longtabu*}\par}% + +\newenvironment{TabularNC}[1]% +{\begin{tabu}spread 0pt [l]{*#1{|X[-1]}|}}% +{\end{tabu}\par}% + +% Used for member group headers +\newenvironment{Indent}{% + \begin{list}{}{% + \setlength{\leftmargin}{0.5cm}% + }% + \item[]\ignorespaces% +}{% + \unskip% + \end{list}% +} + +% Used when hyperlinks are turned on +\newcommand{\doxylink}[2]{% + \mbox{\hyperlink{#1}{#2}}% +} + +% Used when hyperlinks are turned on +% Third argument is the SectionType, see the doxygen internal +% documentation for the values (relevant: Page ... Subsubsection). +\newcommand{\doxysectlink}[3]{% + \mbox{\hyperlink{#1}{#2}}% +} +% Used when hyperlinks are turned off +\newcommand{\doxyref}[3]{% + \textbf{#1} (\textnormal{#2}\,\pageref{#3})% +} + +% Used when hyperlinks are turned off +% Fourth argument is the SectionType, see the doxygen internal +% documentation for the values (relevant: Page ... Subsubsection). +\newcommand{\doxysectref}[4]{% + \textbf{#1} (\textnormal{#2}\,\pageref{#3})% +} + +% Used to link to a table when hyperlinks are turned on +\newcommand{\doxytablelink}[2]{% + \ref{#1}% +} + +% Used to link to a table when hyperlinks are turned off +\newcommand{\doxytableref}[3]{% + \ref{#3}% +} + +% Used by @addindex +\newcommand{\lcurly}{\{} +\newcommand{\rcurly}{\}} + +% Colors used for syntax highlighting +\definecolor{comment}{rgb}{0.5,0.0,0.0} +\definecolor{keyword}{rgb}{0.0,0.5,0.0} +\definecolor{keywordtype}{rgb}{0.38,0.25,0.125} +\definecolor{keywordflow}{rgb}{0.88,0.5,0.0} +\definecolor{preprocessor}{rgb}{0.5,0.38,0.125} +\definecolor{stringliteral}{rgb}{0.0,0.125,0.25} +\definecolor{charliteral}{rgb}{0.0,0.5,0.5} +\definecolor{xmlcdata}{rgb}{0.0,0.0,0.0} +\definecolor{vhdldigit}{rgb}{1.0,0.0,1.0} +\definecolor{vhdlkeyword}{rgb}{0.43,0.0,0.43} +\definecolor{vhdllogic}{rgb}{1.0,0.0,0.0} +\definecolor{vhdlchar}{rgb}{0.0,0.0,0.0} + +% Color used for table heading +\newcommand{\tableheadbgcolor}{lightgray}% + +% Version of hypertarget with correct landing location +\newcommand{\Hypertarget}[1]{\Hy@raisedlink{\hypertarget{#1}{}}} + +% possibility to have sections etc. be within the margins +% unfortunately had to copy part of book.cls and add \raggedright +\makeatletter +\newcounter{subsubsubsection}[subsubsection] +\newcounter{subsubsubsubsection}[subsubsubsection] +\newcounter{subsubsubsubsubsection}[subsubsubsubsection] +\newcounter{subsubsubsubsubsubsection}[subsubsubsubsubsection] +\renewcommand{\thesubsubsubsection}{\thesubsubsection.\arabic{subsubsubsection}} +\renewcommand{\thesubsubsubsubsection}{\thesubsubsubsection.\arabic{subsubsubsubsection}} +\renewcommand{\thesubsubsubsubsubsection}{\thesubsubsubsubsection.\arabic{subsubsubsubsubsection}} +\renewcommand{\thesubsubsubsubsubsubsection}{\thesubsubsubsubsubsection.\arabic{subsubsubsubsubsubsection}} +\newcommand{\subsubsubsectionmark}[1]{} +\newcommand{\subsubsubsubsectionmark}[1]{} +\newcommand{\subsubsubsubsubsectionmark}[1]{} +\newcommand{\subsubsubsubsubsubsectionmark}[1]{} +\def\toclevel@subsubsubsection{4} +\def\toclevel@subsubsubsubsection{5} +\def\toclevel@subsubsubsubsubsection{6} +\def\toclevel@subsubsubsubsubsubsection{7} +\def\toclevel@paragraph{8} +\def\toclevel@subparagraph{9} + +\newcommand\doxysection{\@startsection {section}{1}{\z@}% + {-3.5ex \@plus -1ex \@minus -.2ex}% + {2.3ex \@plus.2ex}% + {\raggedright\normalfont\Large\bfseries}} +\newcommand\doxysubsection{\@startsection{subsection}{2}{\z@}% + {-3.25ex\@plus -1ex \@minus -.2ex}% + {1.5ex \@plus .2ex}% + {\raggedright\normalfont\large\bfseries}} +\newcommand\doxysubsubsection{\@startsection{subsubsection}{3}{\z@}% + {-3.25ex\@plus -1ex \@minus -.2ex}% + {1.5ex \@plus .2ex}% + {\raggedright\normalfont\normalsize\bfseries}} +\newcommand\doxysubsubsubsection{\@startsection{subsubsubsection}{4}{\z@}% + {-3.25ex\@plus -1ex \@minus -.2ex}% + {1.5ex \@plus .2ex}% + {\raggedright\normalfont\normalsize\bfseries}} +\newcommand\doxysubsubsubsubsection{\@startsection{subsubsubsubsection}{5}{\z@}% + {-3.25ex\@plus -1ex \@minus -.2ex}% + {1.5ex \@plus .2ex}% + {\raggedright\normalfont\normalsize\bfseries}} +\newcommand\doxysubsubsubsubsubsection{\@startsection{subsubsubsubsubsection}{6}{\z@}% + {-3.25ex\@plus -1ex \@minus -.2ex}% + {1.5ex \@plus .2ex}% + {\raggedright\normalfont\normalsize\bfseries}} +\newcommand\doxysubsubsubsubsubsubsection{\@startsection{subsubsubsubsubsubsection}{7}{\z@}% + {-3.25ex\@plus -1ex \@minus -.2ex}% + {1.5ex \@plus .2ex}% + {\raggedright\normalfont\normalsize\bfseries}} +\newcommand\doxyparagraph{\@startsection{paragraph}{8}{\z@}% + {-3.25ex\@plus -1ex \@minus -.2ex}% + {1.5ex \@plus .2ex}% + {\raggedright\normalfont\normalsize\bfseries}} +\newcommand\doxysubparagraph{\@startsection{subparagraph}{9}{\parindent}% + {-3.25ex\@plus -1ex \@minus -.2ex}% + {1.5ex \@plus .2ex}% + {\raggedright\normalfont\normalsize\bfseries}} + +\newcommand\l@subsubsubsection{\@dottedtocline{4}{6.1em}{7.8em}} +\newcommand\l@subsubsubsubsection{\@dottedtocline{5}{6.1em}{9.4em}} +\newcommand\l@subsubsubsubsubsection{\@dottedtocline{6}{6.1em}{11em}} +\newcommand\l@subsubsubsubsubsubsection{\@dottedtocline{7}{6.1em}{12.6em}} +\renewcommand\l@paragraph{\@dottedtocline{8}{6.1em}{14.2em}} +\renewcommand\l@subparagraph{\@dottedtocline{9}{6.1em}{15.8em}} +\makeatother +% the sectsty doesn't look to be maintained but gives, in our case, some warning like: +% LaTeX Warning: Command \underline has changed. +% Check if current package is valid. +% unfortunately had to copy the relevant part +\newcommand*{\doxypartfont} [1] + {\gdef\SS@partnumberfont{\SS@sectid{0}\SS@nopart\SS@makeulinepartchap#1} + \gdef\SS@parttitlefont{\SS@sectid{0}\SS@titlepart\SS@makeulinepartchap#1}} +\newcommand*{\doxychapterfont} [1] + {\gdef\SS@chapnumfont{\SS@sectid{1}\SS@nopart\SS@makeulinepartchap#1} + \gdef\SS@chaptitlefont{\SS@sectid{1}\SS@titlepart\SS@makeulinepartchap#1}} +\newcommand*{\doxysectionfont} [1] + {\gdef\SS@sectfont{\SS@sectid{2}\SS@rr\SS@makeulinesect#1}} +\newcommand*{\doxysubsectionfont} [1] + {\gdef\SS@subsectfont{\SS@sectid{3}\SS@rr\SS@makeulinesect#1}} +\newcommand*{\doxysubsubsectionfont} [1] + {\gdef\SS@subsubsectfont{\SS@sectid{4}\SS@rr\SS@makeulinesect#1}} +\newcommand*{\doxyparagraphfont} [1] + {\gdef\SS@parafont{\SS@sectid{5}\SS@rr\SS@makeulinesect#1}} +\newcommand*{\doxysubparagraphfont} [1] + {\gdef\SS@subparafont{\SS@sectid{6}\SS@rr\SS@makeulinesect#1}} +\newcommand*{\doxyminisecfont} [1] + {\gdef\SS@minisecfont{\SS@sectid{7}\SS@rr\SS@makeulinepartchap#1}} +\newcommand*{\doxyallsectionsfont} [1] {\doxypartfont{#1}% + \doxychapterfont{#1}% + \doxysectionfont{#1}% + \doxysubsectionfont{#1}% + \doxysubsubsectionfont{#1}% + \doxyparagraphfont{#1}% + \doxysubparagraphfont{#1}% + \doxyminisecfont{#1}}% +% Define caption that is also suitable in a table +\makeatletter +\def\doxyfigcaption{% +\H@refstepcounter{figure}% +\@dblarg{\@caption{figure}}} +\makeatother + +% Define alpha enumarative names for counters > 26 +\makeatletter +\def\enumalphalphcnt#1{\expandafter\@enumalphalphcnt\csname c@#1\endcsname} +\def\@enumalphalphcnt#1{\alphalph{#1}} +\def\enumAlphAlphcnt#1{\expandafter\@enumAlphAlphcnt\csname c@#1\endcsname} +\def\@enumAlphAlphcnt#1{\AlphAlph{#1}} +\makeatother +\AddEnumerateCounter{\enumalphalphcnt}{\@enumalphalphcnt}{aa} +\AddEnumerateCounter{\enumAlphAlphcnt}{\@enumAlphAlphcnt}{AA} diff --git a/External/open-cpp-utils/Documentation/latex/etoc_doxygen.sty b/External/open-cpp-utils/Documentation/latex/etoc_doxygen.sty new file mode 100644 index 0000000..5f7e127 --- /dev/null +++ b/External/open-cpp-utils/Documentation/latex/etoc_doxygen.sty @@ -0,0 +1,2178 @@ +%% +%% This is file etoc_doxygen.sty +%% +%% Apart from this header notice and the renaming from etoc to +%% etoc_doxygen (also in \ProvidesPackage) it is an identical +%% copy of +%% +%% etoc.sty +%% +%% at version 1.2b of 2023/07/01. +%% +%% This file has been provided to Doxygen team courtesy of the +%% author for benefit of users having a LaTeX installation not +%% yet providing version 1.2a or later of etoc, whose +%% deeplevels feature is required. +%% +%% The original source etoc.dtx (only of the latest version at +%% any given time) is available at +%% +%% https://ctan.org/pkg/etoc +%% +%% and contains the terms for copying and modification as well +%% as author contact information. +%% +%% In brief any modified versions of this file must be renamed +%% with new filenames distinct from etoc.sty. +%% +%% Package: etoc +%% Version: 1.2b +%% License: LPPL 1.3c +%% Copyright (C) 2012-2023 Jean-Francois B. +\NeedsTeXFormat{LaTeX2e}[2003/12/01] +\ProvidesPackage{etoc_doxygen}[2023/07/01 v1.2b Completely customisable TOCs (JFB)] +\newif\ifEtoc@oldLaTeX +\@ifl@t@r\fmtversion{2020/10/01} + {} + {\Etoc@oldLaTeXtrue + \PackageInfo{etoc}{Old LaTeX (\fmtversion) detected!\MessageBreak + Since 1.1a (2023/01/14), etoc prefers LaTeX at least\MessageBreak + as recent as 2020-10-01, for reasons of the .toc file,\MessageBreak + and used to require it (from 1.1a to 1.2).\MessageBreak + This etoc (1.2b) does not *require* it, but has not been\MessageBreak + tested thoroughly on old LaTeX (especially if document\MessageBreak + does not use hyperref) and retrofitting was done only\MessageBreak + on basis of author partial remembrances of old context.\MessageBreak + Reported}} +\RequirePackage{kvoptions} +\SetupKeyvalOptions{prefix=Etoc@} +\newif\ifEtoc@lof +\DeclareVoidOption{lof}{\Etoc@loftrue + \PackageInfo{etoc}{Experimental support for \string\locallistoffigures.\MessageBreak + Barely tested, use at own risk}% +} +\newif\ifEtoc@lot +\DeclareVoidOption{lot}{\Etoc@lottrue + \PackageInfo{etoc}{Experimental support for \string\locallistoftables.\MessageBreak + Barely tested, use at own risk}% +} +\@ifclassloaded{memoir}{ +\PackageInfo{etoc} + {As this is with memoir class, all `...totoc' options\MessageBreak + are set true by default. Reported} +\DeclareBoolOption[true]{maintoctotoc} +\DeclareBoolOption[true]{localtoctotoc} +\DeclareBoolOption[true]{localloftotoc} +\DeclareBoolOption[true]{locallottotoc} +}{ +\DeclareBoolOption[false]{maintoctotoc} +\DeclareBoolOption[false]{localtoctotoc} +\DeclareBoolOption[false]{localloftotoc} +\DeclareBoolOption[false]{locallottotoc} +} +\DeclareBoolOption[true]{ouroboros} +\DeclareBoolOption[false]{deeplevels} +\DeclareDefaultOption{\PackageWarning{etoc}{Option `\CurrentOption' is unknown.}} +\ProcessKeyvalOptions* +\DisableKeyvalOption[action=error,package=etoc]{etoc}{lof} +\DisableKeyvalOption[action=error,package=etoc]{etoc}{lot} +\DisableKeyvalOption[action=error,package=etoc]{etoc}{deeplevels} +\def\etocsetup#1{\setkeys{etoc}{#1}} +\def\etocifmaintoctotoc{\ifEtoc@maintoctotoc + \expandafter\@firstoftwo + \else + \expandafter\@secondoftwo + \fi} +\def\etociflocaltoctotoc{\ifEtoc@localtoctotoc + \expandafter\@firstoftwo + \else + \expandafter\@secondoftwo + \fi} +\def\etociflocalloftotoc{\ifEtoc@localloftotoc + \expandafter\@firstoftwo + \else + \expandafter\@secondoftwo + \fi} +\def\etociflocallottotoc{\ifEtoc@locallottotoc + \expandafter\@firstoftwo + \else + \expandafter\@secondoftwo + \fi} +\RequirePackage{multicol} +\def\etoc@{\etoc@} +\long\def\Etoc@gobtoetoc@ #1\etoc@{} +\newtoks\Etoc@toctoks +\def\Etoc@par{\par} +\def\etocinline{\def\Etoc@par{}} +\let\etocnopar\etocinline +\def\etocdisplay{\def\Etoc@par{\par}} +\let\Etoc@global\@empty +\def\etocglobaldefs{\let\Etoc@global\global\let\tof@global\global} +\def\etoclocaldefs {\let\Etoc@global\@empty\let\tof@global\@empty} +\newif\ifEtoc@numbered +\newif\ifEtoc@hyperref +\newif\ifEtoc@parskip +\newif\ifEtoc@tocwithid +\newif\ifEtoc@standardlines +\newif\ifEtoc@etocstyle +\newif\ifEtoc@classstyle +\newif\ifEtoc@keeporiginaltoc +\newif\ifEtoc@skipprefix +\newif\ifEtoc@isfirst +\newif\ifEtoc@localtoc +\newif\ifEtoc@skipthisone +\newif\ifEtoc@stoptoc +\newif\ifEtoc@notactive +\newif\ifEtoc@mustclosegroup +\newif\ifEtoc@isemptytoc +\newif\ifEtoc@checksemptiness +\def\etocchecksemptiness {\Etoc@checksemptinesstrue } +\def\etocdoesnotcheckemptiness {\Etoc@checksemptinessfalse } +\newif\ifEtoc@notocifnotoc +\def\etocnotocifnotoc {\Etoc@checksemptinesstrue\Etoc@notocifnotoctrue } +\newcounter{etoc@tocid} +\def\Etoc@tocext{toc} +\def\Etoc@lofext{lof} +\def\Etoc@lotext{lot} +\let\Etoc@currext\Etoc@tocext +\def\etocifislocal{\ifEtoc@localtoc\expandafter\@firstoftwo\else + \expandafter\@secondoftwo\fi + } +\def\etocifislocaltoc{\etocifislocal{\ifx\Etoc@currext\Etoc@tocext + \expandafter\@firstoftwo\else + \expandafter\@secondoftwo\fi}% + {\@secondoftwo}% + } +\def\etocifislocallof{\etocifislocal{\ifx\Etoc@currext\Etoc@lofext + \expandafter\@firstoftwo\else + \expandafter\@secondoftwo\fi}% + {\@secondoftwo}% + } +\def\etocifislocallot{\etocifislocal{\ifx\Etoc@currext\Etoc@lotext + \expandafter\@firstoftwo\else + \expandafter\@secondoftwo\fi}% + {\@secondoftwo}% + } +\expandafter\def\csname Etoc@-3@@\endcsname {-\thr@@} +\expandafter\def\csname Etoc@-2@@\endcsname {-\tw@} +\expandafter\let\csname Etoc@-1@@\endcsname \m@ne +\expandafter\let\csname Etoc@0@@\endcsname \z@ +\expandafter\let\csname Etoc@1@@\endcsname \@ne +\expandafter\let\csname Etoc@2@@\endcsname \tw@ +\expandafter\let\csname Etoc@3@@\endcsname \thr@@ +\expandafter\chardef\csname Etoc@4@@\endcsname 4 +\expandafter\chardef\csname Etoc@5@@\endcsname 5 +\expandafter\chardef\csname Etoc@6@@\endcsname 6 +\ifEtoc@deeplevels + \expandafter\chardef\csname Etoc@7@@\endcsname 7 + \expandafter\chardef\csname Etoc@8@@\endcsname 8 + \expandafter\chardef\csname Etoc@9@@\endcsname 9 + \expandafter\chardef\csname Etoc@10@@\endcsname 10 + \expandafter\chardef\csname Etoc@11@@\endcsname 11 + \expandafter\chardef\csname Etoc@12@@\endcsname 12 +\fi +\expandafter\let\expandafter\Etoc@maxlevel + \csname Etoc@\ifEtoc@deeplevels12\else6\fi @@\endcsname +\edef\etocthemaxlevel{\number\Etoc@maxlevel} +\@ifclassloaded{memoir}{\def\Etoc@minf{-\thr@@}}{\def\Etoc@minf{-\tw@}} +\let\Etoc@none@@ \Etoc@minf +\expandafter\let\expandafter\Etoc@all@@ + \csname Etoc@\ifEtoc@deeplevels11\else5\fi @@\endcsname +\let\Etoc@dolevels\@empty +\def\Etoc@newlevel #1{\expandafter\def\expandafter\Etoc@dolevels\expandafter + {\Etoc@dolevels\Etoc@do{#1}}} +\ifdefined\expanded + \def\etocsetlevel#1#2{\expanded{\noexpand\etoc@setlevel{#1}{#2}}}% +\else + \def\etocsetlevel#1#2{{\edef\Etoc@tmp{\noexpand\etoc@setlevel{#1}{#2}}\expandafter}\Etoc@tmp}% +\fi +\def\etoc@setlevel#1#2{% + \edef\Etoc@tmp{\the\numexpr#2}% + \if1\ifnum\Etoc@tmp>\Etoc@maxlevel0\fi\unless\ifnum\Etoc@minf<\Etoc@tmp;\fi1% + \ifEtoc@deeplevels + \in@{.#1,}{.none,.all,.figure,.table,.-3,.-2,.-1,.0,.1,.2,.3,.4,.5,.6,% + .7,.8,.9,.10,.11,.12,}% + \else + \in@{.#1,}{.none,.all,.figure,.table,.-3,.-2,.-1,.0,.1,.2,.3,.4,.5,.6,}% + \fi + \ifin@\else\if\@car#1\@nil @\in@true\fi\fi + \ifin@ + \PackageWarning{etoc} + {Sorry, but `#1' is forbidden as level name.\MessageBreak + \if\@car#1\@nil @% + (because of the @ as first character)\MessageBreak\fi + Reported}% + \else + \etocifunknownlevelTF{#1}{\Etoc@newlevel{#1}}{}% + \expandafter\let\csname Etoc@#1@@\expandafter\endcsname + \csname Etoc@\Etoc@tmp @@\endcsname + \expandafter\edef\csname Etoc@@#1@@\endcsname + {\expandafter\noexpand\csname Etoc@#1@@\endcsname}% + \expandafter\edef\csname toclevel@@#1\endcsname + {\expandafter\noexpand\csname toclevel@#1\endcsname}% + \fi + \else + \PackageWarning{etoc} + {Argument `\detokenize{#2}' of \string\etocsetlevel\space should + represent one of\MessageBreak + \ifnum\Etoc@minf=-\thr@@-2, \fi-1, 0, 1, 2, \ifEtoc@deeplevels ...\else3, 4\fi, + \the\numexpr\Etoc@maxlevel-1, or \number\Etoc@maxlevel\space + but evaluates to \Etoc@tmp.\MessageBreak + The level of `#1' will be set to \number\Etoc@maxlevel.\MessageBreak + Tables of contents will ignore `#1' as long\MessageBreak + as its level is \number\Etoc@maxlevel\space (=\string\etocthemaxlevel).% + \MessageBreak + Reported}% + \etocifunknownlevelTF{#1}{\Etoc@newlevel{#1}}{}% + \expandafter\let\csname Etoc@#1@@\endcsname\Etoc@maxlevel + \fi +} +\def\etoclevel#1{\csname Etoc@#1@@\endcsname} +\def\etocthelevel#1{\number\csname Etoc@#1@@\endcsname} +\def\etocifunknownlevelTF#1{\@ifundefined{Etoc@#1@@}} +\@ifclassloaded{memoir}{\etocsetlevel{book}{-2}}{} +\etocsetlevel{part}{-1} +\etocsetlevel{chapter}{0} +\etocsetlevel{section}{1} +\etocsetlevel{subsection}{2} +\etocsetlevel{subsubsection}{3} +\etocsetlevel{paragraph}{4} +\etocsetlevel{subparagraph}{5} +\ifdefined\c@chapter + \etocsetlevel{appendix}{0} +\else + \etocsetlevel{appendix}{1} +\fi +\def\Etoc@do#1{\@namedef{l@@#1}{\csname l@#1\endcsname}} +\Etoc@dolevels +\let\Etoc@figure@@\Etoc@maxlevel +\let\Etoc@table@@ \Etoc@maxlevel +\let\Etoc@gobblethreeorfour\@gobblefour +\ifdefined\@gobblethree + \let\Etoc@gobblethree\@gobblethree +\else + \long\def\Etoc@gobblethree#1#2#3{}% +\fi +\AtBeginDocument{% +\@ifpackageloaded{parskip}{\Etoc@parskiptrue}{}% +\@ifpackageloaded{hyperref} + {\Etoc@hyperreftrue} + {\ifEtoc@oldLaTeX + \let\Etoc@gobblethreeorfour\Etoc@gobblethree + \let\Etoc@etoccontentsline@fourargs\Etoc@etoccontentsline@ + \long\def\Etoc@etoccontentsline@#1#2#3{% + \Etoc@etoccontentsline@fourargs{#1}{#2}{#3}{}% + }% + \fi + }% +} +\def\etocskipfirstprefix {\global\Etoc@skipprefixtrue } +\def\Etoc@updatestackofends#1\etoc@{\gdef\Etoc@stackofends{#1}} +\def\Etoc@stackofends{{-3}{}} +\def\Etoc@doendsandbegin{% + \expandafter\Etoc@traversestackofends\Etoc@stackofends\etoc@ +} +\def\Etoc@traversestackofends#1{% + \ifnum#1>\Etoc@level + \csname Etoc@end@#1\endcsname + \expandafter\Etoc@traversestackofends + \else + \Etoc@traversestackofends@done{#1}% + \fi +} +\def\Etoc@traversestackofends@done#1#2{#2% + \ifnum#1<\Etoc@level + \csname Etoc@begin@\the\numexpr\Etoc@level\endcsname + \Etoc@global\Etoc@isfirsttrue + \edef\Etoc@tmp{{\the\numexpr\Etoc@level}}% + \else + \Etoc@global\Etoc@isfirstfalse + \let\Etoc@tmp\@empty + \fi + \expandafter\Etoc@updatestackofends\Etoc@tmp{#1}% +} +\def\Etoc@etoccontentsline #1{% + \let\Etoc@next\Etoc@gobblethreeorfour + \ifnum\csname Etoc@#1@@\endcsname=\Etoc@maxlevel + \else + \Etoc@skipthisonefalse + \global\expandafter\let\expandafter\Etoc@level\csname Etoc@#1@@\endcsname + \if @\@car#1\@nil\else\global\let\Etoc@virtualtop\Etoc@level\fi + \ifEtoc@localtoc + \ifEtoc@stoptoc + \Etoc@skipthisonetrue + \else + \ifEtoc@notactive + \Etoc@skipthisonetrue + \else + \unless\ifnum\Etoc@level>\etoclocaltop + \Etoc@skipthisonetrue + \global\Etoc@stoptoctrue + \fi + \fi + \fi + \fi + \ifEtoc@skipthisone + \else + \unless\ifnum\Etoc@level>\c@tocdepth + \ifEtoc@standardlines + \let\Etoc@next\Etoc@savedcontentsline + \else + \let\Etoc@next\Etoc@etoccontentsline@ + \fi + \fi + \fi + \fi + \Etoc@next{#1}% +} +\def\Etoc@etoccontentsline@ #1#2#3#4{% + \Etoc@doendsandbegin + \Etoc@global\edef\Etoc@prefix {\expandafter\noexpand + \csname Etoc@prefix@\the\numexpr\Etoc@level\endcsname }% + \Etoc@global\edef\Etoc@contents{\expandafter\noexpand + \csname Etoc@contents@\the\numexpr\Etoc@level\endcsname }% + \ifEtoc@skipprefix \Etoc@global\def\Etoc@prefix{\@empty}\fi + \global\Etoc@skipprefixfalse + \Etoc@lxyz{#2}{#3}{#4}% + \Etoc@prefix + \Etoc@contents +} +\def\Etoc@lxyz #1#2#3{% + \ifEtoc@hyperref + \Etoc@global\def\etocthelink##1{\hyperlink{#3}{##1}}% + \else + \Etoc@global\let\etocthelink\@firstofone + \fi + \Etoc@global\def\etocthepage {#2}% + \ifEtoc@hyperref + \ifx\etocthepage\@empty + \Etoc@global\let\etocthelinkedpage\@empty + \else + \Etoc@global\def\etocthelinkedpage{\hyperlink {#3}{#2}}% + \fi + \else + \Etoc@global\let\etocthelinkedpage\etocthepage + \fi + \Etoc@global\def\etocthename{#1}% + \futurelet\Etoc@getnb@token\Etoc@@getnb #1\hspace\etoc@ + \ifEtoc@hyperref + \def\Etoc@tmp##1##2{\Etoc@global\def##2{\hyperlink{#3}{##1}}}% + \expandafter\Etoc@tmp\expandafter{\etocthename}\etocthelinkedname + \ifEtoc@numbered + \expandafter\Etoc@tmp\expandafter{\etocthenumber}\etocthelinkednumber + \else + \Etoc@global\let\etocthelinkednumber\@empty + \fi + \else + \Etoc@global\let\etocthelinkedname \etocthename + \Etoc@global\let\etocthelinkednumber\etocthenumber + \fi + \Etoc@global\expandafter\let\csname etoclink \endcsname \etocthelink + \Etoc@global\expandafter\let\csname etocname \endcsname \etocthename + \Etoc@global\expandafter\let\csname etocnumber \endcsname\etocthenumber + \Etoc@global\expandafter\let\csname etocpage \endcsname \etocthepage + \ifEtoc@hyperref + \Etoc@lxyz@linktoc + \fi +} +\def\Etoc@lxyz@linktoc{% + \ifcase\Hy@linktoc + \or + \Etoc@global\expandafter\let\csname etocname \endcsname\etocthelinkedname + \Etoc@global\expandafter\let\csname etocnumber \endcsname\etocthelinkednumber + \or % page + \Etoc@global\expandafter\let\csname etocpage \endcsname\etocthelinkedpage + \else % all + \Etoc@global\expandafter\let\csname etocname \endcsname\etocthelinkedname + \Etoc@global\expandafter\let\csname etocnumber \endcsname\etocthelinkednumber + \Etoc@global\expandafter\let\csname etocpage \endcsname\etocthelinkedpage + \fi +} +\def\Etoc@@getnb {% + \let\Etoc@next\Etoc@getnb + \ifx\Etoc@getnb@token\@sptoken\let\Etoc@next\Etoc@getnb@nonbr\fi + \ifx\Etoc@getnb@token\bgroup \let\Etoc@next\Etoc@getnb@nonbr\fi + \Etoc@next +} +\def\Etoc@getnb #1{% + \in@{#1}{\numberline\chapternumberline\partnumberline\booknumberline}% + \ifin@ + \let\Etoc@next\Etoc@getnb@nmbrd + \else + \ifnum\Etoc@level=\m@ne + \let\Etoc@next\Etoc@@getit + \else + \let\Etoc@next\Etoc@getnb@nonbr + \fi + \in@{#1}{\nonumberline}% + \ifin@ + \let\Etoc@next\Etoc@getnb@nonumberline + \fi + \fi + \Etoc@next #1% +} +\def\Etoc@getnb@nmbrd #1#2{% + \Etoc@global\Etoc@numberedtrue + \Etoc@global\def\etocthenumber {#2}% + \Etoc@getnb@nmbrd@getname\@empty +}% +\def\Etoc@getnb@nmbrd@getname #1\hspace\etoc@ {% + \Etoc@global\expandafter\def\expandafter\etocthename\expandafter{#1}% +} +\def\Etoc@getnb@nonbr #1\etoc@ {% + \Etoc@global\Etoc@numberedfalse + \Etoc@global\let\etocthenumber \@empty +} +\def\Etoc@getnb@nonumberline #1\hspace\etoc@ {% + \Etoc@global\Etoc@numberedfalse + \Etoc@global\let\etocthenumber \@empty + \Etoc@global\expandafter\def\expandafter\etocthename\expandafter{\@gobble#1}% +} +\def\Etoc@@getit #1\hspace#2{% + \ifx\etoc@#2% + \Etoc@global\Etoc@numberedfalse + \Etoc@global\let\etocthenumber \@empty + \else + \Etoc@global\Etoc@numberedtrue + \Etoc@global\def\etocthenumber {#1}% + \expandafter\Etoc@getit@getname \expandafter\@empty + \fi +} +\def\Etoc@getit@getname #1\hspace\etoc@ {% + \Etoc@global\expandafter\def\expandafter\etocthename\expandafter{#1}% +} +\let\etocthename \@empty +\let\etocthenumber \@empty +\let\etocthepage \@empty +\let\etocthelinkedname \@empty +\let\etocthelinkednumber \@empty +\let\etocthelinkedpage \@empty +\let\etocthelink \@firstofone +\DeclareRobustCommand*{\etocname} {} +\DeclareRobustCommand*{\etocnumber}{} +\DeclareRobustCommand*{\etocpage} {} +\DeclareRobustCommand*{\etoclink} {\@firstofone} +\DeclareRobustCommand*{\etocifnumbered} + {\ifEtoc@numbered\expandafter\@firstoftwo\else\expandafter\@secondoftwo\fi} +\expandafter\let\expandafter\etocxifnumbered\csname etocifnumbered \endcsname +\DeclareRobustCommand*{\etociffirst} + {\ifEtoc@isfirst\expandafter\@firstoftwo\else\expandafter\@secondoftwo\fi} +\expandafter\let\expandafter\etocxiffirst\csname etociffirst \endcsname +\def\Etoc@readtoc {% + \ifeof \Etoc@tf + \else + \read \Etoc@tf to \Etoc@buffer + \Etoc@toctoks=\expandafter\expandafter\expandafter + {\expandafter\the\expandafter\Etoc@toctoks\Etoc@buffer}% + \expandafter\Etoc@readtoc + \fi +} +\Etoc@toctoks {}% (superfluous, but for clarity) +\AtBeginDocument{\IfFileExists{\jobname.toc} + {{\endlinechar=\m@ne + \makeatletter + \newread\Etoc@tf + \openin\Etoc@tf\@filef@und + \Etoc@readtoc + \global\Etoc@toctoks=\expandafter{\the\Etoc@toctoks}% + \closein\Etoc@tf}} + {\typeout{No file \jobname.toc.}}} +\def\Etoc@openouttoc{% + \ifEtoc@hyperref + \ifx\hyper@last\@undefined + \IfFileExists{\jobname .toc} + {\Hy@WarningNoLine + {old toc file detected; run LaTeX again (cheers from `etoc')}% + \global\Etoc@toctoks={}% + } + {}% + \fi + \fi + \if@filesw + \newwrite \tf@toc + \immediate \openout \tf@toc \jobname .toc\relax + \fi + \global\let\Etoc@openouttoc\empty +} +\def\Etoc@toctoc{% + \gdef\Etoc@stackofends{{-3}{}}% + \global\let\Etoc@level\Etoc@minf + \global\let\Etoc@virtualtop\Etoc@minf + \the\Etoc@toctoks + \ifEtoc@notactive + \else + \gdef\Etoc@level{-\thr@@}% + \Etoc@doendsandbegin + \fi +} +\def\Etoc@@startlocaltoc#1#2{% + \ifEtoc@localtoc + \ifnum #1=#2\relax + \global\let\etoclocaltop\Etoc@virtualtop + \Etoc@@startlocaltochook + \etoclocaltableofcontentshook + \ifEtoc@etocstyle + \etocetoclocaltocmaketitle + \fi + \ifx\Etoc@aftertitlehook\@empty + \else + \ifEtoc@localtoctotoc + \ifEtoc@ouroboros + \else + \let\Etoc@tmp\contentsline + \def\contentsline{\let\contentsline\Etoc@tmp\Etoc@gobblethreeorfour}% + \fi + \fi + \fi + \global\Etoc@notactivefalse + \fi + \fi +} +\let\etoc@startlocaltoc\@gobble +\let\Etoc@@startlocaltoc@toc\Etoc@@startlocaltoc +\let\Etoc@@startlocaltochook\@empty +\unless\ifEtoc@deeplevels + \def\etocdivisionnameatlevel#1{% + \ifcase\numexpr#1\relax + \ifdefined\c@chapter chapter\else section\fi% + \or section% + \or subsection% + \or subsubsection% + \or paragraph% + \or subparagraph% + \or empty% + \else\ifnum\numexpr#1<\m@ne + book% + \else + part% + \fi + \fi + } +\else + \def\etocdivisionnameatlevel#1{% + \ifcase\numexpr#1\relax + \ifdefined\c@chapter chapter\else section\fi% + \or section% + \or subsection% + \or subsubsection% + \or subsubsubsection% + \or subsubsubsubsection% + \or subsubsubsubsubsection% + \or subsubsubsubsubsubsection% + \or paragraph% + \or subparagraph% + \else\ifnum\numexpr#1>\z@ + empty% + \else\ifnum\numexpr#1=\m@ne + part% + \else + book% + \fi\fi + \fi + } +\fi +\def\etoclocalheadtotoc#1#2{\addcontentsline{toc}{@#1}{#2}} +\def\etocglobalheadtotoc{\addcontentsline{toc}} +\providecommand*\UseName{\@nameuse} +\def\etocetoclocaltocmaketitle{% + \UseName{\etocdivisionnameatlevel{\etoclocaltop+1}}*{\localcontentsname}% + \if@noskipsec\leavevmode\par\fi + \etociflocaltoctotoc + {\etocifisstarred + {}% star variant, do not add to toc + {\etoclocalheadtotoc + {\etocdivisionnameatlevel{\etoclocaltop+1}}% + {\localcontentsname}% + }% + }% + {}% +}% +\def\localcontentsname {\contentsname}% +\let\etoclocaltableofcontentshook\@empty +\if1\ifEtoc@lof0\fi\ifEtoc@lot0\fi1% +\else +\AtBeginDocument{% + \let\Etoc@originaladdcontentsline\addcontentsline + \def\addcontentsline{\Etoc@hackedaddcontentsline}% +}% +\fi +\ifEtoc@lof + \ifEtoc@lot + \def\Etoc@hackedaddcontentsline#1{% + \expanded{\noexpand\in@{.#1,}}{.lof,.lot,}% + \ifin@\expandafter\Etoc@hackedaddcontentsline@i + \else\expandafter\Etoc@originaladdcontentsline + \fi {#1}} + \else + \def\Etoc@hackedaddcontentsline#1{% + \expanded{\noexpand\in@{.#1,}}{.lof,}% + \ifin@\expandafter\Etoc@hackedaddcontentsline@i + \else\expandafter\Etoc@originaladdcontentsline + \fi {#1}} + \fi +\else + \def\Etoc@hackedaddcontentsline#1{% + \expanded{\noexpand\in@{.#1,}}{.lot,}% + \ifin@\expandafter\Etoc@hackedaddcontentsline@i + \else\expandafter\Etoc@originaladdcontentsline + \fi {#1}} +\fi +\def\Etoc@hackedaddcontentsline@i#1#2#3{% + \expanded{\noexpand\in@{.#1;#2,}}{.lof;figure,.lot;table,}% + \ifin@ + \addtocontents {toc}{% + \protect\contentsline{#2}{#3}{\thepage}{\ifEtoc@hyperref\@currentHref\fi}% + \ifdefined\protected@file@percent\protected@file@percent\fi + }% + \fi + \Etoc@originaladdcontentsline{#1}{#2}{#3}% +} +\unless\ifdefined\expanded + \def\Etoc@hackedaddcontentsline#1{% + {\edef\Etoc@tmp{\noexpand\in@{.#1,}{\ifEtoc@lof.lof,\fi\ifEtoc@lot.lot,\fi}}\expandafter}% + \Etoc@tmp + \ifin@\expandafter\Etoc@hackedaddcontentsline@i + \else\expandafter\Etoc@originaladdcontentsline + \fi {#1}% + } + \def\Etoc@hackedaddcontentsline@i#1#2#3{% + {\edef\Etoc@tmp{\noexpand\in@{.#1;#2,}}\expandafter}% + \Etoc@tmp{.lof;figure,.lot;table,}% + \ifin@ + \addtocontents {toc}{% + \protect\contentsline{#2}{#3}{\thepage}{\ifEtoc@hyperref\@currentHref\fi}% + \ifdefined\protected@file@percent\protected@file@percent\fi + }% + \fi + \Etoc@originaladdcontentsline{#1}{#2}{#3}% + } +\fi +\def\Etoc@@startlocallistof#1#2#3{% + \ifEtoc@localtoc + \ifnum #2=#3\relax + \global\let\etoclocaltop\Etoc@virtualtop + \global\Etoc@notactivefalse + \Etoc@@startlocaltochook + \csname etoclocallistof#1shook\endcsname + \ifEtoc@etocstyle + \csname etocetoclistof#1smaketitle\endcsname + \fi + \fi + \fi +} +\def\Etoc@@startlocallistof@setlevels#1{% + \ifnum\etoclocaltop<\z@ + \expandafter\let\csname Etoc@#1@@\endcsname\@ne + \else + \expandafter\let\csname Etoc@#1@@\expandafter\endcsname + \csname Etoc@\the\numexpr\etoclocaltop+\@ne @@\endcsname + \fi + \def\Etoc@do##1{% + \ifnum\etoclevel{##1}>\etoclocaltop + \expandafter\let\csname Etoc@##1@@\endcsname\Etoc@maxlevel + \fi}% + \Etoc@dolevels +} +\def\etoclocallistoffigureshook{\etocstandardlines} +\def\etoclocallistoftableshook {\etocstandardlines} +\def\locallistfigurename{\listfigurename} +\def\locallisttablename {\listtablename} +\def\etocetoclistoffiguresmaketitle{% + \UseName{\etocdivisionnameatlevel{\etoclocaltop+1}}*{\locallistfigurename}% + \ifnum\etoclocaltop>\tw@\mbox{}\par\fi + \etociflocalloftotoc + {\etocifisstarred + {}% star variant, do not add to toc + {\etoclocalheadtotoc + {\etocdivisionnameatlevel{\etoclocaltop+1}}% + {\locallistfigurename}% + }% + }% + {}% +}% +\def\etocetoclistoftablesmaketitle{% + \UseName{\etocdivisionnameatlevel{\etoclocaltop+1}}*{\locallisttablename}% + \ifnum\etoclocaltop>\tw@\mbox{}\par\fi + \etociflocallottotoc + {\etocifisstarred + {}% star variant, do not add to toc + {\etoclocalheadtotoc + {\etocdivisionnameatlevel{\etoclocaltop+1}}% + {\locallisttablename}% + }% + }% + {}% +}% +\let\Etoc@listofreset\@empty +\ifEtoc@lof + \def\locallistoffigures{% + \def\Etoc@listofreset{% + \let\Etoc@currext\Etoc@tocext + \let\Etoc@@startlocaltoc\Etoc@@startlocaltoc@toc + \let\Etoc@@startlocaltochook\@empty + \let\Etoc@listofreset\@empty + \let\Etoc@listofhook\@empty + }% + \let\Etoc@currext\Etoc@lofext + \def\Etoc@@startlocaltoc{\Etoc@@startlocallistof{figure}}% + \def\Etoc@@startlocaltochook{\Etoc@@startlocallistof@setlevels{figure}}% + \def\Etoc@listofhook{% + \def\Etoc@do####1{% + \expandafter\let\csname Etoc@@####1@@\endcsname\Etoc@maxlevel + }% + \Etoc@dolevels + }% + \localtableofcontents + } +\else + \def\locallistoffigures{% + \PackageError{etoc}{% + \string\locallistoffigures \on@line\space but\MessageBreak + package was loaded without `lof' option}% + {Try again with \string\usepackage[lof]{etoc}}% + } +\fi +\ifEtoc@lot + \def\locallistoftables{% + \def\Etoc@listofreset{% + \let\Etoc@currext\Etoc@tocext + \let\Etoc@@startlocaltoc\Etoc@@startlocaltoc@toc + \let\Etoc@@startlocaltochook\@empty + \let\Etoc@listofreset\@empty + \let\Etoc@listofhook\@empty + }% + \let\Etoc@currext\Etoc@lotext + \def\Etoc@@startlocaltoc{\Etoc@@startlocallistof{table}}% + \def\Etoc@@startlocaltochook{\Etoc@@startlocallistof@setlevels{table}}% + \def\Etoc@listofhook{% + \def\Etoc@do####1{% + \expandafter\let\csname Etoc@@####1@@\endcsname\Etoc@maxlevel + }% + \Etoc@dolevels + }% + \localtableofcontents + } +\else + \def\locallistoftables{% + \PackageError{etoc}{% + \string\locallistoftable \on@line\space but\MessageBreak + package was loaded without `lot' option}% + {Try again with \string\usepackage[lot]{etoc}}% + } +\fi +\def\Etoc@checkifempty {% + \global\Etoc@isemptytoctrue + \global\Etoc@stoptocfalse + \global\let\Etoc@level\Etoc@minf + \global\let\Etoc@virtualtop\Etoc@minf + \gdef\Etoc@stackofends{{-3}{}}% + \begingroup + \ifEtoc@localtoc + \def\etoc@startlocaltoc##1{% + \ifnum##1=\Etoc@tocid\relax + \global\let\etoclocaltop\Etoc@virtualtop + \Etoc@@startlocaltochook + \global\Etoc@notactivefalse + \fi + }% + \let\contentsline\Etoc@testingcontentslinelocal + \else + \let\contentsline\Etoc@testingcontentsline + \fi + \Etoc@storetocdepth + \let\Etoc@setlocaltop@doendsandbegin\@empty + \the\Etoc@toctoks + \Etoc@restoretocdepth + \endgroup +} +\DeclareRobustCommand*\etocifwasempty + {\ifEtoc@isemptytoc\expandafter\@firstoftwo\else\expandafter\@secondoftwo\fi } +\expandafter\let\expandafter\etocxifwasempty\csname etocifwasempty \endcsname +\def\Etoc@testingcontentslinelocal #1{% + \ifEtoc@stoptoc + \else + \ifnum\csname Etoc@#1@@\endcsname=\Etoc@maxlevel + \else + \global\expandafter\let\expandafter\Etoc@level\csname Etoc@#1@@\endcsname + \if @\@car#1\@nil\else\global\let\Etoc@virtualtop\Etoc@level\fi + \ifEtoc@notactive + \else + \ifnum\Etoc@level>\etoclocaltop + \unless\ifnum\Etoc@level>\c@tocdepth + \global\Etoc@isemptytocfalse + \global\Etoc@stoptoctrue + \fi + \else + \global\Etoc@stoptoctrue + \fi + \fi + \fi + \fi + \Etoc@gobblethreeorfour{}% +} +\def\Etoc@testingcontentsline #1{% + \ifEtoc@stoptoc + \else + \ifnum\csname Etoc@#1@@\endcsname=\Etoc@maxlevel + \else + \unless\ifnum\csname Etoc@#1@@\endcsname>\c@tocdepth + \global\Etoc@isemptytocfalse + \global\Etoc@stoptoctrue + \fi + \fi + \fi + \Etoc@gobblethreeorfour{}% +} +\def\Etoc@localtableofcontents#1{% + \gdef\etoclocaltop{-\@m}% + \Etoc@localtoctrue + \global\Etoc@isemptytocfalse + \edef\Etoc@tocid{#1}% + \ifnum\Etoc@tocid<\@ne + \setbox0\hbox{\ref{Unknown toc ref \@secondoftwo#1. \space Rerun LaTeX}}% + \global\Etoc@stoptoctrue + \gdef\etoclocaltop{-\thr@@}% + \Etoc@tableofcontents + \expandafter\Etoc@gobtoetoc@ + \fi + \global\Etoc@notactivetrue + \ifEtoc@checksemptiness + \Etoc@checkifempty + \fi + \ifEtoc@isemptytoc + \ifEtoc@notactive + \setbox0\hbox{\ref{Unknown toc ID \number\Etoc@tocid. \space Rerun LaTeX}}% + \global\Etoc@isemptytocfalse + \global\Etoc@stoptoctrue + \gdef\etoclocaltop{-\thr@@}% + \Etoc@tableofcontents + \expandafter\expandafter\expandafter\Etoc@gobtoetoc@ + \fi + \else + \global\Etoc@stoptocfalse + \global\Etoc@notactivetrue + \edef\etoc@startlocaltoc##1% + {\noexpand\Etoc@@startlocaltoc{##1}{\Etoc@tocid}}% + \Etoc@tableofcontents + \fi + \@gobble\etoc@ + \endgroup\ifEtoc@mustclosegroup\endgroup\fi + \Etoc@tocdepthreset + \Etoc@listofreset + \etocaftertochook +}% \Etoc@localtableofcontents +\def\Etoc@getref #1{% + \@ifundefined{r@#1} + {0} + {\expandafter\Etoc@getref@i\romannumeral-`0% + \expandafter\expandafter\expandafter + \@car\csname r@#1\endcsname0\@nil\@etoc + }% +} +\def\Etoc@getref@i#1#2\@etoc{\ifnum9<1\string#1 #1#2\else 0\fi} +\def\Etoc@ref#1{\Etoc@localtableofcontents{\Etoc@getref{#1}}} +\def\Etoc@label#1{\label{#1}\futurelet\Etoc@nexttoken\Etoc@t@bleofcontents} +\@firstofone{\def\Etoc@again} {\futurelet\Etoc@nexttoken\Etoc@t@bleofcontents} +\def\Etoc@dothis #1#2\etoc@ {\fi #1} +\def\Etoc@t@bleofcontents{% + \gdef\etoclocaltop{-\@M}% + \ifx\Etoc@nexttoken\label\Etoc@dothis{\expandafter\Etoc@label\@gobble}\fi + \ifx\Etoc@nexttoken\@sptoken\Etoc@dothis{\Etoc@again}\fi + \ifx\Etoc@nexttoken\ref\Etoc@dothis{\expandafter\Etoc@ref\@gobble}\fi + \ifEtoc@tocwithid\Etoc@dothis{\Etoc@localtableofcontents{\c@etoc@tocid}}\fi + \global\Etoc@isemptytocfalse + \ifEtoc@checksemptiness\Etoc@checkifempty\fi + \ifEtoc@isemptytoc + \ifEtoc@notocifnotoc + \expandafter\expandafter\expandafter\@gobble + \fi + \fi + \Etoc@tableofcontents + \endgroup + \ifEtoc@mustclosegroup\endgroup\fi + \Etoc@tocdepthreset + \Etoc@listofreset + \etocaftertochook + \@gobble\etoc@ + }% \Etoc@t@bleofcontents +\def\Etoc@table@fcontents{% + \refstepcounter{etoc@tocid}% + \Etoc@tocwithidfalse + \futurelet\Etoc@nexttoken\Etoc@t@bleofcontents +} +\def\Etoc@localtable@fcontents{% + \refstepcounter{etoc@tocid}% + \addtocontents{toc}{\string\etoc@startlocaltoc{\the\c@etoc@tocid}}% + \Etoc@tocwithidtrue + \futurelet\Etoc@nexttoken\Etoc@t@bleofcontents +} +\def\etoctableofcontents{% + \Etoc@openouttoc + \Etoc@tocdepthset + \begingroup + \@ifstar + {\let\Etoc@aftertitlehook\@empty\Etoc@table@fcontents} + {\def\Etoc@aftertitlehook{\etocaftertitlehook}\Etoc@table@fcontents}% +}% \etoctableofcontents +\def\etocifisstarred{\ifx\Etoc@aftertitlehook\@empty + \expandafter\@firstoftwo\else + \expandafter\@secondoftwo + \fi} +\let\etocoriginaltableofcontents\tableofcontents +\let\tableofcontents\etoctableofcontents +\let\Etoc@listofhook\@empty +\newcommand*\localtableofcontents{% + \Etoc@openouttoc + \Etoc@tocdepthset + \begingroup + \Etoc@listofhook + \@ifstar + {\let\Etoc@aftertitlehook\@empty\Etoc@localtable@fcontents} + {\def\Etoc@aftertitlehook{\etocaftertitlehook}\Etoc@localtable@fcontents}% +}% \localtableofcontents +\newcommand*\localtableofcontentswithrelativedepth[1]{% + \def\Etoc@@startlocaltochook{% + \global\c@tocdepth\numexpr\etoclocaltop+#1\relax + }% + \def\Etoc@listofreset{\let\Etoc@@startlocaltochook\@empty + \let\Etoc@listofreset\@empty}% + \localtableofcontents +}% \localtableofcontentswithrelativedepth +\newcommand\etocsettocstyle[2]{% + \Etoc@etocstylefalse + \Etoc@classstylefalse + \def\Etoc@tableofcontents@user@before{#1}% + \def\Etoc@tableofcontents@user@after {#2}% +}% +\def\etocstoretocstyleinto#1{% +%% \@ifdefinable#1{% + \edef#1{\noexpand\Etoc@etocstylefalse\noexpand\Etoc@classstylefalse + \def\noexpand\Etoc@tableofcontents@user@before{% + \unexpanded\expandafter{\Etoc@tableofcontents@user@before}% + }% + \def\noexpand\Etoc@tableofcontents@user@after{% + \unexpanded\expandafter{\Etoc@tableofcontents@user@after}% + }% + }% +%% }% +}% +\def\Etoc@tableofcontents {% + \Etoc@tableofcontents@etoc@before + \ifEtoc@localtoc\ifEtoc@etocstyle\expandafter\expandafter\expandafter\@gobble\fi\fi + \Etoc@tableofcontents@user@before + \Etoc@tableofcontents@contents + \ifEtoc@localtoc\ifEtoc@etocstyle\expandafter\expandafter\expandafter\@gobble\fi\fi + \Etoc@tableofcontents@user@after + \Etoc@tableofcontents@etoc@after + \@gobble\etoc@ +} +\def\Etoc@tableofcontents@etoc@before{% + \ifnum\c@tocdepth>\Etoc@minf + \else + \expandafter\Etoc@gobtoetoc@ + \fi + \Etoc@par + \Etoc@beforetitlehook + \etocbeforetitlehook + \Etoc@storetocdepth + \let\Etoc@savedcontentsline\contentsline + \let\contentsline\Etoc@etoccontentsline + \ifEtoc@standardlines + \else + \def\Etoc@do##1{% + \expandafter\def\csname etocsaved##1tocline\endcsname + {\PackageError{etoc}{% + \expandafter\string\csname etocsaved##1tocline\endcsname\space + has been deprecated\MessageBreak + at 1.1a and is removed at 1.2.\MessageBreak + Use \expandafter\string\csname l@##1\endcsname\space directly.\MessageBreak + Reported \on@line}% + {I will use \expandafter\string + \csname l@##1\endcsname\space myself for this time.% + }% + \csname l@##1\endcsname + }% + }% + \Etoc@dolevels + \fi +}% +\def\Etoc@tableofcontents@contents{% + \Etoc@tocdepthset + \ifEtoc@parskip\parskip\z@skip\fi + \Etoc@aftertitlehook + \gdef\etoclocaltop{-\thr@@}% + \Etoc@toctoc + \etocaftercontentshook +}% +\def\Etoc@tableofcontents@etoc@after{% + \@nobreakfalse + \Etoc@restoretocdepth + \ifx\Etoc@global\global + \@ifundefined{tof@finish} + {} + {\ifx\tof@finish\@empty + \else + \global\let\contentsline\Etoc@savedcontentsline + \fi + }% + \fi +} +\def\etocsetstyle#1{\ifcsname Etoc@#1@@\endcsname + \expandafter\Etoc@setstyle@a + \else + \expandafter\Etoc@setstyle@error + \fi {#1}% +} +\def\Etoc@setstyle@error #1{% + \PackageWarning{etoc}{`#1' is unknown to etoc. \space Did you\MessageBreak + forget some \string\etocsetlevel{#1}{}?\MessageBreak + Reported}% + \@gobblefour +} +\def\Etoc@setstyle@a #1{% + \edef\Etoc@tmp{\the\numexpr\csname Etoc@#1@@\endcsname}% + \if1\unless\ifnum\Etoc@tmp<\Etoc@maxlevel 0\fi + \unless\ifnum\Etoc@tmp>\Etoc@minf 0\fi1% + \Etoc@standardlinesfalse + \expandafter\Etoc@setstyle@b\expandafter\Etoc@tmp + \else + \ifnum\Etoc@tmp=\Etoc@maxlevel + \in@{.#1,}{.figure,.table,}% + \ifin@ + \PackageWarning{etoc} + {You can not use \string\etocsetstyle\space with `#1'.\MessageBreak + Check the package documentation (in particular about\MessageBreak + \string\etoclocallistoffigureshook/\string\etoclocallistoftableshook)% + \MessageBreak on how to customize + figure and table entries in local\MessageBreak lists. Reported}% + \else + \PackageInfo{etoc} + {Attempt to set the style of `#1',\MessageBreak + whose level is currently the maximal one \etocthemaxlevel,\MessageBreak + which is never displayed. \space This will be ignored\MessageBreak + but note that we do quit compatibility mode.\MessageBreak + Reported}% + \Etoc@standardlinesfalse + \fi + \else + \PackageWarning{etoc}{This should not happen. Reported}% + \fi + \expandafter\@gobblefour + \fi +} +\long\def\Etoc@setstyle@b#1#2#3#4#5{% + \expandafter\def\csname Etoc@begin@#1\endcsname {#2}% + \expandafter\def\csname Etoc@prefix@#1\endcsname {#3}% + \expandafter\def\csname Etoc@contents@#1\endcsname {#4}% + \expandafter\def\csname Etoc@end@#1\endcsname {#5}% +} +\def\Etoc@setstyle@e#1{% + \expandafter\let\csname Etoc@begin@#1\endcsname \@empty + \expandafter\let\csname Etoc@prefix@#1\endcsname \@empty + \expandafter\let\csname Etoc@contents@#1\endcsname \@empty + \expandafter\let\csname Etoc@end@#1\endcsname \@empty +} +\def\Etoc@storelines@a#1{% + \noexpand\Etoc@setstyle@b{#1}% + {\expandafter\Etoc@expandonce\csname Etoc@begin@#1\endcsname}% + {\expandafter\Etoc@expandonce\csname Etoc@prefix@#1\endcsname}% + {\expandafter\Etoc@expandonce\csname Etoc@contents@#1\endcsname}% + {\expandafter\Etoc@expandonce\csname Etoc@end@#1\endcsname}% +} +\def\Etoc@expandonce#1{\unexpanded\expandafter{#1}} +\def\etocstorelinestylesinto#1{% + \edef#1{\Etoc@storelines@a{-2}\Etoc@storelines@a{-1}\Etoc@storelines@a{0}% + \Etoc@storelines@a {1}\Etoc@storelines@a {2}\Etoc@storelines@a{3}% + \Etoc@storelines@a {4}\Etoc@storelines@a {5}% + \ifEtoc@deeplevels + \Etoc@storelines@a{6}\Etoc@storelines@a{7}\Etoc@storelines@a{8}% + \Etoc@storelines@a{9}\Etoc@storelines@a{10}\Etoc@storelines@a{11}% + \fi + }% +} +\def\etocstorethislinestyleinto#1#2{% + \edef#2{\expandafter\Etoc@storelines@a\expandafter{\number\etoclevel{#1}}}% +}% +\def\etocfontminustwo {\normalfont \LARGE \bfseries} +\def\etocfontminusone {\normalfont \large \bfseries} +\def\etocfontzero {\normalfont \large \bfseries} +\def\etocfontone {\normalfont \normalsize \bfseries} +\def\etocfonttwo {\normalfont \normalsize} +\def\etocfontthree {\normalfont \footnotesize} +\def\etocsepminustwo {4ex \@plus .5ex \@minus .5ex} +\def\etocsepminusone {4ex \@plus .5ex \@minus .5ex} +\def\etocsepzero {2.5ex \@plus .4ex \@minus .4ex} +\def\etocsepone {1.5ex \@plus .3ex \@minus .3ex} +\def\etocseptwo {.5ex \@plus .1ex \@minus .1ex} +\def\etocsepthree {.25ex \@plus .05ex \@minus .05ex} +\def\etocbaselinespreadminustwo {1} +\def\etocbaselinespreadminusone {1} +\def\etocbaselinespreadzero {1} +\def\etocbaselinespreadone {1} +\def\etocbaselinespreadtwo {1} +\def\etocbaselinespreadthree {.9} +\def\etocminustwoleftmargin {1.5em plus 0.5fil} +\def\etocminustworightmargin {1.5em plus -0.5fil} +\def\etocminusoneleftmargin {1em} +\def\etocminusonerightmargin {1em} +\def\etoctoclineleaders + {\hbox{\normalfont\normalsize\hb@xt@2ex {\hss.\hss}}} +\def\etocabbrevpagename {p.~} +\def\etocpartname {Part} +\def\etocbookname {Book} +\def\etocdefaultlines{% + \Etoc@standardlinesfalse + \etocdefaultlines@setbook + \etocdefaultlines@setpart + \etocdefaultlines@setchapter + \etocdefaultlines@setsection + \etocdefaultlines@setsubsection + \etocdefaultlines@setsubsubsection + \etocdefaultlines@setdeeperones +} +\def\etocnoprotrusion{\leavevmode\kern-\p@\kern\p@} +\@ifclassloaded{memoir}{% + \def\etocdefaultlines@setbook{% + \Etoc@setstyle@b + {-2}% + {\addpenalty\@M\etocskipfirstprefix} + {\addpenalty\@secpenalty} + {\begingroup + \etocfontminustwo + \addvspace{\etocsepminustwo}% + \parindent \z@ + \leftskip \etocminustwoleftmargin + \rightskip \etocminustworightmargin + \parfillskip \@flushglue + \vbox{\etocifnumbered{\etoclink{\etocbookname\enspace\etocthenumber:\quad}}{}% + \etocname + \baselineskip\etocbaselinespreadminustwo\baselineskip + \par}% + \addpenalty\@M\addvspace{\etocsepminusone}% + \endgroup} + {}% + } + }{\let\etocdefaultlines@setbook\@empty} +\def\etocdefaultlines@setpart{% +\Etoc@setstyle@b + {-1}% + {\addpenalty\@M\etocskipfirstprefix} + {\addpenalty\@secpenalty} + {\begingroup + \etocfontminusone + \addvspace{\etocsepminusone}% + \parindent \z@ + \leftskip \etocminusoneleftmargin + \rightskip \etocminusonerightmargin + \parfillskip \@flushglue + \vbox{\etocifnumbered{\etoclink{\etocpartname\enspace\etocthenumber.\quad}}{}% + \etocname + \baselineskip\etocbaselinespreadminusone\baselineskip + \par}% + \addpenalty\@M\addvspace{\etocsepzero}% + \endgroup} + {}% +} +\def\etocdefaultlines@setchapter{% +\Etoc@setstyle@b + {0}% + {\addpenalty\@M\etocskipfirstprefix} + {\addpenalty\@itempenalty} + {\begingroup + \etocfontzero + \addvspace{\etocsepzero}% + \parindent \z@ \parfillskip \@flushglue + \vbox{\etocifnumbered{\etocnumber.\enspace}{}\etocname + \baselineskip\etocbaselinespreadzero\baselineskip + \par}% + \endgroup} + {\addpenalty{-\@highpenalty}\addvspace{\etocsepminusone}}% +} +\def\etocdefaultlines@setsection{% +\Etoc@setstyle@b + {1}% + {\addpenalty\@M\etocskipfirstprefix} + {\addpenalty\@itempenalty} + {\begingroup + \etocfontone + \addvspace{\etocsepone}% + \parindent \z@ \parfillskip \z@ + \setbox\z@\vbox{\parfillskip\@flushglue + \etocname\par + \setbox\tw@\lastbox + \global\setbox\@ne\hbox{\unhbox\tw@\ }}% + \dimen\z@=\wd\@ne + \setbox\z@=\etoctoclineleaders + \advance\dimen\z@\wd\z@ + \etocifnumbered + {\setbox\tw@\hbox{\etocnumber, \etocabbrevpagename\etocpage\etocnoprotrusion}} + {\setbox\tw@\hbox{\etocabbrevpagename\etocpage\etocnoprotrusion}}% + \advance\dimen\z@\wd\tw@ + \ifdim\dimen\z@ < \linewidth + \vbox{\etocname~% + \leaders\box\z@\hfil\box\tw@ + \baselineskip\etocbaselinespreadone\baselineskip + \par}% + \else + \vbox{\etocname~% + \leaders\copy\z@\hfil\break + \hbox{}\leaders\box\z@\hfil\box\tw@ + \baselineskip\etocbaselinespreadone\baselineskip + \par}% + \fi + \endgroup} + {\addpenalty\@secpenalty\addvspace{\etocsepzero}}% +} +\def\etocdefaultlines@setsubsection{% +\Etoc@setstyle@b + {2}% + {\addpenalty\@medpenalty\etocskipfirstprefix} + {\addpenalty\@itempenalty} + {\begingroup + \etocfonttwo + \addvspace{\etocseptwo}% + \parindent \z@ \parfillskip \z@ + \setbox\z@\vbox{\parfillskip\@flushglue + \etocname\par\setbox\tw@\lastbox + \global\setbox\@ne\hbox{\unhbox\tw@}}% + \dimen\z@=\wd\@ne + \setbox\z@=\etoctoclineleaders + \advance\dimen\z@\wd\z@ + \etocifnumbered + {\setbox\tw@\hbox{\etocnumber, \etocabbrevpagename\etocpage\etocnoprotrusion}} + {\setbox\tw@\hbox{\etocabbrevpagename\etocpage\etocnoprotrusion}}% + \advance\dimen\z@\wd\tw@ + \ifdim\dimen\z@ < \linewidth + \vbox{\etocname~% + \leaders\box\z@\hfil\box\tw@ + \baselineskip\etocbaselinespreadtwo\baselineskip + \par}% + \else + \vbox{\etocname~% + \leaders\copy\z@\hfil\break + \hbox{}\leaders\box\z@\hfil\box\tw@ + \baselineskip\etocbaselinespreadtwo\baselineskip + \par}% + \fi + \endgroup} + {\addpenalty\@secpenalty\addvspace{\etocsepone}}% +} +\def\etocdefaultlines@setsubsubsection{% +\Etoc@setstyle@b + {3}% + {\addpenalty\@M + \etocfontthree + \vspace{\etocsepthree}% + \noindent + \etocskipfirstprefix} + {\allowbreak\,--\,} + {\etocname} + {.\hfil + \begingroup + \baselineskip\etocbaselinespreadthree\baselineskip + \par + \endgroup + \addpenalty{-\@highpenalty}} +} +\def\etocdefaultlines@setdeeperones{% +\Etoc@setstyle@e{4}% +\Etoc@setstyle@e{5}% +\ifEtoc@deeplevels + \Etoc@setstyle@e{6}% + \Etoc@setstyle@e{7}% + \Etoc@setstyle@e{8}% + \Etoc@setstyle@e{9}% + \Etoc@setstyle@e{10}% + \Etoc@setstyle@e{11}% +\fi +} +\def\etocabovetocskip{3.5ex \@plus 1ex \@minus .2ex} +\def\etocbelowtocskip{3.5ex \@plus 1ex \@minus .2ex} +\def\etoccolumnsep{2em} +\def\etocmulticolsep{0ex} +\def\etocmulticolpretolerance{-1} +\def\etocmulticoltolerance{200} +\def\etocdefaultnbcol{2} +\def\etocinnertopsep{2ex} +\newcommand\etocmulticolstyle[2][\etocdefaultnbcol]{% +\etocsettocstyle + {\let\etocoldpar\par + \addvspace{\etocabovetocskip}% + \ifnum #1>\@ne + \expandafter\@firstoftwo + \else \expandafter\@secondoftwo + \fi + {\multicolpretolerance\etocmulticolpretolerance + \multicoltolerance\etocmulticoltolerance + \setlength{\columnsep}{\etoccolumnsep}% + \setlength{\multicolsep}{\etocmulticolsep}% + \begin{multicols}{#1}[#2\etocoldpar\addvspace{\etocinnertopsep}]} + {#2\ifvmode\else\begingroup\interlinepenalty\@M\parskip\z@skip + \@@par\endgroup + \fi + \nobreak\addvspace{\etocinnertopsep}% + \pretolerance\etocmulticolpretolerance + \tolerance\etocmulticoltolerance}% + }% + {\ifnum #1>\@ne + \expandafter\@firstofone + \else \expandafter\@gobble + \fi + {\end{multicols}}% + \addvspace{\etocbelowtocskip}}% +} +\def\etocinnerbottomsep{3.5ex} +\def\etocinnerleftsep{2em} +\def\etocinnerrightsep{2em} +\def\etoctoprule{\hrule} +\def\etocleftrule{\vrule} +\def\etocrightrule{\vrule} +\def\etocbottomrule{\hrule} +\def\etoctoprulecolorcmd{\relax} +\def\etocbottomrulecolorcmd{\relax} +\def\etocleftrulecolorcmd{\relax} +\def\etocrightrulecolorcmd{\relax} +\def\etoc@ruledheading #1{% + \hb@xt@\linewidth{\color@begingroup + \hss #1\hss\hskip-\linewidth + \etoctoprulecolorcmd\leaders\etoctoprule\hss + \phantom{#1}% + \leaders\etoctoprule\hss\color@endgroup}% + \nointerlineskip\nobreak\vskip\etocinnertopsep} +\newcommand*\etocruledstyle[2][\etocdefaultnbcol]{% +\etocsettocstyle + {\addvspace{\etocabovetocskip}% + \ifnum #1>\@ne + \expandafter\@firstoftwo + \else \expandafter\@secondoftwo + \fi + {\multicolpretolerance\etocmulticolpretolerance + \multicoltolerance\etocmulticoltolerance + \setlength{\columnsep}{\etoccolumnsep}% + \setlength{\multicolsep}{\etocmulticolsep}% + \begin{multicols}{#1}[\etoc@ruledheading{#2}]} + {\etoc@ruledheading{#2}% + \pretolerance\etocmulticolpretolerance + \tolerance\etocmulticoltolerance}} + {\ifnum #1>\@ne\expandafter\@firstofone + \else \expandafter\@gobble + \fi + {\end{multicols}}% + \addvspace{\etocbelowtocskip}}} +\def\etocframedmphook{\relax} +\long\def\etocbkgcolorcmd{\relax} +\long\def\Etoc@relax{\relax} +\newbox\etoc@framed@titlebox +\newbox\etoc@framed@contentsbox +\newcommand*\etocframedstyle[2][\etocdefaultnbcol]{% +\etocsettocstyle{% + \addvspace{\etocabovetocskip}% + \sbox\z@{#2}% + \dimen\z@\dp\z@ + \ifdim\wd\z@<\linewidth \dp\z@\z@ \else \dimen\z@\z@ \fi + \setbox\etoc@framed@titlebox=\hb@xt@\linewidth{\color@begingroup + \hss + \ifx\etocbkgcolorcmd\Etoc@relax + \else + \sbox\tw@{\color{white}% + \vrule\@width\wd\z@\@height\ht\z@\@depth\dimen\z@}% + \ifdim\wd\z@<\linewidth \dp\tw@\z@\fi + \box\tw@ + \hskip-\wd\z@ + \fi + \copy\z@ + \hss + \hskip-\linewidth + \etoctoprulecolorcmd\leaders\etoctoprule\hss + \hskip\wd\z@ + \etoctoprulecolorcmd\leaders\etoctoprule\hss\color@endgroup}% + \setbox\z@\hbox{\etocleftrule\etocrightrule}% + \dimen\tw@\linewidth\advance\dimen\tw@-\wd\z@ + \advance\dimen\tw@-\etocinnerleftsep + \advance\dimen\tw@-\etocinnerrightsep + \setbox\etoc@framed@contentsbox=\vbox\bgroup + \hsize\dimen\tw@ + \kern\dimen\z@ + \vskip\etocinnertopsep + \hbox\bgroup + \begin{minipage}{\hsize}% + \etocframedmphook + \ifnum #1>\@ne + \expandafter\@firstoftwo + \else \expandafter\@secondoftwo + \fi + {\multicolpretolerance\etocmulticolpretolerance + \multicoltolerance\etocmulticoltolerance + \setlength{\columnsep}{\etoccolumnsep}% + \setlength{\multicolsep}{\etocmulticolsep}% + \begin{multicols}{#1}} + {\pretolerance\etocmulticolpretolerance + \tolerance\etocmulticoltolerance}} + {\ifnum #1>\@ne\expandafter\@firstofone + \else \expandafter\@gobble + \fi + {\end{multicols}\unskip }% + \end{minipage}% + \egroup + \vskip\etocinnerbottomsep + \egroup + \vbox{\hsize\linewidth + \ifx\etocbkgcolorcmd\Etoc@relax + \else + \kern\ht\etoc@framed@titlebox + \kern\dp\etoc@framed@titlebox + \hb@xt@\linewidth{\color@begingroup + \etocleftrulecolorcmd\etocleftrule + \etocbkgcolorcmd + \leaders\vrule + \@height\ht\etoc@framed@contentsbox + \@depth\dp\etoc@framed@contentsbox + \hss + \etocrightrulecolorcmd\etocrightrule + \color@endgroup}\nointerlineskip + \vskip-\dp\etoc@framed@contentsbox + \vskip-\ht\etoc@framed@contentsbox + \vskip-\dp\etoc@framed@titlebox + \vskip-\ht\etoc@framed@titlebox + \fi + \box\etoc@framed@titlebox\nointerlineskip + \hb@xt@\linewidth{\color@begingroup + {\etocleftrulecolorcmd\etocleftrule}% + \hss\box\etoc@framed@contentsbox\hss + \etocrightrulecolorcmd\etocrightrule\color@endgroup} + \nointerlineskip + \vskip\ht\etoc@framed@contentsbox + \vskip\dp\etoc@framed@contentsbox + \hb@xt@\linewidth{\color@begingroup\etocbottomrulecolorcmd + \leaders\etocbottomrule\hss\color@endgroup}} + \addvspace{\etocbelowtocskip}}} +\newcommand\etoc@multicoltoc[2][\etocdefaultnbcol]{% + \etocmulticolstyle[#1]{#2}% + \tableofcontents} +\newcommand\etoc@multicoltoci[2][\etocdefaultnbcol]{% + \etocmulticolstyle[#1]{#2}% + \tableofcontents*} +\newcommand\etoc@local@multicoltoc[2][\etocdefaultnbcol]{% + \etocmulticolstyle[#1]{#2}% + \localtableofcontents} +\newcommand\etoc@local@multicoltoci[2][\etocdefaultnbcol]{% + \etocmulticolstyle[#1]{#2}% + \localtableofcontents*} +\newcommand*\etoc@ruledtoc[2][\etocdefaultnbcol]{% + \etocruledstyle[#1]{#2}% + \tableofcontents} +\newcommand*\etoc@ruledtoci[2][\etocdefaultnbcol]{% + \etocruledstyle[#1]{#2}% + \tableofcontents*} +\newcommand*\etoc@local@ruledtoc[2][\etocdefaultnbcol]{% + \etocruledstyle[#1]{#2}% + \localtableofcontents} +\newcommand*\etoc@local@ruledtoci[2][\etocdefaultnbcol]{% + \etocruledstyle[#1]{#2}% + \localtableofcontents*} +\newcommand*\etoc@framedtoc[2][\etocdefaultnbcol]{% + \etocframedstyle[#1]{#2}% + \tableofcontents} +\newcommand*\etoc@framedtoci[2][\etocdefaultnbcol]{% + \etocframedstyle[#1]{#2}% + \tableofcontents*} +\newcommand*\etoc@local@framedtoc[2][\etocdefaultnbcol]{% + \etocframedstyle[#1]{#2}% + \localtableofcontents} +\newcommand*\etoc@local@framedtoci[2][\etocdefaultnbcol]{% + \etocframedstyle[#1]{#2}% + \localtableofcontents*} +\def\etocmulticol{\begingroup + \Etoc@mustclosegrouptrue + \@ifstar + {\etoc@multicoltoci} + {\etoc@multicoltoc}} +\def\etocruled{\begingroup + \Etoc@mustclosegrouptrue + \@ifstar + {\etoc@ruledtoci} + {\etoc@ruledtoc}} +\def\etocframed{\begingroup + \Etoc@mustclosegrouptrue + \@ifstar + {\etoc@framedtoci} + {\etoc@framedtoc}} +\def\etoclocalmulticol{\begingroup + \Etoc@mustclosegrouptrue + \@ifstar + {\etoc@local@multicoltoci} + {\etoc@local@multicoltoc}} +\def\etoclocalruled{\begingroup + \Etoc@mustclosegrouptrue + \@ifstar + {\etoc@local@ruledtoci} + {\etoc@local@ruledtoc}} +\def\etoclocalframed{\begingroup + \Etoc@mustclosegrouptrue + \@ifstar + {\etoc@local@framedtoci} + {\etoc@local@framedtoc}} +\def\etocmemoirtoctotocfmt #1#2{% + \PackageWarning{etoc} + {\string\etocmemoirtoctotocfmt\space is deprecated.\MessageBreak + Use in its place \string\etocsettoclineforclasstoc,\MessageBreak + and \string\etocsettoclineforclasslistof{toc} (or {lof}, {lot}). + I will do this now.\MessageBreak + Reported}% + \etocsettoclineforclasstoc{#1}{#2}% + \etocsettoclineforclasslistof{toc}{#1}{#2}% +} +\def\etocsettoclineforclasstoc #1#2{% + \def\etocclassmaintocaddtotoc{\etocglobalheadtotoc{#1}{#2}}% +} +\def\etocsettoclineforclasslistof #1#2#3{% + \@namedef{etocclasslocal#1addtotoc}{\etoclocalheadtotoc{#2}{#3}}% +} +\let\etocclasslocaltocaddtotoc\@empty +\let\etocclasslocallofaddtotoc\@empty +\let\etocclasslocallotaddtotoc\@empty +\ifdefined\c@chapter + \def\etocclasslocaltocmaketitle{\section*{\localcontentsname}} + \def\etocclasslocallofmaketitle{\section*{\locallistfigurename}} + \def\etocclasslocallotmaketitle{\section*{\locallisttablename}} + \etocsettoclineforclasstoc {chapter}{\contentsname} + \etocsettoclineforclasslistof{toc}{section}{\localcontentsname} + \etocsettoclineforclasslistof{lof}{section}{\locallistfigurename} + \etocsettoclineforclasslistof{lot}{section}{\locallisttablename} +\else + \def\etocclasslocaltocmaketitle{\subsection*{\localcontentsname}}% + \def\etocclasslocallofmaketitle{\subsection*{\locallistfigurename}}% + \def\etocclasslocallotmaketitle{\subsection*{\locallisttablename}}% + \etocsettoclineforclasstoc {section}{\contentsname} + \etocsettoclineforclasslistof{toc}{subsection}{\localcontentsname} + \etocsettoclineforclasslistof{lof}{subsection}{\locallistfigurename} + \etocsettoclineforclasslistof{lot}{subsection}{\locallisttablename} +\fi +\def\etocclasslocalperhapsaddtotoc #1{% + \etocifisstarred + {} + {\csname ifEtoc@local#1totoc\endcsname + \csname etocclasslocal#1addtotoc\endcsname + \fi + }% +} +\def\etocarticlestyle{% + \etocsettocstyle + {\ifEtoc@localtoc + \@nameuse{etocclasslocal\Etoc@currext maketitle}% + \etocclasslocalperhapsaddtotoc\Etoc@currext + \else + \section *{\contentsname + \@mkboth {\MakeUppercase \contentsname} + {\MakeUppercase \contentsname}}% + \etocifisstarred{}{\etocifmaintoctotoc{\etocclassmaintocaddtotoc}{}}% + \fi + } + {}% +} +\def\etocarticlestylenomarks{% + \etocsettocstyle + {\ifEtoc@localtoc + \@nameuse{etocclasslocal\Etoc@currext maketitle}% + \etocclasslocalperhapsaddtotoc\Etoc@currext + \else + \section *{\contentsname}% + \etocifisstarred{}{\etocifmaintoctotoc{\etocclassmaintocaddtotoc}{}}% + \fi + } + {}% +} +\def\etocbookstyle{% + \etocsettocstyle + {\if@twocolumn \@restonecoltrue \onecolumn \else \@restonecolfalse \fi + \ifEtoc@localtoc + \@nameuse{etocclasslocal\Etoc@currext maketitle}% + \etocclasslocalperhapsaddtotoc\Etoc@currext + \else + \chapter *{\contentsname + \@mkboth {\MakeUppercase \contentsname} + {\MakeUppercase \contentsname}}% + \etocifisstarred{}{\etocifmaintoctotoc{\etocclassmaintocaddtotoc}{}}% + \fi + }% + {\if@restonecol \twocolumn \fi}% +} +\def\etocbookstylenomarks{% + \etocsettocstyle + {\if@twocolumn \@restonecoltrue \onecolumn \else \@restonecolfalse \fi + \ifEtoc@localtoc + \@nameuse{etocclasslocal\Etoc@currext maketitle}% + \etocclasslocalperhapsaddtotoc\Etoc@currext + \else + \chapter *{\contentsname}% + \etocifisstarred{}{\etocifmaintoctotoc{\etocclassmaintocaddtotoc}{}}% + \fi + }% + {\if@restonecol \twocolumn \fi}% +} +\let\etocreportstyle\etocbookstyle +\let\etocreportstylenomarks\etocbookstylenomarks +\def\etocmemoirstyle{% + \etocsettocstyle + {\ensureonecol \par \begingroup \phantomsection + \ifx\Etoc@aftertitlehook\@empty + \else + \ifmem@em@starred@listof + \else + \ifEtoc@localtoc + \etocclasslocalperhapsaddtotoc\Etoc@currext + \else + \ifEtoc@maintoctotoc + \etocclassmaintocaddtotoc + \fi + \fi + \fi + \fi + \ifEtoc@localtoc + \@namedef{@\Etoc@currext maketitle}{% + \@nameuse{etocclasslocal\Etoc@currext maketitle}% + }% + \fi + \@nameuse {@\Etoc@currext maketitle} %<< space token here from memoir code + \ifx\Etoc@aftertitlehook\@empty + \else + \Etoc@aftertitlehook \let \Etoc@aftertitlehook \relax + \fi + \parskip \cftparskip \@nameuse {cft\Etoc@currext beforelisthook}% + }% + {\@nameuse {cft\Etoc@currext afterlisthook}% + \endgroup\restorefromonecol + }% +} +\let\Etoc@beforetitlehook\@empty +\if1\@ifclassloaded{scrartcl}0{\@ifclassloaded{scrbook}0{\@ifclassloaded{scrreprt}01}}% +\expandafter\@gobble +\else + \ifdefined\setuptoc + \def\Etoc@beforetitlehook{% + \ifEtoc@localtoc + \etocclasslocalperhapsaddtotoc\Etoc@currext + \setuptoc{\Etoc@currext}{leveldown}% + \else + \etocifisstarred{}{\etocifmaintoctotoc{\setuptoc{toc}{totoc}}}% + \fi + }% + \fi +\expandafter\@firstofone +\fi +{\def\etocclasslocalperhapsaddtotoc #1{% + \etocifisstarred + {}% + {\csname ifEtoc@local#1totoc\endcsname + \setuptoc{\Etoc@currext}{totoc}% + \fi + }% + }% +} +\ifdefined\Iftocfeature + \def\etoc@Iftocfeature{\Iftocfeature}% +\else + \def\etoc@Iftocfeature{\iftocfeature}% +\fi +\def\etocscrartclstyle{% + \etocsettocstyle + {\ifx\Etoc@currext\Etoc@tocext + \expandafter\@firstofone + \else + \expandafter\@gobble + \fi + {\let\if@dynlist\if@tocleft}% + \edef\@currext{\Etoc@currext}% + \@ifundefined{listof\@currext name}% + {\def\list@fname{\listofname~\@currext}}% + {\expandafter\let\expandafter\list@fname + \csname listof\@currext name\endcsname}% + \etoc@Iftocfeature {\@currext}{onecolumn} + {\etoc@Iftocfeature {\@currext}{leveldown} + {} + {\if@twocolumn \aftergroup \twocolumn \onecolumn \fi }} + {}% + \etoc@Iftocfeature {\@currext}{numberline}% + {\def \nonumberline {\numberline {}}}{}% + \expandafter\tocbasic@listhead\expandafter {\list@fname}% + \begingroup \expandafter \expandafter \expandafter + \endgroup \expandafter + \ifx + \csname microtypesetup\endcsname \relax + \else + \etoc@Iftocfeature {\@currext}{noprotrusion}{} + {\microtypesetup {protrusion=false}% + \PackageInfo {tocbasic}% + {character protrusion at \@currext\space deactivated}}% + \fi + \etoc@Iftocfeature{\@currext}{noparskipfake}{}{% + \ifvmode \@tempskipa\lastskip \vskip-\lastskip + \addtolength{\@tempskipa}{\parskip}\vskip\@tempskipa\fi + }% + \setlength {\parskip }{\z@ }% + \setlength {\parindent }{\z@ }% + \setlength {\parfillskip }{\z@ \@plus 1fil}% + \csname tocbasic@@before@hook\endcsname + \csname tb@\@currext @before@hook\endcsname + }% end of before_toc + {% start of after_toc + \providecommand\tocbasic@end@toc@file{}\tocbasic@end@toc@file + \edef\@currext{\Etoc@currext}% + \csname tb@\@currext @after@hook\endcsname + \csname tocbasic@@after@hook\endcsname + }% end of after_toc +} +\let\etocscrbookstyle\etocscrartclstyle +\let\etocscrreprtstyle\etocscrartclstyle +\def\etocclasstocstyle{\etocarticlestyle} +\newcommand*\etocmarkboth[1]{% + \@mkboth{\MakeUppercase{#1}}{\MakeUppercase{#1}}} +\newcommand*\etocmarkbothnouc[1]{\@mkboth{#1}{#1}} +\newcommand\etoctocstyle[3][section]{\etocmulticolstyle[#2]% + {\csname #1\endcsname *{#3}}} +\newcommand\etoctocstylewithmarks[4][section]{\etocmulticolstyle[#2]% + {\csname #1\endcsname *{#3\etocmarkboth{#4}}}} +\newcommand\etoctocstylewithmarksnouc[4][section]{\etocmulticolstyle[#2]% + {\csname #1\endcsname *{#3\etocmarkbothnouc{#4}}}} +\def\Etoc@redefetocstylesforchapters{% + \renewcommand\etoctocstylewithmarks[4][chapter]{% + \etocmulticolstyle[##2]{\csname ##1\endcsname *{##3\etocmarkboth{##4}}}% + } + \renewcommand\etoctocstylewithmarksnouc[4][chapter]{% + \etocmulticolstyle[##2]{\csname ##1\endcsname *{##3\etocmarkbothnouc{##4}}}% + } + \renewcommand\etoctocstyle[3][chapter]{% + \etocmulticolstyle[##2]{\csname ##1\endcsname *{##3}} + } +} +\@ifclassloaded{scrartcl} + {\renewcommand*\etocclasstocstyle{\etocscrartclstyle}}{} +\@ifclassloaded{book} + {\renewcommand*\etocfontone{\normalfont\normalsize} + \renewcommand*\etocclasstocstyle{\etocbookstyle} + \Etoc@redefetocstylesforchapters}{} +\@ifclassloaded{report} + {\renewcommand*\etocfontone{\normalfont\normalsize} + \renewcommand*\etocclasstocstyle{\etocreportstyle} + \Etoc@redefetocstylesforchapters}{} +\@ifclassloaded{scrbook} + {\renewcommand*\etocfontone{\normalfont\normalsize} + \renewcommand*\etocclasstocstyle{\etocscrbookstyle} + \Etoc@redefetocstylesforchapters}{} +\@ifclassloaded{scrreprt} + {\renewcommand*\etocfontone{\normalfont\normalsize} + \renewcommand*\etocclasstocstyle{\etocscrreprtstyle} + \Etoc@redefetocstylesforchapters}{} +\@ifclassloaded{memoir} + {\renewcommand*\etocfontone{\normalfont\normalsize} + \renewcommand*\etocclasstocstyle{\etocmemoirstyle} + \Etoc@redefetocstylesforchapters}{} +\def\etoctocloftstyle {% + \etocsettocstyle{% + \@cfttocstart + \par + \begingroup + \parindent\z@ \parskip\cftparskip + \@nameuse{@cftmake\Etoc@currext title}% + \ifEtoc@localtoc + \etoctocloftlocalperhapsaddtotoc\Etoc@currext + \else + \etocifisstarred {}{\ifEtoc@maintoctotoc\@cftdobibtoc\fi}% + \fi + }% + {% + \endgroup + \@cfttocfinish + }% +} +\def\etoctocloftlocalperhapsaddtotoc#1{% + \etocifisstarred + {}% + {\csname ifEtoc@local#1totoc\endcsname + \ifdefined\c@chapter\def\@tocextra{@section}\else\def\@tocextra{@subsection}\fi + \csname @cftdobib#1\endcsname + \fi + }% +} +\def\etoctocbibindstyle {% + \etocsettocstyle {% + \toc@start + \ifEtoc@localtoc + \@nameuse{etocclasslocal\Etoc@currext maketitle}% + \etocclasslocalperhapsaddtotoc\Etoc@currext + \else + \etoc@tocbibind@dotoctitle + \fi + }% + {\toc@finish}% +} +\def\etoc@tocbibind@dotoctitle {% + \if@bibchapter + \etocifisstarred + {\chapter*{\contentsname}\prw@mkboth{\contentsname} % id. + }% + {\ifEtoc@maintoctotoc + \toc@chapter{\contentsname} %<-space from original + \else + \chapter*{\contentsname}\prw@mkboth{\contentsname} % id. + \fi + }% + \else + \etocifisstarred + {\@nameuse{\@tocextra}*{\contentsname\prw@mkboth{\contentsname}} %<-space + } + {\ifEtoc@maintoctotoc + \toc@section{\@tocextra}{\contentsname} %<-space from original + \else + \@nameuse{\@tocextra}*{\contentsname\prw@mkboth{\contentsname}} % id. + \fi + }% + \fi +}% +\@ifclassloaded{memoir} +{} +{% memoir not loaded + \@ifpackageloaded{tocloft} + {\if@cftnctoc\else + \ifEtoc@keeporiginaltoc + \else + \AtBeginDocument{\let\tableofcontents\etoctableofcontents}% + \fi + \fi } + {\AtBeginDocument + {\@ifpackageloaded{tocloft} + {\if@cftnctoc\else + \PackageWarningNoLine {etoc} + {Package `tocloft' was loaded after `etoc'.\MessageBreak + To prevent it from overwriting \protect\tableofcontents, it will\MessageBreak + be tricked into believing to have been loaded with its\MessageBreak + option `titles'. \space But this will cause the `tocloft'\MessageBreak + customization of the titles of the main list of figures\MessageBreak + and list of tables to not apply either.\MessageBreak + You should load `tocloft' before `etoc'.}% + \AtEndDocument{\PackageWarning{etoc} + {Please load `tocloft' before `etoc'!\@gobbletwo}}% + \fi + \@cftnctoctrue }% + {}% + }% + }% +} +\@ifclassloaded{memoir} +{} +{% memoir not loaded + \AtBeginDocument{% + \@ifpackageloaded{tocloft} + {% + \def\etocclasstocstyle{% + \etoctocloftstyle + \Etoc@classstyletrue + }% + \ifEtoc@etocstyle + \ifEtoc@classstyle + \etocclasstocstyle + \Etoc@etocstyletrue + \fi + \else + \ifEtoc@classstyle + \etocclasstocstyle + \fi + \fi + }% + {% no tocloft + \@ifpackageloaded {tocbibind} + {\if@dotoctoc + \def\etocclasstocstyle{% + \etoctocbibindstyle + \Etoc@classstyletrue + }% + \ifEtoc@etocstyle + \ifEtoc@classstyle + \etocclasstocstyle + \Etoc@etocstyletrue + \fi + \else + \ifEtoc@classstyle + \etocclasstocstyle + \fi + \fi + \ifEtoc@keeporiginaltoc + \else + \let\tableofcontents\etoctableofcontents + \fi + }% + {}% + }% + \@ifpackageloaded{tocbibind} + {% tocbibind, perhaps with tocloft + \if@dotoctoc + \ifEtoc@keeporiginaltoc + \else + \let\tableofcontents\etoctableofcontents + \fi + \etocsetup{maintoctotoc,localtoctotoc}% + \PackageInfo{etoc}{% + Setting (or re-setting) the options `maintoctotoc' and\MessageBreak + `localtoctotoc' to true as tocbibind was detected and\MessageBreak + found to be configured for `TOC to toc'.\MessageBreak + Reported at begin document}% + \fi + \if@dotoclof + \ifEtoc@lof + \etocsetup{localloftotoc}% + \PackageInfo{etoc}{% + Setting (or re-setting) `localloftotoc=true' as the\MessageBreak + package tocbibind was detected and is configured for\MessageBreak + `LOF to toc'. Reported at begin document}% + \fi + \fi + \if@dotoclot + \ifEtoc@lot + \etocsetup{locallottotoc}% + \PackageInfo{etoc}{% + Setting (or re-setting) `locallottotoc=true' as the\MessageBreak + package tocbibind was detected and is configured for\MessageBreak + `LOT to toc'. Reported at begin document}% + \fi + \fi + }% end of tocbibind branch + {}% + }% end of at begin document +}% end of not with memoir branch +\def\Etoc@addtocontents #1#2{% + \addtocontents {toc}{% + \protect\contentsline{#1}{#2}{\thepage}{\ifEtoc@hyperref\@currentHref\fi}% + \ifdefined\protected@file@percent\protected@file@percent\fi + }% +} +\def\Etoc@addcontentsline@ #1#2#3{% + \@namedef{toclevel@#1}{#3}\addcontentsline {toc}{#1}{#2}% +} +\DeclareRobustCommand*{\etoctoccontentsline} + {\@ifstar{\Etoc@addcontentsline@}{\Etoc@addtocontents}} +\def\Etoc@addtocontents@immediately#1#2{% + \begingroup + \let\Etoc@originalwrite\write + \def\write{\immediate\Etoc@originalwrite}% + \Etoc@addtocontents{#1}{#2}% + \endgroup +} +\def\Etoc@addcontentsline@@immediately#1#2#3{% + \begingroup + \let\Etoc@originalwrite\write + \def\write{\immediate\Etoc@originalwrite}% + \Etoc@addcontentsline@{#1}{#2}{#3}% + \endgoroup +} +\DeclareRobustCommand*{\etocimmediatetoccontentsline} + {\@ifstar{\Etoc@addcontentsline@@immediately}{\Etoc@addtocontents@immediately}} +\def\Etoc@storetocdepth {\xdef\Etoc@savedtocdepth{\number\c@tocdepth}} +\def\Etoc@restoretocdepth {\global\c@tocdepth\Etoc@savedtocdepth\relax} +\def\etocobeytoctocdepth {\def\etoc@settocdepth + {\afterassignment\Etoc@@nottoodeep \global\c@tocdepth}} +\def\Etoc@@nottoodeep {\ifnum\Etoc@savedtocdepth<\c@tocdepth + \global\c@tocdepth\Etoc@savedtocdepth\relax\fi } +\def\etocignoretoctocdepth {\let\etoc@settocdepth\@gobble } +\def\etocsettocdepth {\futurelet\Etoc@nexttoken\Etoc@set@tocdepth } +\def\Etoc@set@tocdepth {\ifx\Etoc@nexttoken\bgroup + \expandafter\Etoc@set@tocdepth@ + \else\expandafter\Etoc@set@toctocdepth + \fi } +\def\Etoc@set@tocdepth@ #1{\@ifundefined {Etoc@#1@@} + {\PackageWarning{etoc} + {Unknown sectioning unit #1, \protect\etocsettocdepth\space ignored}} + {\global\c@tocdepth\csname Etoc@#1@@\endcsname}% +} +\def\Etoc@set@toctocdepth #1#{\Etoc@set@toctocdepth@ } +\def\Etoc@set@toctocdepth@ #1{% + \@ifundefined{Etoc@#1@@}% + {\PackageWarning{etoc} + {Unknown sectioning depth #1, \protect\etocsettocdepth.toc ignored}}% + {\addtocontents {toc} + {\protect\etoc@settocdepth\expandafter\protect\csname Etoc@#1@@\endcsname}}% +} +\def\etocimmediatesettocdepth #1#{\Etoc@set@toctocdepth@immediately} +\def\Etoc@set@toctocdepth@immediately #1{% + \@ifundefined{Etoc@#1@@}% + {\PackageWarning{etoc} + {Unknown sectioning depth #1, \protect\etocimmediatesettocdepth.toc ignored}}% + {\begingroup + \let\Etoc@originalwrite\write + \def\write{\immediate\Etoc@originalwrite}% + \addtocontents {toc} + {\protect\etoc@settocdepth\expandafter\protect + \csname Etoc@#1@@\endcsname}% + \endgroup + }% +} +\def\etocdepthtag #1#{\Etoc@depthtag } +\def\Etoc@depthtag #1{\addtocontents {toc}{\protect\etoc@depthtag {#1}}} +\def\etocimmediatedepthtag #1#{\Etoc@depthtag@immediately } +\def\Etoc@depthtag@immediately #1{% + \begingroup + \let\Etoc@originalwrite\write + \def\write{\immediate\Etoc@originalwrite}% + \addtocontents {toc}{\protect\etoc@depthtag {#1}}% + \endgroup +} +\def\etocignoredepthtags {\let\etoc@depthtag \@gobble } +\def\etocobeydepthtags {\let\etoc@depthtag \Etoc@depthtag@ } +\def\Etoc@depthtag@ #1{\@ifundefined{Etoc@depthof@#1}% + {}% ignore in silence if tag has no associated depth + {\afterassignment\Etoc@@nottoodeep + \global\c@tocdepth\csname Etoc@depthof@#1\endcsname}% +} +\def\etocsettagdepth #1#2{\@ifundefined{Etoc@#2@@}% + {\PackageWarning{etoc} + {Unknown sectioning depth #2, \protect\etocsettagdepth\space ignored}}% + {\@namedef{Etoc@depthof@#1}{\@nameuse{Etoc@#2@@}}}% +} +\def\Etoc@tocvsec@err #1{\PackageError {etoc} + {The command \protect#1\space is incompatible with `etoc'} + {Use \protect\etocsettocdepth.toc as replacement}% +}% +\AtBeginDocument {% + \@ifclassloaded{memoir} + {\PackageInfo {etoc} + {Regarding `memoir' class command \protect\settocdepth, consider\MessageBreak + \protect\etocsettocdepth.toc as a drop-in replacement with more\MessageBreak + capabilities (see `etoc' manual). \space + Also, \protect\etocsettocdepth\MessageBreak + and \protect\etocsetnexttocdepth\space should be used in place of\MessageBreak + `memoir' command \protect\maxtocdepth\@gobble}% + }% + {\@ifpackageloaded {tocvsec2}{% + \def\maxtocdepth #1{\Etoc@tocvsec@err \maxtocdepth }% + \def\settocdepth #1{\Etoc@tocvsec@err \settocdepth }% + \def\resettocdepth {\@ifstar {\Etoc@tocvsec@err \resettocdepth }% + {\Etoc@tocvsec@err \resettocdepth }% + }% + \def\save@tocdepth #1#2#3{}% + \let\reset@tocdepth\relax + \let\remax@tocdepth\relax + \let\tableofcontents\etoctableofcontents + \PackageWarningNoLine {etoc} + {Package `tocvsec2' detected and its modification of\MessageBreak + \protect\tableofcontents\space reverted. \space Use + \protect\etocsettocdepth.toc\MessageBreak as a replacement + for `tocvsec2' toc-related commands}% + }% tocvsec2 loaded + {}% tocvsec2 not loaded + }% +}% +\def\invisibletableofcontents {\etocsetnexttocdepth {-3}\tableofcontents }% +\def\invisiblelocaltableofcontents + {\etocsetnexttocdepth {-3}\localtableofcontents }% +\def\etocsetnexttocdepth #1{% + \@ifundefined{Etoc@#1@@} + {\PackageWarning{etoc} + {Unknown sectioning unit #1, \protect\etocsetnextocdepth\space ignored}} + {\Etoc@setnexttocdepth{\csname Etoc@#1@@\endcsname}}% +}% +\def\Etoc@setnexttocdepth#1{% + \def\Etoc@tocdepthset{% + \Etoc@tocdepthreset + \edef\Etoc@tocdepthreset {% + \global\c@tocdepth\the\c@tocdepth\space + \global\let\noexpand\Etoc@tocdepthreset\noexpand\@empty + }% + \global\c@tocdepth#1% + \global\let\Etoc@tocdepthset\@empty + }% +}% +\let\Etoc@tocdepthreset\@empty +\let\Etoc@tocdepthset \@empty +\def\etocsetlocaltop #1#{\Etoc@set@localtop}% +\def\Etoc@set@localtop #1{% + \@ifundefined{Etoc@#1@@}% + {\PackageWarning{etoc} + {Unknown sectioning depth #1, \protect\etocsetlocaltop.toc ignored}}% + {\addtocontents {toc} + {\protect\etoc@setlocaltop\expandafter\protect\csname Etoc@#1@@\endcsname}}% +}% +\def\etocimmediatesetlocaltop #1#{\Etoc@set@localtop@immediately}% +\def\Etoc@set@localtop@immediately #1{% + \@ifundefined{Etoc@#1@@}% + {\PackageWarning{etoc} + {Unknown sectioning depth #1, \protect\etocimmediatesetlocaltop.toc ignored}}% + {\begingroup + \let\Etoc@originalwrite\write + \def\write{\immediate\Etoc@originalwrite}% + \addtocontents {toc} + {\protect\etoc@setlocaltop\expandafter\protect + \csname Etoc@#1@@\endcsname}% + \endgroup + }% +}% +\def\etoc@setlocaltop #1{% + \ifnum#1=\Etoc@maxlevel + \Etoc@skipthisonetrue + \else + \Etoc@skipthisonefalse + \global\let\Etoc@level #1% + \global\let\Etoc@virtualtop #1% + \ifEtoc@localtoc + \ifEtoc@stoptoc + \Etoc@skipthisonetrue + \else + \ifEtoc@notactive + \Etoc@skipthisonetrue + \else + \unless\ifnum\Etoc@level>\etoclocaltop + \Etoc@skipthisonetrue + \global\Etoc@stoptoctrue + \fi + \fi + \fi + \fi + \fi + \let\Etoc@next\@empty + \ifEtoc@skipthisone + \else + \ifnum\Etoc@level>\c@tocdepth + \else + \ifEtoc@standardlines + \else + \let\Etoc@next\Etoc@setlocaltop@doendsandbegin + \fi + \fi + \fi + \Etoc@next +}% +\def\Etoc@setlocaltop@doendsandbegin{% + \Etoc@doendsandbegin + \global\Etoc@skipprefixfalse +} +\addtocontents {toc}{\protect\@ifundefined{etoctocstyle}% + {\let\protect\etoc@startlocaltoc\protect\@gobble + \let\protect\etoc@settocdepth\protect\@gobble + \let\protect\etoc@depthtag\protect\@gobble + \let\protect\etoc@setlocaltop\protect\@gobble}{}}% +\def\etocstandardlines {\Etoc@standardlinestrue} +\def\etoctoclines {\Etoc@standardlinesfalse} +\etocdefaultlines +\etocstandardlines +\def\etocstandarddisplaystyle{% + \PackageWarningNoLine{etoc}{% + \string\etocstandarddisplaystyle \on@line\MessageBreak + is deprecated. \space Please use \string\etocclasstocstyle}% +} +\expandafter\def\expandafter\etocclasstocstyle\expandafter{% + \etocclasstocstyle + \Etoc@classstyletrue +} +\def\etocetoclocaltocstyle{\Etoc@etocstyletrue} +\def\etocusertocstyle{\Etoc@etocstylefalse} +\etocclasstocstyle +\etocetoclocaltocstyle +\etocobeytoctocdepth +\etocobeydepthtags +\let\etocbeforetitlehook \@empty +\let\etocaftertitlehook \@empty +\let\etocaftercontentshook \@empty +\let\etocaftertochook \@empty +\def\etockeeporiginaltableofcontents + {\Etoc@keeporiginaltoctrue\let\tableofcontents\etocoriginaltableofcontents}% +\endinput +%% +%% End of file `etoc.sty'. diff --git a/External/open-cpp-utils/Documentation/latex/files.tex b/External/open-cpp-utils/Documentation/latex/files.tex new file mode 100644 index 0000000..7dfc3d1 --- /dev/null +++ b/External/open-cpp-utils/Documentation/latex/files.tex @@ -0,0 +1,11 @@ +\doxysection{File List} +Here is a list of all documented files with brief descriptions\+:\begin{DoxyCompactList} +\item\contentsline{section}{\mbox{\hyperlink{any_8h_source}{any.\+h}} }{\pageref{any_8h_source}}{} +\item\contentsline{section}{\mbox{\hyperlink{array_8h_source}{array.\+h}} }{\pageref{array_8h_source}}{} +\item\contentsline{section}{\mbox{\hyperlink{directed__tree_8h_source}{directed\+\_\+tree.\+h}} }{\pageref{directed__tree_8h_source}}{} +\item\contentsline{section}{\mbox{\hyperlink{optional_8h_source}{optional.\+h}} }{\pageref{optional_8h_source}}{} +\item\contentsline{section}{\mbox{\hyperlink{startup_8h_source}{startup.\+h}} }{\pageref{startup_8h_source}}{} +\item\contentsline{section}{\mbox{\hyperlink{template__utils_8h}{template\+\_\+utils.\+h}} \\*Provides compile time evaluation utilities for templates and template packs }{\pageref{template__utils_8h}}{} +\item\contentsline{section}{\mbox{\hyperlink{types_8h_source}{types.\+h}} }{\pageref{types_8h_source}}{} +\item\contentsline{section}{\mbox{\hyperlink{unique__id_8h_source}{unique\+\_\+id.\+h}} }{\pageref{unique__id_8h_source}}{} +\end{DoxyCompactList} diff --git a/External/open-cpp-utils/Documentation/latex/hierarchy.tex b/External/open-cpp-utils/Documentation/latex/hierarchy.tex new file mode 100644 index 0000000..d1a5173 --- /dev/null +++ b/External/open-cpp-utils/Documentation/latex/hierarchy.tex @@ -0,0 +1,21 @@ +\doxysection{Class Hierarchy} +This inheritance list is sorted roughly, but not completely, alphabetically\+:\begin{DoxyCompactList} +\item \contentsline{section}{open\+\_\+cpp\+\_\+utils\+::any\texorpdfstring{$<$}{<} Ts \texorpdfstring{$>$}{>}}{\pageref{classopen__cpp__utils_1_1any}}{} +\item \contentsline{section}{open\+\_\+cpp\+\_\+utils\+::any\texorpdfstring{$<$}{<} Rest... \texorpdfstring{$>$}{>}}{\pageref{classopen__cpp__utils_1_1any}}{} +\begin{DoxyCompactList} +\item \contentsline{section}{open\+\_\+cpp\+\_\+utils\+::any\texorpdfstring{$<$}{<} T, Rest... \texorpdfstring{$>$}{>}}{\pageref{classopen__cpp__utils_1_1any_3_01_t_00_01_rest_8_8_8_01_4}}{} +\end{DoxyCompactList} +\item \contentsline{section}{open\+\_\+cpp\+\_\+utils\+::any\texorpdfstring{$<$}{<}\texorpdfstring{$>$}{>}}{\pageref{classopen__cpp__utils_1_1any_3_4}}{} +\item \contentsline{section}{open\+\_\+cpp\+\_\+utils\+::directed\+\_\+tree\texorpdfstring{$<$}{<} T \texorpdfstring{$>$}{>}\+::breadth\+\_\+first}{\pageref{classopen__cpp__utils_1_1directed__tree_1_1breadth__first}}{} +\item \contentsline{section}{open\+\_\+cpp\+\_\+utils\+::constant\+\_\+value\texorpdfstring{$<$}{<} T, V \texorpdfstring{$>$}{>}}{\pageref{structopen__cpp__utils_1_1constant__value}}{} +\item \contentsline{section}{open\+\_\+cpp\+\_\+utils\+::constant\+\_\+value\texorpdfstring{$<$}{<} node, node(0)\texorpdfstring{$>$}{>}}{\pageref{structopen__cpp__utils_1_1constant__value}}{} +\item \contentsline{section}{open\+\_\+cpp\+\_\+utils\+::directed\+\_\+tree\texorpdfstring{$<$}{<} T \texorpdfstring{$>$}{>}}{\pageref{classopen__cpp__utils_1_1directed__tree}}{} +\item \contentsline{section}{open\+\_\+cpp\+\_\+utils\+::dyn\+\_\+array\texorpdfstring{$<$}{<} T, N \texorpdfstring{$>$}{>}}{\pageref{classopen__cpp__utils_1_1dyn__array}}{} +\item \contentsline{section}{open\+\_\+cpp\+\_\+utils\+::fixed\+\_\+array\texorpdfstring{$<$}{<} T, N \texorpdfstring{$>$}{>}}{\pageref{structopen__cpp__utils_1_1fixed__array}}{} +\item \contentsline{section}{open\+\_\+cpp\+\_\+utils\+::fixed\+\_\+array\texorpdfstring{$<$}{<} T, N \texorpdfstring{$>$}{>}}{\pageref{structopen__cpp__utils_1_1fixed__array_3_01_t_00_01_n_01_4}}{} +\item \contentsline{section}{open\+\_\+cpp\+\_\+utils\+::directed\+\_\+tree\texorpdfstring{$<$}{<} T \texorpdfstring{$>$}{>}\+::in\+\_\+order}{\pageref{classopen__cpp__utils_1_1directed__tree_1_1in__order}}{} +\item \contentsline{section}{open\+\_\+cpp\+\_\+utils\+::optional\texorpdfstring{$<$}{<} T \texorpdfstring{$>$}{>}}{\pageref{classopen__cpp__utils_1_1optional}}{} +\item \contentsline{section}{open\+\_\+cpp\+\_\+utils\+::directed\+\_\+tree\texorpdfstring{$<$}{<} T \texorpdfstring{$>$}{>}\+::post\+\_\+order}{\pageref{classopen__cpp__utils_1_1directed__tree_1_1post__order}}{} +\item \contentsline{section}{open\+\_\+cpp\+\_\+utils\+::directed\+\_\+tree\texorpdfstring{$<$}{<} T \texorpdfstring{$>$}{>}\+::pre\+\_\+order}{\pageref{classopen__cpp__utils_1_1directed__tree_1_1pre__order}}{} +\item \contentsline{section}{open\+\_\+cpp\+\_\+utils\+::directed\+\_\+tree\texorpdfstring{$<$}{<} T \texorpdfstring{$>$}{>}\+::traverser\texorpdfstring{$<$}{<} V, O \texorpdfstring{$>$}{>}}{\pageref{classopen__cpp__utils_1_1directed__tree_1_1traverser}}{} +\end{DoxyCompactList} diff --git a/External/open-cpp-utils/Documentation/latex/longtable_doxygen.sty b/External/open-cpp-utils/Documentation/latex/longtable_doxygen.sty new file mode 100644 index 0000000..e94b78b --- /dev/null +++ b/External/open-cpp-utils/Documentation/latex/longtable_doxygen.sty @@ -0,0 +1,456 @@ +%% +%% This is file `longtable.sty', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% longtable.dtx (with options: `package') +%% +%% This is a generated file. +%% +%% The source is maintained by the LaTeX Project team and bug +%% reports for it can be opened at http://latex-project.org/bugs.html +%% (but please observe conditions on bug reports sent to that address!) +%% +%% Copyright 1993-2016 +%% The LaTeX3 Project and any individual authors listed elsewhere +%% in this file. +%% +%% This file was generated from file(s) of the Standard LaTeX `Tools Bundle'. +%% -------------------------------------------------------------------------- +%% +%% It may be distributed and/or modified under the +%% conditions of the LaTeX Project Public License, either version 1.3c +%% of this license or (at your option) any later version. +%% The latest version of this license is in +%% http://www.latex-project.org/lppl.txt +%% and version 1.3c or later is part of all distributions of LaTeX +%% version 2005/12/01 or later. +%% +%% This file may only be distributed together with a copy of the LaTeX +%% `Tools Bundle'. You may however distribute the LaTeX `Tools Bundle' +%% without such generated files. +%% +%% The list of all files belonging to the LaTeX `Tools Bundle' is +%% given in the file `manifest.txt'. +%% +%% File: longtable.dtx Copyright (C) 1990-2001 David Carlisle +\NeedsTeXFormat{LaTeX2e}[1995/06/01] +\ProvidesPackage{longtable_doxygen} + [2014/10/28 v4.11 Multi-page Table package (DPC) - frozen version for doxygen] +\def\LT@err{\PackageError{longtable}} +\def\LT@warn{\PackageWarning{longtable}} +\def\LT@final@warn{% + \AtEndDocument{% + \LT@warn{Table \@width s have changed. Rerun LaTeX.\@gobbletwo}}% + \global\let\LT@final@warn\relax} +\DeclareOption{errorshow}{% + \def\LT@warn{\PackageInfo{longtable}}} +\DeclareOption{pausing}{% + \def\LT@warn#1{% + \LT@err{#1}{This is not really an error}}} +\DeclareOption{set}{} +\DeclareOption{final}{} +\ProcessOptions +\newskip\LTleft \LTleft=\fill +\newskip\LTright \LTright=\fill +\newskip\LTpre \LTpre=\bigskipamount +\newskip\LTpost \LTpost=\bigskipamount +\newcount\LTchunksize \LTchunksize=20 +\let\c@LTchunksize\LTchunksize +\newdimen\LTcapwidth \LTcapwidth=4in +\newbox\LT@head +\newbox\LT@firsthead +\newbox\LT@foot +\newbox\LT@lastfoot +\newcount\LT@cols +\newcount\LT@rows +\newcounter{LT@tables} +\newcounter{LT@chunks}[LT@tables] +\ifx\c@table\undefined + \newcounter{table} + \def\fnum@table{\tablename~\thetable} +\fi +\ifx\tablename\undefined + \def\tablename{Table} +\fi +\newtoks\LT@p@ftn +\mathchardef\LT@end@pen=30000 +\def\longtable{% + \par + \ifx\multicols\@undefined + \else + \ifnum\col@number>\@ne + \@twocolumntrue + \fi + \fi + \if@twocolumn + \LT@err{longtable not in 1-column mode}\@ehc + \fi + \begingroup + \@ifnextchar[\LT@array{\LT@array[x]}} +\def\LT@array[#1]#2{% + \refstepcounter{table}\stepcounter{LT@tables}% + \if l#1% + \LTleft\z@ \LTright\fill + \else\if r#1% + \LTleft\fill \LTright\z@ + \else\if c#1% + \LTleft\fill \LTright\fill + \fi\fi\fi + \let\LT@mcol\multicolumn + \let\LT@@tabarray\@tabarray + \let\LT@@hl\hline + \def\@tabarray{% + \let\hline\LT@@hl + \LT@@tabarray}% + \let\\\LT@tabularcr\let\tabularnewline\\% + \def\newpage{\noalign{\break}}% + \def\pagebreak{\noalign{\ifnum`}=0\fi\@testopt{\LT@no@pgbk-}4}% + \def\nopagebreak{\noalign{\ifnum`}=0\fi\@testopt\LT@no@pgbk4}% + \let\hline\LT@hline \let\kill\LT@kill\let\caption\LT@caption + \@tempdima\ht\strutbox + \let\@endpbox\LT@endpbox + \ifx\extrarowheight\@undefined + \let\@acol\@tabacol + \let\@classz\@tabclassz \let\@classiv\@tabclassiv + \def\@startpbox{\vtop\LT@startpbox}% + \let\@@startpbox\@startpbox + \let\@@endpbox\@endpbox + \let\LT@LL@FM@cr\@tabularcr + \else + \advance\@tempdima\extrarowheight + \col@sep\tabcolsep + \let\@startpbox\LT@startpbox\let\LT@LL@FM@cr\@arraycr + \fi + \setbox\@arstrutbox\hbox{\vrule + \@height \arraystretch \@tempdima + \@depth \arraystretch \dp \strutbox + \@width \z@}% + \let\@sharp##\let\protect\relax + \begingroup + \@mkpream{#2}% + \xdef\LT@bchunk{% + \global\advance\c@LT@chunks\@ne + \global\LT@rows\z@\setbox\z@\vbox\bgroup + \LT@setprevdepth + \tabskip\LTleft \noexpand\halign to\hsize\bgroup + \tabskip\z@ \@arstrut \@preamble \tabskip\LTright \cr}% + \endgroup + \expandafter\LT@nofcols\LT@bchunk&\LT@nofcols + \LT@make@row + \m@th\let\par\@empty + \everycr{}\lineskip\z@\baselineskip\z@ + \LT@bchunk} +\def\LT@no@pgbk#1[#2]{\penalty #1\@getpen{#2}\ifnum`{=0\fi}} +\def\LT@start{% + \let\LT@start\endgraf + \endgraf\penalty\z@\vskip\LTpre + \dimen@\pagetotal + \advance\dimen@ \ht\ifvoid\LT@firsthead\LT@head\else\LT@firsthead\fi + \advance\dimen@ \dp\ifvoid\LT@firsthead\LT@head\else\LT@firsthead\fi + \advance\dimen@ \ht\LT@foot + \dimen@ii\vfuzz + \vfuzz\maxdimen + \setbox\tw@\copy\z@ + \setbox\tw@\vsplit\tw@ to \ht\@arstrutbox + \setbox\tw@\vbox{\unvbox\tw@}% + \vfuzz\dimen@ii + \advance\dimen@ \ht + \ifdim\ht\@arstrutbox>\ht\tw@\@arstrutbox\else\tw@\fi + \advance\dimen@\dp + \ifdim\dp\@arstrutbox>\dp\tw@\@arstrutbox\else\tw@\fi + \advance\dimen@ -\pagegoal + \ifdim \dimen@>\z@\vfil\break\fi + \global\@colroom\@colht + \ifvoid\LT@foot\else + \advance\vsize-\ht\LT@foot + \global\advance\@colroom-\ht\LT@foot + \dimen@\pagegoal\advance\dimen@-\ht\LT@foot\pagegoal\dimen@ + \maxdepth\z@ + \fi + \ifvoid\LT@firsthead\copy\LT@head\else\box\LT@firsthead\fi\nobreak + \output{\LT@output}} +\def\endlongtable{% + \crcr + \noalign{% + \let\LT@entry\LT@entry@chop + \xdef\LT@save@row{\LT@save@row}}% + \LT@echunk + \LT@start + \unvbox\z@ + \LT@get@widths + \if@filesw + {\let\LT@entry\LT@entry@write\immediate\write\@auxout{% + \gdef\expandafter\noexpand + \csname LT@\romannumeral\c@LT@tables\endcsname + {\LT@save@row}}}% + \fi + \ifx\LT@save@row\LT@@save@row + \else + \LT@warn{Column \@width s have changed\MessageBreak + in table \thetable}% + \LT@final@warn + \fi + \endgraf\penalty -\LT@end@pen + \endgroup + \global\@mparbottom\z@ + \pagegoal\vsize + \endgraf\penalty\z@\addvspace\LTpost + \ifvoid\footins\else\insert\footins{}\fi} +\def\LT@nofcols#1&{% + \futurelet\@let@token\LT@n@fcols} +\def\LT@n@fcols{% + \advance\LT@cols\@ne + \ifx\@let@token\LT@nofcols + \expandafter\@gobble + \else + \expandafter\LT@nofcols + \fi} +\def\LT@tabularcr{% + \relax\iffalse{\fi\ifnum0=`}\fi + \@ifstar + {\def\crcr{\LT@crcr\noalign{\nobreak}}\let\cr\crcr + \LT@t@bularcr}% + {\LT@t@bularcr}} +\let\LT@crcr\crcr +\let\LT@setprevdepth\relax +\def\LT@t@bularcr{% + \global\advance\LT@rows\@ne + \ifnum\LT@rows=\LTchunksize + \gdef\LT@setprevdepth{% + \prevdepth\z@\global + \global\let\LT@setprevdepth\relax}% + \expandafter\LT@xtabularcr + \else + \ifnum0=`{}\fi + \expandafter\LT@LL@FM@cr + \fi} +\def\LT@xtabularcr{% + \@ifnextchar[\LT@argtabularcr\LT@ntabularcr} +\def\LT@ntabularcr{% + \ifnum0=`{}\fi + \LT@echunk + \LT@start + \unvbox\z@ + \LT@get@widths + \LT@bchunk} +\def\LT@argtabularcr[#1]{% + \ifnum0=`{}\fi + \ifdim #1>\z@ + \unskip\@xargarraycr{#1}% + \else + \@yargarraycr{#1}% + \fi + \LT@echunk + \LT@start + \unvbox\z@ + \LT@get@widths + \LT@bchunk} +\def\LT@echunk{% + \crcr\LT@save@row\cr\egroup + \global\setbox\@ne\lastbox + \unskip + \egroup} +\def\LT@entry#1#2{% + \ifhmode\@firstofone{&}\fi\omit + \ifnum#1=\c@LT@chunks + \else + \kern#2\relax + \fi} +\def\LT@entry@chop#1#2{% + \noexpand\LT@entry + {\ifnum#1>\c@LT@chunks + 1}{0pt% + \else + #1}{#2% + \fi}} +\def\LT@entry@write{% + \noexpand\LT@entry^^J% + \@spaces} +\def\LT@kill{% + \LT@echunk + \LT@get@widths + \expandafter\LT@rebox\LT@bchunk} +\def\LT@rebox#1\bgroup{% + #1\bgroup + \unvbox\z@ + \unskip + \setbox\z@\lastbox} +\def\LT@blank@row{% + \xdef\LT@save@row{\expandafter\LT@build@blank + \romannumeral\number\LT@cols 001 }} +\def\LT@build@blank#1{% + \if#1m% + \noexpand\LT@entry{1}{0pt}% + \expandafter\LT@build@blank + \fi} +\def\LT@make@row{% + \global\expandafter\let\expandafter\LT@save@row + \csname LT@\romannumeral\c@LT@tables\endcsname + \ifx\LT@save@row\relax + \LT@blank@row + \else + {\let\LT@entry\or + \if!% + \ifcase\expandafter\expandafter\expandafter\LT@cols + \expandafter\@gobble\LT@save@row + \or + \else + \relax + \fi + !% + \else + \aftergroup\LT@blank@row + \fi}% + \fi} +\let\setlongtables\relax +\def\LT@get@widths{% + \setbox\tw@\hbox{% + \unhbox\@ne + \let\LT@old@row\LT@save@row + \global\let\LT@save@row\@empty + \count@\LT@cols + \loop + \unskip + \setbox\tw@\lastbox + \ifhbox\tw@ + \LT@def@row + \advance\count@\m@ne + \repeat}% + \ifx\LT@@save@row\@undefined + \let\LT@@save@row\LT@save@row + \fi} +\def\LT@def@row{% + \let\LT@entry\or + \edef\@tempa{% + \ifcase\expandafter\count@\LT@old@row + \else + {1}{0pt}% + \fi}% + \let\LT@entry\relax + \xdef\LT@save@row{% + \LT@entry + \expandafter\LT@max@sel\@tempa + \LT@save@row}} +\def\LT@max@sel#1#2{% + {\ifdim#2=\wd\tw@ + #1% + \else + \number\c@LT@chunks + \fi}% + {\the\wd\tw@}} +\def\LT@hline{% + \noalign{\ifnum0=`}\fi + \penalty\@M + \futurelet\@let@token\LT@@hline} +\def\LT@@hline{% + \ifx\@let@token\hline + \global\let\@gtempa\@gobble + \gdef\LT@sep{\penalty-\@medpenalty\vskip\doublerulesep}% + \else + \global\let\@gtempa\@empty + \gdef\LT@sep{\penalty-\@lowpenalty\vskip-\arrayrulewidth}% + \fi + \ifnum0=`{\fi}% + \multispan\LT@cols + \unskip\leaders\hrule\@height\arrayrulewidth\hfill\cr + \noalign{\LT@sep}% + \multispan\LT@cols + \unskip\leaders\hrule\@height\arrayrulewidth\hfill\cr + \noalign{\penalty\@M}% + \@gtempa} +\def\LT@caption{% + \noalign\bgroup + \@ifnextchar[{\egroup\LT@c@ption\@firstofone}\LT@capti@n} +\def\LT@c@ption#1[#2]#3{% + \LT@makecaption#1\fnum@table{#3}% + \def\@tempa{#2}% + \ifx\@tempa\@empty\else + {\let\\\space + \addcontentsline{lot}{table}{\protect\numberline{\thetable}{#2}}}% + \fi} +\def\LT@capti@n{% + \@ifstar + {\egroup\LT@c@ption\@gobble[]}% + {\egroup\@xdblarg{\LT@c@ption\@firstofone}}} +\def\LT@makecaption#1#2#3{% + \LT@mcol\LT@cols c{\hbox to\z@{\hss\parbox[t]\LTcapwidth{% + \sbox\@tempboxa{#1{#2: }#3}% + \ifdim\wd\@tempboxa>\hsize + #1{#2: }#3% + \else + \hbox to\hsize{\hfil\box\@tempboxa\hfil}% + \fi + \endgraf\vskip\baselineskip}% + \hss}}} +\def\LT@output{% + \ifnum\outputpenalty <-\@Mi + \ifnum\outputpenalty > -\LT@end@pen + \LT@err{floats and marginpars not allowed in a longtable}\@ehc + \else + \setbox\z@\vbox{\unvbox\@cclv}% + \ifdim \ht\LT@lastfoot>\ht\LT@foot + \dimen@\pagegoal + \advance\dimen@-\ht\LT@lastfoot + \ifdim\dimen@<\ht\z@ + \setbox\@cclv\vbox{\unvbox\z@\copy\LT@foot\vss}% + \@makecol + \@outputpage + \setbox\z@\vbox{\box\LT@head}% + \fi + \fi + \global\@colroom\@colht + \global\vsize\@colht + \vbox + {\unvbox\z@\box\ifvoid\LT@lastfoot\LT@foot\else\LT@lastfoot\fi}% + \fi + \else + \setbox\@cclv\vbox{\unvbox\@cclv\copy\LT@foot\vss}% + \@makecol + \@outputpage + \global\vsize\@colroom + \copy\LT@head\nobreak + \fi} +\def\LT@end@hd@ft#1{% + \LT@echunk + \ifx\LT@start\endgraf + \LT@err + {Longtable head or foot not at start of table}% + {Increase LTchunksize}% + \fi + \setbox#1\box\z@ + \LT@get@widths + \LT@bchunk} +\def\endfirsthead{\LT@end@hd@ft\LT@firsthead} +\def\endhead{\LT@end@hd@ft\LT@head} +\def\endfoot{\LT@end@hd@ft\LT@foot} +\def\endlastfoot{\LT@end@hd@ft\LT@lastfoot} +\def\LT@startpbox#1{% + \bgroup + \let\@footnotetext\LT@p@ftntext + \setlength\hsize{#1}% + \@arrayparboxrestore + \vrule \@height \ht\@arstrutbox \@width \z@} +\def\LT@endpbox{% + \@finalstrut\@arstrutbox + \egroup + \the\LT@p@ftn + \global\LT@p@ftn{}% + \hfil} +%% added \long to prevent: +% LaTeX Warning: Command \LT@p@ftntext has changed. +% +% from the original repository (https://github.com/latex3/latex2e/blob/develop/required/tools/longtable.dtx): +% \changes{v4.15}{2021/03/28} +% {make long for gh/364} +% Inside the `p' column, just save up the footnote text in a token +% register. +\long\def\LT@p@ftntext#1{% + \edef\@tempa{\the\LT@p@ftn\noexpand\footnotetext[\the\c@footnote]}% + \global\LT@p@ftn\expandafter{\@tempa{#1}}}% + +\@namedef{ver@longtable.sty}{2014/10/28 v4.11 Multi-page Table package (DPC) - frozen version for doxygen} +\endinput +%% +%% End of file `longtable.sty'. diff --git a/External/open-cpp-utils/Documentation/latex/make.bat b/External/open-cpp-utils/Documentation/latex/make.bat new file mode 100644 index 0000000..96da1c8 --- /dev/null +++ b/External/open-cpp-utils/Documentation/latex/make.bat @@ -0,0 +1,56 @@ +pushd %~dp0 +if not %errorlevel% == 0 goto :end + +set ORG_LATEX_CMD=%LATEX_CMD% +set ORG_MKIDX_CMD=%MKIDX_CMD% +set ORG_BIBTEX_CMD=%BIBTEX_CMD% +set ORG_LATEX_COUNT=%LATEX_COUNT% +set ORG_MANUAL_FILE=%MANUAL_FILE% +if "X"%LATEX_CMD% == "X" set LATEX_CMD=pdflatex +if "X"%MKIDX_CMD% == "X" set MKIDX_CMD=makeindex +if "X"%BIBTEX_CMD% == "X" set BIBTEX_CMD=bibtex +if "X"%LATEX_COUNT% == "X" set LATEX_COUNT=8 +if "X"%MANUAL_FILE% == "X" set MANUAL_FILE=refman + +del /s /f *.ps *.dvi *.aux *.toc *.idx *.ind *.ilg *.log *.out *.brf *.blg *.bbl %MANUAL_FILE%.pdf + + +%LATEX_CMD% %MANUAL_FILE% +echo ---- +%MKIDX_CMD% %MANUAL_FILE%.idx +echo ---- +%LATEX_CMD% %MANUAL_FILE% + +setlocal enabledelayedexpansion +set count=%LATEX_COUNT% +:repeat +set content=X +for /F "tokens=*" %%T in ( 'findstr /C:"Rerun LaTeX" %MANUAL_FILE%.log' ) do set content="%%~T" +if !content! == X for /F "tokens=*" %%T in ( 'findstr /C:"Rerun to get cross-references right" %MANUAL_FILE%.log' ) do set content="%%~T" +if !content! == X for /F "tokens=*" %%T in ( 'findstr /C:"Rerun to get bibliographical references right" %MANUAL_FILE%.log' ) do set content="%%~T" +if !content! == X goto :skip +set /a count-=1 +if !count! EQU 0 goto :skip + +echo ---- +%LATEX_CMD% %MANUAL_FILE% +goto :repeat +:skip +endlocal +%MKIDX_CMD% %MANUAL_FILE%.idx +%LATEX_CMD% %MANUAL_FILE% + +@REM reset environment +popd +set LATEX_CMD=%ORG_LATEX_CMD% +set ORG_LATEX_CMD= +set MKIDX_CMD=%ORG_MKIDX_CMD% +set ORG_MKIDX_CMD= +set BIBTEX_CMD=%ORG_BIBTEX_CMD% +set ORG_BIBTEX_CMD= +set MANUAL_FILE=%ORG_MANUAL_FILE% +set ORG_MANUAL_FILE= +set LATEX_COUNT=%ORG_LATEX_COUNT% +set ORG_LATEX_COUNT= + +:end diff --git a/External/open-cpp-utils/Documentation/latex/md__r_e_a_d_m_e.tex b/External/open-cpp-utils/Documentation/latex/md__r_e_a_d_m_e.tex new file mode 100644 index 0000000..f46bc24 --- /dev/null +++ b/External/open-cpp-utils/Documentation/latex/md__r_e_a_d_m_e.tex @@ -0,0 +1,5 @@ +\chapter{open-\/cpp-\/utils} +\hypertarget{md__r_e_a_d_m_e}{}\label{md__r_e_a_d_m_e}\index{open-\/cpp-\/utils@{open-\/cpp-\/utils}} +\label{md__r_e_a_d_m_e_autotoc_md0}% +\Hypertarget{md__r_e_a_d_m_e_autotoc_md0}% +Open Source Utilities for C++ \ No newline at end of file diff --git a/External/open-cpp-utils/Documentation/latex/optional_8h_source.tex b/External/open-cpp-utils/Documentation/latex/optional_8h_source.tex new file mode 100644 index 0000000..b6be4e4 --- /dev/null +++ b/External/open-cpp-utils/Documentation/latex/optional_8h_source.tex @@ -0,0 +1,75 @@ +\doxysection{optional.\+h} +\hypertarget{optional_8h_source}{}\label{optional_8h_source} +\begin{DoxyCode}{0} +\DoxyCodeLine{00001\ \textcolor{comment}{//\ =====================================================================================================================}} +\DoxyCodeLine{00002\ \textcolor{comment}{//\ Copyright\ 2024\ Medusa\ Slockbower}} +\DoxyCodeLine{00003\ \textcolor{comment}{//\ Licensed\ under\ the\ Apache\ License,\ Version\ 2.0\ (the\ "{}License"{});}} +\DoxyCodeLine{00004\ \textcolor{comment}{//\ you\ may\ not\ use\ this\ file\ except\ in\ compliance\ with\ the\ License.}} +\DoxyCodeLine{00005\ \textcolor{comment}{//\ You\ may\ obtain\ a\ copy\ of\ the\ License\ at}} +\DoxyCodeLine{00006\ \textcolor{comment}{//}} +\DoxyCodeLine{00007\ \textcolor{comment}{//\ \ http://www.apache.org/licenses/LICENSE-\/2.0}} +\DoxyCodeLine{00008\ \textcolor{comment}{//}} +\DoxyCodeLine{00009\ \textcolor{comment}{//\ Unless\ required\ by\ applicable\ law\ or\ agreed\ to\ in\ writing,\ software}} +\DoxyCodeLine{00010\ \textcolor{comment}{//\ distributed\ under\ the\ License\ is\ distributed\ on\ an\ "{}AS\ IS"{}\ BASIS,}} +\DoxyCodeLine{00011\ \textcolor{comment}{//\ WITHOUT\ WARRANTIES\ OR\ CONDITIONS\ OF\ ANY\ KIND,\ either\ express\ or\ implied.}} +\DoxyCodeLine{00012\ \textcolor{comment}{//\ See\ the\ License\ for\ the\ specific\ language\ governing\ permissions\ and}} +\DoxyCodeLine{00013\ \textcolor{comment}{//\ limitations\ under\ the\ License.}} +\DoxyCodeLine{00014\ \textcolor{comment}{//\ =====================================================================================================================}} +\DoxyCodeLine{00015\ } +\DoxyCodeLine{00016\ \textcolor{preprocessor}{\#ifndef\ OPTIONAL\_H}} +\DoxyCodeLine{00017\ \textcolor{preprocessor}{\#define\ OPTIONAL\_H}} +\DoxyCodeLine{00018\ } +\DoxyCodeLine{00019\ \textcolor{keyword}{namespace\ }open\_cpp\_utils} +\DoxyCodeLine{00020\ \{} +\DoxyCodeLine{00021\ \ \ \ \ \textcolor{keyword}{template}<\textcolor{keyword}{typename}\ T>} +\DoxyCodeLine{00022\ \ \ \ \ \textcolor{keyword}{class\ }\mbox{\hyperlink{classopen__cpp__utils_1_1optional}{optional}}} +\DoxyCodeLine{00023\ \ \ \ \ \{} +\DoxyCodeLine{00024\ \ \ \ \ \textcolor{keyword}{public}:} +\DoxyCodeLine{00025\ \ \ \ \ \ \ \ \ \textcolor{keyword}{using\ }value\_type\ =\ T;} +\DoxyCodeLine{00026\ } +\DoxyCodeLine{00027\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{classopen__cpp__utils_1_1optional}{optional}}()\ :\ data\_(),\ valid\_(\textcolor{keyword}{false})\ \{\ \}} +\DoxyCodeLine{00028\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{classopen__cpp__utils_1_1optional}{optional}}(\textcolor{keyword}{const}\ value\_type\&\ data)\ :\ data\_(data),\ valid\_(\textcolor{keyword}{true})\ \{\ \}} +\DoxyCodeLine{00029\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{classopen__cpp__utils_1_1optional}{optional}}(value\_type\&\&\ data)\ :\ data\_(data),\ valid\_(\textcolor{keyword}{true})\ \{\ \}} +\DoxyCodeLine{00030\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{classopen__cpp__utils_1_1optional}{optional}}(\textcolor{keyword}{const}\ \mbox{\hyperlink{classopen__cpp__utils_1_1optional}{optional}}\&\ other)\ =\ \textcolor{keywordflow}{default};} +\DoxyCodeLine{00031\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{classopen__cpp__utils_1_1optional}{optional}}(\mbox{\hyperlink{classopen__cpp__utils_1_1optional}{optional}}\&\&\ other)\ =\ \textcolor{keywordflow}{default};} +\DoxyCodeLine{00032\ } +\DoxyCodeLine{00033\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{classopen__cpp__utils_1_1optional}{optional}}\&\ operator=(\textcolor{keyword}{const}\ \mbox{\hyperlink{classopen__cpp__utils_1_1optional}{optional}}\&\ other)\ =\ \textcolor{keywordflow}{default};} +\DoxyCodeLine{00034\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{classopen__cpp__utils_1_1optional}{optional}}\&\ operator=(\mbox{\hyperlink{classopen__cpp__utils_1_1optional}{optional}}\&\&\ other)\ =\ \textcolor{keywordflow}{default};} +\DoxyCodeLine{00035\ } +\DoxyCodeLine{00036\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{classopen__cpp__utils_1_1optional}{optional}}\&\ operator=(\textcolor{keyword}{const}\ value\_type\&\ data)\ \{\ data\_\ =\ data;\ valid\_\ =\ \textcolor{keyword}{true};\ \textcolor{keywordflow}{return}\ *\textcolor{keyword}{this};\ \}} +\DoxyCodeLine{00037\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{classopen__cpp__utils_1_1optional}{optional}}\&\ operator=(value\_type\&\&\ data)\ \{\ data\_\ =\ data;\ valid\_\ =\ \textcolor{keyword}{true};\ \textcolor{keywordflow}{return}\ *\textcolor{keyword}{this};\ \}} +\DoxyCodeLine{00038\ } +\DoxyCodeLine{00039\ \ \ \ \ \ \ \ \ value\_type\&\ operator+=(\textcolor{keyword}{const}\ value\_type\&\ data)\ \{\ assert(valid\_);\ data\_\ +=\ data;\ \textcolor{keywordflow}{return}\ data\_;\ \}} +\DoxyCodeLine{00040\ \ \ \ \ \ \ \ \ value\_type\&\ operator-\/=(\textcolor{keyword}{const}\ value\_type\&\ data)\ \{\ assert(valid\_);\ data\_\ +=\ data;\ \textcolor{keywordflow}{return}\ data\_;\ \}} +\DoxyCodeLine{00041\ \ \ \ \ \ \ \ \ value\_type\&\ operator*=(\textcolor{keyword}{const}\ value\_type\&\ data)\ \{\ assert(valid\_);\ data\_\ +=\ data;\ \textcolor{keywordflow}{return}\ data\_;\ \}} +\DoxyCodeLine{00042\ \ \ \ \ \ \ \ \ value\_type\&\ operator/=(\textcolor{keyword}{const}\ value\_type\&\ data)\ \{\ assert(valid\_);\ data\_\ +=\ data;\ \textcolor{keywordflow}{return}\ data\_;\ \}} +\DoxyCodeLine{00043\ \ \ \ \ \ \ \ \ value\_type\&\ operator\%=(\textcolor{keyword}{const}\ value\_type\&\ data)\ \{\ assert(valid\_);\ data\_\ +=\ data;\ \textcolor{keywordflow}{return}\ data\_;\ \}} +\DoxyCodeLine{00044\ } +\DoxyCodeLine{00045\ \ \ \ \ \ \ \ \ value\_type\&\ operator<<=(\textcolor{keyword}{const}\ value\_type\&\ data)\ \{\ assert(valid\_);\ data\_\ <<=\ data;\ \textcolor{keywordflow}{return}\ data\_;\ \}} +\DoxyCodeLine{00046\ \ \ \ \ \ \ \ \ value\_type\&\ operator>>=(\textcolor{keyword}{const}\ value\_type\&\ data)\ \{\ assert(valid\_);\ data\_\ >>=\ data;\ \textcolor{keywordflow}{return}\ data\_;\ \}} +\DoxyCodeLine{00047\ \ \ \ \ \ \ \ \ value\_type\&\ operator|=(\textcolor{keyword}{const}\ value\_type\&\ data)\ \ \{\ assert(valid\_);\ data\_\ |=\ data;\ \ \textcolor{keywordflow}{return}\ data\_;\ \}} +\DoxyCodeLine{00048\ \ \ \ \ \ \ \ \ value\_type\&\ operator\&=(\textcolor{keyword}{const}\ value\_type\&\ data)\ \ \{\ assert(valid\_);\ data\_\ \&=\ data;\ \ \textcolor{keywordflow}{return}\ data\_;\ \}} +\DoxyCodeLine{00049\ \ \ \ \ \ \ \ \ value\_type\&\ operator\string^=(\textcolor{keyword}{const}\ value\_type\&\ data)\ \ \{\ assert(valid\_);\ data\_\ \string^=\ data;\ \ \textcolor{keywordflow}{return}\ data\_;\ \}} +\DoxyCodeLine{00050\ } +\DoxyCodeLine{00051\ \ \ \ \ \ \ \ \ [[nodiscard]]\ \textcolor{keywordtype}{bool}\ operator()()\textcolor{keyword}{\ const\ }\{\ \textcolor{keywordflow}{return}\ valid\_;\ \}} +\DoxyCodeLine{00052\ } +\DoxyCodeLine{00053\ \ \ \ \ \ \ \ \ \textcolor{keyword}{operator}\ \ \ \ \ \ \ value\_type\&()\ \ \ \ \ \ \ \{\ assert(valid\_);\ \textcolor{keywordflow}{return}\ data\_;\ \}} +\DoxyCodeLine{00054\ \ \ \ \ \ \ \ \ \textcolor{keyword}{operator}\ \textcolor{keyword}{const}\ value\_type\&()\ \textcolor{keyword}{const}\ \{\ assert(valid\_);\ \textcolor{keywordflow}{return}\ data\_;\ \}} +\DoxyCodeLine{00055\ } +\DoxyCodeLine{00056\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ value\_type*\ operator-\/>()\ \ \ \ \ \ \ \{\ assert(valid\_);\ \textcolor{keywordflow}{return}\ \&data\_;\ \}} +\DoxyCodeLine{00057\ \ \ \ \ \ \ \ \ \textcolor{keyword}{const}\ value\_type*\ operator-\/>()\textcolor{keyword}{\ const\ }\{\ assert(valid\_);\ \textcolor{keywordflow}{return}\ \&data\_;\ \}} +\DoxyCodeLine{00058\ } +\DoxyCodeLine{00059\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ value\_type\&\ operator*()\ \ \ \ \ \ \ \ \{\ assert(valid\_);\ \textcolor{keywordflow}{return}\ data\_;\ \}} +\DoxyCodeLine{00060\ \ \ \ \ \ \ \ \ \textcolor{keyword}{const}\ value\_type\&\ operator*()\textcolor{keyword}{\ const\ \ }\{\ assert(valid\_);\ \textcolor{keywordflow}{return}\ data\_;\ \}} +\DoxyCodeLine{00061\ } +\DoxyCodeLine{00062\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{void}\ reset()\ \{\ valid\_\ =\ \textcolor{keyword}{false};\ \}} +\DoxyCodeLine{00063\ } +\DoxyCodeLine{00064\ \ \ \ \ \textcolor{keyword}{private}:} +\DoxyCodeLine{00065\ \ \ \ \ \ \ \ \ value\_type\ data\_;} +\DoxyCodeLine{00066\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{bool}\ valid\_;} +\DoxyCodeLine{00067\ \ \ \ \ \};} +\DoxyCodeLine{00068\ \}} +\DoxyCodeLine{00069\ } +\DoxyCodeLine{00070\ \textcolor{preprocessor}{\#endif\ }\textcolor{comment}{//OPTIONAL\_H}} + +\end{DoxyCode} diff --git a/External/open-cpp-utils/Documentation/latex/refman.tex b/External/open-cpp-utils/Documentation/latex/refman.tex new file mode 100644 index 0000000..28a9da8 --- /dev/null +++ b/External/open-cpp-utils/Documentation/latex/refman.tex @@ -0,0 +1,251 @@ + % Handle batch mode + % to overcome problems with too many open files + \let\mypdfximage\pdfximage\def\pdfximage{\immediate\mypdfximage} + \pdfminorversion=7 + % Set document class depending on configuration + \documentclass[twoside]{book} + %% moved from doxygen.sty due to workaround for LaTex 2019 version and unmaintained tabu package + \usepackage{ifthen} + \ifx\requestedLaTeXdate\undefined + \usepackage{array} + \else + \usepackage{array}[=2016-10-06] + \fi + %% + % Packages required by doxygen + \makeatletter + \providecommand\IfFormatAtLeastTF{\@ifl@t@r\fmtversion} + % suppress package identification of infwarerr as it contains the word "warning" + \let\@@protected@wlog\protected@wlog + \def\protected@wlog#1{\wlog{package info suppressed}} + \RequirePackage{infwarerr} + \let\protected@wlog\@@protected@wlog + \makeatother + \IfFormatAtLeastTF{2016/01/01}{}{\usepackage{fixltx2e}} % for \textsubscript + \IfFormatAtLeastTF{2015/01/01}{\pdfsuppresswarningpagegroup=1}{} + \usepackage{doxygen} + \usepackage{graphicx} + \usepackage[utf8]{inputenc} + \usepackage{makeidx} + \PassOptionsToPackage{warn}{textcomp} + \usepackage{textcomp} + \usepackage[nointegrals]{wasysym} + \usepackage{ifxetex} + % NLS support packages + % Define default fonts + % Font selection + \usepackage[T1]{fontenc} + % set main and monospaced font + \usepackage[scaled=.90]{helvet} +\usepackage{courier} +\renewcommand{\familydefault}{\sfdefault} + \doxyallsectionsfont{% + \fontseries{bc}\selectfont% + \color{darkgray}% + } + \renewcommand{\DoxyLabelFont}{% + \fontseries{bc}\selectfont% + \color{darkgray}% + } + \newcommand{\+}{\discretionary{\mbox{\scriptsize$\hookleftarrow$}}{}{}} + % Arguments of doxygenemoji: + % 1) '::' form of the emoji, already LaTeX-escaped + % 2) file with the name of the emoji without the .png extension + % in case image exist use this otherwise use the '::' form + \newcommand{\doxygenemoji}[2]{% + \IfFileExists{./#2.png}{\raisebox{-0.1em}{\includegraphics[height=0.9em]{./#2.png}}}{#1}% + } + % Page & text layout + \usepackage{geometry} + \geometry{% + a4paper,% + top=2.5cm,% + bottom=2.5cm,% + left=2.5cm,% + right=2.5cm% + } + \usepackage{changepage} + % Allow a bit of overflow to go unnoticed by other means + \tolerance=750 + \hfuzz=15pt + \hbadness=750 + \setlength{\emergencystretch}{15pt} + \setlength{\parindent}{0cm} + \newcommand{\doxynormalparskip}{\setlength{\parskip}{3ex plus 2ex minus 2ex}} + \newcommand{\doxytocparskip}{\setlength{\parskip}{1ex plus 0ex minus 0ex}} + \doxynormalparskip + % Redefine paragraph/subparagraph environments, using sectsty fonts + \makeatletter + \renewcommand{\paragraph}{% + \@startsection{paragraph}{4}{0ex}{-1.0ex}{1.0ex}{% + \normalfont\normalsize\bfseries\SS@parafont% + }% + } + \renewcommand{\subparagraph}{% + \@startsection{subparagraph}{5}{0ex}{-1.0ex}{1.0ex}{% + \normalfont\normalsize\bfseries\SS@subparafont% + }% + } + \makeatother + \makeatletter + \newcommand\hrulefilll{\leavevmode\leaders\hrule\hskip 0pt plus 1filll\kern\z@} + \makeatother + % Headers & footers + \usepackage{fancyhdr} + \pagestyle{fancyplain} + \renewcommand{\footrulewidth}{0.4pt} + \fancypagestyle{fancyplain}{ + \fancyhf{} + \fancyhead[LE, RO]{\bfseries\thepage} + \fancyhead[LO]{\bfseries\rightmark} + \fancyhead[RE]{\bfseries\leftmark} + \fancyfoot[LO, RE]{\bfseries\scriptsize Generated by Doxygen } + } + \fancypagestyle{plain}{ + \fancyhf{} + \fancyfoot[LO, RE]{\bfseries\scriptsize Generated by Doxygen } + \renewcommand{\headrulewidth}{0pt} + } + \pagestyle{fancyplain} + \renewcommand{\chaptermark}[1]{% + \markboth{#1}{}% + } + \renewcommand{\sectionmark}[1]{% + \markright{\thesection\ #1}% + } + % ToC, LoF, LoT, bibliography, and index + % Indices & bibliography + \usepackage{natbib} + \usepackage[titles]{tocloft} + \setcounter{tocdepth}{3} + \setcounter{secnumdepth}{5} + % creating indexes + \makeindex + \usepackage{newunicodechar} + \makeatletter + \def\doxynewunicodechar#1#2{% + \@tempswafalse + \edef\nuc@tempa{\detokenize{#1}}% + \if\relax\nuc@tempa\relax + \nuc@emptyargerr + \else + \edef\@tempb{\expandafter\@car\nuc@tempa\@nil}% + \nuc@check + \if@tempswa + \@namedef{u8:\nuc@tempa}{#2}% + \fi + \fi + } + \makeatother + \doxynewunicodechar{⁻}{${}^{-}$}% Superscript minus + \doxynewunicodechar{²}{${}^{2}$}% Superscript two + \doxynewunicodechar{³}{${}^{3}$}% Superscript three + % Hyperlinks + % Hyperlinks (required, but should be loaded last) + \ifpdf + \usepackage[pdftex,pagebackref=true]{hyperref} + \else + \ifxetex + \usepackage[pagebackref=true]{hyperref} + \else + \usepackage[ps2pdf,pagebackref=true]{hyperref} + \fi + \fi + \hypersetup{% + colorlinks=true,% + linkcolor=blue,% + citecolor=blue,% + unicode,% + pdftitle={open-\/cpp-\/utils},% + pdfsubject={}% + } + % Custom commands used by the header + % Custom commands + \newcommand{\clearemptydoublepage}{% + \newpage{\pagestyle{empty}\cleardoublepage}% + } + % caption style definition + \usepackage{caption} + \captionsetup{labelsep=space,justification=centering,font={bf},singlelinecheck=off,skip=4pt,position=top} + % in page table of contents + \IfFormatAtLeastTF{2023/05/01}{\usepackage[deeplevels]{etoc}}{\usepackage[deeplevels]{etoc_doxygen}} + \etocsettocstyle{\doxytocparskip}{\doxynormalparskip} + \etocsetlevel{subsubsubsection}{4} + \etocsetlevel{subsubsubsubsection}{5} + \etocsetlevel{subsubsubsubsubsection}{6} + \etocsetlevel{subsubsubsubsubsubsection}{7} + \etocsetlevel{paragraph}{8} + \etocsetlevel{subparagraph}{9} + % prevent numbers overlap the titles in toc + \renewcommand{\numberline}[1]{#1~} +% End of preamble, now comes the document contents +%===== C O N T E N T S ===== +\begin{document} + \raggedbottom + % Titlepage & ToC + % To avoid duplicate page anchors due to reuse of same numbers for + % the index (be it as roman numbers) + \hypersetup{pageanchor=false, + bookmarksnumbered=true, + pdfencoding=unicode + } + \pagenumbering{alph} + \begin{titlepage} + \vspace*{7cm} + \begin{center}% + {\Large open-\/cpp-\/utils}\\ + [1ex]\large 0.\+0.\+1 \\ + \vspace*{1cm} + {\large Generated by Doxygen 1.10.0}\\ + \end{center} + \end{titlepage} + \clearemptydoublepage + \pagenumbering{roman} + \tableofcontents + \clearemptydoublepage + \pagenumbering{arabic} + % re-enable anchors again + \hypersetup{pageanchor=true} +%--- Begin generated contents --- +\input{md__r_e_a_d_m_e} +\chapter{Hierarchical Index} +\input{hierarchy} +\chapter{Class Index} +\input{annotated} +\chapter{File Index} +\input{files} +\chapter{Class Documentation} +\input{classopen__cpp__utils_1_1any} +\input{classopen__cpp__utils_1_1any_3_01_t_00_01_rest_8_8_8_01_4} +\input{classopen__cpp__utils_1_1any_3_4} +\input{classopen__cpp__utils_1_1directed__tree_1_1breadth__first} +\input{structopen__cpp__utils_1_1constant__value} +\input{classopen__cpp__utils_1_1directed__tree} +\input{classopen__cpp__utils_1_1dyn__array} +\input{structopen__cpp__utils_1_1fixed__array} +\input{structopen__cpp__utils_1_1fixed__array_3_01_t_00_01_n_01_4} +\input{classopen__cpp__utils_1_1directed__tree_1_1in__order} +\input{classopen__cpp__utils_1_1optional} +\input{classopen__cpp__utils_1_1directed__tree_1_1post__order} +\input{classopen__cpp__utils_1_1directed__tree_1_1pre__order} +\input{classopen__cpp__utils_1_1directed__tree_1_1traverser} +\chapter{File Documentation} +\input{any_8h_source} +\input{array_8h_source} +\input{directed__tree_8h_source} +\input{optional_8h_source} +\input{startup_8h_source} +\input{template__utils_8h} +\input{template__utils_8h_source} +\input{types_8h_source} +\input{unique__id_8h_source} +%--- End generated contents --- +% Index + \backmatter + \newpage + \phantomsection + \clearemptydoublepage + \addcontentsline{toc}{chapter}{\indexname} + \printindex +% Required for some languages (in combination with latexdocumentpre from the header) +\end{document} diff --git a/External/open-cpp-utils/Documentation/latex/startup_8h_source.tex b/External/open-cpp-utils/Documentation/latex/startup_8h_source.tex new file mode 100644 index 0000000..98ee816 --- /dev/null +++ b/External/open-cpp-utils/Documentation/latex/startup_8h_source.tex @@ -0,0 +1,47 @@ +\doxysection{startup.\+h} +\hypertarget{startup_8h_source}{}\label{startup_8h_source} +\begin{DoxyCode}{0} +\DoxyCodeLine{00001\ \textcolor{comment}{//\ =====================================================================================================================}} +\DoxyCodeLine{00002\ \textcolor{comment}{//\ Copyright\ 2024\ Medusa\ Slockbower}} +\DoxyCodeLine{00003\ \textcolor{comment}{//\ Licensed\ under\ the\ Apache\ License,\ Version\ 2.0\ (the\ "{}License"{});}} +\DoxyCodeLine{00004\ \textcolor{comment}{//\ you\ may\ not\ use\ this\ file\ except\ in\ compliance\ with\ the\ License.}} +\DoxyCodeLine{00005\ \textcolor{comment}{//\ You\ may\ obtain\ a\ copy\ of\ the\ License\ at}} +\DoxyCodeLine{00006\ \textcolor{comment}{//}} +\DoxyCodeLine{00007\ \textcolor{comment}{//\ \ http://www.apache.org/licenses/LICENSE-\/2.0}} +\DoxyCodeLine{00008\ \textcolor{comment}{//}} +\DoxyCodeLine{00009\ \textcolor{comment}{//\ Unless\ required\ by\ applicable\ law\ or\ agreed\ to\ in\ writing,\ software}} +\DoxyCodeLine{00010\ \textcolor{comment}{//\ distributed\ under\ the\ License\ is\ distributed\ on\ an\ "{}AS\ IS"{}\ BASIS,}} +\DoxyCodeLine{00011\ \textcolor{comment}{//\ WITHOUT\ WARRANTIES\ OR\ CONDITIONS\ OF\ ANY\ KIND,\ either\ express\ or\ implied.}} +\DoxyCodeLine{00012\ \textcolor{comment}{//\ See\ the\ License\ for\ the\ specific\ language\ governing\ permissions\ and}} +\DoxyCodeLine{00013\ \textcolor{comment}{//\ limitations\ under\ the\ License.}} +\DoxyCodeLine{00014\ \textcolor{comment}{//\ =====================================================================================================================}} +\DoxyCodeLine{00015\ } +\DoxyCodeLine{00016\ \textcolor{preprocessor}{\#ifndef\ STARTUP\_H}} +\DoxyCodeLine{00017\ \textcolor{preprocessor}{\#define\ STARTUP\_H}} +\DoxyCodeLine{00018\ } +\DoxyCodeLine{00019\ \textcolor{preprocessor}{\#ifdef\ \_\_cplusplus}} +\DoxyCodeLine{00020\ \textcolor{preprocessor}{\#define\ STARTUP(f)\ \(\backslash\)}} +\DoxyCodeLine{00021\ \textcolor{preprocessor}{\ \ \ \ \ \ \ \ static\ void\ f(void);\ \(\backslash\)}} +\DoxyCodeLine{00022\ \textcolor{preprocessor}{\ \ \ \ \ \ \ \ struct\ f\#\#\_t\_\ \{\ f\#\#\_t\_(void)\ \{\ f();\ \}\ \};\ inline\ static\ f\#\#\_t\_\ f\#\#\_;\ \(\backslash\)}} +\DoxyCodeLine{00023\ \textcolor{preprocessor}{\ \ \ \ \ \ \ \ static\ void\ f(void)}} +\DoxyCodeLine{00024\ \textcolor{preprocessor}{\#elif\ defined(\_MSC\_VER)}} +\DoxyCodeLine{00025\ \textcolor{preprocessor}{\#pragma\ section("{}.CRT\$XCU"{},read)}} +\DoxyCodeLine{00026\ \textcolor{preprocessor}{\ \ \ \ \#define\ INITIALIZER2\_(f,p)\ \(\backslash\)}} +\DoxyCodeLine{00027\ \textcolor{preprocessor}{\ \ \ \ \ \ \ \ static\ void\ f(void);\ \(\backslash\)}} +\DoxyCodeLine{00028\ \textcolor{preprocessor}{\ \ \ \ \ \ \ \ \_\_declspec(allocate("{}.CRT\$XCU"{}))\ void\ (*f\#\#\_)(void)\ =\ f;\ \(\backslash\)}} +\DoxyCodeLine{00029\ \textcolor{preprocessor}{\ \ \ \ \ \ \ \ \_\_pragma(comment(linker,"{}/include:"{}\ p\ \#f\ "{}\_"{}))\ \(\backslash\)}} +\DoxyCodeLine{00030\ \textcolor{preprocessor}{\ \ \ \ \ \ \ \ static\ void\ f(void)}} +\DoxyCodeLine{00031\ \textcolor{preprocessor}{\ \ \ \ \#ifdef\ \_WIN64}} +\DoxyCodeLine{00032\ \textcolor{preprocessor}{\ \ \ \ \ \ \ \ \#define\ STARTUP(f)\ INITIALIZER2\_(f,"{}"{})}} +\DoxyCodeLine{00033\ \textcolor{preprocessor}{\ \ \ \ \#else}} +\DoxyCodeLine{00034\ \textcolor{preprocessor}{\ \ \ \ \ \ \ \ \#define\ STARTUP(f)\ INITIALIZER2\_(f,"{}\_"{})}} +\DoxyCodeLine{00035\ \textcolor{preprocessor}{\ \ \ \ \#endif}} +\DoxyCodeLine{00036\ \textcolor{preprocessor}{\#else}} +\DoxyCodeLine{00037\ \textcolor{preprocessor}{\ \ \ \ \#define\ STARTUP(f)\ \(\backslash\)}} +\DoxyCodeLine{00038\ \textcolor{preprocessor}{\ \ \ \ \ \ \ \ static\ void\ f(void)\ \_\_attribute\_\_((constructor));\ \(\backslash\)}} +\DoxyCodeLine{00039\ \textcolor{preprocessor}{\ \ \ \ \ \ \ \ static\ void\ f(void)}} +\DoxyCodeLine{00040\ \textcolor{preprocessor}{\#endif}} +\DoxyCodeLine{00041\ } +\DoxyCodeLine{00042\ \textcolor{preprocessor}{\#endif\ }\textcolor{comment}{//STARTUP\_H}} + +\end{DoxyCode} diff --git a/External/open-cpp-utils/Documentation/latex/structopen__cpp__utils_1_1constant__value.tex b/External/open-cpp-utils/Documentation/latex/structopen__cpp__utils_1_1constant__value.tex new file mode 100644 index 0000000..2d0c2e5 --- /dev/null +++ b/External/open-cpp-utils/Documentation/latex/structopen__cpp__utils_1_1constant__value.tex @@ -0,0 +1,51 @@ +\doxysection{open\+\_\+cpp\+\_\+utils\+::constant\+\_\+value\texorpdfstring{$<$}{<} T, V \texorpdfstring{$>$}{>} Struct Template Reference} +\hypertarget{structopen__cpp__utils_1_1constant__value}{}\label{structopen__cpp__utils_1_1constant__value}\index{open\_cpp\_utils::constant\_value$<$ T, V $>$@{open\_cpp\_utils::constant\_value$<$ T, V $>$}} + + +Compile-\/time constant value. + + + + +{\ttfamily \#include $<$template\+\_\+utils.\+h$>$} + +\doxysubsubsection*{Public Types} +\begin{DoxyCompactItemize} +\item +\Hypertarget{structopen__cpp__utils_1_1constant__value_adfcfb4faa53472e6c9fdb3292c52fdf2}\label{structopen__cpp__utils_1_1constant__value_adfcfb4faa53472e6c9fdb3292c52fdf2} +using {\bfseries type} = T +\end{DoxyCompactItemize} +\doxysubsubsection*{Public Member Functions} +\begin{DoxyCompactItemize} +\item +\Hypertarget{structopen__cpp__utils_1_1constant__value_a6f5df2c74dc82c0f3dedb109a75e28a2}\label{structopen__cpp__utils_1_1constant__value_a6f5df2c74dc82c0f3dedb109a75e28a2} +constexpr {\bfseries operator type} () const noexcept +\item +\Hypertarget{structopen__cpp__utils_1_1constant__value_a8b476ce55745600c7a26ec2725c56234}\label{structopen__cpp__utils_1_1constant__value_a8b476ce55745600c7a26ec2725c56234} +constexpr type {\bfseries operator()} () const +\end{DoxyCompactItemize} +\doxysubsubsection*{Static Public Attributes} +\begin{DoxyCompactItemize} +\item +\Hypertarget{structopen__cpp__utils_1_1constant__value_ac86ea147e5e61b830eff2a5873456358}\label{structopen__cpp__utils_1_1constant__value_ac86ea147e5e61b830eff2a5873456358} +static constexpr type {\bfseries value} = V +\end{DoxyCompactItemize} + + +\doxysubsection{Detailed Description} +\subsubsection*{template$<$typename T, T V$>$\newline +struct open\+\_\+cpp\+\_\+utils\+::constant\+\_\+value$<$ T, V $>$} +Compile-\/time constant value. + + +\begin{DoxyTemplParams}{Template Parameters} +{\em T} & Type \\ +\hline +{\em V} & Value \\ +\hline +\end{DoxyTemplParams} + + +The documentation for this struct was generated from the following file\+:\begin{DoxyCompactItemize} +\item +\mbox{\hyperlink{template__utils_8h}{template\+\_\+utils.\+h}}\end{DoxyCompactItemize} diff --git a/External/open-cpp-utils/Documentation/latex/structopen__cpp__utils_1_1fixed__array.tex b/External/open-cpp-utils/Documentation/latex/structopen__cpp__utils_1_1fixed__array.tex new file mode 100644 index 0000000..eae56c3 --- /dev/null +++ b/External/open-cpp-utils/Documentation/latex/structopen__cpp__utils_1_1fixed__array.tex @@ -0,0 +1,7 @@ +\doxysection{open\+\_\+cpp\+\_\+utils\+::fixed\+\_\+array\texorpdfstring{$<$}{<} T, N \texorpdfstring{$>$}{>} Struct Template Reference} +\hypertarget{structopen__cpp__utils_1_1fixed__array}{}\label{structopen__cpp__utils_1_1fixed__array}\index{open\_cpp\_utils::fixed\_array$<$ T, N $>$@{open\_cpp\_utils::fixed\_array$<$ T, N $>$}} + + +The documentation for this struct was generated from the following file\+:\begin{DoxyCompactItemize} +\item +array.\+h\end{DoxyCompactItemize} diff --git a/External/open-cpp-utils/Documentation/latex/structopen__cpp__utils_1_1fixed__array_3_01_t_00_01_n_01_4.tex b/External/open-cpp-utils/Documentation/latex/structopen__cpp__utils_1_1fixed__array_3_01_t_00_01_n_01_4.tex new file mode 100644 index 0000000..bab90c1 --- /dev/null +++ b/External/open-cpp-utils/Documentation/latex/structopen__cpp__utils_1_1fixed__array_3_01_t_00_01_n_01_4.tex @@ -0,0 +1,54 @@ +\doxysection{open\+\_\+cpp\+\_\+utils\+::fixed\+\_\+array\texorpdfstring{$<$}{<} T, N \texorpdfstring{$>$}{>} Struct Template Reference} +\hypertarget{structopen__cpp__utils_1_1fixed__array_3_01_t_00_01_n_01_4}{}\label{structopen__cpp__utils_1_1fixed__array_3_01_t_00_01_n_01_4}\index{open\_cpp\_utils::fixed\_array$<$ T, N $>$@{open\_cpp\_utils::fixed\_array$<$ T, N $>$}} + + +Wrapper for array of type T with fixed length N. + + + + +{\ttfamily \#include $<$array.\+h$>$} + +\doxysubsubsection*{Public Types} +\begin{DoxyCompactItemize} +\item +\Hypertarget{structopen__cpp__utils_1_1fixed__array_3_01_t_00_01_n_01_4_a2f42e8b0a732f947afc672bbf39e4c6e}\label{structopen__cpp__utils_1_1fixed__array_3_01_t_00_01_n_01_4_a2f42e8b0a732f947afc672bbf39e4c6e} +using {\bfseries value\+\_\+type} = T +\item +\Hypertarget{structopen__cpp__utils_1_1fixed__array_3_01_t_00_01_n_01_4_a3932a5e4c18e1c446cee2c24c09ef3b7}\label{structopen__cpp__utils_1_1fixed__array_3_01_t_00_01_n_01_4_a3932a5e4c18e1c446cee2c24c09ef3b7} +using {\bfseries array\+\_\+type} = value\+\_\+type\mbox{[}N\mbox{]} +\item +\Hypertarget{structopen__cpp__utils_1_1fixed__array_3_01_t_00_01_n_01_4_a059d896ea6cc257928c586207a04be41}\label{structopen__cpp__utils_1_1fixed__array_3_01_t_00_01_n_01_4_a059d896ea6cc257928c586207a04be41} +using {\bfseries size\+\_\+type} = size\+\_\+t +\end{DoxyCompactItemize} +\doxysubsubsection*{Public Member Functions} +\begin{DoxyCompactItemize} +\item +\Hypertarget{structopen__cpp__utils_1_1fixed__array_3_01_t_00_01_n_01_4_a2c0a3f22c0370117943c5bf02708e8d0}\label{structopen__cpp__utils_1_1fixed__array_3_01_t_00_01_n_01_4_a2c0a3f22c0370117943c5bf02708e8d0} +constexpr {\bfseries fixed\+\_\+array} (const \mbox{\hyperlink{structopen__cpp__utils_1_1fixed__array}{fixed\+\_\+array}} \&\mbox{\hyperlink{structopen__cpp__utils_1_1fixed__array_3_01_t_00_01_n_01_4}{array}}) +\item +\Hypertarget{structopen__cpp__utils_1_1fixed__array_3_01_t_00_01_n_01_4_a2ee9a0eebe6caf29095d0761938ad295}\label{structopen__cpp__utils_1_1fixed__array_3_01_t_00_01_n_01_4_a2ee9a0eebe6caf29095d0761938ad295} +constexpr {\bfseries fixed\+\_\+array} (const array\+\_\+type \&data) +\item +\Hypertarget{structopen__cpp__utils_1_1fixed__array_3_01_t_00_01_n_01_4_aec3f804e8d24e80a8c59adeedb853443}\label{structopen__cpp__utils_1_1fixed__array_3_01_t_00_01_n_01_4_aec3f804e8d24e80a8c59adeedb853443} +constexpr size\+\_\+type {\bfseries size} () +\end{DoxyCompactItemize} + + +\doxysubsection{Detailed Description} +\subsubsection*{template$<$typename T, size\+\_\+t N$>$\newline +struct open\+\_\+cpp\+\_\+utils\+::fixed\+\_\+array$<$ T, N $>$} +Wrapper for array of type T with fixed length N. + + +\begin{DoxyTemplParams}{Template Parameters} +{\em T} & \\ +\hline +{\em N} & \\ +\hline +\end{DoxyTemplParams} + + +The documentation for this struct was generated from the following file\+:\begin{DoxyCompactItemize} +\item +array.\+h\end{DoxyCompactItemize} diff --git a/External/open-cpp-utils/Documentation/latex/tabu_doxygen.sty b/External/open-cpp-utils/Documentation/latex/tabu_doxygen.sty new file mode 100644 index 0000000..3f17d1d --- /dev/null +++ b/External/open-cpp-utils/Documentation/latex/tabu_doxygen.sty @@ -0,0 +1,2557 @@ +%% +%% This is file `tabu.sty', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% tabu.dtx (with options: `package') +%% +%% This is a generated file. +%% Copyright (FC) 2010-2011 - lppl +%% +%% tabu : 2011/02/26 v2.8 - tabu : Flexible LaTeX tabulars +%% +%% ********************************************************************************************** +%% \begin{tabu} { preamble } => default target: \linewidth or \linegoal +%% \begin{tabu} to { preamble } => target specified +%% \begin{tabu} spread { preamble } => target relative to the ``natural width'' +%% +%% tabu works in text and in math modes. +%% +%% X columns: automatic width adjustment + horizontal and vertical alignment +%% \begin{tabu} { X[4c] X[1c] X[-2ml] } +%% +%% Horizontal lines and / or leaders: +%% \hline\hline => double horizontal line +%% \firsthline\hline => for nested tabulars +%% \lasthline\hline => for nested tabulars +%% \tabucline[line spec]{column-column} => ``funny'' lines (dash/leader) +%% Automatic lines / leaders : +%% \everyrow{\hline\hline} +%% +%% Vertical lines and / or leaders: +%% \begin{tabu} { |[3pt red] X[4c] X[1c] X[-2ml] |[3pt blue] } +%% \begin{tabu} { |[3pt red] X[4c] X[1c] X[-2ml] |[3pt on 2pt off 4pt blue] } +%% +%% Fixed vertical spacing adjustment: +%% \extrarowheight= \extrarowdepth= +%% or: \extrarowsep= => may be prefixed by \global +%% +%% Dynamic vertical spacing adjustment: +%% \abovetabulinesep= \belowtabulinesep= +%% or: \tabulinesep= => may be prefixed by \global +%% +%% delarray.sty shortcuts: in math and text modes +%% \begin{tabu} .... \({ preamble }\) +%% +%% Algorithms reports: +%% \tracingtabu=1 \tracingtabu=2 +%% +%% ********************************************************************************************** +%% +%% This work may be distributed and/or modified under the +%% conditions of the LaTeX Project Public License, either +%% version 1.3 of this license or (at your option) any later +%% version. The latest version of this license is in +%% http://www.latex-project.org/lppl.txt +%% +%% This work consists of the main source file tabu.dtx +%% and the derived files +%% tabu.sty, tabu.pdf, tabu.ins +%% +%% tabu : Flexible LaTeX tabulars +%% lppl copyright 2010-2011 by FC +%% + +\NeedsTeXFormat{LaTeX2e}[2005/12/01] +\ProvidesPackage{tabu_doxygen}[2011/02/26 v2.8 - flexible LaTeX tabulars (FC), frozen version for doxygen] +\RequirePackage{array}[2008/09/09] +\RequirePackage{varwidth}[2009/03/30] +\AtEndOfPackage{\tabu@AtEnd \let\tabu@AtEnd \@undefined} +\let\tabu@AtEnd\@empty +\def\TMP@EnsureCode#1={% + \edef\tabu@AtEnd{\tabu@AtEnd + \catcode#1 \the\catcode#1}% + \catcode#1=% +}% \TMP@EnsureCode +\TMP@EnsureCode 33 = 12 % ! +\TMP@EnsureCode 58 = 12 % : (for siunitx) +\TMP@EnsureCode124 = 12 % | +\TMP@EnsureCode 36 = 3 % $ = math shift +\TMP@EnsureCode 38 = 4 % & = tab alignment character +\TMP@EnsureCode 32 = 10 % space +\TMP@EnsureCode 94 = 7 % ^ +\TMP@EnsureCode 95 = 8 % _ +%% Constants -------------------------------------------------------- +\newcount \c@taburow \def\thetaburow {\number\c@taburow} +\newcount \tabu@nbcols +\newcount \tabu@cnt +\newcount \tabu@Xcol +\let\tabu@start \@tempcnta +\let\tabu@stop \@tempcntb +\newcount \tabu@alloc \tabu@alloc=\m@ne +\newcount \tabu@nested +\def\tabu@alloc@{\global\advance\tabu@alloc \@ne \tabu@nested\tabu@alloc} +\newdimen \tabu@target +\newdimen \tabu@spreadtarget +\newdimen \tabu@naturalX +\newdimen \tabucolX +\let\tabu@DELTA \@tempdimc +\let\tabu@thick \@tempdima +\let\tabu@on \@tempdimb +\let\tabu@off \@tempdimc +\newdimen \tabu@Xsum +\newdimen \extrarowdepth +\newdimen \abovetabulinesep +\newdimen \belowtabulinesep +\newdimen \tabustrutrule \tabustrutrule \z@ +\newtoks \tabu@thebody +\newtoks \tabu@footnotes +\newsavebox \tabu@box +\newsavebox \tabu@arstrutbox +\newsavebox \tabu@hleads +\newsavebox \tabu@vleads +\newif \iftabu@colortbl +\newif \iftabu@siunitx +\newif \iftabu@measuring +\newif \iftabu@spread +\newif \iftabu@negcoef +\newif \iftabu@everyrow +\def\tabu@everyrowtrue {\global\let\iftabu@everyrow \iftrue} +\def\tabu@everyrowfalse{\global\let\iftabu@everyrow \iffalse} +\newif \iftabu@long +\newif \iftabuscantokens +\def\tabu@rescan {\tabu@verbatim \scantokens } +%% Utilities (for internal usage) ----------------------------------- +\def\tabu@gobblespace #1 {#1} +\def\tabu@gobbletoken #1#2{#1} +\def\tabu@gobbleX{\futurelet\@let@token \tabu@gobblex} +\def\tabu@gobblex{\if ^^J\noexpand\@let@token \expandafter\@gobble + \else\ifx \@sptoken\@let@token + \expandafter\tabu@gobblespace\expandafter\tabu@gobbleX + \fi\fi +}% \tabu@gobblex +\def\tabu@X{^^J} +{\obeyspaces +\global\let\tabu@spxiii= % saves an active space (for \ifx) +\gdef\tabu@@spxiii{ }} +\def\tabu@ifenvir {% only for \multicolumn + \expandafter\tabu@if@nvir\csname\@currenvir\endcsname +}% \tabu@ifenvir +\def\tabu@if@nvir #1{\csname @\ifx\tabu#1first\else + \ifx\longtabu#1first\else + second\fi\fi oftwo\endcsname +}% \tabu@ifenvir +\def\tabu@modulo #1#2{\numexpr\ifnum\numexpr#1=\z@ 0\else #1-(#1-(#2-1)/2)/(#2)*(#2)\fi} +{\catcode`\&=3 +\gdef\tabu@strtrim #1{% #1 = control sequence to trim + \ifodd 1\ifx #1\@empty \else \ifx #1\space \else 0\fi \fi + \let\tabu@c@l@r \@empty \let#1\@empty + \else \expandafter \tabu@trimspaces #1\@nnil + \fi +}% \tabu@strtrim +\gdef\tabu@trimspaces #1\@nnil{\let\tabu@c@l@r=#2\tabu@firstspace .#1& }% +\gdef\tabu@firstspace #1#2#3 &{\tabu@lastspace #2#3&} +\gdef\tabu@lastspace #1{\def #3{#1}% + \ifx #3\tabu@c@l@r \def\tabu@c@l@r{\protect\color{#1}}\expandafter\remove@to@nnil \fi + \tabu@trimspaces #1\@nnil} +}% \catcode +\def\tabu@sanitizearg #1#2{{% + \csname \ifcsname if@safe@actives\endcsname % + @safe@activestrue\else + relax\fi \endcsname + \edef#2{#1}\tabu@strtrim#2\@onelevel@sanitize#2% + \expandafter}\expandafter\def\expandafter#2\expandafter{#2}% +}% \tabu@sanitizearg +\def\tabu@textbar #1{\begingroup \endlinechar\m@ne \scantokens{\def\:{|}}% + \expandafter\endgroup \expandafter#1\:% !!! semi simple group !!! +}% \tabu@textbar +\def\tabu@everyrow@bgroup{\iftabu@everyrow \begingroup \else \noalign{\ifnum0=`}\fi \fi} +\def\tabu@everyrow@egroup{% + \iftabu@everyrow \expandafter \endgroup \the\toks@ + \else \ifnum0=`{\fi}% + \fi +}% \tabu@everyrow@egroup +\def\tabu@arstrut {\global\setbox\@arstrutbox \hbox{\vrule + height \arraystretch \dimexpr\ht\strutbox+\extrarowheight + depth \arraystretch \dimexpr\dp\strutbox+\extrarowdepth + width \z@}% +}% \tabu@arstrut +\def\tabu@rearstrut {% + \@tempdima \arraystretch\dimexpr\ht\strutbox+\extrarowheight \relax + \@tempdimb \arraystretch\dimexpr\dp\strutbox+\extrarowdepth \relax + \ifodd 1\ifdim \ht\@arstrutbox=\@tempdima + \ifdim \dp\@arstrutbox=\@tempdimb 0 \fi\fi + \tabu@mkarstrut + \fi +}% \tabu@rearstrut +\def\tabu@@DBG #1{\ifdim\tabustrutrule>\z@ \color{#1}\fi} +\def\tabu@DBG@arstrut {\global\setbox\@arstrutbox + \hbox to\z@{\hbox to\z@{\hss + {\tabu@DBG{cyan}\vrule + height \arraystretch \dimexpr\ht\strutbox+\extrarowheight + depth \z@ + width \tabustrutrule}\kern-\tabustrutrule + {\tabu@DBG{pink}\vrule + height \z@ + depth \arraystretch \dimexpr\dp\strutbox+\extrarowdepth + width \tabustrutrule}}}% +}% \tabu@DBG@arstrut +\def\tabu@save@decl{\toks\count@ \expandafter{\the\toks\expandafter\count@ + \@nextchar}}% +\def\tabu@savedecl{\ifcat$\d@llarend\else + \let\save@decl \tabu@save@decl \fi % no inversion of tokens in text mode +}% \tabu@savedecl +\def\tabu@finalstrut #1{\unskip\ifhmode\nobreak\fi\vrule height\z@ depth\z@ width\z@} +\newcommand*\tabuDisableCommands {\g@addto@macro\tabu@trialh@@k } +\let\tabu@trialh@@k \@empty +\def\tabu@nowrite #1#{{\afterassignment}\toks@} +\let\tabu@write\write +\let\tabu@immediate\immediate +\def\tabu@WRITE{\begingroup + \def\immediate\write{\aftergroup\endgroup + \tabu@immediate\tabu@write}% +}% \tabu@WRITE +\expandafter\def\expandafter\tabu@GenericError\expandafter{% + \expandafter\tabu@WRITE\GenericError} +\def\tabu@warn{\tabu@WRITE\PackageWarning{tabu}} +\def\tabu@noxfootnote [#1]{\@gobble} +\def\tabu@nocolor #1#{\@gobble} +\newcommand*\tabu@norowcolor[2][]{} +\def\tabu@maybesiunitx #1{\def\tabu@temp{#1}% + \futurelet\@let@token \tabu@m@ybesiunitx} +\def\tabu@m@ybesiunitx #1{\def\tabu@m@ybesiunitx {% + \ifx #1\@let@token \let\tabu@cellleft \@empty \let\tabu@cellright \@empty \fi + \tabu@temp}% \tabu@m@ybesiunitx +}\expandafter\tabu@m@ybesiunitx \csname siunitx_table_collect_begin:Nn\endcsname +\def\tabu@celllalign@def #1{\def\tabu@celllalign{\tabu@maybesiunitx{#1}}}% +%% Fixed vertical spacing adjustment: \extrarowsep ------------------ +\newcommand*\extrarowsep{\edef\tabu@C@extra{\the\numexpr\tabu@C@extra+1}% + \iftabu@everyrow \aftergroup\tabu@Gextra + \else \aftergroup\tabu@n@Gextra + \fi + \@ifnextchar={\tabu@gobbletoken\tabu@extra} \tabu@extra +}% \extrarowsep +\def\tabu@extra {\@ifnextchar_% + {\tabu@gobbletoken{\tabu@setextra\extrarowheight \extrarowdepth}} + {\ifx ^\@let@token \def\tabu@temp{% + \tabu@gobbletoken{\tabu@setextra\extrarowdepth \extrarowheight}}% + \else \let\tabu@temp \@empty + \afterassignment \tabu@setextrasep \extrarowdepth + \fi \tabu@temp}% +}% \tabu@extra +\def\tabu@setextra #1#2{\def\tabu@temp{\tabu@extr@#1#2}\afterassignment\tabu@temp#2} +\def\tabu@extr@ #1#2{\@ifnextchar^% + {\tabu@gobbletoken{\tabu@setextra\extrarowdepth \extrarowheight}} + {\ifx _\@let@token \def\tabu@temp{% + \tabu@gobbletoken{\tabu@setextra\extrarowheight \extrarowdepth}}% + \else \let\tabu@temp \@empty + \tabu@Gsave \tabu@G@extra \tabu@C@extra \extrarowheight \extrarowdepth + \fi \tabu@temp}% +}% \tabu@extr@ +\def\tabu@setextrasep {\extrarowheight=\extrarowdepth + \tabu@Gsave \tabu@G@extra \tabu@C@extra \extrarowheight \extrarowdepth +}% \tabu@setextrasep +\def\tabu@Gextra{\ifx \tabu@G@extra\@empty \else {\tabu@Rextra}\fi} +\def\tabu@n@Gextra{\ifx \tabu@G@extra\@empty \else \noalign{\tabu@Rextra}\fi} +\def\tabu@Rextra{\tabu@Grestore \tabu@G@extra \tabu@C@extra} +\let\tabu@C@extra \z@ +\let\tabu@G@extra \@empty +%% Dynamic vertical spacing adjustment: \tabulinesep ---------------- +\newcommand*\tabulinesep{\edef\tabu@C@linesep{\the\numexpr\tabu@C@linesep+1}% + \iftabu@everyrow \aftergroup\tabu@Glinesep + \else \aftergroup\tabu@n@Glinesep + \fi + \@ifnextchar={\tabu@gobbletoken\tabu@linesep} \tabu@linesep +}% \tabulinesep +\def\tabu@linesep {\@ifnextchar_% + {\tabu@gobbletoken{\tabu@setsep\abovetabulinesep \belowtabulinesep}} + {\ifx ^\@let@token \def\tabu@temp{% + \tabu@gobbletoken{\tabu@setsep\belowtabulinesep \abovetabulinesep}}% + \else \let\tabu@temp \@empty + \afterassignment \tabu@setlinesep \abovetabulinesep + \fi \tabu@temp}% +}% \tabu@linesep +\def\tabu@setsep #1#2{\def\tabu@temp{\tabu@sets@p#1#2}\afterassignment\tabu@temp#2} +\def\tabu@sets@p #1#2{\@ifnextchar^% + {\tabu@gobbletoken{\tabu@setsep\belowtabulinesep \abovetabulinesep}} + {\ifx _\@let@token \def\tabu@temp{% + \tabu@gobbletoken{\tabu@setsep\abovetabulinesep \belowtabulinesep}}% + \else \let\tabu@temp \@empty + \tabu@Gsave \tabu@G@linesep \tabu@C@linesep \abovetabulinesep \belowtabulinesep + \fi \tabu@temp}% +}% \tabu@sets@p +\def\tabu@setlinesep {\belowtabulinesep=\abovetabulinesep + \tabu@Gsave \tabu@G@linesep \tabu@C@linesep \abovetabulinesep \belowtabulinesep +}% \tabu@setlinesep +\def\tabu@Glinesep{\ifx \tabu@G@linesep\@empty \else {\tabu@Rlinesep}\fi} +\def\tabu@n@Glinesep{\ifx \tabu@G@linesep\@empty \else \noalign{\tabu@Rlinesep}\fi} +\def\tabu@Rlinesep{\tabu@Grestore \tabu@G@linesep \tabu@C@linesep} +\let\tabu@C@linesep \z@ +\let\tabu@G@linesep \@empty +%% \global\extrarowsep and \global\tabulinesep ------------------- +\def\tabu@Gsave #1#2#3#4{\xdef#1{#1% + \toks#2{\toks\the\currentgrouplevel{\global#3\the#3\global#4\the#4}}}% +}% \tabu@Gsave +\def\tabu@Grestore#1#2{% + \toks#2{}#1\toks\currentgrouplevel\expandafter{\expandafter}\the\toks#2\relax + \ifcat$\the\toks\currentgrouplevel$\else + \global\let#1\@empty \global\let#2\z@ + \the\toks\currentgrouplevel + \fi +}% \tabu@Grestore +%% Setting code for every row --------------------------------------- +\newcommand*\everyrow{\tabu@everyrow@bgroup + \tabu@start \z@ \tabu@stop \z@ \tabu@evrstartstop +}% \everyrow +\def\tabu@evrstartstop {\@ifnextchar^% + {\afterassignment \tabu@evrstartstop \tabu@stop=}% + {\ifx ^\@let@token + \afterassignment\tabu@evrstartstop \tabu@start=% + \else \afterassignment\tabu@everyr@w \toks@ + \fi}% +}% \tabu@evrstartstop +\def\tabu@everyr@w {% + \xdef\tabu@everyrow{% + \noexpand\tabu@everyrowfalse + \let\noalign \relax + \noexpand\tabu@rowfontreset + \iftabu@colortbl \noexpand\tabu@rc@ \fi % \taburowcolors + \let\noexpand\tabu@docline \noexpand\tabu@docline@evr + \the\toks@ + \noexpand\tabu@evrh@@k + \noexpand\tabu@rearstrut + \global\advance\c@taburow \@ne}% + \iftabu@everyrow \toks@\expandafter + {\expandafter\def\expandafter\tabu@evr@L\expandafter{\the\toks@}\ignorespaces}% + \else \xdef\tabu@evr@G{\the\toks@}% + \fi + \tabu@everyrow@egroup +}% \tabu@everyr@w +\def\tabu@evr {\def\tabu@evrh@@k} % for internal use only +\tabu@evr{} +%% line style and leaders ------------------------------------------- +\newcommand*\newtabulinestyle [1]{% + {\@for \@tempa :=#1\do{\expandafter\tabu@newlinestyle \@tempa==\@nil}}% +}% \newtabulinestyle +\def\tabu@newlinestyle #1=#2=#3\@nil{\tabu@getline {#2}% + \tabu@sanitizearg {#1}\@tempa + \ifodd 1\ifx \@tempa\@empty \ifdefined\tabu@linestyle@ 0 \fi\fi + \global\expandafter\let + \csname tabu@linestyle@\@tempa \endcsname =\tabu@thestyle \fi +}% \tabu@newlinestyle +\newcommand*\tabulinestyle [1]{\tabu@everyrow@bgroup \tabu@getline{#1}% + \iftabu@everyrow + \toks@\expandafter{\expandafter \def \expandafter + \tabu@ls@L\expandafter{\tabu@thestyle}\ignorespaces}% + \gdef\tabu@ls@{\tabu@ls@L}% + \else + \global\let\tabu@ls@G \tabu@thestyle + \gdef\tabu@ls@{\tabu@ls@G}% + \fi + \tabu@everyrow@egroup +}% \tabulinestyle +\newcommand*\taburulecolor{\tabu@everyrow@bgroup \tabu@textbar \tabu@rulecolor} +\def\tabu@rulecolor #1{\toks@{}% + \def\tabu@temp #1##1#1{\tabu@ruledrsc{##1}}\@ifnextchar #1% + \tabu@temp + \tabu@rulearc +}% \tabu@rulecolor +\def\tabu@ruledrsc #1{\edef\tabu@temp{#1}\tabu@strtrim\tabu@temp + \ifx \tabu@temp\@empty \def\tabu@temp{\tabu@rule@drsc@ {}{}}% + \else \edef\tabu@temp{\noexpand\tabu@rule@drsc@ {}{\tabu@temp}}% + \fi + \tabu@temp +}% \tabu@ruledrsc@ +\def\tabu@ruledrsc@ #1#{\tabu@rule@drsc@ {#1}} +\def\tabu@rule@drsc@ #1#2{% + \iftabu@everyrow + \ifx \\#1#2\\\toks@{\let\CT@drsc@ \relax}% + \else \toks@{\def\CT@drsc@{\color #1{#2}}}% + \fi + \else + \ifx \\#1#2\\\global\let\CT@drsc@ \relax + \else \gdef\CT@drsc@{\color #1{#2}}% + \fi + \fi + \tabu@rulearc +}% \tabu@rule@drsc@ +\def\tabu@rulearc #1#{\tabu@rule@arc@ {#1}} +\def\tabu@rule@arc@ #1#2{% + \iftabu@everyrow + \ifx \\#1#2\\\toks@\expandafter{\the\toks@ \def\CT@arc@{}}% + \else \toks@\expandafter{\the\toks@ \def\CT@arc@{\color #1{#2}}}% + \fi + \toks@\expandafter{\the\toks@ + \let\tabu@arc@L \CT@arc@ + \let\tabu@drsc@L \CT@drsc@ + \ignorespaces}% + \else + \ifx \\#1#2\\\gdef\CT@arc@{}% + \else \gdef\CT@arc@{\color #1{#2}}% + \fi + \global\let\tabu@arc@G \CT@arc@ + \global\let\tabu@drsc@G \CT@drsc@ + \fi + \tabu@everyrow@egroup +}% \tabu@rule@arc@ +\def\taburowcolors {\tabu@everyrow@bgroup \@testopt \tabu@rowcolors 1} +\def\tabu@rowcolors [#1]#2#{\tabu@rowc@lors{#1}{#2}} +\def\tabu@rowc@lors #1#2#3{% + \toks@{}\@defaultunits \count@ =\number0#2\relax \@nnil + \@defaultunits \tabu@start =\number0#1\relax \@nnil + \ifnum \count@<\tw@ \count@=\tw@ \fi + \advance\tabu@start \m@ne + \ifnum \tabu@start<\z@ \tabu@start \z@ \fi + \tabu@rowcolorseries #3\in@..\in@ \@nnil +}% \tabu@rowcolors +\def\tabu@rowcolorseries #1..#2\in@ #3\@nnil {% + \ifx \in@#1\relax + \iftabu@everyrow \toks@{\def\tabu@rc@{}\let\tabu@rc@L \tabu@rc@}% + \else \gdef\tabu@rc@{}\global\let\tabu@rc@G \tabu@rc@ + \fi + \else + \ifx \\#2\\\tabu@rowcolorserieserror \fi + \tabu@sanitizearg{#1}\tabu@temp + \tabu@sanitizearg{#2}\@tempa + \advance\count@ \m@ne + \iftabu@everyrow + \def\tabu@rc@ ##1##2##3##4{\def\tabu@rc@{% + \ifnum ##2=\c@taburow + \definecolorseries{tabu@rcseries@\the\tabu@nested}{rgb}{last}{##3}{##4}\fi + \ifnum \c@taburow<##2 \else + \ifnum \tabu@modulo {\c@taburow-##2}{##1+1}=\z@ + \resetcolorseries[{##1}]{tabu@rcseries@\the\tabu@nested}\fi + \xglobal\colorlet{tabu@rc@\the\tabu@nested}{tabu@rcseries@\the\tabu@nested!!+}% + \rowcolor{tabu@rc@\the\tabu@nested}\fi}% + }\edef\x{\noexpand\tabu@rc@ {\the\count@} + {\the\tabu@start} + {\tabu@temp} + {\@tempa}% + }\x + \toks@\expandafter{\expandafter\def\expandafter\tabu@rc@\expandafter{\tabu@rc@}}% + \toks@\expandafter{\the\toks@ \let\tabu@rc@L \tabu@rc@ \ignorespaces}% + \else % inside \noalign + \definecolorseries{tabu@rcseries@\the\tabu@nested}{rgb}{last}{\tabu@temp}{\@tempa}% + \expandafter\resetcolorseries\expandafter[\the\count@]{tabu@rcseries@\the\tabu@nested}% + \xglobal\colorlet{tabu@rc@\the\tabu@nested}{tabu@rcseries@\the\tabu@nested!!+}% + \let\noalign \relax \rowcolor{tabu@rc@\the\tabu@nested}% + \def\tabu@rc@ ##1##2{\gdef\tabu@rc@{% + \ifnum \tabu@modulo {\c@taburow-##2}{##1+1}=\@ne + \resetcolorseries[{##1}]{tabu@rcseries@\the\tabu@nested}\fi + \xglobal\colorlet{tabu@rc@\the\tabu@nested}{tabu@rcseries@\the\tabu@nested!!+}% + \rowcolor{tabu@rc@\the\tabu@nested}}% + }\edef\x{\noexpand\tabu@rc@{\the\count@}{\the\c@taburow}}\x + \global\let\tabu@rc@G \tabu@rc@ + \fi + \fi + \tabu@everyrow@egroup +}% \tabu@rowcolorseries +\tabuDisableCommands {\let\tabu@rc@ \@empty } +\def\tabu@rowcolorserieserror {\PackageError{tabu} + {Invalid syntax for \string\taburowcolors + \MessageBreak Please look at the documentation!}\@ehd +}% \tabu@rowcolorserieserror +\newcommand*\tabureset {% + \tabulinesep=\z@ \extrarowsep=\z@ \extratabsurround=\z@ + \tabulinestyle{}\everyrow{}\taburulecolor||{}\taburowcolors{}% +}% \tabureset +%% Parsing the line styles ------------------------------------------ +\def\tabu@getline #1{\begingroup + \csname \ifcsname if@safe@actives\endcsname % + @safe@activestrue\else + relax\fi \endcsname + \edef\tabu@temp{#1}\tabu@sanitizearg{#1}\@tempa + \let\tabu@thestyle \relax + \ifcsname tabu@linestyle@\@tempa \endcsname + \edef\tabu@thestyle{\endgroup + \def\tabu@thestyle{\expandafter\noexpand + \csname tabu@linestyle@\@tempa\endcsname}% + }\tabu@thestyle + \else \expandafter\tabu@definestyle \tabu@temp \@nil + \fi +}% \tabu@getline +\def\tabu@definestyle #1#2\@nil {\endlinechar \m@ne \makeatletter + \tabu@thick \maxdimen \tabu@on \maxdimen \tabu@off \maxdimen + \let\tabu@c@lon \@undefined \let\tabu@c@loff \@undefined + \ifodd 1\ifcat .#1\else\ifcat\relax #1\else 0\fi\fi % catcode 12 or non expandable cs + \def\tabu@temp{\tabu@getparam{thick}}% + \else \def\tabu@temp{\tabu@getparam{thick}\maxdimen}% + \fi + {% + \let\tabu@ \relax + \def\:{\obeyspaces \tabu@oXIII \tabu@commaXIII \edef\:}% (space active \: happy ;-)) + \scantokens{\:{\tabu@temp #1#2 \tabu@\tabu@}}% + \expandafter}\expandafter + \def\expandafter\:\expandafter{\:}% line spec rewritten now ;-) + \def\;{\def\:}% + \scantokens\expandafter{\expandafter\;\expandafter{\:}}% space is now inactive (catcode 10) + \let\tabu@ \tabu@getcolor \:% all arguments are ready now ;-) + \ifdefined\tabu@c@lon \else \let\tabu@c@lon\@empty \fi + \ifx \tabu@c@lon\@empty \def\tabu@c@lon{\CT@arc@}\fi + \ifdefined\tabu@c@loff \else \let\tabu@c@loff \@empty \fi + \ifdim \tabu@on=\maxdimen \ifdim \tabu@off<\maxdimen + \tabu@on \tabulineon \fi\fi + \ifdim \tabu@off=\maxdimen \ifdim \tabu@on<\maxdimen + \tabu@off \tabulineoff \fi\fi + \ifodd 1\ifdim \tabu@off=\maxdimen \ifdim \tabu@on=\maxdimen 0 \fi\fi + \in@true % + \else \in@false % + \fi + \ifdim\tabu@thick=\maxdimen \def\tabu@thick{\arrayrulewidth}% + \else \edef\tabu@thick{\the\tabu@thick}% + \fi + \edef \tabu@thestyle ##1##2{\endgroup + \def\tabu@thestyle{% + \ifin@ \noexpand\tabu@leadersstyle {\tabu@thick} + {\the\tabu@on}{##1} + {\the\tabu@off}{##2}% + \else \noexpand\tabu@rulesstyle + {##1\vrule width \tabu@thick}% + {##1\leaders \hrule height \tabu@thick \hfil}% + \fi}% + }\expandafter \expandafter + \expandafter \tabu@thestyle \expandafter + \expandafter \expandafter + {\expandafter\tabu@c@lon\expandafter}\expandafter{\tabu@c@loff}% +}% \tabu@definestyle +{\catcode`\O=\active \lccode`\O=`\o \catcode`\,=\active + \lowercase{\gdef\tabu@oXIII {\catcode`\o=\active \let O=\tabu@oxiii}} + \gdef\tabu@commaXIII {\catcode`\,=\active \let ,=\space} +}% \catcode +\def\tabu@oxiii #1{% + \ifcase \ifx n#1\z@ \else + \ifx f#1\@ne\else + \tw@ \fi\fi + \expandafter\tabu@onxiii + \or \expandafter\tabu@ofxiii + \else o% + \fi#1}% +\def\tabu@onxiii #1#2{% + \ifcase \ifx !#2\tw@ \else + \ifcat.\noexpand#2\z@ \else + \ifx \tabu@spxiii#2\@ne\else + \tw@ \fi\fi\fi + \tabu@getparam{on}#2\expandafter\@gobble + \or \expandafter\tabu@onxiii % (space is active) + \else o\expandafter\@firstofone + \fi{#1#2}}% +\def\tabu@ofxiii #1#2{% + \ifx #2f\expandafter\tabu@offxiii + \else o\expandafter\@firstofone + \fi{#1#2}} +\def\tabu@offxiii #1#2{% + \ifcase \ifx !#2\tw@ \else + \ifcat.\noexpand#2\z@ \else + \ifx\tabu@spxiii#2\@ne \else + \tw@ \fi\fi\fi + \tabu@getparam{off}#2\expandafter\@gobble + \or \expandafter\tabu@offxiii % (space is active) + \else o\expandafter\@firstofone + \fi{#1#2}} +\def\tabu@getparam #1{\tabu@ \csname tabu@#1\endcsname=} +\def\tabu@getcolor #1{% \tabu@ <- \tabu@getcolor after \edef + \ifx \tabu@#1\else % no more spec + \let\tabu@theparam=#1\afterassignment \tabu@getc@l@r #1\fi +}% \tabu@getcolor +\def\tabu@getc@l@r #1\tabu@ {% + \def\tabu@temp{#1}\tabu@strtrim \tabu@temp + \ifx \tabu@temp\@empty + \else%\ifcsname \string\color@\tabu@temp \endcsname % if the color exists + \ifx \tabu@theparam \tabu@off \let\tabu@c@loff \tabu@c@l@r + \else \let\tabu@c@lon \tabu@c@l@r + \fi + %\else \tabu@warncolour{\tabu@temp}% + \fi%\fi + \tabu@ % next spec +}% \tabu@getc@l@r +\def\tabu@warncolour #1{\PackageWarning{tabu} + {Color #1 is not defined. Default color used}% +}% \tabu@warncolour +\def\tabu@leadersstyle #1#2#3#4#5{\def\tabu@leaders{{#1}{#2}{#3}{#4}{#5}}% + \ifx \tabu@leaders\tabu@leaders@G \else + \tabu@LEADERS{#1}{#2}{#3}{#4}{#5}\fi +}% \tabu@leadersstyle +\def\tabu@rulesstyle #1#2{\let\tabu@leaders \@undefined + \gdef\tabu@thevrule{#1}\gdef\tabu@thehrule{#2}% +}% \tabu@rulesstyle +%% The leaders boxes ------------------------------------------------ +\def\tabu@LEADERS #1#2#3#4#5{%% width, dash, dash color, gap, gap color + {\let\color \tabu@color % => during trials -> \color = \tabu@nocolor + {% % but the leaders boxes should have colors ! + \def\@therule{\vrule}\def\@thick{height}\def\@length{width}% + \def\@box{\hbox}\def\@unbox{\unhbox}\def\@elt{\wd}% + \def\@skip{\hskip}\def\@ss{\hss}\def\tabu@leads{\tabu@hleads}% + \tabu@l@@d@rs {#1}{#2}{#3}{#4}{#5}% + \global\let\tabu@thehleaders \tabu@theleaders + }% + {% + \def\@therule{\hrule}\def\@thick{width}\def\@length{height}% + \def\@box{\vbox}\def\@unbox{\unvbox}\def\@elt{\ht}% + \def\@skip{\vskip}\def\@ss{\vss}\def\tabu@leads{\tabu@vleads}% + \tabu@l@@d@rs {#1}{#2}{#3}{#4}{#5}% + \global\let\tabu@thevleaders \tabu@theleaders + }% + \gdef\tabu@leaders@G{{#1}{#2}{#3}{#4}{#5}}% + }% +}% \tabu@LEADERS +\def\tabu@therule #1#2{\@therule \@thick#1\@length\dimexpr#2/2 \@depth\z@} +\def\tabu@l@@d@rs #1#2#3#4#5{%% width, dash, dash color, gap, gap color + \global\setbox \tabu@leads=\@box{% + {#3\tabu@therule{#1}{#2}}% + \ifx\\#5\\\@skip#4\else{#5\tabu@therule{#1}{#4*2}}\fi + {#3\tabu@therule{#1}{#2}}}% + \global\setbox\tabu@leads=\@box to\@elt\tabu@leads{\@ss + {#3\tabu@therule{#1}{#2}}\@unbox\tabu@leads}% + \edef\tabu@theleaders ##1{\def\noexpand\tabu@theleaders {% + {##1\tabu@therule{#1}{#2}}% + \xleaders \copy\tabu@leads \@ss + \tabu@therule{0pt}{-#2}{##1\tabu@therule{#1}{#2}}}% + }\tabu@theleaders{#3}% +}% \tabu@l@@d@rs +%% \tabu \endtabu \tabu* \longtabu \endlongtabu \longtabu* ---------- +\newcommand*\tabu {\tabu@longfalse + \ifmmode \def\tabu@ {\array}\def\endtabu {\endarray}% + \else \def\tabu@ {\tabu@tabular}\def\endtabu {\endtabular}\fi + \expandafter\let\csname tabu*\endcsname \tabu + \expandafter\def\csname endtabu*\endcsname{\endtabu}% + \tabu@spreadfalse \tabu@negcoeffalse \tabu@settarget +}% {tabu} +\let\tabu@tabular \tabular % +\expandafter\def\csname tabu*\endcsname{\tabuscantokenstrue \tabu} +\newcommand*\longtabu {\tabu@longtrue + \ifmmode\PackageError{tabu}{longtabu not allowed in math mode}\fi + \def\tabu@{\longtable}\def\endlongtabu{\endlongtable}% + \LTchunksize=\@M + \expandafter\let\csname tabu*\endcsname \tabu + \expandafter\def\csname endlongtabu*\endcsname{\endlongtabu}% + \let\LT@startpbox \tabu@LT@startpbox % \everypar{ array struts } + \tabu@spreadfalse \tabu@negcoeffalse \tabu@settarget +}% {longtabu} +\expandafter\def\csname longtabu*\endcsname{\tabuscantokenstrue \longtabu} +\def\tabu@nolongtabu{\PackageError{tabu} + {longtabu requires the longtable package}\@ehd} +%% Read the target and then : \tabular or \@array ------------------ +\def\tabu@settarget {\futurelet\@let@token \tabu@sett@rget } +\def\tabu@sett@rget {\tabu@target \z@ + \ifcase \ifx \bgroup\@let@token \z@ \else + \ifx \@sptoken\@let@token \@ne \else + \if t\@let@token \tw@ \else + \if s\@let@token \thr@@\else + \z@\fi\fi\fi\fi + \expandafter\tabu@begin + \or \expandafter\tabu@gobblespace\expandafter\tabu@settarget + \or \expandafter\tabu@to + \or \expandafter\tabu@spread + \fi +}% \tabu@sett@rget +\def\tabu@to to{\def\tabu@halignto{to}\tabu@gettarget} +\def\tabu@spread spread{\tabu@spreadtrue\def\tabu@halignto{spread}\tabu@gettarget} +\def\tabu@gettarget {\afterassignment\tabu@linegoaltarget \tabu@target } +\def\tabu@linegoaltarget {\futurelet\tabu@temp \tabu@linegoalt@rget } +\def\tabu@linegoalt@rget {% + \ifx \tabu@temp\LNGL@setlinegoal + \LNGL@setlinegoal \expandafter \@firstoftwo \fi % @gobbles \LNGL@setlinegoal + \tabu@begin +}% \tabu@linegoalt@rget +\def\tabu@begin #1#{% + \iftabu@measuring \expandafter\tabu@nestedmeasure \fi + \ifdim \tabu@target=\z@ \let\tabu@halignto \@empty + \else \edef\tabu@halignto{\tabu@halignto\the\tabu@target}% + \fi + \@testopt \tabu@tabu@ \tabu@aligndefault #1\@nil +}% \tabu@begin +\long\def\tabu@tabu@ [#1]#2\@nil #3{\tabu@setup + \def\tabu@align {#1}\def\tabu@savedpream{\NC@find #3}% + \tabu@ [\tabu@align ]#2{#3\tabu@rewritefirst }% +}% \tabu@tabu@ +\def\tabu@nestedmeasure {% + \ifodd 1\iftabu@spread \else \ifdim\tabu@target=\z@ \else 0 \fi\fi\relax + \tabu@spreadtrue + \else \begingroup \iffalse{\fi \ifnum0=`}\fi + \toks@{}\def\tabu@stack{b}% + \expandafter\tabu@collectbody\expandafter\tabu@quickrule + \expandafter\endgroup + \fi +}% \tabu@nestedmeasure +\def\tabu@quickrule {\indent\vrule height\z@ depth\z@ width\tabu@target} +%% \tabu@setup \tabu@init \tabu@indent +\def\tabu@setup{\tabu@alloc@ + \ifcase \tabu@nested + \ifmmode \else \iftabu@spread\else \ifdim\tabu@target=\z@ + \let\tabu@afterendpar \par + \fi\fi\fi + \def\tabu@aligndefault{c}\tabu@init \tabu@indent + \else % + \def\tabu@aligndefault{t}\let\tabudefaulttarget \linewidth + \fi + \let\tabu@thetarget \tabudefaulttarget \let\tabu@restored \@undefined + \edef\tabu@NC@list{\the\NC@list}\NC@list{\NC@do \tabu@rewritefirst}% + \everycr{}\let\@startpbox \tabu@startpbox % for nested tabu inside longtabu... + \let\@endpbox \tabu@endpbox % idem " " " " " " + \let\@tabarray \tabu@tabarray % idem " " " " " " + \tabu@setcleanup \tabu@setreset +}% \tabu@setup +\def\tabu@init{\tabu@starttimer \tabu@measuringfalse + \edef\tabu@hfuzz {\the\dimexpr\hfuzz+1sp}\global\tabu@footnotes{}% + \let\firsthline \tabu@firsthline \let\lasthline \tabu@lasthline + \let\firstline \tabu@firstline \let\lastline \tabu@lastline + \let\hline \tabu@hline \let\@xhline \tabu@xhline + \let\color \tabu@color \let\@arstrutbox \tabu@arstrutbox + \iftabu@colortbl\else\let\LT@@hline \tabu@LT@@hline \fi + \tabu@trivlist % + \let\@footnotetext \tabu@footnotetext \let\@xfootnotetext \tabu@xfootnotetext + \let\@xfootnote \tabu@xfootnote \let\centering \tabu@centering + \let\raggedright \tabu@raggedright \let\raggedleft \tabu@raggedleft + \let\tabudecimal \tabu@tabudecimal \let\Centering \tabu@Centering + \let\RaggedRight \tabu@RaggedRight \let\RaggedLeft \tabu@RaggedLeft + \let\justifying \tabu@justifying \let\rowfont \tabu@rowfont + \let\fbox \tabu@fbox \let\color@b@x \tabu@color@b@x + \let\tabu@@everycr \everycr \let\tabu@@everypar \everypar + \let\tabu@prepnext@tokORI \prepnext@tok\let\prepnext@tok \tabu@prepnext@tok + \let\tabu@multicolumnORI\multicolumn \let\multicolumn \tabu@multicolumn + \let\tabu@startpbox \@startpbox % for nested tabu inside longtabu pfff !!! + \let\tabu@endpbox \@endpbox % idem " " " " " " " + \let\tabu@tabarray \@tabarray % idem " " " " " " " + \tabu@adl@fix \let\endarray \tabu@endarray % colortbl & arydshln (delarray) + \iftabu@colortbl\CT@everycr\expandafter{\expandafter\iftabu@everyrow \the\CT@everycr \fi}\fi +}% \tabu@init +\def\tabu@indent{% correction for indentation + \ifdim \parindent>\z@\ifx \linewidth\tabudefaulttarget + \everypar\expandafter{% + \the\everypar\everypar\expandafter{\the\everypar}% + \setbox\z@=\lastbox + \ifdim\wd\z@>\z@ \edef\tabu@thetarget + {\the\dimexpr -\wd\z@+\tabudefaulttarget}\fi + \box\z@}% + \fi\fi +}% \tabu@indent +\def\tabu@setcleanup {% saves last global assignments + \ifodd 1\ifmmode \else \iftabu@long \else 0\fi\fi\relax + \def\tabu@aftergroupcleanup{% + \def\tabu@aftergroupcleanup{\aftergroup\tabu@cleanup}}% + \else + \def\tabu@aftergroupcleanup{% + \aftergroup\aftergroup\aftergroup\tabu@cleanup + \let\tabu@aftergroupcleanup \relax}% + \fi + \let\tabu@arc@Gsave \tabu@arc@G + \let\tabu@arc@G \tabu@arc@L % + \let\tabu@drsc@Gsave \tabu@drsc@G + \let\tabu@drsc@G \tabu@drsc@L % + \let\tabu@ls@Gsave \tabu@ls@G + \let\tabu@ls@G \tabu@ls@L % + \let\tabu@rc@Gsave \tabu@rc@G + \let\tabu@rc@G \tabu@rc@L % + \let\tabu@evr@Gsave \tabu@evr@G + \let\tabu@evr@G \tabu@evr@L % + \let\tabu@celllalign@save \tabu@celllalign + \let\tabu@cellralign@save \tabu@cellralign + \let\tabu@cellleft@save \tabu@cellleft + \let\tabu@cellright@save \tabu@cellright + \let\tabu@@celllalign@save \tabu@@celllalign + \let\tabu@@cellralign@save \tabu@@cellralign + \let\tabu@@cellleft@save \tabu@@cellleft + \let\tabu@@cellright@save \tabu@@cellright + \let\tabu@rowfontreset@save \tabu@rowfontreset + \let\tabu@@rowfontreset@save\tabu@@rowfontreset + \let\tabu@rowfontreset \@empty + \edef\tabu@alloc@save {\the\tabu@alloc}% restore at \tabu@reset + \edef\c@taburow@save {\the\c@taburow}% + \edef\tabu@naturalX@save {\the\tabu@naturalX}% + \let\tabu@naturalXmin@save \tabu@naturalXmin + \let\tabu@naturalXmax@save \tabu@naturalXmax + \let\tabu@mkarstrut@save \tabu@mkarstrut + \edef\tabu@clarstrut{% + \extrarowheight \the\dimexpr \ht\@arstrutbox-\ht\strutbox \relax + \extrarowdepth \the\dimexpr \dp\@arstrutbox-\dp\strutbox \relax + \let\noexpand\@arraystretch \@ne \noexpand\tabu@rearstrut}% +}% \tabu@setcleanup +\def\tabu@cleanup {\begingroup + \globaldefs\@ne \tabu@everyrowtrue + \let\tabu@arc@G \tabu@arc@Gsave + \let\CT@arc@ \tabu@arc@G + \let\tabu@drsc@G \tabu@drsc@Gsave + \let\CT@drsc@ \tabu@drsc@G + \let\tabu@ls@G \tabu@ls@Gsave + \let\tabu@ls@ \tabu@ls@G + \let\tabu@rc@G \tabu@rc@Gsave + \let\tabu@rc@ \tabu@rc@G + \let\CT@do@color \relax + \let\tabu@evr@G \tabu@evr@Gsave + \let\tabu@celllalign \tabu@celllalign@save + \let\tabu@cellralign \tabu@cellralign@save + \let\tabu@cellleft \tabu@cellleft@save + \let\tabu@cellright \tabu@cellright@save + \let\tabu@@celllalign \tabu@@celllalign@save + \let\tabu@@cellralign \tabu@@cellralign@save + \let\tabu@@cellleft \tabu@@cellleft@save + \let\tabu@@cellright \tabu@@cellright@save + \let\tabu@rowfontreset \tabu@rowfontreset@save + \let\tabu@@rowfontreset \tabu@@rowfontreset@save + \tabu@naturalX =\tabu@naturalX@save + \let\tabu@naturalXmax \tabu@naturalXmax@save + \let\tabu@naturalXmin \tabu@naturalXmin@save + \let\tabu@mkarstrut \tabu@mkarstrut@save + \c@taburow =\c@taburow@save + \ifcase \tabu@nested \tabu@alloc \m@ne\fi + \endgroup % + \ifcase \tabu@nested + \the\tabu@footnotes \global\tabu@footnotes{}% + \tabu@afterendpar \tabu@elapsedtime + \fi + \tabu@clarstrut + \everyrow\expandafter {\tabu@evr@G}% +}% \tabu@cleanup +\let\tabu@afterendpar \relax +\def\tabu@setreset {% + \edef\tabu@savedparams {% \relax for \tabu@message@save + \ifmmode \col@sep \the\arraycolsep + \else \col@sep \the\tabcolsep \fi \relax + \arrayrulewidth \the\arrayrulewidth \relax + \doublerulesep \the\doublerulesep \relax + \extratabsurround \the\extratabsurround \relax + \extrarowheight \the\extrarowheight \relax + \extrarowdepth \the\extrarowdepth \relax + \abovetabulinesep \the\abovetabulinesep \relax + \belowtabulinesep \the\belowtabulinesep \relax + \def\noexpand\arraystretch{\arraystretch}% + \ifdefined\minrowclearance \minrowclearance\the\minrowclearance\relax\fi}% + \begingroup + \@temptokena\expandafter{\tabu@savedparams}% => only for \savetabu / \usetabu + \ifx \tabu@arc@L\relax \else \tabu@setsave \tabu@arc@L \fi + \ifx \tabu@drsc@L\relax \else \tabu@setsave \tabu@drsc@L \fi + \tabu@setsave \tabu@ls@L \tabu@setsave \tabu@evr@L + \expandafter \endgroup \expandafter + \def\expandafter\tabu@saved@ \expandafter{\the\@temptokena + \let\tabu@arc@G \tabu@arc@L + \let\tabu@drsc@G \tabu@drsc@L + \let\tabu@ls@G \tabu@ls@L + \let\tabu@rc@G \tabu@rc@L + \let\tabu@evr@G \tabu@evr@L}% + \def\tabu@reset{\tabu@savedparams + \tabu@everyrowtrue \c@taburow \z@ + \let\CT@arc@ \tabu@arc@L + \let\CT@drsc@ \tabu@drsc@L + \let\tabu@ls@ \tabu@ls@L + \let\tabu@rc@ \tabu@rc@L + \global\tabu@alloc \tabu@alloc@save + \everyrow\expandafter{\tabu@evr@L}}% +}% \tabu@reset +\def\tabu@setsave #1{\expandafter\tabu@sets@ve #1\@nil{#1}} +\long\def\tabu@sets@ve #1\@nil #2{\@temptokena\expandafter{\the\@temptokena \def#2{#1}}} +%% The Rewriting Process ------------------------------------------- +\def\tabu@newcolumntype #1{% + \expandafter\tabu@new@columntype + \csname NC@find@\string#1\expandafter\endcsname + \csname NC@rewrite@\string#1\endcsname + {#1}% +}% \tabu@newcolumntype +\def\tabu@new@columntype #1#2#3{% + \def#1##1#3{\NC@{##1}}% + \let#2\relax \newcommand*#2% +}% \tabu@new@columntype +\def\tabu@privatecolumntype #1{% + \expandafter\tabu@private@columntype + \csname NC@find@\string#1\expandafter\endcsname + \csname NC@rewrite@\string#1\expandafter\endcsname + \csname tabu@NC@find@\string#1\expandafter\endcsname + \csname tabu@NC@rewrite@\string#1\endcsname + {#1}% +}% \tabu@privatecolumntype +\def\tabu@private@columntype#1#2#3#4{% + \g@addto@macro\tabu@privatecolumns{\let#1#3\let#2#4}% + \tabu@new@columntype#3#4% +}% \tabu@private@columntype +\let\tabu@privatecolumns \@empty +\newcommand*\tabucolumn [1]{\expandafter \def \expandafter + \tabu@highprioritycolumns\expandafter{\tabu@highprioritycolumns + \NC@do #1}}% +\let\tabu@highprioritycolumns \@empty +%% The | ``column'' : rewriting process -------------------------- +\tabu@privatecolumntype |{\tabu@rewritevline} +\newcommand*\tabu@rewritevline[1][]{\tabu@vlinearg{#1}% + \expandafter \NC@find \tabu@rewritten} +\def\tabu@lines #1{% + \ifx|#1\else \tabu@privatecolumntype #1{\tabu@rewritevline}\fi + \NC@list\expandafter{\the\NC@list \NC@do #1}% +}% \tabu@lines@ +\def\tabu@vlinearg #1{% + \ifx\\#1\\\def\tabu@thestyle {\tabu@ls@}% + \else\tabu@getline {#1}% + \fi + \def\tabu@rewritten ##1{\def\tabu@rewritten{!{##1\tabu@thevline}}% + }\expandafter\tabu@rewritten\expandafter{\tabu@thestyle}% + \expandafter \tabu@keepls \tabu@thestyle \@nil +}% \tabu@vlinearg +\def\tabu@keepls #1\@nil{% + \ifcat $\@cdr #1\@nil $% + \ifx \relax#1\else + \ifx \tabu@ls@#1\else + \let#1\relax + \xdef\tabu@mkpreambuffer{\tabu@mkpreambuffer + \tabu@savels\noexpand#1}\fi\fi\fi +}% \tabu@keepls +\def\tabu@thevline {\begingroup + \ifdefined\tabu@leaders + \setbox\@tempboxa=\vtop to\dimexpr + \ht\@arstrutbox+\dp\@arstrutbox{{\tabu@thevleaders}}% + \ht\@tempboxa=\ht\@arstrutbox \dp\@tempboxa=\dp\@arstrutbox + \box\@tempboxa + \else + \tabu@thevrule + \fi \endgroup +}% \tabu@thevline +\def\tabu@savels #1{% + \expandafter\let\csname\string#1\endcsname #1% + \expandafter\def\expandafter\tabu@reset\expandafter{\tabu@reset + \tabu@resetls#1}}% +\def\tabu@resetls #1{\expandafter\let\expandafter#1\csname\string#1\endcsname}% +%% \multicolumn inside tabu environment ----------------------------- +\tabu@newcolumntype \tabu@rewritemulticolumn{% + \aftergroup \tabu@endrewritemulticolumn % after \@mkpream group + \NC@list{\NC@do *}\tabu@textbar \tabu@lines + \tabu@savedecl + \tabu@privatecolumns + \NC@list\expandafter{\the\expandafter\NC@list \tabu@NC@list}% + \let\tabu@savels \relax + \NC@find +}% \tabu@rewritemulticolumn +\def\tabu@endrewritemulticolumn{\gdef\tabu@mkpreambuffer{}\endgroup} +\def\tabu@multicolumn{\tabu@ifenvir \tabu@multic@lumn \tabu@multicolumnORI} +\long\def\tabu@multic@lumn #1#2#3{\multispan{#1}\begingroup + \tabu@everyrowtrue + \NC@list{\NC@do \tabu@rewritemulticolumn}% + \expandafter\@gobbletwo % gobbles \multispan{#1} + \tabu@multicolumnORI{#1}{\tabu@rewritemulticolumn #2}% + {\iftabuscantokens \tabu@rescan \else \expandafter\@firstofone \fi + {#3}}% +}% \tabu@multic@lumn +%% The X column(s): rewriting process ----------------------------- +\tabu@privatecolumntype X[1][]{\begingroup \tabu@siunitx{\endgroup \tabu@rewriteX {#1}}} +\def\tabu@nosiunitx #1{#1{}{}\expandafter \NC@find \tabu@rewritten } +\def\tabu@siunitx #1{\@ifnextchar \bgroup + {\tabu@rewriteX@Ss{#1}} + {\tabu@nosiunitx{#1}}} +\def\tabu@rewriteX@Ss #1#2{\@temptokena{}% + \@defaultunits \let\tabu@temp =#2\relax\@nnil + \ifodd 1\ifx S\tabu@temp \else \ifx s\tabu@temp \else 0 \fi\fi + \def\NC@find{\def\NC@find >####1####2<####3\relax{#1 {####1}{####3}% + }\expandafter\NC@find \the\@temptokena \relax + }\expandafter\NC@rewrite@S \@gobble #2\relax + \else \tabu@siunitxerror + \fi + \expandafter \NC@find \tabu@rewritten +}% \tabu@rewriteX@Ss +\def\tabu@siunitxerror {\PackageError{tabu}{Not a S nor s column ! + \MessageBreak X column can only embed siunitx S or s columns}\@ehd +}% \tabu@siunitxerror +\def\tabu@rewriteX #1#2#3{\tabu@Xarg {#1}{#2}{#3}% + \iftabu@measuring + \else \tabu@measuringtrue % first X column found in the preamble + \let\@halignto \relax \let\tabu@halignto \relax + \iftabu@spread \tabu@spreadtarget \tabu@target \tabu@target \z@ + \else \tabu@spreadtarget \z@ \fi + \ifdim \tabu@target=\z@ + \setlength\tabu@target \tabu@thetarget + \tabu@message{\tabu@message@defaulttarget}% + \else \tabu@message{\tabu@message@target}\fi + \fi +}% \tabu@rewriteX +\def\tabu@rewriteXrestore #1#2#3{\let\@halignto \relax + \def\tabu@rewritten{l}} +\def\tabu@Xarg #1#2#3{% + \advance\tabu@Xcol \@ne \let\tabu@Xlcr \@empty + \let\tabu@Xdisp \@empty \let\tabu@Xmath \@empty + \ifx\\#1\\% + \def\tabu@rewritten{p}\tabucolX \p@ % + \else + \let\tabu@rewritten \@empty \let\tabu@temp \@empty \tabucolX \z@ + \tabu@Xparse {}#1\relax + \fi + \tabu@Xrewritten{#2}{#3}% +}% \tabu@Xarg +\def\tabu@Xparse #1{\futurelet\@let@token \tabu@Xtest} +\expandafter\def\expandafter\tabu@Xparsespace\space{\tabu@Xparse{}} +\def\tabu@Xtest{% + \ifcase \ifx \relax\@let@token \z@ \else + \if ,\@let@token \m@ne\else + \if p\@let@token 1\else + \if m\@let@token 2\else + \if b\@let@token 3\else + \if l\@let@token 4\else + \if c\@let@token 5\else + \if r\@let@token 6\else + \if j\@let@token 7\else + \if L\@let@token 8\else + \if C\@let@token 9\else + \if R\@let@token 10\else + \if J\@let@token 11\else + \ifx \@sptoken\@let@token 12\else + \if .\@let@token 13\else + \if -\@let@token 13\else + \ifcat $\@let@token 14\else + 15\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\relax + \or \tabu@Xtype {p}% + \or \tabu@Xtype {m}% + \or \tabu@Xtype {b}% + \or \tabu@Xalign \raggedright\relax + \or \tabu@Xalign \centering\relax + \or \tabu@Xalign \raggedleft\relax + \or \tabu@Xalign \tabu@justify\relax + \or \tabu@Xalign \RaggedRight\raggedright + \or \tabu@Xalign \Centering\centering + \or \tabu@Xalign \RaggedLeft\raggedleft + \or \tabu@Xalign \justifying\tabu@justify + \or \expandafter \tabu@Xparsespace + \or \expandafter \tabu@Xcoef + \or \expandafter \tabu@Xm@th + \or \tabu@Xcoef{}% + \else\expandafter \tabu@Xparse + \fi +}% \tabu@Xtest +\def\tabu@Xalign #1#2{% + \ifx \tabu@Xlcr\@empty \else \PackageWarning{tabu} + {Duplicate horizontal alignment specification}\fi + \ifdefined#1\def\tabu@Xlcr{#1}\let#1\relax + \else \def\tabu@Xlcr{#2}\let#2\relax\fi + \expandafter\tabu@Xparse +}% \tabu@Xalign +\def\tabu@Xtype #1{% + \ifx \tabu@rewritten\@empty \else \PackageWarning{tabu} + {Duplicate vertical alignment specification}\fi + \def\tabu@rewritten{#1}\expandafter\tabu@Xparse +}% \tabu@Xtype +\def\tabu@Xcoef#1{\edef\tabu@temp{\tabu@temp#1}% + \afterassignment\tabu@Xc@ef \tabu@cnt\number\if-#10\fi +}% \tabu@Xcoef +\def\tabu@Xc@ef{\advance\tabucolX \tabu@temp\the\tabu@cnt\p@ + \tabu@Xparse{}% +}% \tabu@Xc@ef +\def\tabu@Xm@th #1{\futurelet \@let@token \tabu@Xd@sp} +\def\tabu@Xd@sp{\let\tabu@Xmath=$% + \ifx $\@let@token \def\tabu@Xdisp{\displaystyle}% + \expandafter\tabu@Xparse + \else \expandafter\tabu@Xparse\expandafter{\expandafter}% + \fi +}% \tabu@Xd@sp +\def\tabu@Xrewritten {% + \ifx \tabu@rewritten\@empty \def\tabu@rewritten{p}\fi + \ifdim \tabucolX<\z@ \tabu@negcoeftrue + \else\ifdim \tabucolX=\z@ \tabucolX \p@ + \fi\fi + \edef\tabu@temp{{\the\tabu@Xcol}{\tabu@strippt\tabucolX}}% + \edef\tabu@Xcoefs{\tabu@Xcoefs \tabu@ \tabu@temp}% + \edef\tabu@rewritten ##1##2{\def\noexpand\tabu@rewritten{% + >{\tabu@Xlcr \ifx$\tabu@Xmath$\tabu@Xdisp\fi ##1}% + \tabu@rewritten {\tabu@hsize \tabu@temp}% + <{##2\ifx$\tabu@Xmath$\fi}}% + }\tabu@rewritten +}% \tabu@Xrewritten +\def\tabu@hsize #1#2{% + \ifdim #2\p@<\z@ + \ifdim \tabucolX=\maxdimen \tabu@wd{#1}\else + \ifdim \tabu@wd{#1}<-#2\tabucolX \tabu@wd{#1}\else -#2\tabucolX\fi + \fi + \else #2\tabucolX + \fi +}% \tabu@hsize +%% \usetabu and \preamble: rewriting process --------------------- +\tabu@privatecolumntype \usetabu [1]{% + \ifx\\#1\\\tabu@saveerr{}\else + \@ifundefined{tabu@saved@\string#1} + {\tabu@saveerr{#1}} + {\let\tabu@rewriteX \tabu@rewriteXrestore + \csname tabu@saved@\string#1\expandafter\endcsname\expandafter\@ne}% + \fi +}% \NC@rewrite@\usetabu +\tabu@privatecolumntype \preamble [1]{% + \ifx\\#1\\\tabu@saveerr{}\else + \@ifundefined{tabu@saved@\string#1} + {\tabu@saveerr{#1}} + {\csname tabu@saved@\string#1\expandafter\endcsname\expandafter\z@}% + \fi +}% \NC@rewrite@\preamble +%% Controlling the rewriting process ------------------------------- +\tabu@newcolumntype \tabu@rewritefirst{% + \iftabu@long \aftergroup \tabu@longpream % + \else \aftergroup \tabu@pream + \fi + \let\tabu@ \relax \let\tabu@hsize \relax + \let\tabu@Xcoefs \@empty \let\tabu@savels \relax + \tabu@Xcol \z@ \tabu@cnt \tw@ + \gdef\tabu@mkpreambuffer{\tabu@{}}\tabu@measuringfalse + \global\setbox\@arstrutbox \box\@arstrutbox + \NC@list{\NC@do *}\tabu@textbar \tabu@lines + \NC@list\expandafter{\the\NC@list \NC@do X}% + \iftabu@siunitx % + \NC@list\expandafter{\the\NC@list \NC@do S\NC@do s}\fi + \NC@list\expandafter{\the\expandafter\NC@list \tabu@highprioritycolumns}% + \expandafter\def\expandafter\tabu@NC@list\expandafter{% + \the\expandafter\NC@list \tabu@NC@list}% % * | X S + \NC@list\expandafter{\expandafter \NC@do \expandafter\usetabu + \expandafter \NC@do \expandafter\preamble + \the\NC@list \NC@do \tabu@rewritemiddle + \NC@do \tabu@rewritelast}% + \tabu@savedecl + \tabu@privatecolumns + \edef\tabu@prev{\the\@temptokena}\NC@find \tabu@rewritemiddle +}% NC@rewrite@\tabu@rewritefirst +\tabu@newcolumntype \tabu@rewritemiddle{% + \edef\tabu@temp{\the\@temptokena}\NC@find \tabu@rewritelast +}% \NC@rewrite@\tabu@rewritemiddle +\tabu@newcolumntype \tabu@rewritelast{% + \ifx \tabu@temp\tabu@prev \advance\tabu@cnt \m@ne + \NC@list\expandafter{\tabu@NC@list \NC@do \tabu@rewritemiddle + \NC@do \tabu@rewritelast}% + \else \let\tabu@prev\tabu@temp + \fi + \ifcase \tabu@cnt \expandafter\tabu@endrewrite + \else \expandafter\NC@find \expandafter\tabu@rewritemiddle + \fi +}% \NC@rewrite@\tabu@rewritelast +%% Choosing the strategy -------------------------------------------- +\def\tabu@endrewrite {% + \let\tabu@temp \NC@find + \ifx \@arrayright\relax \let\@arrayright \@empty \fi + \count@=% + \ifx \@finalstrut\tabu@finalstrut \z@ % outer in mode 0 print + \iftabu@measuring + \xdef\tabu@mkpreambuffer{\tabu@mkpreambuffer + \tabu@target \csname tabu@\the\tabu@nested.T\endcsname + \tabucolX \csname tabu@\the\tabu@nested.X\endcsname + \edef\@halignto {\ifx\@arrayright\@empty to\tabu@target\fi}}% + \fi + \else\iftabu@measuring 4 % X columns + \xdef\tabu@mkpreambuffer{\tabu@{\tabu@mkpreambuffer + \tabu@target \the\tabu@target + \tabu@spreadtarget \the\tabu@spreadtarget}% + \def\noexpand\tabu@Xcoefs{\tabu@Xcoefs}% + \edef\tabu@halignto{\ifx \@arrayright\@empty to\tabu@target\fi}}% + \let\tabu@Xcoefs \relax + \else\ifcase\tabu@nested \thr@@ % outer, no X + \global\let\tabu@afterendpar \relax + \else \@ne % inner, no X, outer in mode 1 or 2 + \fi + \ifdefined\tabu@usetabu + \else \ifdim\tabu@target=\z@ + \else \let\tabu@temp \tabu@extracolsep + \fi\fi + \fi + \fi + \xdef\tabu@mkpreambuffer{\count@ \the\count@ \tabu@mkpreambuffer}% + \tabu@temp +}% \tabu@endrewrite +\def\tabu@extracolsep{\@defaultunits \expandafter\let + \expandafter\tabu@temp \expandafter=\the\@temptokena \relax\@nnil + \ifx \tabu@temp\@sptoken + \expandafter\tabu@gobblespace \expandafter\tabu@extracolsep + \else + \edef\tabu@temp{\noexpand\NC@find + \if |\noexpand\tabu@temp @% + \else\if !\noexpand\tabu@temp @% + \else !% + \fi\fi + {\noexpand\extracolsep\noexpand\@flushglue}}% + \fi + \tabu@temp +}% \tabu@extrac@lsep +%% Implementing the strategy ---------------------------------------- +\long\def\tabu@pream #1\@preamble {% + \let\tabu@ \tabu@@ \tabu@mkpreambuffer \tabu@aftergroupcleanup + \NC@list\expandafter {\tabu@NC@list}% in case of nesting... + \ifdefined\tabu@usetabu \tabu@usetabu \tabu@target \z@ \fi + \let\tabu@savedpreamble \@preamble + \global\let\tabu@elapsedtime \relax + \tabu@thebody ={#1\tabu@aftergroupcleanup}% + \tabu@thebody =\expandafter{\the\expandafter\tabu@thebody + \@preamble}% + \edef\tabuthepreamble {\the\tabu@thebody}% ( no @ allowed for \scantokens ) + \tabu@select +}% \tabu@pream +\long\def\tabu@longpream #1\LT@bchunk #2\LT@bchunk{% + \let\tabu@ \tabu@@ \tabu@mkpreambuffer \tabu@aftergroupcleanup + \NC@list\expandafter {\tabu@NC@list}% in case of nesting... + \let\tabu@savedpreamble \@preamble + \global\let\tabu@elapsedtime \relax + \tabu@thebody ={#1\LT@bchunk #2\tabu@aftergroupcleanup \LT@bchunk}% + \edef\tabuthepreamble {\the\tabu@thebody}% ( no @ allowed for \scantokens ) + \tabu@select +}% \tabu@longpream +\def\tabu@select {% + \ifnum\tabu@nested>\z@ \tabuscantokensfalse \fi + \ifnum \count@=\@ne \iftabu@measuring \count@=\tw@ \fi\fi + \ifcase \count@ + \global\let\tabu@elapsedtime \relax + \tabu@seteverycr + \expandafter \tabuthepreamble % vertical adjustment (inherited from outer) + \or % exit in vertical measure + struts per cell because no X and outer in mode 3 + \tabu@evr{\tabu@verticalinit}\tabu@celllalign@def{\tabu@verticalmeasure}% + \def\tabu@cellralign{\tabu@verticalspacing}% + \tabu@seteverycr + \expandafter \tabuthepreamble + \or % exit without measure because no X and outer in mode 4 + \tabu@evr{}\tabu@celllalign@def{}\let\tabu@cellralign \@empty + \tabu@seteverycr + \expandafter \tabuthepreamble + \else % needs trials + \tabu@evr{}\tabu@celllalign@def{}\let\tabu@cellralign \@empty + \tabu@savecounters + \expandafter \tabu@setstrategy + \fi +}% \tabu@select +\def\tabu@@ {\gdef\tabu@mkpreambuffer} +%% Protections to set up before trials ------------------------------ +\def\tabu@setstrategy {\begingroup % + \tabu@trialh@@k \tabu@cnt \z@ % number of trials + \hbadness \@M \let\hbadness \@tempcnta + \hfuzz \maxdimen \let\hfuzz \@tempdima + \let\write \tabu@nowrite\let\GenericError \tabu@GenericError + \let\savetabu \@gobble \let\tabudefaulttarget \linewidth + \let\@footnotetext \@gobble \let\@xfootnote \tabu@xfootnote + \let\color \tabu@nocolor\let\rowcolor \tabu@norowcolor + \let\tabu@aftergroupcleanup \relax % only after the last trial + \tabu@mkpreambuffer + \ifnum \count@>\thr@@ \let\@halignto \@empty \tabucolX@init + \def\tabu@lasttry{\m@ne\p@}\fi + \begingroup \iffalse{\fi \ifnum0=`}\fi + \toks@{}\def\tabu@stack{b}\iftabuscantokens \endlinechar=10 \obeyspaces \fi % + \tabu@collectbody \tabu@strategy % +}% \tabu@setstrategy +\def\tabu@savecounters{% + \def\@elt ##1{\csname c@##1\endcsname\the\csname c@##1\endcsname}% + \edef\tabu@clckpt {\begingroup \globaldefs=\@ne \cl@@ckpt \endgroup}\let\@elt \relax +}% \tabu@savecounters +\def\tabucolX@init {% \tabucolX <= \tabu@target / (sum coefs > 0) + \dimen@ \z@ \tabu@Xsum \z@ \tabucolX \z@ \let\tabu@ \tabu@Xinit \tabu@Xcoefs + \ifdim \dimen@>\z@ + \@tempdima \dimexpr \tabu@target *\p@/\dimen@ + \tabu@hfuzz\relax + \ifdim \tabucolX<\@tempdima \tabucolX \@tempdima \fi + \fi +}% \tabucolX@init +\def\tabu@Xinit #1#2{\tabu@Xcol #1 \advance \tabu@Xsum + \ifdim #2\p@>\z@ #2\p@ \advance\dimen@ #2\p@ + \else -#2\p@ \tabu@negcoeftrue + \@tempdima \dimexpr \tabu@target*\p@/\dimexpr-#2\p@\relax \relax + \ifdim \tabucolX<\@tempdima \tabucolX \@tempdima \fi + \tabu@wddef{#1}{0pt}% + \fi +}% \tabu@Xinit +%% Collecting the environment body ---------------------------------- +\long\def\tabu@collectbody #1#2\end #3{% + \edef\tabu@stack{\tabu@pushbegins #2\begin\end\expandafter\@gobble\tabu@stack}% + \ifx \tabu@stack\@empty + \toks@\expandafter{\expandafter\tabu@thebody\expandafter{\the\toks@ #2}% + \def\tabu@end@envir{\end{#3}}% + \iftabuscantokens + \iftabu@long \def\tabu@endenvir {\end{#3}\tabu@gobbleX}% + \else \def\tabu@endenvir {\let\endarray \@empty + \end{#3}\tabu@gobbleX}% + \fi + \else \def\tabu@endenvir {\end{#3}}\fi}% + \let\tabu@collectbody \tabu@endofcollect + \else\def\tabu@temp{#3}% + \ifx \tabu@temp\@empty \toks@\expandafter{\the\toks@ #2\end }% + \else \ifx\tabu@temp\tabu@@spxiii \toks@\expandafter{\the\toks@ #2\end #3}% + \else \ifx\tabu@temp\tabu@X \toks@\expandafter{\the\toks@ #2\end #3}% + \else \toks@\expandafter{\the\toks@ #2\end{#3}}% + \fi\fi\fi + \fi + \tabu@collectbody{#1}% +}% \tabu@collectbody +\long\def\tabu@pushbegins#1\begin#2{\ifx\end#2\else b\expandafter\tabu@pushbegins\fi}% +\def\tabu@endofcollect #1{\ifnum0=`{}\fi + \expandafter\endgroup \the\toks@ #1% +}% \tabu@endofcollect +%% The trials: switching between strategies ------------------------- +\def\tabu@strategy {\relax % stops \count@ assignment ! + \ifcase\count@ % case 0 = print with vertical adjustment (outer is finished) + \expandafter \tabu@endoftrials + \or % case 1 = exit in vertical measure (outer in mode 3) + \expandafter\xdef\csname tabu@\the\tabu@nested.T\endcsname{\the\tabu@target}% + \expandafter\xdef\csname tabu@\the\tabu@nested.X\endcsname{\the\tabucolX}% + \expandafter \tabu@endoftrials + \or % case 2 = exit with a rule replacing the table (outer in mode 4) + \expandafter \tabu@quickend + \or % case 3 = outer is in mode 3 because of no X + \begingroup + \tabu@evr{\tabu@verticalinit}\tabu@celllalign@def{\tabu@verticalmeasure}% + \def\tabu@cellralign{\tabu@verticalspacing}% + \expandafter \tabu@measuring + \else % case 4 = horizontal measure + \begingroup + \global\let\tabu@elapsedtime \tabu@message@etime + \long\def\multicolumn##1##2##3{\multispan{##1}}% + \let\tabu@startpboxORI \@startpbox + \iftabu@spread + \def\tabu@naturalXmax {\z@}% + \let\tabu@naturalXmin \tabu@naturalXmax + \tabu@evr{\global\tabu@naturalX \z@}% + \let\@startpbox \tabu@startpboxmeasure + \else\iftabu@negcoef + \let\@startpbox \tabu@startpboxmeasure + \else \let\@startpbox \tabu@startpboxquick + \fi\fi + \expandafter \tabu@measuring + \fi +}% \tabu@strategy +\def\tabu@measuring{\expandafter \tabu@trial \expandafter + \count@ \the\count@ \tabu@endtrial +}% \tabu@measuring +\def\tabu@trial{\iftabu@long \tabu@longtrial \else \tabu@shorttrial \fi} +\def\tabu@shorttrial {\setbox\tabu@box \hbox\bgroup \tabu@seteverycr + \ifx \tabu@savecounters\relax \else + \let\tabu@savecounters \relax \tabu@clckpt \fi + $\iftabuscantokens \tabu@rescan \else \expandafter\@secondoftwo \fi + \expandafter{\expandafter \tabuthepreamble + \the\tabu@thebody + \csname tabu@adl@endtrial\endcsname + \endarray}$\egroup % got \tabu@box +}% \tabu@shorttrial +\def\tabu@longtrial {\setbox\tabu@box \hbox\bgroup \tabu@seteverycr + \ifx \tabu@savecounters\relax \else + \let\tabu@savecounters \relax \tabu@clckpt \fi + \iftabuscantokens \tabu@rescan \else \expandafter\@secondoftwo \fi + \expandafter{\expandafter \tabuthepreamble + \the\tabu@thebody + \tabuendlongtrial}\egroup % got \tabu@box +}% \tabu@longtrial +\def\tabuendlongtrial{% no @ allowed for \scantokens + \LT@echunk \global\setbox\@ne \hbox{\unhbox\@ne}\kern\wd\@ne + \LT@get@widths +}% \tabuendlongtrial +\def\tabu@adl@endtrial{% + \crcr \noalign{\global\adl@ncol \tabu@nbcols}}% anything global is crap, junky and fails ! +\def\tabu@seteverycr {\tabu@reset + \everycr \expandafter{\the\everycr \tabu@everycr}% + \let\everycr \tabu@noeverycr % +}% \tabu@seteverycr +\def\tabu@noeverycr{{\aftergroup\tabu@restoreeverycr \afterassignment}\toks@} +\def\tabu@restoreeverycr {\let\everycr \tabu@@everycr} +\def\tabu@everycr {\iftabu@everyrow \noalign{\tabu@everyrow}\fi} +\def\tabu@endoftrials {% + \iftabuscantokens \expandafter\@firstoftwo + \else \expandafter\@secondoftwo + \fi + {\expandafter \tabu@closetrialsgroup \expandafter + \tabu@rescan \expandafter{% + \expandafter\tabuthepreamble + \the\expandafter\tabu@thebody + \iftabu@long \else \endarray \fi}} + {\expandafter\tabu@closetrialsgroup \expandafter + \tabuthepreamble + \the\tabu@thebody}% + \tabu@endenvir % Finish ! +}% \tabu@endoftrials +\def\tabu@closetrialsgroup {% + \toks@\expandafter{\tabu@endenvir}% + \edef\tabu@bufferX{\endgroup + \tabucolX \the\tabucolX + \tabu@target \the\tabu@target + \tabu@cnt \the\tabu@cnt + \def\noexpand\tabu@endenvir{\the\toks@}% + %Quid de \@halignto = \tabu@halignto ?? + }% \tabu@bufferX + \tabu@bufferX + \ifcase\tabu@nested % print out (outer in mode 0) + \global\tabu@cnt \tabu@cnt + \tabu@evr{\tabu@verticaldynamicadjustment}% + \tabu@celllalign@def{\everypar{}}\let\tabu@cellralign \@empty + \let\@finalstrut \tabu@finalstrut + \else % vertical measure of nested tabu + \tabu@evr{\tabu@verticalinit}% + \tabu@celllalign@def{\tabu@verticalmeasure}% + \def\tabu@cellralign{\tabu@verticalspacing}% + \fi + \tabu@clckpt \let\@halignto \tabu@halignto + \let\@halignto \@empty + \tabu@seteverycr + \ifdim \tabustrutrule>\z@ \ifnum\tabu@nested=\z@ + \setbox\@arstrutbox \box\voidb@x % force \@arstrutbox to be rebuilt (visible struts) + \fi\fi +}% \tabu@closetrialsgroup +\def\tabu@quickend {\expandafter \endgroup \expandafter + \tabu@target \the\tabu@target \tabu@quickrule + \let\endarray \relax \tabu@endenvir +}% \tabu@quickend +\def\tabu@endtrial {\relax % stops \count@ assignment ! + \ifcase \count@ \tabu@err % case 0 = impossible here + \or \tabu@err % case 1 = impossible here + \or \tabu@err % case 2 = impossible here + \or % case 3 = outer goes into mode 0 + \def\tabu@bufferX{\endgroup}\count@ \z@ + \else % case 4 = outer goes into mode 3 + \iftabu@spread \tabu@spreadarith % inner into mode 1 (outer in mode 3) + \else \tabu@arith % or 2 (outer in mode 4) + \fi + \count@=% + \ifcase\tabu@nested \thr@@ % outer goes into mode 3 + \else\iftabu@measuring \tw@ % outer is in mode 4 + \else \@ne % outer is in mode 3 + \fi\fi + \edef\tabu@bufferX{\endgroup + \tabucolX \the\tabucolX + \tabu@target \the\tabu@target}% + \fi + \expandafter \tabu@bufferX \expandafter + \count@ \the\count@ \tabu@strategy +}% \tabu@endtrial +\def\tabu@err{\errmessage{(tabu) Internal impossible error! (\count@=\the\count@)}} +%% The algorithms: compute the widths / stop or go on --------------- +\def\tabu@arithnegcoef {% + \@tempdima \z@ \dimen@ \z@ \let\tabu@ \tabu@arith@negcoef \tabu@Xcoefs +}% \tabu@arithnegcoef +\def\tabu@arith@negcoef #1#2{% + \ifdim #2\p@>\z@ \advance\dimen@ #2\p@ % saturated by definition + \advance\@tempdima #2\tabucolX + \else + \ifdim -#2\tabucolX <\tabu@wd{#1}% c_i X < natural width <= \tabu@target-> saturated + \advance\dimen@ -#2\p@ + \advance\@tempdima -#2\tabucolX + \else + \advance\@tempdima \tabu@wd{#1}% natural width <= c_i X => neutralised + \ifdim \tabu@wd{#1}<\tabu@target \else % neutralised + \advance\dimen@ -#2\p@ % saturated (natural width = tabu@target) + \fi + \fi + \fi +}% \tabu@arith@negcoef +\def\tabu@givespace #1#2{% here \tabu@DELTA < \z@ + \ifdim \@tempdima=\z@ + \tabu@wddef{#1}{\the\dimexpr -\tabu@DELTA*\p@/\tabu@Xsum}% + \else + \tabu@wddef{#1}{\the\dimexpr \tabu@hsize{#1}{#2} + *(\p@ -\tabu@DELTA*\p@/\@tempdima)/\p@\relax}% + \fi +}% \tabu@givespace +\def\tabu@arith {\advance\tabu@cnt \@ne + \ifnum \tabu@cnt=\@ne \tabu@message{\tabu@titles}\fi + \tabu@arithnegcoef + \@tempdimb \dimexpr \wd\tabu@box -\@tempdima \relax % + \tabu@DELTA = \dimexpr \wd\tabu@box - \tabu@target \relax + \tabu@message{\tabu@message@arith}% + \ifdim \tabu@DELTA <\tabu@hfuzz + \ifdim \tabu@DELTA<\z@ % wd (tabu)<\tabu@target ? + \let\tabu@ \tabu@givespace \tabu@Xcoefs + \advance\@tempdima \@tempdimb \advance\@tempdima -\tabu@DELTA % for message + \else % already converged: nothing to do but nearly impossible... + \fi + \tabucolX \maxdimen + \tabu@measuringfalse + \else % need for narrower X columns + \tabucolX =\dimexpr (\@tempdima -\tabu@DELTA) *\p@/\tabu@Xsum \relax + \tabu@measuringtrue + \@whilesw \iftabu@measuring\fi {% + \advance\tabu@cnt \@ne + \tabu@arithnegcoef + \tabu@DELTA =\dimexpr \@tempdima+\@tempdimb -\tabu@target \relax % always < 0 here + \tabu@message{\tabu@header + \tabu@msgalign \tabucolX { }{ }{ }{ }{ }\@@ + \tabu@msgalign \@tempdima+\@tempdimb { }{ }{ }{ }{ }\@@ + \tabu@msgalign \tabu@target { }{ }{ }{ }{ }\@@ + \tabu@msgalign@PT \dimen@ { }{}{}{}{}{}{}\@@ + \ifdim -\tabu@DELTA<\tabu@hfuzz \tabu@spaces target ok\else + \tabu@msgalign \dimexpr -\tabu@DELTA *\p@/\dimen@ {}{}{}{}{}\@@ + \fi}% + \ifdim -\tabu@DELTA<\tabu@hfuzz + \advance\@tempdima \@tempdimb % for message + \tabu@measuringfalse + \else + \advance\tabucolX \dimexpr -\tabu@DELTA *\p@/\dimen@ \relax + \fi + }% + \fi + \tabu@message{\tabu@message@reached}% + \edef\tabu@bufferX{\endgroup \tabu@cnt \the\tabu@cnt + \tabucolX \the\tabucolX + \tabu@target \the\tabu@target}% +}% \tabu@arith +\def\tabu@spreadarith {% + \dimen@ \z@ \@tempdima \tabu@naturalXmax \let\tabu@ \tabu@spread@arith \tabu@Xcoefs + \edef\tabu@naturalXmin {\the\dimexpr\tabu@naturalXmin*\dimen@/\p@}% + \@tempdimc =\dimexpr \wd\tabu@box -\tabu@naturalXmax+\tabu@naturalXmin \relax + \iftabu@measuring + \tabu@target =\dimexpr \@tempdimc+\tabu@spreadtarget \relax + \edef\tabu@bufferX{\endgroup \tabucolX \the\tabucolX \tabu@target\the\tabu@target}% + \else + \tabu@message{\tabu@message@spreadarith}% + \ifdim \dimexpr \@tempdimc+\tabu@spreadtarget >\tabu@target + \tabu@message{(tabu) spread + \ifdim \@tempdimc>\tabu@target useless here: default target used% + \else too large: reduced to fit default target\fi.}% + \else + \tabu@target =\dimexpr \@tempdimc+\tabu@spreadtarget \relax + \tabu@message{(tabu) spread: New target set to \the\tabu@target^^J}% + \fi + \begingroup \let\tabu@wddef \@gobbletwo + \@tempdimb \@tempdima + \tabucolX@init + \tabu@arithnegcoef + \wd\tabu@box =\dimexpr \wd\tabu@box +\@tempdima-\@tempdimb \relax + \expandafter\endgroup \expandafter\tabucolX \the\tabucolX + \tabu@arith + \fi +}% \tabu@spreadarith +\def\tabu@spread@arith #1#2{% + \ifdim #2\p@>\z@ \advance\dimen@ #2\p@ + \else \advance\@tempdima \tabu@wd{#1}\relax + \fi +}% \tabu@spread@arith +%% Reporting in the .log file --------------------------------------- +\def\tabu@message@defaulttarget{% + \ifnum\tabu@nested=\z@^^J(tabu) Default target: + \ifx\tabudefaulttarget\linewidth \string\linewidth + \ifdim \tabu@thetarget=\linewidth \else + -\the\dimexpr\linewidth-\tabu@thetarget\fi = + \else\ifx\tabudefaulttarget\linegoal\string\linegoal= + \fi\fi + \else (tabu) Default target (nested): \fi + \the\tabu@target \on@line + \ifnum\tabu@nested=\z@ , page \the\c@page\fi} +\def\tabu@message@target {^^J(tabu) Target specified: + \the\tabu@target \on@line, page \the\c@page} +\def\tabu@message@arith {\tabu@header + \tabu@msgalign \tabucolX { }{ }{ }{ }{ }\@@ + \tabu@msgalign \wd\tabu@box { }{ }{ }{ }{ }\@@ + \tabu@msgalign \tabu@target { }{ }{ }{ }{ }\@@ + \tabu@msgalign@PT \dimen@ { }{}{}{}{}{}{}\@@ + \ifdim \tabu@DELTA<\tabu@hfuzz giving space\else + \tabu@msgalign \dimexpr (\@tempdima-\tabu@DELTA) *\p@/\tabu@Xsum -\tabucolX {}{}{}{}{}\@@ + \fi +}% \tabu@message@arith +\def\tabu@message@spreadarith {\tabu@spreadheader + \tabu@msgalign \tabu@spreadtarget { }{ }{ }{ }{}\@@ + \tabu@msgalign \wd\tabu@box { }{ }{ }{ }{}\@@ + \tabu@msgalign -\tabu@naturalXmax { }{}{}{}{}\@@ + \tabu@msgalign \tabu@naturalXmin { }{ }{ }{ }{}\@@ + \tabu@msgalign \ifdim \dimexpr\@tempdimc>\tabu@target \tabu@target + \else \@tempdimc+\tabu@spreadtarget \fi + {}{}{}{}{}\@@} +\def\tabu@message@negcoef #1#2{ + \tabu@spaces\tabu@spaces\space * #1. X[\rem@pt#2]: + \space width = \tabu@wd {#1} + \expandafter\string\csname tabu@\the\tabu@nested.W\number#1\endcsname + \ifdim -\tabu@pt#2\tabucolX<\tabu@target + < \number-\rem@pt#2 X + = \the\dimexpr -\tabu@pt#2\tabucolX \relax + \else + <= \the\tabu@target\space < \number-\rem@pt#2 X\fi} +\def\tabu@message@reached{\tabu@header + ******* Reached Target: + hfuzz = \tabu@hfuzz\on@line\space *******} +\def\tabu@message@etime{\edef\tabu@stoptime{\the\pdfelapsedtime}% + \tabu@message{(tabu)\tabu@spaces Time elapsed during measure: + \the\numexpr(\tabu@stoptime-\tabu@starttime-32767)/65536\relax sec + \the\numexpr\numexpr(\tabu@stoptime-\tabu@starttime) + -\numexpr(\tabu@stoptime-\tabu@starttime-32767)/65536\relax*65536\relax + *1000/65536\relax ms \tabu@spaces(\the\tabu@cnt\space + cycle\ifnum\tabu@cnt>\@ne s\fi)^^J^^J}} +\def\tabu@message@verticalsp {% + \ifdim \@tempdima>\tabu@ht + \ifdim \@tempdimb>\tabu@dp + \expandafter\expandafter\expandafter\string\tabu@ht = + \tabu@msgalign \@tempdima { }{ }{ }{ }{ }\@@ + \expandafter\expandafter\expandafter\string\tabu@dp = + \tabu@msgalign \@tempdimb { }{ }{ }{ }{ }\@@^^J% + \else + \expandafter\expandafter\expandafter\string\tabu@ht = + \tabu@msgalign \@tempdima { }{ }{ }{ }{ }\@@^^J% + \fi + \else\ifdim \@tempdimb>\tabu@dp + \tabu@spaces\tabu@spaces\tabu@spaces + \expandafter\expandafter\expandafter\string\tabu@dp = + \tabu@msgalign \@tempdimb { }{ }{ }{ }{ }\@@^^J\fi + \fi +}% \tabu@message@verticalsp +\edef\tabu@spaces{\@spaces} +\def\tabu@strippt{\expandafter\tabu@pt\the} +{\@makeother\P \@makeother\T\lowercase{\gdef\tabu@pt #1PT{#1}}} +\def\tabu@msgalign{\expandafter\tabu@msg@align\the\dimexpr} +\def\tabu@msgalign@PT{\expandafter\tabu@msg@align\romannumeral-`\0\tabu@strippt} +\def\do #1{% + \def\tabu@msg@align##1.##2##3##4##5##6##7##8##9\@@{% + \ifnum##1<10 #1 #1\else + \ifnum##1<100 #1 \else + \ifnum##1<\@m #1\fi\fi\fi + ##1.##2##3##4##5##6##7##8#1}% + \def\tabu@header{(tabu) \ifnum\tabu@cnt<10 #1\fi\the\tabu@cnt) }% + \def\tabu@titles{\ifnum \tabu@nested=\z@ + (tabu) Try#1 #1 tabu X #1 #1 #1tabu Width #1 #1 Target + #1 #1 #1 Coefs #1 #1 #1 Update^^J\fi}% + \def\tabu@spreadheader{% + (tabu) Try#1 #1 Spread #1 #1 tabu Width #1 #1 #1 Nat. X #1 #1 #1 #1Nat. Min. + #1 New Target^^J% + (tabu) sprd} + \def\tabu@message@save {\begingroup + \def\x ####1{\tabu@msg@align ####1{ }{ }{ }{ }{}\@@} + \def\z ####1{\expandafter\x\expandafter{\romannumeral-`\0\tabu@strippt + \dimexpr####1\p@{ }{ }}}% + \let\color \relax \def\tabu@rulesstyle ####1####2{\detokenize{####1}}% + \let\CT@arc@ \relax \let\@preamble \@gobble + \let\tabu@savedpream \@firstofone + \let\tabu@savedparams \@firstofone + \def\tabu@target ####1\relax {(tabu) target #1 #1 #1 #1 #1 = \x{####1}^^J}% + \def\tabucolX ####1\relax {(tabu) X columns width#1 = \x{####1}^^J}% + \def\tabu@nbcols ####1\relax {(tabu) Number of columns: \z{####1}^^J}% + \def\tabu@aligndefault ####1{(tabu) Default alignment: #1 #1 ####1^^J}% + \def\col@sep ####1\relax {(tabu) column sep #1 #1 #1 = \x{####1}^^J}% + \def\arrayrulewidth ####1\relax{(tabu) arrayrulewidth #1 = \x{####1}}% + \def\doublerulesep ####1\relax { doublerulesep = \x{####1}^^J}% + \def\extratabsurround####1\relax{(tabu) extratabsurround = \x{####1}^^J}% + \def\extrarowheight ####1\relax{(tabu) extrarowheight #1 = \x{####1}}% + \def\extrarowdepth ####1\relax {extrarowdepth = \x{####1}^^J}% + \def\abovetabulinesep####1\relax{(tabu) abovetabulinesep=\x{####1} }% + \def\belowtabulinesep####1\relax{ belowtabulinesep=\x{####1}^^J}% + \def\arraystretch ####1{(tabu) arraystretch #1 #1 = \z{####1}^^J}% + \def\minrowclearance####1\relax{(tabu) minrowclearance #1 = \x{####1}^^J}% + \def\tabu@arc@L ####1{(tabu) taburulecolor #1 #1 = ####1^^J}% + \def\tabu@drsc@L ####1{(tabu) tabudoublerulecolor= ####1^^J}% + \def\tabu@evr@L ####1{(tabu) everyrow #1 #1 #1 #1 = \detokenize{####1}^^J}% + \def\tabu@ls@L ####1{(tabu) line style = \detokenize{####1}^^J}% + \def\NC@find ####1\@nil{(tabu) tabu preamble#1 #1 = \detokenize{####1}^^J}% + \def\tabu@wddef####1####2{(tabu) Natural width ####1 = \x{####2}^^J}% + \let\edef \@gobbletwo \let\def \@empty \let\let \@gobbletwo + \tabu@message{% + (tabu) \string\savetabu{\tabu@temp}: \on@line^^J% + \tabu@usetabu \@nil^^J}% + \endgroup} +}\do{ } +%% Measuring the natural width (varwidth) - store the results ------- +\def\tabu@startpboxmeasure #1{\bgroup % entering \vtop + \edef\tabu@temp{\expandafter\@secondoftwo \ifx\tabu@hsize #1\else\relax\fi}% + \ifodd 1\ifx \tabu@temp\@empty 0 \else % starts with \tabu@hsize ? + \iftabu@spread \else % if spread -> measure + \ifdim \tabu@temp\p@>\z@ 0 \fi\fi\fi% if coef>0 -> do not measure + \let\@startpbox \tabu@startpboxORI % restore immediately (nesting) + \tabu@measuringtrue % for the quick option... + \tabu@Xcol =\expandafter\@firstoftwo\ifx\tabu@hsize #1\fi + \ifdim \tabu@temp\p@>\z@ \ifdim \tabu@temp\tabucolX<\tabu@target + \tabu@target=\tabu@temp\tabucolX \fi\fi + \setbox\tabu@box \hbox \bgroup + \begin{varwidth}\tabu@target + \let\FV@ListProcessLine \tabu@FV@ListProcessLine % \hbox to natural width... + \narrowragged \arraybackslash \parfillskip \@flushglue + \ifdefined\pdfadjustspacing \pdfadjustspacing\z@ \fi + \bgroup \aftergroup\tabu@endpboxmeasure + \ifdefined \cellspacetoplimit \tabu@cellspacepatch \fi + \else \expandafter\@gobble + \tabu@startpboxquick{#1}% \@gobble \bgroup + \fi +}% \tabu@startpboxmeasure +\def\tabu@cellspacepatch{\def\bcolumn##1\@nil{}\let\ecolumn\@empty + \bgroup\color@begingroup} +\def\tabu@endpboxmeasure {% + \@finalstrut \@arstrutbox + \end{varwidth}\egroup % + \ifdim \tabu@temp\p@ <\z@ % neg coef + \ifdim \tabu@wd\tabu@Xcol <\wd\tabu@box + \tabu@wddef\tabu@Xcol {\the\wd\tabu@box}% + \tabu@debug{\tabu@message@endpboxmeasure}% + \fi + \else % spread coef>0 + \global\advance \tabu@naturalX \wd\tabu@box + \@tempdima =\dimexpr \wd\tabu@box *\p@/\dimexpr \tabu@temp\p@\relax \relax + \ifdim \tabu@naturalXmax <\tabu@naturalX + \xdef\tabu@naturalXmax {\the\tabu@naturalX}\fi + \ifdim \tabu@naturalXmin <\@tempdima + \xdef\tabu@naturalXmin {\the\@tempdima}\fi + \fi + \box\tabu@box \egroup % end of \vtop (measure) restore \tabu@target +}% \tabu@endpboxmeasure +\def\tabu@wddef #1{\expandafter\xdef + \csname tabu@\the\tabu@nested.W\number#1\endcsname} +\def\tabu@wd #1{\csname tabu@\the\tabu@nested.W\number#1\endcsname} +\def\tabu@message@endpboxmeasure{\tabu@spaces\tabu@spaces<-> % <-> save natural wd + \the\tabu@Xcol. X[\tabu@temp]: + target = \the\tabucolX \space + \expandafter\expandafter\expandafter\string\tabu@wd\tabu@Xcol + =\tabu@wd\tabu@Xcol +}% \tabu@message@endpboxmeasure +\def\tabu@startpboxquick {\bgroup + \let\@startpbox \tabu@startpboxORI % restore immediately + \let\tabu \tabu@quick % \begin is expanded before... + \expandafter\@gobble \@startpbox % gobbles \bgroup +}% \tabu@startpboxquick +\def\tabu@quick {\begingroup \iffalse{\fi \ifnum0=`}\fi + \toks@{}\def\tabu@stack{b}\tabu@collectbody \tabu@endquick +}% \tabu@quick +\def\tabu@endquick {% + \ifodd 1\ifx\tabu@end@envir\tabu@endtabu \else + \ifx\tabu@end@envir\tabu@endtabus \else 0\fi\fi\relax + \endgroup + \else \let\endtabu \relax + \tabu@end@envir + \fi +}% \tabu@quick +\def\tabu@endtabu {\end{tabu}} +\def\tabu@endtabus {\end{tabu*}} +%% Measuring the heights and depths - store the results ------------- +\def\tabu@verticalmeasure{\everypar{}% + \ifnum \currentgrouptype>12 % 14=semi-simple, 15=math shift group + \setbox\tabu@box =\hbox\bgroup + \let\tabu@verticalspacing \tabu@verticalsp@lcr + \d@llarbegin % after \hbox ... + \else + \edef\tabu@temp{\ifnum\currentgrouptype=5\vtop + \else\ifnum\currentgrouptype=12\vcenter + \else\vbox\fi\fi}% + \setbox\tabu@box \hbox\bgroup$\tabu@temp \bgroup + \let\tabu@verticalspacing \tabu@verticalsp@pmb + \fi +}% \tabu@verticalmeasure +\def\tabu@verticalsp@lcr{% + \d@llarend \egroup % + \@tempdima \dimexpr \ht\tabu@box+\abovetabulinesep + \@tempdimb \dimexpr \dp\tabu@box+\belowtabulinesep \relax + \ifdim\tabustrutrule>\z@ \tabu@debug{\tabu@message@verticalsp}\fi + \ifdim \tabu@ht<\@tempdima \tabu@htdef{\the\@tempdima}\fi + \ifdim \tabu@dp<\@tempdimb \tabu@dpdef{\the\@tempdimb}\fi + \noindent\vrule height\@tempdima depth\@tempdimb +}% \tabu@verticalsp@lcr +\def\tabu@verticalsp@pmb{% inserts struts as needed + \par \expandafter\egroup + \expandafter$\expandafter + \egroup \expandafter + \@tempdimc \the\prevdepth + \@tempdima \dimexpr \ht\tabu@box+\abovetabulinesep + \@tempdimb \dimexpr \dp\tabu@box+\belowtabulinesep \relax + \ifdim\tabustrutrule>\z@ \tabu@debug{\tabu@message@verticalsp}\fi + \ifdim \tabu@ht<\@tempdima \tabu@htdef{\the\@tempdima}\fi + \ifdim \tabu@dp<\@tempdimb \tabu@dpdef{\the\@tempdimb}\fi + \let\@finalstrut \@gobble + \hrule height\@tempdima depth\@tempdimb width\hsize +%% \box\tabu@box +}% \tabu@verticalsp@pmb + +\def\tabu@verticalinit{% + \ifnum \c@taburow=\z@ \tabu@rearstrut \fi % after \tabu@reset ! + \advance\c@taburow \@ne + \tabu@htdef{\the\ht\@arstrutbox}\tabu@dpdef{\the\dp\@arstrutbox}% + \advance\c@taburow \m@ne +}% \tabu@verticalinit +\def\tabu@htdef {\expandafter\xdef \csname tabu@\the\tabu@nested.H\the\c@taburow\endcsname} +\def\tabu@ht {\csname tabu@\the\tabu@nested.H\the\c@taburow\endcsname} +\def\tabu@dpdef {\expandafter\xdef \csname tabu@\the\tabu@nested.D\the\c@taburow\endcsname} +\def\tabu@dp {\csname tabu@\the\tabu@nested.D\the\c@taburow\endcsname} +\def\tabu@verticaldynamicadjustment {% + \advance\c@taburow \@ne + \extrarowheight \dimexpr\tabu@ht - \ht\strutbox + \extrarowdepth \dimexpr\tabu@dp - \dp\strutbox + \let\arraystretch \@empty + \advance\c@taburow \m@ne +}% \tabu@verticaldynamicadjustment +\def\tabuphantomline{\crcr \noalign{% + {\globaldefs \@ne + \setbox\@arstrutbox \box\voidb@x + \let\tabu@@celllalign \tabu@celllalign + \let\tabu@@cellralign \tabu@cellralign + \let\tabu@@cellleft \tabu@cellleft + \let\tabu@@cellright \tabu@cellright + \let\tabu@@thevline \tabu@thevline + \let\tabu@celllalign \@empty + \let\tabu@cellralign \@empty + \let\tabu@cellright \@empty + \let\tabu@cellleft \@empty + \let\tabu@thevline \relax}% + \edef\tabu@temp{\tabu@multispan \tabu@nbcols{\noindent &}}% + \toks@\expandafter{\tabu@temp \noindent\tabu@everyrowfalse \cr + \noalign{\tabu@rearstrut + {\globaldefs\@ne + \let\tabu@celllalign \tabu@@celllalign + \let\tabu@cellralign \tabu@@cellralign + \let\tabu@cellleft \tabu@@cellleft + \let\tabu@cellright \tabu@@cellright + \let\tabu@thevline \tabu@@thevline}}}% + \expandafter}\the\toks@ +}% \tabuphantomline +%% \firsthline and \lasthline corrections --------------------------- +\def\tabu@firstline {\tabu@hlineAZ \tabu@firsthlinecorrection {}} +\def\tabu@firsthline{\tabu@hlineAZ \tabu@firsthlinecorrection \hline} +\def\tabu@lastline {\tabu@hlineAZ \tabu@lasthlinecorrection {}} +\def\tabu@lasthline {\tabu@hlineAZ \tabu@lasthlinecorrection \hline} +\def\tabu@hline {% replaces \hline if no colortbl (see \AtBeginDocument) + \noalign{\ifnum0=`}\fi + {\CT@arc@\hrule height\arrayrulewidth}% + \futurelet \tabu@temp \tabu@xhline +}% \tabu@hline +\def\tabu@xhline{% + \ifx \tabu@temp \hline + {\ifx \CT@drsc@\relax \vskip + \else\ifx \CT@drsc@\@empty \vskip + \else \CT@drsc@\hrule height + \fi\fi + \doublerulesep}% + \fi + \ifnum0=`{\fi}% +}% \tabu@xhline +\def\tabu@hlineAZ #1#2{\noalign{\ifnum0=`}\fi \dimen@ \z@ \count@ \z@ + \toks@{}\def\tabu@hlinecorrection{#1}\def\tabu@temp{#2}% + \tabu@hlineAZsurround +}% \tabu@hlineAZ +\newcommand*\tabu@hlineAZsurround[1][\extratabsurround]{% + \extratabsurround #1\let\tabucline \tabucline@scan + \let\hline \tabu@hlinescan \let\firsthline \hline + \let\cline \tabu@clinescan \let\lasthline \hline + \expandafter \futurelet \expandafter \tabu@temp + \expandafter \tabu@nexthlineAZ \tabu@temp +}% \tabu@hlineAZsurround +\def\tabu@hlinescan {\tabu@thick \arrayrulewidth \tabu@xhlineAZ \hline} +\def\tabu@clinescan #1{\tabu@thick \arrayrulewidth \tabu@xhlineAZ {\cline{#1}}} +\def\tabucline@scan{\@testopt \tabucline@sc@n {}} +\def\tabucline@sc@n #1[#2]{\tabu@xhlineAZ {\tabucline[{#1}]{#2}}} +\def\tabu@nexthlineAZ{% + \ifx \tabu@temp\hline \else + \ifx \tabu@temp\cline \else + \ifx \tabu@temp\tabucline \else + \tabu@hlinecorrection + \fi\fi\fi +}% \tabu@nexthlineAZ +\def\tabu@xhlineAZ #1{% + \toks@\expandafter{\the\toks@ #1}% + \@tempdimc \tabu@thick % The last line width + \ifcase\count@ \@tempdimb \tabu@thick % The first line width + \else \advance\dimen@ \dimexpr \tabu@thick+\doublerulesep \relax + \fi + \advance\count@ \@ne \futurelet \tabu@temp \tabu@nexthlineAZ +}% \tabu@xhlineAZ +\def\tabu@firsthlinecorrection{% \count@ = number of \hline -1 + \@tempdima \dimexpr \ht\@arstrutbox+\dimen@ + \edef\firsthline{% + \omit \hbox to\z@{\hss{\noexpand\tabu@DBG{yellow}\vrule + height \the\dimexpr\@tempdima+\extratabsurround + depth \dp\@arstrutbox + width \tabustrutrule}\hss}\cr + \noalign{\vskip -\the\dimexpr \@tempdima+\@tempdimb + +\dp\@arstrutbox \relax}% + \the\toks@ + }\ifnum0=`{\fi + \expandafter}\firsthline % we are then ! +}% \tabu@firsthlinecorrection +\def\tabu@lasthlinecorrection{% + \@tempdima \dimexpr \dp\@arstrutbox+\dimen@+\@tempdimb+\@tempdimc + \edef\lasthline{% + \the\toks@ + \noalign{\vskip -\the\dimexpr\dimen@+\@tempdimb+\dp\@arstrutbox}% + \omit \hbox to\z@{\hss{\noexpand\tabu@DBG{yellow}\vrule + depth \the\dimexpr \dp\@arstrutbox+\@tempdimb+\dimen@ + +\extratabsurround-\@tempdimc + height \z@ + width \tabustrutrule}\hss}\cr + }\ifnum0=`{\fi + \expandafter}\lasthline % we are then ! +}% \tabu@lasthlinecorrection +\def\tabu@LT@@hline{% + \ifx\LT@next\hline + \global\let\LT@next \@gobble + \ifx \CT@drsc@\relax + \gdef\CT@LT@sep{% + \noalign{\penalty-\@medpenalty\vskip\doublerulesep}}% + \else + \gdef\CT@LT@sep{% + \multispan\LT@cols{% + \CT@drsc@\leaders\hrule\@height\doublerulesep\hfill}\cr}% + \fi + \else + \global\let\LT@next\empty + \gdef\CT@LT@sep{% + \noalign{\penalty-\@lowpenalty\vskip-\arrayrulewidth}}% + \fi + \ifnum0=`{\fi}% + \multispan\LT@cols + {\CT@arc@\leaders\hrule\@height\arrayrulewidth\hfill}\cr + \CT@LT@sep + \multispan\LT@cols + {\CT@arc@\leaders\hrule\@height\arrayrulewidth\hfill}\cr + \noalign{\penalty\@M}% + \LT@next +}% \tabu@LT@@hline +%% Horizontal lines : \tabucline ------------------------------------ +\let\tabu@start \@tempcnta +\let\tabu@stop \@tempcntb +\newcommand*\tabucline{\noalign{\ifnum0=`}\fi \tabu@cline} +\newcommand*\tabu@cline[2][]{\tabu@startstop{#2}% + \ifnum \tabu@stop<\z@ \toks@{}% + \else \tabu@clinearg{#1}\tabu@thestyle + \edef\tabucline{\toks@{% + \ifnum \tabu@start>\z@ \omit + \tabu@multispan\tabu@start {\span\omit}&\fi + \omit \tabu@multispan\tabu@stop {\span\omit}% + \tabu@thehline\cr + }}\tabucline + \tabu@tracinglines{(tabu:tabucline) Style: #1^^J\the\toks@^^J^^J}% + \fi + \futurelet \tabu@temp \tabu@xcline +}% \tabu@cline +\def\tabu@clinearg #1{% + \ifx\\#1\\\let\tabu@thestyle \tabu@ls@ + \else \@defaultunits \expandafter\let\expandafter\@tempa + \romannumeral-`\0#1\relax \@nnil + \ifx \hbox\@tempa \tabu@clinebox{#1}% + \else\ifx \box\@tempa \tabu@clinebox{#1}% + \else\ifx \vbox\@tempa \tabu@clinebox{#1}% + \else\ifx \vtop\@tempa \tabu@clinebox{#1}% + \else\ifx \copy\@tempa \tabu@clinebox{#1}% + \else\ifx \leaders\@tempa \tabu@clineleads{#1}% + \else\ifx \cleaders\@tempa \tabu@clineleads{#1}% + \else\ifx \xleaders\@tempa \tabu@clineleads{#1}% + \else\tabu@getline {#1}% + \fi\fi\fi\fi\fi\fi\fi\fi + \fi +}% \tabu@clinearg +\def\tabu@clinebox #1{\tabu@clineleads{\xleaders#1\hss}} +\def\tabu@clineleads #1{% + \let\tabu@thestyle \relax \let\tabu@leaders \@undefined + \gdef\tabu@thehrule{#1}} +\def\tabu@thehline{\begingroup + \ifdefined\tabu@leaders + \noexpand\tabu@thehleaders + \else \noexpand\tabu@thehrule + \fi \endgroup +}% \tabu@thehline +\def\tabu@xcline{% + \ifx \tabu@temp\tabucline + \toks@\expandafter{\the\toks@ \noalign + {\ifx\CT@drsc@\relax \vskip + \else \CT@drsc@\hrule height + \fi + \doublerulesep}}% + \fi + \tabu@docline +}% \tabu@xcline +\def\tabu@docline {\ifnum0=`{\fi \expandafter}\the\toks@} +\def\tabu@docline@evr {\xdef\tabu@doclineafter{\the\toks@}% + \ifnum0=`{\fi}\aftergroup\tabu@doclineafter} +\def\tabu@multispan #1#2{% + \ifnum\numexpr#1>\@ne #2\expandafter\tabu@multispan + \else \expandafter\@gobbletwo + \fi {#1-1}{#2}% +}% \tabu@multispan +\def\tabu@startstop #1{\tabu@start@stop #1\relax 1-\tabu@nbcols \@nnil} +\def\tabu@start@stop #1-#2\@nnil{% + \@defaultunits \tabu@start\number 0#1\relax \@nnil + \@defaultunits \tabu@stop \number 0#2\relax \@nnil + \tabu@stop \ifnum \tabu@start>\tabu@nbcols \m@ne + \else\ifnum \tabu@stop=\z@ \tabu@nbcols + \else\ifnum \tabu@stop>\tabu@nbcols \tabu@nbcols + \else \tabu@stop + \fi\fi\fi + \advance\tabu@start \m@ne + \ifnum \tabu@start>\z@ \advance\tabu@stop -\tabu@start \fi +}% \tabu@start@stop +%% Numbers: siunitx S columns (and \tabudecimal) ------------------- +\def\tabu@tabudecimal #1{% + \def\tabu@decimal{#1}\@temptokena{}% + \let\tabu@getdecimal@ \tabu@getdecimal@ignorespaces + \tabu@scandecimal +}% \tabu@tabudecimal +\def\tabu@scandecimal{\futurelet \tabu@temp \tabu@getdecimal@} +\def\tabu@skipdecimal#1{#1\tabu@scandecimal} +\def\tabu@getdecimal@ignorespaces{% + \ifcase 0\ifx\tabu@temp\ignorespaces\else + \ifx\tabu@temp\@sptoken1\else + 2\fi\fi\relax + \let\tabu@getdecimal@ \tabu@getdecimal + \expandafter\tabu@skipdecimal + \or \expandafter\tabu@gobblespace\expandafter\tabu@scandecimal + \else \expandafter\tabu@skipdecimal + \fi +}% \tabu@getdecimal@ignorespaces +\def\tabu@get@decimal#1{\@temptokena\expandafter{\the\@temptokena #1}% + \tabu@scandecimal} +\def\do#1{% + \def\tabu@get@decimalspace#1{% + \@temptokena\expandafter{\the\@temptokena #1}\tabu@scandecimal}% +}\do{ } +\let\tabu@@tabudecimal \tabu@tabudecimal +\def\tabu@getdecimal{% + \ifcase 0\ifx 0\tabu@temp\else + \ifx 1\tabu@temp\else + \ifx 2\tabu@temp\else + \ifx 3\tabu@temp\else + \ifx 4\tabu@temp\else + \ifx 5\tabu@temp\else + \ifx 6\tabu@temp\else + \ifx 7\tabu@temp\else + \ifx 8\tabu@temp\else + \ifx 9\tabu@temp\else + \ifx .\tabu@temp\else + \ifx ,\tabu@temp\else + \ifx -\tabu@temp\else + \ifx +\tabu@temp\else + \ifx e\tabu@temp\else + \ifx E\tabu@temp\else + \ifx\tabu@cellleft\tabu@temp1\else + \ifx\ignorespaces\tabu@temp1\else + \ifx\@sptoken\tabu@temp2\else + 3\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\relax + \expandafter\tabu@get@decimal + \or \expandafter\tabu@skipdecimal + \or \expandafter\tabu@get@decimalspace + \else\expandafter\tabu@printdecimal + \fi +}% \tabu@getdecimal +\def\tabu@printdecimal{% + \edef\tabu@temp{\the\@temptokena}% + \ifx\tabu@temp\@empty\else + \ifx\tabu@temp\space\else + \expandafter\tabu@decimal\expandafter{\the\@temptokena}% + \fi\fi +}% \tabu@printdecimal +%% Verbatim inside X columns ---------------------------------------- +\def\tabu@verbatim{% + \let\verb \tabu@verb + \let\FV@DefineCheckEnd \tabu@FV@DefineCheckEnd +}% \tabu@verbatim +\let\tabu@ltx@verb \verb +\def\tabu@verb{\@ifstar {\tabu@ltx@verb*} \tabu@ltx@verb} +\def\tabu@fancyvrb {% + \def\tabu@FV@DefineCheckEnd ##1{% + \def\tabu@FV@DefineCheckEnd{% + ##1% + \let\FV@CheckEnd \tabu@FV@CheckEnd + \let\FV@@CheckEnd \tabu@FV@@CheckEnd + \let\FV@@@CheckEnd \tabu@FV@@@CheckEnd + \edef\FV@EndScanning{% + \def\noexpand\next{\noexpand\end{\FV@EnvironName}}% + \global\let\noexpand\FV@EnvironName\relax + \noexpand\next}% + \xdef\FV@EnvironName{\detokenize\expandafter{\FV@EnvironName}}}% + }\expandafter\tabu@FV@DefineCheckEnd\expandafter{\FV@DefineCheckEnd} +}% \tabu@fancyvrb +\def\tabu@FV@CheckEnd #1{\expandafter\FV@@CheckEnd \detokenize{#1\end{}}\@nil} +\edef\tabu@FV@@@CheckEnd {\detokenize{\end{}}} +\begingroup +\catcode`\[1 \catcode`\]2 +\@makeother\{ \@makeother\} + \edef\x[\endgroup + \def\noexpand\tabu@FV@@CheckEnd ##1\detokenize[\end{]##2\detokenize[}]##3% + ]\x \@nil{\def\@tempa{#2}\def\@tempb{#3}} +\def\tabu@FV@ListProcessLine #1{% + \hbox {%to \hsize{% + \kern\leftmargin + \hbox {%to \linewidth{% + \FV@LeftListNumber + \FV@LeftListFrame + \FancyVerbFormatLine{#1}\hss +%% DG/SR modification begin - Jan. 28, 1998 (for numbers=right add-on) +%% \FV@RightListFrame}% + \FV@RightListFrame + \FV@RightListNumber}% +%% DG/SR modification end + \hss}} +%% \savetabu -------------------------------------------------------- +\newcommand*\savetabu[1]{\noalign{% + \tabu@sanitizearg{#1}\tabu@temp + \ifx \tabu@temp\@empty \tabu@savewarn{}{The tabu will not be saved}\else + \@ifundefined{tabu@saved@\tabu@temp}{}{\tabu@savewarn{#1}{Overwriting}}% + \ifdefined\tabu@restored \expandafter\let + \csname tabu@saved@\tabu@temp \endcsname \tabu@restored + \else {\tabu@save}% + \fi + \fi}% +}% \savetabu +\def\tabu@save {% + \toks0\expandafter{\tabu@saved@}% + \iftabu@negcoef + \let\tabu@wddef \relax \let\tabu@ \tabu@savewd \edef\tabu@savewd{\tabu@Xcoefs}% + \toks0\expandafter{\the\toks\expandafter0\tabu@savewd}\fi + \toks1\expandafter{\tabu@savedpream}% + \toks2\expandafter{\tabu@savedpreamble}% + \let\@preamble \relax + \let\tabu@savedpream \relax \let\tabu@savedparams \relax + \edef\tabu@preamble{% + \def\noexpand\tabu@aligndefault{\tabu@align}% + \def\tabu@savedparams {\noexpand\the\toks0}% + \def\tabu@savedpream {\noexpand\the\toks1}}% + \edef\tabu@usetabu{% + \def\@preamble {\noexpand\the\toks2}% + \tabu@target \the\tabu@target \relax + \tabucolX \the\tabucolX \relax + \tabu@nbcols \the\tabu@nbcols \relax + \def\noexpand\tabu@aligndefault{\tabu@align}% + \def\tabu@savedparams {\noexpand\the\toks0}% + \def\tabu@savedpream {\noexpand\the\toks1}}% + \let\tabu@aligndefault \relax \let\@sharp \relax + \edef\@tempa{\noexpand\tabu@s@ved + {\tabu@usetabu} + {\tabu@preamble} + {\the\toks1}}\@tempa + \tabu@message@save +}% \tabu@save +\long\def\tabu@s@ved #1#2#3{% + \def\tabu@usetabu{#1}% + \expandafter\gdef\csname tabu@saved@\tabu@temp\endcsname ##1{% + \ifodd ##1% \usetabu + \tabu@measuringfalse \tabu@spreadfalse % Just in case... + \gdef\tabu@usetabu {% + \ifdim \tabu@target>\z@ \tabu@warn@usetabu \fi + \global\let\tabu@usetabu \@undefined + \def\@halignto {to\tabu@target}% + #1% + \ifx \tabu@align\tabu@aligndefault@text + \ifnum \tabu@nested=\z@ + \let\tabu@align \tabu@aligndefault \fi\fi}% + \else % \preamble + \gdef\tabu@preamble {% + \global\let\tabu@preamble \@undefined + #2% + \ifx \tabu@align\tabu@aligndefault@text + \ifnum \tabu@nested=\z@ + \let\tabu@align \tabu@aligndefault \fi\fi}% + \fi + #3}% +}% \tabu@s@ved +\def\tabu@aligndefault@text {\tabu@aligndefault}% +\def\tabu@warn@usetabu {\PackageWarning{tabu} + {Specifying a target with \string\usetabu\space is useless + \MessageBreak The target cannot be changed!}} +\def\tabu@savewd #1#2{\ifdim #2\p@<\z@ \tabu@wddef{#1}{\tabu@wd{#1}}\fi} +\def\tabu@savewarn#1#2{\PackageInfo{tabu} + {User-name `#1' already used for \string\savetabu + \MessageBreak #2}}% +\def\tabu@saveerr#1{\PackageError{tabu} + {User-name `#1' is unknown for \string\usetabu + \MessageBreak I cannot restore an unknown preamble!}\@ehd} +%% \rowfont --------------------------------------------------------- +\newskip \tabu@cellskip +\def\tabu@rowfont{\ifdim \baselineskip=\z@\noalign\fi + {\ifnum0=`}\fi \tabu@row@font} +\newcommand*\tabu@row@font[2][]{% + \ifnum7=\currentgrouptype + \global\let\tabu@@cellleft \tabu@cellleft + \global\let\tabu@@cellright \tabu@cellright + \global\let\tabu@@celllalign \tabu@celllalign + \global\let\tabu@@cellralign \tabu@cellralign + \global\let\tabu@@rowfontreset\tabu@rowfontreset + \fi + \global\let\tabu@rowfontreset \tabu@rowfont@reset + \expandafter\gdef\expandafter\tabu@cellleft\expandafter{\tabu@cellleft #2}% + \ifcsname tabu@cell@#1\endcsname % row alignment + \csname tabu@cell@#1\endcsname \fi + \ifnum0=`{\fi}% end of group / noalign group +}% \rowfont +\def\tabu@ifcolorleavevmode #1{\let\color \tabu@leavevmodecolor #1\let\color\tabu@color}% +\def\tabu@rowfont@reset{% + \global\let\tabu@rowfontreset \tabu@@rowfontreset + \global\let\tabu@cellleft \tabu@@cellleft + \global\let\tabu@cellright \tabu@@cellright + \global\let\tabu@cellfont \@empty + \global\let\tabu@celllalign \tabu@@celllalign + \global\let\tabu@cellralign \tabu@@cellralign +}% \tabu@@rowfontreset +\let\tabu@rowfontreset \@empty % overwritten \AtBeginDocument if colortbl +%% \tabu@prepnext@tok ----------------------------------------------- +\newif \iftabu@cellright +\def\tabu@prepnext@tok{% + \ifnum \count@<\z@ % + \@tempcnta \@M % + \tabu@nbcols\z@ + \let\tabu@fornoopORI \@fornoop + \tabu@cellrightfalse + \else + \ifcase \numexpr \count@-\@tempcnta \relax % (case 0): prev. token is left + \advance \tabu@nbcols \@ne + \iftabu@cellright % before-previous token is right and is finished + \tabu@cellrightfalse % + \tabu@righttok + \fi + \tabu@lefttok + \or % (case 1) previous token is right + \tabu@cellrighttrue \let\@fornoop \tabu@lastnoop + \else % special column: do not change the token + \iftabu@cellright % before-previous token is right + \tabu@cellrightfalse + \tabu@righttok + \fi + \fi % \ifcase + \fi + \tabu@prepnext@tokORI +}% \tabu@prepnext@tok +\long\def\tabu@lastnoop#1\@@#2#3{\tabu@lastn@@p #2\@nextchar \in@\in@@} +\def\tabu@lastn@@p #1\@nextchar #2#3\in@@{% + \ifx \in@#2\else + \let\@fornoop \tabu@fornoopORI + \xdef\tabu@mkpreambuffer{\tabu@nbcols\the\tabu@nbcols \tabu@mkpreambuffer}% + \toks0\expandafter{\expandafter\tabu@everyrowtrue \the\toks0}% + \expandafter\prepnext@tok + \fi +}% \tabu@lastnoop +\def\tabu@righttok{% + \advance \count@ \m@ne + \toks\count@\expandafter {\the\toks\count@ \tabu@cellright \tabu@cellralign}% + \advance \count@ \@ne +}% \tabu@righttok +\def\tabu@lefttok{\toks\count@\expandafter{\expandafter\tabu@celllalign + \the\toks\count@ \tabu@cellleft}% after because of $ +}% \tabu@lefttok +%% Neutralisation of glues ------------------------------------------ +\let\tabu@cellleft \@empty +\let\tabu@cellright \@empty +\tabu@celllalign@def{\tabu@cellleft}% +\let\tabu@cellralign \@empty +\def\tabu@cell@align #1#2#3{% + \let\tabu@maybesiunitx \toks@ \tabu@celllalign + \global \expandafter \tabu@celllalign@def \expandafter {\the\toks@ #1}% + \toks@\expandafter{\tabu@cellralign #2}% + \xdef\tabu@cellralign{\the\toks@}% + \toks@\expandafter{\tabu@cellleft #3}% + \xdef\tabu@cellleft{\the\toks@}% +}% \tabu@cell@align +\def\tabu@cell@l{% force alignment to left + \tabu@cell@align + {\tabu@removehfil \raggedright \tabu@cellleft}% left + {\tabu@flush1\tabu@ignorehfil}% right + \raggedright +}% \tabu@cell@l +\def\tabu@cell@c{% force alignment to center + \tabu@cell@align + {\tabu@removehfil \centering \tabu@flush{.5}\tabu@cellleft} + {\tabu@flush{.5}\tabu@ignorehfil} + \centering +}% \tabu@cell@c +\def\tabu@cell@r{% force alignment to right + \tabu@cell@align + {\tabu@removehfil \raggedleft \tabu@flush1\tabu@cellleft} + \tabu@ignorehfil + \raggedleft +}% \tabu@cell@r +\def\tabu@cell@j{% force justification (for p, m, b columns) + \tabu@cell@align + {\tabu@justify\tabu@cellleft} + {} + \tabu@justify +}% \tabu@cell@j +\def\tabu@justify{% + \leftskip\z@skip \@rightskip\leftskip \rightskip\@rightskip + \parfillskip\@flushglue +}% \tabu@justify +%% ragged2e settings +\def\tabu@cell@L{% force alignment to left (ragged2e) + \tabu@cell@align + {\tabu@removehfil \RaggedRight \tabu@cellleft} + {\tabu@flush 1\tabu@ignorehfil} + \RaggedRight +}% \tabu@cell@L +\def\tabu@cell@C{% force alignment to center (ragged2e) + \tabu@cell@align + {\tabu@removehfil \Centering \tabu@flush{.5}\tabu@cellleft} + {\tabu@flush{.5}\tabu@ignorehfil} + \Centering +}% \tabu@cell@C +\def\tabu@cell@R{% force alignment to right (ragged2e) + \tabu@cell@align + {\tabu@removehfil \RaggedLeft \tabu@flush 1\tabu@cellleft} + \tabu@ignorehfil + \RaggedLeft +}% \tabu@cell@R +\def\tabu@cell@J{% force justification (ragged2e) + \tabu@cell@align + {\justifying \tabu@cellleft} + {} + \justifying +}% \tabu@cell@J +\def\tabu@flush#1{% + \iftabu@colortbl % colortbl uses \hfill rather than \hfil + \hskip \ifnum13<\currentgrouptype \stretch{#1}% + \else \ifdim#1pt<\p@ \tabu@cellskip + \else \stretch{#1} + \fi\fi \relax + \else % array.sty + \ifnum 13<\currentgrouptype + \hfil \hskip1sp \relax \fi + \fi +}% \tabu@flush +\let\tabu@hfil \hfil +\let\tabu@hfill \hfill +\let\tabu@hskip \hskip +\def\tabu@removehfil{% + \iftabu@colortbl + \unkern \tabu@cellskip =\lastskip + \ifnum\gluestretchorder\tabu@cellskip =\tw@ \hskip-\tabu@cellskip + \else \tabu@cellskip \z@skip + \fi + \else + \ifdim\lastskip=1sp\unskip\fi + \ifnum\gluestretchorder\lastskip =\@ne + \hfilneg % \hfilneg for array.sty but not for colortbl... + \fi + \fi +}% \tabu@removehfil +\def\tabu@ignorehfil{\aftergroup \tabu@nohfil} +\def\tabu@nohfil{% \hfil -> do nothing + restore original \hfil + \def\hfil{\let\hfil \tabu@hfil}% local to (alignment template) group +}% \tabu@nohfil +\def\tabu@colortblalignments {% if colortbl + \def\tabu@nohfil{% + \def\hfil {\let\hfil \tabu@hfil}% local to (alignment template) group + \def\hfill {\let\hfill \tabu@hfill}% (colortbl uses \hfill) pfff... + \def\hskip ####1\relax{\let\hskip \tabu@hskip}}% local +}% \tabu@colortblalignments +%% Taking care of footnotes and hyperfootnotes ---------------------- +\long\def\tabu@footnotetext #1{% + \edef\@tempa{\the\tabu@footnotes + \noexpand\footnotetext [\the\csname c@\@mpfn\endcsname]}% + \global\tabu@footnotes\expandafter{\@tempa {#1}}}% +\long\def\tabu@xfootnotetext [#1]#2{% + \global\tabu@footnotes\expandafter{\the\tabu@footnotes + \footnotetext [{#1}]{#2}}} +\let\tabu@xfootnote \@xfootnote +\long\def\tabu@Hy@ftntext{\tabu@Hy@ftntxt {\the \c@footnote }} +\long\def\tabu@Hy@xfootnote [#1]{% + \begingroup + \value\@mpfn #1\relax + \protected@xdef \@thefnmark {\thempfn}% + \endgroup + \@footnotemark \tabu@Hy@ftntxt {#1}% +}% \tabu@Hy@xfootnote +\long\def\tabu@Hy@ftntxt #1#2{% + \edef\@tempa{% + \the\tabu@footnotes + \begingroup + \value\@mpfn #1\relax + \noexpand\protected@xdef\noexpand\@thefnmark {\noexpand\thempfn}% + \expandafter \noexpand \expandafter + \tabu@Hy@footnotetext \expandafter{\Hy@footnote@currentHref}% + }% + \global\tabu@footnotes\expandafter{\@tempa {#2}% + \endgroup}% +}% \tabu@Hy@ftntxt +\long\def\tabu@Hy@footnotetext #1#2{% + \H@@footnotetext{% + \ifHy@nesting + \hyper@@anchor {#1}{#2}% + \else + \Hy@raisedlink{% + \hyper@@anchor {#1}{\relax}% + }% + \def\@currentHref {#1}% + \let\@currentlabelname \@empty + #2% + \fi + }% +}% \tabu@Hy@footnotetext +%% No need for \arraybackslash ! ------------------------------------ +\def\tabu@latextwoe {% +\def\tabu@temp##1##2##3{{\toks@\expandafter{##2##3}\xdef##1{\the\toks@}}} +\tabu@temp \tabu@centering \centering \arraybackslash +\tabu@temp \tabu@raggedleft \raggedleft \arraybackslash +\tabu@temp \tabu@raggedright \raggedright \arraybackslash +}% \tabu@latextwoe +\def\tabu@raggedtwoe {% +\def\tabu@temp ##1##2##3{{\toks@\expandafter{##2##3}\xdef##1{\the\toks@}}} +\tabu@temp \tabu@Centering \Centering \arraybackslash +\tabu@temp \tabu@RaggedLeft \RaggedLeft \arraybackslash +\tabu@temp \tabu@RaggedRight \RaggedRight \arraybackslash +\tabu@temp \tabu@justifying \justifying \arraybackslash +}% \tabu@raggedtwoe +\def\tabu@normalcrbackslash{\let\\\@normalcr} +\def\tabu@trivlist{\expandafter\def\expandafter\@trivlist\expandafter{% + \expandafter\tabu@normalcrbackslash \@trivlist}} +%% Utilities: \fbox \fcolorbox and \tabudecimal ------------------- +\def\tabu@fbox {\leavevmode\afterassignment\tabu@beginfbox \setbox\@tempboxa\hbox} +\def\tabu@beginfbox {\bgroup \kern\fboxsep + \bgroup\aftergroup\tabu@endfbox} +\def\tabu@endfbox {\kern\fboxsep\egroup\egroup + \@frameb@x\relax} +\def\tabu@color@b@x #1#2{\leavevmode \bgroup + \def\tabu@docolor@b@x{#1{#2\color@block{\wd\z@}{\ht\z@}{\dp\z@}\box\z@}}% + \afterassignment\tabu@begincolor@b@x \setbox\z@ \hbox +}% \tabu@color@b@x +\def\tabu@begincolor@b@x {\kern\fboxsep \bgroup + \aftergroup\tabu@endcolor@b@x \set@color} +\def\tabu@endcolor@b@x {\kern\fboxsep \egroup + \dimen@\ht\z@ \advance\dimen@ \fboxsep \ht\z@ \dimen@ + \dimen@\dp\z@ \advance\dimen@ \fboxsep \dp\z@ \dimen@ + \tabu@docolor@b@x \egroup +}% \tabu@endcolor@b@x +%% Corrections (arydshln, delarray, colortbl) ----------------------- +\def\tabu@fix@arrayright {%% \@arrayright is missing from \endarray + \iftabu@colortbl + \ifdefined\adl@array % + \def\tabu@endarray{% + \adl@endarray \egroup \adl@arrayrestore \CT@end \egroup % + \@arrayright % + \gdef\@preamble{}}% + \else % + \def\tabu@endarray{% + \crcr \egroup \egroup % + \@arrayright % + \gdef\@preamble{}\CT@end}% + \fi + \else + \ifdefined\adl@array % + \def\tabu@endarray{% + \adl@endarray \egroup \adl@arrayrestore \egroup % + \@arrayright % + \gdef\@preamble{}}% + \else % + \PackageWarning{tabu} + {\string\@arrayright\space is missing from the + \MessageBreak definition of \string\endarray. + \MessageBreak Compatibility with delarray.sty is broken.}% + \fi\fi +}% \tabu@fix@arrayright +\def\tabu@adl@xarraydashrule #1#2#3{% + \ifnum\@lastchclass=\adl@class@start\else + \ifnum\@lastchclass=\@ne\else + \ifnum\@lastchclass=5 \else % @-arg (class 5) and !-arg (class 1) + \adl@leftrulefalse \fi\fi % must be treated the same + \fi + \ifadl@zwvrule\else \ifadl@inactive\else + \@addtopreamble{\vrule\@width\arrayrulewidth + \@height\z@ \@depth\z@}\fi \fi + \ifadl@leftrule + \@addtopreamble{\adl@vlineL{\CT@arc@}{\adl@dashgapcolor}% + {\number#1}#3}% + \else \@addtopreamble{\adl@vlineR{\CT@arc@}{\adl@dashgapcolor}% + {\number#2}#3} + \fi +}% \tabu@adl@xarraydashrule +\def\tabu@adl@act@endpbox {% + \unskip \ifhmode \nobreak \fi \@finalstrut \@arstrutbox + \egroup \egroup + \adl@colhtdp \box\adl@box \hfil +}% \tabu@adl@act@endpbox +\def\tabu@adl@fix {% + \let\adl@xarraydashrule \tabu@adl@xarraydashrule % arydshln + \let\adl@act@endpbox \tabu@adl@act@endpbox % arydshln + \let\adl@act@@endpbox \tabu@adl@act@endpbox % arydshln + \let\@preamerror \@preamerr % arydshln +}% \tabu@adl@fix +%% Correction for longtable' \@startbox definition ------------------ +%% => \everypar is ``missing'' : TeX should be in vertical mode +\def\tabu@LT@startpbox #1{% + \bgroup + \let\@footnotetext\LT@p@ftntext + \setlength\hsize{#1}% + \@arrayparboxrestore + \everypar{% + \vrule \@height \ht\@arstrutbox \@width \z@ + \everypar{}}% +}% \tabu@LT@startpbox +%% \tracingtabu and the package options ------------------ +\DeclareOption{delarray}{\AtEndOfPackage{\RequirePackage{delarray}}} +\DeclareOption{linegoal}{% + \AtEndOfPackage{% + \RequirePackage{linegoal}[2010/12/07]% + \let\tabudefaulttarget \linegoal% \linegoal is \linewidth if not pdfTeX +}} +\DeclareOption{scantokens}{\tabuscantokenstrue} +\DeclareOption{debugshow}{\AtEndOfPackage{\tracingtabu=\tw@}} +\def\tracingtabu {\begingroup\@ifnextchar=% + {\afterassignment\tabu@tracing\count@} + {\afterassignment\tabu@tracing\count@1\relax}} +\def\tabu@tracing{\expandafter\endgroup + \expandafter\tabu@tr@cing \the\count@ \relax +}% \tabu@tracing +\def\tabu@tr@cing #1\relax {% + \ifnum#1>\thr@@ \let\tabu@tracinglines\message + \else \let\tabu@tracinglines\@gobble + \fi + \ifnum#1>\tw@ \let\tabu@DBG \tabu@@DBG + \def\tabu@mkarstrut {\tabu@DBG@arstrut}% + \tabustrutrule 1.5\p@ + \else \let\tabu@DBG \@gobble + \def\tabu@mkarstrut {\tabu@arstrut}% + \tabustrutrule \z@ + \fi + \ifnum#1>\@ne \let\tabu@debug \message + \else \let\tabu@debug \@gobble + \fi + \ifnum#1>\z@ + \let\tabu@message \message + \let\tabu@tracing@save \tabu@message@save + \let\tabu@starttimer \tabu@pdftimer + \else + \let\tabu@message \@gobble + \let\tabu@tracing@save \@gobble + \let\tabu@starttimer \relax + \fi +}% \tabu@tr@cing +%% Setup \AtBeginDocument +\AtBeginDocument{\tabu@AtBeginDocument} +\def\tabu@AtBeginDocument{\let\tabu@AtBeginDocument \@undefined + \ifdefined\arrayrulecolor \tabu@colortbltrue % + \tabu@colortblalignments % different glues are used + \else \tabu@colortblfalse \fi + \ifdefined\CT@arc@ \else \let\CT@arc@ \relax \fi + \ifdefined\CT@drsc@\else \let\CT@drsc@ \relax \fi + \let\tabu@arc@L \CT@arc@ \let\tabu@drsc@L \CT@drsc@ + \ifodd 1\ifcsname siunitx_table_collect_begin:Nn\endcsname % + \expandafter\ifx + \csname siunitx_table_collect_begin:Nn\endcsname\relax 0\fi\fi\relax + \tabu@siunitxtrue + \else \let\tabu@maybesiunitx \@firstofone % + \let\tabu@siunitx \tabu@nosiunitx + \tabu@siunitxfalse + \fi + \ifdefined\adl@array % + \else \let\tabu@adl@fix \relax + \let\tabu@adl@endtrial \@empty \fi + \ifdefined\longtable % + \else \let\longtabu \tabu@nolongtabu \fi + \ifdefined\cellspacetoplimit \tabu@warn@cellspace\fi + \csname\ifcsname ifHy@hyperfootnotes\endcsname % + ifHy@hyperfootnotes\else iffalse\fi\endcsname + \let\tabu@footnotetext \tabu@Hy@ftntext + \let\tabu@xfootnote \tabu@Hy@xfootnote \fi + \ifdefined\FV@DefineCheckEnd% + \tabu@fancyvrb \fi + \ifdefined\color % + \let\tabu@color \color + \def\tabu@leavevmodecolor ##1{% + \def\tabu@leavevmodecolor {\leavevmode ##1}% + }\expandafter\tabu@leavevmodecolor\expandafter{\color}% + \else + \let\tabu@color \tabu@nocolor + \let\tabu@leavevmodecolor \@firstofone \fi + \tabu@latextwoe + \ifdefined\@raggedtwoe@everyselectfont % + \tabu@raggedtwoe + \else + \let\tabu@cell@L \tabu@cell@l + \let\tabu@cell@R \tabu@cell@r + \let\tabu@cell@C \tabu@cell@c + \let\tabu@cell@J \tabu@cell@j \fi + \expandafter\in@ \expandafter\@arrayright \expandafter{\endarray}% + \ifin@ \let\tabu@endarray \endarray + \else \tabu@fix@arrayright \fi% + \everyrow{}% +}% \tabu@AtBeginDocument +\def\tabu@warn@cellspace{% + \PackageWarning{tabu}{% + Package cellspace has some limitations + \MessageBreak And redefines some macros of array.sty. + \MessageBreak Please use \string\tabulinesep\space to control + \MessageBreak vertical spacing of lines inside tabu environment}% +}% \tabu@warn@cellspace +%% tabu Package initialisation +\tabuscantokensfalse +\let\tabu@arc@G \relax +\let\tabu@drsc@G \relax +\let\tabu@evr@G \@empty +\let\tabu@rc@G \@empty +\def\tabu@ls@G {\tabu@linestyle@}% +\let\tabu@@rowfontreset \@empty % +\let\tabu@@celllalign \@empty +\let\tabu@@cellralign \@empty +\let\tabu@@cellleft \@empty +\let\tabu@@cellright \@empty +\def\tabu@naturalXmin {\z@} +\def\tabu@naturalXmax {\z@} +\let\tabu@rowfontreset \@empty +\def\tabulineon {4pt}\let\tabulineoff \tabulineon +\tabu@everyrowtrue +\ifdefined\pdfelapsedtime % + \def\tabu@pdftimer {\xdef\tabu@starttime{\the\pdfelapsedtime}}% +\else \let\tabu@pdftimer \relax \let\tabu@message@etime \relax +\fi +\tracingtabu=\z@ +\newtabulinestyle {=\maxdimen}% creates the 'factory' settings \tabu@linestyle@ +\tabulinestyle{} +\taburowcolors{} +\let\tabudefaulttarget \linewidth +\ProcessOptions* % \ProcessOptions* is quicker ! +\endinput +%% +%% End of file `tabu.sty'. diff --git a/External/open-cpp-utils/Documentation/latex/template__utils_8h.tex b/External/open-cpp-utils/Documentation/latex/template__utils_8h.tex new file mode 100644 index 0000000..4d5be10 --- /dev/null +++ b/External/open-cpp-utils/Documentation/latex/template__utils_8h.tex @@ -0,0 +1,53 @@ +\doxysection{template\+\_\+utils.\+h File Reference} +\hypertarget{template__utils_8h}{}\label{template__utils_8h}\index{template\_utils.h@{template\_utils.h}} + + +Provides compile time evaluation utilities for templates and template packs. + + +\doxysubsubsection*{Classes} +\begin{DoxyCompactItemize} +\item +struct \mbox{\hyperlink{structopen__cpp__utils_1_1constant__value}{open\+\_\+cpp\+\_\+utils\+::constant\+\_\+value$<$ T, V $>$}} +\begin{DoxyCompactList}\small\item\em Compile-\/time constant value. \end{DoxyCompactList}\end{DoxyCompactItemize} +\doxysubsubsection*{Typedefs} +\begin{DoxyCompactItemize} +\item +{\footnotesize template$<$bool V$>$ }\\using \mbox{\hyperlink{template__utils_8h_a74d5cb86637293f20ed9afa2d8b31b2c}{open\+\_\+cpp\+\_\+utils\+::bool\+\_\+constant}} = \mbox{\hyperlink{structopen__cpp__utils_1_1constant__value}{constant\+\_\+value}}$<$bool, V$>$ +\begin{DoxyCompactList}\small\item\em Compile-\/time constant boolean value. \end{DoxyCompactList}\item +\Hypertarget{template__utils_8h_ae3d98e273a29dae107e182245e79ed5a}\label{template__utils_8h_ae3d98e273a29dae107e182245e79ed5a} +using {\bfseries open\+\_\+cpp\+\_\+utils\+::true\+\_\+type} = \mbox{\hyperlink{template__utils_8h_a74d5cb86637293f20ed9afa2d8b31b2c}{bool\+\_\+constant}}$<$true$>$ +\begin{DoxyCompactList}\small\item\em Constant True value. \end{DoxyCompactList}\item +\Hypertarget{template__utils_8h_a4ac0ee6113dff45d27ed390839625f7f}\label{template__utils_8h_a4ac0ee6113dff45d27ed390839625f7f} +using {\bfseries open\+\_\+cpp\+\_\+utils\+::false\+\_\+type} = \mbox{\hyperlink{template__utils_8h_a74d5cb86637293f20ed9afa2d8b31b2c}{bool\+\_\+constant}}$<$false$>$ +\begin{DoxyCompactList}\small\item\em Constant False value. \end{DoxyCompactList}\end{DoxyCompactItemize} +\doxysubsubsection*{Variables} +\begin{DoxyCompactItemize} +\item +\Hypertarget{template__utils_8h_a3be9237e3c8b624b8e25579c7ad42c96}\label{template__utils_8h_a3be9237e3c8b624b8e25579c7ad42c96} +{\footnotesize template$<$typename T , typename... Ts$>$ }\\constexpr bool {\bfseries open\+\_\+cpp\+\_\+utils\+::is\+\_\+unique$<$ T, Ts... $>$} = \mbox{\hyperlink{template__utils_8h_a74d5cb86637293f20ed9afa2d8b31b2c}{bool\+\_\+constant}}$<$(!is\+\_\+same$<$T, Ts$>$ \&\& ...) \&\& is\+\_\+unique$<$Ts...$>$$>$\{\} +\end{DoxyCompactItemize} + + +\doxysubsection{Detailed Description} +Provides compile time evaluation utilities for templates and template packs. + + + +\doxysubsection{Typedef Documentation} +\Hypertarget{template__utils_8h_a74d5cb86637293f20ed9afa2d8b31b2c}\label{template__utils_8h_a74d5cb86637293f20ed9afa2d8b31b2c} +\index{template\_utils.h@{template\_utils.h}!bool\_constant@{bool\_constant}} +\index{bool\_constant@{bool\_constant}!template\_utils.h@{template\_utils.h}} +\doxysubsubsection{\texorpdfstring{bool\_constant}{bool\_constant}} +{\footnotesize\ttfamily template$<$bool V$>$ \\ +using \mbox{\hyperlink{template__utils_8h_a74d5cb86637293f20ed9afa2d8b31b2c}{open\+\_\+cpp\+\_\+utils\+::bool\+\_\+constant}} = constant\+\_\+value$<$bool, V$>$} + + + +Compile-\/time constant boolean value. + + +\begin{DoxyTemplParams}{Template Parameters} +{\em V} & Value \\ +\hline +\end{DoxyTemplParams} diff --git a/External/open-cpp-utils/Documentation/latex/template__utils_8h_source.tex b/External/open-cpp-utils/Documentation/latex/template__utils_8h_source.tex new file mode 100644 index 0000000..0a315ce --- /dev/null +++ b/External/open-cpp-utils/Documentation/latex/template__utils_8h_source.tex @@ -0,0 +1,57 @@ +\doxysection{template\+\_\+utils.\+h} +\hypertarget{template__utils_8h_source}{}\label{template__utils_8h_source}\mbox{\hyperlink{template__utils_8h}{Go to the documentation of this file.}} +\begin{DoxyCode}{0} +\DoxyCodeLine{00001\ \textcolor{comment}{//\ =====================================================================================================================}} +\DoxyCodeLine{00002\ \textcolor{comment}{//\ Copyright\ 2024\ Medusa\ Slockbower}} +\DoxyCodeLine{00003\ \textcolor{comment}{//\ Licensed\ under\ the\ Apache\ License,\ Version\ 2.0\ (the\ "{}License"{});}} +\DoxyCodeLine{00004\ \textcolor{comment}{//\ you\ may\ not\ use\ this\ file\ except\ in\ compliance\ with\ the\ License.}} +\DoxyCodeLine{00005\ \textcolor{comment}{//\ You\ may\ obtain\ a\ copy\ of\ the\ License\ at}} +\DoxyCodeLine{00006\ \textcolor{comment}{//}} +\DoxyCodeLine{00007\ \textcolor{comment}{//\ \ http://www.apache.org/licenses/LICENSE-\/2.0}} +\DoxyCodeLine{00008\ \textcolor{comment}{//}} +\DoxyCodeLine{00009\ \textcolor{comment}{//\ Unless\ required\ by\ applicable\ law\ or\ agreed\ to\ in\ writing,\ software}} +\DoxyCodeLine{00010\ \textcolor{comment}{//\ distributed\ under\ the\ License\ is\ distributed\ on\ an\ "{}AS\ IS"{}\ BASIS,}} +\DoxyCodeLine{00011\ \textcolor{comment}{//\ WITHOUT\ WARRANTIES\ OR\ CONDITIONS\ OF\ ANY\ KIND,\ either\ express\ or\ implied.}} +\DoxyCodeLine{00012\ \textcolor{comment}{//\ See\ the\ License\ for\ the\ specific\ language\ governing\ permissions\ and}} +\DoxyCodeLine{00013\ \textcolor{comment}{//\ limitations\ under\ the\ License.}} +\DoxyCodeLine{00014\ \textcolor{comment}{//\ =====================================================================================================================}} +\DoxyCodeLine{00015\ } +\DoxyCodeLine{00016\ \textcolor{preprocessor}{\#ifndef\ TEMPLATEUTILS\_H}} +\DoxyCodeLine{00017\ \textcolor{preprocessor}{\#define\ TEMPLATEUTILS\_H}} +\DoxyCodeLine{00018\ } +\DoxyCodeLine{00019\ \textcolor{keyword}{namespace\ }open\_cpp\_utils} +\DoxyCodeLine{00020\ \{} +\DoxyCodeLine{00021\ } +\DoxyCodeLine{00032\ \textcolor{keyword}{template}<\textcolor{keyword}{typename}\ T,\ T\ V>} +\DoxyCodeLine{00033\ \textcolor{keyword}{struct\ }\mbox{\hyperlink{structopen__cpp__utils_1_1constant__value}{constant\_value}}} +\DoxyCodeLine{00034\ \{} +\DoxyCodeLine{00035\ \ \ \ \ \textcolor{keyword}{using\ }type\ =\ T;} +\DoxyCodeLine{00036\ \ \ \ \ \textcolor{keyword}{static}\ \textcolor{keyword}{constexpr}\ type\ value\ =\ V;} +\DoxyCodeLine{00037\ } +\DoxyCodeLine{00038\ \ \ \ \ \textcolor{keyword}{constexpr}\ \textcolor{keyword}{operator}\ type()\ \textcolor{keyword}{const}\ \textcolor{keyword}{noexcept}\ \{\ \textcolor{keywordflow}{return}\ value;\ \}} +\DoxyCodeLine{00039\ \ \ \ \ [[nodiscard]]\ \textcolor{keyword}{constexpr}\ type\ operator()()\textcolor{keyword}{\ const\ }\{\ \textcolor{keywordflow}{return}\ value;\ \}} +\DoxyCodeLine{00040\ \};} +\DoxyCodeLine{00041\ } +\DoxyCodeLine{00046\ \textcolor{keyword}{template}<\textcolor{keywordtype}{bool}\ V>} +\DoxyCodeLine{00047\ \textcolor{keyword}{using\ }\mbox{\hyperlink{structopen__cpp__utils_1_1constant__value}{bool\_constant}}\ =\ \mbox{\hyperlink{structopen__cpp__utils_1_1constant__value}{constant\_value}};} +\DoxyCodeLine{00048\ } +\DoxyCodeLine{00049\ \textcolor{keyword}{using\ }\mbox{\hyperlink{structopen__cpp__utils_1_1constant__value}{true\_type}}\ \ =\ \mbox{\hyperlink{structopen__cpp__utils_1_1constant__value}{bool\_constant}};\ } +\DoxyCodeLine{00050\ \textcolor{keyword}{using\ }\mbox{\hyperlink{structopen__cpp__utils_1_1constant__value}{false\_type}}\ =\ \mbox{\hyperlink{structopen__cpp__utils_1_1constant__value}{bool\_constant}};\ } +\DoxyCodeLine{00051\ } +\DoxyCodeLine{00055\ \textcolor{keyword}{template}<\textcolor{keyword}{typename},\ \textcolor{keyword}{typename}>} +\DoxyCodeLine{00056\ \textcolor{keyword}{inline}\ \textcolor{keyword}{static}\ \textcolor{keyword}{constexpr}\ \textcolor{keywordtype}{bool}\ is\_same\ =\ \mbox{\hyperlink{structopen__cpp__utils_1_1constant__value}{false\_type}}\{\};} +\DoxyCodeLine{00057\ } +\DoxyCodeLine{00061\ \textcolor{keyword}{template}<\textcolor{keyword}{typename}\ T>} +\DoxyCodeLine{00062\ \textcolor{keyword}{inline}\ \textcolor{keyword}{static}\ \textcolor{keyword}{constexpr}\ \textcolor{keywordtype}{bool}\ is\_same\ =\ true\_type\{\};} +\DoxyCodeLine{00063\ } +\DoxyCodeLine{00068\ \textcolor{keyword}{template}<\textcolor{keyword}{typename}...Ts>} +\DoxyCodeLine{00069\ \textcolor{keyword}{inline}\ \textcolor{keyword}{static}\ \textcolor{keyword}{constexpr}\ \textcolor{keywordtype}{bool}\ is\_unique\ =\ \mbox{\hyperlink{template__utils_8h_ae3d98e273a29dae107e182245e79ed5a}{true\_type}}\{\};} +\DoxyCodeLine{00070\ } +\DoxyCodeLine{00071\ \textcolor{keyword}{template}<\textcolor{keyword}{typename}\ T,\ \textcolor{keyword}{typename}...Ts>} +\DoxyCodeLine{00072\ \textcolor{keyword}{inline}\ \textcolor{keyword}{constexpr}\ \textcolor{keywordtype}{bool}\ is\_unique\ =\ \mbox{\hyperlink{template__utils_8h_a74d5cb86637293f20ed9afa2d8b31b2c}{bool\_constant}}<(!is\_same\ \&\&\ ...)\ \&\&\ is\_unique>\{\};} +\DoxyCodeLine{00073\ } +\DoxyCodeLine{00074\ \}} +\DoxyCodeLine{00075\ } +\DoxyCodeLine{00076\ \textcolor{preprocessor}{\#endif\ }\textcolor{comment}{//TEMPLATEUTILS\_H}} + +\end{DoxyCode} diff --git a/External/open-cpp-utils/Documentation/latex/types_8h_source.tex b/External/open-cpp-utils/Documentation/latex/types_8h_source.tex new file mode 100644 index 0000000..d43cb08 --- /dev/null +++ b/External/open-cpp-utils/Documentation/latex/types_8h_source.tex @@ -0,0 +1,57 @@ +\doxysection{types.\+h} +\hypertarget{types_8h_source}{}\label{types_8h_source} +\begin{DoxyCode}{0} +\DoxyCodeLine{00001\ \textcolor{comment}{//}} +\DoxyCodeLine{00002\ \textcolor{comment}{//\ Created\ by\ Maddie\ on\ 7/25/2024.}} +\DoxyCodeLine{00003\ \textcolor{comment}{//}} +\DoxyCodeLine{00004\ } +\DoxyCodeLine{00005\ \textcolor{preprocessor}{\#ifndef\ TYPES\_H}} +\DoxyCodeLine{00006\ \textcolor{preprocessor}{\#define\ TYPES\_H}} +\DoxyCodeLine{00007\ } +\DoxyCodeLine{00008\ \textcolor{preprocessor}{\#include\ }} +\DoxyCodeLine{00009\ } +\DoxyCodeLine{00010\ \textcolor{keyword}{namespace\ }open\_cpp\_utils} +\DoxyCodeLine{00011\ \{} +\DoxyCodeLine{00012\ } +\DoxyCodeLine{00013\ using\ ::int8\_t;} +\DoxyCodeLine{00014\ using\ ::int16\_t;} +\DoxyCodeLine{00015\ using\ ::int32\_t;} +\DoxyCodeLine{00016\ using\ ::int64\_t;} +\DoxyCodeLine{00017\ } +\DoxyCodeLine{00018\ using\ ::int\_fast8\_t;} +\DoxyCodeLine{00019\ using\ ::int\_fast16\_t;} +\DoxyCodeLine{00020\ using\ ::int\_fast32\_t;} +\DoxyCodeLine{00021\ using\ ::int\_fast64\_t;} +\DoxyCodeLine{00022\ } +\DoxyCodeLine{00023\ using\ ::int\_least8\_t;} +\DoxyCodeLine{00024\ using\ ::int\_least16\_t;} +\DoxyCodeLine{00025\ using\ ::int\_least32\_t;} +\DoxyCodeLine{00026\ using\ ::int\_least64\_t;} +\DoxyCodeLine{00027\ } +\DoxyCodeLine{00028\ using\ ::intmax\_t;} +\DoxyCodeLine{00029\ using\ ::intptr\_t;} +\DoxyCodeLine{00030\ } +\DoxyCodeLine{00031\ using\ ::uint8\_t;} +\DoxyCodeLine{00032\ using\ ::uint16\_t;} +\DoxyCodeLine{00033\ using\ ::uint32\_t;} +\DoxyCodeLine{00034\ using\ ::uint64\_t;} +\DoxyCodeLine{00035\ } +\DoxyCodeLine{00036\ using\ ::uint\_fast8\_t;} +\DoxyCodeLine{00037\ using\ ::uint\_fast16\_t;} +\DoxyCodeLine{00038\ using\ ::uint\_fast32\_t;} +\DoxyCodeLine{00039\ using\ ::uint\_fast64\_t;} +\DoxyCodeLine{00040\ } +\DoxyCodeLine{00041\ using\ ::uint\_least8\_t;} +\DoxyCodeLine{00042\ using\ ::uint\_least16\_t;} +\DoxyCodeLine{00043\ using\ ::uint\_least32\_t;} +\DoxyCodeLine{00044\ using\ ::uint\_least64\_t;} +\DoxyCodeLine{00045\ } +\DoxyCodeLine{00046\ using\ ::uintmax\_t;} +\DoxyCodeLine{00047\ using\ ::uintptr\_t;} +\DoxyCodeLine{00048\ } +\DoxyCodeLine{00049\ \}} +\DoxyCodeLine{00050\ } +\DoxyCodeLine{00051\ } +\DoxyCodeLine{00052\ \textcolor{preprocessor}{\#endif\ }\textcolor{comment}{//TYPES\_H}} + +\end{DoxyCode} diff --git a/External/open-cpp-utils/Documentation/latex/unique__id_8h_source.tex b/External/open-cpp-utils/Documentation/latex/unique__id_8h_source.tex new file mode 100644 index 0000000..a9447a5 --- /dev/null +++ b/External/open-cpp-utils/Documentation/latex/unique__id_8h_source.tex @@ -0,0 +1,48 @@ +\doxysection{unique\+\_\+id.\+h} +\hypertarget{unique__id_8h_source}{}\label{unique__id_8h_source} +\begin{DoxyCode}{0} +\DoxyCodeLine{00001\ \textcolor{comment}{//\ =====================================================================================================================}} +\DoxyCodeLine{00002\ \textcolor{comment}{//\ Copyright\ 2024\ Medusa\ Slockbower}} +\DoxyCodeLine{00003\ \textcolor{comment}{//\ Licensed\ under\ the\ Apache\ License,\ Version\ 2.0\ (the\ "{}License"{});}} +\DoxyCodeLine{00004\ \textcolor{comment}{//\ you\ may\ not\ use\ this\ file\ except\ in\ compliance\ with\ the\ License.}} +\DoxyCodeLine{00005\ \textcolor{comment}{//\ You\ may\ obtain\ a\ copy\ of\ the\ License\ at}} +\DoxyCodeLine{00006\ \textcolor{comment}{//}} +\DoxyCodeLine{00007\ \textcolor{comment}{//\ \ http://www.apache.org/licenses/LICENSE-\/2.0}} +\DoxyCodeLine{00008\ \textcolor{comment}{//}} +\DoxyCodeLine{00009\ \textcolor{comment}{//\ Unless\ required\ by\ applicable\ law\ or\ agreed\ to\ in\ writing,\ software}} +\DoxyCodeLine{00010\ \textcolor{comment}{//\ distributed\ under\ the\ License\ is\ distributed\ on\ an\ "{}AS\ IS"{}\ BASIS,}} +\DoxyCodeLine{00011\ \textcolor{comment}{//\ WITHOUT\ WARRANTIES\ OR\ CONDITIONS\ OF\ ANY\ KIND,\ either\ express\ or\ implied.}} +\DoxyCodeLine{00012\ \textcolor{comment}{//\ See\ the\ License\ for\ the\ specific\ language\ governing\ permissions\ and}} +\DoxyCodeLine{00013\ \textcolor{comment}{//\ limitations\ under\ the\ License.}} +\DoxyCodeLine{00014\ \textcolor{comment}{//\ =====================================================================================================================}} +\DoxyCodeLine{00015\ } +\DoxyCodeLine{00016\ \textcolor{preprocessor}{\#ifndef\ ENGINE\_UNIQUEID\_H}} +\DoxyCodeLine{00017\ \textcolor{preprocessor}{\#define\ ENGINE\_UNIQUEID\_H}} +\DoxyCodeLine{00018\ } +\DoxyCodeLine{00019\ \textcolor{preprocessor}{\#include\ "{}types.h"{}}} +\DoxyCodeLine{00020\ } +\DoxyCodeLine{00021\ \textcolor{keyword}{namespace\ }open\_cpp\_utils} +\DoxyCodeLine{00022\ \{} +\DoxyCodeLine{00023\ } +\DoxyCodeLine{00024\ \textcolor{comment}{//\ Internal\ function\ for\ incrementing\ an\ id\ associated\ with\ a\ type}} +\DoxyCodeLine{00025\ \textcolor{keyword}{template}<\textcolor{keyword}{typename}\ Base>\ uint64\_t\ \_increment\_id()} +\DoxyCodeLine{00026\ \{} +\DoxyCodeLine{00027\ \ \ \ \ \textcolor{keyword}{static}\ uint64\_t\ current\ =\ 0;} +\DoxyCodeLine{00028\ \ \ \ \ \textcolor{keywordflow}{return}\ current++;} +\DoxyCodeLine{00029\ \}} +\DoxyCodeLine{00030\ } +\DoxyCodeLine{00044\ \textcolor{keyword}{template}<\textcolor{keyword}{typename}\ Base,\ \textcolor{keyword}{typename}\ Type>\ uint64\_t\ unique\_id()} +\DoxyCodeLine{00045\ \{} +\DoxyCodeLine{00046\ \ \ \ \ \textcolor{keyword}{static}\ \textcolor{keywordtype}{bool}\ initialized\ =\ \textcolor{keyword}{false};} +\DoxyCodeLine{00047\ \ \ \ \ \textcolor{keyword}{static}\ uint64\_t\ \textcolor{keywordtype}{id}\ =\ 0;} +\DoxyCodeLine{00048\ } +\DoxyCodeLine{00049\ \ \ \ \ \textcolor{keywordflow}{if}(initialized)\ \textcolor{keywordflow}{return}\ id;} +\DoxyCodeLine{00050\ \ \ \ \ initialized\ =\ \textcolor{keyword}{true};} +\DoxyCodeLine{00051\ \ \ \ \ \textcolor{keywordflow}{return}\ \textcolor{keywordtype}{id}\ =\ \_increment\_id();} +\DoxyCodeLine{00052\ \}} +\DoxyCodeLine{00053\ } +\DoxyCodeLine{00054\ \}} +\DoxyCodeLine{00055\ } +\DoxyCodeLine{00056\ \textcolor{preprocessor}{\#endif\ }\textcolor{comment}{//ENGINE\_UNIQUEID\_H}} + +\end{DoxyCode} diff --git a/External/open-cpp-utils/Doxyfile.in b/External/open-cpp-utils/Doxyfile.in new file mode 100644 index 0000000..ebd62ca --- /dev/null +++ b/External/open-cpp-utils/Doxyfile.in @@ -0,0 +1,5 @@ +OUTPUT_DIRECTORY = "@CMAKE_CURRENT_SOURCE_DIR@/Documentation/" +INPUT = "@CMAKE_CURRENT_SOURCE_DIR@/README.md" "@CMAKE_CURRENT_SOURCE_DIR@/" +RECURSIVE = YES +PROJECT_NAME = "@DOXYGEN_PROJECT_NAME@" +PROJECT_NUMBER = "@CMAKE_PROJECT_VERSION@" \ No newline at end of file diff --git a/External/open-cpp-utils/LICENSE b/External/open-cpp-utils/LICENSE new file mode 100644 index 0000000..261eeb9 --- /dev/null +++ b/External/open-cpp-utils/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/External/open-cpp-utils/README.md b/External/open-cpp-utils/README.md new file mode 100644 index 0000000..4a0c6a6 --- /dev/null +++ b/External/open-cpp-utils/README.md @@ -0,0 +1,2 @@ +# open-cpp-utils +Open Source Utilities for C++ diff --git a/Include/OpenGL/Type.h b/External/open-cpp-utils/Test/Test.cpp similarity index 79% rename from Include/OpenGL/Type.h rename to External/open-cpp-utils/Test/Test.cpp index 957b169..f30dfd9 100644 --- a/Include/OpenGL/Type.h +++ b/External/open-cpp-utils/Test/Test.cpp @@ -13,18 +13,13 @@ // limitations under the License. // ===================================================================================================================== -#ifndef TYPE_H -#define TYPE_H +#include -#include +#include "../object_pool.h" -namespace GLW + +int main(char** args, int argc) { - using OffsetT = GLintptr; - using SizeT = GLsizeiptr; - using IndexT = GLuint; - using FlagT = GLbitfield; - using HandleT = GLuint; + open_cpp_utils::object_pool test; + return 0; } - -#endif //TYPE_H diff --git a/External/open-cpp-utils/any.h b/External/open-cpp-utils/any.h new file mode 100644 index 0000000..7afdccd --- /dev/null +++ b/External/open-cpp-utils/any.h @@ -0,0 +1,90 @@ +// ===================================================================================================================== +// Copyright 2024 Medusa Slockbower +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ===================================================================================================================== + +#ifndef ANY_H +#define ANY_H + +#include "template_utils.h" + +namespace open_cpp_utils +{ + +/** + * \brief Wrapper for a value with multiple types + * \tparam Ts Types to include, must be unique + */ +template class any; + +template<> class any<> { }; + +template +class any : public any +{ +// Assertions ========================================================================================================== + + static_assert(is_unique); + + +// Typedefs ============================================================================================================ + +public: + using base_type = any; + + using this_type = T; + using reference = T&; + using const_reference = const T&; + using pointer = T*; + using const_pointer = const T*; + + +// Constructors ======================================================================================================== + +public: + any() : base_type() , Value() { } + any(const this_type& value, const Rest&...other) : base_type(other...), Value(value) { } + any(this_type&& value, Rest&&...other) : base_type(other...), Value(value) { } + any(const any& other) = default; + any(any&& other) = default; + ~any() = default; + + +// Operators =========================================================================================================== + +public: + +// Assignment operators ------------------------------------------------------------------------------------------------ + any& operator=(const any&) = default; + any& operator=(any&&) = default; + + +// Cast operators ------------------------------------------------------------------------------------------------------ + + operator reference() { return Value; } + operator const_reference() const { return Value; } + operator pointer() { return &Value; } + operator const_pointer() const { return &Value; } + + +// Variables =========================================================================================================== + +private: + static constexpr size_t Size = sizeof...(Rest); + this_type Value; +}; + +} + + +#endif //ANY_H diff --git a/External/open-cpp-utils/directed_tree.h b/External/open-cpp-utils/directed_tree.h new file mode 100644 index 0000000..ade9d89 --- /dev/null +++ b/External/open-cpp-utils/directed_tree.h @@ -0,0 +1,456 @@ +// ===================================================================================================================== +// Copyright 2024 Medusa Slockbower +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ===================================================================================================================== + +#ifndef DIRECTEDGRAPH_H +#define DIRECTEDGRAPH_H + +#include +#include + +namespace open_cpp_utils +{ + +/** + * \brief Class for creating a directed tree + * \tparam T Type of the data associated with each node + * + * The tree is a series of child nodes in forward linked lists. + * + */ +template +class directed_tree +{ +// Forward Definitions ================================================================================================= + +public: + class breadth_first; + class pre_order; + class in_order; + class post_order; + class unordered; + +private: + struct director; + + +// Typedefs ============================================================================================================ + +public: + using data_type = T; + using node = uint32_t; + using node_queue = std::deque; + +private: + using hierarchy = std::vector; + using storage = std::vector; + + +// Constants =========================================================================================================== + +public: + static constexpr std::integral_constant root{}; + + +// Data Structures ===================================================================================================== + +private: + struct director + { + enum flags + { + VALID = 0x0001 + }; + + node parent, child, prev_sibling, next_sibling; + uint32_t flags, depth; + + director() : parent(0), child(0), prev_sibling(0), next_sibling(0), flags(VALID), depth(0) { } + }; + + +// Functions =========================================================================================================== + +public: + +// Constructors & Destructor ------------------------------------------------------------------------------------------- + + /** + * \brief Default constructor, creates tree with empty root + */ + directed_tree() : graph_{ director() }, data_{ data_type() }, freed_{ } { } + + +// Tree Navigation ----------------------------------------------------------------------------------------------------- + + /** + * \brief Check whether a node is valid. O(1) + * \param id Node id to reference + * \return Whether the valid flag is true in the node + */ + [[nodiscard]] bool valid(node id) const { return graph_[id].flags & director::VALID; } + + /** + * \brief Get the parent of a node. O(1) + * \param id Node id to reference + * \return Node id of the parent + */ + [[nodiscard]] node parent(node id) const { return graph_[id].parent; } + + /** + * \brief Get the first child of a node. O(1) + * \param id Node id to reference + * \return Node id of the first child + */ + [[nodiscard]] node first_child(node id) const { return graph_[id].child; } + + /** + * \brief Get the previous sibling of a node. O(1) + * \param id Node id to reference + * \return Node id of the next sibling in the linked list + */ + [[nodiscard]] node prev_sibling(node id) const { return graph_[id].prev_sibling; } + + /** + * \brief Get the next sibling of a node. O(1) + * \param id Node id to reference + * \return Node id of the next sibling in the linked list + */ + [[nodiscard]] node next_sibling(node id) const { return graph_[id].next_sibling; } + + /** + * \brief Get the left most child of a node. O(log(n)) + * \param id Node id to reference + * \return Node id of the left most child + */ + [[nodiscard]] node left_most(node id) const + { + node current = id; + while(id = first_child(current)) current = id; + return current; + } + + /** + * \brief Get the depth of a node + * \param id + * \return + */ + [[nodiscard]] uint32_t depth(node id) const + { + uint32_t depth = 0; + while (id) + { + id = parent(id); + ++depth; + } + return depth; + } + + +// Tree Modification --------------------------------------------------------------------------------------------------- + + /** + * \brief Insert a node into the tree as a child of the provided node + * \param data Value to insert + * \param p_id Id of the parent node + * \return Id of the inserted node + */ + node insert(const data_type& data, node p_id) + { + // If there are no freed nodes, create a new node and mark it as freed + if(freed_.empty()) + { + freed_.push_back(static_cast(graph_.size())); + graph_.push_back(director()); data_.push_back(data); + } + + // Pop a freed node from the stack + node id = freed_.front(); freed_.pop_front(); + director& node = graph_[id]; + director& parent = graph_[p_id]; + + // If the parent has a child, update the child's references + if(parent.child) + { + // Update the next child + director& nchild = graph_[parent.child]; + node.prev_sibling = nchild.prev_sibling; + nchild.prev_sibling = id; + + // If present, update the previous child + if(nchild.prev_sibling) + { + director& pchild = graph_[nchild.prev_sibling]; + pchild.next_sibling = id; + } + } + + // Setup node + node.parent = p_id; + node.next_sibling = parent.child; + node.child = 0; + node.flags = director::VALID; + node.depth = parent.depth + 1; + + // Set parent's child + parent.child = id; + + // Set the data + data_[id] = data; + + return id; + } + + /** + * \brief Erase a node in the tree. O(n) + * \param id Id of the node to erase + */ + void erase(node id) + { + if(id == 0) return; + + // Mark node as invalid and push it to the freed list + director& erased = graph_[id]; + erased.Flags &= ~director::VALID; + freed_.push_back(id); + + // Update the parent's child + graph_[erased.parent].Child = erased.next_sibling; + + // Update siblings + if(erased.next_sibling) graph_[erased.next_sibling].prev_sibling = erased.prev_sibling; + if(erased.prev_sibling) graph_[erased.prev_sibling].next_sibling = erased.next_sibling; + + // Erase children - essentially breadth first propagation down the tree + node_queue stack{ erased.Child }; + while(stack.empty() == false) + { + node next = stack.front(); stack.pop_front(); + director& child = graph_[next]; + child.Flags &= ~director::VALID; + freed_.push_back(next); + + if(child.Sibling) stack.push_front(child.Sibling); + if(child.Child) stack.push_front(child.Child); + } + } + + +// Tree Access --------------------------------------------------------------------------------------------------------- + + /** + * \brief Getter for data associated with a node + * \param id Id of the node to access + * \return Reference to the node's data + */ + data_type& operator[](node id) { return data_[id]; } + + /** + * \brief Constant getter for data associated with a node + * \param node Id of the node to access + * \return Reference to the node's data + */ + [[nodiscard]] const data_type& operator[](node id) const { return data_[id]; } + + +// Visitor Pattern ----------------------------------------------------------------------------------------------------- + + /** + * \brief Traverser-Visitor pattern for accessing the tree + * \tparam V Visitor type. + * \tparam O Order type. Defaults to Pre-Order Traversal. + * \param visitor + */ + template + void traverse(V& visitor) + { + traverser traverser(*this, visitor); + traverser(); + } + + +// Variables ======================================================================================================= + +private: + hierarchy graph_; + storage data_; + node_queue freed_; + + +// Navigation ====================================================================================================== + +public: + + class unordered + { + public: + unordered(directed_tree& graph) : graph_(graph), current_(root) { } + + node operator()(node id) + { + while(!graph_.valid(current_) || current_ == root) + { + ++current_; + } + + id = current_; + current_ ++; + + return id == graph_.graph_.size() ? 0 : id; + } + + private: + directed_tree& graph_; + node current_; + }; + + /** + * \brief Breadth first traversal + */ + class breadth_first + { + public: + breadth_first(directed_tree& graph) : graph_(graph), visit_queue_(0) { } + + node operator()(node id) + { + id = visit_queue_.back(); visit_queue_.pop_back(); + director& current = graph_.graph_[id]; + + if(current.next_sibling) visit_queue_.push_back(current.next_sibling); + if(current.child) visit_queue_.push_front(current.child); + + if(visit_queue_.empty()) return 0; + return id; + } + + private: + directed_tree& graph_; + node_queue visit_queue_; + }; + + + /** + * \brief Pre-order traversal + */ + class pre_order + { + public: + pre_order(directed_tree& graph) : graph_(graph) { } + + node operator()(node id) + { + director& current = graph_.graph_[id]; + + if(current.next_sibling) visit_queue_.push_front(current.next_sibling); + if(current.child) visit_queue_.push_front(current.child); + + if(visit_queue_.empty()) return 0; + node next = visit_queue_.front(); visit_queue_.pop_front(); + return next; + } + + private: + directed_tree& graph_; + node_queue visit_queue_; + }; + + + /** + * \brief In-order traversal + */ + class in_order + { + public: + in_order(directed_tree& graph) : graph_(graph) { } + + node operator()(node node) + { + if(node == 0) visit_queue_.push_back(graph_.left_most(node)); + + node = visit_queue_.front(); visit_queue_.pop_front(); + director& current = graph_.graph_[node]; + + if(current.Sibling) + { + if(graph_.next_sibling(current.Sibling)) visit_queue_.push_back(current.parent); + visit_queue_.push_back(graph_.left_most(current.Sibling)); + } + + return node; + } + + private: + directed_tree& graph_; + node_queue visit_queue_; + }; + + + /** + * \brief Post-order traversal + */ + class post_order + { + public: + post_order(directed_tree& graph) : graph_(graph) { } + + node operator()(node node) + { + if(visit_queue_.empty()) visit_queue_.push_back(graph_.left_most(node)); + + node = visit_queue_.front(); visit_queue_.pop_front(); + if(node == 0) return node; + director& current = graph_.graph_[node]; + + visit_queue_.push_back(current.Sibling ? graph_.left_most(current.Sibling) : graph_.parent(node)); + + return node; + } + + private: + directed_tree& graph_; + node_queue visit_queue_; + }; + + + /** + * \brief Visitor pattern for traversing the tree + */ + template + class traverser + { + public: + using visitor_type = V; + using order_type = O; + + traverser(directed_tree& graph, visitor_type& visitor) : graph_(graph), visitor_(visitor), order_(graph) { } + + void operator()() + { + node node = 0; + while(node = order_(node)) + { + if(visitor_(graph_[node], node)) break; + } + } + + private: + directed_tree& graph_; + visitor_type& visitor_; + order_type order_; + }; +}; +} + +#endif //DIRECTEDGRAPH_H diff --git a/External/open-cpp-utils/object_pool.h b/External/open-cpp-utils/object_pool.h new file mode 100644 index 0000000..783c1ce --- /dev/null +++ b/External/open-cpp-utils/object_pool.h @@ -0,0 +1,89 @@ +// ===================================================================================================================== +// Copyright 2024 Medusa Slockbower +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ===================================================================================================================== + +#ifndef OBJECT_POOL_H +#define OBJECT_POOL_H + +#include +#include +#include +#include + +#include "template_utils.h" + +namespace open_cpp_utils +{ + +template> +class object_pool +{ +// Typedefs ============================================================================================================ + +public: + using value_type = T; + using pointer = T*; + using const_pointer = const T*; + using reference = T&; + using const_reference = const T&; + + using index_type = int64_t; + using uuid_type = uint64_t; + +private: + using node = std::tuple; + + +// Constants =========================================================================================================== + +public: + static constexpr std::integral_constant nullidx{}; + + +// Functions =========================================================================================================== + +public: + +// Constructors & Destructor ------------------------------------------------------------------------------------------- + + object_pool(); + + void clear(); + void reset(); + void cleanup(); + + uuid_type insert(const_reference& value); + void erase(uuid_type id); + void erase(index_type idx); + +// Accessors ----------------------------------------------------------------------------------------------------------- + + reference operator[](uuid_type id); + const_reference operator[](uuid_type id) const; + bool operator()(uuid_type id) const; + + reference operator[](index_type idx); + const_reference operator[](index_type idx) const; + bool operator()(index_type idx) const; + + +private: + std::vector data_; + _Hash map_; + std::stack freed_; +}; + +} // open_cpp_utils + +#endif //OBJECT_POOL_H diff --git a/External/open-cpp-utils/optional.h b/External/open-cpp-utils/optional.h new file mode 100644 index 0000000..c777dd6 --- /dev/null +++ b/External/open-cpp-utils/optional.h @@ -0,0 +1,72 @@ +// ===================================================================================================================== +// Copyright 2024 Medusa Slockbower +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ===================================================================================================================== + +#ifndef OPTIONAL_H +#define OPTIONAL_H + +#include + +namespace open_cpp_utils +{ + template + class optional + { + public: + using value_type = T; + + optional() : data_(), valid_(false) { } + optional(const value_type& data) : data_(data), valid_(true) { } + optional(value_type&& data) : data_(data), valid_(true) { } + optional(const optional& other) = default; + optional(optional&& other) = default; + + optional& operator=(const optional& other) = default; + optional& operator=(optional&& other) = default; + + optional& operator=(const value_type& data) { data_ = data; valid_ = true; return *this; } + optional& operator=(value_type&& data) { data_ = data; valid_ = true; return *this; } + + value_type& operator+=(const value_type& data) { assert(valid_); data_ += data; return data_; } + value_type& operator-=(const value_type& data) { assert(valid_); data_ += data; return data_; } + value_type& operator*=(const value_type& data) { assert(valid_); data_ += data; return data_; } + value_type& operator/=(const value_type& data) { assert(valid_); data_ += data; return data_; } + value_type& operator%=(const value_type& data) { assert(valid_); data_ += data; return data_; } + + value_type& operator<<=(const value_type& data) { assert(valid_); data_ <<= data; return data_; } + value_type& operator>>=(const value_type& data) { assert(valid_); data_ >>= data; return data_; } + value_type& operator|=(const value_type& data) { assert(valid_); data_ |= data; return data_; } + value_type& operator&=(const value_type& data) { assert(valid_); data_ &= data; return data_; } + value_type& operator^=(const value_type& data) { assert(valid_); data_ ^= data; return data_; } + + [[nodiscard]] bool operator()() const { return valid_; } + + operator value_type&() { assert(valid_); return data_; } + operator const value_type&() const { assert(valid_); return data_; } + + value_type* operator->() { assert(valid_); return &data_; } + const value_type* operator->() const { assert(valid_); return &data_; } + + value_type& operator*() { assert(valid_); return data_; } + const value_type& operator*() const { assert(valid_); return data_; } + + void reset() { valid_ = false; } + + private: + value_type data_; + bool valid_; + }; +} + +#endif //OPTIONAL_H diff --git a/Include/Utility/Startup.h b/External/open-cpp-utils/startup.h similarity index 100% rename from Include/Utility/Startup.h rename to External/open-cpp-utils/startup.h diff --git a/Include/Utility/UniqueID.h b/External/open-cpp-utils/template_utils.h similarity index 57% rename from Include/Utility/UniqueID.h rename to External/open-cpp-utils/template_utils.h index b2f933a..e898b4f 100644 --- a/Include/Utility/UniqueID.h +++ b/External/open-cpp-utils/template_utils.h @@ -13,33 +13,27 @@ // limitations under the License. // ===================================================================================================================== -#ifndef ENGINE_UNIQUEID_H -#define ENGINE_UNIQUEID_H +#ifndef TEMPLATEUTILS_H +#define TEMPLATEUTILS_H -#include - -#ifdef _MSC_VER -#define COUNTER __declspec(selectany) -#endif - -namespace OpenShaderDesigner +namespace open_cpp_utils { - template uint64_t _Increment() - { - static uint64_t current = 0; - return current++; - } - // Unfortunately adds a little bit of overhead at runtime - template uint64_t UniqueID() - { - static bool initialized = false; - static uint64_t id = 0; +/** + * \file template_utils.h + * \brief Provides compile time evaluation utilities for templates and template packs + */ + +/** + * \brief Check if a sequence of types is unique + * \tparam Ts + */ +template +inline static constexpr bool is_unique = std::true_type{}; + +template +inline constexpr bool is_unique = std::bool_constant<(!std::is_same_v && ...) && is_unique>{}; - if(initialized) return id; - initialized = true; - return id = _Increment(); - } } -#endif //ENGINE_UNIQUEID_H +#endif //TEMPLATEUTILS_H diff --git a/External/open-cpp-utils/unique_id.h b/External/open-cpp-utils/unique_id.h new file mode 100644 index 0000000..ee2416d --- /dev/null +++ b/External/open-cpp-utils/unique_id.h @@ -0,0 +1,56 @@ +// ===================================================================================================================== +// Copyright 2024 Medusa Slockbower +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ===================================================================================================================== + +#ifndef ENGINE_UNIQUEID_H +#define ENGINE_UNIQUEID_H + +#include + +namespace open_cpp_utils +{ + +// Internal function for incrementing an id associated with a type +template uint64_t _increment_id() +{ + static uint64_t current = 0; + return current++; +} + +/** + * \brief Generate a unique id for a type given a base type + * \tparam Base Base type for id categorization + * \tparam Type Type for id generation + * \return Generated ID for Type and Base combination + * + * Example: + * + * unique_id() = 0 + * unique_id() = 1 + * + * unique_id() = 0 + */ +template uint64_t unique_id() +{ + static bool initialized = false; + static uint64_t id = 0; + + if(initialized) return id; + initialized = true; + return id = _increment_id(); +} + +} + +#endif //ENGINE_UNIQUEID_H diff --git a/External/open-cpp-utils/vcpkg.json b/External/open-cpp-utils/vcpkg.json new file mode 100644 index 0000000..c2eba69 --- /dev/null +++ b/External/open-cpp-utils/vcpkg.json @@ -0,0 +1,9 @@ +{ + "name" : "open-cpp-utils", + "version-string" : "1.0.0", + "builtin-baseline" : "7a57b42f959ad138a5283477fe2e6c97a7cb852f", + "dependencies" : [ { + "name" : "gtest", + "version>=" : "1.14.0#1" + } ] +} \ No newline at end of file diff --git a/Include/Core/EventSystem.h b/Include/Core/EventSystem.h new file mode 100644 index 0000000..d8b1921 --- /dev/null +++ b/Include/Core/EventSystem.h @@ -0,0 +1,148 @@ +// ===================================================================================================================== +// Copyright 2024 Medusa Slockbower +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ===================================================================================================================== + +#ifndef ENGINE_EVENTSYSTEM_H +#define ENGINE_EVENTSYSTEM_H + +#include + +#include +#include +#include + + +#define MAX_EVENT_TYPES 256 + +namespace ocu = open_cpp_utils; + +namespace OpenShaderDesigner +{ + /** + * \brief Base Event class for sending events to the Engine. + */ + struct Event + { + template + static uint8_t TypeOf() { return static_cast(ocu::unique_id()); } + + /** + * \brief Get the Event's type ID. + * \return A pointer to the Event type ID. + */ + virtual inline uint8_t GetID() const = 0; + }; + + + /** + * \brief Base EventHandler for abstraction. + */ + class _ImplEventHandler + { + virtual bool _HandleEvent(const Event* event) = 0; + + friend class EventSystem; + }; + + /** + * \brief EventHandler interface for creating custom EventHandlers + * \tparam EventType The ComponentType of Event handled by the EventHandler + */ + template + class EventHandler : private _ImplEventHandler + { + public: + using HandledType = EventType; //!< The type handled by the EventHandler + + /** + * \brief Virtual function for custom EventHandler implementations. + * \param event The Event being handled. + */ + virtual bool HandleEvent(const HandledType* event) = 0; + private: + + /** + * \brief Override for abstraction. + * \param event The Event being handled. + */ + bool _HandleEvent(const Event* event) override; + }; + + /** + * \brief EventSystem for posting Events to be handled. + */ + class EventSystem + { + public: + /** + * \brief Post an Event to be Handled. + */ + static void PostEvent(const Event*); + + /** + * \brief Register an EventHandler with the EventSystem. + * \tparam T ComponentType of Event handled by the EventHandler. + */ + template + static void RegisterHandler(EventHandler*); + + /** + * \brief Unregister an EventHandler with the EventSystem. + * \tparam T ComponentType of Event handled by the EventHandler. + */ + template + static void UnregisterHandler(EventHandler*); + + private: + inline static std::list<_ImplEventHandler*> HandlerMap[MAX_EVENT_TYPES]; + inline static std::mutex Lock; + + EventSystem(const EventSystem&) = delete; + EventSystem(EventSystem&&) = delete; + }; + + template + void EventSystem::UnregisterHandler(EventHandler* handler) + { + // Thread safe + std::lock_guard guard(Lock); + const uint8_t index = T::ID; + std::erase(HandlerMap[index], reinterpret_cast<_ImplEventHandler*>(handler)); + } + + template + void EventSystem::RegisterHandler(EventHandler* handler) + { + // Thread safe + std::lock_guard guard(Lock); + const uint8_t index = T::ID; + HandlerMap[index].push_back(reinterpret_cast<_ImplEventHandler*>(handler)); + } + + template + bool EventHandler::_HandleEvent(const Event *event) + { + if(EventType::ID != event->GetID()) return false; + return HandleEvent(reinterpret_cast(event)); + } +} + +#define BeginEvent(EVENT) struct EVENT : OpenShaderDesigner::Event \ + { \ + static inline const uint8_t ID = Event::TypeOf(); \ + inline uint8_t GetID() const override { return ID; } + +#define EndEvent }; + +#endif //ENGINE_EVENTSYSTEM_H diff --git a/Include/Core/Window.h b/Include/Core/Window.h index d1c9264..b3b4e8e 100644 --- a/Include/Core/Window.h +++ b/Include/Core/Window.h @@ -21,6 +21,10 @@ #include #include +#include "open-cpp-utils/optional.h" + +namespace ocu = open_cpp_utils; + namespace OpenShaderDesigner { BeginEvent(SDLEvent) @@ -69,10 +73,11 @@ namespace OpenShaderDesigner struct { - FullscreenMode Fullscreen; - glm::ivec2 Resolution; - VSyncMode VSync; - bool HDR; + FullscreenMode Fullscreen; + glm::ivec2 Resolution; + VSyncMode VSync; + bool HDR; + ocu::optional Multisamples; } Video; Configuration() diff --git a/Include/Editor/EditorSystem.h b/Include/Editor/EditorSystem.h index be07d1d..521af8a 100644 --- a/Include/Editor/EditorSystem.h +++ b/Include/Editor/EditorSystem.h @@ -17,7 +17,7 @@ #define EDITORSYSTEM_H #include -#include +#include #include #include @@ -32,7 +32,7 @@ namespace OpenShaderDesigner using WindowID = uint64_t; template - static WindowID ID() { return OpenShaderDesigner::UniqueID(); } + static WindowID ID() { return open_cpp_utils::unique_id(); } template static T* Open() { T* window; (window = Get())->Open(); return window; } diff --git a/Include/Graph/Nodes/Math.h b/Include/Graph/Nodes/Math.h index 04042c3..81d8864 100644 --- a/Include/Graph/Nodes/Math.h +++ b/Include/Graph/Nodes/Math.h @@ -18,7 +18,9 @@ #include #include -#include +#include + +namespace ocu = open_cpp_utils; namespace OpenShaderDesigner::Nodes::Math { @@ -26,7 +28,7 @@ namespace OpenShaderDesigner::Nodes::Math struct Constant : public Node { - using ValueType = Any; + using ValueType = ocu::any; Constant(ShaderGraph& graph, ImVec2 pos); virtual ~Constant() = default; diff --git a/Include/Graph/ShaderGraph.h b/Include/Graph/ShaderGraph.h index db085b2..7fb73c1 100644 --- a/Include/Graph/ShaderGraph.h +++ b/Include/Graph/ShaderGraph.h @@ -17,16 +17,19 @@ #define SHADERGRAPH_H #include -#include #include #include #include #include +#include #include -#include -#include +#include +#include +#include + +namespace ocu = open_cpp_utils; #define RegisterNode(Name, Type) \ Node* Create##Type(ShaderGraph& graph, ImVec2 pos) { return new Type(graph, pos); } \ @@ -160,7 +163,7 @@ namespace OpenShaderDesigner { ShaderGraph& Parent; std::vector Nodes; - std::unordered_set Erased; + std::set Erased; ConnectionMap Connections; GraphState(ShaderGraph& parent); @@ -170,8 +173,8 @@ namespace OpenShaderDesigner GraphState& operator=(const GraphState& other); }; - using ContextMenuHierarchy = DirectedGraph; - using ContextID = ContextMenuHierarchy::Node; + using ContextMenuHierarchy = ocu::directed_tree; + using ContextID = ContextMenuHierarchy::node; inline static ContextMenuHierarchy ContextMenu; // Helper functions @@ -227,6 +230,8 @@ namespace OpenShaderDesigner static void Register(const std::filesystem::path& path, ConstructorPtr constructor); private: + bool GrabFocus; + GraphState State; std::stack History; @@ -286,11 +291,11 @@ namespace OpenShaderDesigner float Scroll; bool ClickedSomething; - Optional FocusedNode; + ocu::optional FocusedNode; std::unordered_map Locks; std::unordered_set DragSelect; bool LocksDragged, NodeHovered; - Optional NewConnection; + ocu::optional NewConnection; std::unordered_set Selected; } Mouse; diff --git a/Include/OpenGL/BufferObject.h b/Include/OpenGL/BufferObject.h deleted file mode 100644 index 2787d40..0000000 --- a/Include/OpenGL/BufferObject.h +++ /dev/null @@ -1,164 +0,0 @@ -// ===================================================================================================================== -// Copyright 2024 Medusa Slockbower -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// ===================================================================================================================== - -#ifndef BUFFEROBJECT_H -#define BUFFEROBJECT_H - -#ifndef NULL -#define NULL 0 -#endif - -#include - -#include "Enum.h" -#include "Type.h" - -namespace GLW -{ -// Definition ========================================================================================================== - - template - class BufferObject - { - public: - static constexpr BufferType Type = T; - static constexpr BufferUsage Usage = U; - static constexpr BufferStorage Storage = S; - - /** - * \brief BufferObject constructor - * \param size Size in bytes of the Buffer - * \param data Data to be used as the initial contents of the Buffer - */ - BufferObject(SizeT size, void* data = nullptr); - - /** - * \brief Move Constructor - */ - BufferObject(BufferObject&& other); - - /** - * \brief Copy Constructor - */ - BufferObject(const BufferObject& other); - - /** - * \brief Destructor - */ - ~BufferObject(); - - /** - * \brief Validity test - */ - [[nodiscard]] operator bool() const { return Handle != 0; } - - /** - * \brief Copy Assignment - */ - BufferObject& operator=(const BufferObject& other); - - /** - * \brief Move Assignment - */ - BufferObject& operator=(BufferObject&& other) noexcept; - - [[nodiscard]] SizeT Size() const { return Size; } - void Resize(SizeT size); - - private: - HandleT Handle; - SizeT Size; - void* Mapping; - }; - -// Constructors ======================================================================================================== - - template - BufferObject::BufferObject(SizeT size, void* data) - : Handle(NULL) - , Size(size) - , Mapping(nullptr) - { - glGenBuffers(1, &Handle); - - if(!*this) return; - - glBindBuffer(Type, Handle); - glBufferStorage(Type, Size, data, Usage); - glBindBuffer(Type, 0); - } - - template - BufferObject::BufferObject(BufferObject&& other) - : Handle(other.Handle) - , Size(other.Size) - , Mapping(other.Size) - { - other.Handle = NULL; - other.Size = 0; - other.Mapping = nullptr; - } - - template - BufferObject::BufferObject(const BufferObject& other) - : BufferObject(other.Size) - { - if(Handle == NULL) return; - if(other.Handle == NULL) return; - - glCopyNamedBufferSubData(other.Handle, Handle, 0, 0, Size); - } - - template - BufferObject::~BufferObject() - { - glDeleteBuffers(1, &Handle); - } - -// Assignment Operators ================================================================================================ - - template - BufferObject& BufferObject::operator=(const BufferObject& other) - { - BufferObject temp(other); - return (*this = std::move(temp)); // NOLINT(*-unconventional-assign-operator) - } - - template - BufferObject& BufferObject::operator=(BufferObject&& other) noexcept - { - glDeleteBuffers(1, &Handle); - - Handle = other.Handle; - Size = other.Size; - Mapping = other.Mapping; - - other.Handle = NULL; - other.Size = 0; - other.Mapping = nullptr; - - return *this; - } - - template - void BufferObject::Resize(SizeT size) - { - BufferObject temp(size); - glCopyNamedBufferSubData(Handle, temp.Handle, 0, 0, Size); - *this = std::move(temp); - } -} - -#endif //BUFFEROBJECT_H diff --git a/Include/OpenGL/Enum.h b/Include/OpenGL/Enum.h deleted file mode 100644 index e0576da..0000000 --- a/Include/OpenGL/Enum.h +++ /dev/null @@ -1,88 +0,0 @@ -// ===================================================================================================================== -// Copyright 2024 Medusa Slockbower -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// ===================================================================================================================== - -#ifndef ENUM_H -#define ENUM_H - -#include - -namespace GLW -{ - enum Primitive : GLenum - { - TRIANGLES = GL_TRIANGLES - , LINES = GL_LINES - , POINTS = GL_POINTS - }; - - enum BufferType : GLenum - { - AtomicCounter = GL_ATOMIC_COUNTER_BUFFER - , ElementArray = GL_ELEMENT_ARRAY_BUFFER - , IndirectCompute = GL_DISPATCH_INDIRECT_BUFFER - , IndirectDraw = GL_DRAW_INDIRECT_BUFFER - , PixelPack = GL_PIXEL_PACK_BUFFER - , PixelUnpack = GL_PIXEL_UNPACK_BUFFER - , ShaderStorage = GL_SHADER_STORAGE_BUFFER - , TransformFeedback = GL_TRANSFORM_FEEDBACK - , Uniform = GL_UNIFORM_BUFFER - , VertexArray = GL_ARRAY_BUFFER - }; - - enum BufferUsage : GLenum - { - /** - * \brief Buffer cannot be read or modified by the CPU after creation - */ - STATIC = GL_NONE - - /** - * \brief Buffer can be mapped for Read, Write, or Both - */ - , READ = GL_MAP_READ_BIT - , WRITE = GL_MAP_WRITE_BIT - , READ_WRITE = READ | WRITE - - /** - * \brief Buffer can be written to using glBufferSubData - */ - , DYNAMIC = GL_DYNAMIC_STORAGE_BIT - - /** - * \brief Buffer may be used while mapped - */ - , PERSISTENT = GL_MAP_PERSISTENT_BIT - - /** - * \brief Allows buffer to remain coherent without an explicit barrier - */ - , COHERENT = GL_MAP_PERSISTENT_BIT | PERSISTENT - }; - - enum BufferStorage : GLenum - { - /** - * \brief Buffer memory will come from the GPU - */ - GPU = GL_NONE - - /** - * \brief Buffer memory will come from the CPU - */ - , CPU = GL_CLIENT_STORAGE_BIT - }; -} - -#endif //ENUM_H diff --git a/Include/Utility/DirectedGraph.h b/Include/Utility/DirectedGraph.h deleted file mode 100644 index a81c9c6..0000000 --- a/Include/Utility/DirectedGraph.h +++ /dev/null @@ -1,270 +0,0 @@ -// ===================================================================================================================== -// Copyright 2024 Medusa Slockbower -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// ===================================================================================================================== - -#ifndef DIRECTEDGRAPH_H -#define DIRECTEDGRAPH_H - -#include -#include - -template -class DirectedGraph -{ -public: - // Typedefs ======================================================================================================== - - using DataType = T; - using Node = uint32_t; - using NodeQueue = std::deque; - -private: - // Data Structures ================================================================================================= - - struct Director - { - enum Flags - { - VALID = 0b00000000000000000000000000000001 - }; - - Node Parent, Child, Sibling; - uint32_t Flags; - - Director() : Parent(0), Child(0), Sibling(0), Flags(VALID) { } - }; - - using Hierarchy = std::vector; - using Storage = std::vector; - -public: - // Functions ======================================================================================================= - - DirectedGraph() : Graph{ Director() }, Data{ DataType() }, Freed{ } { } - - [[nodiscard]] Node Parent(Node node) const { return Graph[node].Parent; } - [[nodiscard]] Node FirstChild(Node node) const { return Graph[node].Child; } - [[nodiscard]] Node NextSibling(Node node) const { return Graph[node].Sibling; } - - [[nodiscard]] Node LeftMost(Node node) const - { - Node current = node; - while(node = FirstChild(current)) current = node; - return current; - } - - [[nodiscard]] uint32_t Depth(Node node) const - { - uint32_t depth = 0; - while (node) - { - node = Parent(node); - ++depth; - } - return depth; - } - - Node Insert(const DataType& data, Node parent) - { - if(Freed.empty()) - { - Freed.push_back(static_cast(Graph.size())); - Graph.push_back(Director()); Data.push_back(DataType()); - } - - Node next = Freed.front(); Freed.pop_front(); - Director& pnode = Graph[parent]; - Director& node = Graph[next]; - - // Setup Node - node.Parent = parent; - node.Sibling = pnode.Child; - node.Child = 0; - node.Flags = Director::VALID; - - // Set parent's child - pnode.Child = next; - - Data[next] = data; - - return next; - } - - void Erase(Node node) - { - if(node == 0) return; - - Director& erased = Graph[node]; - erased.Flags &= ~Director::VALID; - Freed.push_back(node); - - Graph[erased.Parent].Child = erased.Sibling; - - NodeQueue stack{ erased.Child }; - - while(stack.empty() == false) - { - Node next = stack.front(); stack.pop_front(); - Director& child = Graph[next]; - child.Flags &= ~Director::VALID; - Freed.push_back(next); - - if(child.Sibling) stack.push_front(child.Sibling); - if(child.Child) stack.push_front(child.Child); - } - } - - DataType& operator[](Node node) { return Data[node]; } - [[nodiscard]] const DataType& operator[](Node node) const { return Data[node]; } - - template - void Traverse(V& visitor) - { - Traverser traverser(*this, visitor); - traverser(); - } - -private: - // Variables ======================================================================================================= - - Hierarchy Graph; - Storage Data; - NodeQueue Freed; - -public: - // Navigation ====================================================================================================== - - friend class BreadthFirst; - class BreadthFirst - { - public: - BreadthFirst(DirectedGraph& graph) : Graph(graph), VisitQueue(0) { } - - Node operator()(Node node) - { - node = VisitQueue.back(); VisitQueue.pop_back(); - Director& current = Graph.Graph[node]; - - if(current.Sibling) VisitQueue.push_back(current.Sibling); - if(current.Child) VisitQueue.push_front(current.Child); - - if(VisitQueue.empty()) return 0; - return node; - } - - private: - DirectedGraph& Graph; - NodeQueue VisitQueue; - }; - - friend class PreOrder; - class PreOrder - { - public: - PreOrder(DirectedGraph& graph) : Graph(graph) { } - - Node operator()(Node node) - { - Director& current = Graph.Graph[node]; - - if(current.Sibling) VisitQueue.push_front(current.Sibling); - if(current.Child) VisitQueue.push_front(current.Child); - - if(VisitQueue.empty()) return 0; - Node next = VisitQueue.front(); VisitQueue.pop_front(); - return next; - } - - private: - DirectedGraph& Graph; - NodeQueue VisitQueue; - }; - - friend class InOrder; - class InOrder - { - public: - InOrder(DirectedGraph& graph) : Graph(graph) { } - - Node operator()(Node node) - { - if(node == 0) VisitQueue.push_back(Graph.LeftMost(node)); - - node = VisitQueue.front(); VisitQueue.pop_front(); - Director& current = Graph.Graph[node]; - - if(current.Sibling) - { - if(Graph.NextSibling(current.Sibling)) VisitQueue.push_back(current.Parent); - VisitQueue.push_back(Graph.LeftMost(current.Sibling)); - } - - return node; - } - - private: - DirectedGraph& Graph; - NodeQueue VisitQueue; - }; - - friend class PostOrder; - class PostOrder - { - public: - PostOrder(DirectedGraph& graph) : Graph(graph) { } - - Node operator()(Node node) - { - if(VisitQueue.empty()) VisitQueue.push_back(Graph.LeftMost(node)); - - node = VisitQueue.front(); VisitQueue.pop_front(); - if(node == 0) return node; - Director& current = Graph.Graph[node]; - - VisitQueue.push_back(current.Sibling ? Graph.LeftMost(current.Sibling) : Graph.Parent(node)); - - return node; - } - - private: - DirectedGraph& Graph; - NodeQueue VisitQueue; - }; - - template - class Traverser - { - public: - using VisitorType = V; - using OrderType = O; - - Traverser(DirectedGraph& graph, VisitorType& visitor) : Graph(graph), Visitor(visitor), Order(graph) { } - - void operator()() - { - Node node = 0; - while(node = Order(node)) - { - if(Visitor(Graph[node], node)) break; - } - } - - private: - DirectedGraph& Graph; - VisitorType& Visitor; - OrderType Order; - }; -}; - -#endif //DIRECTEDGRAPH_H diff --git a/Include/Utility/Optional.h b/Include/Utility/Optional.h deleted file mode 100644 index efd3941..0000000 --- a/Include/Utility/Optional.h +++ /dev/null @@ -1,67 +0,0 @@ -// ===================================================================================================================== -// Copyright 2024 Medusa Slockbower -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// ===================================================================================================================== - -#ifndef OPTIONAL_H -#define OPTIONAL_H - -template -class Optional -{ -public: - using Type = T; - - Optional() : Data(), Valid(false) { } - Optional(const Type& data) : Data(data), Valid(true) { } - Optional(Type&& data) : Data(data), Valid(true) { } - Optional(const Optional& other) = default; - Optional(Optional&& other) = default; - - Optional& operator=(const Optional& other) = default; - Optional& operator=(Optional&& other) = default; - - Type& operator=(const Type& data) { Data = data; Valid = true; return Data; } - Type& operator=(Type&& data) { Data = data; Valid = true; return Data; } - - Type& operator+=(const Type& data) { assert(Valid); Data += data; return Data; } - Type& operator-=(const Type& data) { assert(Valid); Data += data; return Data; } - Type& operator*=(const Type& data) { assert(Valid); Data += data; return Data; } - Type& operator/=(const Type& data) { assert(Valid); Data += data; return Data; } - Type& operator%=(const Type& data) { assert(Valid); Data += data; return Data; } - - Type& operator<<=(const Type& data) { assert(Valid); Data <<= data; return Data; } - Type& operator>>=(const Type& data) { assert(Valid); Data >>= data; return Data; } - Type& operator|=(const Type& data) { assert(Valid); Data |= data; return Data; } - Type& operator&=(const Type& data) { assert(Valid); Data &= data; return Data; } - Type& operator^=(const Type& data) { assert(Valid); Data ^= data; return Data; } - - [[nodiscard]] bool operator()() const { return Valid; } - - operator Type&() { assert(Valid); return Data; } - operator const Type&() const { assert(Valid); return Data; } - - Type* operator->() { assert(Valid); return &Data; } - const Type* operator->() const { assert(Valid); return &Data; } - - Type& operator*() { assert(Valid); return Data; } - const Type& operator*() const { assert(Valid); return Data; } - - void Reset() { Valid = false; } - -private: - Type Data; - bool Valid; -}; - -#endif //OPTIONAL_H diff --git a/Source/Core/Engine.cpp b/Source/Core/Engine.cpp index 5fa8ee8..bd1ab0c 100644 --- a/Source/Core/Engine.cpp +++ b/Source/Core/Engine.cpp @@ -59,6 +59,7 @@ void OpenShaderDesigner::Engine::Initialize() EditorSystem::Open(); Console::Log(Console::Severity::MESSAGE, "Opening Shader Graph"); + EditorSystem::Open(); EditorSystem::Open(); } diff --git a/Source/Core/Window.cpp b/Source/Core/Window.cpp index dfe0680..15b8867 100644 --- a/Source/Core/Window.cpp +++ b/Source/Core/Window.cpp @@ -28,16 +28,6 @@ Window::Window(const Configuration& config) flags |= Config.Video.Fullscreen == FullscreenMode::WINDOWED ? SDL_WINDOW_RESIZABLE : 0; SDL_Init(SDL_INIT_EVERYTHING & ~SDL_INIT_AUDIO); - if((Handle = SDL_CreateWindow( - Config.Application.Title.c_str(), - SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED, - Config.Video.Resolution.x, Config.Video.Resolution.y, - flags)) == nullptr) - { - Console::Log(Console::Severity::FATAL, "Failed to create SDL Window: {}", SDL_GetError()); - assert(false); - return; - } #ifdef NDEBUG SDL_GL_SetAttribute(SDL_GL_CONTEXT_FLAGS, SDL_GL_CONTEXT_FORWARD_COMPATIBLE_FLAG); @@ -56,11 +46,26 @@ Window::Window(const Configuration& config) SDL_GL_SetAttribute(SDL_GL_GREEN_SIZE, 16); SDL_GL_SetAttribute(SDL_GL_BLUE_SIZE, 16); SDL_GL_SetAttribute(SDL_GL_ALPHA_SIZE, 16); - SDL_GL_SetAttribute(SDL_GL_FLOATBUFFERS, 1); + SDL_GL_SetAttribute(SDL_GL_FLOATBUFFERS, SDL_TRUE); } - SDL_GL_SetAttribute(SDL_GL_MULTISAMPLEBUFFERS, 1); - SDL_GL_SetAttribute(SDL_GL_MULTISAMPLESAMPLES, 4); + if(Config.Video.Multisamples()) + { + SDL_GL_SetAttribute(SDL_GL_MULTISAMPLEBUFFERS, SDL_TRUE); + SDL_GL_SetAttribute(SDL_GL_MULTISAMPLESAMPLES, Config.Video.Multisamples); + } + + + if((Handle = SDL_CreateWindow( + Config.Application.Title.c_str(), + SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED, + Config.Video.Resolution.x, Config.Video.Resolution.y, + flags)) == nullptr) + { + Console::Log(Console::Severity::FATAL, "Failed to create SDL Window: {}", SDL_GetError()); + assert(false); + return; + } Context = SDL_GL_CreateContext(Handle); @@ -99,6 +104,7 @@ Window::Window(const Configuration& config) } // Fill in black screen + glEnable(GL_MULTISAMPLE); glDisable(GL_DEPTH_TEST); glClearColor(0, 0, 0, 1); glClear(GL_COLOR_BUFFER_BIT); diff --git a/Source/Editor/EditorSystem.cpp b/Source/Editor/EditorSystem.cpp index 3ebb16f..f4dadfa 100644 --- a/Source/Editor/EditorSystem.cpp +++ b/Source/Editor/EditorSystem.cpp @@ -22,6 +22,8 @@ #include #include +#include + using namespace OpenShaderDesigner; void EditorSystem::Initialize() @@ -32,7 +34,6 @@ void EditorSystem::Initialize() IMGUI_CHECKVERSION(); ImGui::CreateContext(); - // https://github.com/ocornut/imgui/issues/707#issuecomment-917151020 ImVec4* colors = ImGui::GetStyle().Colors; colors[ImGuiCol_Text] = ImVec4(1.00f, 1.00f, 1.00f, 1.00f); @@ -118,22 +119,23 @@ void EditorSystem::Initialize() ImGuiIO& io = ImGui::GetIO(); - static ImWchar ranges[] = { 0x1, static_cast(0x1FFFF), 0 }; - static ImFontConfig cfg; - cfg.OversampleH = cfg.OversampleV = 2; - cfg.MergeMode = true; - cfg.FontBuilderFlags |= ImGuiFreeTypeBuilderFlags_LoadColor; - io.Fonts->AddFontFromFileTTF("./Assets/Fonts/FiraMono-Regular.ttf", 20.0f); + static ImFontConfig cfg; + io.Fonts->AddFontFromFileTTF("./Assets/Fonts/FiraMono-Regular.ttf", 20.0f); + static ImWchar ranges[] = { 0x1, static_cast(0x1FFFF), 0 }; + cfg.MergeMode = true; + cfg.FontBuilderFlags |= ImGuiFreeTypeBuilderFlags_LoadColor; io.Fonts->AddFontFromFileTTF("./Assets/Fonts/remixicon.ttf", 18.0f, &cfg, ranges); - io.ConfigWindowsMoveFromTitleBarOnly = true; io.ConfigFlags |= ImGuiConfigFlags_DockingEnable; + ImNodeGraph::AddFont("./Assets/Fonts/FiraMono-Regular.ttf", 20.0f); + ImNodeGraph::AddFont("./Assets/Fonts/remixicon.ttf", 18.0f, ranges); + ImNodeGraph::CreateContext(); + ImGui_ImplSDL2_InitForOpenGL(Window.GetHandle(), Window.GetContext()); ImGui_ImplOpenGL3_Init("#version 460 core"); - //ImGui::GetBackgroundDrawList()->AddText(ImVec2(0, 0), ImColor(0, 0, 0), "setup"); Console::Log(Console::Severity::ALERT, "Initialized ImGui ({})", IMGUI_VERSION); } @@ -166,10 +168,11 @@ void EditorSystem::Draw() void EditorSystem::Shutdown() { - ImGui_ImplOpenGL3_Shutdown(); - // Shutdown ImGui + ImGui_ImplOpenGL3_Shutdown(); ImGui_ImplSDL2_Shutdown(); + + ImNodeGraph::DestroyContext(); ImGui::DestroyContext(); } diff --git a/Source/Entry.cpp b/Source/Entry.cpp index f73de61..0ae506e 100644 --- a/Source/Entry.cpp +++ b/Source/Entry.cpp @@ -22,7 +22,10 @@ int main(int, char**) Window::Configuration config; config.Application.Title = "OpenShaderDesigner"; - config.Video.HDR = true; + config.Video.Multisamples = 4; + config.Video.Fullscreen = Window::FullscreenMode::WINDOWED; + config.Video.Resolution = { 1280, 720 }; + config.Video.HDR = false; Engine::Start(config); diff --git a/Source/Graph/ShaderGraph.cpp b/Source/Graph/ShaderGraph.cpp index cd6a171..3a511d2 100644 --- a/Source/Graph/ShaderGraph.cpp +++ b/Source/Graph/ShaderGraph.cpp @@ -25,6 +25,8 @@ #include #include +#include + using namespace OpenShaderDesigner; ImColor operator*(const ImColor& c, float f) @@ -141,6 +143,7 @@ Node::Node( ShaderGraph::ShaderGraph() : EditorWindow("\uED46 Shader Graph", 0) + , GrabFocus(false) , State(*this) , Style { @@ -220,8 +223,74 @@ void ShaderGraph::OnOpen() Camera.Scroll = Camera.Zoom = 1.0f; EditorSystem::Open()->Graph = this; + + GrabFocus = true; } + +void ShaderGraph::DrawWindow() +{ + static int test_in, test_out; + ImNodeGraph::BeginGraph("ShaderGraph"); + ImNodeGraph::SetPinColors(Pin::Colors); + + if(GrabFocus) + { + GrabFocus = false; + ImGui::SetWindowFocus(); + ImGui::SetNavWindow(ImGui::GetCurrentWindow()); + } + + // First Test Node + { + ImVec2 pos = { 0, 0 }; + + ImNodeGraph::BeginNode(0, pos); + + ImNodeGraph::BeginNodeHeader(-1, ImColor(0xA7, 0x62, 0x53), ImColor(0xC5, 0x79, 0x67), ImColor(0x82, 0x4C, 0x40)); + ImGui::Text("\uf1f5 Hello"); + ImNodeGraph::EndNodeHeader(); + + ImNodeGraph::BeginPin(1, Pin::INT, ImPinDirection_Input); + ImGui::PushItemWidth(100 * ImNodeGraph::GetCameraScale()); + ImGui::InputInt("##In", &test_in, 0); + //ImGui::Text("In"); + ImNodeGraph::EndPin(); + + ImNodeGraph::BeginPin(2, Pin::ANY, ImPinDirection_Output); + ImGui::Text("Out"); + ImNodeGraph::EndPin(); + + ImNodeGraph::EndNode(); + } + + // Second Test Node + { + ImVec2 pos = { 300, 0 }; + + ImNodeGraph::BeginNode(3, pos); + + ImNodeGraph::BeginNodeHeader(-1, ImColor(0xA7, 0x62, 0x53), ImColor(0xC5, 0x79, 0x67), ImColor(0x82, 0x4C, 0x40)); + ImGui::Text("\uf1f5 Hello"); + ImNodeGraph::EndNodeHeader(); + + ImNodeGraph::BeginPin(4, Pin::INT, ImPinDirection_Input); + ImGui::PushItemWidth(100 * ImNodeGraph::GetCameraScale()); + ImGui::InputInt("##In", &test_in, 0); + //ImGui::Text("In"); + ImNodeGraph::EndPin(); + + ImNodeGraph::BeginPin(5, Pin::ANY, ImPinDirection_Output); + ImGui::Text("Out"); + ImNodeGraph::EndPin(); + + ImNodeGraph::EndNode(); + } + + ImNodeGraph::EndGraph(); +} + +/* void ShaderGraph::DrawWindow() { HandleInput(); @@ -266,11 +335,13 @@ void ShaderGraph::DrawWindow() } Mouse.Locks.clear(); - Mouse.FocusedNode.Reset(); + Mouse.FocusedNode.reset(); Mouse.DragSelect.clear(); Mouse.LocksDragged = false; } } +*/ + void ShaderGraph::HandleInput() { @@ -696,7 +767,7 @@ void ShaderGraph::DrawContextMenu() { bool operator()(ContextMenuItem& item, ContextID id) { - const auto depth = Graph.ContextMenu.Depth(id); + const auto depth = Graph.ContextMenu.depth(id); if(depth > Context.size()) return false; while(depth < Context.size()) @@ -705,7 +776,7 @@ void ShaderGraph::DrawContextMenu() ImGui::EndMenu(); } - if(Context.top() != Graph.ContextMenu.Parent(id)) return false; + if(Context.top() != Graph.ContextMenu.parent(id)) return false; std::string name = std::format("{}##{}", item.Name, id); if(item.Constructor) @@ -740,7 +811,7 @@ void ShaderGraph::DrawContextMenu() , .Context = context }; - ContextMenu.Traverse(MenuVisitor); + ContextMenu.traverse(MenuVisitor); context.pop(); while(context.empty() == false) @@ -864,7 +935,7 @@ void ShaderGraph::StartConnection(const PinPtr& ptr) void ShaderGraph::StopConnection() { - Mouse.NewConnection.Reset(); + Mouse.NewConnection.reset(); } void ShaderGraph::CreateConnection(const PinPtr& a, const PinPtr& b) @@ -1066,7 +1137,7 @@ float ShaderGraph::BezierOffset(const ImVec2& out, const ImVec2& in) const float HeaderHeight = Style.FontSize / Camera.Zoom; const float diff_x = out.x - in.x; const float diff_y = out.y - in.y; - return abs(diff_x) * (abs(diff_y) / abs(diff_x)) * (1 + glm::max(diff_x, 0.0f) / (HeaderHeight + abs(diff_y))); + return abs(diff_y) * (1 + glm::max(diff_x, 0.0f) / (HeaderHeight + abs(diff_y))); } bool ShaderGraph::AABB(const ImVec2& a0, const ImVec2& a1, const ImVec2& b0, const ImVec2& b1) @@ -1122,7 +1193,7 @@ void ShaderGraph::Register(const std::filesystem::path& path, ConstructorPtr con ContextID node = 0; while(decomp.empty() == false) { - ContextID child = ContextMenu.FirstChild(node); + ContextID child = ContextMenu.first_child(node); while(child) { @@ -1133,17 +1204,17 @@ void ShaderGraph::Register(const std::filesystem::path& path, ConstructorPtr con break; } - child = ContextMenu.NextSibling(child); + child = ContextMenu.next_sibling(child); } if(node == 0 || node != child) { - node = ContextMenu.Insert({ decomp.top(), nullptr }, node); + node = ContextMenu.insert({ decomp.top(), nullptr }, node); decomp.pop(); } } - ContextMenu.Insert({ name, constructor }, node); + ContextMenu.insert({ name, constructor }, node); } Inspector::Inspector() diff --git a/imgui.ini b/imgui.ini new file mode 100644 index 0000000..616b5a2 --- /dev/null +++ b/imgui.ini @@ -0,0 +1,80 @@ +[Window][DockSpaceViewport_11111111] +Size=3440,1417 +Collapsed=0 + +[Window][Debug##Default] +Pos=939,314 +Size=400,400 +Collapsed=0 + +[Window][Dear ImGui Demo] +Pos=359,275 +Size=375,341 +Collapsed=0 + +[Window][ Console] +Pos=303,905 +Size=3137,464 +Collapsed=0 +DockId=0x00000004,0 + +[Window][ Profiler] +Pos=0,905 +Size=301,464 +Collapsed=0 +DockId=0x00000003,0 + +[Window][ Shader Graph] +Pos=0,0 +Size=3068,903 +Collapsed=0 +DockId=0x00000005,0 + +[Window][WindowOverViewport_11111111] +Pos=0,0 +Size=3440,1369 +Collapsed=0 + +[Window][Example: Custom rendering] +Pos=1190,358 +Size=863,426 +Collapsed=0 + +[Window][Dear ImGui Demo/ResizableChild_D5443E47] +IsChild=1 +Size=1071,208 + +[Window][Dear ImGui Demo/Red_1D4E05CE] +IsChild=1 +Size=200,100 + +[Window][Dear ImGui Style Editor] +Pos=2065,308 +Size=476,662 +Collapsed=0 + +[Window][Dear ImGui ID Stack Tool] +Pos=1813,299 +Size=944,399 +Collapsed=0 + +[Window][Dear ImGui Metrics/Debugger] +Pos=2116,241 +Size=487,534 +Collapsed=0 + +[Window][Inspector] +Pos=3070,0 +Size=370,903 +Collapsed=0 +DockId=0x00000006,0 + +[Docking][Data] +DockSpace ID=0x7C6B3D9B Window=0xA87D555D Pos=0,0 Size=3440,1369 Split=Y + DockNode ID=0x00000001 Parent=0x7C6B3D9B SizeRef=3440,974 Split=X + DockNode ID=0x00000005 Parent=0x00000001 SizeRef=3068,1417 CentralNode=1 Selected=0xD4C89E35 + DockNode ID=0x00000006 Parent=0x00000001 SizeRef=370,1417 Selected=0xE7039252 + DockNode ID=0x00000002 Parent=0x7C6B3D9B SizeRef=3440,464 Split=X Selected=0xE9F1AFD1 + DockNode ID=0x00000003 Parent=0x00000002 SizeRef=301,448 Selected=0xAC4B19AE + DockNode ID=0x00000004 Parent=0x00000002 SizeRef=3137,448 Selected=0xE9F1AFD1 + diff --git a/vcpkg.json b/vcpkg.json new file mode 100644 index 0000000..a06b5ee --- /dev/null +++ b/vcpkg.json @@ -0,0 +1,42 @@ +{ + "name" : "openshaderdesigner", + "version-string" : "1.0.0", + "builtin-baseline" : "b0d9d516272c599145009c4c28b779a678fc97f8", + "dependencies" : [ { + "name" : "egl-registry", + "version>=" : "2024-01-25" + }, { + "name" : "opengl-registry", + "version>=" : "2024-02-10#1" + }, { + "name" : "opengl", + "version>=" : "2022-12-04#3" + }, { + "name" : "vcpkg-cmake-config", + "version>=" : "2022-02-06#1" + }, { + "name" : "vcpkg-cmake", + "version>=" : "2024-04-18" + }, { + "name" : "pkgconf", + "version>=" : "2.2.0" + }, { + "name" : "glew", + "version>=" : "2.2.0#3" + }, { + "name" : "glm", + "version>=" : "1.0.1#2" + }, { + "name" : "vcpkg-tool-meson", + "version>=" : "1.3.2#3" + }, { + "name" : "freetype", + "version>=" : "2.13.2#1" + }, { + "name" : "rapidjson", + "version>=" : "2023-07-17#1" + }, { + "name" : "sdl2", + "version>=" : "2.30.6" + } ] +} \ No newline at end of file