diff options
-rw-r--r-- | demos/CMakeLists.txt | 2 | ||||
-rw-r--r-- | demos/Graphics/CMakeLists.txt | 8 | ||||
-rw-r--r-- | demos/platform/CMakeLists.txt | 2 | ||||
-rw-r--r-- | demos/platform/graphics/CMakeLists.txt | 8 | ||||
-rw-r--r-- | demos/platform/graphics/DrawCircle.cpp (renamed from demos/Graphics/DrawCircle.cpp) | 0 | ||||
-rw-r--r-- | demos/platform/graphics/SvgPath.cpp (renamed from demos/Graphics/SvgPath.cpp) | 0 | ||||
-rw-r--r-- | demos/platform/gui/CMakeLists.txt | 5 | ||||
-rw-r--r-- | demos/platform/gui/EmptyWindow.cpp | 19 |
8 files changed, 35 insertions, 9 deletions
diff --git a/demos/CMakeLists.txt b/demos/CMakeLists.txt index 665f359a..46eda9c4 100644 --- a/demos/CMakeLists.txt +++ b/demos/CMakeLists.txt @@ -2,7 +2,7 @@ add_library(CruDemoBase INTERFACE) target_link_libraries(CruDemoBase INTERFACE CruPlatformBootstrap) -add_subdirectory(Graphics) +add_subdirectory(platform) if(WIN32) add_subdirectory(main) diff --git a/demos/Graphics/CMakeLists.txt b/demos/Graphics/CMakeLists.txt deleted file mode 100644 index 64982a19..00000000 --- a/demos/Graphics/CMakeLists.txt +++ /dev/null @@ -1,8 +0,0 @@ -add_library(CruDemoGraphicsBase INTERFACE) -target_link_libraries(CruDemoGraphicsBase INTERFACE CruPlatformGraphicsBootstrap) - -add_executable(CruDemoGraphicsDrawCircle DrawCircle.cpp) -target_link_libraries(CruDemoGraphicsDrawCircle PRIVATE CruDemoGraphicsBase) - -add_executable(CruDemoGraphicsSvgPath SvgPath.cpp) -target_link_libraries(CruDemoGraphicsSvgPath PRIVATE CruDemoGraphicsBase) diff --git a/demos/platform/CMakeLists.txt b/demos/platform/CMakeLists.txt new file mode 100644 index 00000000..36673acd --- /dev/null +++ b/demos/platform/CMakeLists.txt @@ -0,0 +1,2 @@ +add_subdirectory(graphics) +add_subdirectory(gui) diff --git a/demos/platform/graphics/CMakeLists.txt b/demos/platform/graphics/CMakeLists.txt new file mode 100644 index 00000000..e2a96c09 --- /dev/null +++ b/demos/platform/graphics/CMakeLists.txt @@ -0,0 +1,8 @@ +add_library(CruDemoPlatformGraphicsBase INTERFACE) +target_link_libraries(CruDemoPlatformGraphicsBase INTERFACE CruPlatformGraphicsBootstrap) + +add_executable(CruDemoPlatformGraphicsDrawCircle DrawCircle.cpp) +target_link_libraries(CruDemoPlatformGraphicsDrawCircle PRIVATE CruDemoPlatformGraphicsBase) + +add_executable(CruDemoPlatformGraphicsSvgPath SvgPath.cpp) +target_link_libraries(CruDemoPlatformGraphicsSvgPath PRIVATE CruDemoPlatformGraphicsBase) diff --git a/demos/Graphics/DrawCircle.cpp b/demos/platform/graphics/DrawCircle.cpp index d3246527..d3246527 100644 --- a/demos/Graphics/DrawCircle.cpp +++ b/demos/platform/graphics/DrawCircle.cpp diff --git a/demos/Graphics/SvgPath.cpp b/demos/platform/graphics/SvgPath.cpp index 332456a8..332456a8 100644 --- a/demos/Graphics/SvgPath.cpp +++ b/demos/platform/graphics/SvgPath.cpp diff --git a/demos/platform/gui/CMakeLists.txt b/demos/platform/gui/CMakeLists.txt new file mode 100644 index 00000000..b179fbc6 --- /dev/null +++ b/demos/platform/gui/CMakeLists.txt @@ -0,0 +1,5 @@ +add_library(CruDemoPlatformGuiBase INTERFACE) +target_link_libraries(CruDemoPlatformGuiBase INTERFACE CruPlatformBootstrap) + +add_executable(CruDemoPlatformGuiEmptyWindow EmptyWindow.cpp) +target_link_libraries(CruDemoPlatformGuiEmptyWindow PRIVATE CruDemoPlatformGuiBase) diff --git a/demos/platform/gui/EmptyWindow.cpp b/demos/platform/gui/EmptyWindow.cpp new file mode 100644 index 00000000..83e352af --- /dev/null +++ b/demos/platform/gui/EmptyWindow.cpp @@ -0,0 +1,19 @@ +#include "cru/platform/bootstrap/Bootstrap.h" +#include "cru/platform/gui/Base.h" +#include "cru/platform/gui/UiApplication.h" +#include "cru/platform/gui/Window.h" + +using cru::platform::gui::IUiApplication; +using cru::platform::gui::WindowVisibilityType; + +int main() { + std::unique_ptr<IUiApplication> application( + cru::platform::bootstrap::CreateUiApplication()); + + application->SetQuitOnAllWindowClosed(true); + auto window = application->CreateWindow(); + window->SetVisibility(WindowVisibilityType::Show); + window->SetToForeground(); + + return application->Run(); +} |