diff -Nru tgui-1.0-1.1.0+mantic/.github/workflows/ci.yml tgui-1.0-1.2.0+mantic/.github/workflows/ci.yml --- tgui-1.0-1.1.0+mantic/.github/workflows/ci.yml 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/.github/workflows/ci.yml 2024-03-23 12:27:01.000000000 +0000 @@ -10,7 +10,7 @@ CLANG_VERSION: 14 steps: - name: Checkout TGUI - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Install dependencies run: | @@ -90,7 +90,7 @@ CMAKE_VERSION_PATCH: 4 steps: - name: Checkout TGUI - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: path: TGUI @@ -103,28 +103,28 @@ echo "glfw-revision=$(git ls-remote $GLFW_GITHUB_URL HEAD | cut -f1)" >> $GITHUB_OUTPUT - name: Cache SFML - uses: actions/cache@v3 + uses: actions/cache@v4 id: cache-sfml with: path: SFML_INSTALL key: CACHE_LINUX_SFML_LATEST_${{ steps.find-dependencies.outputs.sfml-revision }} - name: Cache SDL - uses: actions/cache@v3 + uses: actions/cache@v4 id: cache-sdl with: path: SDL_INSTALL key: CACHE_LINUX_SDL_LATEST_${{ steps.find-dependencies.outputs.sdl-revision }} - name: Cache SDL_ttf - uses: actions/cache@v3 + uses: actions/cache@v4 id: cache-sdl-ttf with: path: SDL_TTF_INSTALL key: CACHE_LINUX_SDL_TTF_LATEST_${{ steps.find-dependencies.outputs.sdl-ttf-revision }} - name: Cache GLFW - uses: actions/cache@v3 + uses: actions/cache@v4 id: cache-glfw with: path: GLFW_INSTALL @@ -133,7 +133,7 @@ - name: Install dependencies run: | sudo apt-get update - sudo apt-get -y install xorg-dev libudev-dev libopenal-dev libflac-dev libvorbis-dev libgl1-mesa-dev libegl1-mesa-dev libfreetype-dev ninja-build + sudo apt-get -y install xorg-dev libudev-dev libopenal-dev libflac-dev libvorbis-dev libgl1-mesa-dev libegl1-mesa-dev libfreetype-dev ninja-build libwayland-dev libxkbcommon-dev sudo sh -c 'wget -nv -O- "https://cmake.org/files/v${{env.CMAKE_VERSION}}/cmake-${{env.CMAKE_VERSION}}.${{env.CMAKE_VERSION_PATCH}}-linux-x86_64.tar.gz" | tar --strip-components=1 -xz -C /usr/local' - name: Build SFML @@ -238,31 +238,31 @@ CLANG_VERSION: '6.0' steps: - name: Checkout TGUI - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Cache SFML - uses: actions/cache@v3 + uses: actions/cache@v4 id: cache-sfml with: path: SFML_INSTALL key: CACHE_LINUX_OLDEST_SFML_${{env.SFML_VERSION}} - name: Cache SDL - uses: actions/cache@v3 + uses: actions/cache@v4 id: cache-sdl with: path: SDL_INSTALL key: CACHE_LINUX_OLDEST_SDL_${{env.SDL_VERSION}} - name: Cache SDL_ttf - uses: actions/cache@v3 + uses: actions/cache@v4 id: cache-sdl-ttf with: path: SDL_TTF_INSTALL key: CACHE_LINUX_OLDEST_SDL_TTF_${{env.SDL_TTF_VERSION}} - name: Cache GLFW - uses: actions/cache@v3 + uses: actions/cache@v4 id: cache-glfw with: path: GLFW_INSTALL @@ -367,7 +367,7 @@ runs-on: ubuntu-22.04 steps: - name: Checkout TGUI - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Install dependencies run: | @@ -447,25 +447,31 @@ #---------------------------------------- - windows-sfml-sdl: # Setup technically not allowed, SFML_GRAPHICS and SDL_RENDERER have conflicting FreeType dependencies + windows: # Setup technically not allowed, backends have conflicting FreeType dependencies runs-on: windows-2022 env: SFML_VERSION: 2.6.0 SDL_VERSION: 2.28.3 SDL_TTF_VERSION: 2.20.2 + GLFW_VERSION: 3.4 + FREETYPE_VERSION: 2.13.2 MSVC_TOOLSET_VERSION: 143 # VS2022 steps: - name: Checkout TGUI - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Install dependencies run: | C:\msys64\usr\bin\wget.exe -nv https://github.com/SFML/SFML/releases/download/${env:SFML_VERSION}/SFML-${env:SFML_VERSION}-windows-vc17-32-bit.zip C:\msys64\usr\bin\wget.exe -nv https://github.com/libsdl-org/SDL/releases/download/release-${env:SDL_VERSION}/SDL2-devel-${env:SDL_VERSION}-VC.zip C:\msys64\usr\bin\wget.exe -nv https://github.com/libsdl-org/SDL_ttf/releases/download/release-${env:SDL_TTF_VERSION}/SDL2_ttf-devel-${env:SDL_TTF_VERSION}-VC.zip + C:\msys64\usr\bin\wget.exe -nv https://github.com/glfw/glfw/releases/download/${env:GLFW_VERSION}/glfw-${env:GLFW_VERSION}.bin.WIN32.zip + C:\msys64\usr\bin\wget.exe -nv https://github.com/ubawurinna/freetype-windows-binaries/archive/refs/tags/v${env:FREETYPE_VERSION}.zip 7z x SFML-${env:SFML_VERSION}-windows-vc17-32-bit.zip 7z x SDL2-devel-${env:SDL_VERSION}-VC.zip 7z x SDL2_ttf-devel-${env:SDL_TTF_VERSION}-VC.zip + 7z x glfw-${env:GLFW_VERSION}.bin.WIN32.zip + 7z x v${env:FREETYPE_VERSION}.zip - name: Build TGUI run: > @@ -473,6 +479,9 @@ -DSFML_DIR="${env:GITHUB_WORKSPACE}/SFML-${env:SFML_VERSION}/lib/cmake/SFML/" -DSDL2_DIR="${env:GITHUB_WORKSPACE}/SDL2-${env:SDL_VERSION}/cmake/" -DSDL2_ttf_DIR="${env:GITHUB_WORKSPACE}/SDL2_ttf-${env:SDL_TTF_VERSION}/cmake/" + -DGLFW_INCLUDE_DIR="${env:GITHUB_WORKSPACE}/glfw-${env:GLFW_VERSION}.bin.WIN32/include" + -DGLFW_LIBRARY="${env:GITHUB_WORKSPACE}/glfw-${env:GLFW_VERSION}.bin.WIN32/lib-vc2022/glfw3dll.lib" + -DFREETYPE_WINDOWS_BINARIES_PATH="${env:GITHUB_WORKSPACE}/freetype-windows-binaries-${env:FREETYPE_VERSION}" -DCMAKE_UNITY_BUILD=OFF -DBUILD_SHARED_LIBS=ON -DTGUI_CXX_STANDARD=23 @@ -483,6 +492,7 @@ -DTGUI_BACKEND=Custom -DTGUI_HAS_BACKEND_SFML_GRAPHICS=ON -DTGUI_HAS_BACKEND_SDL_RENDERER=ON + -DTGUI_HAS_BACKEND_GLFW_OPENGL3=ON cmake --build TGUI-build --config Debug @@ -500,14 +510,14 @@ MSVC_TOOLSET_VERSION: 141 # VS2017 steps: - name: Checkout TGUI - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Install dependencies run: | C:\msys64\usr\bin\wget.exe -nv https://cmake.org/files/v${env:CMAKE_VERSION}/cmake-${env:CMAKE_VERSION}.${env:CMAKE_VERSION_PATCH}-win32-x86.zip C:\msys64\usr\bin\wget.exe -nv https://www.sfml-dev.org/files/SFML-${env:SFML_VERSION}-windows-vc15-32-bit.zip C:\msys64\usr\bin\wget.exe -nv https://libsdl.org/release/SDL2-devel-${env:SDL_VERSION}-VC.zip - C:\msys64\usr\bin\wget.exe -nv https://www.libsdl.org/projects/SDL_ttf/release/SDL2_ttf-devel-${env:SDL_TTF_VERSION}-VC.zip + C:\msys64\usr\bin\wget.exe -nv https://libsdl.org/projects/SDL_ttf/release/SDL2_ttf-devel-${env:SDL_TTF_VERSION}-VC.zip C:\msys64\usr\bin\wget.exe -nv https://github.com/ubawurinna/freetype-windows-binaries/archive/refs/tags/v${env:FREETYPE_VERSION}.zip 7z x cmake-${env:CMAKE_VERSION}.${env:CMAKE_VERSION_PATCH}-win32-x86.zip 7z x SFML-${env:SFML_VERSION}-windows-vc15-32-bit.zip @@ -543,13 +553,13 @@ windows-clang: runs-on: windows-2022 env: - SFML_VERSION: 2.6.0 + SFML_VERSION: 2.6.1 steps: - name: Checkout TGUI - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Cache SFML - uses: actions/cache@v3 + uses: actions/cache@v4 id: cache-sfml with: path: | @@ -608,17 +618,17 @@ runs-on: windows-2019 env: SFML_VERSION: 2.5.1 - GLFW_VERSION: 3.3.3 + GLFW_VERSION: 3.3.10 FREETYPE_VERSION: 2.11.1 CMAKE_VERSION: 3.19 CMAKE_VERSION_PATCH: 8 MSVC_TOOLSET_VERSION: 142 # VS2019 steps: - name: Checkout TGUI - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Cache SFML - uses: actions/cache@v3 + uses: actions/cache@v4 id: cache-sfml with: path: SFML_INSTALL @@ -669,7 +679,7 @@ runs-on: macos-latest steps: - name: Checkout TGUI - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Install dependencies run: | @@ -726,7 +736,7 @@ SDL_TTF_VERSION: 2.20.2 steps: - name: Checkout TGUI - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: path: TGUI @@ -764,10 +774,10 @@ ARCH_ABI: arm64-v8a steps: - name: Checkout TGUI - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Cache SFML - uses: actions/cache@v3 + uses: actions/cache@v4 id: cache-sfml with: path: | @@ -815,13 +825,13 @@ ios-sfml-graphics: runs-on: macos-12 env: - SFML_VERSION: 2.5.1 + SFML_VERSION: 2.6.x # At least 2.6.2 is required steps: - name: Checkout TGUI - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Cache SFML - uses: actions/cache@v3 + uses: actions/cache@v4 id: cache-sfml with: path: SFML_INSTALL @@ -830,8 +840,8 @@ - name: Build SFML if: steps.cache-sfml.outputs.cache-hit != 'true' run: | - wget -nv https://github.com/SFML/SFML/releases/download/$SFML_VERSION/SFML-$SFML_VERSION-sources.zip - unzip SFML-$SFML_VERSION-sources.zip + wget -nv https://github.com/SFML/SFML/archive/refs/heads/${SFML_VERSION}.zip + unzip ${SFML_VERSION}.zip cmake -GXcode -DCMAKE_INSTALL_PREFIX=SFML_INSTALL -DCMAKE_TOOLCHAIN_FILE="$GITHUB_WORKSPACE/SFML-$SFML_VERSION/cmake/toolchains/iOS.toolchain.cmake" -DIOS_PLATFORM=OS -DBUILD_SHARED_LIBS=OFF -DSFML_BUILD_AUDIO=OFF -DSFML_BUILD_NETWORK=OFF -S SFML-$SFML_VERSION -B SFML-build cmake --build SFML-build --config Debug --target install @@ -857,13 +867,13 @@ #---------------------------------------- ios-sdl: - runs-on: macos-12 + runs-on: macos-14 env: SDL_VERSION: 2.26.5 SDL_TTF_VERSION: 2.0.18 steps: - name: Checkout TGUI - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Build SDL run: | @@ -944,20 +954,20 @@ # I've decided to just put the nightly build code in this file as well. nightly-build-windows-visual-studio: if: github.event_name == 'push' && github.ref == 'refs/heads/1.x' - needs: [linux, linux-latest-dev, linux-oldest, linux-per-backend, windows-sfml-sdl, windows-oldest, windows-clang, windows-static-mt, macos, android-sdl, android-sfml-graphics, ios-sfml-graphics, ios-sdl] + needs: [linux, linux-latest-dev, linux-oldest, linux-per-backend, windows, windows-oldest, windows-clang, windows-static-mt, macos, android-sdl, android-sfml-graphics, ios-sfml-graphics, ios-sdl] runs-on: windows-2019 env: - SFML_VERSION: 2.6.0 + SFML_VERSION: 2.6.1 MSVC_TOOLSET_VERSION: 141 # VS2017 steps: - name: Checkout TGUI - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: path: TGUI - name: Install dependencies run: | - Choco-Install -PackageName doxygen.install + Install-ChocoPackage doxygen.install mkdir x86 C:\msys64\usr\bin\wget.exe -nv https://github.com/SFML/SFML/releases/download/${env:SFML_VERSION}/SFML-${env:SFML_VERSION}-windows-vc15-32-bit.zip 7z x SFML-${env:SFML_VERSION}-windows-vc15-32-bit.zip -o"x86" @@ -1078,7 +1088,7 @@ Remove-Item TGUI-1.x-nightly -Recurse -Force -Confirm:$false - name: Publish - uses: "marvinpinto/action-automatic-releases@latest" + uses: "crowbarmaster/GH-Automatic-Releases@latest" with: repo_token: "${{ secrets.GITHUB_TOKEN }}" automatic_release_tag: "nightly_build" diff -Nru tgui-1.0-1.1.0+mantic/CMakeLists.txt tgui-1.0-1.2.0+mantic/CMakeLists.txt --- tgui-1.0-1.1.0+mantic/CMakeLists.txt 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/CMakeLists.txt 2024-03-23 12:27:01.000000000 +0000 @@ -1,6 +1,6 @@ #################################################################################################### # TGUI - Texus' Graphical User Interface -# Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +# Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) # # 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. @@ -22,7 +22,7 @@ # If the cmake version is higher than the minimum version then enable all new policies, up to the maximum version specified. # When cmake is newer than the highest version then its newest policies will still be set to the old behavior for compatibility. -cmake_minimum_required(VERSION 3.16...3.27) +cmake_minimum_required(VERSION 3.16...3.28) # Include macros such as tgui_set_option include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/Macros.cmake) @@ -31,7 +31,7 @@ tgui_set_option(CMAKE_BUILD_TYPE Release STRING "Choose the type of build (Debug or Release)") # Project name and version -project(TGUI VERSION 1.1.0 LANGUAGES CXX) +project(TGUI VERSION 1.2.0 LANGUAGES CXX) # Use the paths from the cmake GNUInstallDirs module as defaults (https://cmake.org/cmake/help/latest/module/GNUInstallDirs.html) include(GNUInstallDirs) @@ -157,7 +157,8 @@ message(FATAL_ERROR "TGUI_BUILD_AS_CXX_MODULE can only be turned on if TGUI_CXX_STANDARD is set to at least 20") endif() - if (NOT CMAKE_EXPERIMENTAL_CXX_MODULE_CMAKE_API) + # TODO: Remove support for CMake < 3.28 as the lines below don't work properly anyway when placed here + if(CMAKE_VERSION VERSION_LESS 3.28 AND NOT CMAKE_EXPERIMENTAL_CXX_MODULE_CMAKE_API) if(CMAKE_VERSION VERSION_GREATER_EQUAL 3.27) set(CMAKE_EXPERIMENTAL_CXX_MODULE_CMAKE_API "aa1f7df0-828a-4fcd-9afc-2dc80491aca7") # CMake 3.27 else() @@ -227,6 +228,19 @@ # Set the path for the libraries set(LIBRARY_OUTPUT_PATH "${PROJECT_BINARY_DIR}/lib") +# Don't create an install target if we detect a dependency that is being build without an install target +if (NOT DEFINED TGUI_INSTALL) + if ((DEFINED SDL2_DISABLE_INSTALL AND SDL2_DISABLE_INSTALL) + OR (DEFINED SDL_DISABLE_INSTALL AND SDL_DISABLE_INSTALL) + OR (DEFINED SDL2TTF_INSTALL AND NOT SDL2TTF_INSTALL) + OR (DEFINED SDL3TTF_INSTALL AND NOT SDL3TTF_INSTALL) + OR (DEFINED GLFW_INSTALL AND NOT GLFW_INSTALL)) + set(TGUI_INSTALL OFF) + else() + set(TGUI_INSTALL ON) + endif() +endif() + # Define the macros to link TGUI to its dependencies include(${PROJECT_SOURCE_DIR}/cmake/Dependencies.cmake) @@ -354,46 +368,59 @@ add_subdirectory(doc) endif() -# Install pkg-config files by default on Linux (and BSD) -tgui_assign_bool(TGUI_INSTALL_PKGCONFIG_DEFAULT TGUI_OS_LINUX) -option(TGUI_INSTALL_PKGCONFIG_FILES "TRUE to automatically install pkg-config files so other projects can find TGUI" ${TGUI_INSTALL_PKGCONFIG_DEFAULT}) - -if (TGUI_INSTALL_PKGCONFIG_FILES) - tgui_set_option(TGUI_PKGCONFIG_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}/${TGUI_PKGCONFIG_DIR}" PATH "Install directory for TGUI's pkg-config .pc files") - - configure_file("cmake/pkgconfig/tgui.pc.in" "pkgconfig/tgui.pc" @ONLY) - install(FILES "${CMAKE_CURRENT_BINARY_DIR}/pkgconfig/tgui.pc" DESTINATION "${TGUI_PKGCONFIG_INSTALL_PREFIX}") -endif() - -# Install include files -if(NOT TGUI_BUILD_FRAMEWORK) - install(DIRECTORY include/ - DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} - COMPONENT devel - PATTERN "*.in" EXCLUDE) -endif() - -# Install PDB file -if(TGUI_GENERATE_PDB) - # When using a Visual Studio generator, the pdb files are located in Debug and RelWithDebInfo subfolders, but not when - # using single-configuration generators such as NMake Makefiles. - # When using Linker PDB files (i.e. TGUI_SHARED_LIBS=FALSE), CMake 3.13 introduced a generator expression that helps us. - # Linker PDB files are installed next to the dll file (where VS searches them) while compiler PDB files are placed next to the lib file. - if(TGUI_SHARED_LIBS) - install (FILES $ DESTINATION ${CMAKE_INSTALL_BINDIR} OPTIONAL COMPONENT devel) - else() - # TODO: Find a reliable way to know whether the file has a "-d" postfix instead of trying to install both. OPTIONAL is also required when config is Release. - if (MSVC_IDE) - install(FILES "${PROJECT_BINARY_DIR}/lib/\${CMAKE_INSTALL_CONFIG_NAME}/tgui-s.pdb" DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT devel OPTIONAL) - install(FILES "${PROJECT_BINARY_DIR}/lib/\${CMAKE_INSTALL_CONFIG_NAME}/tgui-s-d.pdb" DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT devel OPTIONAL) +if (TGUI_INSTALL) + # Install pkg-config files by default on Linux (and BSD) + tgui_assign_bool(TGUI_INSTALL_PKGCONFIG_DEFAULT TGUI_OS_LINUX) + option(TGUI_INSTALL_PKGCONFIG_FILES "TRUE to automatically install pkg-config files so other projects can find TGUI" ${TGUI_INSTALL_PKGCONFIG_DEFAULT}) + + if (TGUI_INSTALL_PKGCONFIG_FILES) + if (TGUI_OS_BSD) + set(default_pkgconfig_dir "libdata/pkgconfig") + else() + set(default_pkgconfig_dir "${CMAKE_INSTALL_LIBDIR}/pkgconfig") + endif() + tgui_set_option(TGUI_PKGCONFIG_INSTALL_DIR "${default_pkgconfig_dir}" PATH "Install directory for TGUI's pkg-config .pc file") + + configure_file("cmake/pkgconfig/tgui.pc.in" "pkgconfig/tgui.pc" @ONLY) + + if (TGUI_PKGCONFIG_INSTALL_PREFIX) + message(WARNING "TGUI_PKGCONFIG_INSTALL_PREFIX is deprecated, use TGUI_PKGCONFIG_INSTALL_DIR instead (which is a relative instead of an absolute path by default)") + install(FILES "${CMAKE_CURRENT_BINARY_DIR}/pkgconfig/tgui.pc" DESTINATION "${TGUI_PKGCONFIG_INSTALL_PREFIX}") else() - install(FILES "${PROJECT_BINARY_DIR}/lib/tgui-s.pdb" DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT devel OPTIONAL) - install(FILES "${PROJECT_BINARY_DIR}/lib/tgui-s-d.pdb" DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT devel OPTIONAL) + install(FILES "${CMAKE_CURRENT_BINARY_DIR}/pkgconfig/tgui.pc" DESTINATION "${TGUI_PKGCONFIG_INSTALL_DIR}") + endif() + endif() + + # Install include files + if(NOT TGUI_BUILD_FRAMEWORK) + install(DIRECTORY include/ + DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} + COMPONENT devel + PATTERN "*.in" EXCLUDE) + endif() + + # Install PDB file + if(TGUI_GENERATE_PDB) + # When using a Visual Studio generator, the pdb files are located in Debug and RelWithDebInfo subfolders, but not when + # using single-configuration generators such as NMake Makefiles. + # When using Linker PDB files (i.e. TGUI_SHARED_LIBS=FALSE), CMake 3.13 introduced a generator expression that helps us. + # Linker PDB files are installed next to the dll file (where VS searches them) while compiler PDB files are placed next to the lib file. + if(TGUI_SHARED_LIBS) + install(FILES $ DESTINATION ${CMAKE_INSTALL_BINDIR} OPTIONAL COMPONENT devel) + else() + # TODO: Find a reliable way to know whether the file has a "-d" postfix instead of trying to install both. OPTIONAL is also required when config is Release. + if (MSVC_IDE) + install(FILES "${PROJECT_BINARY_DIR}/lib/\${CMAKE_INSTALL_CONFIG_NAME}/tgui-s.pdb" DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT devel OPTIONAL) + install(FILES "${PROJECT_BINARY_DIR}/lib/\${CMAKE_INSTALL_CONFIG_NAME}/tgui-s-d.pdb" DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT devel OPTIONAL) + else() + install(FILES "${PROJECT_BINARY_DIR}/lib/tgui-s.pdb" DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT devel OPTIONAL) + install(FILES "${PROJECT_BINARY_DIR}/lib/tgui-s-d.pdb" DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT devel OPTIONAL) + endif() endif() endif() -endif() -# Install miscellaneous files -install(FILES license.txt DESTINATION ${CMAKE_INSTALL_DOCDIR}) -install(FILES README.md DESTINATION ${CMAKE_INSTALL_DOCDIR}) -install(DIRECTORY themes DESTINATION "${TGUI_MISC_INSTALL_PREFIX}") + # Install miscellaneous files + install(FILES license.txt DESTINATION ${CMAKE_INSTALL_DOCDIR}) + install(FILES README.md DESTINATION ${CMAKE_INSTALL_DOCDIR}) + install(DIRECTORY themes DESTINATION "${TGUI_MISC_INSTALL_PREFIX}") +endif() diff -Nru tgui-1.0-1.1.0+mantic/changelog.md tgui-1.0-1.2.0+mantic/changelog.md --- tgui-1.0-1.1.0+mantic/changelog.md 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/changelog.md 2024-03-23 12:27:01.000000000 +0000 @@ -1,3 +1,19 @@ +TGUI 1.2 (23 March 2024) +------------------------- + +- Added Theme::replace function +- Added TreeView::changeItem function +- Added TreeView::getNode function +- Added ignoreMouseEvents function to canvas widgets +- Added Panel::setEventBubbling to enable more intuitive event propagation +- Replaced getWidgetAtPosition with getWidgetAtPos +- getWidgetBelowMouseCursor was given a parameter for recursive search +- Textures with different part rects were incorrectly considered equal +- showWithEffect didn't show widget if a hide animation was still playing +- Setting opacity of a SubWidgetContainer didn't work +- SubWidgetContainer didn't support show/hide animations + + TGUI 1.1 (4 November 2023) --------------------------- diff -Nru tgui-1.0-1.1.0+mantic/cmake/Config.cmake tgui-1.0-1.2.0+mantic/cmake/Config.cmake --- tgui-1.0-1.1.0+mantic/cmake/Config.cmake 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/cmake/Config.cmake 2024-03-23 12:27:01.000000000 +0000 @@ -56,10 +56,3 @@ else() message(WARNING "Unrecognized compiler: ${CMAKE_CXX_COMPILER_ID}. Use at your own risk.") endif() - -# Set pkgconfig install directory -if (TGUI_OS_BSD) - set(TGUI_PKGCONFIG_DIR "/libdata/pkgconfig") -else() - set(TGUI_PKGCONFIG_DIR "/${CMAKE_INSTALL_LIBDIR}/pkgconfig") -endif() diff -Nru tgui-1.0-1.1.0+mantic/cmake/Dependencies.cmake tgui-1.0-1.2.0+mantic/cmake/Dependencies.cmake --- tgui-1.0-1.1.0+mantic/cmake/Dependencies.cmake 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/cmake/Dependencies.cmake 2024-03-23 12:27:01.000000000 +0000 @@ -1,6 +1,6 @@ #################################################################################################### # TGUI - Texus' Graphical User Interface -# Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +# Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) # # 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. @@ -93,7 +93,7 @@ tgui_find_dependency_sfml(${component} "") # Link to SFML and set include and library search directories - if (SFML_VERSION VERSION_GREATER_EQUAL 3) + if (SFML_VERSION VERSION_GREATER_EQUAL 3 OR TARGET SFML::${component}) # SFML_VERSION can be undefined if target already existed and wasn't searched by TGUI target_link_libraries(tgui PUBLIC SFML::${component}) else() string(TOLOWER ${component} lowercase_component) diff -Nru tgui-1.0-1.1.0+mantic/cmake/Macros.cmake tgui-1.0-1.2.0+mantic/cmake/Macros.cmake --- tgui-1.0-1.1.0+mantic/cmake/Macros.cmake 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/cmake/Macros.cmake 2024-03-23 12:27:01.000000000 +0000 @@ -1,6 +1,6 @@ #################################################################################################### # TGUI - Texus' Graphical User Interface -# Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +# Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) # # 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. @@ -114,58 +114,6 @@ endif() endfunction() -# Generate a TGUIConfig.cmake file (and associated files) -function(tgui_export_target export_name) - include(CMakePackageConfigHelpers) - write_basic_package_version_file("${PROJECT_BINARY_DIR}/TGUIConfigVersion.cmake" - VERSION ${TGUI_VERSION_MAJOR}.${TGUI_VERSION_MINOR}.${TGUI_VERSION_PATCH} - COMPATIBILITY SameMajorVersion) - - if (TGUI_SHARED_LIBS) - set(targets_config_filename TGUISharedTargets.cmake) - else() - set(targets_config_filename TGUIStaticTargets.cmake) - endif() - - export(EXPORT ${export_name} - NAMESPACE TGUI:: - FILE "${PROJECT_BINARY_DIR}/${targets_config_filename}") - - if (TGUI_BUILD_FRAMEWORK) - set(config_package_location "TGUI.framework/Resources/CMake") - else() - set(config_package_location ${CMAKE_INSTALL_LIBDIR}/cmake/TGUI) - endif() - - configure_package_config_file("${PROJECT_SOURCE_DIR}/cmake/TGUIConfig.cmake.in" "${PROJECT_BINARY_DIR}/TGUIConfig.cmake" - INSTALL_DESTINATION "${config_package_location}") - - install(EXPORT ${export_name} - NAMESPACE TGUI:: - FILE ${targets_config_filename} - DESTINATION ${config_package_location}) - - install(FILES "${PROJECT_BINARY_DIR}/TGUIConfig.cmake" - "${PROJECT_BINARY_DIR}/TGUIConfigVersion.cmake" - DESTINATION ${config_package_location} - COMPONENT devel) - - # Install the find modules when they are needed to find our dependencies - if(TGUI_HAS_WINDOW_BACKEND_GLFW AND NOT TGUI_FOUND_GLFW_CONFIG) - install(FILES "${PROJECT_SOURCE_DIR}/cmake/Modules/Findglfw3.cmake" DESTINATION ${config_package_location} COMPONENT devel) - add_custom_command(TARGET tgui POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy "${PROJECT_SOURCE_DIR}/cmake/Modules/Findglfw3.cmake" "${PROJECT_BINARY_DIR}/" VERBATIM) - endif() - if((TGUI_HAS_WINDOW_BACKEND_SDL OR TGUI_HAS_FONT_BACKEND_SDL_TTF) AND NOT TGUI_FOUND_SDL2_CONFIG) - install(FILES "${PROJECT_SOURCE_DIR}/cmake/Modules/FindSDL2.cmake" DESTINATION ${config_package_location} COMPONENT devel) - add_custom_command(TARGET tgui POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy "${PROJECT_SOURCE_DIR}/cmake/Modules/FindSDL2.cmake" "${PROJECT_BINARY_DIR}/" VERBATIM) - endif() - if(TGUI_HAS_FONT_BACKEND_SDL_TTF AND NOT TGUI_FOUND_SDL2_TTF_CONFIG) - install(FILES "${PROJECT_SOURCE_DIR}/cmake/Modules/FindSDL2_ttf.cmake" DESTINATION ${config_package_location} COMPONENT devel) - add_custom_command(TARGET tgui POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy "${PROJECT_SOURCE_DIR}/cmake/Modules/FindSDL2_ttf.cmake" "${PROJECT_BINARY_DIR}/" VERBATIM) - endif() -endfunction() - - # Install the dlls next to the executables (both immediately after building and when installing them somewhere) function(copy_dlls_to_exe post_build_destination install_destination target) if(TGUI_OS_WINDOWS) @@ -207,9 +155,11 @@ COMMAND ${CMAKE_COMMAND} -E copy "${file_to_copy}" "${post_build_destination}" VERBATIM) - install(FILES "${file_to_copy}" - DESTINATION "${install_destination}" - COMPONENT ${target}) + if (TGUI_INSTALL) + install(FILES "${file_to_copy}" + DESTINATION "${install_destination}" + COMPONENT ${target}) + endif() endforeach() endif() endfunction() diff -Nru tgui-1.0-1.1.0+mantic/cmake/Modules/FindSDL2.cmake tgui-1.0-1.2.0+mantic/cmake/Modules/FindSDL2.cmake --- tgui-1.0-1.1.0+mantic/cmake/Modules/FindSDL2.cmake 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/cmake/Modules/FindSDL2.cmake 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ # Distributed under the OSI-approved BSD 3-Clause License. # See https://cmake.org/licensing for details. -# Copyright 2021-2023 Bruno Van de Velde +# Copyright 2021-2024 Bruno Van de Velde # Copyright 2019 Amine Ben Hassouna # Copyright 2000-2019 Kitware, Inc. and Contributors # All rights reserved. diff -Nru tgui-1.0-1.1.0+mantic/cmake/Modules/Findglfw3.cmake tgui-1.0-1.2.0+mantic/cmake/Modules/Findglfw3.cmake --- tgui-1.0-1.1.0+mantic/cmake/Modules/Findglfw3.cmake 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/cmake/Modules/Findglfw3.cmake 2024-03-23 12:27:01.000000000 +0000 @@ -1,6 +1,6 @@ #################################################################################################### # TGUI - Texus' Graphical User Interface -# Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +# Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) # # 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. diff -Nru tgui-1.0-1.1.0+mantic/cmake/TGUIConfig.cmake.in tgui-1.0-1.2.0+mantic/cmake/TGUIConfig.cmake.in --- tgui-1.0-1.1.0+mantic/cmake/TGUIConfig.cmake.in 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/cmake/TGUIConfig.cmake.in 2024-03-23 12:27:01.000000000 +0000 @@ -1,6 +1,6 @@ #################################################################################################### # TGUI - Texus' Graphical User Interface -# Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +# Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) # # 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. diff -Nru tgui-1.0-1.1.0+mantic/debian/changelog tgui-1.0-1.2.0+mantic/debian/changelog --- tgui-1.0-1.1.0+mantic/debian/changelog 2023-11-04 15:13:46.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/debian/changelog 2024-03-23 12:59:36.000000000 +0000 @@ -1,3 +1,17 @@ +tgui-1.0 (1.2.0+mantic) mantic; urgency=low + * Added Theme::replace function + * Added TreeView::changeItem function + * Added TreeView::getNode function + * Added ignoreMouseEvents function to canvas widgets + * Added Panel::setEventBubbling to enable more intuitive event propagation + * Replaced getWidgetAtPosition with getWidgetAtPos + * getWidgetBelowMouseCursor was given a parameter for recursive search + * Textures with different part rects were incorrectly considered equal + * showWithEffect didn't show widget if a hide animation was still playing + * Setting opacity of a SubWidgetContainer didn't work + * SubWidgetContainer didn't support show/hide animations + -- Bruno Van de Velde Sat, 23 Mar 2024 13:59:36 +0100 + tgui-1.0 (1.1.0+mantic) mantic; urgency=low * Added AutoLayout that lets widget fill entire side of parent * Any column in ListView can now be auto-sized and expanded diff -Nru tgui-1.0-1.1.0+mantic/doc/doxyfile.in tgui-1.0-1.2.0+mantic/doc/doxyfile.in --- tgui-1.0-1.1.0+mantic/doc/doxyfile.in 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/doc/doxyfile.in 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ # Doxyfile 1.9.1 PROJECT_NAME = "TGUI" -PROJECT_NUMBER = 1.0-dev +PROJECT_NUMBER = 1.x-dev OUTPUT_DIRECTORY = "@DOXYGEN_OUTPUT_DIR@" STRIP_FROM_INC_PATH = "@DOXYGEN_INPUT_DIR@/include/" diff -Nru tgui-1.0-1.1.0+mantic/examples/CMakeLists.txt tgui-1.0-1.2.0+mantic/examples/CMakeLists.txt --- tgui-1.0-1.1.0+mantic/examples/CMakeLists.txt 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/examples/CMakeLists.txt 2024-03-23 12:27:01.000000000 +0000 @@ -1,6 +1,6 @@ #################################################################################################### # TGUI - Texus' Graphical User Interface -# Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +# Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) # # 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. diff -Nru tgui-1.0-1.1.0+mantic/examples/android/SDL_RENDERER/app/jni/CMakeLists.txt tgui-1.0-1.2.0+mantic/examples/android/SDL_RENDERER/app/jni/CMakeLists.txt --- tgui-1.0-1.1.0+mantic/examples/android/SDL_RENDERER/app/jni/CMakeLists.txt 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/examples/android/SDL_RENDERER/app/jni/CMakeLists.txt 2024-03-23 12:27:01.000000000 +0000 @@ -17,7 +17,6 @@ add_subdirectory("${TGUI_ROOT_DIR}/../SDL2_ttf" ${SDL2_TTF_BUILD_DIR}) # Build TGUI -set(TGUI_SKIP_EXPORT ON) # Workaround for issue when building SDL and TGUI together as subdirectories add_subdirectory("${TGUI_ROOT_DIR}" TGUI-build) # Create the libmain.so library that contains the application's c++ code. diff -Nru tgui-1.0-1.1.0+mantic/examples/android/SDL_RENDERER/app/jni/src/example.cpp tgui-1.0-1.2.0+mantic/examples/android/SDL_RENDERER/app/jni/src/example.cpp --- tgui-1.0-1.1.0+mantic/examples/android/SDL_RENDERER/app/jni/src/example.cpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/examples/android/SDL_RENDERER/app/jni/src/example.cpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/examples/android/SDL_TTF_GLES2/app/jni/CMakeLists.txt tgui-1.0-1.2.0+mantic/examples/android/SDL_TTF_GLES2/app/jni/CMakeLists.txt --- tgui-1.0-1.1.0+mantic/examples/android/SDL_TTF_GLES2/app/jni/CMakeLists.txt 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/examples/android/SDL_TTF_GLES2/app/jni/CMakeLists.txt 2024-03-23 12:27:01.000000000 +0000 @@ -17,7 +17,6 @@ add_subdirectory("${TGUI_ROOT_DIR}/../SDL2_ttf" ${SDL2_TTF_BUILD_DIR}) # Build TGUI -set(TGUI_SKIP_EXPORT ON) # Workaround for issue when building SDL and TGUI together as subdirectories add_subdirectory("${TGUI_ROOT_DIR}" TGUI-build) # Create the libmain.so library that contains the application's c++ code. diff -Nru tgui-1.0-1.1.0+mantic/examples/android/SDL_TTF_GLES2/app/jni/src/example.cpp tgui-1.0-1.2.0+mantic/examples/android/SDL_TTF_GLES2/app/jni/src/example.cpp --- tgui-1.0-1.1.0+mantic/examples/android/SDL_TTF_GLES2/app/jni/src/example.cpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/examples/android/SDL_TTF_GLES2/app/jni/src/example.cpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/examples/android/SFML_GRAPHICS/app/src/main/jni/main.cpp tgui-1.0-1.2.0+mantic/examples/android/SFML_GRAPHICS/app/src/main/jni/main.cpp --- tgui-1.0-1.1.0+mantic/examples/android/SFML_GRAPHICS/app/src/main/jni/main.cpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/examples/android/SFML_GRAPHICS/app/src/main/jni/main.cpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/examples/iOS/iOS-example-SDL_RENDERER.cpp tgui-1.0-1.2.0+mantic/examples/iOS/iOS-example-SDL_RENDERER.cpp --- tgui-1.0-1.1.0+mantic/examples/iOS/iOS-example-SDL_RENDERER.cpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/examples/iOS/iOS-example-SDL_RENDERER.cpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/examples/iOS/iOS-example-SFML_GRAPHICS.cpp tgui-1.0-1.2.0+mantic/examples/iOS/iOS-example-SFML_GRAPHICS.cpp --- tgui-1.0-1.1.0+mantic/examples/iOS/iOS-example-SFML_GRAPHICS.cpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/examples/iOS/iOS-example-SFML_GRAPHICS.cpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/examples/main-GLFW_GLES2.cpp tgui-1.0-1.2.0+mantic/examples/main-GLFW_GLES2.cpp --- tgui-1.0-1.1.0+mantic/examples/main-GLFW_GLES2.cpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/examples/main-GLFW_GLES2.cpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/examples/main-GLFW_OPENGL3.cpp tgui-1.0-1.2.0+mantic/examples/main-GLFW_OPENGL3.cpp --- tgui-1.0-1.1.0+mantic/examples/main-GLFW_OPENGL3.cpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/examples/main-GLFW_OPENGL3.cpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/examples/main-SDL_GLES2.cpp tgui-1.0-1.2.0+mantic/examples/main-SDL_GLES2.cpp --- tgui-1.0-1.1.0+mantic/examples/main-SDL_GLES2.cpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/examples/main-SDL_GLES2.cpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/examples/main-SDL_OPENGL3.cpp tgui-1.0-1.2.0+mantic/examples/main-SDL_OPENGL3.cpp --- tgui-1.0-1.1.0+mantic/examples/main-SDL_OPENGL3.cpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/examples/main-SDL_OPENGL3.cpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/examples/main-SDL_RENDERER.cpp tgui-1.0-1.2.0+mantic/examples/main-SDL_RENDERER.cpp --- tgui-1.0-1.1.0+mantic/examples/main-SDL_RENDERER.cpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/examples/main-SDL_RENDERER.cpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/examples/main-SDL_TTF_GLES2.cpp tgui-1.0-1.2.0+mantic/examples/main-SDL_TTF_GLES2.cpp --- tgui-1.0-1.1.0+mantic/examples/main-SDL_TTF_GLES2.cpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/examples/main-SDL_TTF_GLES2.cpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/examples/main-SDL_TTF_OPENGL3.cpp tgui-1.0-1.2.0+mantic/examples/main-SDL_TTF_OPENGL3.cpp --- tgui-1.0-1.1.0+mantic/examples/main-SDL_TTF_OPENGL3.cpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/examples/main-SDL_TTF_OPENGL3.cpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/examples/main-SFML_GRAPHICS.cpp tgui-1.0-1.2.0+mantic/examples/main-SFML_GRAPHICS.cpp --- tgui-1.0-1.1.0+mantic/examples/main-SFML_GRAPHICS.cpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/examples/main-SFML_GRAPHICS.cpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/examples/main-SFML_OPENGL3.cpp tgui-1.0-1.2.0+mantic/examples/main-SFML_OPENGL3.cpp --- tgui-1.0-1.1.0+mantic/examples/main-SFML_OPENGL3.cpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/examples/main-SFML_OPENGL3.cpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. @@ -36,7 +36,7 @@ settings.minorVersion = 3; #if SFML_VERSION_MAJOR >= 3 - sf::Window window(sf::VideoMode{{800, 600}}, "TGUI example (SFML-OpenGL3)", sf::Style::Default, settings); + sf::Window window(sf::VideoMode{{800, 600}}, "TGUI example (SFML-OpenGL3)", sf::Style::Default, sf::State::Windowed, settings); #else sf::Window window({800, 600}, "TGUI example (SFML-OpenGL3)", sf::Style::Default, settings); #endif diff -Nru tgui-1.0-1.1.0+mantic/examples/many_different_widgets/ManyDifferentWidgets.cpp tgui-1.0-1.2.0+mantic/examples/many_different_widgets/ManyDifferentWidgets.cpp --- tgui-1.0-1.1.0+mantic/examples/many_different_widgets/ManyDifferentWidgets.cpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/examples/many_different_widgets/ManyDifferentWidgets.cpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/examples/scalable_login_screen/ScalableLoginScreen.cpp tgui-1.0-1.2.0+mantic/examples/scalable_login_screen/ScalableLoginScreen.cpp --- tgui-1.0-1.1.0+mantic/examples/scalable_login_screen/ScalableLoginScreen.cpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/examples/scalable_login_screen/ScalableLoginScreen.cpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/gui-builder/CMakeLists.txt tgui-1.0-1.2.0+mantic/gui-builder/CMakeLists.txt --- tgui-1.0-1.1.0+mantic/gui-builder/CMakeLists.txt 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/gui-builder/CMakeLists.txt 2024-03-23 12:27:01.000000000 +0000 @@ -1,6 +1,6 @@ #################################################################################################### # TGUI - Texus' Graphical User Interface -# Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +# Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) # # 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. @@ -54,41 +54,63 @@ COMMAND ${CMAKE_COMMAND} -E copy_directory "${PROJECT_SOURCE_DIR}/themes" "${PROJECT_SOURCE_DIR}/gui-builder/themes" VERBATIM) +# Copy the resources folder to the build directory to execute the gui-folder from there +add_custom_command(TARGET gui-builder + POST_BUILD + COMMAND ${CMAKE_COMMAND} -E copy_directory "${PROJECT_SOURCE_DIR}/gui-builder/resources" "$/resources" + COMMAND ${CMAKE_COMMAND} -E copy_directory "${PROJECT_SOURCE_DIR}/gui-builder/themes" "$/themes" + VERBATIM) + set(target_install_dir "${TGUI_MISC_INSTALL_PREFIX}/gui-builder") copy_dlls_to_exe("${PROJECT_SOURCE_DIR}/gui-builder/" "${target_install_dir}" gui-builder) # Set the RPATH of the executable on Linux (and BSD) if (TGUI_SHARED_LIBS AND TGUI_OS_LINUX) - file(RELATIVE_PATH rel_lib_dir - ${CMAKE_INSTALL_PREFIX}/${target_install_dir} - ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}) + if (CMAKE_VERSION VERSION_GREATER_EQUAL 3.20) + cmake_path(SET lib_dir NORMALIZE "${CMAKE_INSTALL_PREFIX}") + cmake_path(APPEND lib_dir "${CMAKE_INSTALL_LIBDIR}") + + cmake_path(SET exe_dir NORMALIZE "${CMAKE_INSTALL_PREFIX}") + cmake_path(APPEND exe_dir "${target_install_dir}") + + set(rel_lib_dir "${lib_dir}") + cmake_path(RELATIVE_PATH rel_lib_dir BASE_DIRECTORY "${exe_dir}") + else() + # This code for CMake < 3.20 only works if CMAKE_INSTALL_PREFIX is an absolute path + file(RELATIVE_PATH rel_lib_dir + "${CMAKE_INSTALL_PREFIX}/${target_install_dir}" + "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}") + endif() set_target_properties(gui-builder PROPERTIES - INSTALL_RPATH "$ORIGIN/${rel_lib_dir}") + INSTALL_RPATH "$ORIGIN/${rel_lib_dir}" # RPATH will contain relative path to where we installed our own library + INSTALL_RPATH_USE_LINK_PATH TRUE) # RPATH will contain paths to our dependencies endif() -# Install a .desktop file on Linux (and its icon) -if (TGUI_OS_LINUX) - set(TGUI_GUI_BUILDER_INSTALL_EXE_PATH "${CMAKE_INSTALL_PREFIX}/${target_install_dir}/gui-builder") - configure_file("${PROJECT_SOURCE_DIR}/cmake/gui-builder/tgui-gui-builder.desktop.in" "tgui-gui-builder.desktop" @ONLY) - install(FILES "${CMAKE_CURRENT_BINARY_DIR}/tgui-gui-builder.desktop" - DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/applications" +if (TGUI_INSTALL) + # Install a .desktop file on Linux (and its icon) + if (TGUI_OS_LINUX) + set(TGUI_GUI_BUILDER_INSTALL_EXE_PATH "${CMAKE_INSTALL_PREFIX}/${target_install_dir}/gui-builder") + configure_file("${PROJECT_SOURCE_DIR}/cmake/gui-builder/tgui-gui-builder.desktop.in" "tgui-gui-builder.desktop" @ONLY) + install(FILES "${CMAKE_CURRENT_BINARY_DIR}/tgui-gui-builder.desktop" + DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/applications" + COMPONENT gui-builder) + install(FILES "${PROJECT_SOURCE_DIR}/cmake/gui-builder/TexusGUI.png" + DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/48x48/apps" + COMPONENT gui-builder) + endif() + + # Add the install rule for the executable + install(TARGETS gui-builder + RUNTIME DESTINATION ${target_install_dir} COMPONENT gui-builder + BUNDLE DESTINATION ${target_install_dir} COMPONENT gui-builder) + + # Install the resources next to the gui-builder executable + install(DIRECTORY "${PROJECT_SOURCE_DIR}/gui-builder/resources" + DESTINATION "${target_install_dir}" COMPONENT gui-builder) - install(FILES "${PROJECT_SOURCE_DIR}/cmake/gui-builder/TexusGUI.png" - DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/48x48/apps" + install(DIRECTORY "${PROJECT_SOURCE_DIR}/themes" + DESTINATION "${target_install_dir}" COMPONENT gui-builder) endif() - -# Add the install rule for the executable -install(TARGETS gui-builder - RUNTIME DESTINATION ${target_install_dir} COMPONENT gui-builder - BUNDLE DESTINATION ${target_install_dir} COMPONENT gui-builder) - -# Install the resources next to the gui-builder executable -install(DIRECTORY "${PROJECT_SOURCE_DIR}/gui-builder/resources" - DESTINATION "${target_install_dir}" - COMPONENT gui-builder) -install(DIRECTORY "${PROJECT_SOURCE_DIR}/themes" - DESTINATION "${target_install_dir}" - COMPONENT gui-builder) diff -Nru tgui-1.0-1.1.0+mantic/gui-builder/include/Form.hpp tgui-1.0-1.2.0+mantic/gui-builder/include/Form.hpp --- tgui-1.0-1.1.0+mantic/gui-builder/include/Form.hpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/gui-builder/include/Form.hpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/gui-builder/include/GuiBuilder.hpp tgui-1.0-1.2.0+mantic/gui-builder/include/GuiBuilder.hpp --- tgui-1.0-1.1.0+mantic/gui-builder/include/GuiBuilder.hpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/gui-builder/include/GuiBuilder.hpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/gui-builder/include/WidgetInfo.hpp tgui-1.0-1.2.0+mantic/gui-builder/include/WidgetInfo.hpp --- tgui-1.0-1.1.0+mantic/gui-builder/include/WidgetInfo.hpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/gui-builder/include/WidgetInfo.hpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/gui-builder/include/WidgetProperties/BitmapButtonProperties.hpp tgui-1.0-1.2.0+mantic/gui-builder/include/WidgetProperties/BitmapButtonProperties.hpp --- tgui-1.0-1.1.0+mantic/gui-builder/include/WidgetProperties/BitmapButtonProperties.hpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/gui-builder/include/WidgetProperties/BitmapButtonProperties.hpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/gui-builder/include/WidgetProperties/ButtonProperties.hpp tgui-1.0-1.2.0+mantic/gui-builder/include/WidgetProperties/ButtonProperties.hpp --- tgui-1.0-1.1.0+mantic/gui-builder/include/WidgetProperties/ButtonProperties.hpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/gui-builder/include/WidgetProperties/ButtonProperties.hpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/gui-builder/include/WidgetProperties/ChatBoxProperties.hpp tgui-1.0-1.2.0+mantic/gui-builder/include/WidgetProperties/ChatBoxProperties.hpp --- tgui-1.0-1.1.0+mantic/gui-builder/include/WidgetProperties/ChatBoxProperties.hpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/gui-builder/include/WidgetProperties/ChatBoxProperties.hpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/gui-builder/include/WidgetProperties/CheckBoxProperties.hpp tgui-1.0-1.2.0+mantic/gui-builder/include/WidgetProperties/CheckBoxProperties.hpp --- tgui-1.0-1.1.0+mantic/gui-builder/include/WidgetProperties/CheckBoxProperties.hpp 1970-01-01 00:00:00.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/gui-builder/include/WidgetProperties/CheckBoxProperties.hpp 2024-03-23 12:27:01.000000000 +0000 @@ -0,0 +1,35 @@ +///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +// +// TGUI - Texus' Graphical User Interface +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) +// +// 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 TGUI_GUI_BUILDER_CHECK_BOX_PROPERTIES_HPP +#define TGUI_GUI_BUILDER_CHECK_BOX_PROPERTIES_HPP + +#include "RadioButtonProperties.hpp" + +struct CheckBoxProperties : RadioButtonProperties +{ +}; + +#endif // TGUI_GUI_BUILDER_CHECK_BOX_PROPERTIES_HPP diff -Nru tgui-1.0-1.1.0+mantic/gui-builder/include/WidgetProperties/ChildWindowProperties.hpp tgui-1.0-1.2.0+mantic/gui-builder/include/WidgetProperties/ChildWindowProperties.hpp --- tgui-1.0-1.1.0+mantic/gui-builder/include/WidgetProperties/ChildWindowProperties.hpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/gui-builder/include/WidgetProperties/ChildWindowProperties.hpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/gui-builder/include/WidgetProperties/ClickableWidgetProperties.hpp tgui-1.0-1.2.0+mantic/gui-builder/include/WidgetProperties/ClickableWidgetProperties.hpp --- tgui-1.0-1.1.0+mantic/gui-builder/include/WidgetProperties/ClickableWidgetProperties.hpp 1970-01-01 00:00:00.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/gui-builder/include/WidgetProperties/ClickableWidgetProperties.hpp 2024-03-23 12:27:01.000000000 +0000 @@ -0,0 +1,35 @@ +///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +// +// TGUI - Texus' Graphical User Interface +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) +// +// 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 TGUI_GUI_BUILDER_CLICKABLE_WIDGET_PROPERTIES_HPP +#define TGUI_GUI_BUILDER_CLICKABLE_WIDGET_PROPERTIES_HPP + +#include "WidgetProperties.hpp" + +struct ClickableWidgetProperties : WidgetProperties +{ +}; + +#endif // TGUI_GUI_BUILDER_CLICKABLE_WIDGET_PROPERTIES_HPP diff -Nru tgui-1.0-1.1.0+mantic/gui-builder/include/WidgetProperties/ComboBoxProperties.hpp tgui-1.0-1.2.0+mantic/gui-builder/include/WidgetProperties/ComboBoxProperties.hpp --- tgui-1.0-1.1.0+mantic/gui-builder/include/WidgetProperties/ComboBoxProperties.hpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/gui-builder/include/WidgetProperties/ComboBoxProperties.hpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/gui-builder/include/WidgetProperties/EditBoxProperties.hpp tgui-1.0-1.2.0+mantic/gui-builder/include/WidgetProperties/EditBoxProperties.hpp --- tgui-1.0-1.1.0+mantic/gui-builder/include/WidgetProperties/EditBoxProperties.hpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/gui-builder/include/WidgetProperties/EditBoxProperties.hpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/gui-builder/include/WidgetProperties/GroupProperties.hpp tgui-1.0-1.2.0+mantic/gui-builder/include/WidgetProperties/GroupProperties.hpp --- tgui-1.0-1.1.0+mantic/gui-builder/include/WidgetProperties/GroupProperties.hpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/gui-builder/include/WidgetProperties/GroupProperties.hpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/gui-builder/include/WidgetProperties/HorizontalLayoutProperties.hpp tgui-1.0-1.2.0+mantic/gui-builder/include/WidgetProperties/HorizontalLayoutProperties.hpp --- tgui-1.0-1.1.0+mantic/gui-builder/include/WidgetProperties/HorizontalLayoutProperties.hpp 1970-01-01 00:00:00.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/gui-builder/include/WidgetProperties/HorizontalLayoutProperties.hpp 2024-03-23 12:27:01.000000000 +0000 @@ -0,0 +1,35 @@ +///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +// +// TGUI - Texus' Graphical User Interface +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) +// +// 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 TGUI_GUI_BUILDER_HORIZONTAL_LAYOUT_PROPERTIES_HPP +#define TGUI_GUI_BUILDER_HORIZONTAL_LAYOUT_PROPERTIES_HPP + +#include "GroupProperties.hpp" + +struct HorizontalLayoutProperties : GroupProperties +{ +}; + +#endif // TGUI_GUI_BUILDER_HORIZONTAL_LAYOUT_PROPERTIES_HPP diff -Nru tgui-1.0-1.1.0+mantic/gui-builder/include/WidgetProperties/HorizontalWrapProperties.hpp tgui-1.0-1.2.0+mantic/gui-builder/include/WidgetProperties/HorizontalWrapProperties.hpp --- tgui-1.0-1.1.0+mantic/gui-builder/include/WidgetProperties/HorizontalWrapProperties.hpp 1970-01-01 00:00:00.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/gui-builder/include/WidgetProperties/HorizontalWrapProperties.hpp 2024-03-23 12:27:01.000000000 +0000 @@ -0,0 +1,35 @@ +///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +// +// TGUI - Texus' Graphical User Interface +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) +// +// 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 TGUI_GUI_BUILDER_HORIZONTAL_WRAP_PROPERTIES_HPP +#define TGUI_GUI_BUILDER_HORIZONTAL_WRAP_PROPERTIES_HPP + +#include "GroupProperties.hpp" + +struct HorizontalWrapProperties : GroupProperties +{ +}; + +#endif // TGUI_GUI_BUILDER_HORIZONTAL_WRAP_PROPERTIES_HPP diff -Nru tgui-1.0-1.1.0+mantic/gui-builder/include/WidgetProperties/KnobProperties.hpp tgui-1.0-1.2.0+mantic/gui-builder/include/WidgetProperties/KnobProperties.hpp --- tgui-1.0-1.1.0+mantic/gui-builder/include/WidgetProperties/KnobProperties.hpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/gui-builder/include/WidgetProperties/KnobProperties.hpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/gui-builder/include/WidgetProperties/LabelProperties.hpp tgui-1.0-1.2.0+mantic/gui-builder/include/WidgetProperties/LabelProperties.hpp --- tgui-1.0-1.1.0+mantic/gui-builder/include/WidgetProperties/LabelProperties.hpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/gui-builder/include/WidgetProperties/LabelProperties.hpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/gui-builder/include/WidgetProperties/ListBoxProperties.hpp tgui-1.0-1.2.0+mantic/gui-builder/include/WidgetProperties/ListBoxProperties.hpp --- tgui-1.0-1.1.0+mantic/gui-builder/include/WidgetProperties/ListBoxProperties.hpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/gui-builder/include/WidgetProperties/ListBoxProperties.hpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/gui-builder/include/WidgetProperties/ListViewProperties.hpp tgui-1.0-1.2.0+mantic/gui-builder/include/WidgetProperties/ListViewProperties.hpp --- tgui-1.0-1.1.0+mantic/gui-builder/include/WidgetProperties/ListViewProperties.hpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/gui-builder/include/WidgetProperties/ListViewProperties.hpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/gui-builder/include/WidgetProperties/MenuBarProperties.hpp tgui-1.0-1.2.0+mantic/gui-builder/include/WidgetProperties/MenuBarProperties.hpp --- tgui-1.0-1.1.0+mantic/gui-builder/include/WidgetProperties/MenuBarProperties.hpp 1970-01-01 00:00:00.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/gui-builder/include/WidgetProperties/MenuBarProperties.hpp 2024-03-23 12:27:01.000000000 +0000 @@ -0,0 +1,117 @@ +///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +// +// TGUI - Texus' Graphical User Interface +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) +// +// 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 TGUI_GUI_BUILDER_LIST_BOX_PROPERTIES_HPP +#define TGUI_GUI_BUILDER_LIST_BOX_PROPERTIES_HPP + +#include "WidgetProperties.hpp" + +struct ListBoxProperties : WidgetProperties +{ + // TODO: Item Ids + // TODO: Scrollbar renderer + + void updateProperty(const tgui::Widget::Ptr& widget, const tgui::String& property, const tgui::String& value) const override + { + auto listBox = widget->cast(); + if (property == "Items") + { + listBox->removeAllItems(); + auto items = deserializeList(value); + for (const auto& item : items) + listBox->addItem(item); + } + else if (property == "SelectedItemIndex") + listBox->setSelectedItemByIndex(value.toUInt()); + else if (property == "ItemHeight") + listBox->setItemHeight(value.toUInt()); + else if (property == "TextSize") + listBox->setTextSize(value.toUInt()); + else if (property == "MaximumItems") + listBox->setMaximumItems(value.toUInt()); + else if (property == "AutoScroll") + listBox->setAutoScroll(parseBoolean(value, true)); + else if (property == "TextAlignment") + listBox->setTextAlignment(deserializeAlignment(value)); + else + WidgetProperties::updateProperty(widget, property, value); + } + + TGUI_NODISCARD PropertyValueMapPair initProperties(const tgui::Widget::Ptr& widget) const override + { + auto pair = WidgetProperties::initProperties(widget); + auto listBox = widget->cast(); + pair.first["Items"] = {"List", serializeList(listBox->getItems())}; + pair.first["SelectedItemIndex"] = {"Int", tgui::String::fromNumber(listBox->getSelectedItemIndex())}; + pair.first["ItemHeight"] = {"UInt", tgui::String::fromNumber(listBox->getItemHeight())}; + pair.first["TextSize"] = {"UInt", tgui::String::fromNumber(listBox->getTextSize())}; + pair.first["MaximumItems"] = {"UInt", tgui::String::fromNumber(listBox->getMaximumItems())}; + pair.first["AutoScroll"] = {"Bool", tgui::Serializer::serialize(listBox->getAutoScroll())}; + pair.first["TextAlignment"] = {"Enum{Left,Center,Right}", serializeAlignment(listBox->getTextAlignment())}; + + const auto renderer = listBox->getSharedRenderer(); + pair.second["Borders"] = {"Outline", renderer->getBorders().toString()}; + pair.second["Padding"] = {"Outline", renderer->getPadding().toString()}; + pair.second["BackgroundColor"] = {"Color", tgui::Serializer::serialize(renderer->getBackgroundColor())}; + pair.second["BackgroundColorHover"] = {"Color", tgui::Serializer::serialize(renderer->getBackgroundColorHover())}; + pair.second["SelectedBackgroundColor"] = {"Color", tgui::Serializer::serialize(renderer->getSelectedBackgroundColor())}; + pair.second["SelectedBackgroundColorHover"] = {"Color", tgui::Serializer::serialize(renderer->getSelectedBackgroundColorHover())}; + pair.second["TextColor"] = {"Color", tgui::Serializer::serialize(renderer->getTextColor())}; + pair.second["TextColorHover"] = {"Color", tgui::Serializer::serialize(renderer->getTextColorHover())}; + pair.second["SelectedTextColor"] = {"Color", tgui::Serializer::serialize(renderer->getSelectedTextColor())}; + pair.second["SelectedTextColorHover"] = {"Color", tgui::Serializer::serialize(renderer->getSelectedTextColorHover())}; + pair.second["BorderColor"] = {"Color", tgui::Serializer::serialize(renderer->getBorderColor())}; + pair.second["TextureBackground"] = {"Texture", tgui::Serializer::serialize(renderer->getTextureBackground())}; + pair.second["TextStyle"] = {"TextStyle", tgui::Serializer::serialize(renderer->getTextStyle())}; + pair.second["SelectedTextStyle"] = {"TextStyle", tgui::Serializer::serialize(renderer->getSelectedTextStyle())}; + pair.second["ScrollbarWidth"] = {"Float", tgui::String::fromNumber(renderer->getScrollbarWidth())}; + return pair; + } + +private: + + TGUI_NODISCARD static tgui::ListBox::TextAlignment deserializeAlignment(tgui::String value) + { + value = value.trim().toLower(); + if (value == "right") + return tgui::ListBox::TextAlignment::Right; + else if (value == "center") + return tgui::ListBox::TextAlignment::Center; + else + return tgui::ListBox::TextAlignment::Left; + } + + TGUI_NODISCARD static tgui::String serializeAlignment(tgui::ListBox::TextAlignment alignment) + { + if (alignment == tgui::ListBox::TextAlignment::Center) + return "Center"; + else if (alignment == tgui::ListBox::TextAlignment::Right) + return "Right"; + else + return "Left"; + } +}; + +#endif // TGUI_GUI_BUILDER_LIST_BOX_PROPERTIES_HPP diff -Nru tgui-1.0-1.1.0+mantic/gui-builder/include/WidgetProperties/PanelProperties.hpp tgui-1.0-1.2.0+mantic/gui-builder/include/WidgetProperties/PanelProperties.hpp --- tgui-1.0-1.1.0+mantic/gui-builder/include/WidgetProperties/PanelProperties.hpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/gui-builder/include/WidgetProperties/PanelProperties.hpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/gui-builder/include/WidgetProperties/PictureProperties.hpp tgui-1.0-1.2.0+mantic/gui-builder/include/WidgetProperties/PictureProperties.hpp --- tgui-1.0-1.1.0+mantic/gui-builder/include/WidgetProperties/PictureProperties.hpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/gui-builder/include/WidgetProperties/PictureProperties.hpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/gui-builder/include/WidgetProperties/ProgressBarProperties.hpp tgui-1.0-1.2.0+mantic/gui-builder/include/WidgetProperties/ProgressBarProperties.hpp --- tgui-1.0-1.1.0+mantic/gui-builder/include/WidgetProperties/ProgressBarProperties.hpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/gui-builder/include/WidgetProperties/ProgressBarProperties.hpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/gui-builder/include/WidgetProperties/RadioButtonProperties.hpp tgui-1.0-1.2.0+mantic/gui-builder/include/WidgetProperties/RadioButtonProperties.hpp --- tgui-1.0-1.1.0+mantic/gui-builder/include/WidgetProperties/RadioButtonProperties.hpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/gui-builder/include/WidgetProperties/RadioButtonProperties.hpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/gui-builder/include/WidgetProperties/RangeSliderProperties.hpp tgui-1.0-1.2.0+mantic/gui-builder/include/WidgetProperties/RangeSliderProperties.hpp --- tgui-1.0-1.1.0+mantic/gui-builder/include/WidgetProperties/RangeSliderProperties.hpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/gui-builder/include/WidgetProperties/RangeSliderProperties.hpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/gui-builder/include/WidgetProperties/RichTextLabelProperties.hpp tgui-1.0-1.2.0+mantic/gui-builder/include/WidgetProperties/RichTextLabelProperties.hpp --- tgui-1.0-1.1.0+mantic/gui-builder/include/WidgetProperties/RichTextLabelProperties.hpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/gui-builder/include/WidgetProperties/RichTextLabelProperties.hpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/gui-builder/include/WidgetProperties/ScrollablePanelProperties.hpp tgui-1.0-1.2.0+mantic/gui-builder/include/WidgetProperties/ScrollablePanelProperties.hpp --- tgui-1.0-1.1.0+mantic/gui-builder/include/WidgetProperties/ScrollablePanelProperties.hpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/gui-builder/include/WidgetProperties/ScrollablePanelProperties.hpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/gui-builder/include/WidgetProperties/ScrollbarProperties.hpp tgui-1.0-1.2.0+mantic/gui-builder/include/WidgetProperties/ScrollbarProperties.hpp --- tgui-1.0-1.1.0+mantic/gui-builder/include/WidgetProperties/ScrollbarProperties.hpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/gui-builder/include/WidgetProperties/ScrollbarProperties.hpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/gui-builder/include/WidgetProperties/SeparatorLineProperties.hpp tgui-1.0-1.2.0+mantic/gui-builder/include/WidgetProperties/SeparatorLineProperties.hpp --- tgui-1.0-1.1.0+mantic/gui-builder/include/WidgetProperties/SeparatorLineProperties.hpp 1970-01-01 00:00:00.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/gui-builder/include/WidgetProperties/SeparatorLineProperties.hpp 2024-03-23 12:27:01.000000000 +0000 @@ -0,0 +1,35 @@ +///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +// +// TGUI - Texus' Graphical User Interface +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) +// +// 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 TGUI_GUI_BUILDER_SEPARATOR_LINE_PROPERTIES_HPP +#define TGUI_GUI_BUILDER_SEPARATOR_LINE_PROPERTIES_HPP + +#include "ClickableWidgetProperties.hpp" + +struct SeparatorLineProperties : ClickableWidgetProperties +{ +}; + +#endif // TGUI_GUI_BUILDER_SEPARATOR_LINE_PROPERTIES_HPP diff -Nru tgui-1.0-1.1.0+mantic/gui-builder/include/WidgetProperties/SliderProperties.hpp tgui-1.0-1.2.0+mantic/gui-builder/include/WidgetProperties/SliderProperties.hpp --- tgui-1.0-1.1.0+mantic/gui-builder/include/WidgetProperties/SliderProperties.hpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/gui-builder/include/WidgetProperties/SliderProperties.hpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/gui-builder/include/WidgetProperties/SpinButtonProperties.hpp tgui-1.0-1.2.0+mantic/gui-builder/include/WidgetProperties/SpinButtonProperties.hpp --- tgui-1.0-1.1.0+mantic/gui-builder/include/WidgetProperties/SpinButtonProperties.hpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/gui-builder/include/WidgetProperties/SpinButtonProperties.hpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/gui-builder/include/WidgetProperties/SpinControlProperties.hpp tgui-1.0-1.2.0+mantic/gui-builder/include/WidgetProperties/SpinControlProperties.hpp --- tgui-1.0-1.1.0+mantic/gui-builder/include/WidgetProperties/SpinControlProperties.hpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/gui-builder/include/WidgetProperties/SpinControlProperties.hpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/gui-builder/include/WidgetProperties/TabsProperties.hpp tgui-1.0-1.2.0+mantic/gui-builder/include/WidgetProperties/TabsProperties.hpp --- tgui-1.0-1.1.0+mantic/gui-builder/include/WidgetProperties/TabsProperties.hpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/gui-builder/include/WidgetProperties/TabsProperties.hpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/gui-builder/include/WidgetProperties/TextAreaProperties.hpp tgui-1.0-1.2.0+mantic/gui-builder/include/WidgetProperties/TextAreaProperties.hpp --- tgui-1.0-1.1.0+mantic/gui-builder/include/WidgetProperties/TextAreaProperties.hpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/gui-builder/include/WidgetProperties/TextAreaProperties.hpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/gui-builder/include/WidgetProperties/ToggleButtonProperties.hpp tgui-1.0-1.2.0+mantic/gui-builder/include/WidgetProperties/ToggleButtonProperties.hpp --- tgui-1.0-1.1.0+mantic/gui-builder/include/WidgetProperties/ToggleButtonProperties.hpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/gui-builder/include/WidgetProperties/ToggleButtonProperties.hpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/gui-builder/include/WidgetProperties/TreeViewProperties.hpp tgui-1.0-1.2.0+mantic/gui-builder/include/WidgetProperties/TreeViewProperties.hpp --- tgui-1.0-1.1.0+mantic/gui-builder/include/WidgetProperties/TreeViewProperties.hpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/gui-builder/include/WidgetProperties/TreeViewProperties.hpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/gui-builder/include/WidgetProperties/VerticalLayoutProperties.hpp tgui-1.0-1.2.0+mantic/gui-builder/include/WidgetProperties/VerticalLayoutProperties.hpp --- tgui-1.0-1.1.0+mantic/gui-builder/include/WidgetProperties/VerticalLayoutProperties.hpp 1970-01-01 00:00:00.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/gui-builder/include/WidgetProperties/VerticalLayoutProperties.hpp 2024-03-23 12:27:01.000000000 +0000 @@ -0,0 +1,35 @@ +///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +// +// TGUI - Texus' Graphical User Interface +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) +// +// 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 TGUI_GUI_BUILDER_VERTICAL_LAYOUT_PROPERTIES_HPP +#define TGUI_GUI_BUILDER_VERTICAL_LAYOUT_PROPERTIES_HPP + +#include "GroupProperties.hpp" + +struct VerticalLayoutProperties : GroupProperties +{ +}; + +#endif // TGUI_GUI_BUILDER_VERTICAL_LAYOUT_PROPERTIES_HPP diff -Nru tgui-1.0-1.1.0+mantic/gui-builder/include/WidgetProperties/WidgetProperties.hpp tgui-1.0-1.2.0+mantic/gui-builder/include/WidgetProperties/WidgetProperties.hpp --- tgui-1.0-1.1.0+mantic/gui-builder/include/WidgetProperties/WidgetProperties.hpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/gui-builder/include/WidgetProperties/WidgetProperties.hpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. Binary files /tmp/tmpi_1nxdbo/rqs3s9_uZP/tgui-1.0-1.1.0+mantic/gui-builder/resources/widget-icons/ChildWindow.png and /tmp/tmpi_1nxdbo/WwoDiaZJ29/tgui-1.0-1.2.0+mantic/gui-builder/resources/widget-icons/ChildWindow.png differ Binary files /tmp/tmpi_1nxdbo/rqs3s9_uZP/tgui-1.0-1.1.0+mantic/gui-builder/resources/widget-icons/ClickableWidget.png and /tmp/tmpi_1nxdbo/WwoDiaZJ29/tgui-1.0-1.2.0+mantic/gui-builder/resources/widget-icons/ClickableWidget.png differ Binary files /tmp/tmpi_1nxdbo/rqs3s9_uZP/tgui-1.0-1.1.0+mantic/gui-builder/resources/widget-icons/HorizontalLayout.png and /tmp/tmpi_1nxdbo/WwoDiaZJ29/tgui-1.0-1.2.0+mantic/gui-builder/resources/widget-icons/HorizontalLayout.png differ Binary files /tmp/tmpi_1nxdbo/rqs3s9_uZP/tgui-1.0-1.1.0+mantic/gui-builder/resources/widget-icons/HorizontalWrap.png and /tmp/tmpi_1nxdbo/WwoDiaZJ29/tgui-1.0-1.2.0+mantic/gui-builder/resources/widget-icons/HorizontalWrap.png differ Binary files /tmp/tmpi_1nxdbo/rqs3s9_uZP/tgui-1.0-1.1.0+mantic/gui-builder/resources/widget-icons/SeparatorLine.png and /tmp/tmpi_1nxdbo/WwoDiaZJ29/tgui-1.0-1.2.0+mantic/gui-builder/resources/widget-icons/SeparatorLine.png differ Binary files /tmp/tmpi_1nxdbo/rqs3s9_uZP/tgui-1.0-1.1.0+mantic/gui-builder/resources/widget-icons/VerticalLayout.png and /tmp/tmpi_1nxdbo/WwoDiaZJ29/tgui-1.0-1.2.0+mantic/gui-builder/resources/widget-icons/VerticalLayout.png differ diff -Nru tgui-1.0-1.1.0+mantic/gui-builder/src/Form.cpp tgui-1.0-1.2.0+mantic/gui-builder/src/Form.cpp --- tgui-1.0-1.1.0+mantic/gui-builder/src/Form.cpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/gui-builder/src/Form.cpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/gui-builder/src/GuiBuilder.cpp tgui-1.0-1.2.0+mantic/gui-builder/src/GuiBuilder.cpp --- tgui-1.0-1.1.0+mantic/gui-builder/src/GuiBuilder.cpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/gui-builder/src/GuiBuilder.cpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. @@ -27,10 +27,14 @@ #include "WidgetProperties/BitmapButtonProperties.hpp" #include "WidgetProperties/ButtonProperties.hpp" #include "WidgetProperties/ChatBoxProperties.hpp" +#include "WidgetProperties/CheckBoxProperties.hpp" #include "WidgetProperties/ChildWindowProperties.hpp" +#include "WidgetProperties/ClickableWidgetProperties.hpp" #include "WidgetProperties/ComboBoxProperties.hpp" #include "WidgetProperties/EditBoxProperties.hpp" #include "WidgetProperties/GroupProperties.hpp" +#include "WidgetProperties/HorizontalLayoutProperties.hpp" +#include "WidgetProperties/HorizontalWrapProperties.hpp" #include "WidgetProperties/KnobProperties.hpp" #include "WidgetProperties/LabelProperties.hpp" #include "WidgetProperties/ListBoxProperties.hpp" @@ -43,6 +47,7 @@ #include "WidgetProperties/RichTextLabelProperties.hpp" #include "WidgetProperties/ScrollablePanelProperties.hpp" #include "WidgetProperties/ScrollbarProperties.hpp" +#include "WidgetProperties/SeparatorLineProperties.hpp" #include "WidgetProperties/SliderProperties.hpp" #include "WidgetProperties/SpinButtonProperties.hpp" #include "WidgetProperties/SpinControlProperties.hpp" @@ -50,6 +55,7 @@ #include "WidgetProperties/TextAreaProperties.hpp" #include "WidgetProperties/ToggleButtonProperties.hpp" #include "WidgetProperties/TreeViewProperties.hpp" +#include "WidgetProperties/VerticalLayoutProperties.hpp" ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// @@ -260,11 +266,14 @@ m_widgetProperties["BitmapButton"] = std::make_unique(); m_widgetProperties["Button"] = std::make_unique(); m_widgetProperties["ChatBox"] = std::make_unique(); - m_widgetProperties["CheckBox"] = std::make_unique(); + m_widgetProperties["CheckBox"] = std::make_unique(); m_widgetProperties["ChildWindow"] = std::make_unique(); + m_widgetProperties["ClickableWidget"] = std::make_unique(); m_widgetProperties["ComboBox"] = std::make_unique(); m_widgetProperties["EditBox"] = std::make_unique(); m_widgetProperties["Group"] = std::make_unique(); + m_widgetProperties["HorizontalLayout"] = std::make_unique(); + m_widgetProperties["HorizontalWrap"] = std::make_unique(); m_widgetProperties["Knob"] = std::make_unique(); m_widgetProperties["Label"] = std::make_unique(); m_widgetProperties["ListBox"] = std::make_unique(); @@ -277,6 +286,7 @@ m_widgetProperties["RichTextLabel"] = std::make_unique(); m_widgetProperties["ScrollablePanel"] = std::make_unique(); m_widgetProperties["Scrollbar"] = std::make_unique(); + m_widgetProperties["SeparatorLine"] = std::make_unique(); m_widgetProperties["Slider"] = std::make_unique(); m_widgetProperties["SpinButton"] = std::make_unique(); m_widgetProperties["SpinControl"] = std::make_unique(); @@ -284,6 +294,7 @@ m_widgetProperties["TextArea"] = std::make_unique(); m_widgetProperties["ToggleButton"] = std::make_unique(); m_widgetProperties["TreeView"] = std::make_unique(); + m_widgetProperties["VerticalLayout"] = std::make_unique(); m_window->setIcon((tgui::getResourcePath() / "resources/Icon.png").asString()); @@ -969,9 +980,12 @@ {"ChatBox", []{ return tgui::ChatBox::create(); }}, {"CheckBox", []{ return tgui::CheckBox::create(); }}, {"ChildWindow", []{ return tgui::ChildWindow::create(); }}, + {"ClickableWidget", []{ return tgui::ClickableWidget::create({150, 150}); }}, {"ComboBox", []{ return tgui::ComboBox::create(); }}, {"EditBox", []{ return tgui::EditBox::create(); }}, {"Group", []{ return tgui::Group::create({150, 150}); }}, + {"HorizontalLayout", []{ return tgui::HorizontalLayout::create({150, 150}); }}, + {"HorizontalWrap", []{ return tgui::HorizontalWrap::create({150, 150}); }}, {"Knob", []{ return tgui::Knob::create(); }}, {"Label", []{ return tgui::Label::create("Label"); }}, {"ListBox", []{ return tgui::ListBox::create(); }}, @@ -984,6 +998,7 @@ {"RichTextLabel", []{ return tgui::RichTextLabel::create("RichTextLabel"); }}, {"ScrollablePanel", []{ return tgui::ScrollablePanel::create({150, 150}); }}, {"Scrollbar", []{ return tgui::Scrollbar::create(); }}, + {"SeparatorLine", []{ return tgui::SeparatorLine::create({"100%", 3}); }}, {"Slider", []{ return tgui::Slider::create(); }}, {"SpinButton", []{ return tgui::SpinButton::create(); }}, {"SpinControl", []{ return tgui::SpinControl::create(); }}, @@ -991,6 +1006,7 @@ {"TextArea", []{ return tgui::TextArea::create(); }}, {"ToggleButton", []{ return tgui::ToggleButton::create(); }}, {"TreeView", []{ return tgui::TreeView::create(); }}, + {"VerticalLayout", []{ return tgui::VerticalLayout::create({150, 150}); }}, }; float topPosition = 0; diff -Nru tgui-1.0-1.1.0+mantic/gui-builder/src/main.cpp tgui-1.0-1.2.0+mantic/gui-builder/src/main.cpp --- tgui-1.0-1.1.0+mantic/gui-builder/src/main.cpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/gui-builder/src/main.cpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/include/TGUI/AbsoluteOrRelativeValue.hpp tgui-1.0-1.2.0+mantic/include/TGUI/AbsoluteOrRelativeValue.hpp --- tgui-1.0-1.1.0+mantic/include/TGUI/AbsoluteOrRelativeValue.hpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/include/TGUI/AbsoluteOrRelativeValue.hpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/include/TGUI/AllWidgets.hpp tgui-1.0-1.2.0+mantic/include/TGUI/AllWidgets.hpp --- tgui-1.0-1.1.0+mantic/include/TGUI/AllWidgets.hpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/include/TGUI/AllWidgets.hpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/include/TGUI/Animation.hpp tgui-1.0-1.2.0+mantic/include/TGUI/Animation.hpp --- tgui-1.0-1.1.0+mantic/include/TGUI/Animation.hpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/include/TGUI/Animation.hpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/include/TGUI/Any.hpp tgui-1.0-1.2.0+mantic/include/TGUI/Any.hpp --- tgui-1.0-1.1.0+mantic/include/TGUI/Any.hpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/include/TGUI/Any.hpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/include/TGUI/Backend/Font/BackendFont.hpp tgui-1.0-1.2.0+mantic/include/TGUI/Backend/Font/BackendFont.hpp --- tgui-1.0-1.1.0+mantic/include/TGUI/Backend/Font/BackendFont.hpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/include/TGUI/Backend/Font/BackendFont.hpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/include/TGUI/Backend/Font/BackendFontFactory.hpp tgui-1.0-1.2.0+mantic/include/TGUI/Backend/Font/BackendFontFactory.hpp --- tgui-1.0-1.1.0+mantic/include/TGUI/Backend/Font/BackendFontFactory.hpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/include/TGUI/Backend/Font/BackendFontFactory.hpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/include/TGUI/Backend/Font/FreeType/BackendFontFreeType.hpp tgui-1.0-1.2.0+mantic/include/TGUI/Backend/Font/FreeType/BackendFontFreeType.hpp --- tgui-1.0-1.1.0+mantic/include/TGUI/Backend/Font/FreeType/BackendFontFreeType.hpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/include/TGUI/Backend/Font/FreeType/BackendFontFreeType.hpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. @@ -27,9 +27,7 @@ #define TGUI_BACKEND_FONT_FREETYPE_HPP #include -#if TGUI_BUILD_AS_CXX_MODULE - import tgui; -#else +#if !TGUI_BUILD_AS_CXX_MODULE #include #endif @@ -39,9 +37,11 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -using FT_Library = struct FT_LibraryRec_*; -using FT_Face = struct FT_FaceRec_*; -using FT_Stroker = struct FT_StrokerRec_*; +#if !TGUI_BUILD_AS_CXX_MODULE + using FT_Library = struct FT_LibraryRec_*; + using FT_Face = struct FT_FaceRec_*; + using FT_Stroker = struct FT_StrokerRec_*; +#endif ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// diff -Nru tgui-1.0-1.1.0+mantic/include/TGUI/Backend/Font/SDL_ttf/BackendFontSDLttf.hpp tgui-1.0-1.2.0+mantic/include/TGUI/Backend/Font/SDL_ttf/BackendFontSDLttf.hpp --- tgui-1.0-1.1.0+mantic/include/TGUI/Backend/Font/SDL_ttf/BackendFontSDLttf.hpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/include/TGUI/Backend/Font/SDL_ttf/BackendFontSDLttf.hpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. @@ -34,9 +34,7 @@ #endif #include -#if TGUI_BUILD_AS_CXX_MODULE - import tgui; -#else +#if !TGUI_BUILD_AS_CXX_MODULE #include #endif diff -Nru tgui-1.0-1.1.0+mantic/include/TGUI/Backend/Font/SFML-Graphics/BackendFontSFML.hpp tgui-1.0-1.2.0+mantic/include/TGUI/Backend/Font/SFML-Graphics/BackendFontSFML.hpp --- tgui-1.0-1.1.0+mantic/include/TGUI/Backend/Font/SFML-Graphics/BackendFontSFML.hpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/include/TGUI/Backend/Font/SFML-Graphics/BackendFontSFML.hpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. @@ -29,9 +29,7 @@ #include #include -#if TGUI_BUILD_AS_CXX_MODULE - import tgui; -#else +#if !TGUI_BUILD_AS_CXX_MODULE #include #endif diff -Nru tgui-1.0-1.1.0+mantic/include/TGUI/Backend/GLFW-GLES2.hpp tgui-1.0-1.2.0+mantic/include/TGUI/Backend/GLFW-GLES2.hpp --- tgui-1.0-1.1.0+mantic/include/TGUI/Backend/GLFW-GLES2.hpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/include/TGUI/Backend/GLFW-GLES2.hpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. @@ -30,17 +30,13 @@ #error "TGUI wasn't build with the GLFW_GLES2 backend" #endif -#if TGUI_BUILD_AS_CXX_MODULE - import tgui.backend.window.glfw; - import tgui.backend.renderer.gles2; - import tgui.backend.font.freetype; -#else +#if !TGUI_BUILD_AS_CXX_MODULE #include #include #include -#endif -using GLFWwindow = struct GLFWwindow; + using GLFWwindow = struct GLFWwindow; +#endif TGUI_MODULE_EXPORT namespace tgui { diff -Nru tgui-1.0-1.1.0+mantic/include/TGUI/Backend/GLFW-OpenGL3.hpp tgui-1.0-1.2.0+mantic/include/TGUI/Backend/GLFW-OpenGL3.hpp --- tgui-1.0-1.1.0+mantic/include/TGUI/Backend/GLFW-OpenGL3.hpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/include/TGUI/Backend/GLFW-OpenGL3.hpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. @@ -30,17 +30,13 @@ #error "TGUI wasn't build with the GLFW_OPENGL3 backend" #endif -#if TGUI_BUILD_AS_CXX_MODULE - import tgui.backend.window.glfw; - import tgui.backend.renderer.opengl3; - import tgui.backend.font.freetype; -#else +#if !TGUI_BUILD_AS_CXX_MODULE #include #include #include -#endif -using GLFWwindow = struct GLFWwindow; + using GLFWwindow = struct GLFWwindow; +#endif TGUI_MODULE_EXPORT namespace tgui { diff -Nru tgui-1.0-1.1.0+mantic/include/TGUI/Backend/Renderer/BackendRenderTarget.hpp tgui-1.0-1.2.0+mantic/include/TGUI/Backend/Renderer/BackendRenderTarget.hpp --- tgui-1.0-1.1.0+mantic/include/TGUI/Backend/Renderer/BackendRenderTarget.hpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/include/TGUI/Backend/Renderer/BackendRenderTarget.hpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. @@ -48,49 +48,49 @@ { public: - ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /// @brief Virtual destructor - ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// virtual ~BackendRenderTarget() = default; - ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /// @brief Select the color that will be used by clearScreen /// @param color Background color of the window - ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// virtual void setClearColor(const Color& color) = 0; - ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /// @brief Clears the screen, called at the beginning of each frame when gui.mainLoop() is called - ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// virtual void clearScreen() = 0; - ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /// @brief Informs the render target about which part of the window is used for rendering /// /// @param view Defines which part of the gui is being shown /// @param viewport Defines which part of the window is being rendered to /// @param targetSize Size of the window - ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// virtual void setView(FloatRect view, FloatRect viewport, Vector2f targetSize); - ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /// @brief Draws the gui and all of its widgets /// /// @param root Root container that holds all widgets in the gui - ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// virtual void drawGui(const std::shared_ptr& root) = 0; - ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /// @brief Draws a widget, if the widget is visible /// /// @param states Render states to use for drawing /// @param widget The widget to draw - ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// virtual void drawWidget(const RenderStates& states, const std::shared_ptr& widget); @@ -115,46 +115,46 @@ virtual void removeClippingLayer(); - ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /// @brief Draws borders inside a provided rectangle /// /// @param states Render states to use for drawing /// @param borders The size of the borders on each side /// @param size The size of the rectangle in which borders will be drawn /// @param color Color of the borders - ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// virtual void drawBorders(const RenderStates& states, const Borders& borders, Vector2f size, Color color); - ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /// @brief Draws a colored rectangle /// /// @param states Render states to use for drawing /// @param size Size of the rectangle /// @param color Color of the rectangle - ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// virtual void drawFilledRect(const RenderStates& states, Vector2f size, Color color); - ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /// @brief Draws a texture /// /// @param states Render states to use for drawing /// @param sprite Image to draw - ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// virtual void drawSprite(const RenderStates& states, const Sprite& sprite); - ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /// @brief Draws some text /// /// @param states Render states to use for drawing /// @param text Text to draw - ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// virtual void drawText(const RenderStates& states, const Text& text); - ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /// @brief Draws a single triangles (using the color that is specified in the vertices) /// /// @param states Render states to use for drawing @@ -163,11 +163,11 @@ /// @param point3 Third point of the triangle /// /// To draw multiple triangles at once, optionally with a texture, use the drawVertexArray function. - ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// virtual void drawTriangle(const RenderStates& states, const Vertex& point1, const Vertex& point2, const Vertex& point3); - ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /// @brief Draws a circle /// /// @param states Render states to use for drawing @@ -175,11 +175,11 @@ /// @param backgroundColor Color to fill the circle with /// @param borderThickness Thickness of the border to draw around the circle (outside given size if thickness is positive) /// @param borderColor Color of the border, if borderThickness differs from 0 - ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// virtual void drawCircle(const RenderStates& states, float size, const Color& backgroundColor, float borderThickness = 0, const Color& borderColor = {}); - ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /// @brief Draws a rounded rectangle /// /// @param states Render states to use for drawing @@ -188,12 +188,12 @@ /// @param radius Radius of the rounded corners /// @param borders Optional borders on the sides of the rectangle (must be the same on all sides) /// @param borderColor Color of the borders - ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// virtual void drawRoundedRectangle(const RenderStates& states, const Vector2f& size, const Color& backgroundColor, float radius, const Borders& borders = {0}, const Color& borderColor = Color::Black); - ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /// @brief Draws a vertex array. This is called by the other draw functions when they are not overriden. /// /// @param states Render states to use for drawing @@ -202,26 +202,26 @@ /// @param indices Pointer to first element in array of indices /// @param indexCount Amount of elements in the indices array /// @param texture Texture to use, or nullptr when drawing colored triangles - ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// virtual void drawVertexArray(const RenderStates& states, const Vertex* vertices, std::size_t vertexCount, const unsigned int* indices, std::size_t indexCount, const std::shared_ptr& texture) = 0; - ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// protected: - ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /// @brief Called from addClippingLayer and removeClippingLayer to apply the clipping /// /// @param clipRect View rectangle to apply /// @param clipViewport Viewport to apply /// /// Both rectangles may be empty when nothing that will be drawn is going to be visible. - ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// virtual void updateClipping(FloatRect clipRect, FloatRect clipViewport) = 0; - ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// protected: FloatRect m_viewRect; diff -Nru tgui-1.0-1.1.0+mantic/include/TGUI/Backend/Renderer/BackendRenderer.hpp tgui-1.0-1.2.0+mantic/include/TGUI/Backend/Renderer/BackendRenderer.hpp --- tgui-1.0-1.1.0+mantic/include/TGUI/Backend/Renderer/BackendRenderer.hpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/include/TGUI/Backend/Renderer/BackendRenderer.hpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/include/TGUI/Backend/Renderer/BackendText.hpp tgui-1.0-1.2.0+mantic/include/TGUI/Backend/Renderer/BackendText.hpp --- tgui-1.0-1.1.0+mantic/include/TGUI/Backend/Renderer/BackendText.hpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/include/TGUI/Backend/Renderer/BackendText.hpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/include/TGUI/Backend/Renderer/BackendTexture.hpp tgui-1.0-1.2.0+mantic/include/TGUI/Backend/Renderer/BackendTexture.hpp --- tgui-1.0-1.1.0+mantic/include/TGUI/Backend/Renderer/BackendTexture.hpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/include/TGUI/Backend/Renderer/BackendTexture.hpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/include/TGUI/Backend/Renderer/GLES2/BackendRenderTargetGLES2.hpp tgui-1.0-1.2.0+mantic/include/TGUI/Backend/Renderer/GLES2/BackendRenderTargetGLES2.hpp --- tgui-1.0-1.1.0+mantic/include/TGUI/Backend/Renderer/GLES2/BackendRenderTargetGLES2.hpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/include/TGUI/Backend/Renderer/GLES2/BackendRenderTargetGLES2.hpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. @@ -28,9 +28,7 @@ #include -#if TGUI_BUILD_AS_CXX_MODULE - import tgui; -#else +#if !TGUI_BUILD_AS_CXX_MODULE #include #endif diff -Nru tgui-1.0-1.1.0+mantic/include/TGUI/Backend/Renderer/GLES2/BackendRendererGLES2.hpp tgui-1.0-1.2.0+mantic/include/TGUI/Backend/Renderer/GLES2/BackendRendererGLES2.hpp --- tgui-1.0-1.1.0+mantic/include/TGUI/Backend/Renderer/GLES2/BackendRendererGLES2.hpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/include/TGUI/Backend/Renderer/GLES2/BackendRendererGLES2.hpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. @@ -30,9 +30,7 @@ #include #include -#if TGUI_BUILD_AS_CXX_MODULE - import tgui; -#else +#if !TGUI_BUILD_AS_CXX_MODULE #include #endif diff -Nru tgui-1.0-1.1.0+mantic/include/TGUI/Backend/Renderer/GLES2/BackendTextureGLES2.hpp tgui-1.0-1.2.0+mantic/include/TGUI/Backend/Renderer/GLES2/BackendTextureGLES2.hpp --- tgui-1.0-1.1.0+mantic/include/TGUI/Backend/Renderer/GLES2/BackendTextureGLES2.hpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/include/TGUI/Backend/Renderer/GLES2/BackendTextureGLES2.hpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. @@ -27,9 +27,7 @@ #define TGUI_BACKEND_TEXTURE_GLES2_HPP #include -#if TGUI_BUILD_AS_CXX_MODULE - import tgui; -#else +#if !TGUI_BUILD_AS_CXX_MODULE #include #endif diff -Nru tgui-1.0-1.1.0+mantic/include/TGUI/Backend/Renderer/GLES2/CanvasGLES2.hpp tgui-1.0-1.2.0+mantic/include/TGUI/Backend/Renderer/GLES2/CanvasGLES2.hpp --- tgui-1.0-1.1.0+mantic/include/TGUI/Backend/Renderer/GLES2/CanvasGLES2.hpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/include/TGUI/Backend/Renderer/GLES2/CanvasGLES2.hpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. @@ -28,11 +28,9 @@ #include -#if TGUI_BUILD_AS_CXX_MODULE - import tgui; -#else +#if !TGUI_BUILD_AS_CXX_MODULE #include - #include + #include #endif ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// @@ -63,7 +61,7 @@ /// glBindFramebuffer(GL_FRAMEBUFFER, 0); // Let further drawing happen on the window again /// @endcode ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - class TGUI_API CanvasGLES2 : public ClickableWidget + class TGUI_API CanvasGLES2 : public CanvasBase { public: @@ -156,15 +154,6 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - /// @brief Returns whether the widget can gain focus - /// @return Can the widget be focused? - /// - /// This function returns false for Canvas widgets. - ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - TGUI_NODISCARD bool canGainFocus() const override; - - - ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /// @brief Binds the framebuffer of the canvas /// /// @return id of internal framebuffer that was just bound by this function diff -Nru tgui-1.0-1.1.0+mantic/include/TGUI/Backend/Renderer/OpenGL.hpp tgui-1.0-1.2.0+mantic/include/TGUI/Backend/Renderer/OpenGL.hpp --- tgui-1.0-1.1.0+mantic/include/TGUI/Backend/Renderer/OpenGL.hpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/include/TGUI/Backend/Renderer/OpenGL.hpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. @@ -28,10 +28,6 @@ #include -#if TGUI_BUILD_AS_CXX_MODULE && !defined(TGUI_BUILDING_OPENGL_MODULE) - import tgui.opengl; -#endif - #if defined(__GNUC__) #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wold-style-cast" diff -Nru tgui-1.0-1.1.0+mantic/include/TGUI/Backend/Renderer/OpenGL3/BackendRenderTargetOpenGL3.hpp tgui-1.0-1.2.0+mantic/include/TGUI/Backend/Renderer/OpenGL3/BackendRenderTargetOpenGL3.hpp --- tgui-1.0-1.1.0+mantic/include/TGUI/Backend/Renderer/OpenGL3/BackendRenderTargetOpenGL3.hpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/include/TGUI/Backend/Renderer/OpenGL3/BackendRenderTargetOpenGL3.hpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. @@ -28,9 +28,7 @@ #include -#if TGUI_BUILD_AS_CXX_MODULE - import tgui; -#else +#if !TGUI_BUILD_AS_CXX_MODULE #include #endif diff -Nru tgui-1.0-1.1.0+mantic/include/TGUI/Backend/Renderer/OpenGL3/BackendRendererOpenGL3.hpp tgui-1.0-1.2.0+mantic/include/TGUI/Backend/Renderer/OpenGL3/BackendRendererOpenGL3.hpp --- tgui-1.0-1.1.0+mantic/include/TGUI/Backend/Renderer/OpenGL3/BackendRendererOpenGL3.hpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/include/TGUI/Backend/Renderer/OpenGL3/BackendRendererOpenGL3.hpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. @@ -30,9 +30,7 @@ #include #include -#if TGUI_BUILD_AS_CXX_MODULE - import tgui; -#else +#if !TGUI_BUILD_AS_CXX_MODULE #include #endif diff -Nru tgui-1.0-1.1.0+mantic/include/TGUI/Backend/Renderer/OpenGL3/BackendTextureOpenGL3.hpp tgui-1.0-1.2.0+mantic/include/TGUI/Backend/Renderer/OpenGL3/BackendTextureOpenGL3.hpp --- tgui-1.0-1.1.0+mantic/include/TGUI/Backend/Renderer/OpenGL3/BackendTextureOpenGL3.hpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/include/TGUI/Backend/Renderer/OpenGL3/BackendTextureOpenGL3.hpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. @@ -27,9 +27,7 @@ #define TGUI_BACKEND_TEXTURE_OPENGL3_HPP #include -#if TGUI_BUILD_AS_CXX_MODULE - import tgui; -#else +#if !TGUI_BUILD_AS_CXX_MODULE #include #endif diff -Nru tgui-1.0-1.1.0+mantic/include/TGUI/Backend/Renderer/OpenGL3/CanvasOpenGL3.hpp tgui-1.0-1.2.0+mantic/include/TGUI/Backend/Renderer/OpenGL3/CanvasOpenGL3.hpp --- tgui-1.0-1.1.0+mantic/include/TGUI/Backend/Renderer/OpenGL3/CanvasOpenGL3.hpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/include/TGUI/Backend/Renderer/OpenGL3/CanvasOpenGL3.hpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. @@ -28,11 +28,9 @@ #include -#if TGUI_BUILD_AS_CXX_MODULE - import tgui; -#else +#if !TGUI_BUILD_AS_CXX_MODULE #include - #include + #include #endif ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// @@ -63,7 +61,7 @@ /// glBindFramebuffer(GL_FRAMEBUFFER, 0); // Let further drawing happen on the window again /// @endcode ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - class TGUI_API CanvasOpenGL3 : public ClickableWidget + class TGUI_API CanvasOpenGL3 : public CanvasBase { public: @@ -156,15 +154,6 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - /// @brief Returns whether the widget can gain focus - /// @return Can the widget be focused? - /// - /// This function returns false for Canvas widgets. - ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - TGUI_NODISCARD bool canGainFocus() const override; - - - ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /// @brief Binds the framebuffer of the canvas /// /// @return id of internal framebuffer that was just bound by this function diff -Nru tgui-1.0-1.1.0+mantic/include/TGUI/Backend/Renderer/SDL_Renderer/BackendRenderTargetSDL.hpp tgui-1.0-1.2.0+mantic/include/TGUI/Backend/Renderer/SDL_Renderer/BackendRenderTargetSDL.hpp --- tgui-1.0-1.1.0+mantic/include/TGUI/Backend/Renderer/SDL_Renderer/BackendRenderTargetSDL.hpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/include/TGUI/Backend/Renderer/SDL_Renderer/BackendRenderTargetSDL.hpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. @@ -28,9 +28,7 @@ #include -#if TGUI_BUILD_AS_CXX_MODULE - import tgui; -#else +#if !TGUI_BUILD_AS_CXX_MODULE #include #endif diff -Nru tgui-1.0-1.1.0+mantic/include/TGUI/Backend/Renderer/SDL_Renderer/BackendRendererSDL.hpp tgui-1.0-1.2.0+mantic/include/TGUI/Backend/Renderer/SDL_Renderer/BackendRendererSDL.hpp --- tgui-1.0-1.1.0+mantic/include/TGUI/Backend/Renderer/SDL_Renderer/BackendRendererSDL.hpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/include/TGUI/Backend/Renderer/SDL_Renderer/BackendRendererSDL.hpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. @@ -30,9 +30,7 @@ #include #include -#if TGUI_BUILD_AS_CXX_MODULE - import tgui; -#else +#if !TGUI_BUILD_AS_CXX_MODULE #include #endif @@ -42,7 +40,9 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +#if !TGUI_BUILD_AS_CXX_MODULE struct SDL_Renderer; +#endif TGUI_MODULE_EXPORT namespace tgui { diff -Nru tgui-1.0-1.1.0+mantic/include/TGUI/Backend/Renderer/SDL_Renderer/BackendTextureSDL.hpp tgui-1.0-1.2.0+mantic/include/TGUI/Backend/Renderer/SDL_Renderer/BackendTextureSDL.hpp --- tgui-1.0-1.1.0+mantic/include/TGUI/Backend/Renderer/SDL_Renderer/BackendTextureSDL.hpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/include/TGUI/Backend/Renderer/SDL_Renderer/BackendTextureSDL.hpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. @@ -27,16 +27,16 @@ #define TGUI_BACKEND_TEXTURE_SDL_HPP #include -#if TGUI_BUILD_AS_CXX_MODULE - import tgui; -#else +#if !TGUI_BUILD_AS_CXX_MODULE #include #endif ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +#if !TGUI_BUILD_AS_CXX_MODULE struct SDL_Texture; struct SDL_Renderer; +#endif TGUI_MODULE_EXPORT namespace tgui { diff -Nru tgui-1.0-1.1.0+mantic/include/TGUI/Backend/Renderer/SDL_Renderer/CanvasSDL.hpp tgui-1.0-1.2.0+mantic/include/TGUI/Backend/Renderer/SDL_Renderer/CanvasSDL.hpp --- tgui-1.0-1.1.0+mantic/include/TGUI/Backend/Renderer/SDL_Renderer/CanvasSDL.hpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/include/TGUI/Backend/Renderer/SDL_Renderer/CanvasSDL.hpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. @@ -28,11 +28,9 @@ #include -#if TGUI_BUILD_AS_CXX_MODULE - import tgui; -#else +#if !TGUI_BUILD_AS_CXX_MODULE #include - #include + #include #endif #include @@ -67,7 +65,7 @@ /// SDL_SetRenderTarget(renderer, nullptr); // Let further drawing happen on the window again /// @endcode ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - class TGUI_API CanvasSDL : public ClickableWidget + class TGUI_API CanvasSDL : public CanvasBase { public: @@ -154,15 +152,6 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - /// @brief Returns whether the widget can gain focus - /// @return Can the widget be focused? - /// - /// This function returns false for Canvas widgets. - ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - TGUI_NODISCARD bool canGainFocus() const override; - - - ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /// @brief Access the internal texture on which you can render /// /// @return Pointer to the internal texture diff -Nru tgui-1.0-1.1.0+mantic/include/TGUI/Backend/Renderer/SFML-Graphics/BackendRenderTargetSFML.hpp tgui-1.0-1.2.0+mantic/include/TGUI/Backend/Renderer/SFML-Graphics/BackendRenderTargetSFML.hpp --- tgui-1.0-1.1.0+mantic/include/TGUI/Backend/Renderer/SFML-Graphics/BackendRenderTargetSFML.hpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/include/TGUI/Backend/Renderer/SFML-Graphics/BackendRenderTargetSFML.hpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/include/TGUI/Backend/Renderer/SFML-Graphics/BackendRendererSFML.hpp tgui-1.0-1.2.0+mantic/include/TGUI/Backend/Renderer/SFML-Graphics/BackendRendererSFML.hpp --- tgui-1.0-1.1.0+mantic/include/TGUI/Backend/Renderer/SFML-Graphics/BackendRendererSFML.hpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/include/TGUI/Backend/Renderer/SFML-Graphics/BackendRendererSFML.hpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/include/TGUI/Backend/Renderer/SFML-Graphics/BackendTextureSFML.hpp tgui-1.0-1.2.0+mantic/include/TGUI/Backend/Renderer/SFML-Graphics/BackendTextureSFML.hpp --- tgui-1.0-1.1.0+mantic/include/TGUI/Backend/Renderer/SFML-Graphics/BackendTextureSFML.hpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/include/TGUI/Backend/Renderer/SFML-Graphics/BackendTextureSFML.hpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. @@ -27,9 +27,7 @@ #define TGUI_BACKEND_TEXTURE_SFML_HPP #include -#if TGUI_BUILD_AS_CXX_MODULE - import tgui; -#else +#if !TGUI_BUILD_AS_CXX_MODULE #include #endif diff -Nru tgui-1.0-1.1.0+mantic/include/TGUI/Backend/Renderer/SFML-Graphics/CanvasSFML.hpp tgui-1.0-1.2.0+mantic/include/TGUI/Backend/Renderer/SFML-Graphics/CanvasSFML.hpp --- tgui-1.0-1.1.0+mantic/include/TGUI/Backend/Renderer/SFML-Graphics/CanvasSFML.hpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/include/TGUI/Backend/Renderer/SFML-Graphics/CanvasSFML.hpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. @@ -30,7 +30,7 @@ #if !TGUI_BUILD_AS_CXX_MODULE #include - #include + #include #endif #include @@ -66,7 +66,7 @@ /// canvas->display(); // Save what was drawn on the canvas /// @endcode ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - class TGUI_API CanvasSFML : public ClickableWidget + class TGUI_API CanvasSFML : public CanvasBase { public: @@ -252,15 +252,6 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - /// @brief Returns whether the widget can gain focus - /// @return Can the widget be focused? - /// - /// This function returns false for Canvas widgets. - ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - TGUI_NODISCARD bool canGainFocus() const override; - - - ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /// @brief Access the internal render texture that the canvas widget uses to draw on /// /// @return Reference to the internal render texture diff -Nru tgui-1.0-1.1.0+mantic/include/TGUI/Backend/SDL-GLES2.hpp tgui-1.0-1.2.0+mantic/include/TGUI/Backend/SDL-GLES2.hpp --- tgui-1.0-1.1.0+mantic/include/TGUI/Backend/SDL-GLES2.hpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/include/TGUI/Backend/SDL-GLES2.hpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. @@ -30,11 +30,7 @@ #error "TGUI wasn't build with the SDL_GLES2 backend" #endif -#if TGUI_BUILD_AS_CXX_MODULE - import tgui.backend.window.sdl; - import tgui.backend.renderer.gles2; - import tgui.backend.font.freetype; -#else +#if !TGUI_BUILD_AS_CXX_MODULE #include #include #include diff -Nru tgui-1.0-1.1.0+mantic/include/TGUI/Backend/SDL-OpenGL3.hpp tgui-1.0-1.2.0+mantic/include/TGUI/Backend/SDL-OpenGL3.hpp --- tgui-1.0-1.1.0+mantic/include/TGUI/Backend/SDL-OpenGL3.hpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/include/TGUI/Backend/SDL-OpenGL3.hpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. @@ -30,11 +30,7 @@ #error "TGUI wasn't build with the SDL_OPENGL3 backend" #endif -#if TGUI_BUILD_AS_CXX_MODULE - import tgui.backend.window.sdl; - import tgui.backend.renderer.opengl3; - import tgui.backend.font.freetype; -#else +#if !TGUI_BUILD_AS_CXX_MODULE #include #include #include diff -Nru tgui-1.0-1.1.0+mantic/include/TGUI/Backend/SDL-Renderer.hpp tgui-1.0-1.2.0+mantic/include/TGUI/Backend/SDL-Renderer.hpp --- tgui-1.0-1.1.0+mantic/include/TGUI/Backend/SDL-Renderer.hpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/include/TGUI/Backend/SDL-Renderer.hpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. @@ -30,11 +30,7 @@ #error "TGUI wasn't build with the SDL_RENDERER backend" #endif -#if TGUI_BUILD_AS_CXX_MODULE - import tgui.backend.window.sdl; - import tgui.backend.renderer.sdl_renderer; - import tgui.backend.font.sdl_ttf; -#else +#if !TGUI_BUILD_AS_CXX_MODULE #include #include #include diff -Nru tgui-1.0-1.1.0+mantic/include/TGUI/Backend/SDL-TTF-GLES2.hpp tgui-1.0-1.2.0+mantic/include/TGUI/Backend/SDL-TTF-GLES2.hpp --- tgui-1.0-1.1.0+mantic/include/TGUI/Backend/SDL-TTF-GLES2.hpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/include/TGUI/Backend/SDL-TTF-GLES2.hpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. @@ -42,11 +42,7 @@ // This situation will no longer be supported once we drop support for ndk-build and require the use of CMake #endif -#if TGUI_BUILD_AS_CXX_MODULE - import tgui.backend.window.sdl; - import tgui.backend.renderer.gles2; - import tgui.backend.font.sdl_ttf; -#else +#if !TGUI_BUILD_AS_CXX_MODULE #include #include #include diff -Nru tgui-1.0-1.1.0+mantic/include/TGUI/Backend/SDL-TTF-OpenGL3.hpp tgui-1.0-1.2.0+mantic/include/TGUI/Backend/SDL-TTF-OpenGL3.hpp --- tgui-1.0-1.1.0+mantic/include/TGUI/Backend/SDL-TTF-OpenGL3.hpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/include/TGUI/Backend/SDL-TTF-OpenGL3.hpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. @@ -30,11 +30,7 @@ #error "TGUI wasn't build with the SDL_TTF_OPENGL3 backend" #endif -#if TGUI_BUILD_AS_CXX_MODULE - import tgui.backend.window.sdl; - import tgui.backend.renderer.opengl3; - import tgui.backend.font.sdl_ttf; -#else +#if !TGUI_BUILD_AS_CXX_MODULE #include #include #include diff -Nru tgui-1.0-1.1.0+mantic/include/TGUI/Backend/SFML-Graphics.hpp tgui-1.0-1.2.0+mantic/include/TGUI/Backend/SFML-Graphics.hpp --- tgui-1.0-1.1.0+mantic/include/TGUI/Backend/SFML-Graphics.hpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/include/TGUI/Backend/SFML-Graphics.hpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. @@ -30,11 +30,7 @@ #error "TGUI wasn't build with the SFML_GRAPHICS backend" #endif -#if TGUI_BUILD_AS_CXX_MODULE - import tgui.backend.window.sfml; - import tgui.backend.renderer.sfml_graphics; - import tgui.backend.font.sfml_graphics; -#else +#if !TGUI_BUILD_AS_CXX_MODULE #include #include #include diff -Nru tgui-1.0-1.1.0+mantic/include/TGUI/Backend/SFML-OpenGL3.hpp tgui-1.0-1.2.0+mantic/include/TGUI/Backend/SFML-OpenGL3.hpp --- tgui-1.0-1.1.0+mantic/include/TGUI/Backend/SFML-OpenGL3.hpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/include/TGUI/Backend/SFML-OpenGL3.hpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. @@ -30,11 +30,7 @@ #error "TGUI wasn't build with the SFML_OPENGL3 backend" #endif -#if TGUI_BUILD_AS_CXX_MODULE - import tgui.backend.window.sfml; - import tgui.backend.renderer.opengl3; - import tgui.backend.font.freetype; -#else +#if !TGUI_BUILD_AS_CXX_MODULE #include #include #include diff -Nru tgui-1.0-1.1.0+mantic/include/TGUI/Backend/Window/Backend.hpp tgui-1.0-1.2.0+mantic/include/TGUI/Backend/Window/Backend.hpp --- tgui-1.0-1.1.0+mantic/include/TGUI/Backend/Window/Backend.hpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/include/TGUI/Backend/Window/Backend.hpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. @@ -223,6 +223,8 @@ /// @param inputRect Part of the screen where the text input is located /// /// If this function isn't overriden then calling it does nothing. + /// + /// @deprecated Replaced by BackendGui::startTextInput in TGUI 1.0 ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// TGUI_DEPRECATED("Use BackendGui::startTextInput instead") virtual void openVirtualKeyboard(const FloatRect& inputRect); @@ -231,6 +233,8 @@ /// @brief Closes the virtual keyboard on Android and iOS /// /// If this function isn't overriden then calling it does nothing. + /// + /// @deprecated Replaced by BackendGui::stopTextInput in TGUI 1.0 ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// TGUI_DEPRECATED("Use BackendGui::stopTextInput instead") virtual void closeVirtualKeyboard(); #endif diff -Nru tgui-1.0-1.1.0+mantic/include/TGUI/Backend/Window/BackendGui.hpp tgui-1.0-1.2.0+mantic/include/TGUI/Backend/Window/BackendGui.hpp --- tgui-1.0-1.1.0+mantic/include/TGUI/Backend/Window/BackendGui.hpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/include/TGUI/Backend/Window/BackendGui.hpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. @@ -312,7 +312,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// TGUI_NODISCARD Widget::Ptr getFocusedLeaf() const; - +#ifndef TGUI_REMOVE_DEPRECATED_CODE ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /// @brief Returns the leaf child widget that is located at the given position /// @@ -320,11 +320,28 @@ /// /// @return Widget at the queried position, or nullptr when there is no widget at that location /// - /// @see getWidgetBelowMouseCursor + /// @deprecated Replaced by getWidgetAtPos in TGUI 1.2 ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - TGUI_NODISCARD Widget::Ptr getWidgetAtPosition(Vector2f pos) const; + TGUI_DEPRECATED("Use getWidgetAtPos(pos, true) instead") TGUI_NODISCARD Widget::Ptr getWidgetAtPosition(Vector2f pos) const; +#endif + ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + /// @brief Returns the widget that is located at the given position + /// + /// @param pos The location where the widget will be searched, relative to the gui view + /// @param recursive If the widget at the position is a container, should the search continue inside it instead of just + /// returning the container? The child container may still be returned when recursive is true, but only + /// if none of its children are located at the searched position. + /// + /// @return Widget at the queried position, or nullptr when there is no widget at that location + /// + /// @see getWidgetBelowMouseCursor + /// + /// @since TGUI 1.2 + ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + TGUI_NODISCARD Widget::Ptr getWidgetAtPos(Vector2f pos, bool recursive) const; +#ifndef TGUI_REMOVE_DEPRECATED_CODE ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /// @brief Returns the leaf child widget below the mouse /// @@ -332,9 +349,26 @@ /// /// @return Widget below the mouse, or nullptr when the mouse isn't on top of any widgets /// - /// @see getWidgetAtPosition + /// @deprecated Replaced by getWidgetBelowMouseCursor overload with additional recursive parameter in TGUI 1.2 + ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + TGUI_DEPRECATED("Use getWidgetBelowMouseCursor(mousePos, true) instead") TGUI_NODISCARD Widget::Ptr getWidgetBelowMouseCursor(Vector2i mousePos) const; +#endif + + ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + /// @brief Returns the widget below the mouse + /// + /// @param mousePos Position of the mouse, in pixel coordinates, relative the the window + /// @param recursive If the widget below the mouse is a container, should the search continue inside it instead of just + /// returning the container? The child container may still be returned when recursive is true, but only + /// if none of its children are located at the mouse position. + /// + /// @return Widget below the mouse, or nullptr when the mouse isn't on top of any widgets + /// + /// @see getWidgetAtPos + /// + /// @since TGUI 1.2 ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - TGUI_NODISCARD Widget::Ptr getWidgetBelowMouseCursor(Vector2i mousePos) const; + TGUI_NODISCARD Widget::Ptr getWidgetBelowMouseCursor(Vector2i mousePos, bool recursive) const; ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// diff -Nru tgui-1.0-1.1.0+mantic/include/TGUI/Backend/Window/GLFW/BackendGLFW.hpp tgui-1.0-1.2.0+mantic/include/TGUI/Backend/Window/GLFW/BackendGLFW.hpp --- tgui-1.0-1.1.0+mantic/include/TGUI/Backend/Window/GLFW/BackendGLFW.hpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/include/TGUI/Backend/Window/GLFW/BackendGLFW.hpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. @@ -28,9 +28,7 @@ #include -#if TGUI_BUILD_AS_CXX_MODULE - import tgui; -#else +#if !TGUI_BUILD_AS_CXX_MODULE #include #endif @@ -41,8 +39,10 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -using GLFWwindow = struct GLFWwindow; -using GLFWcursor = struct GLFWcursor; +#if !TGUI_BUILD_AS_CXX_MODULE + using GLFWwindow = struct GLFWwindow; + using GLFWcursor = struct GLFWcursor; +#endif ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// diff -Nru tgui-1.0-1.1.0+mantic/include/TGUI/Backend/Window/GLFW/BackendGuiGLFW.hpp tgui-1.0-1.2.0+mantic/include/TGUI/Backend/Window/GLFW/BackendGuiGLFW.hpp --- tgui-1.0-1.1.0+mantic/include/TGUI/Backend/Window/GLFW/BackendGuiGLFW.hpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/include/TGUI/Backend/Window/GLFW/BackendGuiGLFW.hpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. @@ -27,16 +27,16 @@ #define TGUI_BACKEND_GUI_GLFW_HPP #include -#if TGUI_BUILD_AS_CXX_MODULE - import tgui; -#else +#if !TGUI_BUILD_AS_CXX_MODULE #include #include #endif ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -using GLFWwindow = struct GLFWwindow; +#if !TGUI_BUILD_AS_CXX_MODULE + using GLFWwindow = struct GLFWwindow; +#endif ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// diff -Nru tgui-1.0-1.1.0+mantic/include/TGUI/Backend/Window/SDL/BackendGuiSDL.hpp tgui-1.0-1.2.0+mantic/include/TGUI/Backend/Window/SDL/BackendGuiSDL.hpp --- tgui-1.0-1.1.0+mantic/include/TGUI/Backend/Window/SDL/BackendGuiSDL.hpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/include/TGUI/Backend/Window/SDL/BackendGuiSDL.hpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. @@ -32,9 +32,7 @@ #endif #include -#if TGUI_BUILD_AS_CXX_MODULE - import tgui; -#else +#if !TGUI_BUILD_AS_CXX_MODULE #include #endif @@ -108,7 +106,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /// @brief Helper function that converts an SDL event to a TGUI event - /// @param eventSFML The input SDL event + /// @param eventSDL The input SDL event /// @param eventTGUI The output TGUI event /// @return Did the SDL event match on a TGUI event and has the output event been written to? /// diff -Nru tgui-1.0-1.1.0+mantic/include/TGUI/Backend/Window/SDL/BackendSDL.hpp tgui-1.0-1.2.0+mantic/include/TGUI/Backend/Window/SDL/BackendSDL.hpp --- tgui-1.0-1.1.0+mantic/include/TGUI/Backend/Window/SDL/BackendSDL.hpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/include/TGUI/Backend/Window/SDL/BackendSDL.hpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. @@ -29,9 +29,7 @@ #include #include -#if TGUI_BUILD_AS_CXX_MODULE - import tgui; -#else +#if !TGUI_BUILD_AS_CXX_MODULE #include #endif @@ -105,12 +103,16 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /// @brief Opens the virtual keyboard on Android and iOS /// @param inputRect Part of the screen where the text input is located + /// + /// @deprecated Replaced by BackendGui::startTextInput in TGUI 1.0 ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// TGUI_DEPRECATED("Use BackendGui::startTextInput instead") void openVirtualKeyboard(const FloatRect& inputRect) override; ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /// @brief Closes the virtual keyboard on Android and iOS + /// + /// @deprecated Replaced by BackendGui::stopTextInput in TGUI 1.0 ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// TGUI_DEPRECATED("Use BackendGui::stopTextInput instead") void closeVirtualKeyboard() override; #endif diff -Nru tgui-1.0-1.1.0+mantic/include/TGUI/Backend/Window/SFML/BackendGuiSFML.hpp tgui-1.0-1.2.0+mantic/include/TGUI/Backend/Window/SFML/BackendGuiSFML.hpp --- tgui-1.0-1.1.0+mantic/include/TGUI/Backend/Window/SFML/BackendGuiSFML.hpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/include/TGUI/Backend/Window/SFML/BackendGuiSFML.hpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. @@ -27,9 +27,7 @@ #define TGUI_BACKEND_GUI_SFML_HPP #include -#if TGUI_BUILD_AS_CXX_MODULE - import tgui; -#else +#if !TGUI_BUILD_AS_CXX_MODULE #include #endif @@ -163,7 +161,7 @@ /// /// @param window The SFML window that will be used by the gui ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - virtual void setGuiWindow(sf::Window& window); + void setGuiWindow(sf::Window& window); ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// diff -Nru tgui-1.0-1.1.0+mantic/include/TGUI/Backend/Window/SFML/BackendSFML.hpp tgui-1.0-1.2.0+mantic/include/TGUI/Backend/Window/SFML/BackendSFML.hpp --- tgui-1.0-1.1.0+mantic/include/TGUI/Backend/Window/SFML/BackendSFML.hpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/include/TGUI/Backend/Window/SFML/BackendSFML.hpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. @@ -99,12 +99,16 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /// @brief Opens the virtual keyboard on Android and iOS /// @param inputRect Part of the screen where the text input is located + /// + /// @deprecated Replaced by BackendGui::startTextInput in TGUI 1.0 ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// TGUI_DEPRECATED("Use BackendGui::startTextInput instead") void openVirtualKeyboard(const FloatRect& inputRect) override; ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /// @brief Closes the virtual keyboard on Android and iOS + /// + /// @deprecated Replaced by BackendGui::stopTextInput in TGUI 1.0 ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// TGUI_DEPRECATED("Use BackendGui::stopTextInput instead") void closeVirtualKeyboard() override; #endif diff -Nru tgui-1.0-1.1.0+mantic/include/TGUI/Base64.hpp tgui-1.0-1.2.0+mantic/include/TGUI/Base64.hpp --- tgui-1.0-1.1.0+mantic/include/TGUI/Base64.hpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/include/TGUI/Base64.hpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/include/TGUI/Color.hpp tgui-1.0-1.2.0+mantic/include/TGUI/Color.hpp --- tgui-1.0-1.1.0+mantic/include/TGUI/Color.hpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/include/TGUI/Color.hpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/include/TGUI/Components.hpp tgui-1.0-1.2.0+mantic/include/TGUI/Components.hpp --- tgui-1.0-1.1.0+mantic/include/TGUI/Components.hpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/include/TGUI/Components.hpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/include/TGUI/Config.hpp.in tgui-1.0-1.2.0+mantic/include/TGUI/Config.hpp.in --- tgui-1.0-1.1.0+mantic/include/TGUI/Config.hpp.in 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/include/TGUI/Config.hpp.in 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/include/TGUI/Container.hpp tgui-1.0-1.2.0+mantic/include/TGUI/Container.hpp --- tgui-1.0-1.1.0+mantic/include/TGUI/Container.hpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/include/TGUI/Container.hpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. @@ -349,14 +349,31 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// TGUI_NODISCARD Widget::Ptr getFocusedLeaf() const; +#ifndef TGUI_REMOVE_DEPRECATED_CODE ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /// @brief Returns the leaf child widget that is located at the given position /// - /// @param pos The location where the widget will be searched, relative to the container + /// @param pos The location where the widget will be searched, relative to the parent of this container /// /// @return Widget at the queried position, or nullptr when there is no widget at that location + /// + /// @deprecated Replaced by getWidgetAtPos in TGUI 1.2 + ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + TGUI_DEPRECATED("Use getWidgetAtPos instead") TGUI_NODISCARD virtual Widget::Ptr getWidgetAtPosition(Vector2f pos) const; +#endif + ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + /// @brief Returns the widget that is located at the given position + /// + /// @param pos The location where the widget will be searched, relative to the container + /// @param recursive If the widget at the position is a container, should the search continue inside it instead of just + /// returning the container? The child container may still be returned when recursive is true, but only + /// if none of its children are located at the searched position. + /// + /// @return Widget at the queried position, or nullptr when there is no widget at that location + /// + /// @since TGUI 1.2 ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - TGUI_NODISCARD virtual Widget::Ptr getWidgetAtPosition(Vector2f pos) const; + TGUI_NODISCARD virtual Widget::Ptr getWidgetAtPos(Vector2f pos, bool recursive) const; ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /// @brief Focuses the next widget in this container diff -Nru tgui-1.0-1.1.0+mantic/include/TGUI/CopiedSharedPtr.hpp tgui-1.0-1.2.0+mantic/include/TGUI/CopiedSharedPtr.hpp --- tgui-1.0-1.1.0+mantic/include/TGUI/CopiedSharedPtr.hpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/include/TGUI/CopiedSharedPtr.hpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/include/TGUI/Core.hpp tgui-1.0-1.2.0+mantic/include/TGUI/Core.hpp --- tgui-1.0-1.1.0+mantic/include/TGUI/Core.hpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/include/TGUI/Core.hpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/include/TGUI/Cursor.hpp tgui-1.0-1.2.0+mantic/include/TGUI/Cursor.hpp --- tgui-1.0-1.1.0+mantic/include/TGUI/Cursor.hpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/include/TGUI/Cursor.hpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/include/TGUI/CustomWidgetForBindings.hpp tgui-1.0-1.2.0+mantic/include/TGUI/CustomWidgetForBindings.hpp --- tgui-1.0-1.1.0+mantic/include/TGUI/CustomWidgetForBindings.hpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/include/TGUI/CustomWidgetForBindings.hpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. @@ -36,6 +36,8 @@ { ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /// @brief Class used by bindings to implement custom widgets withing these bindings (e.g. a custom C# widget in TGUI.Net) + /// + /// @deprecated This class should no longer be used. CTGUI now has its own class for this. ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// class TGUI_API CustomWidgetForBindings : public Widget { diff -Nru tgui-1.0-1.1.0+mantic/include/TGUI/DefaultBackendWindow.hpp tgui-1.0-1.2.0+mantic/include/TGUI/DefaultBackendWindow.hpp --- tgui-1.0-1.1.0+mantic/include/TGUI/DefaultBackendWindow.hpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/include/TGUI/DefaultBackendWindow.hpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. @@ -27,9 +27,7 @@ #define TGUI_DEFAULT_BACKEND_WINDOW_HPP #include -#if TGUI_BUILD_AS_CXX_MODULE - import tgui; -#else +#if !TGUI_BUILD_AS_CXX_MODULE #include #include #endif diff -Nru tgui-1.0-1.1.0+mantic/include/TGUI/Duration.hpp tgui-1.0-1.2.0+mantic/include/TGUI/Duration.hpp --- tgui-1.0-1.1.0+mantic/include/TGUI/Duration.hpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/include/TGUI/Duration.hpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/include/TGUI/Event.hpp tgui-1.0-1.2.0+mantic/include/TGUI/Event.hpp --- tgui-1.0-1.1.0+mantic/include/TGUI/Event.hpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/include/TGUI/Event.hpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2019 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/include/TGUI/Exception.hpp tgui-1.0-1.2.0+mantic/include/TGUI/Exception.hpp --- tgui-1.0-1.1.0+mantic/include/TGUI/Exception.hpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/include/TGUI/Exception.hpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/include/TGUI/FileDialogIconLoader.hpp tgui-1.0-1.2.0+mantic/include/TGUI/FileDialogIconLoader.hpp --- tgui-1.0-1.1.0+mantic/include/TGUI/FileDialogIconLoader.hpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/include/TGUI/FileDialogIconLoader.hpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/include/TGUI/Filesystem.hpp tgui-1.0-1.2.0+mantic/include/TGUI/Filesystem.hpp --- tgui-1.0-1.1.0+mantic/include/TGUI/Filesystem.hpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/include/TGUI/Filesystem.hpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/include/TGUI/Font.hpp tgui-1.0-1.2.0+mantic/include/TGUI/Font.hpp --- tgui-1.0-1.1.0+mantic/include/TGUI/Font.hpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/include/TGUI/Font.hpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/include/TGUI/Global.hpp tgui-1.0-1.2.0+mantic/include/TGUI/Global.hpp --- tgui-1.0-1.1.0+mantic/include/TGUI/Global.hpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/include/TGUI/Global.hpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/include/TGUI/Keyboard.hpp tgui-1.0-1.2.0+mantic/include/TGUI/Keyboard.hpp --- tgui-1.0-1.1.0+mantic/include/TGUI/Keyboard.hpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/include/TGUI/Keyboard.hpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/include/TGUI/Layout.hpp tgui-1.0-1.2.0+mantic/include/TGUI/Layout.hpp --- tgui-1.0-1.1.0+mantic/include/TGUI/Layout.hpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/include/TGUI/Layout.hpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/include/TGUI/Loading/DataIO.hpp tgui-1.0-1.2.0+mantic/include/TGUI/Loading/DataIO.hpp --- tgui-1.0-1.1.0+mantic/include/TGUI/Loading/DataIO.hpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/include/TGUI/Loading/DataIO.hpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/include/TGUI/Loading/Deserializer.hpp tgui-1.0-1.2.0+mantic/include/TGUI/Loading/Deserializer.hpp --- tgui-1.0-1.1.0+mantic/include/TGUI/Loading/Deserializer.hpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/include/TGUI/Loading/Deserializer.hpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. @@ -30,7 +30,7 @@ #include #if !TGUI_EXPERIMENTAL_USE_STD_MODULE - #include + #include #include #endif @@ -56,7 +56,7 @@ TGUI_NODISCARD static std::vector split(const String& str, char delim); private: - static std::map m_deserializers; /// We can't use unordered_map with enum class in GCC < 6 + static std::unordered_map m_deserializers; }; ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// diff -Nru tgui-1.0-1.1.0+mantic/include/TGUI/Loading/ImageLoader.hpp tgui-1.0-1.2.0+mantic/include/TGUI/Loading/ImageLoader.hpp --- tgui-1.0-1.1.0+mantic/include/TGUI/Loading/ImageLoader.hpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/include/TGUI/Loading/ImageLoader.hpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/include/TGUI/Loading/Serializer.hpp tgui-1.0-1.2.0+mantic/include/TGUI/Loading/Serializer.hpp --- tgui-1.0-1.1.0+mantic/include/TGUI/Loading/Serializer.hpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/include/TGUI/Loading/Serializer.hpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. @@ -30,7 +30,7 @@ #include #if !TGUI_EXPERIMENTAL_USE_STD_MODULE - #include + #include #endif ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// @@ -52,7 +52,7 @@ TGUI_NODISCARD static const SerializeFunc& getFunction(ObjectConverter::Type type); private: - static std::map m_serializers; /// We can't use unordered_map with enum class in GCC < 6 + static std::unordered_map m_serializers; }; ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// diff -Nru tgui-1.0-1.1.0+mantic/include/TGUI/Loading/Theme.hpp tgui-1.0-1.2.0+mantic/include/TGUI/Loading/Theme.hpp --- tgui-1.0-1.1.0+mantic/include/TGUI/Loading/Theme.hpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/include/TGUI/Loading/Theme.hpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. @@ -104,6 +104,19 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + /// @brief Replaced this theme with another one, while updating all connected widgets to the new renderers + /// + /// @param otherTheme The theme to copy + /// + /// The renderers are copied, meaning that all widgets connected to the other theme will remain connected to it. + /// Any widgets connected to this theme will however be updated with new renderers when the same name is encountered. + /// + /// @since TGUI 1.2 + ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + void replace(const Theme& otherTheme); + + + ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /// @brief Gets data for the renderers /// /// @param id The secondary parameter for the theme loader (name of section in theme file in DefaultThemeLoader). diff -Nru tgui-1.0-1.1.0+mantic/include/TGUI/Loading/ThemeLoader.hpp tgui-1.0-1.2.0+mantic/include/TGUI/Loading/ThemeLoader.hpp --- tgui-1.0-1.1.0+mantic/include/TGUI/Loading/ThemeLoader.hpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/include/TGUI/Loading/ThemeLoader.hpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. @@ -68,7 +68,7 @@ /// /// @param primary Primary parameter of the loader /// - /// For the default loader, the primary parameter is the filename while the secondary parameter is the section name. + /// For the default loader, the primary parameter is the filename. /// /// @return Map of property-value pairs ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// diff -Nru tgui-1.0-1.1.0+mantic/include/TGUI/Loading/WidgetFactory.hpp tgui-1.0-1.2.0+mantic/include/TGUI/Loading/WidgetFactory.hpp --- tgui-1.0-1.1.0+mantic/include/TGUI/Loading/WidgetFactory.hpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/include/TGUI/Loading/WidgetFactory.hpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/include/TGUI/ObjectConverter.hpp tgui-1.0-1.2.0+mantic/include/TGUI/ObjectConverter.hpp --- tgui-1.0-1.1.0+mantic/include/TGUI/ObjectConverter.hpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/include/TGUI/ObjectConverter.hpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/include/TGUI/Optional.hpp tgui-1.0-1.2.0+mantic/include/TGUI/Optional.hpp --- tgui-1.0-1.1.0+mantic/include/TGUI/Optional.hpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/include/TGUI/Optional.hpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/include/TGUI/Outline.hpp tgui-1.0-1.2.0+mantic/include/TGUI/Outline.hpp --- tgui-1.0-1.1.0+mantic/include/TGUI/Outline.hpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/include/TGUI/Outline.hpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/include/TGUI/Rect.hpp tgui-1.0-1.2.0+mantic/include/TGUI/Rect.hpp --- tgui-1.0-1.1.0+mantic/include/TGUI/Rect.hpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/include/TGUI/Rect.hpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/include/TGUI/RelFloatRect.hpp tgui-1.0-1.2.0+mantic/include/TGUI/RelFloatRect.hpp --- tgui-1.0-1.1.0+mantic/include/TGUI/RelFloatRect.hpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/include/TGUI/RelFloatRect.hpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/include/TGUI/RenderStates.hpp tgui-1.0-1.2.0+mantic/include/TGUI/RenderStates.hpp --- tgui-1.0-1.1.0+mantic/include/TGUI/RenderStates.hpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/include/TGUI/RenderStates.hpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/include/TGUI/RendererDefines.hpp tgui-1.0-1.2.0+mantic/include/TGUI/RendererDefines.hpp --- tgui-1.0-1.1.0+mantic/include/TGUI/RendererDefines.hpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/include/TGUI/RendererDefines.hpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/include/TGUI/Renderers/BoxLayoutRenderer.hpp tgui-1.0-1.2.0+mantic/include/TGUI/Renderers/BoxLayoutRenderer.hpp --- tgui-1.0-1.1.0+mantic/include/TGUI/Renderers/BoxLayoutRenderer.hpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/include/TGUI/Renderers/BoxLayoutRenderer.hpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/include/TGUI/Renderers/ButtonRenderer.hpp tgui-1.0-1.2.0+mantic/include/TGUI/Renderers/ButtonRenderer.hpp --- tgui-1.0-1.1.0+mantic/include/TGUI/Renderers/ButtonRenderer.hpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/include/TGUI/Renderers/ButtonRenderer.hpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/include/TGUI/Renderers/ChatBoxRenderer.hpp tgui-1.0-1.2.0+mantic/include/TGUI/Renderers/ChatBoxRenderer.hpp --- tgui-1.0-1.1.0+mantic/include/TGUI/Renderers/ChatBoxRenderer.hpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/include/TGUI/Renderers/ChatBoxRenderer.hpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/include/TGUI/Renderers/CheckBoxRenderer.hpp tgui-1.0-1.2.0+mantic/include/TGUI/Renderers/CheckBoxRenderer.hpp --- tgui-1.0-1.1.0+mantic/include/TGUI/Renderers/CheckBoxRenderer.hpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/include/TGUI/Renderers/CheckBoxRenderer.hpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/include/TGUI/Renderers/ChildWindowRenderer.hpp tgui-1.0-1.2.0+mantic/include/TGUI/Renderers/ChildWindowRenderer.hpp --- tgui-1.0-1.1.0+mantic/include/TGUI/Renderers/ChildWindowRenderer.hpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/include/TGUI/Renderers/ChildWindowRenderer.hpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/include/TGUI/Renderers/ColorPickerRenderer.hpp tgui-1.0-1.2.0+mantic/include/TGUI/Renderers/ColorPickerRenderer.hpp --- tgui-1.0-1.1.0+mantic/include/TGUI/Renderers/ColorPickerRenderer.hpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/include/TGUI/Renderers/ColorPickerRenderer.hpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/include/TGUI/Renderers/ComboBoxRenderer.hpp tgui-1.0-1.2.0+mantic/include/TGUI/Renderers/ComboBoxRenderer.hpp --- tgui-1.0-1.1.0+mantic/include/TGUI/Renderers/ComboBoxRenderer.hpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/include/TGUI/Renderers/ComboBoxRenderer.hpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/include/TGUI/Renderers/EditBoxRenderer.hpp tgui-1.0-1.2.0+mantic/include/TGUI/Renderers/EditBoxRenderer.hpp --- tgui-1.0-1.1.0+mantic/include/TGUI/Renderers/EditBoxRenderer.hpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/include/TGUI/Renderers/EditBoxRenderer.hpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/include/TGUI/Renderers/FileDialogRenderer.hpp tgui-1.0-1.2.0+mantic/include/TGUI/Renderers/FileDialogRenderer.hpp --- tgui-1.0-1.1.0+mantic/include/TGUI/Renderers/FileDialogRenderer.hpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/include/TGUI/Renderers/FileDialogRenderer.hpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/include/TGUI/Renderers/GroupRenderer.hpp tgui-1.0-1.2.0+mantic/include/TGUI/Renderers/GroupRenderer.hpp --- tgui-1.0-1.1.0+mantic/include/TGUI/Renderers/GroupRenderer.hpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/include/TGUI/Renderers/GroupRenderer.hpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/include/TGUI/Renderers/KnobRenderer.hpp tgui-1.0-1.2.0+mantic/include/TGUI/Renderers/KnobRenderer.hpp --- tgui-1.0-1.1.0+mantic/include/TGUI/Renderers/KnobRenderer.hpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/include/TGUI/Renderers/KnobRenderer.hpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/include/TGUI/Renderers/LabelRenderer.hpp tgui-1.0-1.2.0+mantic/include/TGUI/Renderers/LabelRenderer.hpp --- tgui-1.0-1.1.0+mantic/include/TGUI/Renderers/LabelRenderer.hpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/include/TGUI/Renderers/LabelRenderer.hpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. @@ -168,7 +168,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /// @brief Returns the outline color of the text (used when TextOutlineThickness > 0) - /// @param Text outline color + /// @return Text outline color ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// TGUI_NODISCARD Color getTextOutlineColor() const; @@ -182,7 +182,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /// @brief Returns the thickness of the text outline - /// @param Text outline thickness + /// @return Text outline thickness ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// TGUI_NODISCARD float getTextOutlineThickness() const; diff -Nru tgui-1.0-1.1.0+mantic/include/TGUI/Renderers/ListBoxRenderer.hpp tgui-1.0-1.2.0+mantic/include/TGUI/Renderers/ListBoxRenderer.hpp --- tgui-1.0-1.1.0+mantic/include/TGUI/Renderers/ListBoxRenderer.hpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/include/TGUI/Renderers/ListBoxRenderer.hpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/include/TGUI/Renderers/ListViewRenderer.hpp tgui-1.0-1.2.0+mantic/include/TGUI/Renderers/ListViewRenderer.hpp --- tgui-1.0-1.1.0+mantic/include/TGUI/Renderers/ListViewRenderer.hpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/include/TGUI/Renderers/ListViewRenderer.hpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/include/TGUI/Renderers/MenuBarRenderer.hpp tgui-1.0-1.2.0+mantic/include/TGUI/Renderers/MenuBarRenderer.hpp --- tgui-1.0-1.1.0+mantic/include/TGUI/Renderers/MenuBarRenderer.hpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/include/TGUI/Renderers/MenuBarRenderer.hpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/include/TGUI/Renderers/MessageBoxRenderer.hpp tgui-1.0-1.2.0+mantic/include/TGUI/Renderers/MessageBoxRenderer.hpp --- tgui-1.0-1.1.0+mantic/include/TGUI/Renderers/MessageBoxRenderer.hpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/include/TGUI/Renderers/MessageBoxRenderer.hpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/include/TGUI/Renderers/PanelListBoxRenderer.hpp tgui-1.0-1.2.0+mantic/include/TGUI/Renderers/PanelListBoxRenderer.hpp --- tgui-1.0-1.1.0+mantic/include/TGUI/Renderers/PanelListBoxRenderer.hpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/include/TGUI/Renderers/PanelListBoxRenderer.hpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. @@ -78,7 +78,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /// @brief Changes the background color of the selected item /// - /// @param backgroundColor The new selected item background color + /// @param itemsBackgroundColor The new selected item background color /// ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// void setSelectedItemsBackgroundColor(Color itemsBackgroundColor); diff -Nru tgui-1.0-1.1.0+mantic/include/TGUI/Renderers/PanelRenderer.hpp tgui-1.0-1.2.0+mantic/include/TGUI/Renderers/PanelRenderer.hpp --- tgui-1.0-1.1.0+mantic/include/TGUI/Renderers/PanelRenderer.hpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/include/TGUI/Renderers/PanelRenderer.hpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/include/TGUI/Renderers/PictureRenderer.hpp tgui-1.0-1.2.0+mantic/include/TGUI/Renderers/PictureRenderer.hpp --- tgui-1.0-1.1.0+mantic/include/TGUI/Renderers/PictureRenderer.hpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/include/TGUI/Renderers/PictureRenderer.hpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/include/TGUI/Renderers/ProgressBarRenderer.hpp tgui-1.0-1.2.0+mantic/include/TGUI/Renderers/ProgressBarRenderer.hpp --- tgui-1.0-1.1.0+mantic/include/TGUI/Renderers/ProgressBarRenderer.hpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/include/TGUI/Renderers/ProgressBarRenderer.hpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. @@ -224,7 +224,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /// @brief Returns the outline color of the text (used when TextOutlineThickness > 0) - /// @param Text outline color + /// @return Text outline color /// @since TGUI 1.1 ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// TGUI_NODISCARD Color getTextOutlineColor() const; @@ -240,7 +240,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /// @brief Returns the thickness of the text outline - /// @param Text outline thickness + /// @return Text outline thickness /// @since TGUI 1.1 ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// TGUI_NODISCARD float getTextOutlineThickness() const; diff -Nru tgui-1.0-1.1.0+mantic/include/TGUI/Renderers/RadioButtonRenderer.hpp tgui-1.0-1.2.0+mantic/include/TGUI/Renderers/RadioButtonRenderer.hpp --- tgui-1.0-1.1.0+mantic/include/TGUI/Renderers/RadioButtonRenderer.hpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/include/TGUI/Renderers/RadioButtonRenderer.hpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/include/TGUI/Renderers/RangeSliderRenderer.hpp tgui-1.0-1.2.0+mantic/include/TGUI/Renderers/RangeSliderRenderer.hpp --- tgui-1.0-1.1.0+mantic/include/TGUI/Renderers/RangeSliderRenderer.hpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/include/TGUI/Renderers/RangeSliderRenderer.hpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/include/TGUI/Renderers/ScrollablePanelRenderer.hpp tgui-1.0-1.2.0+mantic/include/TGUI/Renderers/ScrollablePanelRenderer.hpp --- tgui-1.0-1.1.0+mantic/include/TGUI/Renderers/ScrollablePanelRenderer.hpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/include/TGUI/Renderers/ScrollablePanelRenderer.hpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/include/TGUI/Renderers/ScrollbarRenderer.hpp tgui-1.0-1.2.0+mantic/include/TGUI/Renderers/ScrollbarRenderer.hpp --- tgui-1.0-1.1.0+mantic/include/TGUI/Renderers/ScrollbarRenderer.hpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/include/TGUI/Renderers/ScrollbarRenderer.hpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/include/TGUI/Renderers/SeparatorLineRenderer.hpp tgui-1.0-1.2.0+mantic/include/TGUI/Renderers/SeparatorLineRenderer.hpp --- tgui-1.0-1.1.0+mantic/include/TGUI/Renderers/SeparatorLineRenderer.hpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/include/TGUI/Renderers/SeparatorLineRenderer.hpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. @@ -49,7 +49,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /// @brief Returns the color of the line - /// @param Line color + /// @return Line color ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// TGUI_NODISCARD Color getColor() const; diff -Nru tgui-1.0-1.1.0+mantic/include/TGUI/Renderers/SliderRenderer.hpp tgui-1.0-1.2.0+mantic/include/TGUI/Renderers/SliderRenderer.hpp --- tgui-1.0-1.1.0+mantic/include/TGUI/Renderers/SliderRenderer.hpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/include/TGUI/Renderers/SliderRenderer.hpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/include/TGUI/Renderers/SpinButtonRenderer.hpp tgui-1.0-1.2.0+mantic/include/TGUI/Renderers/SpinButtonRenderer.hpp --- tgui-1.0-1.1.0+mantic/include/TGUI/Renderers/SpinButtonRenderer.hpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/include/TGUI/Renderers/SpinButtonRenderer.hpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/include/TGUI/Renderers/TabsRenderer.hpp tgui-1.0-1.2.0+mantic/include/TGUI/Renderers/TabsRenderer.hpp --- tgui-1.0-1.1.0+mantic/include/TGUI/Renderers/TabsRenderer.hpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/include/TGUI/Renderers/TabsRenderer.hpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/include/TGUI/Renderers/TextAreaRenderer.hpp tgui-1.0-1.2.0+mantic/include/TGUI/Renderers/TextAreaRenderer.hpp --- tgui-1.0-1.1.0+mantic/include/TGUI/Renderers/TextAreaRenderer.hpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/include/TGUI/Renderers/TextAreaRenderer.hpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/include/TGUI/Renderers/TextBoxRenderer.hpp tgui-1.0-1.2.0+mantic/include/TGUI/Renderers/TextBoxRenderer.hpp --- tgui-1.0-1.1.0+mantic/include/TGUI/Renderers/TextBoxRenderer.hpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/include/TGUI/Renderers/TextBoxRenderer.hpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/include/TGUI/Renderers/TreeViewRenderer.hpp tgui-1.0-1.2.0+mantic/include/TGUI/Renderers/TreeViewRenderer.hpp --- tgui-1.0-1.1.0+mantic/include/TGUI/Renderers/TreeViewRenderer.hpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/include/TGUI/Renderers/TreeViewRenderer.hpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/include/TGUI/Renderers/WidgetRenderer.hpp tgui-1.0-1.2.0+mantic/include/TGUI/Renderers/WidgetRenderer.hpp --- tgui-1.0-1.1.0+mantic/include/TGUI/Renderers/WidgetRenderer.hpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/include/TGUI/Renderers/WidgetRenderer.hpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/include/TGUI/Signal.hpp tgui-1.0-1.2.0+mantic/include/TGUI/Signal.hpp --- tgui-1.0-1.1.0+mantic/include/TGUI/Signal.hpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/include/TGUI/Signal.hpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. @@ -154,7 +154,7 @@ /// /// @return Unique id of the connection ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - template , const String&)>>::value>* = nullptr> + template &, const String&)>>::value>* = nullptr> unsigned int connectEx(const Func& func, const BoundArgs&... args) { // The name is copied so that the lambda does not depend on the 'this' pointer @@ -696,7 +696,7 @@ return connect(func, args...); } - + ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /// @brief Connects a signal handler that will be called when this signal is emitted /// @@ -726,7 +726,7 @@ return Signal::connect([=] { invokeFunc(func, args..., dereferenceParam(1)); }); } - + ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /// @brief Connects a signal handler that will be called when this signal is emitted /// @@ -741,7 +741,7 @@ return Signal::connect([=] { invokeFunc(func, args..., dereferencePanel()); }); } - + ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /// @brief Connects a signal handler that will be called when this signal is emitted /// @@ -771,7 +771,7 @@ return Signal::connect([=] { invokeFunc(func, args..., dereferenceParam(1), dereferencePanel()); }); } - + ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /// @brief Connects a signal handler that will be called when this signal is emitted /// @@ -801,7 +801,7 @@ return Signal::connect([=] { invokeFunc(func, args..., dereferenceParam(1), dereferencePanel(), dereferenceParam(3)); }); } - + ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /// @brief Call all connected signal handlers /// @@ -817,7 +817,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// private: - + ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /// @brief Turns the void* parameter back into the std::shared_ptr right before calling the callback function ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// diff -Nru tgui-1.0-1.1.0+mantic/include/TGUI/SignalManager.hpp tgui-1.0-1.2.0+mantic/include/TGUI/SignalManager.hpp --- tgui-1.0-1.1.0+mantic/include/TGUI/SignalManager.hpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/include/TGUI/SignalManager.hpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/include/TGUI/Sprite.hpp tgui-1.0-1.2.0+mantic/include/TGUI/Sprite.hpp --- tgui-1.0-1.1.0+mantic/include/TGUI/Sprite.hpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/include/TGUI/Sprite.hpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/include/TGUI/String.hpp tgui-1.0-1.2.0+mantic/include/TGUI/String.hpp --- tgui-1.0-1.1.0+mantic/include/TGUI/String.hpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/include/TGUI/String.hpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. @@ -236,6 +236,8 @@ /// @param substring Characters to compare against the first part of the string /// /// @return Does the first part of the string match the given substring? + /// + /// @deprecated Replaced by starts_with in TGUI 1.0 ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// TGUI_DEPRECATED("Use starts_with instead") TGUI_NODISCARD bool startsWith(const String& substring) const; #endif @@ -256,6 +258,8 @@ /// @param substring Characters to compare against the final part of the string /// /// @return Does the back of the string match the given substring? + /// + /// @deprecated Replaced by ends_with in TGUI 1.0 ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// TGUI_DEPRECATED("Use ends_with instead") TGUI_NODISCARD bool endsWith(const String& substring) const; #endif diff -Nru tgui-1.0-1.1.0+mantic/include/TGUI/StringView.hpp tgui-1.0-1.2.0+mantic/include/TGUI/StringView.hpp --- tgui-1.0-1.1.0+mantic/include/TGUI/StringView.hpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/include/TGUI/StringView.hpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/include/TGUI/SubwidgetContainer.hpp tgui-1.0-1.2.0+mantic/include/TGUI/SubwidgetContainer.hpp --- tgui-1.0-1.1.0+mantic/include/TGUI/SubwidgetContainer.hpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/include/TGUI/SubwidgetContainer.hpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/include/TGUI/SvgImage.hpp tgui-1.0-1.2.0+mantic/include/TGUI/SvgImage.hpp --- tgui-1.0-1.1.0+mantic/include/TGUI/SvgImage.hpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/include/TGUI/SvgImage.hpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/include/TGUI/TGUI.hpp tgui-1.0-1.2.0+mantic/include/TGUI/TGUI.hpp --- tgui-1.0-1.1.0+mantic/include/TGUI/TGUI.hpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/include/TGUI/TGUI.hpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/include/TGUI/Text.hpp tgui-1.0-1.2.0+mantic/include/TGUI/Text.hpp --- tgui-1.0-1.1.0+mantic/include/TGUI/Text.hpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/include/TGUI/Text.hpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. @@ -131,8 +131,6 @@ /// @param maxWidth Maximum width of the text /// @param lines Existing lines that need to be split if they are too long /// @param font Font of the text - /// @param textSize The text size - /// @param bold Should the text be bold? /// /// @return Lines of text pieces (either the same as the input or more lines when some were split) ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// diff -Nru tgui-1.0-1.1.0+mantic/include/TGUI/TextStyle.hpp tgui-1.0-1.2.0+mantic/include/TGUI/TextStyle.hpp --- tgui-1.0-1.1.0+mantic/include/TGUI/TextStyle.hpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/include/TGUI/TextStyle.hpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/include/TGUI/Texture.hpp tgui-1.0-1.2.0+mantic/include/TGUI/Texture.hpp --- tgui-1.0-1.1.0+mantic/include/TGUI/Texture.hpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/include/TGUI/Texture.hpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. @@ -113,6 +113,9 @@ /// The texture will be copied, you do not have to keep the sf::Texture alive after calling this function. /// /// This constructor just calls the corresponding load function. + /// + /// @deprecated Replaced by using Texture() and loadFromPixelData(texture.getSize(), texture.copyToImage().getPixelsPtr()) + /// in TGUI 1.1 to make it more clear that this is a memory-intensive constructor that should be avoided. ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// TGUI_DEPRECATED("Use Texture() and loadFromPixelData(texture.getSize(), texture.copyToImage().getPixelsPtr()) instead") Texture(const sf::Texture& texture, @@ -170,6 +173,9 @@ /// The texture will be copied, you do not have to keep the sf::Texture alive after calling this function. /// /// @throw Exception when loading failed + /// + /// @deprecated Replaced by loadFromPixelData(texture.getSize(), texture.copyToImage().getPixelsPtr()) in TGUI 1.1 to + /// make it more clear that this is a memory-intensive function that should be avoided. ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// TGUI_DEPRECATED("Use loadFromPixelData(texture.getSize(), texture.copyToImage().getPixelsPtr()) instead") void load(const sf::Texture& texture, @@ -298,6 +304,8 @@ /// @brief Sets the middle part of the image for 9-slice scaling (relative to the part defined by partRect) /// /// @param middleRect Middle rect of the texture + /// + /// @since TGUI 1.1 ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// void setMiddleRect(const UIntRect& middleRect); diff -Nru tgui-1.0-1.1.0+mantic/include/TGUI/TextureData.hpp tgui-1.0-1.2.0+mantic/include/TGUI/TextureData.hpp --- tgui-1.0-1.1.0+mantic/include/TGUI/TextureData.hpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/include/TGUI/TextureData.hpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/include/TGUI/TextureManager.hpp tgui-1.0-1.2.0+mantic/include/TGUI/TextureManager.hpp --- tgui-1.0-1.1.0+mantic/include/TGUI/TextureManager.hpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/include/TGUI/TextureManager.hpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/include/TGUI/Timer.hpp tgui-1.0-1.2.0+mantic/include/TGUI/Timer.hpp --- tgui-1.0-1.1.0+mantic/include/TGUI/Timer.hpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/include/TGUI/Timer.hpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/include/TGUI/ToolTip.hpp tgui-1.0-1.2.0+mantic/include/TGUI/ToolTip.hpp --- tgui-1.0-1.1.0+mantic/include/TGUI/ToolTip.hpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/include/TGUI/ToolTip.hpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/include/TGUI/Transform.hpp tgui-1.0-1.2.0+mantic/include/TGUI/Transform.hpp --- tgui-1.0-1.1.0+mantic/include/TGUI/Transform.hpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/include/TGUI/Transform.hpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/include/TGUI/TwoFingerScrollDetect.hpp tgui-1.0-1.2.0+mantic/include/TGUI/TwoFingerScrollDetect.hpp --- tgui-1.0-1.1.0+mantic/include/TGUI/TwoFingerScrollDetect.hpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/include/TGUI/TwoFingerScrollDetect.hpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/include/TGUI/Utf.hpp tgui-1.0-1.2.0+mantic/include/TGUI/Utf.hpp --- tgui-1.0-1.1.0+mantic/include/TGUI/Utf.hpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/include/TGUI/Utf.hpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/include/TGUI/Variant.hpp tgui-1.0-1.2.0+mantic/include/TGUI/Variant.hpp --- tgui-1.0-1.1.0+mantic/include/TGUI/Variant.hpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/include/TGUI/Variant.hpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/include/TGUI/Vector2.hpp tgui-1.0-1.2.0+mantic/include/TGUI/Vector2.hpp --- tgui-1.0-1.1.0+mantic/include/TGUI/Vector2.hpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/include/TGUI/Vector2.hpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/include/TGUI/Vertex.hpp tgui-1.0-1.2.0+mantic/include/TGUI/Vertex.hpp --- tgui-1.0-1.1.0+mantic/include/TGUI/Vertex.hpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/include/TGUI/Vertex.hpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/include/TGUI/Widget.hpp tgui-1.0-1.2.0+mantic/include/TGUI/Widget.hpp --- tgui-1.0-1.1.0+mantic/include/TGUI/Widget.hpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/include/TGUI/Widget.hpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. @@ -297,7 +297,7 @@ TGUI_NODISCARD virtual Vector2f getWidgetOffset() const; ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - /// @param Sets how the position is determined compared to the other widgets in the parent + /// @brief Sets how the position is determined compared to the other widgets in the parent /// /// @param layout Alignment for how to position the widget in its parent /// @@ -306,7 +306,7 @@ void setAutoLayout(AutoLayout layout); ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - /// @param Returns how the position is determined compared to the other widgets in the parent + /// @brief Returns how the position is determined compared to the other widgets in the parent /// /// @return Alignment for how to position the widget in its parent /// @@ -359,8 +359,6 @@ /// /// The origin of the scaling is set with the setOrigin function. If you want to use a separate origin for position /// and scale then you can use the setScale(Vector2f,Vector2f) function to pass a scaling origin. - /// - /// @warning This functionality is still experimental, it will not work perfectly for all widgets. ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// void setScale(Vector2f scaleFactors); @@ -374,8 +372,6 @@ /// of (3,2) will appear on the screen as a (150, 40) widget with its entire contents stretched. /// /// In the origin the x and y value 0 represent the left/top of the widget while 1 represents right/bottom - /// - /// @warning This functionality is still experimental, it will not work perfectly for all widgets. ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// void setScale(Vector2f scaleFactors, Vector2f origin); @@ -389,8 +385,6 @@ /// /// The origin of the scaling is set with the setOrigin function. If you want to use a separate origin for position /// and scale then you can use the setScale(float,Vector2f) function to pass a scaling origin. - /// - /// @warning This functionality is still experimental, it will not work perfectly for all widgets. ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// void setScale(float scaleFactor) { @@ -407,8 +401,6 @@ /// of 2 will appear on the screen as a (100, 40) widget with its entire contents stretched. /// /// In the origin the x and y value 0 represent the left/top of the widget while 1 represents right/bottom - /// - /// @warning This functionality is still experimental, it will not work perfectly for all widgets. ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// void setScale(float scaleFactor, Vector2f origin) { @@ -898,12 +890,6 @@ TGUI_NODISCARD bool isContainer() const; ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - /// @brief Returns whether the widget has something to drag (e.g. slider or scrollbar thumbs) - /// @return Should the widget receive mouse move events even when the mouse left it after the mouse went down on it? - ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - TGUI_NODISCARD bool isDraggableWidget() const; - - ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /// @brief Returns whether the left mouse button has been pressed on top of the widget /// @return Is the left mouse button being pressed on top of the widget ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// diff -Nru tgui-1.0-1.1.0+mantic/include/TGUI/Widgets/BitmapButton.hpp tgui-1.0-1.2.0+mantic/include/TGUI/Widgets/BitmapButton.hpp --- tgui-1.0-1.1.0+mantic/include/TGUI/Widgets/BitmapButton.hpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/include/TGUI/Widgets/BitmapButton.hpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/include/TGUI/Widgets/BoxLayout.hpp tgui-1.0-1.2.0+mantic/include/TGUI/Widgets/BoxLayout.hpp --- tgui-1.0-1.1.0+mantic/include/TGUI/Widgets/BoxLayout.hpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/include/TGUI/Widgets/BoxLayout.hpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/include/TGUI/Widgets/BoxLayoutRatios.hpp tgui-1.0-1.2.0+mantic/include/TGUI/Widgets/BoxLayoutRatios.hpp --- tgui-1.0-1.1.0+mantic/include/TGUI/Widgets/BoxLayoutRatios.hpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/include/TGUI/Widgets/BoxLayoutRatios.hpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/include/TGUI/Widgets/Button.hpp tgui-1.0-1.2.0+mantic/include/TGUI/Widgets/Button.hpp --- tgui-1.0-1.1.0+mantic/include/TGUI/Widgets/Button.hpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/include/TGUI/Widgets/Button.hpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/include/TGUI/Widgets/ButtonBase.hpp tgui-1.0-1.2.0+mantic/include/TGUI/Widgets/ButtonBase.hpp --- tgui-1.0-1.1.0+mantic/include/TGUI/Widgets/ButtonBase.hpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/include/TGUI/Widgets/ButtonBase.hpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/include/TGUI/Widgets/CanvasBase.hpp tgui-1.0-1.2.0+mantic/include/TGUI/Widgets/CanvasBase.hpp --- tgui-1.0-1.1.0+mantic/include/TGUI/Widgets/CanvasBase.hpp 1970-01-01 00:00:00.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/include/TGUI/Widgets/CanvasBase.hpp 2024-03-23 12:27:01.000000000 +0000 @@ -0,0 +1,105 @@ +///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +// +// TGUI - Texus' Graphical User Interface +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) +// +// 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 TGUI_CANVAS_BASE_HPP +#define TGUI_CANVAS_BASE_HPP + +#include + +///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +TGUI_MODULE_EXPORT namespace tgui +{ + ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + /// This class is used as base class for the backend-specific canvas widgets + ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + class TGUI_API CanvasBase : public ClickableWidget + { + public: + + using Ptr = std::shared_ptr; //!< Shared widget pointer + using ConstPtr = std::shared_ptr; //!< Shared constant widget pointer + + ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + /// @internal + /// @brief Constructor + /// @param typeName Type of the widget + /// @param initRenderer Should the renderer be initialized? Should be true unless a derived class initializes it. + ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + CanvasBase(const char* typeName, bool initRenderer); + + ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + /// @brief Sets whether the widget should completely ignore mouse events and let them pass to the widgets behind it + /// + /// @param ignore Should mouse events be ignored by this widget? + /// + /// By default, mouse events are NOT ignored. + ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + void ignoreMouseEvents(bool ignore = true); + + ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + /// @brief Returns whether the widget is ignoring mouse events and letting them pass to the widgets behind it + /// + /// @return Are mouse events ignored by this widget? + ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + TGUI_NODISCARD bool isIgnoringMouseEvents() const; + + ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + /// @brief Returns whether the widget can gain focus + /// @return Can the widget be focused? + /// + /// This function returns false for Canvas widgets. + ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + TGUI_NODISCARD bool canGainFocus() const override; + + ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + /// @brief Returns whether the mouse position (which is relative to the parent widget) lies on top of the widget + /// @return Is the mouse on top of the widget? + ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + TGUI_NODISCARD bool isMouseOnWidget(Vector2f pos) const override; + + ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + protected: + + ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + /// @brief Saves the widget as a tree node in order to save it to a file + ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + TGUI_NODISCARD std::unique_ptr save(SavingRenderersMap& renderers) const override; + + ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + /// @brief Loads the widget from a tree of nodes + ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + void load(const std::unique_ptr& node, const LoadingRenderersMap& renderers) override; + + ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + private: + + bool m_ignoringMouseEvents = false; + }; +} + +///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +#endif // TGUI_CANVAS_BASE_HPP diff -Nru tgui-1.0-1.1.0+mantic/include/TGUI/Widgets/ChatBox.hpp tgui-1.0-1.2.0+mantic/include/TGUI/Widgets/ChatBox.hpp --- tgui-1.0-1.1.0+mantic/include/TGUI/Widgets/ChatBox.hpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/include/TGUI/Widgets/ChatBox.hpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/include/TGUI/Widgets/CheckBox.hpp tgui-1.0-1.2.0+mantic/include/TGUI/Widgets/CheckBox.hpp --- tgui-1.0-1.1.0+mantic/include/TGUI/Widgets/CheckBox.hpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/include/TGUI/Widgets/CheckBox.hpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/include/TGUI/Widgets/ChildWindow.hpp tgui-1.0-1.2.0+mantic/include/TGUI/Widgets/ChildWindow.hpp --- tgui-1.0-1.1.0+mantic/include/TGUI/Widgets/ChildWindow.hpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/include/TGUI/Widgets/ChildWindow.hpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/include/TGUI/Widgets/ClickableWidget.hpp tgui-1.0-1.2.0+mantic/include/TGUI/Widgets/ClickableWidget.hpp --- tgui-1.0-1.1.0+mantic/include/TGUI/Widgets/ClickableWidget.hpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/include/TGUI/Widgets/ClickableWidget.hpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/include/TGUI/Widgets/ColorPicker.hpp tgui-1.0-1.2.0+mantic/include/TGUI/Widgets/ColorPicker.hpp --- tgui-1.0-1.1.0+mantic/include/TGUI/Widgets/ColorPicker.hpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/include/TGUI/Widgets/ColorPicker.hpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. @@ -96,10 +96,9 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /// @brief Makes a copy of another color picker /// - /// @param messageBox The other color picker + /// @param colorPicker The other color picker /// /// @return The new color picker - /// ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// TGUI_NODISCARD static ColorPicker::Ptr copy(const ColorPicker::ConstPtr& colorPicker); diff -Nru tgui-1.0-1.1.0+mantic/include/TGUI/Widgets/ComboBox.hpp tgui-1.0-1.2.0+mantic/include/TGUI/Widgets/ComboBox.hpp --- tgui-1.0-1.1.0+mantic/include/TGUI/Widgets/ComboBox.hpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/include/TGUI/Widgets/ComboBox.hpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/include/TGUI/Widgets/EditBox.hpp tgui-1.0-1.2.0+mantic/include/TGUI/Widgets/EditBox.hpp --- tgui-1.0-1.1.0+mantic/include/TGUI/Widgets/EditBox.hpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/include/TGUI/Widgets/EditBox.hpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. @@ -562,6 +562,14 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + /// @brief Emits the onReturnOrUnfocus signal. + /// + /// @param text The text to emit with the signal. + ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + void emitReturnOrUnfocus(const String& text); + + + ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// private: ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// @@ -697,6 +705,13 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + private: + + // Used to prevent emitting onReturnOrUnfocus twice when unfocusing the edit box inside the callback function. + bool m_onReturnOrUnfocusEmitted = false; + + + ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// }; ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// diff -Nru tgui-1.0-1.1.0+mantic/include/TGUI/Widgets/FileDialog.hpp tgui-1.0-1.2.0+mantic/include/TGUI/Widgets/FileDialog.hpp --- tgui-1.0-1.1.0+mantic/include/TGUI/Widgets/FileDialog.hpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/include/TGUI/Widgets/FileDialog.hpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/include/TGUI/Widgets/Grid.hpp tgui-1.0-1.2.0+mantic/include/TGUI/Widgets/Grid.hpp --- tgui-1.0-1.1.0+mantic/include/TGUI/Widgets/Grid.hpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/include/TGUI/Widgets/Grid.hpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/include/TGUI/Widgets/Group.hpp tgui-1.0-1.2.0+mantic/include/TGUI/Widgets/Group.hpp --- tgui-1.0-1.1.0+mantic/include/TGUI/Widgets/Group.hpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/include/TGUI/Widgets/Group.hpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/include/TGUI/Widgets/HorizontalLayout.hpp tgui-1.0-1.2.0+mantic/include/TGUI/Widgets/HorizontalLayout.hpp --- tgui-1.0-1.1.0+mantic/include/TGUI/Widgets/HorizontalLayout.hpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/include/TGUI/Widgets/HorizontalLayout.hpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/include/TGUI/Widgets/HorizontalWrap.hpp tgui-1.0-1.2.0+mantic/include/TGUI/Widgets/HorizontalWrap.hpp --- tgui-1.0-1.1.0+mantic/include/TGUI/Widgets/HorizontalWrap.hpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/include/TGUI/Widgets/HorizontalWrap.hpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus's Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/include/TGUI/Widgets/Knob.hpp tgui-1.0-1.2.0+mantic/include/TGUI/Widgets/Knob.hpp --- tgui-1.0-1.1.0+mantic/include/TGUI/Widgets/Knob.hpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/include/TGUI/Widgets/Knob.hpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/include/TGUI/Widgets/Label.hpp tgui-1.0-1.2.0+mantic/include/TGUI/Widgets/Label.hpp --- tgui-1.0-1.1.0+mantic/include/TGUI/Widgets/Label.hpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/include/TGUI/Widgets/Label.hpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/include/TGUI/Widgets/ListBox.hpp tgui-1.0-1.2.0+mantic/include/TGUI/Widgets/ListBox.hpp --- tgui-1.0-1.1.0+mantic/include/TGUI/Widgets/ListBox.hpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/include/TGUI/Widgets/ListBox.hpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/include/TGUI/Widgets/ListView.hpp tgui-1.0-1.2.0+mantic/include/TGUI/Widgets/ListView.hpp --- tgui-1.0-1.1.0+mantic/include/TGUI/Widgets/ListView.hpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/include/TGUI/Widgets/ListView.hpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. @@ -186,6 +186,8 @@ /// @return Width of the column prior to expanding the column and prior to the user resizing it /// /// @see getColumnWidth + /// + /// @since TGUI 1.1 ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// TGUI_NODISCARD float getColumnDesignWidth(std::size_t index) const; @@ -209,8 +211,8 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /// @brief Changes whether the column width depends on the widest item added to that column /// - /// @param index Index of the column to change - /// @param expand Should the column's width expand to make it fill the list view when the list view isn't full yet? + /// @param index Index of the column to change + /// @param autoResize Should the column's width expand and shrink when the widest item in the column changes? /// /// If auto-resize is true then the width specified in addColumn and setColumnWidth will act as the minimum width. /// If the width was set to 0 then the minimum width is the width of the header caption. @@ -223,11 +225,11 @@ void setColumnAutoResize(std::size_t index, bool autoResize); ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - /// @brief Returns whether the column is expanded to fill the list view (if all columns fit inside the list view) + /// @brief Returns whether the column width depends on the widest item added to that column /// /// @param index Index of the column /// - /// @return Is the column is expanded to make it fill the list view when the list view isn't full yet? + /// @return Does the column's width expand and shrink when the widest item in the column changes? /// /// @since TGUI 1.1 ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// @@ -682,6 +684,8 @@ /// @brief Changes whether the last column is expanded to fill the list view (if all columns fit inside the list view) /// /// @param expand Make the last column larger to make it fill the list view when it isn't full yet? + /// + /// @deprecated Replaced by setColumnAutoExpanded and setColumnAutoResize in TGUI 1.1 ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// TGUI_DEPRECATED("Use setColumnAutoExpanded and setColumnAutoResize instead") void setExpandLastColumn(bool expand); @@ -689,6 +693,8 @@ /// @brief Returns whether the last column is expanded to fill the list view (if all columns fit inside the list view) /// /// @return Is the last column larger to make it fill the list view when the list view isn't full yet? + /// + /// @deprecated Replaced by ColumnAutoExpanded and ColumnAutoResize setters and getters in TGUI 1.1 ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// TGUI_DEPRECATED("Use ColumnAutoExpanded and ColumnAutoResize setters and getters instead") TGUI_NODISCARD bool getExpandLastColumn() const; diff -Nru tgui-1.0-1.1.0+mantic/include/TGUI/Widgets/MenuBar.hpp tgui-1.0-1.2.0+mantic/include/TGUI/Widgets/MenuBar.hpp --- tgui-1.0-1.1.0+mantic/include/TGUI/Widgets/MenuBar.hpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/include/TGUI/Widgets/MenuBar.hpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. @@ -286,8 +286,8 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /// @brief Changes the text of an existing menu item /// - /// @param menu Hierarchy of the menu items, starting with the menu and ending with menu item that is to be renamed - /// @param text The new text written on this menu item + /// @param hierarchy Hierarchy of the menu items, starting with the menu and ending with menu item that is to be renamed + /// @param text The new text written on this menu item /// /// @return True when the menu item was renamed, false when the menu item was not found /// @@ -469,7 +469,6 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - /// @internal /// @brief Returns the menus and their menu items, including submenus /// @return List of menus ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// diff -Nru tgui-1.0-1.1.0+mantic/include/TGUI/Widgets/MessageBox.hpp tgui-1.0-1.2.0+mantic/include/TGUI/Widgets/MessageBox.hpp --- tgui-1.0-1.1.0+mantic/include/TGUI/Widgets/MessageBox.hpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/include/TGUI/Widgets/MessageBox.hpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. @@ -227,7 +227,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /// @brief Changes where the label is located inside the window (left side, centered or right side) /// - /// @param buttonAlignment Alignment for the label + /// @param labelAlignment Alignment for the label /// /// The label is left aligned by default. ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// diff -Nru tgui-1.0-1.1.0+mantic/include/TGUI/Widgets/Panel.hpp tgui-1.0-1.2.0+mantic/include/TGUI/Widgets/Panel.hpp --- tgui-1.0-1.1.0+mantic/include/TGUI/Widgets/Panel.hpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/include/TGUI/Widgets/Panel.hpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. @@ -46,7 +46,6 @@ static constexpr const char StaticWidgetType[] = "Panel"; //!< Type name of the widget - ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /// @internal /// @brief Constructor @@ -56,29 +55,24 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// Panel(const char* typeName = StaticWidgetType, bool initRenderer = true); - ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /// @brief Creates a new panel widget /// /// @param size Size of the panel /// /// @return The new panel - /// ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// TGUI_NODISCARD static Panel::Ptr create(const Layout2d& size = {"100%", "100%"}); - ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /// @brief Makes a copy of another panel /// /// @param panel The other panel /// /// @return The new panel - /// ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// TGUI_NODISCARD static Panel::Ptr copy(const Panel::ConstPtr& panel); - ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /// @brief Returns the renderer, which gives access to functions that determine how the widget is displayed /// @return Temporary pointer to the renderer that may be shared with other widgets using the same renderer @@ -93,39 +87,32 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// TGUI_NODISCARD PanelRenderer* getRenderer() override; - ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /// @brief Changes the size of the panel /// /// @param size The new size of the panel - /// ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// void setSize(const Layout2d& size) override; using Widget::setSize; - ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /// @brief Returns the space available for widgets inside the container /// @return Size without borders and padding ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// TGUI_NODISCARD Vector2f getInnerSize() const override; - ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /// @brief Returns the distance between the position of the container and a widget that would be drawn inside /// this container on relative position (0,0) /// /// @return Offset of the widgets in the container - /// ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// TGUI_NODISCARD Vector2f getChildWidgetsOffset() const override; - ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /// @brief Returns whether the mouse position (which is relative to the parent widget) lies on top of the widget /// /// @return Is the mouse on top of the widget? - /// ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// TGUI_NODISCARD bool isMouseOnWidget(Vector2f pos) const override; @@ -154,7 +141,6 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// void rightMouseButtonNoLongerDown() override; - ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /// @brief Draw the widget to a render target /// @@ -164,6 +150,24 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// void draw(BackendRenderTarget& target, RenderStates states) const override; + ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + /// @brief Changes whether event bubbling is used for the mouse events + /// + /// @param useEventBubbling Should event bubbling be used when processing mouse events? + /// + /// When event bubbling is used, no click signals will be triggered in the panel when the mouse is on a child widget. + /// When disabled, the click event first triggers in the panel before being passed to the child widget. + /// + /// This is disabled by default for backwards compatibility. + ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + static void setEventBubbling(bool useEventBubbling); + + ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + /// @brief Returns whether event bubbling is used for the mouse events + /// + /// @return Is event bubbling used when processing mouse events? + ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + static bool getEventBubbling(); ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// protected: @@ -179,7 +183,6 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// TGUI_NODISCARD Signal& getSignal(String signalName) override; - ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /// @brief Function called when one of the properties of the renderer is changed /// @@ -188,19 +191,16 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// void rendererChanged(const String& property) override; - ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // This function is called every frame with the time passed since the last frame. ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// bool updateTime(Duration elapsedTime) override; - ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // Makes a copy of the widget ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// TGUI_NODISCARD Widget::Ptr clone() const override; - ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// public: @@ -213,10 +213,11 @@ SignalVector2f onRightMouseRelease = {"RightMouseReleased"}; //!< The right mouse button was released on top of the panel. Optional parameter: mouse position relative to panel SignalVector2f onRightClick = {"RightClicked"}; //!< The panel was right clicked. Optional parameter: mouse position relative to panel - ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// protected: + static bool m_eventBubbling; + // Cached renderer properties Borders m_bordersCached; Color m_borderColorCached; diff -Nru tgui-1.0-1.1.0+mantic/include/TGUI/Widgets/PanelListBox.hpp tgui-1.0-1.2.0+mantic/include/TGUI/Widgets/PanelListBox.hpp --- tgui-1.0-1.1.0+mantic/include/TGUI/Widgets/PanelListBox.hpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/include/TGUI/Widgets/PanelListBox.hpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. @@ -65,7 +65,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /// @brief Makes a copy of another panel list box - /// @param listBox The other list box + /// @param panelListBox The other list box /// @return The new list box ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// static Ptr copy(const ConstPtr& panelListBox); @@ -128,7 +128,7 @@ /// @param height The height of a single item in the list /// ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - void setItemsHeight(const Layout& height) const; + void setItemsHeight(const Layout& height); ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// @@ -384,7 +384,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /// @brief Returns whether the panel list box contains the given item /// - /// @param item The item to search for + /// @param panelPtr The item to search for /// /// @return Does the list box contain the item? ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// diff -Nru tgui-1.0-1.1.0+mantic/include/TGUI/Widgets/Picture.hpp tgui-1.0-1.2.0+mantic/include/TGUI/Widgets/Picture.hpp --- tgui-1.0-1.1.0+mantic/include/TGUI/Widgets/Picture.hpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/include/TGUI/Widgets/Picture.hpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/include/TGUI/Widgets/ProgressBar.hpp tgui-1.0-1.2.0+mantic/include/TGUI/Widgets/ProgressBar.hpp --- tgui-1.0-1.1.0+mantic/include/TGUI/Widgets/ProgressBar.hpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/include/TGUI/Widgets/ProgressBar.hpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/include/TGUI/Widgets/RadioButton.hpp tgui-1.0-1.2.0+mantic/include/TGUI/Widgets/RadioButton.hpp --- tgui-1.0-1.1.0+mantic/include/TGUI/Widgets/RadioButton.hpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/include/TGUI/Widgets/RadioButton.hpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/include/TGUI/Widgets/RadioButtonGroup.hpp tgui-1.0-1.2.0+mantic/include/TGUI/Widgets/RadioButtonGroup.hpp --- tgui-1.0-1.1.0+mantic/include/TGUI/Widgets/RadioButtonGroup.hpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/include/TGUI/Widgets/RadioButtonGroup.hpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/include/TGUI/Widgets/RangeSlider.hpp tgui-1.0-1.2.0+mantic/include/TGUI/Widgets/RangeSlider.hpp --- tgui-1.0-1.1.0+mantic/include/TGUI/Widgets/RangeSlider.hpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/include/TGUI/Widgets/RangeSlider.hpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/include/TGUI/Widgets/RichTextLabel.hpp tgui-1.0-1.2.0+mantic/include/TGUI/Widgets/RichTextLabel.hpp --- tgui-1.0-1.1.0+mantic/include/TGUI/Widgets/RichTextLabel.hpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/include/TGUI/Widgets/RichTextLabel.hpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. @@ -22,11 +22,9 @@ // ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - #ifndef TGUI_RICH_TEXT_LABEL_HPP #define TGUI_RICH_TEXT_LABEL_HPP - #include ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// @@ -56,7 +54,6 @@ static constexpr const char StaticWidgetType[] = "RichTextLabel"; //!< Type name of the widget - ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /// @internal /// @brief Constructor @@ -66,29 +63,24 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// RichTextLabel(const char* typeName = StaticWidgetType, bool initRenderer = true); - ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /// @brief Creates a new label widget /// /// @param text The text to display /// /// @return The new label - /// ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// TGUI_NODISCARD static RichTextLabel::Ptr create(const String& text = ""); - ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /// @brief Makes a copy of another label /// /// @param label The other label /// /// @return The new label - /// ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// TGUI_NODISCARD static RichTextLabel::Ptr copy(const RichTextLabel::ConstPtr& label); - ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /// @brief Draw the widget to a render target /// @@ -97,55 +89,53 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// void draw(BackendRenderTarget& target, RenderStates states) const override; - ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// protected: ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + /// @brief Helper function used by rearrangeText() to create the lines before word-wrapping is applied + /// + /// @param textPiecesLines Text pieces per line to be filled (a new piece is needed each time the text style changes) + /// @param images Image list to be filled (if the text contains image references) + /// + /// This function parses the contents of m_string and fills the textPiecesLines and images lists (which are empty when + /// the function is called). It can be overridden in a derived class to change how the parsing works (e.g. to use BBCode + /// instead of html tags). + ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + virtual void constructRichLineBlueprints(std::vector>& textPiecesLines, std::vector& images); + + ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /// @brief Function called when one of the properties of the renderer is changed /// /// @param property Name of the property that was changed - /// ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// void rendererChanged(const String& property) override; - ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /// @brief Rearrange the text (recreates m_textPieces), making use of the given size of maximum text width. ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// void rearrangeText() override; - ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // Helper function used by rearrangeText() to calculate the height of a single line ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// float calculateLineSpacing(const std::vector& line, float defaultLineSpacing); - ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // Helper function used by rearrangeText() to calculate the total height of all lines ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// float calculateTextHeight(const std::vector>& textPiecesLines, float defaultLineSpacing); - - ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - // Helper function used by rearrangeText() to create the lines before word-wrapping is applied - ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - void constructRichLineBlueprints(std::vector>& textPiecesLines, std::vector& images); - - ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // Makes a copy of the widget ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// TGUI_NODISCARD Widget::Ptr clone() const override; - ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// protected: std::vector m_images; - ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// }; diff -Nru tgui-1.0-1.1.0+mantic/include/TGUI/Widgets/ScrollablePanel.hpp tgui-1.0-1.2.0+mantic/include/TGUI/Widgets/ScrollablePanel.hpp --- tgui-1.0-1.1.0+mantic/include/TGUI/Widgets/ScrollablePanel.hpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/include/TGUI/Widgets/ScrollablePanel.hpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. @@ -323,13 +323,18 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - /// @brief Returns the leaf child widget that is located at the given position + /// @brief Returns the widget that is located at the given position /// - /// @param pos The location where the widget will be searched, relative to the container + /// @param pos The location where the widget will be searched, relative to the container + /// @param recursive If the widget at the position is a container, should the search continue inside it instead of just + /// returning the container? The child container may still be returned when recursive is true, but only + /// if none of its children are located at the searched position. /// /// @return Widget at the queried position, or nullptr when there is no widget at that location + /// + /// @since TGUI 1.2 ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - TGUI_NODISCARD Widget::Ptr getWidgetAtPosition(Vector2f pos) const override; + TGUI_NODISCARD Widget::Ptr getWidgetAtPos(Vector2f pos, bool recursive) const override; ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// diff -Nru tgui-1.0-1.1.0+mantic/include/TGUI/Widgets/Scrollbar.hpp tgui-1.0-1.2.0+mantic/include/TGUI/Widgets/Scrollbar.hpp --- tgui-1.0-1.1.0+mantic/include/TGUI/Widgets/Scrollbar.hpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/include/TGUI/Widgets/Scrollbar.hpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/include/TGUI/Widgets/SeparatorLine.hpp tgui-1.0-1.2.0+mantic/include/TGUI/Widgets/SeparatorLine.hpp --- tgui-1.0-1.1.0+mantic/include/TGUI/Widgets/SeparatorLine.hpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/include/TGUI/Widgets/SeparatorLine.hpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/include/TGUI/Widgets/Slider.hpp tgui-1.0-1.2.0+mantic/include/TGUI/Widgets/Slider.hpp --- tgui-1.0-1.1.0+mantic/include/TGUI/Widgets/Slider.hpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/include/TGUI/Widgets/Slider.hpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/include/TGUI/Widgets/SpinButton.hpp tgui-1.0-1.2.0+mantic/include/TGUI/Widgets/SpinButton.hpp --- tgui-1.0-1.1.0+mantic/include/TGUI/Widgets/SpinButton.hpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/include/TGUI/Widgets/SpinButton.hpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/include/TGUI/Widgets/SpinControl.hpp tgui-1.0-1.2.0+mantic/include/TGUI/Widgets/SpinControl.hpp --- tgui-1.0-1.1.0+mantic/include/TGUI/Widgets/SpinControl.hpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/include/TGUI/Widgets/SpinControl.hpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/include/TGUI/Widgets/TabContainer.hpp tgui-1.0-1.2.0+mantic/include/TGUI/Widgets/TabContainer.hpp --- tgui-1.0-1.1.0+mantic/include/TGUI/Widgets/TabContainer.hpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/include/TGUI/Widgets/TabContainer.hpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. @@ -58,8 +58,8 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// enum TabAlign { - Top = 0, //!< Tabs are above panes - Bottom = 1 << 0 //!< Tabs are below panes + Top = 0, //!< Tabs are above panels + Bottom = 1 << 0 //!< Tabs are below panels }; @@ -213,10 +213,11 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /// @brief Returns index of the specified panel /// - /// @param ptr Panel to find + /// @param panel Panel to find + /// /// @return Index of the specified panel or -1 if not found ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - TGUI_NODISCARD int getIndex(const Panel::Ptr& ptr); + TGUI_NODISCARD int getIndex(const Panel::Ptr& panel); ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// @@ -298,7 +299,7 @@ /// A value less than or equal to 0.0f sets the width of the tabs to the automatic width (tabs fill the TabContainer). /// A value greater than zero sets the width of the tabs to the specified value. /// - /// @param align New tab fixed size + /// @param fixedSize New tab fixed size ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// void setTabFixedSize(float fixedSize); diff -Nru tgui-1.0-1.1.0+mantic/include/TGUI/Widgets/Tabs.hpp tgui-1.0-1.2.0+mantic/include/TGUI/Widgets/Tabs.hpp --- tgui-1.0-1.1.0+mantic/include/TGUI/Widgets/Tabs.hpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/include/TGUI/Widgets/Tabs.hpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/include/TGUI/Widgets/TextArea.hpp tgui-1.0-1.2.0+mantic/include/TGUI/Widgets/TextArea.hpp --- tgui-1.0-1.1.0+mantic/include/TGUI/Widgets/TextArea.hpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/include/TGUI/Widgets/TextArea.hpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/include/TGUI/Widgets/ToggleButton.hpp tgui-1.0-1.2.0+mantic/include/TGUI/Widgets/ToggleButton.hpp --- tgui-1.0-1.1.0+mantic/include/TGUI/Widgets/ToggleButton.hpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/include/TGUI/Widgets/ToggleButton.hpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/include/TGUI/Widgets/TreeView.hpp tgui-1.0-1.2.0+mantic/include/TGUI/Widgets/TreeView.hpp --- tgui-1.0-1.1.0+mantic/include/TGUI/Widgets/TreeView.hpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/include/TGUI/Widgets/TreeView.hpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. @@ -48,10 +48,10 @@ static constexpr const char StaticWidgetType[] = "TreeView"; //!< Type name of the widget - /// @brief Read-only node representation used by getNodes + /// @brief Read-only node representation used by getNode and getNodes struct ConstNode { - bool expanded; + bool expanded = true; String text; std::vector nodes; }; @@ -159,6 +159,24 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + /// @brief Changes the text of a leaf item + /// + /// @param hierarchy Hierarchy of items, with the last item being the leaf item that should be renamed + /// @param leafText New text to put in the leaf item + /// + /// @return True when the item was renamed, false if no item matched with the given hierarchy + /// + /// Example code: + /// @code + /// treeView->changeItem({"Vehicles", "Whole", "Car"}, "Train"); // Changes the item to {"Vehicles", "Whole", "Train"} + /// @endcode + /// + /// @since TGUI 1.2 + ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + bool changeItem(const std::vector& hierarchy, const String& leafText); + + + ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /// @brief Expands the given item /// /// @param hierarchy Hierarchy of items, identifying the node that has to be expanded @@ -227,6 +245,21 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + /// @brief Returns the node in the tree view at a given hierarchy + /// + /// @param hierarchy Hierarchy of items, identifying the node to retrieve + /// + /// @return Node that was identified by the hierarchy + /// + /// If no node exists at the given hierarchy, the returned node will have an empty text and no children. + /// If the node was found, its text property will always match with the last element of the hierarchy. + /// + /// @since TGUI 1.2 + ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + TGUI_NODISCARD ConstNode getNode(const std::vector& hierarchy) const; + + + ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /// @brief Returns the nodes in the tree view /// @return List of nodes ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// @@ -353,7 +386,6 @@ void draw(BackendRenderTarget& target, RenderStates states) const override; - ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// protected: diff -Nru tgui-1.0-1.1.0+mantic/include/TGUI/Widgets/VerticalLayout.hpp tgui-1.0-1.2.0+mantic/include/TGUI/Widgets/VerticalLayout.hpp --- tgui-1.0-1.1.0+mantic/include/TGUI/Widgets/VerticalLayout.hpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/include/TGUI/Widgets/VerticalLayout.hpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/include/TGUI/WindowsIMM.hpp tgui-1.0-1.2.0+mantic/include/TGUI/WindowsIMM.hpp --- tgui-1.0-1.1.0+mantic/include/TGUI/WindowsIMM.hpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/include/TGUI/WindowsIMM.hpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/include/TGUI/extlibs/IncludeNanoSVG.hpp tgui-1.0-1.2.0+mantic/include/TGUI/extlibs/IncludeNanoSVG.hpp --- tgui-1.0-1.1.0+mantic/include/TGUI/extlibs/IncludeNanoSVG.hpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/include/TGUI/extlibs/IncludeNanoSVG.hpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/include/TGUI/extlibs/IncludeSDL.hpp tgui-1.0-1.2.0+mantic/include/TGUI/extlibs/IncludeSDL.hpp --- tgui-1.0-1.1.0+mantic/include/TGUI/extlibs/IncludeSDL.hpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/include/TGUI/extlibs/IncludeSDL.hpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. @@ -74,8 +74,6 @@ #define SDL_KMOD_SHIFT KMOD_SHIFT #define SDL_KMOD_LSHIFT KMOD_LSHIFT #define SDL_KMOD_RSHIFT KMOD_RSHIFT - - #define SDL_ENABLE_SYSWM_X11 SDL_VIDEO_DRIVER_X11 #endif #if SDL_MAJOR_VERSION < 2 diff -Nru tgui-1.0-1.1.0+mantic/include/TGUI/extlibs/IncludeStbImage.hpp tgui-1.0-1.2.0+mantic/include/TGUI/extlibs/IncludeStbImage.hpp --- tgui-1.0-1.1.0+mantic/include/TGUI/extlibs/IncludeStbImage.hpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/include/TGUI/extlibs/IncludeStbImage.hpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/include/TGUI/extlibs/IncludeStbImageWrite.hpp tgui-1.0-1.2.0+mantic/include/TGUI/extlibs/IncludeStbImageWrite.hpp --- tgui-1.0-1.1.0+mantic/include/TGUI/extlibs/IncludeStbImageWrite.hpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/include/TGUI/extlibs/IncludeStbImageWrite.hpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/include/TGUI/extlibs/IncludeWindows.hpp tgui-1.0-1.2.0+mantic/include/TGUI/extlibs/IncludeWindows.hpp --- tgui-1.0-1.1.0+mantic/include/TGUI/extlibs/IncludeWindows.hpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/include/TGUI/extlibs/IncludeWindows.hpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/license.txt tgui-1.0-1.2.0+mantic/license.txt --- tgui-1.0-1.1.0+mantic/license.txt 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/license.txt 2024-03-23 12:27:01.000000000 +0000 @@ -1,4 +1,4 @@ -Copyright (c) 2012-2023 Bruno Van de Velde - vdv_b@tgui.eu +Copyright (c) 2012-2024 Bruno Van de Velde - vdv_b@tgui.eu This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held diff -Nru tgui-1.0-1.1.0+mantic/src/Animation.cpp tgui-1.0-1.2.0+mantic/src/Animation.cpp --- tgui-1.0-1.1.0+mantic/src/Animation.cpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/src/Animation.cpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/src/Backend/CMakeLists.txt tgui-1.0-1.2.0+mantic/src/Backend/CMakeLists.txt --- tgui-1.0-1.1.0+mantic/src/Backend/CMakeLists.txt 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/src/Backend/CMakeLists.txt 2024-03-23 12:27:01.000000000 +0000 @@ -1,6 +1,6 @@ #################################################################################################### # TGUI - Texus' Graphical User Interface -# Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +# Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) # # 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. @@ -269,7 +269,7 @@ Backend/Renderer/OpenGL3/CanvasOpenGL3.cpp ) if (TGUI_BUILD_AS_CXX_MODULE) - tgui_create_module_from_sources("${new_tgui_backend_sources}" "tgui.backend.renderer.opengl3") + tgui_create_module_from_sources("${new_tgui_backend_sources}" "tgui.backend.renderer.opengl3" "tgui.opengl") target_sources(tgui PRIVATE FILE_SET tgui_cxx_module_files TYPE CXX_MODULES FILES "${module_source}") set(new_tgui_backend_sources "${module_source}") else() @@ -285,7 +285,7 @@ Backend/Renderer/GLES2/CanvasGLES2.cpp ) if (TGUI_BUILD_AS_CXX_MODULE) - tgui_create_module_from_sources("${new_tgui_backend_sources}" "tgui.backend.renderer.gles2") + tgui_create_module_from_sources("${new_tgui_backend_sources}" "tgui.backend.renderer.gles2" "tgui.opengl") target_sources(tgui PRIVATE FILE_SET tgui_cxx_module_files TYPE CXX_MODULES FILES "${module_source}") set(new_tgui_backend_sources "${module_source}") else() diff -Nru tgui-1.0-1.1.0+mantic/src/Backend/Font/BackendFont.cpp tgui-1.0-1.2.0+mantic/src/Backend/Font/BackendFont.cpp --- tgui-1.0-1.1.0+mantic/src/Backend/Font/BackendFont.cpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/src/Backend/Font/BackendFont.cpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/src/Backend/Font/FreeType/BackendFontFreeType.cpp tgui-1.0-1.2.0+mantic/src/Backend/Font/FreeType/BackendFontFreeType.cpp --- tgui-1.0-1.1.0+mantic/src/Backend/Font/FreeType/BackendFontFreeType.cpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/src/Backend/Font/FreeType/BackendFontFreeType.cpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. @@ -25,9 +25,7 @@ #include -#if TGUI_BUILD_AS_CXX_MODULE - import tgui; -#else +#if !TGUI_BUILD_AS_CXX_MODULE #include #endif diff -Nru tgui-1.0-1.1.0+mantic/src/Backend/Font/SDL_ttf/BackendFontSDLttf.cpp tgui-1.0-1.2.0+mantic/src/Backend/Font/SDL_ttf/BackendFontSDLttf.cpp --- tgui-1.0-1.1.0+mantic/src/Backend/Font/SDL_ttf/BackendFontSDLttf.cpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/src/Backend/Font/SDL_ttf/BackendFontSDLttf.cpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. @@ -25,9 +25,7 @@ #include -#if TGUI_BUILD_AS_CXX_MODULE - import tgui; -#else +#if !TGUI_BUILD_AS_CXX_MODULE #include #endif @@ -357,11 +355,11 @@ return nullptr; #if TGUI_USE_SDL3 - SDL_RWops* handle = SDL_RWFromConstMem(m_fileContents.get(), m_fileSize); + SDL_IOStream* handle = SDL_IOFromConstMem(m_fileContents.get(), m_fileSize); if (!handle) return nullptr; - auto font = TTF_OpenFontRW(handle, SDL_TRUE, static_cast(scaledTextSize)); + auto font = TTF_OpenFontIO(handle, SDL_TRUE, static_cast(scaledTextSize)); #else SDL_RWops* handle = SDL_RWFromConstMem(m_fileContents.get(), static_cast(m_fileSize)); if (!handle) diff -Nru tgui-1.0-1.1.0+mantic/src/Backend/Font/SFML-Graphics/BackendFontSFML.cpp tgui-1.0-1.2.0+mantic/src/Backend/Font/SFML-Graphics/BackendFontSFML.cpp --- tgui-1.0-1.1.0+mantic/src/Backend/Font/SFML-Graphics/BackendFontSFML.cpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/src/Backend/Font/SFML-Graphics/BackendFontSFML.cpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/src/Backend/GLFW-GLES2.cpp tgui-1.0-1.2.0+mantic/src/Backend/GLFW-GLES2.cpp --- tgui-1.0-1.1.0+mantic/src/Backend/GLFW-GLES2.cpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/src/Backend/GLFW-GLES2.cpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/src/Backend/GLFW-OpenGL3.cpp tgui-1.0-1.2.0+mantic/src/Backend/GLFW-OpenGL3.cpp --- tgui-1.0-1.1.0+mantic/src/Backend/GLFW-OpenGL3.cpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/src/Backend/GLFW-OpenGL3.cpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/src/Backend/Renderer/BackendRenderTarget.cpp tgui-1.0-1.2.0+mantic/src/Backend/Renderer/BackendRenderTarget.cpp --- tgui-1.0-1.1.0+mantic/src/Backend/Renderer/BackendRenderTarget.cpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/src/Backend/Renderer/BackendRenderTarget.cpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/src/Backend/Renderer/BackendText.cpp tgui-1.0-1.2.0+mantic/src/Backend/Renderer/BackendText.cpp --- tgui-1.0-1.1.0+mantic/src/Backend/Renderer/BackendText.cpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/src/Backend/Renderer/BackendText.cpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/src/Backend/Renderer/BackendTexture.cpp tgui-1.0-1.2.0+mantic/src/Backend/Renderer/BackendTexture.cpp --- tgui-1.0-1.1.0+mantic/src/Backend/Renderer/BackendTexture.cpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/src/Backend/Renderer/BackendTexture.cpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/src/Backend/Renderer/GLES2/BackendRenderTargetGLES2.cpp tgui-1.0-1.2.0+mantic/src/Backend/Renderer/GLES2/BackendRenderTargetGLES2.cpp --- tgui-1.0-1.1.0+mantic/src/Backend/Renderer/GLES2/BackendRenderTargetGLES2.cpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/src/Backend/Renderer/GLES2/BackendRenderTargetGLES2.cpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. @@ -22,13 +22,10 @@ // ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - #include #include -#if TGUI_BUILD_AS_CXX_MODULE - import tgui; -#else +#if !TGUI_BUILD_AS_CXX_MODULE #include #include #include diff -Nru tgui-1.0-1.1.0+mantic/src/Backend/Renderer/GLES2/BackendRendererGLES2.cpp tgui-1.0-1.2.0+mantic/src/Backend/Renderer/GLES2/BackendRendererGLES2.cpp --- tgui-1.0-1.1.0+mantic/src/Backend/Renderer/GLES2/BackendRendererGLES2.cpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/src/Backend/Renderer/GLES2/BackendRendererGLES2.cpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. @@ -22,14 +22,11 @@ // ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - #include #include #include -#if TGUI_BUILD_AS_CXX_MODULE - import tgui; -#else +#if !TGUI_BUILD_AS_CXX_MODULE #include #include #endif diff -Nru tgui-1.0-1.1.0+mantic/src/Backend/Renderer/GLES2/BackendTextureGLES2.cpp tgui-1.0-1.2.0+mantic/src/Backend/Renderer/GLES2/BackendTextureGLES2.cpp --- tgui-1.0-1.1.0+mantic/src/Backend/Renderer/GLES2/BackendTextureGLES2.cpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/src/Backend/Renderer/GLES2/BackendTextureGLES2.cpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. @@ -22,13 +22,10 @@ // ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - #include #include -#if TGUI_BUILD_AS_CXX_MODULE - import tgui; -#else +#if !TGUI_BUILD_AS_CXX_MODULE #include #endif diff -Nru tgui-1.0-1.1.0+mantic/src/Backend/Renderer/GLES2/CanvasGLES2.cpp tgui-1.0-1.2.0+mantic/src/Backend/Renderer/GLES2/CanvasGLES2.cpp --- tgui-1.0-1.1.0+mantic/src/Backend/Renderer/GLES2/CanvasGLES2.cpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/src/Backend/Renderer/GLES2/CanvasGLES2.cpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. @@ -22,14 +22,11 @@ // ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - #include #include #include -#if TGUI_BUILD_AS_CXX_MODULE - import tgui; -#else +#if !TGUI_BUILD_AS_CXX_MODULE #include #endif @@ -44,7 +41,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// CanvasGLES2::CanvasGLES2(const char* typeName, bool initRenderer) : - ClickableWidget{typeName, initRenderer} + CanvasBase{typeName, initRenderer} { TGUI_ASSERT(isBackendSet() && getBackend()->hasRenderer() && std::dynamic_pointer_cast(getBackend()->getRenderer()), "CanvasGLES2 can only be created when using the GLES2 backend renderer"); @@ -55,7 +52,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// CanvasGLES2::CanvasGLES2(const CanvasGLES2& other) : - ClickableWidget{other} + CanvasBase{other} { TGUI_ASSERT(isBackendSet() && getBackend()->hasRenderer() && std::dynamic_pointer_cast(getBackend()->getRenderer()), "CanvasGLES2 can only be used when using the GLES2 backend renderer"); @@ -162,13 +159,6 @@ } ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - - bool CanvasGLES2::canGainFocus() const - { - return false; - } - - ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// Widget::Ptr CanvasGLES2::clone() const { diff -Nru tgui-1.0-1.1.0+mantic/src/Backend/Renderer/OpenGL.cpp tgui-1.0-1.2.0+mantic/src/Backend/Renderer/OpenGL.cpp --- tgui-1.0-1.1.0+mantic/src/Backend/Renderer/OpenGL.cpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/src/Backend/Renderer/OpenGL.cpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/src/Backend/Renderer/OpenGL.cppm tgui-1.0-1.2.0+mantic/src/Backend/Renderer/OpenGL.cppm --- tgui-1.0-1.1.0+mantic/src/Backend/Renderer/OpenGL.cppm 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/src/Backend/Renderer/OpenGL.cppm 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. @@ -31,8 +31,11 @@ #include #endif -#ifdef _MSC_VER - #pragma warning(disable: 5244) // Ignore warnings about '#include' still being used below +// Ignore warnings about '#include' still being used below +#if defined(__clang__) + #pragma clang diagnostic ignored "-Winclude-angled-in-module-purview" +#elif defined(_MSC_VER) + #pragma warning(disable: 5244) #endif #if !TGUI_USE_SYSTEM_GLAD diff -Nru tgui-1.0-1.1.0+mantic/src/Backend/Renderer/OpenGL3/BackendRenderTargetOpenGL3.cpp tgui-1.0-1.2.0+mantic/src/Backend/Renderer/OpenGL3/BackendRenderTargetOpenGL3.cpp --- tgui-1.0-1.1.0+mantic/src/Backend/Renderer/OpenGL3/BackendRenderTargetOpenGL3.cpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/src/Backend/Renderer/OpenGL3/BackendRenderTargetOpenGL3.cpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. @@ -22,14 +22,10 @@ // ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - #include #include -#if TGUI_BUILD_AS_CXX_MODULE - import tgui; - import tgui.opengl; -#else +#if !TGUI_BUILD_AS_CXX_MODULE #include #include #include diff -Nru tgui-1.0-1.1.0+mantic/src/Backend/Renderer/OpenGL3/BackendRendererOpenGL3.cpp tgui-1.0-1.2.0+mantic/src/Backend/Renderer/OpenGL3/BackendRendererOpenGL3.cpp --- tgui-1.0-1.1.0+mantic/src/Backend/Renderer/OpenGL3/BackendRendererOpenGL3.cpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/src/Backend/Renderer/OpenGL3/BackendRendererOpenGL3.cpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. @@ -22,15 +22,11 @@ // ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - #include #include #include -#if TGUI_BUILD_AS_CXX_MODULE - import tgui; - import tgui.opengl; -#else +#if !TGUI_BUILD_AS_CXX_MODULE #include #include #endif diff -Nru tgui-1.0-1.1.0+mantic/src/Backend/Renderer/OpenGL3/BackendTextureOpenGL3.cpp tgui-1.0-1.2.0+mantic/src/Backend/Renderer/OpenGL3/BackendTextureOpenGL3.cpp --- tgui-1.0-1.1.0+mantic/src/Backend/Renderer/OpenGL3/BackendTextureOpenGL3.cpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/src/Backend/Renderer/OpenGL3/BackendTextureOpenGL3.cpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. @@ -22,14 +22,10 @@ // ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - #include #include -#if TGUI_BUILD_AS_CXX_MODULE - import tgui; - import tgui.opengl; -#else +#if !TGUI_BUILD_AS_CXX_MODULE #include #endif diff -Nru tgui-1.0-1.1.0+mantic/src/Backend/Renderer/OpenGL3/CanvasOpenGL3.cpp tgui-1.0-1.2.0+mantic/src/Backend/Renderer/OpenGL3/CanvasOpenGL3.cpp --- tgui-1.0-1.1.0+mantic/src/Backend/Renderer/OpenGL3/CanvasOpenGL3.cpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/src/Backend/Renderer/OpenGL3/CanvasOpenGL3.cpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. @@ -22,15 +22,11 @@ // ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - #include #include #include -#if TGUI_BUILD_AS_CXX_MODULE - import tgui; - import tgui.opengl; -#else +#if !TGUI_BUILD_AS_CXX_MODULE #include #endif @@ -45,7 +41,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// CanvasOpenGL3::CanvasOpenGL3(const char* typeName, bool initRenderer) : - ClickableWidget{typeName, initRenderer} + CanvasBase{typeName, initRenderer} { TGUI_ASSERT(isBackendSet() && getBackend()->hasRenderer() && std::dynamic_pointer_cast(getBackend()->getRenderer()), "CanvasOpenGL3 can only be created when using the OpenGL3 backend renderer"); @@ -56,7 +52,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// CanvasOpenGL3::CanvasOpenGL3(const CanvasOpenGL3& other) : - ClickableWidget{other} + CanvasBase{other} { TGUI_ASSERT(isBackendSet() && getBackend()->hasRenderer() && std::dynamic_pointer_cast(getBackend()->getRenderer()), "CanvasOpenGL3 can only be used when using the OpenGL3 backend renderer"); @@ -163,13 +159,6 @@ } ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - - bool CanvasOpenGL3::canGainFocus() const - { - return false; - } - - ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// Widget::Ptr CanvasOpenGL3::clone() const { diff -Nru tgui-1.0-1.1.0+mantic/src/Backend/Renderer/SDL_Renderer/BackendRenderTargetSDL.cpp tgui-1.0-1.2.0+mantic/src/Backend/Renderer/SDL_Renderer/BackendRenderTargetSDL.cpp --- tgui-1.0-1.1.0+mantic/src/Backend/Renderer/SDL_Renderer/BackendRenderTargetSDL.cpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/src/Backend/Renderer/SDL_Renderer/BackendRenderTargetSDL.cpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. @@ -26,9 +26,7 @@ #include #include -#if TGUI_BUILD_AS_CXX_MODULE - import tgui; -#else +#if !TGUI_BUILD_AS_CXX_MODULE #include #include #include @@ -133,6 +131,9 @@ void BackendRenderTargetSDL::drawVertexArray(const RenderStates& states, const Vertex* vertices, std::size_t vertexCount, const unsigned int* indices, std::size_t indexCount, const std::shared_ptr& texture) { + if (vertexCount == 0) + return; + SDL_Texture* textureSDL = nullptr; if (texture) { @@ -149,6 +150,14 @@ verticesSDL[i].position.y = transformedPosition.y; } +#if SDL_MAJOR_VERSION >= 3 + static_assert(sizeof(Vertex::Color) == sizeof(SDL_Color), "SDL_Color requires same memory layout as tgui::Vertex::Color for cast to work"); + SDL_RenderGeometryRaw(m_renderer, textureSDL, + &vertices->position.x, sizeof(Vertex), + reinterpret_cast(&vertices->color), sizeof(Vertex), + &vertices->texCoords.x, sizeof(Vertex), + static_cast(vertexCount), indices, static_cast(indexCount), sizeof(unsigned int)); +#else // We use SDL_RenderGeometry instead of SDL_RenderGeometryRaw because it's easier and because the signature of // the SDL_RenderGeometryRaw function is different in SDL 2.0.18 and SDL >= 2.0.20 static_assert(sizeof(int) == sizeof(unsigned int), "Size of 'int' and 'unsigned int' must be identical for cast to work"); @@ -156,6 +165,7 @@ SDL_RenderGeometry(m_renderer, textureSDL, reinterpret_cast(verticesSDL.data()), static_cast(vertexCount), reinterpret_cast(indices), static_cast(indexCount)); +#endif } ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// diff -Nru tgui-1.0-1.1.0+mantic/src/Backend/Renderer/SDL_Renderer/BackendRendererSDL.cpp tgui-1.0-1.2.0+mantic/src/Backend/Renderer/SDL_Renderer/BackendRendererSDL.cpp --- tgui-1.0-1.1.0+mantic/src/Backend/Renderer/SDL_Renderer/BackendRendererSDL.cpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/src/Backend/Renderer/SDL_Renderer/BackendRendererSDL.cpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. @@ -27,9 +27,7 @@ #include #include -#if TGUI_BUILD_AS_CXX_MODULE - import tgui; -#else +#if !TGUI_BUILD_AS_CXX_MODULE #include #endif diff -Nru tgui-1.0-1.1.0+mantic/src/Backend/Renderer/SDL_Renderer/BackendTextureSDL.cpp tgui-1.0-1.2.0+mantic/src/Backend/Renderer/SDL_Renderer/BackendTextureSDL.cpp --- tgui-1.0-1.1.0+mantic/src/Backend/Renderer/SDL_Renderer/BackendTextureSDL.cpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/src/Backend/Renderer/SDL_Renderer/BackendTextureSDL.cpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. @@ -26,9 +26,7 @@ #include #include -#if TGUI_BUILD_AS_CXX_MODULE - import tgui; -#else +#if !TGUI_BUILD_AS_CXX_MODULE #include #endif @@ -36,6 +34,7 @@ namespace tgui { +#if ((SDL_MAJOR_VERSION == 2) && (SDL_MINOR_VERSION == 0) && (SDL_PATCHLEVEL < 12)) static SDL_ScaleMode GetCurrentSDLScaleMode() { const char *hint = SDL_GetHint(SDL_HINT_RENDER_SCALE_QUALITY); @@ -50,6 +49,7 @@ return static_cast(SDL_atoi(hint)); } } +#endif ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// @@ -79,6 +79,20 @@ if (m_texture) SDL_DestroyTexture(m_texture); +#if (SDL_MAJOR_VERSION > 2) \ + || ((SDL_MAJOR_VERSION == 2) && (SDL_MINOR_VERSION > 0)) \ + || ((SDL_MAJOR_VERSION == 2) && (SDL_MINOR_VERSION == 0) && (SDL_PATCHLEVEL >= 12)) + m_texture = SDL_CreateTexture(m_renderer, SDL_PIXELFORMAT_RGBA32, SDL_TEXTUREACCESS_STATIC, static_cast(size.x), static_cast(size.y)); + + if (m_texture) + { + SDL_SetTextureScaleMode(m_texture, smooth ? SDL_SCALEMODE_LINEAR : SDL_SCALEMODE_NEAREST); + + // We need to set the blendmode if we want SDL to render our alpha channel correctly (otherwise all letters will be colored rectangles) + SDL_SetTextureBlendMode(m_texture, SDL_BLENDMODE_BLEND); + } +#else + // Change the scale mode if it doesn't match our smoothing parameter const SDL_ScaleMode oldScaleMode = GetCurrentSDLScaleMode(); const SDL_ScaleMode newScaleMode = smooth ? SDL_SCALEMODE_LINEAR : SDL_SCALEMODE_NEAREST; @@ -112,6 +126,7 @@ // We need to set the blendmode if we want SDL to render our alpha channel correctly (otherwise all letters will be colored rectangles) if (m_texture) SDL_SetTextureBlendMode(m_texture, SDL_BLENDMODE_BLEND); +#endif } // Copy the pixels to the texture diff -Nru tgui-1.0-1.1.0+mantic/src/Backend/Renderer/SDL_Renderer/CanvasSDL.cpp tgui-1.0-1.2.0+mantic/src/Backend/Renderer/SDL_Renderer/CanvasSDL.cpp --- tgui-1.0-1.1.0+mantic/src/Backend/Renderer/SDL_Renderer/CanvasSDL.cpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/src/Backend/Renderer/SDL_Renderer/CanvasSDL.cpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. @@ -26,9 +26,7 @@ #include #include -#if TGUI_BUILD_AS_CXX_MODULE - import tgui; -#else +#if !TGUI_BUILD_AS_CXX_MODULE #include #endif @@ -43,7 +41,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// CanvasSDL::CanvasSDL(const char* typeName, bool initRenderer) : - ClickableWidget{typeName, initRenderer} + CanvasBase{typeName, initRenderer} { TGUI_ASSERT(isBackendSet() && getBackend()->hasRenderer() && std::dynamic_pointer_cast(getBackend()->getRenderer()), "CanvasSDL can only be created when using the SDL_Renderer backend renderer"); @@ -55,7 +53,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// CanvasSDL::CanvasSDL(const CanvasSDL& other) : - ClickableWidget{other} + CanvasBase{other} { TGUI_ASSERT(isBackendSet() && getBackend()->hasRenderer() && std::dynamic_pointer_cast(getBackend()->getRenderer()), "CanvasSDL can only be used when using the SDL_Renderer backend renderer"); @@ -155,13 +153,6 @@ } ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - - bool CanvasSDL::canGainFocus() const - { - return false; - } - - ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// Widget::Ptr CanvasSDL::clone() const { diff -Nru tgui-1.0-1.1.0+mantic/src/Backend/Renderer/SFML-Graphics/BackendRenderTargetSFML.cpp tgui-1.0-1.2.0+mantic/src/Backend/Renderer/SFML-Graphics/BackendRenderTargetSFML.cpp --- tgui-1.0-1.1.0+mantic/src/Backend/Renderer/SFML-Graphics/BackendRenderTargetSFML.cpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/src/Backend/Renderer/SFML-Graphics/BackendRenderTargetSFML.cpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. @@ -122,12 +122,17 @@ sfStates.texture = &std::static_pointer_cast(sprite.getTexture().getData()->backendTexture)->getInternalTexture(); sfStates.shader = sprite.getTexture().getShader(); +#if SFML_VERSION_MAJOR < 3 const Vector2f textureSize = texture ? Vector2f{texture->getSize()} : Vector2f{1,1}; +#endif const std::vector& vertices = sprite.getVertices(); const std::vector& indices = sprite.getIndices(); - std::vector triangleVertices(indices.size()); + auto triangleVertices = MakeUniqueForOverwrite(indices.size()); for (unsigned int i = 0; i < indices.size(); ++i) { +#if SFML_VERSION_MAJOR >= 3 + triangleVertices[i] = vertices[indices[i]]; +#else triangleVertices[i].position.x = vertices[indices[i]].position.x; triangleVertices[i].position.y = vertices[indices[i]].position.y; triangleVertices[i].color.red = vertices[indices[i]].color.red; @@ -136,10 +141,11 @@ triangleVertices[i].color.alpha = vertices[indices[i]].color.alpha; triangleVertices[i].texCoords.x = vertices[indices[i]].texCoords.x * textureSize.x; triangleVertices[i].texCoords.y = vertices[indices[i]].texCoords.y * textureSize.y; +#endif } static_assert(sizeof(Vertex) == sizeof(sf::Vertex), "Size of sf::Vertex has to match with tgui::Vertex for optimization to work"); - const sf::Vertex* sfmlVertices = reinterpret_cast(triangleVertices.data()); + const sf::Vertex* sfmlVertices = reinterpret_cast(triangleVertices.get()); m_target->draw(sfmlVertices, indices.size(), sf::PrimitiveType::Triangles, sfStates); if (clippingRequired) @@ -155,13 +161,18 @@ // we will create an array of our own Vertex objects and then use a reinterpret_cast to turn them into sf::Vertex. static_assert(sizeof(Vertex) == sizeof(sf::Vertex), "Size of sf::Vertex has to match with tgui::Vertex for optimization to work"); +#if SFML_VERSION_MAJOR < 3 const Vector2f textureSize = texture ? Vector2f{texture->getSize()} : Vector2f{1,1}; +#endif if (indices) { auto verticesSFML = MakeUniqueForOverwrite(indexCount); for (std::size_t i = 0; i < indexCount; ++i) { +#if SFML_VERSION_MAJOR >= 3 + verticesSFML[i] = vertices[indices[i]]; +#else verticesSFML[i].position.x = vertices[indices[i]].position.x; verticesSFML[i].position.y = vertices[indices[i]].position.y; verticesSFML[i].color.red = vertices[indices[i]].color.red; @@ -170,12 +181,16 @@ verticesSFML[i].color.alpha = vertices[indices[i]].color.alpha; verticesSFML[i].texCoords.x = vertices[indices[i]].texCoords.x * textureSize.x; verticesSFML[i].texCoords.y = vertices[indices[i]].texCoords.y * textureSize.y; +#endif } m_target->draw(reinterpret_cast(verticesSFML.get()), indexCount, sf::PrimitiveType::Triangles, convertRenderStates(states, texture)); } else // There are no indices { +#if SFML_VERSION_MAJOR >= 3 + m_target->draw(reinterpret_cast(vertices), vertexCount, sf::PrimitiveType::Triangles, convertRenderStates(states, texture)); +#else auto verticesSFML = std::vector(vertices, vertices + vertexCount); for (std::size_t i = 0; i < vertexCount; ++i) { @@ -184,6 +199,7 @@ } m_target->draw(reinterpret_cast(verticesSFML.data()), vertexCount, sf::PrimitiveType::Triangles, convertRenderStates(states, texture)); +#endif } } @@ -224,6 +240,10 @@ transformMatrix[1], transformMatrix[5], transformMatrix[13], transformMatrix[3], transformMatrix[7], transformMatrix[15]); +#if SFML_VERSION_MAJOR >= 3 + statesSFML.coordinateType = sf::CoordinateType::Normalized; +#endif + if (texture) { TGUI_ASSERT(std::dynamic_pointer_cast(texture), "BackendRenderTargetSFML requires textures of type BackendTextureSFML"); diff -Nru tgui-1.0-1.1.0+mantic/src/Backend/Renderer/SFML-Graphics/BackendRendererSFML.cpp tgui-1.0-1.2.0+mantic/src/Backend/Renderer/SFML-Graphics/BackendRendererSFML.cpp --- tgui-1.0-1.1.0+mantic/src/Backend/Renderer/SFML-Graphics/BackendRendererSFML.cpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/src/Backend/Renderer/SFML-Graphics/BackendRendererSFML.cpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/src/Backend/Renderer/SFML-Graphics/BackendTextureSFML.cpp tgui-1.0-1.2.0+mantic/src/Backend/Renderer/SFML-Graphics/BackendTextureSFML.cpp --- tgui-1.0-1.1.0+mantic/src/Backend/Renderer/SFML-Graphics/BackendTextureSFML.cpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/src/Backend/Renderer/SFML-Graphics/BackendTextureSFML.cpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. @@ -33,7 +33,7 @@ BackendTextureSFML::BackendTextureSFML() { - m_isSmooth = false; // Smooth filter is disabled by default in SFML textures + m_isSmooth = m_texture.isSmooth(); // Smooth filter is disabled by default in SFML textures } ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// diff -Nru tgui-1.0-1.1.0+mantic/src/Backend/Renderer/SFML-Graphics/CanvasSFML.cpp tgui-1.0-1.2.0+mantic/src/Backend/Renderer/SFML-Graphics/CanvasSFML.cpp --- tgui-1.0-1.1.0+mantic/src/Backend/Renderer/SFML-Graphics/CanvasSFML.cpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/src/Backend/Renderer/SFML-Graphics/CanvasSFML.cpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. @@ -42,14 +42,14 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// CanvasSFML::CanvasSFML(const char* typeName, bool initRenderer) : - ClickableWidget{typeName, initRenderer} + CanvasBase{typeName, initRenderer} { } ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// CanvasSFML::CanvasSFML(const CanvasSFML& other) : - ClickableWidget {other}, + CanvasBase{other}, m_usedTextureSize{other.m_usedTextureSize} { setSize(other.getSize()); @@ -58,7 +58,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// CanvasSFML::CanvasSFML(CanvasSFML&& other) noexcept : - ClickableWidget {std::move(other)}, + CanvasBase{std::move(other)}, m_usedTextureSize{std::move(other.m_usedTextureSize)} { // sf::RenderTexture does not support move yet @@ -205,19 +205,26 @@ "CanvasSFML::draw requires sprite to have a backend texture of type BackendTextureSFML"); statesSFML.texture = &std::static_pointer_cast(sprite.getTexture().getData()->backendTexture)->getInternalTexture(); +#if SFML_VERSION_MAJOR >= 3 + statesSFML.coordinateType = sf::CoordinateType::Normalized; +#else const sf::Vector2u textureSize{statesSFML.texture->getSize()}; +#endif + const std::vector& vertices = sprite.getVertices(); const std::vector& indices = sprite.getIndices(); - std::vector triangleVertices(indices.size()); + auto triangleVertices = MakeUniqueForOverwrite(indices.size()); for (std::size_t i = 0; i < indices.size(); ++i) { triangleVertices[i] = vertices[indices[i]]; +#if SFML_VERSION_MAJOR < 3 triangleVertices[i].texCoords.x *= textureSize.x; triangleVertices[i].texCoords.y *= textureSize.y; +#endif } static_assert(sizeof(Vertex) == sizeof(sf::Vertex), "Size of sf::Vertex has to match with tgui::Vertex for optimization to work"); - const sf::Vertex* sfmlVertices = reinterpret_cast(triangleVertices.data()); + const sf::Vertex* sfmlVertices = reinterpret_cast(triangleVertices.get()); m_renderTexture.draw(sfmlVertices, indices.size(), sf::PrimitiveType::Triangles, statesSFML); } @@ -255,10 +262,15 @@ static_assert(sizeof(Vertex) == sizeof(sf::Vertex), "Size of sf::Vertex has to match with tgui::Vertex for optimization to work"); const sf::Texture& texture = m_renderTexture.getTexture(); +#if SFML_VERSION_MAJOR < 3 const Vector2f textureSize = Vector2f{static_cast(texture.getSize().x), static_cast(texture.getSize().y)}; +#endif auto verticesSFML = MakeUniqueForOverwrite(indices.size()); for (std::size_t i = 0; i < indices.size(); ++i) { +#if SFML_VERSION_MAJOR >= 3 + verticesSFML[i] = vertices[indices[i]]; +#else verticesSFML[i].position.x = vertices[indices[i]].position.x; verticesSFML[i].position.y = vertices[indices[i]].position.y; verticesSFML[i].color.red = vertices[indices[i]].color.red; @@ -267,6 +279,7 @@ verticesSFML[i].color.alpha = vertices[indices[i]].color.alpha; verticesSFML[i].texCoords.x = vertices[indices[i]].texCoords.x * textureSize.x; verticesSFML[i].texCoords.y = vertices[indices[i]].texCoords.y * textureSize.y; +#endif } sf::RenderStates statesSFML; @@ -276,19 +289,15 @@ transformMatrix[0], transformMatrix[4], transformMatrix[12], transformMatrix[1], transformMatrix[5], transformMatrix[13], transformMatrix[3], transformMatrix[7], transformMatrix[15]); +#if SFML_VERSION_MAJOR >= 3 + statesSFML.coordinateType = sf::CoordinateType::Normalized; +#endif TGUI_ASSERT(dynamic_cast(&target), "CanvasSFML requires a render target of type BackendRenderTargetSFML"); static_cast(target).getTarget()->draw(reinterpret_cast(verticesSFML.get()), indices.size(), sf::PrimitiveType::Triangles, statesSFML); } ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - - bool CanvasSFML::canGainFocus() const - { - return false; - } - - ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// Widget::Ptr CanvasSFML::clone() const { diff -Nru tgui-1.0-1.1.0+mantic/src/Backend/SDL-GLES2.cpp tgui-1.0-1.2.0+mantic/src/Backend/SDL-GLES2.cpp --- tgui-1.0-1.1.0+mantic/src/Backend/SDL-GLES2.cpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/src/Backend/SDL-GLES2.cpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/src/Backend/SDL-OpenGL3.cpp tgui-1.0-1.2.0+mantic/src/Backend/SDL-OpenGL3.cpp --- tgui-1.0-1.1.0+mantic/src/Backend/SDL-OpenGL3.cpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/src/Backend/SDL-OpenGL3.cpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/src/Backend/SDL-Renderer.cpp tgui-1.0-1.2.0+mantic/src/Backend/SDL-Renderer.cpp --- tgui-1.0-1.1.0+mantic/src/Backend/SDL-Renderer.cpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/src/Backend/SDL-Renderer.cpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/src/Backend/SDL-TTF-GLES2.cpp tgui-1.0-1.2.0+mantic/src/Backend/SDL-TTF-GLES2.cpp --- tgui-1.0-1.1.0+mantic/src/Backend/SDL-TTF-GLES2.cpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/src/Backend/SDL-TTF-GLES2.cpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/src/Backend/SDL-TTF-OpenGL3.cpp tgui-1.0-1.2.0+mantic/src/Backend/SDL-TTF-OpenGL3.cpp --- tgui-1.0-1.1.0+mantic/src/Backend/SDL-TTF-OpenGL3.cpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/src/Backend/SDL-TTF-OpenGL3.cpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/src/Backend/SFML-Graphics.cpp tgui-1.0-1.2.0+mantic/src/Backend/SFML-Graphics.cpp --- tgui-1.0-1.1.0+mantic/src/Backend/SFML-Graphics.cpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/src/Backend/SFML-Graphics.cpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/src/Backend/SFML-OpenGL3.cpp tgui-1.0-1.2.0+mantic/src/Backend/SFML-OpenGL3.cpp --- tgui-1.0-1.1.0+mantic/src/Backend/SFML-OpenGL3.cpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/src/Backend/SFML-OpenGL3.cpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/src/Backend/Window/Backend.cpp tgui-1.0-1.2.0+mantic/src/Backend/Window/Backend.cpp --- tgui-1.0-1.1.0+mantic/src/Backend/Window/Backend.cpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/src/Backend/Window/Backend.cpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/src/Backend/Window/BackendGui.cpp tgui-1.0-1.2.0+mantic/src/Backend/Window/BackendGui.cpp --- tgui-1.0-1.1.0+mantic/src/Backend/Window/BackendGui.cpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/src/Backend/Window/BackendGui.cpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. @@ -152,7 +152,7 @@ return true; // Even if no scrollbar moved, we will still absorb the scroll event when the mouse is on top of a widget - return m_container->getWidgetAtPosition(mouseCoords) != nullptr; + return m_container->getWidgetAtPos(mouseCoords, false) != nullptr; } else if (event.type == Event::Type::MouseButtonPressed) return m_container->processMousePressEvent(event.mouseButton.button, mouseCoords); @@ -322,17 +322,31 @@ } ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - +#ifndef TGUI_REMOVE_DEPRECATED_CODE Widget::Ptr BackendGui::getWidgetAtPosition(Vector2f pos) const { - return m_container->getWidgetAtPosition(pos); + return getWidgetAtPos(pos, true); } - +#endif ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + Widget::Ptr BackendGui::getWidgetAtPos(Vector2f pos, bool recursive) const + { + return m_container->getWidgetAtPos(pos, recursive); + } + + ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +#ifndef TGUI_REMOVE_DEPRECATED_CODE Widget::Ptr BackendGui::getWidgetBelowMouseCursor(Vector2i mousePos) const { - return getWidgetAtPosition(mapPixelToCoords(mousePos)); + return getWidgetBelowMouseCursor(mousePos, true); + } +#endif + ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + + Widget::Ptr BackendGui::getWidgetBelowMouseCursor(Vector2i mousePos, bool recursive) const + { + return getWidgetAtPos(mapPixelToCoords(mousePos), recursive); } ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// @@ -607,7 +621,7 @@ return true; // Even if no widget was scrolled, we will still absorb the event when the scrolling bagan on top of a widget - return m_container->getWidgetAtPosition(touchPos) != nullptr; + return m_container->getWidgetAtPos(touchPos, false) != nullptr; } ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// diff -Nru tgui-1.0-1.1.0+mantic/src/Backend/Window/GLFW/BackendGLFW.cpp tgui-1.0-1.2.0+mantic/src/Backend/Window/GLFW/BackendGLFW.cpp --- tgui-1.0-1.1.0+mantic/src/Backend/Window/GLFW/BackendGLFW.cpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/src/Backend/Window/GLFW/BackendGLFW.cpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. @@ -251,9 +251,8 @@ void BackendGLFW::updateMouseCursorStyle(Cursor::Type type, GLFWcursor* cursor) { - if (m_mouseCursors[type]) - glfwDestroyCursor(m_mouseCursors[type]); - + // If a cursor already existed, then wait before destroying it until it is no longer in use + GLFWcursor* oldCursor = m_mouseCursors[type]; m_mouseCursors[type] = cursor; // Update the cursor on the screen if the cursor was in use @@ -265,6 +264,9 @@ updateShownMouseCursor(pair.second.window, type); } } + + if (oldCursor) + glfwDestroyCursor(oldCursor); } ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// diff -Nru tgui-1.0-1.1.0+mantic/src/Backend/Window/GLFW/BackendGuiGLFW.cpp tgui-1.0-1.2.0+mantic/src/Backend/Window/GLFW/BackendGuiGLFW.cpp --- tgui-1.0-1.1.0+mantic/src/Backend/Window/GLFW/BackendGuiGLFW.cpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/src/Backend/Window/GLFW/BackendGuiGLFW.cpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. @@ -26,9 +26,7 @@ #include #include -#if TGUI_BUILD_AS_CXX_MODULE - import tgui; -#else +#if !TGUI_BUILD_AS_CXX_MODULE #include #ifdef TGUI_SYSTEM_WINDOWS diff -Nru tgui-1.0-1.1.0+mantic/src/Backend/Window/SDL/BackendGuiSDL.cpp tgui-1.0-1.2.0+mantic/src/Backend/Window/SDL/BackendGuiSDL.cpp --- tgui-1.0-1.1.0+mantic/src/Backend/Window/SDL/BackendGuiSDL.cpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/src/Backend/Window/SDL/BackendGuiSDL.cpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. @@ -28,9 +28,7 @@ #include -#if TGUI_BUILD_AS_CXX_MODULE - import tgui; -#else +#if !TGUI_BUILD_AS_CXX_MODULE #include #endif @@ -284,7 +282,10 @@ eventTGUI.mouseWheel.delta = static_cast(eventSDL.wheel.y); #endif -#if (SDL_MAJOR_VERSION > 2) || ((SDL_MAJOR_VERSION == 2) && (SDL_MINOR_VERSION >= 26)) +#if (SDL_MAJOR_VERSION >= 3) + eventTGUI.mouseWheel.x = static_cast(eventSDL.wheel.mouse_x * m_dpiScale); + eventTGUI.mouseWheel.y = static_cast(eventSDL.wheel.mouse_y * m_dpiScale); +#elif (SDL_MAJOR_VERSION > 2) || ((SDL_MAJOR_VERSION == 2) && (SDL_MINOR_VERSION >= 26)) eventTGUI.mouseWheel.x = static_cast(eventSDL.wheel.mouseX * m_dpiScale); eventTGUI.mouseWheel.y = static_cast(eventSDL.wheel.mouseY * m_dpiScale); #else @@ -347,8 +348,13 @@ // Remember which finger this is, for when we receive SDL_EVENT_FINGER_MOTION and SDL_EVENT_FINGER_UP events m_touchFirstFingerDown = true; +#if (SDL_MAJOR_VERSION >= 3) + m_touchFirstFingerId = eventSDL.tfinger.fingerID; + m_touchFirstFingerTouchId = eventSDL.tfinger.touchID; +#else m_touchFirstFingerId = eventSDL.tfinger.fingerId; m_touchFirstFingerTouchId = eventSDL.tfinger.touchId; +#endif // Simulate a MouseButtonPressed event eventTGUI.type = Event::Type::MouseButtonPressed; @@ -360,9 +366,13 @@ case SDL_EVENT_FINGER_UP: { // Only handle the event if this is the first finger +#if (SDL_MAJOR_VERSION >= 3) + if (!m_touchFirstFingerDown || (m_touchFirstFingerId != eventSDL.tfinger.fingerID) || (m_touchFirstFingerTouchId != eventSDL.tfinger.touchID)) + return false; +#else if (!m_touchFirstFingerDown || (m_touchFirstFingerId != eventSDL.tfinger.fingerId) || (m_touchFirstFingerTouchId != eventSDL.tfinger.touchId)) return false; - +#endif m_touchFirstFingerDown = false; // Simulate a MouseButtonReleased event @@ -375,8 +385,13 @@ case SDL_EVENT_FINGER_MOTION: { // Only handle the event if this is the first finger +#if (SDL_MAJOR_VERSION >= 3) + if (!m_touchFirstFingerDown || (m_touchFirstFingerId != eventSDL.tfinger.fingerID) || (m_touchFirstFingerTouchId != eventSDL.tfinger.touchID)) + return false; +#else if (!m_touchFirstFingerDown || (m_touchFirstFingerId != eventSDL.tfinger.fingerId) || (m_touchFirstFingerTouchId != eventSDL.tfinger.touchId)) return false; +#endif // Simulate a MouseMoved event eventTGUI.type = Event::Type::MouseMoved; @@ -398,7 +413,11 @@ { const bool wasScrolling = m_twoFingerScroll.isScrolling(); +#if (SDL_MAJOR_VERSION >= 3) + const auto fingerId = static_cast(sdlEvent.tfinger.fingerID); +#else const auto fingerId = static_cast(sdlEvent.tfinger.fingerId); +#endif const float x = sdlEvent.tfinger.x * m_framebufferSize.x; const float y = sdlEvent.tfinger.y * m_framebufferSize.y; @@ -432,7 +451,7 @@ // If a text event consists of multiple unicode characters (which can happen when an IME is used) then our // converted event only contains the last character. We will send all other unicode characters here. - if ((event.type == Event::Type::TextEntered) && (sdlEvent.type == SDL_EVENT_TEXT_INPUT) && (sdlEvent.text.text[1] != '\0')) + if ((event.type == Event::Type::TextEntered) && (sdlEvent.type == SDL_EVENT_TEXT_INPUT) && (sdlEvent.text.text[0] != '\0') && (sdlEvent.text.text[1] != '\0')) { // Note that we also pass here if sdlEvent.text.text consists of multiple UTF-8 characters that still fit // within a single UTF-32 codepoint. So we still need to check that there are multiple UTF-32 codepoints below. diff -Nru tgui-1.0-1.1.0+mantic/src/Backend/Window/SDL/BackendSDL.cpp tgui-1.0-1.2.0+mantic/src/Backend/Window/SDL/BackendSDL.cpp --- tgui-1.0-1.1.0+mantic/src/Backend/Window/SDL/BackendSDL.cpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/src/Backend/Window/SDL/BackendSDL.cpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. @@ -31,9 +31,7 @@ #endif #include -#if SDL_MAJOR_VERSION >= 3 - #include -#else +#if SDL_MAJOR_VERSION < 3 #include #endif @@ -45,7 +43,7 @@ #pragma warning(pop) #endif -#if defined(TGUI_SYSTEM_LINUX) && defined(TGUI_USE_X11) && defined(SDL_ENABLE_SYSWM_X11) +#if defined(TGUI_SYSTEM_LINUX) && defined(TGUI_USE_X11) && ((SDL_MAJOR_VERSION >= 3) || defined(SDL_VIDEO_DRIVER_X11)) #include #include #endif @@ -352,21 +350,8 @@ void BackendSDL::updateMouseCursorStyle(Cursor::Type type, SDL_Cursor* cursor) { -#ifdef TGUI_SYSTEM_WINDOWS - // Make sure the old cursor isn't still being used before we destroy it - bool cursorInUse = false; - for (auto& pair : m_guiResources) - { - if (pair.second.mouseCursor == type) - cursorInUse = true; - } - if (cursorInUse) - SetCursor(static_cast(LoadImage(nullptr, IDC_ARROW, IMAGE_CURSOR, 0, 0, LR_SHARED))); -#endif - - if (m_mouseCursors[type]) - SDL_DestroyCursor(m_mouseCursors[type]); - + // If a cursor already existed, then wait before destroying it until it is no longer in use + SDL_Cursor* oldCursor = m_mouseCursors[type]; m_mouseCursors[type] = cursor; // Update the cursor on the screen if the cursor was in use @@ -378,6 +363,9 @@ updateShownMouseCursor(pair.second.window, type); } } + + if (oldCursor) + SDL_DestroyCursor(oldCursor); } ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// @@ -391,7 +379,7 @@ // As of SDL 2.24, it uses an arrow pointing NW or NE. This is already much better, even though the arrow points on the wrong direction // for bottom corners. Having two-sided arrows for horizontal/vertical, but having a direction arrow for diagonal looks out of place though. // So we will continue to bypass SDL and use directional arrows in all directions. -#if defined(TGUI_SYSTEM_LINUX) && defined(TGUI_USE_X11) && defined(SDL_ENABLE_SYSWM_X11) +#if defined(TGUI_SYSTEM_LINUX) && defined(TGUI_USE_X11) && ((SDL_MAJOR_VERSION >= 3) || defined(SDL_VIDEO_DRIVER_X11)) if ((type == Cursor::Type::SizeLeft) || (type == Cursor::Type::SizeRight) || (type == Cursor::Type::SizeTop) || (type == Cursor::Type::SizeBottom) || (type == Cursor::Type::SizeBottomRight) || (type == Cursor::Type::SizeTopLeft) @@ -399,16 +387,24 @@ { if (!m_mouseCursors[type]) // Only bypass SDL when system cursors are used { - SDL_SysWMinfo sysInfo; #if SDL_MAJOR_VERSION >= 3 - if (SDL_GetWindowWMInfo(window, &sysInfo, SDL_SYSWM_CURRENT_VERSION) && (sysInfo.subsystem == SDL_SYSWM_X11) && sysInfo.info.x11.display) + const SDL_PropertiesID windowProps = SDL_GetWindowProperties(window); + const Window windowX11 = static_cast(SDL_GetNumberProperty(windowProps, "SDL.window.x11.window", 0)); + Display* displayX11 = reinterpret_cast(SDL_GetProperty(windowProps, "SDL.window.x11.display", nullptr)); #else + Display* displayX11 = nullptr; + Window windowX11 = 0; + + SDL_SysWMinfo sysInfo; SDL_VERSION(&sysInfo.version); // We must fill in the version before calling SDL_GetWindowWMInfo - if (SDL_GetWindowWMInfo(window, &sysInfo) && (sysInfo.subsystem == SDL_SYSWM_X11) && sysInfo.info.x11.display) + if (SDL_GetWindowWMInfo(window, &sysInfo) && (sysInfo.subsystem == SDL_SYSWM_X11)) + { + displayX11 = sysInfo.info.x11.display; + windowX11 = sysInfo.info.x11.window; + } #endif + if (displayX11) { - auto* displayX11 = sysInfo.info.x11.display; - unsigned int shapeX11; if (type == Cursor::Type::SizeLeft) shapeX11 = XC_left_side; @@ -430,7 +426,7 @@ auto cursorX11 = XCreateFontCursor(displayX11, shapeX11); if (cursorX11 != None) { - XDefineCursor(displayX11, sysInfo.info.x11.window, cursorX11); + XDefineCursor(displayX11, windowX11, cursorX11); XFreeCursor(displayX11, cursorX11); } diff -Nru tgui-1.0-1.1.0+mantic/src/Backend/Window/SFML/BackendGuiSFML.cpp tgui-1.0-1.2.0+mantic/src/Backend/Window/SFML/BackendGuiSFML.cpp --- tgui-1.0-1.1.0+mantic/src/Backend/Window/SFML/BackendGuiSFML.cpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/src/Backend/Window/SFML/BackendGuiSFML.cpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. @@ -352,8 +352,13 @@ } case sf::Event::MouseWheelScrolled: { +#if SFML_VERSION_MAJOR >= 3 + if (eventSFML.mouseWheelScroll.wheel != sf::Mouse::Wheel::Vertical) + return false; // TGUI only handles the vertical mouse wheel +#else if (eventSFML.mouseWheelScroll.wheel != sf::Mouse::Wheel::VerticalWheel) return false; // TGUI only handles the vertical mouse wheel +#endif eventTGUI.type = Event::Type::MouseWheelScrolled; eventTGUI.mouseWheel.delta = eventSFML.mouseWheelScroll.delta; diff -Nru tgui-1.0-1.1.0+mantic/src/Backend/Window/SFML/BackendSFML.cpp tgui-1.0-1.2.0+mantic/src/Backend/Window/SFML/BackendSFML.cpp --- tgui-1.0-1.1.0+mantic/src/Backend/Window/SFML/BackendSFML.cpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/src/Backend/Window/SFML/BackendSFML.cpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. @@ -34,10 +34,6 @@ #include #include -#ifdef TGUI_SYSTEM_WINDOWS - #include -#endif - #if defined(TGUI_SYSTEM_LINUX) && (SFML_VERSION_MAJOR == 2 && SFML_VERSION_MINOR < 6) && defined(TGUI_USE_X11) #include #include @@ -160,13 +156,13 @@ switch (modifierKey) { case Event::KeyModifier::System: - return sf::Keyboard::isKeyPressed(sf::Keyboard::LSystem) || sf::Keyboard::isKeyPressed(sf::Keyboard::RSystem); + return sf::Keyboard::isKeyPressed(sf::Keyboard::Key::LSystem) || sf::Keyboard::isKeyPressed(sf::Keyboard::Key::RSystem); case Event::KeyModifier::Control: - return sf::Keyboard::isKeyPressed(sf::Keyboard::LControl) || sf::Keyboard::isKeyPressed(sf::Keyboard::RControl); + return sf::Keyboard::isKeyPressed(sf::Keyboard::Key::LControl) || sf::Keyboard::isKeyPressed(sf::Keyboard::Key::RControl); case Event::KeyModifier::Shift: - return sf::Keyboard::isKeyPressed(sf::Keyboard::LShift) || sf::Keyboard::isKeyPressed(sf::Keyboard::RShift); + return sf::Keyboard::isKeyPressed(sf::Keyboard::Key::LShift) || sf::Keyboard::isKeyPressed(sf::Keyboard::Key::RShift); case Event::KeyModifier::Alt: - return sf::Keyboard::isKeyPressed(sf::Keyboard::LAlt) || sf::Keyboard::isKeyPressed(sf::Keyboard::RAlt); + return sf::Keyboard::isKeyPressed(sf::Keyboard::Key::LAlt) || sf::Keyboard::isKeyPressed(sf::Keyboard::Key::RAlt); } TGUI_ASSERT(false, "BackendSFML::isKeyboardModifierPressed called with an invalid value"); @@ -309,18 +305,9 @@ void BackendSFML::updateMouseCursor(Cursor::Type type, std::unique_ptr cursor) { -#ifdef TGUI_SYSTEM_WINDOWS - // Make sure the old cursor isn't still being used before we destroy it - bool cursorInUse = false; - for (auto& pair : m_guiResources) - { - if (pair.second.mouseCursor == type) - cursorInUse = true; - } - if (cursorInUse) - SetCursor(static_cast(LoadImage(nullptr, IDC_ARROW, IMAGE_CURSOR, 0, 0, LR_SHARED))); -#endif - + // We shouldn't destroy the existing cursor while it is still in use, + // so we move it to a temporary variable to delay its destruction until the end of the function. + auto oldCursor = std::move(m_mouseCursors[type]); m_mouseCursors[type] = std::move(cursor); // Update the cursor on the screen if the cursor was in use diff -Nru tgui-1.0-1.1.0+mantic/src/Base64.cpp tgui-1.0-1.2.0+mantic/src/Base64.cpp --- tgui-1.0-1.1.0+mantic/src/Base64.cpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/src/Base64.cpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/src/CMakeLists.txt tgui-1.0-1.2.0+mantic/src/CMakeLists.txt --- tgui-1.0-1.1.0+mantic/src/CMakeLists.txt 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/src/CMakeLists.txt 2024-03-23 12:27:01.000000000 +0000 @@ -1,6 +1,6 @@ #################################################################################################### # TGUI - Texus' Graphical User Interface -# Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +# Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) # # 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. @@ -98,6 +98,7 @@ Widgets/BoxLayoutRatios.cpp Widgets/Button.cpp Widgets/ButtonBase.cpp + Widgets/CanvasBase.cpp Widgets/ChatBox.cpp Widgets/CheckBox.cpp Widgets/ChildWindow.cpp @@ -411,18 +412,70 @@ target_precompile_headers(tgui PRIVATE "${PROJECT_SOURCE_DIR}/include/TGUI/Widget.hpp") endif() -# Install library -install(TARGETS tgui EXPORT TGUIConfigExport - RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT bin - LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT bin - ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT devel - FRAMEWORK DESTINATION "." COMPONENT bin -) +if (TGUI_BUILD_FRAMEWORK) + set(config_package_location "TGUI.framework/Resources/CMake") +else() + set(config_package_location ${CMAKE_INSTALL_LIBDIR}/cmake/TGUI) +endif() # Generate the TGUIConfig.cmake file # This had to happen here instead of in the root CMakeLists.txt because otherwise it might try to write to the macOS framework before the framework is installed. -# TODO: CMake 3.13 fixed order of installation, so check if the issue still exists. -# Since the config files relies on variables that are only defined in this scope (via the backend include), caution is required when moving this. -if (NOT TGUI_SKIP_EXPORT) - tgui_export_target(TGUIConfigExport) +# TODO: CMake 3.13 fixed order of installation, so check if the issue still exists. Since the config files relies on variables that are only defined in this scope (via the backend include), caution is required when moving this. +include(CMakePackageConfigHelpers) +configure_package_config_file("${PROJECT_SOURCE_DIR}/cmake/TGUIConfig.cmake.in" + "${PROJECT_BINARY_DIR}/TGUIConfig.cmake" + INSTALL_DESTINATION "${config_package_location}") + +write_basic_package_version_file("${PROJECT_BINARY_DIR}/TGUIConfigVersion.cmake" + VERSION ${TGUI_VERSION_MAJOR}.${TGUI_VERSION_MINOR}.${TGUI_VERSION_PATCH} + COMPATIBILITY SameMajorVersion) + +if (TGUI_SHARED_LIBS) + set(targets_config_filename TGUISharedTargets.cmake) +else() + set(targets_config_filename TGUIStaticTargets.cmake) +endif() + +if (CMAKE_SOURCE_DIR STREQUAL PROJECT_SOURCE_DIR) + # When building TGUI alongside its dependencies, the export is only possible when all dependencies also do the export. + # To keep the code simple, we will never create the config file in our build folder when TGUI is build as a subdirectory. + # At the time of writing, the following dependencies have or lack the export call: + # - Have: SFML 2, SDL 3 + # - Lack: SDL_ttf, FreeType, GLFW, SFML 3 (https://github.com/SFML/SFML/pull/2619) + export(TARGETS tgui + NAMESPACE TGUI:: + FILE "${PROJECT_BINARY_DIR}/${targets_config_filename}") +endif() + +if (TGUI_INSTALL) + # Install library + install(TARGETS tgui EXPORT TGUIConfigExport + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT bin + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT bin + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT devel + FRAMEWORK DESTINATION "." COMPONENT bin) + + install(EXPORT TGUIConfigExport + NAMESPACE TGUI:: + FILE ${targets_config_filename} + DESTINATION ${config_package_location}) + + install(FILES "${PROJECT_BINARY_DIR}/TGUIConfig.cmake" + "${PROJECT_BINARY_DIR}/TGUIConfigVersion.cmake" + DESTINATION ${config_package_location} + COMPONENT devel) + + # Install the find modules when they are needed to find our dependencies + if(TGUI_HAS_WINDOW_BACKEND_GLFW AND NOT TGUI_FOUND_GLFW_CONFIG) + install(FILES "${PROJECT_SOURCE_DIR}/cmake/Modules/Findglfw3.cmake" DESTINATION ${config_package_location} COMPONENT devel) + add_custom_command(TARGET tgui POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy "${PROJECT_SOURCE_DIR}/cmake/Modules/Findglfw3.cmake" "${PROJECT_BINARY_DIR}/" VERBATIM) + endif() + if((TGUI_HAS_WINDOW_BACKEND_SDL OR TGUI_HAS_FONT_BACKEND_SDL_TTF) AND NOT TGUI_FOUND_SDL2_CONFIG) + install(FILES "${PROJECT_SOURCE_DIR}/cmake/Modules/FindSDL2.cmake" DESTINATION ${config_package_location} COMPONENT devel) + add_custom_command(TARGET tgui POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy "${PROJECT_SOURCE_DIR}/cmake/Modules/FindSDL2.cmake" "${PROJECT_BINARY_DIR}/" VERBATIM) + endif() + if(TGUI_HAS_FONT_BACKEND_SDL_TTF AND NOT TGUI_FOUND_SDL2_TTF_CONFIG) + install(FILES "${PROJECT_SOURCE_DIR}/cmake/Modules/FindSDL2_ttf.cmake" DESTINATION ${config_package_location} COMPONENT devel) + add_custom_command(TARGET tgui POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy "${PROJECT_SOURCE_DIR}/cmake/Modules/FindSDL2_ttf.cmake" "${PROJECT_BINARY_DIR}/" VERBATIM) + endif() endif() diff -Nru tgui-1.0-1.1.0+mantic/src/Color.cpp tgui-1.0-1.2.0+mantic/src/Color.cpp --- tgui-1.0-1.1.0+mantic/src/Color.cpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/src/Color.cpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/src/Components.cpp tgui-1.0-1.2.0+mantic/src/Components.cpp --- tgui-1.0-1.1.0+mantic/src/Components.cpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/src/Components.cpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/src/Container.cpp tgui-1.0-1.2.0+mantic/src/Container.cpp --- tgui-1.0-1.1.0+mantic/src/Container.cpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/src/Container.cpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. @@ -783,10 +783,21 @@ } ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - +#ifndef TGUI_REMOVE_DEPRECATED_CODE Widget::Ptr Container::getWidgetAtPosition(Vector2f pos) const { - pos -= getPosition() + getChildWidgetsOffset(); + return getWidgetAtPos(pos - getPosition(), true); + } +#endif + ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + + Widget::Ptr Container::getWidgetAtPos(Vector2f pos, bool recursive) const + { + const Vector2f widgetsOffset = getChildWidgetsOffset(); + if ((pos.x < widgetsOffset.x) || (pos.y < widgetsOffset.y)) + return nullptr; + + pos -= widgetsOffset; for (auto it = m_widgets.crbegin(); it != m_widgets.crend(); ++it) { @@ -798,11 +809,11 @@ if (!widget->isMouseOnWidget(transformMousePos(widget, pos))) continue; - // If the widget is a container then look inside it - if (widget->isContainer()) + // If the widget is a container then look inside it if we are looking for the leaf widget + if (recursive && widget->isContainer()) { Container::Ptr container = std::static_pointer_cast(widget); - auto childWidget = container->getWidgetAtPosition(transformMousePos(widget, pos)); + auto childWidget = container->getWidgetAtPos(transformMousePos(widget, pos) - container->getPosition(), true); if (childWidget) return childWidget; } @@ -903,10 +914,10 @@ void Container::setFocused(bool focused) { - if (m_focusedWidget && (focused != m_focusedWidget->isFocused())) - m_focusedWidget->setFocused(focused); - Widget::setFocused(focused); + + if (m_focusedWidget && (m_focused != m_focusedWidget->isFocused())) + m_focusedWidget->setFocused(m_focused); } ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// diff -Nru tgui-1.0-1.1.0+mantic/src/Cursor.cpp tgui-1.0-1.2.0+mantic/src/Cursor.cpp --- tgui-1.0-1.1.0+mantic/src/Cursor.cpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/src/Cursor.cpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/src/CustomWidgetForBindings.cpp tgui-1.0-1.2.0+mantic/src/CustomWidgetForBindings.cpp --- tgui-1.0-1.1.0+mantic/src/CustomWidgetForBindings.cpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/src/CustomWidgetForBindings.cpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. @@ -98,7 +98,7 @@ void CustomWidgetForBindings::setFocused(bool focused) { Widget::setFocused(focused); - implFocusChanged(focused); + implFocusChanged(m_focused); } ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// diff -Nru tgui-1.0-1.1.0+mantic/src/DefaultBackendWindow.cpp tgui-1.0-1.2.0+mantic/src/DefaultBackendWindow.cpp --- tgui-1.0-1.1.0+mantic/src/DefaultBackendWindow.cpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/src/DefaultBackendWindow.cpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. @@ -22,9 +22,8 @@ // ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -#include - +// Imports need to be first when building as a module. +// Config.hpp will already be included in the global section that is placed before this file. #if TGUI_BUILD_AS_CXX_MODULE #if TGUI_HAS_BACKEND_SFML_GRAPHICS import tgui.backend.sfml_graphics; @@ -54,7 +53,11 @@ import tgui.backend.glfw_gles2; #endif #endif -#else +#endif + +#include + +#if !TGUI_BUILD_AS_CXX_MODULE #include #include #include @@ -108,7 +111,7 @@ #endif #if SFML_VERSION_MAJOR >= 3 - m_window.create(sf::VideoMode{{width, height}}, title.toStdString(), sf::Style::Default, settings); + m_window.create(sf::VideoMode{{width, height}}, title.toStdString(), sf::Style::Default, sf::State::Windowed, settings); #else m_window.create(sf::VideoMode{width, height}, title.toStdString(), sf::Style::Default, settings); #endif diff -Nru tgui-1.0-1.1.0+mantic/src/FileDialogIconLoader.cpp tgui-1.0-1.2.0+mantic/src/FileDialogIconLoader.cpp --- tgui-1.0-1.1.0+mantic/src/FileDialogIconLoader.cpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/src/FileDialogIconLoader.cpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/src/FileDialogIconLoaderLinux.cpp tgui-1.0-1.2.0+mantic/src/FileDialogIconLoaderLinux.cpp --- tgui-1.0-1.1.0+mantic/src/FileDialogIconLoaderLinux.cpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/src/FileDialogIconLoaderLinux.cpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/src/FileDialogIconLoaderWindows.cpp tgui-1.0-1.2.0+mantic/src/FileDialogIconLoaderWindows.cpp --- tgui-1.0-1.1.0+mantic/src/FileDialogIconLoaderWindows.cpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/src/FileDialogIconLoaderWindows.cpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/src/Filesystem.cpp tgui-1.0-1.2.0+mantic/src/Filesystem.cpp --- tgui-1.0-1.1.0+mantic/src/Filesystem.cpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/src/Filesystem.cpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/src/Font.cpp tgui-1.0-1.2.0+mantic/src/Font.cpp --- tgui-1.0-1.1.0+mantic/src/Font.cpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/src/Font.cpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. @@ -63,7 +63,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// Font::Font(const String& id) : - Font(Deserializer::deserialize(ObjectConverter::Type::Font, id).getFont()) // Did not compile with clang 3.6 when using braces + Font{Deserializer::deserialize(ObjectConverter::Type::Font, id).getFont()} { } diff -Nru tgui-1.0-1.1.0+mantic/src/Global.cpp tgui-1.0-1.2.0+mantic/src/Global.cpp --- tgui-1.0-1.1.0+mantic/src/Global.cpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/src/Global.cpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/src/Layout.cpp tgui-1.0-1.2.0+mantic/src/Layout.cpp --- tgui-1.0-1.1.0+mantic/src/Layout.cpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/src/Layout.cpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/src/Loading/DataIO.cpp tgui-1.0-1.2.0+mantic/src/Loading/DataIO.cpp --- tgui-1.0-1.1.0+mantic/src/Loading/DataIO.cpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/src/Loading/DataIO.cpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/src/Loading/Deserializer.cpp tgui-1.0-1.2.0+mantic/src/Loading/Deserializer.cpp --- tgui-1.0-1.1.0+mantic/src/Loading/Deserializer.cpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/src/Loading/Deserializer.cpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. @@ -460,7 +460,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - std::map Deserializer::m_deserializers = + std::unordered_map Deserializer::m_deserializers = { {ObjectConverter::Type::Bool, deserializeBool}, {ObjectConverter::Type::Font, deserializeFont}, diff -Nru tgui-1.0-1.1.0+mantic/src/Loading/ImageLoader.cpp tgui-1.0-1.2.0+mantic/src/Loading/ImageLoader.cpp --- tgui-1.0-1.1.0+mantic/src/Loading/ImageLoader.cpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/src/Loading/ImageLoader.cpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/src/Loading/Serializer.cpp tgui-1.0-1.2.0+mantic/src/Loading/Serializer.cpp --- tgui-1.0-1.1.0+mantic/src/Loading/Serializer.cpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/src/Loading/Serializer.cpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. @@ -288,7 +288,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - std::map Serializer::m_serializers = + std::unordered_map Serializer::m_serializers = { {ObjectConverter::Type::None, serializeEmptyObject}, {ObjectConverter::Type::Bool, serializeBool}, diff -Nru tgui-1.0-1.1.0+mantic/src/Loading/Theme.cpp tgui-1.0-1.2.0+mantic/src/Loading/Theme.cpp --- tgui-1.0-1.1.0+mantic/src/Loading/Theme.cpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/src/Loading/Theme.cpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. @@ -661,6 +661,71 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + void Theme::replace(const Theme& otherTheme) + { + m_primary = otherTheme.m_primary; + m_globalProperties = otherTheme.m_globalProperties; + + // Replace the existing renderers + auto existingRendererIt = m_renderers.begin(); + while (existingRendererIt != m_renderers.end()) + { + const auto& id = existingRendererIt->first; + auto& existingRenderer = existingRendererIt->second; + + // If the renderer doesn't exist in the other theme then disconnect the old renderer from this theme. + // Widgets using those old renderers will remain unmodified, but they will no longer be connected to this theme. + auto rendererToCopyIt = otherTheme.m_renderers.find(id); + if ((rendererToCopyIt == otherTheme.m_renderers.end()) && !m_themeLoader->canLoad(m_primary, id)) + { + if (existingRenderer->connectedTheme == this) + existingRenderer->connectedTheme = nullptr; + + existingRendererIt = m_renderers.erase(existingRendererIt); + continue; + } + + auto newRenderer = RendererData::create(); + newRenderer->connectedTheme = this; + newRenderer->observers = std::move(existingRenderer->observers); + + if (rendererToCopyIt != otherTheme.m_renderers.end()) + newRenderer->propertyValuePairs = rendererToCopyIt->second->propertyValuePairs; + else + { + const auto& properties = m_themeLoader->load(m_primary, id); + for (const auto& property : properties) + newRenderer->propertyValuePairs[property.first] = ObjectConverter(property.second); + } + + existingRenderer = newRenderer; + + // Update the existing widgets that were using the previous renderer from this theme + for (auto& observer : newRenderer->observers) + observer->setRenderer(newRenderer); + + ++existingRendererIt; + } + + // Add the renderers that only existed in the other renderers (e.g. added via the addRenderer function) + for (const auto& otherRendererPair : otherTheme.m_renderers) + { + const auto& id = otherRendererPair.first; + const auto& otherRenderer = otherRendererPair.second; + + auto rendererIt = m_renderers.find(id); + if (rendererIt != m_renderers.end()) + continue; // We already have the renderer, it would have been handled by the earlier loop + + auto newRenderer = RendererData::create(); + newRenderer->connectedTheme = this; + newRenderer->propertyValuePairs = otherRenderer->propertyValuePairs; + m_renderers[id] = newRenderer; + } + } + + ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + std::shared_ptr Theme::getRenderer(const String& id) { // If we already have this renderer in cache then just return it @@ -717,6 +782,8 @@ if (!renderer) renderer = RendererData::create(); + // If a renderer with the same id already existed then disconnect the old renderer from this theme. + // Widgets using the old renderer would thus remain unmodified. auto existingRendererIt = m_renderers.find(id); if (existingRendererIt != m_renderers.end()) { diff -Nru tgui-1.0-1.1.0+mantic/src/Loading/ThemeLoader.cpp tgui-1.0-1.2.0+mantic/src/Loading/ThemeLoader.cpp --- tgui-1.0-1.1.0+mantic/src/Loading/ThemeLoader.cpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/src/Loading/ThemeLoader.cpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/src/Loading/WidgetFactory.cpp tgui-1.0-1.2.0+mantic/src/Loading/WidgetFactory.cpp --- tgui-1.0-1.1.0+mantic/src/Loading/WidgetFactory.cpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/src/Loading/WidgetFactory.cpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/src/ObjectConverter.cpp tgui-1.0-1.2.0+mantic/src/ObjectConverter.cpp --- tgui-1.0-1.1.0+mantic/src/ObjectConverter.cpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/src/ObjectConverter.cpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/src/Renderers/BoxLayoutRenderer.cpp tgui-1.0-1.2.0+mantic/src/Renderers/BoxLayoutRenderer.cpp --- tgui-1.0-1.1.0+mantic/src/Renderers/BoxLayoutRenderer.cpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/src/Renderers/BoxLayoutRenderer.cpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/src/Renderers/ButtonRenderer.cpp tgui-1.0-1.2.0+mantic/src/Renderers/ButtonRenderer.cpp --- tgui-1.0-1.1.0+mantic/src/Renderers/ButtonRenderer.cpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/src/Renderers/ButtonRenderer.cpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/src/Renderers/ChatBoxRenderer.cpp tgui-1.0-1.2.0+mantic/src/Renderers/ChatBoxRenderer.cpp --- tgui-1.0-1.1.0+mantic/src/Renderers/ChatBoxRenderer.cpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/src/Renderers/ChatBoxRenderer.cpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/src/Renderers/ChildWindowRenderer.cpp tgui-1.0-1.2.0+mantic/src/Renderers/ChildWindowRenderer.cpp --- tgui-1.0-1.1.0+mantic/src/Renderers/ChildWindowRenderer.cpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/src/Renderers/ChildWindowRenderer.cpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/src/Renderers/ColorPickerRenderer.cpp tgui-1.0-1.2.0+mantic/src/Renderers/ColorPickerRenderer.cpp --- tgui-1.0-1.1.0+mantic/src/Renderers/ColorPickerRenderer.cpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/src/Renderers/ColorPickerRenderer.cpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/src/Renderers/ComboBoxRenderer.cpp tgui-1.0-1.2.0+mantic/src/Renderers/ComboBoxRenderer.cpp --- tgui-1.0-1.1.0+mantic/src/Renderers/ComboBoxRenderer.cpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/src/Renderers/ComboBoxRenderer.cpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/src/Renderers/EditBoxRenderer.cpp tgui-1.0-1.2.0+mantic/src/Renderers/EditBoxRenderer.cpp --- tgui-1.0-1.1.0+mantic/src/Renderers/EditBoxRenderer.cpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/src/Renderers/EditBoxRenderer.cpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/src/Renderers/FileDialogRenderer.cpp tgui-1.0-1.2.0+mantic/src/Renderers/FileDialogRenderer.cpp --- tgui-1.0-1.1.0+mantic/src/Renderers/FileDialogRenderer.cpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/src/Renderers/FileDialogRenderer.cpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/src/Renderers/GroupRenderer.cpp tgui-1.0-1.2.0+mantic/src/Renderers/GroupRenderer.cpp --- tgui-1.0-1.1.0+mantic/src/Renderers/GroupRenderer.cpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/src/Renderers/GroupRenderer.cpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/src/Renderers/KnobRenderer.cpp tgui-1.0-1.2.0+mantic/src/Renderers/KnobRenderer.cpp --- tgui-1.0-1.1.0+mantic/src/Renderers/KnobRenderer.cpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/src/Renderers/KnobRenderer.cpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/src/Renderers/LabelRenderer.cpp tgui-1.0-1.2.0+mantic/src/Renderers/LabelRenderer.cpp --- tgui-1.0-1.1.0+mantic/src/Renderers/LabelRenderer.cpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/src/Renderers/LabelRenderer.cpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/src/Renderers/ListBoxRenderer.cpp tgui-1.0-1.2.0+mantic/src/Renderers/ListBoxRenderer.cpp --- tgui-1.0-1.1.0+mantic/src/Renderers/ListBoxRenderer.cpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/src/Renderers/ListBoxRenderer.cpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/src/Renderers/ListViewRenderer.cpp tgui-1.0-1.2.0+mantic/src/Renderers/ListViewRenderer.cpp --- tgui-1.0-1.1.0+mantic/src/Renderers/ListViewRenderer.cpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/src/Renderers/ListViewRenderer.cpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/src/Renderers/MenuBarRenderer.cpp tgui-1.0-1.2.0+mantic/src/Renderers/MenuBarRenderer.cpp --- tgui-1.0-1.1.0+mantic/src/Renderers/MenuBarRenderer.cpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/src/Renderers/MenuBarRenderer.cpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/src/Renderers/MessageBoxRenderer.cpp tgui-1.0-1.2.0+mantic/src/Renderers/MessageBoxRenderer.cpp --- tgui-1.0-1.1.0+mantic/src/Renderers/MessageBoxRenderer.cpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/src/Renderers/MessageBoxRenderer.cpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/src/Renderers/PanelListBoxRenderer.cpp tgui-1.0-1.2.0+mantic/src/Renderers/PanelListBoxRenderer.cpp --- tgui-1.0-1.1.0+mantic/src/Renderers/PanelListBoxRenderer.cpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/src/Renderers/PanelListBoxRenderer.cpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/src/Renderers/PanelRenderer.cpp tgui-1.0-1.2.0+mantic/src/Renderers/PanelRenderer.cpp --- tgui-1.0-1.1.0+mantic/src/Renderers/PanelRenderer.cpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/src/Renderers/PanelRenderer.cpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/src/Renderers/PictureRenderer.cpp tgui-1.0-1.2.0+mantic/src/Renderers/PictureRenderer.cpp --- tgui-1.0-1.1.0+mantic/src/Renderers/PictureRenderer.cpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/src/Renderers/PictureRenderer.cpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/src/Renderers/ProgressBarRenderer.cpp tgui-1.0-1.2.0+mantic/src/Renderers/ProgressBarRenderer.cpp --- tgui-1.0-1.1.0+mantic/src/Renderers/ProgressBarRenderer.cpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/src/Renderers/ProgressBarRenderer.cpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/src/Renderers/RadioButtonRenderer.cpp tgui-1.0-1.2.0+mantic/src/Renderers/RadioButtonRenderer.cpp --- tgui-1.0-1.1.0+mantic/src/Renderers/RadioButtonRenderer.cpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/src/Renderers/RadioButtonRenderer.cpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/src/Renderers/RangeSliderRenderer.cpp tgui-1.0-1.2.0+mantic/src/Renderers/RangeSliderRenderer.cpp --- tgui-1.0-1.1.0+mantic/src/Renderers/RangeSliderRenderer.cpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/src/Renderers/RangeSliderRenderer.cpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/src/Renderers/ScrollablePanelRenderer.cpp tgui-1.0-1.2.0+mantic/src/Renderers/ScrollablePanelRenderer.cpp --- tgui-1.0-1.1.0+mantic/src/Renderers/ScrollablePanelRenderer.cpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/src/Renderers/ScrollablePanelRenderer.cpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/src/Renderers/ScrollbarRenderer.cpp tgui-1.0-1.2.0+mantic/src/Renderers/ScrollbarRenderer.cpp --- tgui-1.0-1.1.0+mantic/src/Renderers/ScrollbarRenderer.cpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/src/Renderers/ScrollbarRenderer.cpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/src/Renderers/SeparatorLineRenderer.cpp tgui-1.0-1.2.0+mantic/src/Renderers/SeparatorLineRenderer.cpp --- tgui-1.0-1.1.0+mantic/src/Renderers/SeparatorLineRenderer.cpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/src/Renderers/SeparatorLineRenderer.cpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/src/Renderers/SliderRenderer.cpp tgui-1.0-1.2.0+mantic/src/Renderers/SliderRenderer.cpp --- tgui-1.0-1.1.0+mantic/src/Renderers/SliderRenderer.cpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/src/Renderers/SliderRenderer.cpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/src/Renderers/SpinButtonRenderer.cpp tgui-1.0-1.2.0+mantic/src/Renderers/SpinButtonRenderer.cpp --- tgui-1.0-1.1.0+mantic/src/Renderers/SpinButtonRenderer.cpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/src/Renderers/SpinButtonRenderer.cpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/src/Renderers/TabsRenderer.cpp tgui-1.0-1.2.0+mantic/src/Renderers/TabsRenderer.cpp --- tgui-1.0-1.1.0+mantic/src/Renderers/TabsRenderer.cpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/src/Renderers/TabsRenderer.cpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/src/Renderers/TextAreaRenderer.cpp tgui-1.0-1.2.0+mantic/src/Renderers/TextAreaRenderer.cpp --- tgui-1.0-1.1.0+mantic/src/Renderers/TextAreaRenderer.cpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/src/Renderers/TextAreaRenderer.cpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/src/Renderers/TreeViewRenderer.cpp tgui-1.0-1.2.0+mantic/src/Renderers/TreeViewRenderer.cpp --- tgui-1.0-1.1.0+mantic/src/Renderers/TreeViewRenderer.cpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/src/Renderers/TreeViewRenderer.cpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/src/Renderers/WidgetRenderer.cpp tgui-1.0-1.2.0+mantic/src/Renderers/WidgetRenderer.cpp --- tgui-1.0-1.1.0+mantic/src/Renderers/WidgetRenderer.cpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/src/Renderers/WidgetRenderer.cpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/src/Signal.cpp tgui-1.0-1.2.0+mantic/src/Signal.cpp --- tgui-1.0-1.1.0+mantic/src/Signal.cpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/src/Signal.cpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/src/SignalManager.cpp tgui-1.0-1.2.0+mantic/src/SignalManager.cpp --- tgui-1.0-1.1.0+mantic/src/SignalManager.cpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/src/SignalManager.cpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/src/Sprite.cpp tgui-1.0-1.2.0+mantic/src/Sprite.cpp --- tgui-1.0-1.1.0+mantic/src/Sprite.cpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/src/Sprite.cpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/src/String.cpp tgui-1.0-1.2.0+mantic/src/String.cpp --- tgui-1.0-1.1.0+mantic/src/String.cpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/src/String.cpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/src/SubwidgetContainer.cpp tgui-1.0-1.2.0+mantic/src/SubwidgetContainer.cpp --- tgui-1.0-1.1.0+mantic/src/SubwidgetContainer.cpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/src/SubwidgetContainer.cpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. @@ -48,8 +48,8 @@ void SubwidgetContainer::setFocused(bool focused) { - m_container->setFocused(focused); Widget::setFocused(focused); + m_container->setFocused(m_focused); } ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// @@ -226,11 +226,15 @@ Widget::rendererChanged(property); - // Make sure to pass on the SubwidgetContainer's font to the internal container + // Make sure to pass on the SubwidgetContainer's font, opacity and text size to the internal container if (property == U"Font") { m_container->setInheritedFont(m_fontCached); } + else if ((property == U"Opacity") || (property == U"OpacityDisabled")) + { + m_container->setInheritedOpacity(m_opacityCached); + } } ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// @@ -325,6 +329,7 @@ bool SubwidgetContainer::updateTime(Duration elapsedTime) { + Widget::updateTime(elapsedTime); return m_container->updateTime(elapsedTime); } diff -Nru tgui-1.0-1.1.0+mantic/src/SvgImage.cpp tgui-1.0-1.2.0+mantic/src/SvgImage.cpp --- tgui-1.0-1.1.0+mantic/src/SvgImage.cpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/src/SvgImage.cpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/src/TGUI-Main-Module.cppm.in tgui-1.0-1.2.0+mantic/src/TGUI-Main-Module.cppm.in --- tgui-1.0-1.1.0+mantic/src/TGUI-Main-Module.cppm.in 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/src/TGUI-Main-Module.cppm.in 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. @@ -120,8 +120,11 @@ #include // Only needed by ImageLoader.cpp #include // Only needed by SvgImage.cpp -#ifdef _MSC_VER - #pragma warning(disable: 5244) // Ignore warnings about '#include' still being used below +// Ignore warnings about '#include' still being used below +#if defined(__clang__) + #pragma clang diagnostic ignored "-Winclude-angled-in-module-purview" +#elif defined(_MSC_VER) + #pragma warning(disable: 5244) #endif export module tgui; diff -Nru tgui-1.0-1.1.0+mantic/src/TGUI-Module.cppm.in tgui-1.0-1.2.0+mantic/src/TGUI-Module.cppm.in --- tgui-1.0-1.1.0+mantic/src/TGUI-Module.cppm.in 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/src/TGUI-Module.cppm.in 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. @@ -45,6 +45,7 @@ #include #include #include + #include #include #include #include @@ -120,6 +121,10 @@ #include #endif #endif +#if TGUI_HAS_RENDERER_BACKEND_SDL_RENDERER + struct SDL_Texture; + struct SDL_Renderer; +#endif #if TGUI_HAS_FONT_BACKEND_SDL_TTF #if SDL_MAJOR_VERSION >= 3 @@ -129,9 +134,34 @@ #endif #endif +#if TGUI_HAS_FONT_BACKEND_FREETYPE + #if defined(__GNUC__) + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wold-style-cast" + #endif + + #include + #include FT_FREETYPE_H + #include FT_GLYPH_H + #include FT_OUTLINE_H + #include FT_BITMAP_H + #include FT_STROKER_H + + #if defined(__GNUC__) + #pragma GCC diagnostic pop + #endif + + using FT_Library = struct FT_LibraryRec_*; + using FT_Face = struct FT_FaceRec_*; + using FT_Stroker = struct FT_StrokerRec_*; +#endif + #if TGUI_HAS_WINDOW_BACKEND_GLFW #define GLFW_INCLUDE_NONE // Don't let GLFW include an OpenGL extention loader #include + + using GLFWwindow = struct GLFWwindow; + using GLFWcursor = struct GLFWcursor; #endif #if defined(TGUI_SYSTEM_LINUX) && defined(TGUI_USE_X11) && ((TGUI_HAS_WINDOW_BACKEND_SFML && SFML_VERSION_MAJOR == 2 && SFML_VERSION_MINOR < 6) || TGUI_HAS_WINDOW_BACKEND_SDL) @@ -155,6 +185,9 @@ #endif #endif -#ifdef _MSC_VER - #pragma warning(disable: 5244) // Ignore warnings about '#include' still being used below +// Ignore warnings about '#include' still being used below +#if defined(__clang__) + #pragma clang diagnostic ignored "-Winclude-angled-in-module-purview" +#elif defined(_MSC_VER) + #pragma warning(disable: 5244) #endif diff -Nru tgui-1.0-1.1.0+mantic/src/Text.cpp tgui-1.0-1.2.0+mantic/src/Text.cpp --- tgui-1.0-1.1.0+mantic/src/Text.cpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/src/Text.cpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/src/TextStyle.cpp tgui-1.0-1.2.0+mantic/src/TextStyle.cpp --- tgui-1.0-1.1.0+mantic/src/TextStyle.cpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/src/TextStyle.cpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/src/Texture.cpp tgui-1.0-1.2.0+mantic/src/Texture.cpp --- tgui-1.0-1.1.0+mantic/src/Texture.cpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/src/Texture.cpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. @@ -403,6 +403,7 @@ { return (m_id == right.m_id) && (!m_id.empty() || (m_data == right.m_data)) + && (m_partRect == right.m_partRect) && (m_middleRect == right.m_middleRect) #if TGUI_HAS_RENDERER_BACKEND_SFML_GRAPHICS && (m_shader == right.m_shader) diff -Nru tgui-1.0-1.1.0+mantic/src/TextureManager.cpp tgui-1.0-1.2.0+mantic/src/TextureManager.cpp --- tgui-1.0-1.1.0+mantic/src/TextureManager.cpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/src/TextureManager.cpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/src/Timer.cpp tgui-1.0-1.2.0+mantic/src/Timer.cpp --- tgui-1.0-1.1.0+mantic/src/Timer.cpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/src/Timer.cpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/src/ToolTip.cpp tgui-1.0-1.2.0+mantic/src/ToolTip.cpp --- tgui-1.0-1.1.0+mantic/src/ToolTip.cpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/src/ToolTip.cpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/src/Transform.cpp tgui-1.0-1.2.0+mantic/src/Transform.cpp --- tgui-1.0-1.1.0+mantic/src/Transform.cpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/src/Transform.cpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. @@ -48,8 +48,8 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// Transform::Transform(float a00, float a01, float a02, - float a10, float a11, float a12, - float a20, float a21, float a22) + float a10, float a11, float a12, + float a20, float a21, float a22) { m_matrix[0] = a00; m_matrix[4] = a01; m_matrix[8] = 0.f; m_matrix[12] = a02; m_matrix[1] = a10; m_matrix[5] = a11; m_matrix[9] = 0.f; m_matrix[13] = a12; diff -Nru tgui-1.0-1.1.0+mantic/src/TwoFingerScrollDetect.cpp tgui-1.0-1.2.0+mantic/src/TwoFingerScrollDetect.cpp --- tgui-1.0-1.1.0+mantic/src/TwoFingerScrollDetect.cpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/src/TwoFingerScrollDetect.cpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/src/Widget.cpp tgui-1.0-1.2.0+mantic/src/Widget.cpp --- tgui-1.0-1.1.0+mantic/src/Widget.cpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/src/Widget.cpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. @@ -743,8 +743,6 @@ void Widget::showWithEffect(ShowEffectType type, Duration duration) { - setVisible(true); - // We store the state the widget is currently in. In the event another animation was already playing, we should try to // use the current state to start our animation at, but this is not the state that the widget should end at. We must // get this state BEFORE finishing the previous animation which is done by finishExistingConflictingAnimations. @@ -754,6 +752,9 @@ finishExistingConflictingAnimations(m_showAnimations, type); + // Show the widget AFTER finishing existing animations, as finishing a hide animation would leave the widget invisible + setVisible(true); + switch (type) { case ShowEffectType::Fade: @@ -1054,7 +1055,8 @@ if (m_parent) m_parent->childWidgetFocused(shared_from_this()); - onFocus.emit(this); + if (m_focused) // Might be altered by childWidgetFocused if the parent is disabled + onFocus.emit(this); } } else // Unfocusing widget diff -Nru tgui-1.0-1.1.0+mantic/src/Widgets/BitmapButton.cpp tgui-1.0-1.2.0+mantic/src/Widgets/BitmapButton.cpp --- tgui-1.0-1.1.0+mantic/src/Widgets/BitmapButton.cpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/src/Widgets/BitmapButton.cpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/src/Widgets/BoxLayout.cpp tgui-1.0-1.2.0+mantic/src/Widgets/BoxLayout.cpp --- tgui-1.0-1.1.0+mantic/src/Widgets/BoxLayout.cpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/src/Widgets/BoxLayout.cpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/src/Widgets/BoxLayoutRatios.cpp tgui-1.0-1.2.0+mantic/src/Widgets/BoxLayoutRatios.cpp --- tgui-1.0-1.1.0+mantic/src/Widgets/BoxLayoutRatios.cpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/src/Widgets/BoxLayoutRatios.cpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/src/Widgets/Button.cpp tgui-1.0-1.2.0+mantic/src/Widgets/Button.cpp --- tgui-1.0-1.1.0+mantic/src/Widgets/Button.cpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/src/Widgets/Button.cpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/src/Widgets/ButtonBase.cpp tgui-1.0-1.2.0+mantic/src/Widgets/ButtonBase.cpp --- tgui-1.0-1.1.0+mantic/src/Widgets/ButtonBase.cpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/src/Widgets/ButtonBase.cpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/src/Widgets/CanvasBase.cpp tgui-1.0-1.2.0+mantic/src/Widgets/CanvasBase.cpp --- tgui-1.0-1.1.0+mantic/src/Widgets/CanvasBase.cpp 1970-01-01 00:00:00.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/src/Widgets/CanvasBase.cpp 2024-03-23 12:27:01.000000000 +0000 @@ -0,0 +1,94 @@ +///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +// +// TGUI - Texus' Graphical User Interface +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) +// +// 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 + +///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +namespace tgui +{ + ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + + CanvasBase::CanvasBase(const char* typeName, bool initRenderer) : + ClickableWidget{typeName, initRenderer} + { + } + + ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + + void CanvasBase::ignoreMouseEvents(bool ignore) + { + m_ignoringMouseEvents = ignore; + } + + ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + + bool CanvasBase::isIgnoringMouseEvents() const + { + return m_ignoringMouseEvents; + } + + ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + + bool CanvasBase::canGainFocus() const + { + return false; + } + + ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + + bool CanvasBase::isMouseOnWidget(Vector2f pos) const + { + if (m_ignoringMouseEvents) + return false; + + return ClickableWidget::isMouseOnWidget(pos); + } + + ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + + std::unique_ptr CanvasBase::save(SavingRenderersMap& renderers) const + { + auto node = ClickableWidget::save(renderers); + + if (m_ignoringMouseEvents) + node->propertyValuePairs[U"IgnoreMouseEvents"] = std::make_unique(Serializer::serialize(m_ignoringMouseEvents)); + + return node; + } + + ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + + void CanvasBase::load(const std::unique_ptr& node, const LoadingRenderersMap& renderers) + { + ClickableWidget::load(node, renderers); + + if (node->propertyValuePairs[U"IgnoreMouseEvents"]) + ignoreMouseEvents(Deserializer::deserialize(ObjectConverter::Type::Bool, node->propertyValuePairs[U"IgnoreMouseEvents"]->value).getBool()); + } + + ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +} + +///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// diff -Nru tgui-1.0-1.1.0+mantic/src/Widgets/ChatBox.cpp tgui-1.0-1.2.0+mantic/src/Widgets/ChatBox.cpp --- tgui-1.0-1.1.0+mantic/src/Widgets/ChatBox.cpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/src/Widgets/ChatBox.cpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/src/Widgets/CheckBox.cpp tgui-1.0-1.2.0+mantic/src/Widgets/CheckBox.cpp --- tgui-1.0-1.1.0+mantic/src/Widgets/CheckBox.cpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/src/Widgets/CheckBox.cpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/src/Widgets/ChildWindow.cpp tgui-1.0-1.2.0+mantic/src/Widgets/ChildWindow.cpp --- tgui-1.0-1.1.0+mantic/src/Widgets/ChildWindow.cpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/src/Widgets/ChildWindow.cpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. @@ -303,6 +303,7 @@ void ChildWindow::setPosition(const Layout2d& position) { + bool positionMovedToKeepInParent = false; if (m_keepInParent && m_parent && (m_parent->getSize().x > 0) && (m_parent->getSize().y > 0)) { const Vector2f origin{getOrigin().x * getSize().x, getOrigin().y * getSize().y}; @@ -321,10 +322,12 @@ else if (x > m_parent->getSize().x - getSize().x) x = std::max(0.f, m_parent->getSize().x - getSize().x); + positionMovedToKeepInParent = true; Container::setPosition({x + origin.x, y + origin.y}); } } - else + + if (!positionMovedToKeepInParent) Container::setPosition(position); // Calculate the distance from the right side that the buttons will need diff -Nru tgui-1.0-1.1.0+mantic/src/Widgets/ClickableWidget.cpp tgui-1.0-1.2.0+mantic/src/Widgets/ClickableWidget.cpp --- tgui-1.0-1.1.0+mantic/src/Widgets/ClickableWidget.cpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/src/Widgets/ClickableWidget.cpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/src/Widgets/ColorPicker.cpp tgui-1.0-1.2.0+mantic/src/Widgets/ColorPicker.cpp --- tgui-1.0-1.1.0+mantic/src/Widgets/ColorPicker.cpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/src/Widgets/ColorPicker.cpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/src/Widgets/ComboBox.cpp tgui-1.0-1.2.0+mantic/src/Widgets/ComboBox.cpp --- tgui-1.0-1.1.0+mantic/src/Widgets/ComboBox.cpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/src/Widgets/ComboBox.cpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/src/Widgets/EditBox.cpp tgui-1.0-1.2.0+mantic/src/Widgets/EditBox.cpp --- tgui-1.0-1.1.0+mantic/src/Widgets/EditBox.cpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/src/Widgets/EditBox.cpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. @@ -393,6 +393,13 @@ void EditBox::setFocused(bool focused) { + const bool wasFocused = m_focused; + ClickableWidget::setFocused(focused); + + // Focusing the widget may fail if its parent is disabled + if (focused && !m_focused) + return; + if (m_parentGui) { if (focused) @@ -416,11 +423,9 @@ if (m_selChars) setCaretPosition(m_selEnd); - if (m_focused) - onReturnOrUnfocus.emit(this, m_text); + if (wasFocused) + emitReturnOrUnfocus(m_text); } - - ClickableWidget::setFocused(focused); } ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// @@ -569,7 +574,7 @@ if (event.code == Event::KeyboardKey::Enter) { onReturnKeyPress.emit(this, m_text); - onReturnOrUnfocus.emit(this, m_text); + emitReturnOrUnfocus(m_text); } else if (event.code == Event::KeyboardKey::Backspace) backspaceKeyPressed(); @@ -1559,6 +1564,17 @@ } ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + + void EditBox::emitReturnOrUnfocus(const String& text) + { + if (m_onReturnOrUnfocusEmitted) + return; + m_onReturnOrUnfocusEmitted = true; + onReturnOrUnfocus.emit(this, text); + m_onReturnOrUnfocusEmitted = false; + } + + ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// void EditBox::draw(BackendRenderTarget& target, RenderStates states) const { diff -Nru tgui-1.0-1.1.0+mantic/src/Widgets/FileDialog.cpp tgui-1.0-1.2.0+mantic/src/Widgets/FileDialog.cpp --- tgui-1.0-1.1.0+mantic/src/Widgets/FileDialog.cpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/src/Widgets/FileDialog.cpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/src/Widgets/Grid.cpp tgui-1.0-1.2.0+mantic/src/Widgets/Grid.cpp --- tgui-1.0-1.1.0+mantic/src/Widgets/Grid.cpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/src/Widgets/Grid.cpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. @@ -209,37 +209,71 @@ const std::size_t col = it->second.second; // Remove the widget from the grid - m_gridWidgets[row].erase(m_gridWidgets[row].begin() + static_cast(col)); - m_objPadding[row].erase(m_objPadding[row].begin() + static_cast(col)); - m_objAlignment[row].erase(m_objAlignment[row].begin() + static_cast(col)); m_widgetCells.erase(widget); - - // Check if this is the last column - if (m_columnWidth.size() == m_gridWidgets[row].size() + 1) + if (col + 1 < m_gridWidgets[row].size()) + { + m_gridWidgets[row][col] = nullptr; + m_objPadding[row][col] = {}; + m_objAlignment[row][col] = {}; + } + else { - // Check if there is another row with this many columns - bool rowFound = false; - for (const auto& gridWidgetsRow : m_gridWidgets) + m_gridWidgets[row].pop_back(); + m_objPadding[row].pop_back(); + m_objAlignment[row].pop_back(); + + // If the cells on the same row as the removed widget are empty then remove them + while (!m_gridWidgets[row].empty() && !m_gridWidgets[row].back()) { - if (gridWidgetsRow.size() >= m_columnWidth.size()) - { - rowFound = true; - break; - } + m_gridWidgets[row].pop_back(); + m_objPadding[row].pop_back(); + m_objAlignment[row].pop_back(); } + } + + // Update the width of the column that used to contain the widget + m_columnWidth[col] = 0; + for (std::size_t r = 0; r < m_gridWidgets.size(); ++r) + { + if ((m_gridWidgets[r].size() <= col) || !m_gridWidgets[r][col]) + continue; + + if (m_columnWidth[col] < m_gridWidgets[r][col]->getFullSize().x + m_objPadding[r][col].getLeft() + m_objPadding[r][col].getRight()) + m_columnWidth[col] = m_gridWidgets[r][col]->getFullSize().x + m_objPadding[r][col].getLeft() + m_objPadding[r][col].getRight(); + } - // Erase the last column if no other row is using it - if (!rowFound) - m_columnWidth.erase(m_columnWidth.end() - 1); + // Update the height of the row that used to contain the widget + m_rowHeight[row] = 0; + for (std::size_t c = 0; c < m_gridWidgets[row].size(); ++c) + { + if (!m_gridWidgets[row][c]) + continue; + + if (m_rowHeight[row] < m_gridWidgets[row][c]->getFullSize().y + m_objPadding[row][c].getTop() + m_objPadding[row][c].getBottom()) + m_rowHeight[row] = m_gridWidgets[row][c]->getFullSize().y + m_objPadding[row][c].getTop() + m_objPadding[row][c].getBottom(); + } + + // If this was the last column and it is now empty then remove the empty columns at the end + if (col + 1 == m_columnWidth.size()) + { + std::size_t nrUsedColumns = 0; + for (std::size_t r = 0; r < m_gridWidgets.size(); ++r) + nrUsedColumns = std::max(nrUsedColumns, m_gridWidgets[r].size()); + + if (m_columnWidth.size() > nrUsedColumns) + m_columnWidth.resize(nrUsedColumns); } - // If the row is empty then remove it as well - if (m_gridWidgets[row].empty()) - { - m_gridWidgets.erase(m_gridWidgets.begin() + static_cast(row)); - m_objPadding.erase(m_objPadding.begin() + static_cast(row)); - m_objAlignment.erase(m_objAlignment.begin() + static_cast(row)); - m_rowHeight.erase(m_rowHeight.begin() + static_cast(row)); + // If this was the last row and it is now empty then remove the empty rows at the end + if (row + 1 == m_gridWidgets.size()) + { + while (!m_gridWidgets.empty() && m_gridWidgets.back().empty()) + { + m_gridWidgets.pop_back(); + m_objPadding.pop_back(); + m_objAlignment.pop_back(); + m_rowHeight.pop_back(); + } } // Update the positions of all remaining widgets diff -Nru tgui-1.0-1.1.0+mantic/src/Widgets/Group.cpp tgui-1.0-1.2.0+mantic/src/Widgets/Group.cpp --- tgui-1.0-1.1.0+mantic/src/Widgets/Group.cpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/src/Widgets/Group.cpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/src/Widgets/HorizontalLayout.cpp tgui-1.0-1.2.0+mantic/src/Widgets/HorizontalLayout.cpp --- tgui-1.0-1.1.0+mantic/src/Widgets/HorizontalLayout.cpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/src/Widgets/HorizontalLayout.cpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/src/Widgets/HorizontalWrap.cpp tgui-1.0-1.2.0+mantic/src/Widgets/HorizontalWrap.cpp --- tgui-1.0-1.1.0+mantic/src/Widgets/HorizontalWrap.cpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/src/Widgets/HorizontalWrap.cpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/src/Widgets/Knob.cpp tgui-1.0-1.2.0+mantic/src/Widgets/Knob.cpp --- tgui-1.0-1.1.0+mantic/src/Widgets/Knob.cpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/src/Widgets/Knob.cpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/src/Widgets/Label.cpp tgui-1.0-1.2.0+mantic/src/Widgets/Label.cpp --- tgui-1.0-1.1.0+mantic/src/Widgets/Label.cpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/src/Widgets/Label.cpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/src/Widgets/ListBox.cpp tgui-1.0-1.2.0+mantic/src/Widgets/ListBox.cpp --- tgui-1.0-1.1.0+mantic/src/Widgets/ListBox.cpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/src/Widgets/ListBox.cpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/src/Widgets/ListView.cpp tgui-1.0-1.2.0+mantic/src/Widgets/ListView.cpp --- tgui-1.0-1.1.0+mantic/src/Widgets/ListView.cpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/src/Widgets/ListView.cpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. @@ -2742,7 +2742,7 @@ if (m_horizontalScrollbar->isShown()) { m_verticalScrollbar->setSize({m_verticalScrollbar->getSize().x, std::max(0.f, getInnerSize().y) - m_horizontalScrollbar->getSize().y}); - m_verticalScrollbar->setViewportSize(static_cast(innerSize.y - m_horizontalScrollbar->getSize().y)); + m_verticalScrollbar->setViewportSize(static_cast(std::max(0.f, innerSize.y - m_horizontalScrollbar->getSize().y))); } else { @@ -2753,7 +2753,7 @@ if (m_verticalScrollbar->isShown()) { m_horizontalScrollbar->setSize({getInnerSize().x - m_verticalScrollbar->getSize().x, m_horizontalScrollbar->getSize().y}); - m_horizontalScrollbar->setViewportSize(static_cast(innerSize.x - m_verticalScrollbar->getSize().x)); + m_horizontalScrollbar->setViewportSize(static_cast(std::max(0.f, innerSize.x - m_verticalScrollbar->getSize().x))); } else { diff -Nru tgui-1.0-1.1.0+mantic/src/Widgets/MenuBar.cpp tgui-1.0-1.2.0+mantic/src/Widgets/MenuBar.cpp --- tgui-1.0-1.1.0+mantic/src/Widgets/MenuBar.cpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/src/Widgets/MenuBar.cpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/src/Widgets/MessageBox.cpp tgui-1.0-1.2.0+mantic/src/Widgets/MessageBox.cpp --- tgui-1.0-1.1.0+mantic/src/Widgets/MessageBox.cpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/src/Widgets/MessageBox.cpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/src/Widgets/Panel.cpp tgui-1.0-1.2.0+mantic/src/Widgets/Panel.cpp --- tgui-1.0-1.1.0+mantic/src/Widgets/Panel.cpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/src/Widgets/Panel.cpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. @@ -35,6 +35,10 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + bool Panel::m_eventBubbling = false; // TGUI_NEXT: true by default + remove this flag + + ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + Panel::Panel(const char* typeName, bool initRenderer) : Group{typeName, false} { @@ -126,9 +130,15 @@ bool Panel::leftMousePressed(Vector2f pos) { - onMousePress.emit(this, pos - getPosition()); + if (!m_eventBubbling) + onMousePress.emit(this, pos - getPosition()); + + const bool draggingWidget = Container::leftMousePressed(pos); + + if (m_eventBubbling && !draggingWidget && !m_widgetBelowMouse) + onMousePress.emit(this, pos - getPosition()); - return Container::leftMousePressed(pos); + return draggingWidget; } ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// @@ -137,14 +147,28 @@ { const bool mouseDown = m_mouseDown; - onMouseRelease.emit(this, pos - getPosition()); - - if (m_mouseDown) - onClick.emit(this, pos - getPosition()); + if (!m_eventBubbling) + { + onMouseRelease.emit(this, pos - getPosition()); + if (mouseDown) + onClick.emit(this, pos - getPosition()); + } Container::leftMouseReleased(pos); - if (mouseDown) + if (m_eventBubbling) + { + if (m_widgetBelowMouse) + m_possibleDoubleClick = false; + else + { + onMouseRelease.emit(this, pos - getPosition()); + if (mouseDown) + onClick.emit(this, pos - getPosition()); + } + } + + if (mouseDown && (!m_eventBubbling || !m_widgetBelowMouse)) { // Check if you double-clicked if (m_possibleDoubleClick) @@ -164,24 +188,44 @@ void Panel::rightMousePressed(Vector2f pos) { - m_rightMouseDown = true; - onRightMousePress.emit(this, pos - getPosition()); + if (!m_eventBubbling) + { + m_rightMouseDown = true; + onRightMousePress.emit(this, pos - getPosition()); + } Container::rightMousePressed(pos); + + if (m_eventBubbling && !m_widgetBelowMouse) + { + m_rightMouseDown = true; + onRightMousePress.emit(this, pos - getPosition()); + } } ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// void Panel::rightMouseReleased(Vector2f pos) { - onRightMouseRelease.emit(this, pos - getPosition()); + const bool rightMouseDown = m_rightMouseDown; - if (m_rightMouseDown) - onRightClick.emit(this, pos - getPosition()); + if (!m_eventBubbling) + { + onRightMouseRelease.emit(this, pos - getPosition()); + if (rightMouseDown) + onRightClick.emit(this, pos - getPosition()); + } m_rightMouseDown = false; Container::rightMouseReleased(pos); + + if (m_eventBubbling && !m_widgetBelowMouse) + { + onRightMouseRelease.emit(this, pos - getPosition()); + if (rightMouseDown) + onRightClick.emit(this, pos - getPosition()); + } } ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// @@ -193,6 +237,20 @@ } ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + + void Panel::setEventBubbling(bool useEventBubbling) + { + m_eventBubbling = useEventBubbling; + } + + ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + + bool Panel::getEventBubbling() + { + return m_eventBubbling; + } + + ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// Signal& Panel::getSignal(String signalName) { diff -Nru tgui-1.0-1.1.0+mantic/src/Widgets/PanelListBox.cpp tgui-1.0-1.2.0+mantic/src/Widgets/PanelListBox.cpp --- tgui-1.0-1.1.0+mantic/src/Widgets/PanelListBox.cpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/src/Widgets/PanelListBox.cpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. @@ -145,7 +145,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - void PanelListBox::setItemsHeight(const Layout& height) const + void PanelListBox::setItemsHeight(const Layout& height) { m_panelTemplate->setSize(m_panelTemplate->getSize().x, height); diff -Nru tgui-1.0-1.1.0+mantic/src/Widgets/Picture.cpp tgui-1.0-1.2.0+mantic/src/Widgets/Picture.cpp --- tgui-1.0-1.1.0+mantic/src/Widgets/Picture.cpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/src/Widgets/Picture.cpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/src/Widgets/ProgressBar.cpp tgui-1.0-1.2.0+mantic/src/Widgets/ProgressBar.cpp --- tgui-1.0-1.1.0+mantic/src/Widgets/ProgressBar.cpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/src/Widgets/ProgressBar.cpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/src/Widgets/RadioButton.cpp tgui-1.0-1.2.0+mantic/src/Widgets/RadioButton.cpp --- tgui-1.0-1.1.0+mantic/src/Widgets/RadioButton.cpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/src/Widgets/RadioButton.cpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. @@ -169,7 +169,11 @@ void RadioButton::setText(const String& text) { + if (m_text.getString() == text) + return; + m_text.setString(text); + onSizeChange.emit(this, getSize()); } ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// diff -Nru tgui-1.0-1.1.0+mantic/src/Widgets/RadioButtonGroup.cpp tgui-1.0-1.2.0+mantic/src/Widgets/RadioButtonGroup.cpp --- tgui-1.0-1.1.0+mantic/src/Widgets/RadioButtonGroup.cpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/src/Widgets/RadioButtonGroup.cpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/src/Widgets/RangeSlider.cpp tgui-1.0-1.2.0+mantic/src/Widgets/RangeSlider.cpp --- tgui-1.0-1.1.0+mantic/src/Widgets/RangeSlider.cpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/src/Widgets/RangeSlider.cpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/src/Widgets/RichTextLabel.cpp tgui-1.0-1.2.0+mantic/src/Widgets/RichTextLabel.cpp --- tgui-1.0-1.1.0+mantic/src/Widgets/RichTextLabel.cpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/src/Widgets/RichTextLabel.cpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/src/Widgets/ScrollablePanel.cpp tgui-1.0-1.2.0+mantic/src/Widgets/ScrollablePanel.cpp --- tgui-1.0-1.1.0+mantic/src/Widgets/ScrollablePanel.cpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/src/Widgets/ScrollablePanel.cpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. @@ -212,7 +212,10 @@ if (m_contentSize == Vector2f{0, 0}) { - const Vector2f bottomRight = widget->getPosition() + widget->getFullSize(); + const Vector2f bottomRight{ + widget->getPosition().x - (widget->getOrigin().x * widget->getSize().x) + widget->getFullSize().x, + widget->getPosition().y - (widget->getOrigin().y * widget->getSize().y) + widget->getFullSize().y + }; if (bottomRight.x > m_mostBottomRightPosition.x) m_mostBottomRightPosition.x = bottomRight.x; if (bottomRight.y > m_mostBottomRightPosition.y) @@ -246,7 +249,10 @@ if (m_contentSize == Vector2f{0, 0}) { - const Vector2f bottomRight = widget->getPosition() + widget->getFullSize(); + const Vector2f bottomRight{ + widget->getPosition().x - (widget->getOrigin().x * widget->getSize().x) + widget->getFullSize().x, + widget->getPosition().y - (widget->getOrigin().y * widget->getSize().y) + widget->getFullSize().y + }; if ((bottomRight.x == m_mostBottomRightPosition.x) || (bottomRight.y == m_mostBottomRightPosition.y)) { recalculateMostBottomRightPosition(); @@ -477,11 +483,15 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - Widget::Ptr ScrollablePanel::getWidgetAtPosition(Vector2f pos) const + Widget::Ptr ScrollablePanel::getWidgetAtPos(Vector2f pos, bool recursive) const { + const Vector2f widgetsOffset = getChildWidgetsOffset(); + if ((pos.x < widgetsOffset.x) || (pos.y < widgetsOffset.y)) + return nullptr; + pos.x += static_cast(m_horizontalScrollbar->getValue()); pos.y += static_cast(m_verticalScrollbar->getValue()); - return Panel::getWidgetAtPosition(pos); + return Panel::getWidgetAtPos(pos, recursive); } ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// @@ -859,7 +869,10 @@ for (const auto& widget : m_widgets) { - const Vector2f bottomRight = widget->getPosition() + widget->getFullSize(); + const Vector2f bottomRight{ + widget->getPosition().x - (widget->getOrigin().x * widget->getSize().x) + widget->getFullSize().x, + widget->getPosition().y - (widget->getOrigin().y * widget->getSize().y) + widget->getFullSize().y + }; if (bottomRight.x > m_mostBottomRightPosition.x) m_mostBottomRightPosition.x = bottomRight.x; if (bottomRight.y > m_mostBottomRightPosition.y) diff -Nru tgui-1.0-1.1.0+mantic/src/Widgets/Scrollbar.cpp tgui-1.0-1.2.0+mantic/src/Widgets/Scrollbar.cpp --- tgui-1.0-1.1.0+mantic/src/Widgets/Scrollbar.cpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/src/Widgets/Scrollbar.cpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/src/Widgets/SeparatorLine.cpp tgui-1.0-1.2.0+mantic/src/Widgets/SeparatorLine.cpp --- tgui-1.0-1.1.0+mantic/src/Widgets/SeparatorLine.cpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/src/Widgets/SeparatorLine.cpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/src/Widgets/Slider.cpp tgui-1.0-1.2.0+mantic/src/Widgets/Slider.cpp --- tgui-1.0-1.1.0+mantic/src/Widgets/Slider.cpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/src/Widgets/Slider.cpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/src/Widgets/SpinButton.cpp tgui-1.0-1.2.0+mantic/src/Widgets/SpinButton.cpp --- tgui-1.0-1.1.0+mantic/src/Widgets/SpinButton.cpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/src/Widgets/SpinButton.cpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/src/Widgets/SpinControl.cpp tgui-1.0-1.2.0+mantic/src/Widgets/SpinControl.cpp --- tgui-1.0-1.1.0+mantic/src/Widgets/SpinControl.cpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/src/Widgets/SpinControl.cpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/src/Widgets/TabContainer.cpp tgui-1.0-1.2.0+mantic/src/Widgets/TabContainer.cpp --- tgui-1.0-1.1.0+mantic/src/Widgets/TabContainer.cpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/src/Widgets/TabContainer.cpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/src/Widgets/Tabs.cpp tgui-1.0-1.2.0+mantic/src/Widgets/Tabs.cpp --- tgui-1.0-1.1.0+mantic/src/Widgets/Tabs.cpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/src/Widgets/Tabs.cpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. @@ -240,8 +240,8 @@ { if (m_selectedTab >= 0) { - updateTextColors(); m_selectedTab = -1; + updateTextColors(); } } diff -Nru tgui-1.0-1.1.0+mantic/src/Widgets/TextArea.cpp tgui-1.0-1.2.0+mantic/src/Widgets/TextArea.cpp --- tgui-1.0-1.1.0+mantic/src/Widgets/TextArea.cpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/src/Widgets/TextArea.cpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. @@ -399,6 +399,12 @@ void TextArea::setFocused(bool focused) { + Widget::setFocused(focused); + + // Focusing the widget may fail if its parent is disabled + if (focused && !m_focused) + return; + const Vector2f caretPosition = {m_caretPosition.x + m_bordersCached.getLeft() + m_paddingCached.getLeft() - static_cast(m_horizontalScrollbar->getValue()), m_caretPosition.y + m_bordersCached.getTop() + m_paddingCached.getTop() - static_cast(m_verticalScrollbar->getValue())}; @@ -438,8 +444,6 @@ updateSelectionTexts(); } } - - Widget::setFocused(focused); } ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// diff -Nru tgui-1.0-1.1.0+mantic/src/Widgets/ToggleButton.cpp tgui-1.0-1.2.0+mantic/src/Widgets/ToggleButton.cpp --- tgui-1.0-1.1.0+mantic/src/Widgets/ToggleButton.cpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/src/Widgets/ToggleButton.cpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/src/Widgets/TreeView.cpp tgui-1.0-1.2.0+mantic/src/Widgets/TreeView.cpp --- tgui-1.0-1.1.0+mantic/src/Widgets/TreeView.cpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/src/Widgets/TreeView.cpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. @@ -425,6 +425,21 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + bool TreeView::changeItem(const std::vector& hierarchy, const String& leafText) + { + if (hierarchy.empty()) + return false; + + auto* node = findNode(m_nodes, hierarchy, 0); + if (!node) + return false; + + node->text.setString(leafText); + return true; + } + + ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + void TreeView::expand(const std::vector& hierarchy) { expandOrCollapse(hierarchy, true); @@ -582,6 +597,25 @@ } ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + + TreeView::ConstNode TreeView::getNode(const std::vector& hierarchy) const + { + TreeView::ConstNode constNode; + + if (hierarchy.empty()) + return constNode; + + auto* node = findNode(m_nodes, hierarchy, 0); + if (!node) + return constNode; + + constNode.expanded = node->expanded; + constNode.text = node->text.getString(); + constNode.nodes = convertNodesToConstNodes(node->nodes); + return constNode; + } + + ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// std::vector TreeView::getNodes() const { diff -Nru tgui-1.0-1.1.0+mantic/src/Widgets/VerticalLayout.cpp tgui-1.0-1.2.0+mantic/src/Widgets/VerticalLayout.cpp --- tgui-1.0-1.1.0+mantic/src/Widgets/VerticalLayout.cpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/src/Widgets/VerticalLayout.cpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/src/WindowsIMM.cpp tgui-1.0-1.2.0+mantic/src/WindowsIMM.cpp --- tgui-1.0-1.1.0+mantic/src/WindowsIMM.cpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/src/WindowsIMM.cpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/tests/AbsoluteOrRelativeValue.cpp tgui-1.0-1.2.0+mantic/tests/AbsoluteOrRelativeValue.cpp --- tgui-1.0-1.1.0+mantic/tests/AbsoluteOrRelativeValue.cpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/tests/AbsoluteOrRelativeValue.cpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/tests/Animation.cpp tgui-1.0-1.2.0+mantic/tests/Animation.cpp --- tgui-1.0-1.1.0+mantic/tests/Animation.cpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/tests/Animation.cpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/tests/BackendEvents.cpp tgui-1.0-1.2.0+mantic/tests/BackendEvents.cpp --- tgui-1.0-1.1.0+mantic/tests/BackendEvents.cpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/tests/BackendEvents.cpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. @@ -291,7 +291,11 @@ { sf::Event eventSFML; eventSFML.type = sf::Event::MouseWheelScrolled; +#if SFML_VERSION_MAJOR >= 3 + eventSFML.mouseWheelScroll.wheel = sf::Mouse::Wheel::Vertical; +#else eventSFML.mouseWheelScroll.wheel = sf::Mouse::Wheel::VerticalWheel; +#endif eventSFML.mouseWheelScroll.delta = 2; eventSFML.mouseWheelScroll.x = 200; eventSFML.mouseWheelScroll.y = 150; @@ -304,7 +308,11 @@ REQUIRE(eventTGUI.mouseWheel.y == 150); // We only handle vertical scrolling +#if SFML_VERSION_MAJOR >= 3 + eventSFML.mouseWheelScroll.wheel = sf::Mouse::Wheel::Horizontal; +#else eventSFML.mouseWheelScroll.wheel = sf::Mouse::Wheel::HorizontalWheel; +#endif REQUIRE(!backendGuiSFML->convertEvent(eventSFML, eventTGUI)); } @@ -332,7 +340,11 @@ REQUIRE(eventTGUI.mouseButton.button == tgui::Event::MouseButton::Middle); // Only left, middle and right mouse buttons are handled +#if SFML_VERSION_MAJOR >= 3 + eventSFML.mouseButton.button = sf::Mouse::Button::Extra1; +#else eventSFML.mouseButton.button = sf::Mouse::Button::XButton1; +#endif REQUIRE(!backendGuiSFML->convertEvent(eventSFML, eventTGUI)); } @@ -360,7 +372,11 @@ REQUIRE(eventTGUI.mouseButton.button == tgui::Event::MouseButton::Middle); // Only left, middle and right mouse buttons are handled +#if SFML_VERSION_MAJOR >= 3 + eventSFML.mouseButton.button = sf::Mouse::Button::Extra1; +#else eventSFML.mouseButton.button = sf::Mouse::Button::XButton1; +#endif REQUIRE(!backendGuiSFML->convertEvent(eventSFML, eventTGUI)); } @@ -481,7 +497,11 @@ // Scroll the mouse wheel on top of the slider and verify that its value changes eventSFML.type = sf::Event::MouseWheelScrolled; +#if SFML_VERSION_MAJOR >= 3 + eventSFML.mouseWheelScroll.wheel = sf::Mouse::Wheel::Vertical; +#else eventSFML.mouseWheelScroll.wheel = sf::Mouse::Wheel::VerticalWheel; +#endif eventSFML.mouseWheelScroll.delta = 4; eventSFML.mouseWheelScroll.x = 260; eventSFML.mouseWheelScroll.y = 80; @@ -774,11 +794,20 @@ { SDL_Event eventSDL; eventSDL.type = SDL_EVENT_TEXT_INPUT; +#if SDL_MAJOR_VERSION >= 3 + char textInput[4] = { + static_cast(static_cast(0xE2)), + static_cast(static_cast(0x9C)), + static_cast(static_cast(0x85)), + '\0' + }; + eventSDL.text.text = textInput; +#else eventSDL.text.text[0] = static_cast(static_cast(0xE2)); eventSDL.text.text[1] = static_cast(static_cast(0x9C)); eventSDL.text.text[2] = static_cast(static_cast(0x85)); eventSDL.text.text[3] = '\0'; - +#endif tgui::Event eventTGUI; REQUIRE(backendGuiSDL->convertEvent(eventSDL, eventTGUI)); REQUIRE(eventTGUI.type == tgui::Event::Type::TextEntered); @@ -789,16 +818,19 @@ { SDL_Event eventSDL; -#if ((SDL_MAJOR_VERSION == 2) && (SDL_MINOR_VERSION < 26)) +#if SDL_MAJOR_VERSION >= 3 + eventSDL.wheel.mouse_x = 200; + eventSDL.wheel.mouse_y = 150; +#elif ((SDL_MAJOR_VERSION == 2) && (SDL_MINOR_VERSION >= 26)) + eventSDL.wheel.mouseX = 200; + eventSDL.wheel.mouseY = 150; +#else // SDL < 2.26 had no mouse position in its mouse scroll event, so first simulate a mouse move eventSDL.type = SDL_MOUSEMOTION; eventSDL.motion.which = 1; eventSDL.motion.x = 200; eventSDL.motion.y = 150; backendGuiSDL->handleEvent(eventSDL); -#else - eventSDL.wheel.mouseX = 200; - eventSDL.wheel.mouseY = 150; #endif eventSDL.type = SDL_EVENT_MOUSE_WHEEL; @@ -914,8 +946,13 @@ SDL_Event eventSDL; eventSDL.type = SDL_EVENT_FINGER_DOWN; +#if SDL_MAJOR_VERSION >= 3 + eventSDL.tfinger.touchID = 1; + eventSDL.tfinger.fingerID = 1; +#else eventSDL.tfinger.touchId = 1; eventSDL.tfinger.fingerId = 1; +#endif eventSDL.tfinger.x = 200.f / windowSize.x; eventSDL.tfinger.y = 150.f / windowSize.y; @@ -998,6 +1035,15 @@ // Type 3 characters in the edit box SDL_Event eventSDL; eventSDL.type = SDL_EVENT_TEXT_INPUT; +#if SDL_MAJOR_VERSION >= 3 + char textInput[2] = "A"; + eventSDL.text.text = textInput; + backendGuiSDL->handleEvent(eventSDL); + textInput[0] = 'B'; + backendGuiSDL->handleEvent(eventSDL); + textInput[0] = 'C'; + backendGuiSDL->handleEvent(eventSDL); +#else eventSDL.text.text[0] = 'A'; eventSDL.text.text[1] = 0; backendGuiSDL->handleEvent(eventSDL); @@ -1005,7 +1051,7 @@ backendGuiSDL->handleEvent(eventSDL); eventSDL.text.text[0] = 'C'; backendGuiSDL->handleEvent(eventSDL); - +#endif // Erase the second character from the edit box eventSDL.type = SDL_EVENT_KEY_DOWN; eventSDL.key.windowID = 0; @@ -1022,15 +1068,18 @@ REQUIRE(editBox->getText() == "AC"); // Scroll the mouse wheel on top of the slider and verify that its value changes -#if ((SDL_MAJOR_VERSION == 2) && (SDL_MINOR_VERSION < 26)) +#if SDL_MAJOR_VERSION >= 3 + eventSDL.wheel.mouse_x = 260; + eventSDL.wheel.mouse_y = 80; +#elif ((SDL_MAJOR_VERSION == 2) && (SDL_MINOR_VERSION >= 26)) + eventSDL.wheel.mouseX = 260; + eventSDL.wheel.mouseY = 80; +#else eventSDL.type = SDL_MOUSEMOTION; eventSDL.motion.which = 1; eventSDL.motion.x = 260; eventSDL.motion.y = 80; backendGuiSDL->handleEvent(eventSDL); -#else - eventSDL.wheel.mouseX = 260; - eventSDL.wheel.mouseY = 80; #endif eventSDL.type = SDL_EVENT_MOUSE_WHEEL; eventSDL.wheel.direction = SDL_MOUSEWHEEL_NORMAL; @@ -1091,7 +1140,11 @@ // Note that the resizing ignores the position of the touch ended event const tgui::Vector2f windowSize = backendGuiSDL->getViewport().getSize(); eventSDL.type = SDL_EVENT_FINGER_DOWN; +#if SDL_MAJOR_VERSION >= 3 + eventSDL.tfinger.touchID = 1; +#else eventSDL.tfinger.touchId = 1; +#endif eventSDL.tfinger.x = 100.f / windowSize.x; eventSDL.tfinger.y = 260.f / windowSize.y; backendGuiSDL->handleEvent(eventSDL); diff -Nru tgui-1.0-1.1.0+mantic/tests/CMakeLists.txt tgui-1.0-1.2.0+mantic/tests/CMakeLists.txt --- tgui-1.0-1.1.0+mantic/tests/CMakeLists.txt 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/tests/CMakeLists.txt 2024-03-23 12:27:01.000000000 +0000 @@ -1,6 +1,6 @@ #################################################################################################### # TGUI - Texus' Graphical User Interface -# Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +# Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) # # 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. @@ -194,26 +194,41 @@ # Set the RPATH of the executable on Linux (and BSD) if(TGUI_SHARED_LIBS AND TGUI_OS_LINUX) - file(RELATIVE_PATH rel_lib_dir - ${CMAKE_INSTALL_PREFIX}/${target_install_dir} - ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}) + if (CMAKE_VERSION VERSION_GREATER_EQUAL 3.20) + cmake_path(SET lib_dir NORMALIZE "${CMAKE_INSTALL_PREFIX}") + cmake_path(APPEND lib_dir "${CMAKE_INSTALL_LIBDIR}") + + cmake_path(SET exe_dir NORMALIZE "${CMAKE_INSTALL_PREFIX}") + cmake_path(APPEND exe_dir "${target_install_dir}") + + set(rel_lib_dir "${lib_dir}") + cmake_path(RELATIVE_PATH rel_lib_dir BASE_DIRECTORY "${exe_dir}") + else() + # This code for CMake < 3.20 only works if CMAKE_INSTALL_PREFIX is an absolute path + file(RELATIVE_PATH rel_lib_dir + "${CMAKE_INSTALL_PREFIX}/${target_install_dir}" + "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}") + endif() set_target_properties(tests PROPERTIES - INSTALL_RPATH "$ORIGIN/${rel_lib_dir}") + INSTALL_RPATH "$ORIGIN/${rel_lib_dir}" # RPATH will contain relative path to where we installed our own library + INSTALL_RPATH_USE_LINK_PATH TRUE) # RPATH will contain paths to our dependencies endif() -# Add the install rule for the executable -install(TARGETS tests - RUNTIME DESTINATION ${target_install_dir} COMPONENT tests - BUNDLE DESTINATION ${target_install_dir} COMPONENT tests) - -# Install the resources next to the test executable -install(DIRECTORY "${PROJECT_SOURCE_DIR}/tests/resources" - DESTINATION "${target_install_dir}" - COMPONENT tests) -install(DIRECTORY "${PROJECT_SOURCE_DIR}/tests/expected" - DESTINATION "${target_install_dir}" - COMPONENT tests) -install(DIRECTORY "${PROJECT_SOURCE_DIR}/themes/" - DESTINATION "${target_install_dir}/resources" - COMPONENT tests) +if (TGUI_INSTALL) + # Add the install rule for the executable + install(TARGETS tests + RUNTIME DESTINATION ${target_install_dir} COMPONENT tests + BUNDLE DESTINATION ${target_install_dir} COMPONENT tests) + + # Install the resources next to the test executable + install(DIRECTORY "${PROJECT_SOURCE_DIR}/tests/resources" + DESTINATION "${target_install_dir}" + COMPONENT tests) + install(DIRECTORY "${PROJECT_SOURCE_DIR}/tests/expected" + DESTINATION "${target_install_dir}" + COMPONENT tests) + install(DIRECTORY "${PROJECT_SOURCE_DIR}/themes/" + DESTINATION "${target_install_dir}/resources" + COMPONENT tests) +endif() diff -Nru tgui-1.0-1.1.0+mantic/tests/Clipboard.cpp tgui-1.0-1.2.0+mantic/tests/Clipboard.cpp --- tgui-1.0-1.1.0+mantic/tests/Clipboard.cpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/tests/Clipboard.cpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/tests/Clipping.cpp tgui-1.0-1.2.0+mantic/tests/Clipping.cpp --- tgui-1.0-1.1.0+mantic/tests/Clipping.cpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/tests/Clipping.cpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/tests/Color.cpp tgui-1.0-1.2.0+mantic/tests/Color.cpp --- tgui-1.0-1.1.0+mantic/tests/Color.cpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/tests/Color.cpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/tests/CompareFiles.cpp tgui-1.0-1.2.0+mantic/tests/CompareFiles.cpp --- tgui-1.0-1.1.0+mantic/tests/CompareFiles.cpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/tests/CompareFiles.cpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/tests/Container.cpp tgui-1.0-1.2.0+mantic/tests/Container.cpp --- tgui-1.0-1.1.0+mantic/tests/Container.cpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/tests/Container.cpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. @@ -404,7 +404,7 @@ REQUIRE(widget5->getInheritedOpacity() == 0.7f); } - SECTION("getWidgetAtPosition / getWidgetBelowMouseCursor") + SECTION("getWidgetAtPos / getWidgetBelowMouseCursor") { container->setAbsoluteView({-5, 40, 100, 400}); @@ -424,17 +424,23 @@ w3->setSize({20, 40}); w2->add(w3); - REQUIRE(container->getWidgetAtPosition({70, 99}) == nullptr); - REQUIRE(container->getWidgetAtPosition({70, 100}) == w1); - REQUIRE(container->getWidgetAtPosition({69, 99}) == w2); - REQUIRE(container->getWidgetAtPosition({41, 120}) == w2); - REQUIRE(container->getWidgetAtPosition({41, 119}) == w3); - - REQUIRE(container->getWidgetBelowMouseCursor({150, 29}) == nullptr); - REQUIRE(container->getWidgetBelowMouseCursor({150, 30}) == w1); - REQUIRE(container->getWidgetBelowMouseCursor({149, 29}) == w2); - REQUIRE(container->getWidgetBelowMouseCursor({93, 40}) == w2); - REQUIRE(container->getWidgetBelowMouseCursor({93, 39}) == w3); + REQUIRE(container->getWidgetAtPos({70, 99}, false) == nullptr); + REQUIRE(container->getWidgetAtPos({70, 99}, true) == nullptr); + REQUIRE(container->getWidgetAtPos({70, 100}, true) == w1); + REQUIRE(container->getWidgetAtPos({69, 99}, true) == w2); + REQUIRE(container->getWidgetAtPos({41, 120}, true) == w2); + REQUIRE(container->getWidgetAtPos({41, 120}, false) == w2); + REQUIRE(container->getWidgetAtPos({41, 119}, true) == w3); + REQUIRE(container->getWidgetAtPos({41, 119}, false) == w2); + + REQUIRE(container->getWidgetBelowMouseCursor({150, 29}, false) == nullptr); + REQUIRE(container->getWidgetBelowMouseCursor({150, 29}, true) == nullptr); + REQUIRE(container->getWidgetBelowMouseCursor({150, 30}, true) == w1); + REQUIRE(container->getWidgetBelowMouseCursor({149, 29}, true) == w2); + REQUIRE(container->getWidgetBelowMouseCursor({93, 40}, true) == w2); + REQUIRE(container->getWidgetBelowMouseCursor({93, 40}, false) == w2); + REQUIRE(container->getWidgetBelowMouseCursor({93, 39}, true) == w3); + REQUIRE(container->getWidgetBelowMouseCursor({93, 39}, false) == w2); } // TODO: Events diff -Nru tgui-1.0-1.1.0+mantic/tests/Duration.cpp tgui-1.0-1.2.0+mantic/tests/Duration.cpp --- tgui-1.0-1.1.0+mantic/tests/Duration.cpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/tests/Duration.cpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. @@ -51,6 +51,8 @@ { REQUIRE(std::chrono::duration(tgui::Duration(10000)).count() == 10); REQUIRE(std::chrono::nanoseconds(tgui::Duration(std::chrono::microseconds(3))).count() == 3000); + REQUIRE(std::chrono::microseconds(tgui::Duration(5)).count() == 5000); + REQUIRE(std::chrono::milliseconds(tgui::Duration(10)).count() == 10); #if TGUI_HAS_WINDOW_BACKEND_SFML REQUIRE(sf::Time(tgui::Duration(std::chrono::milliseconds(50))).asMilliseconds() == 50); diff -Nru tgui-1.0-1.1.0+mantic/tests/Filesystem.cpp tgui-1.0-1.2.0+mantic/tests/Filesystem.cpp --- tgui-1.0-1.1.0+mantic/tests/Filesystem.cpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/tests/Filesystem.cpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/tests/Focus.cpp tgui-1.0-1.2.0+mantic/tests/Focus.cpp --- tgui-1.0-1.1.0+mantic/tests/Focus.cpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/tests/Focus.cpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/tests/Font.cpp tgui-1.0-1.2.0+mantic/tests/Font.cpp --- tgui-1.0-1.1.0+mantic/tests/Font.cpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/tests/Font.cpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/tests/Layouts.cpp tgui-1.0-1.2.0+mantic/tests/Layouts.cpp --- tgui-1.0-1.1.0+mantic/tests/Layouts.cpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/tests/Layouts.cpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/tests/Loading/DataIO.cpp tgui-1.0-1.2.0+mantic/tests/Loading/DataIO.cpp --- tgui-1.0-1.1.0+mantic/tests/Loading/DataIO.cpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/tests/Loading/DataIO.cpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/tests/Loading/Deserializer.cpp tgui-1.0-1.2.0+mantic/tests/Loading/Deserializer.cpp --- tgui-1.0-1.1.0+mantic/tests/Loading/Deserializer.cpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/tests/Loading/Deserializer.cpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/tests/Loading/Serializer.cpp tgui-1.0-1.2.0+mantic/tests/Loading/Serializer.cpp --- tgui-1.0-1.1.0+mantic/tests/Loading/Serializer.cpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/tests/Loading/Serializer.cpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/tests/Loading/Theme.cpp tgui-1.0-1.2.0+mantic/tests/Loading/Theme.cpp --- tgui-1.0-1.1.0+mantic/tests/Loading/Theme.cpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/tests/Loading/Theme.cpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. @@ -85,6 +85,40 @@ REQUIRE(!theme.removeRenderer("nonexistent")); } + SECTION("Replace") + { + auto data1 = std::make_shared(); + data1->propertyValuePairs["TextColor"] = {tgui::Color(255, 0, 0)}; + + auto data2 = std::make_shared(); + data2->propertyValuePairs["TextColor"] = {tgui::Color(0, 255, 0)}; + + auto data3 = std::make_shared(); + data3->propertyValuePairs["TextColor"] = {tgui::Color(0, 0, 255)}; + + auto data4 = std::make_shared(); + data4->propertyValuePairs["TextColor"] = {tgui::Color(255, 255, 0)}; + + tgui::Theme theme1; + theme1.addRenderer("A", data1); + theme1.addRenderer("B", data2); + + tgui::Theme theme2; + theme2.addRenderer("B", data3); + theme2.addRenderer("C", data4); + + REQUIRE(theme1.getRenderer("A")->propertyValuePairs["TextColor"].getColor() == tgui::Color(255, 0, 0)); + REQUIRE(theme1.getRenderer("B")->propertyValuePairs["TextColor"].getColor() == tgui::Color(0, 255, 0)); + REQUIRE(theme1.getRenderer("C")->propertyValuePairs.empty()); + + theme1.replace(theme2); + REQUIRE(theme1.getRenderer("B")->propertyValuePairs["TextColor"].getColor() == tgui::Color(0, 0, 255)); + REQUIRE(theme1.getRenderer("C")->propertyValuePairs["TextColor"].getColor() == tgui::Color(255, 255, 0)); + + REQUIRE(theme1.getRenderer("B")->connectedTheme == &theme1); + REQUIRE(theme2.getRenderer("B")->connectedTheme == &theme2); + } + SECTION("Renderers are shared") { tgui::Theme theme{"resources/Black.txt"}; diff -Nru tgui-1.0-1.1.0+mantic/tests/Loading/ThemeLoader.cpp tgui-1.0-1.2.0+mantic/tests/Loading/ThemeLoader.cpp --- tgui-1.0-1.1.0+mantic/tests/Loading/ThemeLoader.cpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/tests/Loading/ThemeLoader.cpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/tests/MouseCursors.cpp tgui-1.0-1.2.0+mantic/tests/MouseCursors.cpp --- tgui-1.0-1.1.0+mantic/tests/MouseCursors.cpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/tests/MouseCursors.cpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/tests/Outline.cpp tgui-1.0-1.2.0+mantic/tests/Outline.cpp --- tgui-1.0-1.1.0+mantic/tests/Outline.cpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/tests/Outline.cpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/tests/Signal.cpp tgui-1.0-1.2.0+mantic/tests/Signal.cpp --- tgui-1.0-1.1.0+mantic/tests/Signal.cpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/tests/Signal.cpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/tests/SignalManager.cpp tgui-1.0-1.2.0+mantic/tests/SignalManager.cpp --- tgui-1.0-1.1.0+mantic/tests/SignalManager.cpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/tests/SignalManager.cpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/tests/Sprite.cpp tgui-1.0-1.2.0+mantic/tests/Sprite.cpp --- tgui-1.0-1.1.0+mantic/tests/Sprite.cpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/tests/Sprite.cpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/tests/String.cpp tgui-1.0-1.2.0+mantic/tests/String.cpp --- tgui-1.0-1.1.0+mantic/tests/String.cpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/tests/String.cpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/tests/SvgImage.cpp tgui-1.0-1.2.0+mantic/tests/SvgImage.cpp --- tgui-1.0-1.1.0+mantic/tests/SvgImage.cpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/tests/SvgImage.cpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/tests/Tests.cpp tgui-1.0-1.2.0+mantic/tests/Tests.cpp --- tgui-1.0-1.1.0+mantic/tests/Tests.cpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/tests/Tests.cpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/tests/Tests.hpp tgui-1.0-1.2.0+mantic/tests/Tests.hpp --- tgui-1.0-1.1.0+mantic/tests/Tests.hpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/tests/Tests.hpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/tests/Text.cpp tgui-1.0-1.2.0+mantic/tests/Text.cpp --- tgui-1.0-1.1.0+mantic/tests/Text.cpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/tests/Text.cpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/tests/Texture.cpp tgui-1.0-1.2.0+mantic/tests/Texture.cpp --- tgui-1.0-1.1.0+mantic/tests/Texture.cpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/tests/Texture.cpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/tests/TextureManager.cpp tgui-1.0-1.2.0+mantic/tests/TextureManager.cpp --- tgui-1.0-1.1.0+mantic/tests/TextureManager.cpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/tests/TextureManager.cpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/tests/Timer.cpp tgui-1.0-1.2.0+mantic/tests/Timer.cpp --- tgui-1.0-1.1.0+mantic/tests/Timer.cpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/tests/Timer.cpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/tests/ToolTip.cpp tgui-1.0-1.2.0+mantic/tests/ToolTip.cpp --- tgui-1.0-1.1.0+mantic/tests/ToolTip.cpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/tests/ToolTip.cpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/tests/Vector2.cpp tgui-1.0-1.2.0+mantic/tests/Vector2.cpp --- tgui-1.0-1.1.0+mantic/tests/Vector2.cpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/tests/Vector2.cpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/tests/Widget.cpp tgui-1.0-1.2.0+mantic/tests/Widget.cpp --- tgui-1.0-1.1.0+mantic/tests/Widget.cpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/tests/Widget.cpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. @@ -647,5 +647,28 @@ editBox->setFocused(true); REQUIRE(!editBox->isFocused()); } + + SECTION("Widgets should not be focusable if their parent is disabled (https://github.com/texus/TGUI/issues/226)") + { + tgui::Panel::Ptr panel = tgui::Panel::create(); + tgui::EditBox::Ptr editBox = tgui::EditBox::create(); + panel->add(editBox); + + editBox->setFocused(true); + REQUIRE(editBox->isFocused()); + + // No widget can be focused while the container is disabled + panel->setEnabled(false); + REQUIRE(!editBox->isFocused()); + editBox->setFocused(true); + REQUIRE(!editBox->isFocused()); + + // If the container is enabled again, it still has no focused widgets + panel->setEnabled(true); + REQUIRE(!panel->isFocused()); + REQUIRE(!editBox->isFocused()); + editBox->setFocused(true); + REQUIRE(editBox->isFocused()); + } } } diff -Nru tgui-1.0-1.1.0+mantic/tests/Widgets/BitmapButton.cpp tgui-1.0-1.2.0+mantic/tests/Widgets/BitmapButton.cpp --- tgui-1.0-1.1.0+mantic/tests/Widgets/BitmapButton.cpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/tests/Widgets/BitmapButton.cpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/tests/Widgets/Button.cpp tgui-1.0-1.2.0+mantic/tests/Widgets/Button.cpp --- tgui-1.0-1.1.0+mantic/tests/Widgets/Button.cpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/tests/Widgets/Button.cpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/tests/Widgets/Canvas.cpp tgui-1.0-1.2.0+mantic/tests/Widgets/Canvas.cpp --- tgui-1.0-1.1.0+mantic/tests/Widgets/Canvas.cpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/tests/Widgets/Canvas.cpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. @@ -22,7 +22,8 @@ // ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -#include +#include + #if TGUI_HAS_RENDERER_BACKEND_SFML_GRAPHICS #include #include @@ -30,6 +31,23 @@ #include "Tests.hpp" +static void testCanvasCommon(tgui::CanvasBase::Ptr canvas) +{ + SECTION("Ignore mouse events") + { + REQUIRE(!canvas->isIgnoringMouseEvents()); + canvas->ignoreMouseEvents(true); + REQUIRE(canvas->isIgnoringMouseEvents()); + canvas->ignoreMouseEvents(false); + REQUIRE(!canvas->isIgnoringMouseEvents()); + } + + SECTION("canGainFocus") + { + REQUIRE(!canvas->canGainFocus()); + } +} + #if TGUI_HAS_RENDERER_BACKEND_SFML_GRAPHICS #if TGUI_BUILD_AS_CXX_MODULE @@ -100,6 +118,8 @@ REQUIRE(internalRenderTexture == &canvas->getRenderTexture()); } + testCanvasCommon(canvas); + testWidgetRenderer(canvas->getRenderer()); SECTION("Saving and loading from file") @@ -193,6 +213,8 @@ REQUIRE(internalTextureTarget == canvas->getTextureTarget()); } + testCanvasCommon(canvas); + testWidgetRenderer(canvas->getRenderer()); SECTION("Saving and loading from file") @@ -232,6 +254,8 @@ REQUIRE(canvas->getSize() == tgui::Vector2f(200, 100)); } + testCanvasCommon(canvas); + testWidgetRenderer(canvas->getRenderer()); SECTION("Saving and loading from file") @@ -271,6 +295,8 @@ REQUIRE(canvas->getSize() == tgui::Vector2f(200, 100)); } + testCanvasCommon(canvas); + testWidgetRenderer(canvas->getRenderer()); SECTION("Saving and loading from file") diff -Nru tgui-1.0-1.1.0+mantic/tests/Widgets/ChatBox.cpp tgui-1.0-1.2.0+mantic/tests/Widgets/ChatBox.cpp --- tgui-1.0-1.1.0+mantic/tests/Widgets/ChatBox.cpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/tests/Widgets/ChatBox.cpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/tests/Widgets/CheckBox.cpp tgui-1.0-1.2.0+mantic/tests/Widgets/CheckBox.cpp --- tgui-1.0-1.1.0+mantic/tests/Widgets/CheckBox.cpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/tests/Widgets/CheckBox.cpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/tests/Widgets/ChildWindow.cpp tgui-1.0-1.2.0+mantic/tests/Widgets/ChildWindow.cpp --- tgui-1.0-1.1.0+mantic/tests/Widgets/ChildWindow.cpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/tests/Widgets/ChildWindow.cpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. @@ -522,4 +522,21 @@ TEST_DRAW("ChildWindow_Textured.png") } } + + SECTION("Bug Fixes") + { + SECTION("setPosition doesn't work with KeepInParent (https://forum.tgui.eu/index.php?topic=1082.0)") + { + auto parent = tgui::Panel::create({300, 200}); + parent->setPosition({30, 25}); + parent->add(childWindow); + + childWindow->setSize({100, 80}); + childWindow->setPosition({10, 5}); + childWindow->setKeepInParent(true); + + childWindow->setPosition({15, 20}); + REQUIRE(childWindow->getPosition() == tgui::Vector2f{15, 20}); + } + } } diff -Nru tgui-1.0-1.1.0+mantic/tests/Widgets/ClickableWidget.cpp tgui-1.0-1.2.0+mantic/tests/Widgets/ClickableWidget.cpp --- tgui-1.0-1.1.0+mantic/tests/Widgets/ClickableWidget.cpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/tests/Widgets/ClickableWidget.cpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/tests/Widgets/ColorPicker.cpp tgui-1.0-1.2.0+mantic/tests/Widgets/ColorPicker.cpp --- tgui-1.0-1.1.0+mantic/tests/Widgets/ColorPicker.cpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/tests/Widgets/ColorPicker.cpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/tests/Widgets/ComboBox.cpp tgui-1.0-1.2.0+mantic/tests/Widgets/ComboBox.cpp --- tgui-1.0-1.1.0+mantic/tests/Widgets/ComboBox.cpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/tests/Widgets/ComboBox.cpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/tests/Widgets/EditBox.cpp tgui-1.0-1.2.0+mantic/tests/Widgets/EditBox.cpp --- tgui-1.0-1.1.0+mantic/tests/Widgets/EditBox.cpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/tests/Widgets/EditBox.cpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/tests/Widgets/FileDialog.cpp tgui-1.0-1.2.0+mantic/tests/Widgets/FileDialog.cpp --- tgui-1.0-1.1.0+mantic/tests/Widgets/FileDialog.cpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/tests/Widgets/FileDialog.cpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/tests/Widgets/Grid.cpp tgui-1.0-1.2.0+mantic/tests/Widgets/Grid.cpp --- tgui-1.0-1.1.0+mantic/tests/Widgets/Grid.cpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/tests/Widgets/Grid.cpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. @@ -61,11 +61,17 @@ SECTION("Removing widgets") { auto widget = tgui::ClickableWidget::create(); + auto widget2 = tgui::ClickableWidget::create(); + auto widget3 = tgui::ClickableWidget::create(); grid->addWidget(widget, 3, 2); + grid->addWidget(widget2, 3, 3); + grid->addWidget(widget3, 2, 2); + grid->remove(widget3); REQUIRE(grid->getWidget(3, 2) == widget); grid->remove(widget); REQUIRE(grid->getWidget(3, 2) == nullptr); + grid->remove(widget2); grid->addWidget(widget, 1, 5); diff -Nru tgui-1.0-1.1.0+mantic/tests/Widgets/Group.cpp tgui-1.0-1.2.0+mantic/tests/Widgets/Group.cpp --- tgui-1.0-1.1.0+mantic/tests/Widgets/Group.cpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/tests/Widgets/Group.cpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/tests/Widgets/HorizontalLayout.cpp tgui-1.0-1.2.0+mantic/tests/Widgets/HorizontalLayout.cpp --- tgui-1.0-1.1.0+mantic/tests/Widgets/HorizontalLayout.cpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/tests/Widgets/HorizontalLayout.cpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/tests/Widgets/HorizontalWrap.cpp tgui-1.0-1.2.0+mantic/tests/Widgets/HorizontalWrap.cpp --- tgui-1.0-1.1.0+mantic/tests/Widgets/HorizontalWrap.cpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/tests/Widgets/HorizontalWrap.cpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/tests/Widgets/Knob.cpp tgui-1.0-1.2.0+mantic/tests/Widgets/Knob.cpp --- tgui-1.0-1.1.0+mantic/tests/Widgets/Knob.cpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/tests/Widgets/Knob.cpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/tests/Widgets/Label.cpp tgui-1.0-1.2.0+mantic/tests/Widgets/Label.cpp --- tgui-1.0-1.1.0+mantic/tests/Widgets/Label.cpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/tests/Widgets/Label.cpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/tests/Widgets/ListBox.cpp tgui-1.0-1.2.0+mantic/tests/Widgets/ListBox.cpp --- tgui-1.0-1.1.0+mantic/tests/Widgets/ListBox.cpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/tests/Widgets/ListBox.cpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/tests/Widgets/ListView.cpp tgui-1.0-1.2.0+mantic/tests/Widgets/ListView.cpp --- tgui-1.0-1.1.0+mantic/tests/Widgets/ListView.cpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/tests/Widgets/ListView.cpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/tests/Widgets/MenuBar.cpp tgui-1.0-1.2.0+mantic/tests/Widgets/MenuBar.cpp --- tgui-1.0-1.1.0+mantic/tests/Widgets/MenuBar.cpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/tests/Widgets/MenuBar.cpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/tests/Widgets/MessageBox.cpp tgui-1.0-1.2.0+mantic/tests/Widgets/MessageBox.cpp --- tgui-1.0-1.1.0+mantic/tests/Widgets/MessageBox.cpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/tests/Widgets/MessageBox.cpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/tests/Widgets/Panel.cpp tgui-1.0-1.2.0+mantic/tests/Widgets/Panel.cpp --- tgui-1.0-1.1.0+mantic/tests/Widgets/Panel.cpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/tests/Widgets/Panel.cpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/tests/Widgets/PanelListBox.cpp tgui-1.0-1.2.0+mantic/tests/Widgets/PanelListBox.cpp --- tgui-1.0-1.1.0+mantic/tests/Widgets/PanelListBox.cpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/tests/Widgets/PanelListBox.cpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/tests/Widgets/Picture.cpp tgui-1.0-1.2.0+mantic/tests/Widgets/Picture.cpp --- tgui-1.0-1.1.0+mantic/tests/Widgets/Picture.cpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/tests/Widgets/Picture.cpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/tests/Widgets/ProgressBar.cpp tgui-1.0-1.2.0+mantic/tests/Widgets/ProgressBar.cpp --- tgui-1.0-1.1.0+mantic/tests/Widgets/ProgressBar.cpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/tests/Widgets/ProgressBar.cpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/tests/Widgets/RadioButton.cpp tgui-1.0-1.2.0+mantic/tests/Widgets/RadioButton.cpp --- tgui-1.0-1.1.0+mantic/tests/Widgets/RadioButton.cpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/tests/Widgets/RadioButton.cpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/tests/Widgets/RadioButtonGroup.cpp tgui-1.0-1.2.0+mantic/tests/Widgets/RadioButtonGroup.cpp --- tgui-1.0-1.1.0+mantic/tests/Widgets/RadioButtonGroup.cpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/tests/Widgets/RadioButtonGroup.cpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/tests/Widgets/RangeSlider.cpp tgui-1.0-1.2.0+mantic/tests/Widgets/RangeSlider.cpp --- tgui-1.0-1.1.0+mantic/tests/Widgets/RangeSlider.cpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/tests/Widgets/RangeSlider.cpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/tests/Widgets/RichTextLabel.cpp tgui-1.0-1.2.0+mantic/tests/Widgets/RichTextLabel.cpp --- tgui-1.0-1.1.0+mantic/tests/Widgets/RichTextLabel.cpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/tests/Widgets/RichTextLabel.cpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/tests/Widgets/ScrollablePanel.cpp tgui-1.0-1.2.0+mantic/tests/Widgets/ScrollablePanel.cpp --- tgui-1.0-1.1.0+mantic/tests/Widgets/ScrollablePanel.cpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/tests/Widgets/ScrollablePanel.cpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. @@ -155,6 +155,52 @@ REQUIRE(panel->getScrollbarWidth() == 15); } + SECTION("getWidgetAtPos") + { + panel->setPosition(200, 150); + panel->setSize(320, 240); + panel->setContentSize({4000, 3000}); + + auto child = tgui::ClickableWidget::create(); + child->setPosition({50, 100}); + child->setSize({40, 80}); + panel->add(child); + + REQUIRE(panel->getWidgetAtPos({70, 99}, false) == nullptr); + REQUIRE(panel->getWidgetAtPos({70, 100}, false) == child); + + panel->setVerticalScrollbarValue(90); + panel->setHorizontalScrollbarValue(70); + + REQUIRE(panel->getWidgetAtPos({20, 89}, false) == nullptr); + REQUIRE(panel->getWidgetAtPos({19, 89}, false) == child); + REQUIRE(panel->getWidgetAtPos({19, 90}, false) == nullptr); + } + + SECTION("Content size") + { + panel->setSize(200, 100); + + auto widget1 = tgui::Button::create(); + widget1->setPosition({20, 30}); + widget1->setSize({200, 50}); + panel->add(widget1); + + REQUIRE(panel->getContentSize() == tgui::Vector2f{220, 80}); + + auto widget2 = tgui::Button::create(); + widget2->setPosition({200, 70}); + widget2->setSize({300, 60}); + widget2->setOrigin({0.5f, 1.f}); + panel->add(widget2); + + REQUIRE(panel->getContentSize().x == Approx{350}); + REQUIRE(panel->getContentSize().y == 80); + + panel->setContentSize({200, 100}); + REQUIRE(panel->getContentSize() == tgui::Vector2f{200, 100}); + } + SECTION("Events / Signals") { unsigned int mousePressedCount = 0; @@ -237,6 +283,8 @@ REQUIRE(mouseReleasedCount == 2); REQUIRE(clickedCount == 1); } + + // TODO: Scroll event } testWidgetRenderer(panel->getRenderer()); diff -Nru tgui-1.0-1.1.0+mantic/tests/Widgets/Scrollbar.cpp tgui-1.0-1.2.0+mantic/tests/Widgets/Scrollbar.cpp --- tgui-1.0-1.1.0+mantic/tests/Widgets/Scrollbar.cpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/tests/Widgets/Scrollbar.cpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/tests/Widgets/SeparatorLine.cpp tgui-1.0-1.2.0+mantic/tests/Widgets/SeparatorLine.cpp --- tgui-1.0-1.1.0+mantic/tests/Widgets/SeparatorLine.cpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/tests/Widgets/SeparatorLine.cpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/tests/Widgets/Slider.cpp tgui-1.0-1.2.0+mantic/tests/Widgets/Slider.cpp --- tgui-1.0-1.1.0+mantic/tests/Widgets/Slider.cpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/tests/Widgets/Slider.cpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/tests/Widgets/SpinButton.cpp tgui-1.0-1.2.0+mantic/tests/Widgets/SpinButton.cpp --- tgui-1.0-1.1.0+mantic/tests/Widgets/SpinButton.cpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/tests/Widgets/SpinButton.cpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/tests/Widgets/SpinControl.cpp tgui-1.0-1.2.0+mantic/tests/Widgets/SpinControl.cpp --- tgui-1.0-1.1.0+mantic/tests/Widgets/SpinControl.cpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/tests/Widgets/SpinControl.cpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/tests/Widgets/TabContainer.cpp tgui-1.0-1.2.0+mantic/tests/Widgets/TabContainer.cpp --- tgui-1.0-1.1.0+mantic/tests/Widgets/TabContainer.cpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/tests/Widgets/TabContainer.cpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/tests/Widgets/Tabs.cpp tgui-1.0-1.2.0+mantic/tests/Widgets/Tabs.cpp --- tgui-1.0-1.1.0+mantic/tests/Widgets/Tabs.cpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/tests/Widgets/Tabs.cpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/tests/Widgets/TextArea.cpp tgui-1.0-1.2.0+mantic/tests/Widgets/TextArea.cpp --- tgui-1.0-1.1.0+mantic/tests/Widgets/TextArea.cpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/tests/Widgets/TextArea.cpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/tests/Widgets/ToggleButton.cpp tgui-1.0-1.2.0+mantic/tests/Widgets/ToggleButton.cpp --- tgui-1.0-1.1.0+mantic/tests/Widgets/ToggleButton.cpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/tests/Widgets/ToggleButton.cpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/tests/Widgets/TreeView.cpp tgui-1.0-1.2.0+mantic/tests/Widgets/TreeView.cpp --- tgui-1.0-1.1.0+mantic/tests/Widgets/TreeView.cpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/tests/Widgets/TreeView.cpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. @@ -87,6 +87,13 @@ REQUIRE(treeView->addItem({"Two"}, false)); REQUIRE(treeView->getNodes().size() == 2); + + REQUIRE(treeView->changeItem({"Two"}, "_2_")); + REQUIRE(treeView->getNodes().size() == 2); + REQUIRE(treeView->getNodes()[1].text == "_2_"); + + treeView->removeItem({"One"}); + REQUIRE(treeView->getNodes().size() == 1); } SECTION("Multiple items") @@ -115,6 +122,42 @@ REQUIRE(treeView->getNodes()[1].nodes[1].nodes.size() == 2); REQUIRE(treeView->getNodes()[1].nodes[1].nodes[0].text == "Truck"); REQUIRE(treeView->getNodes()[1].nodes[1].nodes[1].text == "Car"); + + REQUIRE(treeView->getNode({"Smilies"}).text == "Smilies"); + REQUIRE(treeView->getNode({"Smilies"}).nodes.size() == 3); + REQUIRE(treeView->getNode({"Smilies", "Neither"}).text == "Neither"); + REQUIRE(treeView->getNode({"Smilies", "Neither"}).nodes.empty()); + REQUIRE(treeView->getNode({"Vehicles", "Whole"}).text == "Whole"); + REQUIRE(treeView->getNode({"Vehicles", "Whole"}).nodes.size() == 2); + REQUIRE(treeView->getNode({"Vehicles", "Whole"}).nodes[0].text == "Truck"); + REQUIRE(treeView->getNode({"Vehicles", "Whole"}).nodes[1].text == "Car"); + + // Testing invalid getNode calls + REQUIRE(treeView->getNode({}).text == ""); + REQUIRE(treeView->getNode({}).nodes.empty()); + REQUIRE(treeView->getNode({"Vehicles", "Train"}).text == ""); + REQUIRE(treeView->getNode({"Vehicles", "Train"}).nodes.empty()); + } + + SECTION("Changing items") + { + REQUIRE(!treeView->changeItem({}, "test")); + REQUIRE(!treeView->changeItem({"Does", "not", "exist"}, "test")); + REQUIRE(!treeView->changeItem({"Vehicles", "Whole", "something else"}, "test")); + + REQUIRE(treeView->changeItem({"Vehicles", "Whole", "Car"}, "Train")); + REQUIRE(treeView->getNodes().size() == 2); + REQUIRE(treeView->getNodes()[1].nodes[1].nodes.size() == 2); + REQUIRE(treeView->getNodes()[1].nodes[1].nodes[0].text == "Truck"); + REQUIRE(treeView->getNodes()[1].nodes[1].nodes[1].text == "Train"); + + // Once changed, the old item won't be found anymore + REQUIRE(!treeView->changeItem({"Vehicles", "Whole", "Car"}, "Airplane")); + REQUIRE(treeView->getNodes()[1].nodes[1].nodes[1].text == "Train"); + + // The renamed item can be found now + REQUIRE(treeView->changeItem({"Vehicles", "Whole", "Train"}, "Airplane")); + REQUIRE(treeView->getNodes()[1].nodes[1].nodes[1].text == "Airplane"); } SECTION("Removing items") diff -Nru tgui-1.0-1.1.0+mantic/tests/Widgets/VerticalLayout.cpp tgui-1.0-1.2.0+mantic/tests/Widgets/VerticalLayout.cpp --- tgui-1.0-1.1.0+mantic/tests/Widgets/VerticalLayout.cpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/tests/Widgets/VerticalLayout.cpp 2024-03-23 12:27:01.000000000 +0000 @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface -// Copyright (C) 2012-2023 Bruno Van de Velde (vdv_b@tgui.eu) +// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu) // // 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. diff -Nru tgui-1.0-1.1.0+mantic/tests/main.cpp tgui-1.0-1.2.0+mantic/tests/main.cpp --- tgui-1.0-1.1.0+mantic/tests/main.cpp 2023-11-04 13:36:49.000000000 +0000 +++ tgui-1.0-1.2.0+mantic/tests/main.cpp 2024-03-23 12:27:01.000000000 +0000 @@ -121,7 +121,7 @@ } #if SFML_VERSION_MAJOR >= 3 - sf::Window window{sf::VideoMode{{windowWidth, windowHeight}}, windowTitle, sf::Style::Default, sf::ContextSettings(0, 0, 0, 3, 3, sf::ContextSettings::Attribute::Core)}; + sf::Window window{sf::VideoMode{{windowWidth, windowHeight}}, windowTitle, sf::Style::Default, sf::State::Windowed, sf::ContextSettings(0, 0, 0, 3, 3, sf::ContextSettings::Attribute::Core)}; #else sf::Window window{sf::VideoMode{windowWidth, windowHeight}, windowTitle, sf::Style::Default, sf::ContextSettings(0, 0, 0, 3, 3, sf::ContextSettings::Attribute::Core)}; #endif