From 8bc662df42e8eff2ad1a521760b13a86bb83f343 Mon Sep 17 00:00:00 2001 From: Jonathan Hoffstadt Date: Thu, 10 Nov 2022 22:03:55 -0600 Subject: [PATCH] chore: finish flattening & remove unused mvLog header --- sandbox/main.cpp | 1 - src/CMakeLists.txt | 212 ++++++++++++------------ src/dearpygui.cpp | 1 - src/dearpygui_commands.h | 1 - src/dearpygui_parsers.h | 1 - src/mvAppItem.cpp | 1 - src/mvAppItemCommons.h | 12 +- src/mvContext.cpp | 1 - src/{custom => }/mvDatePicker.cpp | 0 src/{custom => }/mvDatePicker.h | 0 src/mvDrawings.cpp | 1 - src/{composite => }/mvFileDialog.cpp | 1 - src/{composite => }/mvFileDialog.h | 0 src/{composite => }/mvFileExtension.cpp | 1 - src/{composite => }/mvFileExtension.h | 0 src/mvFontItems.cpp | 1 - src/mvGlobalHandlers.cpp | 1 - src/mvItemHandlers.cpp | 1 - src/mvItemRegistry.cpp | 1 - src/{custom => }/mvLoadingIndicator.cpp | 0 src/{custom => }/mvLoadingIndicator.h | 0 src/mvLog.h | 48 ------ src/mvNodes.cpp | 1 - src/{custom => }/mvSlider3D.cpp | 0 src/{custom => }/mvSlider3D.h | 0 src/mvTables.cpp | 1 - src/mvTextureItems.cpp | 1 - src/mvThemes.cpp | 1 - src/{custom => }/mvTimePicker.cpp | 0 src/{custom => }/mvTimePicker.h | 0 30 files changed, 112 insertions(+), 177 deletions(-) rename src/{custom => }/mvDatePicker.cpp (100%) rename src/{custom => }/mvDatePicker.h (100%) rename src/{composite => }/mvFileDialog.cpp (99%) rename src/{composite => }/mvFileDialog.h (100%) rename src/{composite => }/mvFileExtension.cpp (98%) rename src/{composite => }/mvFileExtension.h (100%) rename src/{custom => }/mvLoadingIndicator.cpp (100%) rename src/{custom => }/mvLoadingIndicator.h (100%) delete mode 100644 src/mvLog.h rename src/{custom => }/mvSlider3D.cpp (100%) rename src/{custom => }/mvSlider3D.h (100%) rename src/{custom => }/mvTimePicker.cpp (100%) rename src/{custom => }/mvTimePicker.h (100%) diff --git a/sandbox/main.cpp b/sandbox/main.cpp index 8b4c4c17d..e7c54b7bf 100644 --- a/sandbox/main.cpp +++ b/sandbox/main.cpp @@ -9,7 +9,6 @@ #include #include #include "mvViewport.h" -#include "mvLog.h" namespace fs = std::filesystem; diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 75f7c2b8a..35b3b609d 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -3,117 +3,117 @@ set(MARVEL_SOURCES - # core - "mvContext.cpp" - "mvMath.cpp" - "mvProfiler.cpp" - "dearpygui.cpp" - - # platform - "$<$:mvViewport_win32.cpp>" - "$<$:mvUtilities_win32.cpp>" - "$<$:mvGraphics_win32.cpp>" - - "$<$:mvViewport_apple.mm>" - "$<$:mvUtilities_apple.mm>" - "$<$:mvGraphics_apple.mm>" - - "$<$:mvUtilities_linux.cpp>" - "$<$:mvViewport_linux.cpp>" - "$<$:mvGraphics_linux.cpp>" - - # python - "mvPyUtils.cpp" - "mvCustomTypes.cpp" - - # ui - "mvBasicWidgets.cpp" - "mvTables.cpp" - "mvThemes.cpp" - "mvNodes.cpp" - "mvDrawings.cpp" - "mvGlobalHandlers.cpp" - "mvItemHandlers.cpp" - "mvValues.cpp" - "mvTextureItems.cpp" - "mvFontItems.cpp" - "mvColors.cpp" - "mvPlotting.cpp" - "mvContainers.cpp" - - "mvCallbackRegistry.cpp" + # core + "mvContext.cpp" + "mvMath.cpp" + "mvProfiler.cpp" + "dearpygui.cpp" + + # platform + "$<$:mvViewport_win32.cpp>" + "$<$:mvUtilities_win32.cpp>" + "$<$:mvGraphics_win32.cpp>" + + "$<$:mvViewport_apple.mm>" + "$<$:mvUtilities_apple.mm>" + "$<$:mvGraphics_apple.mm>" + + "$<$:mvUtilities_linux.cpp>" + "$<$:mvViewport_linux.cpp>" + "$<$:mvGraphics_linux.cpp>" + + # python + "mvPyUtils.cpp" + "mvCustomTypes.cpp" + + # ui + "mvBasicWidgets.cpp" + "mvTables.cpp" + "mvThemes.cpp" + "mvNodes.cpp" + "mvDrawings.cpp" + "mvGlobalHandlers.cpp" + "mvItemHandlers.cpp" + "mvValues.cpp" + "mvTextureItems.cpp" + "mvFontItems.cpp" + "mvColors.cpp" + "mvPlotting.cpp" + "mvContainers.cpp" + + "mvCallbackRegistry.cpp" "mvLoadingIndicatorCustom.cpp" - "mvFontManager.cpp" - "mvToolManager.cpp" - "mvToolWindow.cpp" - "mvAboutWindow.cpp" - "mvDocWindow.cpp" - "mvMetricsWindow.cpp" - "mvStyleWindow.cpp" - "mvDebugWindow.cpp" - "mvLayoutWindow.cpp" - "mvAppItemState.cpp" - "mvAppItem.cpp" - "mvItemRegistry.cpp" - - "custom/mvDatePicker.cpp" - "custom/mvTimePicker.cpp" - "custom/mvSlider3D.cpp" - "custom/mvLoadingIndicator.cpp" - "composite/mvFileDialog.cpp" - "composite/mvFileExtension.cpp" - - # imnodes - "../thirdparty/imnodes/imnodes.cpp" - - # implot - "../thirdparty/implot/implot.cpp" - "../thirdparty/implot/implot_items.cpp" - "../thirdparty/implot/implot_demo.cpp" - - # ImGuiFileDialog - "../thirdparty/ImGuiFileDialog/ImGuiFileDialog.cpp" - - # imgui - "../thirdparty/imgui/misc/cpp/imgui_stdlib.cpp" - "../thirdparty/imgui/imgui.cpp" - "../thirdparty/imgui/imgui_demo.cpp" - "../thirdparty/imgui/imgui_draw.cpp" - "../thirdparty/imgui/imgui_widgets.cpp" - "../thirdparty/imgui/imgui_tables.cpp" - "$<$:../thirdparty/imgui/misc/freetype/imgui_freetype.cpp>" - "$<$:../thirdparty/imgui/backends/imgui_impl_win32.cpp>" - "$<$:../thirdparty/imgui/backends/imgui_impl_dx11.cpp>" - "$<$:../thirdparty/imgui/backends/imgui_impl_metal.mm>" - "$<$:../thirdparty/imgui/backends/imgui_impl_glfw.cpp>" - "$<$:../thirdparty/imgui/backends/imgui_impl_glfw.cpp>" - "$<$:../thirdparty/imgui/backends/imgui_impl_opengl3.cpp>" - "$<$:../thirdparty/imgui/examples/libs/gl3w/GL/gl3w.c>" -) + "mvFontManager.cpp" + "mvToolManager.cpp" + "mvToolWindow.cpp" + "mvAboutWindow.cpp" + "mvDocWindow.cpp" + "mvMetricsWindow.cpp" + "mvStyleWindow.cpp" + "mvDebugWindow.cpp" + "mvLayoutWindow.cpp" + "mvAppItemState.cpp" + "mvAppItem.cpp" + "mvItemRegistry.cpp" + + "mvDatePicker.cpp" + "mvTimePicker.cpp" + "mvSlider3D.cpp" + "mvLoadingIndicator.cpp" + "mvFileDialog.cpp" + "mvFileExtension.cpp" + + # imnodes + "../thirdparty/imnodes/imnodes.cpp" + + # implot + "../thirdparty/implot/implot.cpp" + "../thirdparty/implot/implot_items.cpp" + "../thirdparty/implot/implot_demo.cpp" + + # ImGuiFileDialog + "../thirdparty/ImGuiFileDialog/ImGuiFileDialog.cpp" + + # imgui + "../thirdparty/imgui/misc/cpp/imgui_stdlib.cpp" + "../thirdparty/imgui/imgui.cpp" + "../thirdparty/imgui/imgui_demo.cpp" + "../thirdparty/imgui/imgui_draw.cpp" + "../thirdparty/imgui/imgui_widgets.cpp" + "../thirdparty/imgui/imgui_tables.cpp" + "$<$:../thirdparty/imgui/misc/freetype/imgui_freetype.cpp>" + "$<$:../thirdparty/imgui/backends/imgui_impl_win32.cpp>" + "$<$:../thirdparty/imgui/backends/imgui_impl_dx11.cpp>" + "$<$:../thirdparty/imgui/backends/imgui_impl_metal.mm>" + "$<$:../thirdparty/imgui/backends/imgui_impl_glfw.cpp>" + "$<$:../thirdparty/imgui/backends/imgui_impl_glfw.cpp>" + "$<$:../thirdparty/imgui/backends/imgui_impl_opengl3.cpp>" + "$<$:../thirdparty/imgui/examples/libs/gl3w/GL/gl3w.c>" + ) set(MARVEL_INCLUDE_DIR - "." - "../thirdparty/implot" - "../thirdparty/stb" - "../thirdparty/imnodes" - "../thirdparty/ImGuiFileDialog" - "../thirdparty/glfw/include/" - "../thirdparty/glfw/deps/" - "../thirdparty/imgui/" - "../thirdparty/gl3w/" - "../thirdparty/imgui/misc/freetype/" - "../thirdparty/imgui/backends/" - "../thirdparty/imgui/examples/libs/gl3w" - "../thirdparty/cpython/" - "../thirdparty/cpython/Include/" - "../thirdparty/cpython/build/debug/" - "$<$:${CMAKE_SOURCE_DIR}/thirdparty/cpython/PC/>" - "$,${CMAKE_SOURCE_DIR}/thirdparty/cpython/build/release/,${CMAKE_SOURCE_DIR}/thirdparty/cpython/build/debug/>" -) + "." + "../thirdparty/implot" + "../thirdparty/stb" + "../thirdparty/imnodes" + "../thirdparty/ImGuiFileDialog" + "../thirdparty/glfw/include/" + "../thirdparty/glfw/deps/" + "../thirdparty/imgui/" + "../thirdparty/gl3w/" + "../thirdparty/imgui/misc/freetype/" + "../thirdparty/imgui/backends/" + "../thirdparty/imgui/examples/libs/gl3w" + "../thirdparty/cpython/" + "../thirdparty/cpython/Include/" + "../thirdparty/cpython/build/debug/" + "$<$:${CMAKE_SOURCE_DIR}/thirdparty/cpython/PC/>" + "$,${CMAKE_SOURCE_DIR}/thirdparty/cpython/build/release/,${CMAKE_SOURCE_DIR}/thirdparty/cpython/build/debug/>" + ) if(MVDIST_ONLY) - include("distribution.cmake") + include("distribution.cmake") else() - include("embedded.cmake") + include("embedded.cmake") endif() \ No newline at end of file diff --git a/src/dearpygui.cpp b/src/dearpygui.cpp index 322479b3d..5ba17dbbd 100644 --- a/src/dearpygui.cpp +++ b/src/dearpygui.cpp @@ -9,7 +9,6 @@ #include "mvPyUtils.h" #include "mvViewport.h" #include -#include "mvLog.h" #include "mvProfiler.h" #include "dearpygui_commands.h" #include "dearpygui_parsers.h" diff --git a/src/dearpygui_commands.h b/src/dearpygui_commands.h index 8cece262b..610f6fee1 100644 --- a/src/dearpygui_commands.h +++ b/src/dearpygui_commands.h @@ -9,7 +9,6 @@ #include "mvViewport.h" #include "stb_image.h" #include "stb_image_write.h" -#include "mvLog.h" #include "mvProfiler.h" #include "mvUtilities.h" diff --git a/src/dearpygui_parsers.h b/src/dearpygui_parsers.h index 35168cf9a..fdc468a18 100644 --- a/src/dearpygui_parsers.h +++ b/src/dearpygui_parsers.h @@ -8,7 +8,6 @@ #include "mvPyUtils.h" #include "mvViewport.h" #include -#include "mvLog.h" #include "mvProfiler.h" static void diff --git a/src/mvAppItem.cpp b/src/mvAppItem.cpp index 32e000bd9..97c183024 100644 --- a/src/mvAppItem.cpp +++ b/src/mvAppItem.cpp @@ -3,7 +3,6 @@ #include "mvItemRegistry.h" #include "mvCore.h" #include "mvAppItemCommons.h" -#include "mvLog.h" #include "mvPyUtils.h" static void diff --git a/src/mvAppItemCommons.h b/src/mvAppItemCommons.h index 6d9db65cb..2ee6f49d2 100644 --- a/src/mvAppItemCommons.h +++ b/src/mvAppItemCommons.h @@ -13,9 +13,9 @@ #include "mvColors.h" #include "mvPlotting.h" #include "mvContainers.h" -#include "custom/mvTimePicker.h" -#include "custom/mvDatePicker.h" -#include "custom/mvSlider3D.h" -#include "custom/mvLoadingIndicator.h" -#include "composite/mvFileDialog.h" -#include "composite/mvFileExtension.h" +#include "mvTimePicker.h" +#include "mvDatePicker.h" +#include "mvSlider3D.h" +#include "mvLoadingIndicator.h" +#include "mvFileDialog.h" +#include "mvFileExtension.h" diff --git a/src/mvContext.cpp b/src/mvContext.cpp index 7e7960566..e736628ef 100644 --- a/src/mvContext.cpp +++ b/src/mvContext.cpp @@ -11,7 +11,6 @@ #include "mvCallbackRegistry.h" #include "mvPyUtils.h" #include -#include "mvLog.h" #include "mvToolManager.h" #include #include diff --git a/src/custom/mvDatePicker.cpp b/src/mvDatePicker.cpp similarity index 100% rename from src/custom/mvDatePicker.cpp rename to src/mvDatePicker.cpp diff --git a/src/custom/mvDatePicker.h b/src/mvDatePicker.h similarity index 100% rename from src/custom/mvDatePicker.h rename to src/mvDatePicker.h diff --git a/src/mvDrawings.cpp b/src/mvDrawings.cpp index 1007d8d96..478d5d747 100644 --- a/src/mvDrawings.cpp +++ b/src/mvDrawings.cpp @@ -1,5 +1,4 @@ #include "mvDrawings.h" -#include "mvLog.h" #include "mvItemRegistry.h" #include "mvPyUtils.h" #include "mvAppItemCommons.h" diff --git a/src/composite/mvFileDialog.cpp b/src/mvFileDialog.cpp similarity index 99% rename from src/composite/mvFileDialog.cpp rename to src/mvFileDialog.cpp index 62e25b462..f8ea6f522 100644 --- a/src/composite/mvFileDialog.cpp +++ b/src/mvFileDialog.cpp @@ -2,7 +2,6 @@ #include "mvFileExtension.h" #include "mvItemRegistry.h" #include "mvPyUtils.h" -#include "mvLog.h" static void Panel(const char* vFilter, IGFDUserDatas vUserDatas, bool* vCantContinue) { diff --git a/src/composite/mvFileDialog.h b/src/mvFileDialog.h similarity index 100% rename from src/composite/mvFileDialog.h rename to src/mvFileDialog.h diff --git a/src/composite/mvFileExtension.cpp b/src/mvFileExtension.cpp similarity index 98% rename from src/composite/mvFileExtension.cpp rename to src/mvFileExtension.cpp index 56a22ede0..fb4d1fb9e 100644 --- a/src/composite/mvFileExtension.cpp +++ b/src/mvFileExtension.cpp @@ -2,7 +2,6 @@ #include "mvFileDialog.h" #include "mvItemRegistry.h" #include "mvPyUtils.h" -#include "mvLog.h" void mvFileExtension::applySpecificTemplate(mvAppItem* item) { diff --git a/src/composite/mvFileExtension.h b/src/mvFileExtension.h similarity index 100% rename from src/composite/mvFileExtension.h rename to src/mvFileExtension.h diff --git a/src/mvFontItems.cpp b/src/mvFontItems.cpp index d6e04d491..f2832964f 100644 --- a/src/mvFontItems.cpp +++ b/src/mvFontItems.cpp @@ -1,7 +1,6 @@ #include "mvFontItems.h" #include "mvTextureItems.h" #include "mvPyUtils.h" -#include "mvLog.h" #include "mvToolManager.h" #include "mvFontManager.h" diff --git a/src/mvGlobalHandlers.cpp b/src/mvGlobalHandlers.cpp index 01cac20d7..b825b3b0a 100644 --- a/src/mvGlobalHandlers.cpp +++ b/src/mvGlobalHandlers.cpp @@ -1,6 +1,5 @@ #include "mvGlobalHandlers.h" #include "mvPyUtils.h" -#include "mvLog.h" #include "mvUtilities.h" void mvHandlerRegistry::draw(ImDrawList* drawlist, float x, float y) diff --git a/src/mvItemHandlers.cpp b/src/mvItemHandlers.cpp index 8ad21783e..b9d0c8570 100644 --- a/src/mvItemHandlers.cpp +++ b/src/mvItemHandlers.cpp @@ -1,6 +1,5 @@ #include "mvItemHandlers.h" #include "mvPyUtils.h" -#include "mvLog.h" void mvItemHandlerRegistry::checkEvents(void* data) { diff --git a/src/mvItemRegistry.cpp b/src/mvItemRegistry.cpp index 2a8b70fa5..17cb631f7 100644 --- a/src/mvItemRegistry.cpp +++ b/src/mvItemRegistry.cpp @@ -2,7 +2,6 @@ #include "mvProfiler.h" #include "mvContext.h" #include "mvAppItemCommons.h" -#include "mvLog.h" #include "mvPyUtils.h" #include "mvToolManager.h" #include "mvFontManager.h" diff --git a/src/custom/mvLoadingIndicator.cpp b/src/mvLoadingIndicator.cpp similarity index 100% rename from src/custom/mvLoadingIndicator.cpp rename to src/mvLoadingIndicator.cpp diff --git a/src/custom/mvLoadingIndicator.h b/src/mvLoadingIndicator.h similarity index 100% rename from src/custom/mvLoadingIndicator.h rename to src/mvLoadingIndicator.h diff --git a/src/mvLog.h b/src/mvLog.h deleted file mode 100644 index 9a492cf56..000000000 --- a/src/mvLog.h +++ /dev/null @@ -1,48 +0,0 @@ -//#pragma once -// -//#include -//#include -// -//// TODO: reimplement our own logger (no longer using spd logger) -// -//#ifdef MV_LOG -//#include -//#endif // MV_LOG -// -//#ifdef MV_LOG -// #define MV_CORE_TRACE(...) // -// #define MV_CORE_INFO(...) // -// #define MV_CORE_WARN(...) // -// #define MV_CORE_ERROR(...) // -// #define MV_CORE_FATAL(...) // -// -// #define MV_EVENT_TRACE(...) // -// #define MV_EVENT_INFO(...) // -// #define MV_EVENT_WARN(...) // -// #define MV_EVENT_ERROR(...) // -// #define MV_EVENT_FATAL(...) // -// -// #define MV_ITEM_REGISTRY_TRACE(...) // -// #define MV_ITEM_REGISTRY_INFO(...) // -// #define MV_ITEM_REGISTRY_WARN(...) // -// #define MV_ITEM_REGISTRY_ERROR(...) // -// #define MV_ITEM_REGISTRY_FATAL(...) // -//#else -// #define MV_CORE_TRACE(...) // -// #define MV_CORE_INFO(...) // -// #define MV_CORE_WARN(...) // -// #define MV_CORE_ERROR(...) // -// #define MV_CORE_FATAL(...) // -// -// #define MV_EVENT_TRACE(...) // -// #define MV_EVENT_INFO(...) // -// #define MV_EVENT_WARN(...) // -// #define MV_EVENT_ERROR(...) // -// #define MV_EVENT_FATAL(...) // -// -// #define MV_ITEM_REGISTRY_TRACE(...) // -// #define MV_ITEM_REGISTRY_INFO(...) // -// #define MV_ITEM_REGISTRY_WARN(...) // -// #define MV_ITEM_REGISTRY_ERROR(...) // -// #define MV_ITEM_REGISTRY_FATAL(...) // -//#endif diff --git a/src/mvNodes.cpp b/src/mvNodes.cpp index d69df6dfc..a1fd97bf6 100644 --- a/src/mvNodes.cpp +++ b/src/mvNodes.cpp @@ -2,7 +2,6 @@ #include #include "mvContext.h" #include "mvItemRegistry.h" -#include "mvLog.h" #include "mvPyUtils.h" #include "mvItemHandlers.h" #include "mvThemes.h" diff --git a/src/custom/mvSlider3D.cpp b/src/mvSlider3D.cpp similarity index 100% rename from src/custom/mvSlider3D.cpp rename to src/mvSlider3D.cpp diff --git a/src/custom/mvSlider3D.h b/src/mvSlider3D.h similarity index 100% rename from src/custom/mvSlider3D.h rename to src/mvSlider3D.h diff --git a/src/mvTables.cpp b/src/mvTables.cpp index 355a4db9b..726225b18 100644 --- a/src/mvTables.cpp +++ b/src/mvTables.cpp @@ -1,7 +1,6 @@ #include "mvTables.h" #include "mvContext.h" #include "mvCore.h" -#include "mvLog.h" #include "mvItemRegistry.h" #include "mvPyUtils.h" #include "mvFontItems.h" diff --git a/src/mvTextureItems.cpp b/src/mvTextureItems.cpp index ac30e8b9d..70413d736 100644 --- a/src/mvTextureItems.cpp +++ b/src/mvTextureItems.cpp @@ -1,6 +1,5 @@ #include "mvTextureItems.h" #include "mvPyUtils.h" -#include "mvLog.h" #include "mvUtilities.h" mvTextureRegistry::mvTextureRegistry(mvUUID uuid) diff --git a/src/mvThemes.cpp b/src/mvThemes.cpp index a4fc28f51..e6e26bcf8 100644 --- a/src/mvThemes.cpp +++ b/src/mvThemes.cpp @@ -1,5 +1,4 @@ #include "mvThemes.h" -#include "mvLog.h" #include "mvPyUtils.h" #include #include diff --git a/src/custom/mvTimePicker.cpp b/src/mvTimePicker.cpp similarity index 100% rename from src/custom/mvTimePicker.cpp rename to src/mvTimePicker.cpp diff --git a/src/custom/mvTimePicker.h b/src/mvTimePicker.h similarity index 100% rename from src/custom/mvTimePicker.h rename to src/mvTimePicker.h