Contain retained base UI controls

This commit is contained in:
2026-06-02 22:00:56 +02:00
parent 39444af84e
commit 37b1cf82f3
4 changed files with 53 additions and 5 deletions

View File

@@ -308,12 +308,49 @@ if(PP_BUILD_APP)
VS_GLOBAL_CharacterSet "Unicode")
target_precompile_headers(pp_legacy_engine PRIVATE src/pch.h)
add_library(pp_legacy_ui_core OBJECT
${PP_LEGACY_UI_CORE_SOURCES})
target_link_libraries(pp_legacy_ui_core
PUBLIC
pp_legacy_engine
pp_project_options
PRIVATE
pp_renderer_api
pp_project_warnings)
if(TARGET pp_renderer_gl)
target_link_libraries(pp_legacy_ui_core PRIVATE pp_renderer_gl)
endif()
target_include_directories(pp_legacy_ui_core
PUBLIC
${PP_LEGACY_INCLUDE_DIRS})
target_compile_definitions(pp_legacy_ui_core
PUBLIC
ENUM_BITFIELDS_NOT_SUPPORTED
UNICODE
_UNICODE
_CRT_SECURE_NO_WARNINGS
_SCL_SECURE_NO_WARNINGS
_SILENCE_CXX17_CODECVT_HEADER_DEPRECATION_WARNING
_SILENCE_STDEXT_ARR_ITERS_DEPRECATION_WARNING
_CONSOLE
WITH_CURL=1)
set_target_properties(pp_legacy_ui_core PROPERTIES
VS_GLOBAL_CharacterSet "Unicode")
target_precompile_headers(pp_legacy_ui_core PRIVATE src/pch.h)
add_library(pp_legacy_app STATIC
${PP_LEGACY_APP_SOURCES})
${PP_LEGACY_APP_SOURCES}
$<TARGET_OBJECTS:pp_legacy_ui_core>)
target_link_libraries(pp_legacy_app
PUBLIC
pp_legacy_engine
pp_legacy_ui_core
pp_project_options
PRIVATE
pp_renderer_api

View File

@@ -27,8 +27,7 @@ set(PP_LEGACY_RENDERER_GL_SOURCES
src/texture.cpp
)
set(PP_LEGACY_APP_SOURCES
src/canvas_modes.cpp
set(PP_LEGACY_UI_CORE_SOURCES
src/layout.cpp
src/node.cpp
src/node_border.cpp
@@ -49,6 +48,10 @@ set(PP_LEGACY_APP_SOURCES
src/node_slider.cpp
src/node_text.cpp
src/node_text_input.cpp
)
set(PP_LEGACY_APP_SOURCES
src/canvas_modes.cpp
src/pch.cpp
)

View File

@@ -10,7 +10,7 @@ Keep it updated as platform paths move to shared CMake targets.
| Platform/Target | Current Entrypoint | Notes |
| --- | --- | --- |
| Windows desktop | Root `CMakeLists.txt`, preset `windows-msvc-default`; target preset `windows-vs2026-x64` retained for VS 2026 | Raw `.sln/.vcxproj` files removed on 2026-05-31; local machine currently uses Visual Studio 17 2022; `PanoPainter` now links through `pp_platform_windows` and `panopainter_app`, with Windows/vendor link dependencies owned by the platform shell, runtime payload deployment in `cmake/PanoPainterRuntime.cmake`, retained third-party source dependencies contained by `pp_legacy_vendor`, retained OpenGL runtime sources contained by `pp_legacy_renderer_gl` and folded into `pp_legacy_engine`, legacy canvas/asset/runtime sources contained by `pp_legacy_engine`, app orchestration/version metadata owned by `panopainter_app`, and app-specific modal/dialog/panel/canvas workflow nodes owned by `pp_panopainter_ui` |
| Windows desktop | Root `CMakeLists.txt`, preset `windows-msvc-default`; target preset `windows-vs2026-x64` retained for VS 2026 | Raw `.sln/.vcxproj` files removed on 2026-05-31; local machine currently uses Visual Studio 17 2022; `PanoPainter` now links through `pp_platform_windows` and `panopainter_app`, with Windows/vendor link dependencies owned by the platform shell, runtime payload deployment in `cmake/PanoPainterRuntime.cmake`, retained third-party source dependencies contained by `pp_legacy_vendor`, retained OpenGL runtime sources contained by `pp_legacy_renderer_gl` and folded into `pp_legacy_engine`, legacy canvas/asset/runtime sources contained by `pp_legacy_engine`, retained base UI controls contained by `pp_legacy_ui_core` and folded into `pp_legacy_app`, app orchestration/version metadata owned by `panopainter_app`, and app-specific modal/dialog/panel/canvas workflow nodes owned by `pp_panopainter_ui` |
| Windows AppX | `PanoPainterPackage/Package.appxmanifest`, `.wapproj` referenced by solution | Distribution packaging |
| macOS | `PanoPainter-OSX/` project files and `Info.plist` | Uses `NSOpenGLView` today |
| iOS | `PanoPainter/Info.plist`, related Apple sources | Uses OpenGL ES today |
@@ -410,6 +410,10 @@ Known warnings after the current CMake app build:
the retained OpenGL runtime classes still include legacy app/engine headers
and are still consumed directly by canvas and UI classes. It should become a
normal backend library once those call sites depend on `pp_renderer_api`.
- `pp_legacy_ui_core` is an object-library containment boundary because the
retained base `Node` controls still depend on legacy renderer and app
headers. It should shrink as layout parsing, colors, generic controls, and
text/image primitives move to `pp_ui_core`.
- `pp_panopainter_ui` currently surfaces existing legacy `Node`/`Serializer`
header and static-analysis warnings while it still depends on
`pp_legacy_app`; these should be reduced as the UI core/app UI boundary is

View File

@@ -156,7 +156,11 @@ replacement components take over.
`pp_legacy_renderer_gl` now owns the retained OpenGL runtime implementations
for `Font`, `RTT`, `Shader`, `Shape`, `Texture2D`, `TextureCube`, `Sampler`,
and `TextureManager` as an object-library boundary folded into the retained
engine until the renderer API inversion is complete.
engine until the renderer API inversion is complete. `pp_legacy_ui_core` now
owns retained base `Node`, layout, text, image, input, popup, slider, scroll,
and settings UI controls as an object-library boundary folded into the legacy
app adapter until those paths are replaced by `pp_ui_core` and app-specific UI
targets.
`panopainter_app` is now a real static target that owns app orchestration
sources, app version metadata, and version-header generation.
`pp_panopainter_ui` now owns app-specific modal, dialog, panel, canvas,