Skip to content

Commit 4001dd5

Browse files
authored
Release 0.6 (#344)
* Add changelog, rename TT_ to HI_ * 0.6.0
1 parent ee73312 commit 4001dd5

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+474
-452
lines changed

CHANGELOG.md

Lines changed: 25 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,31 @@
11
Change log
22
==========
33

4-
0.6
5-
-----------
6-
* The project is renamed from ttauri to HikoGUI.
4+
0.6 Dizzy Donkey
5+
----------------
6+
The changes in this version are pretty random, but there is a theme
7+
of improving how to create custom widgets.
8+
9+
* The ttauri project is renamed to HikoGUI.
10+
* The drawing API is more consistent and capable; for example adding
11+
color gradients, convex quads and allowing glyphs to be overlapped.
12+
* New text-shaper and text widget which handles bidirectional text,
13+
with bidirectional-double cursors, multiple paragraphs, and sharper
14+
rendering by scaling and positioning to sub-pixel boundaries.
15+
* Improved grid widget which now supports row- and column-spans.
16+
* New grapheme-cluster type that can be used inside std::basic_string.
17+
* An central API to retrieve user-settings from the operating system,
18+
including a notifier for the application to directly react on changes.
19+
* DPI scaling is implemented by scaling the measurements of a theme.
20+
* Multi-monitor support for positioning and maximizing.
21+
* co-routine `task` and `scoped_task` which can await on notifiers and
22+
observables to handle complex user interface interactions and window
23+
ownership.
24+
* New blocking main event-loop with more accurate vertical-sync support;
25+
improving animations even in debug builds.
26+
* Improved localization support with language_tags that have access to
27+
ISO-codes for language, script and region.
28+
729

830
0.5.1 Bad Butterfly
931
-------------------

CMakeLists.txt

Lines changed: 33 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,12 @@ include(SetupCompiler)
1313
#-------------------------------------------------------------------
1414

1515
option(BUILD_SHARED_LIBS "Build shared libraries" OFF)
16-
option(TT_BUILD_EXAMPLES "Build example applications" ON)
17-
option(TT_BUILD_TESTS "Build tests" ON)
18-
option(TT_BUILD_PCH "Build precompiled headers" ON)
19-
option(TT_INSTALL "Generate installation target" ON)
20-
option(TT_ENABLE_ANALYSIS "Compile using -analyze" OFF)
21-
option(TT_ENABLE_ASAN "Compile using address sanitizer" OFF)
16+
option(HI_BUILD_EXAMPLES "Build example applications" ON)
17+
option(HI_BUILD_TESTS "Build tests" ON)
18+
option(HI_BUILD_PCH "Build precompiled headers" ON)
19+
option(HI_INSTALL "Generate installation target" ON)
20+
option(HI_ENABLE_ANALYSIS "Compile using -analyze" OFF)
21+
option(HI_ENABLE_ASAN "Compile using address sanitizer" OFF)
2222

2323
#-------------------------------------------------------------------
2424
# Project
@@ -32,38 +32,38 @@ endif()
3232

3333
# vcpkg.json is the primary source for version data
3434
file(READ ${CMAKE_SOURCE_DIR}/vcpkg.json VCPKG_JSON_STRING)
35-
string(JSON TT_LIB_NAME GET ${VCPKG_JSON_STRING} "name")
36-
string(JSON TT_LIB_VERSION GET ${VCPKG_JSON_STRING} "version")
37-
string(JSON TT_LIB_LICENSE GET ${VCPKG_JSON_STRING} "license")
38-
string(JSON TT_LIB_DESC GET ${VCPKG_JSON_STRING} "description")
39-
string(JSON TT_LIB_HOMEPAGE GET ${VCPKG_JSON_STRING} "homepage")
35+
string(JSON HI_LIB_NAME GET ${VCPKG_JSON_STRING} "name")
36+
string(JSON HI_LIB_VERSION GET ${VCPKG_JSON_STRING} "version")
37+
string(JSON HI_LIB_LICENSE GET ${VCPKG_JSON_STRING} "license")
38+
string(JSON HI_LIB_DESC GET ${VCPKG_JSON_STRING} "description")
39+
string(JSON HI_LIB_HOMEPAGE GET ${VCPKG_JSON_STRING} "homepage")
4040

4141
configure_file("package.json.in" "package.json" @ONLY)
4242
file(READ ${CMAKE_CURRENT_BINARY_DIR}/package.json PACKAGE_JSON_STRING)
43-
string(JSON TT_LIB_DISPLAY_NAME GET ${PACKAGE_JSON_STRING} "display-name")
44-
string(JSON TT_LIB_VENDOR GET ${PACKAGE_JSON_STRING} "vendor")
43+
string(JSON HI_LIB_DISPLAY_NAME GET ${PACKAGE_JSON_STRING} "display-name")
44+
string(JSON HI_LIB_VENDOR GET ${PACKAGE_JSON_STRING} "vendor")
4545

46-
project(${TT_LIB_NAME} VERSION ${TT_LIB_VERSION} LANGUAGES ${LANGUAGES})
46+
project(${HI_LIB_NAME} VERSION ${HI_LIB_VERSION} LANGUAGES ${LANGUAGES})
4747

4848
#-------------------------------------------------------------------
4949
# Define Constants
5050
#-------------------------------------------------------------------
5151

52-
set(TT_WIN32 0)
53-
set(TT_MACOS 0)
54-
set(TT_POSIX 0)
55-
set(TT_X64 0)
52+
set(HI_WIN32 0)
53+
set(HI_MACOS 0)
54+
set(HI_POSIX 0)
55+
set(HI_X64 0)
5656

5757
if (APPLE)
58-
set(TT_MACOS 1)
59-
set(TT_POSIX 1)
58+
set(HI_MACOS 1)
59+
set(HI_POSIX 1)
6060
elseif (WIN32)
61-
set(TT_WIN32 1)
61+
set(HI_WIN32 1)
6262
endif()
6363

6464
set(x64_list x86 X86 amd64 AMD64)
6565
if (${CMAKE_SYSTEM_PROCESSOR} IN_LIST x64_list)
66-
set(TT_X64 1)
66+
set(HI_X64 1)
6767
endif()
6868

6969
#-------------------------------------------------------------------
@@ -98,7 +98,7 @@ endif()
9898
#
9999
# GoogleTest - non-vcpkg, directly build from externals
100100
#
101-
if(TT_BUILD_TESTS)
101+
if(HI_BUILD_TESTS)
102102
set(INSTALL_GTEST OFF CACHE INTERNAL "Don't install gtest")
103103
set(BUILD_GMOCK OFF CACHE INTERNAL "Don't build gmock")
104104
FetchContent_Declare(googletest GIT_REPOSITORY https://github.com/google/googletest.git GIT_TAG release-1.11.0)
@@ -139,7 +139,7 @@ endif()
139139
add_library(hikogui)
140140
add_library(hikogui::hikogui ALIAS hikogui)
141141

142-
if(TT_BUILD_TESTS)
142+
if(HI_BUILD_TESTS)
143143
add_executable(hikogui_tests)
144144
endif()
145145

@@ -307,11 +307,11 @@ elseif (MSVC)
307307
target_compile_options(hikogui PUBLIC -JMC)
308308
endif()
309309

310-
if(TT_ENABLE_ASAN)
310+
if(HI_ENABLE_ASAN)
311311
target_compile_options(hikogui PUBLIC -fsanitize=address)
312312
endif()
313313

314-
if(TT_ENABLE_ANALYSIS)
314+
if(HI_ENABLE_ANALYSIS)
315315
target_compile_options(hikogui PUBLIC -analyze)
316316

317317
#target_compile_options(hikogui PUBLIC -analyze:ruleset ${CMAKE_CURRENT_SOURCE_DIR}/AllRules.ruleset)
@@ -445,16 +445,16 @@ install(FILES
445445
# Build Target: hikogui_tests (executable)
446446
#-------------------------------------------------------------------
447447

448-
if(TT_BUILD_TESTS)
448+
if(HI_BUILD_TESTS)
449449

450450
enable_testing()
451451

452452
target_link_libraries(hikogui_tests PRIVATE gtest_main hikogui)
453453

454454
target_include_directories(hikogui_tests PRIVATE ${CMAKE_CURRENT_BINARY_DIR})
455455

456-
if(TT_BUILD_PCH)
457-
if(NOT TT_ENABLE_ANALYSIS)
456+
if(HI_BUILD_PCH)
457+
if(NOT HI_ENABLE_ANALYSIS)
458458
target_precompile_headers(hikogui_tests PRIVATE <gtest/gtest.h>)
459459
endif()
460460
endif()
@@ -476,7 +476,7 @@ endif()
476476
#-------------------------------------------------------------------
477477
# Installation Rules: hikogui_tests (executable)
478478
#-------------------------------------------------------------------
479-
if(TT_BUILD_TESTS)
479+
if(HI_BUILD_TESTS)
480480
install(TARGETS hikogui_tests DESTINATION tests)
481481
install(DIRECTORY tests/data/ DESTINATION tests)
482482
if (BUILD_SHARED_LIBS)
@@ -487,7 +487,7 @@ endif()
487487
#-------------------------------------------------------------------
488488
# Build examples
489489
#-------------------------------------------------------------------
490-
if(TT_BUILD_EXAMPLES)
490+
if(HI_BUILD_EXAMPLES)
491491
add_subdirectory(examples/hikogui_demo)
492492
add_subdirectory(examples/widgets)
493493
add_subdirectory(examples/custom_widgets)
@@ -500,11 +500,11 @@ endif()
500500

501501
show_build_target_properties(hikogui)
502502

503-
if(TT_BUILD_EXAMPLES)
503+
if(HI_BUILD_EXAMPLES)
504504
show_build_target_properties(hikogui_demo)
505505
endif()
506506

507-
if(TT_BUILD_TESTS)
507+
if(HI_BUILD_TESTS)
508508
show_build_target_properties(hikogui_tests)
509509
endif()
510510

CMakeSettings.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"inheritEnvironments": [ "msvc_x64_x64" ],
1414
"variables": [
1515
{
16-
"name": "TT_ENABLE_ANALYSIS",
16+
"name": "HI_ENABLE_ANALYSIS",
1717
"value": "ON",
1818
"type": "STRING"
1919
}
@@ -37,7 +37,7 @@
3737
"configurationType": "Debug",
3838
"buildRoot": "${env.USERPROFILE}\\CMakeBuilds\\${workspaceHash}\\build\\${name}",
3939
"installRoot": "${env.USERPROFILE}\\CMakeBuilds\\${workspaceHash}\\install\\${name}",
40-
"cmakeCommandArgs": "-DCMAKE_VERBOSE_MAKEFILE=ON -DVCPKG_TARGET_TRIPLET=x64-windows-static -DBUILD_SHARED_LIBS=OFF -DTT_ENABLE_ASAN=ON",
40+
"cmakeCommandArgs": "-DCMAKE_VERBOSE_MAKEFILE=ON -DVCPKG_TARGET_TRIPLET=x64-windows-static -DBUILD_SHARED_LIBS=OFF -DHI_ENABLE_ASAN=ON",
4141
"buildCommandArgs": "",
4242
"ctestCommandArgs": "-C Debug",
4343
"intelliSenseMode": "windows-msvc-x64",
@@ -49,7 +49,7 @@
4949
"configurationType": "RelWithDebInfo",
5050
"buildRoot": "${env.USERPROFILE}\\CMakeBuilds\\${workspaceHash}\\build\\${name}",
5151
"installRoot": "${env.USERPROFILE}\\CMakeBuilds\\${workspaceHash}\\install\\${name}",
52-
"cmakeCommandArgs": "-DCMAKE_VERBOSE_MAKEFILE=ON -DVCPKG_TARGET_TRIPLET=x64-windows-static -DBUILD_SHARED_LIBS=OFF -DTT_BUILD_PCH=OFF",
52+
"cmakeCommandArgs": "-DCMAKE_VERBOSE_MAKEFILE=ON -DVCPKG_TARGET_TRIPLET=x64-windows-static -DBUILD_SHARED_LIBS=OFF -DHI_BUILD_PCH=OFF",
5353
"buildCommandArgs": "",
5454
"ctestCommandArgs": "",
5555
"intelliSenseMode": "windows-msvc-x64",

package.json.in

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
{
2-
"name": "@TT_LIB_NAME@",
2+
"name": "@HI_LIB_NAME@",
33
"display-name": "HikoGUI Library",
4-
"version": "@TT_LIB_VERSION@",
5-
"license": "@TT_LIB_LICENSE@",
6-
"homepage": "@TT_LIB_HOMEPAGE@",
7-
"description": "@TT_LIB_DESCRIPTION@",
4+
"version": "@HI_LIB_VERSION@",
5+
"license": "@HI_LIB_LICENSE@",
6+
"homepage": "@HI_LIB_HOMEPAGE@",
7+
"description": "@HI_LIB_DESCRIPTION@",
88
"vendor": "HikoGUI"
99
}

src/hikogui/CMakeLists.txt

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -38,41 +38,41 @@ target_sources(hikogui PRIVATE
3838
chrono.hpp
3939
concepts.hpp
4040
console.hpp
41-
$<${TT_WIN32}:${CMAKE_CURRENT_SOURCE_DIR}/console_win32.cpp>
41+
$<${HI_WIN32}:${CMAKE_CURRENT_SOURCE_DIR}/console_win32.cpp>
4242
command.hpp
4343
CommandLineParser.hpp
4444
counters.cpp
4545
counters.hpp
4646
CP1252.hpp
4747
#cpu_id.hpp
48-
#$<${TT_X64}:${CMAKE_CURRENT_SOURCE_DIR}/cpu_id_x64.cpp>
48+
#$<${HI_X64}:${CMAKE_CURRENT_SOURCE_DIR}/cpu_id_x64.cpp>
4949
crt.hpp
5050
crt_utils.hpp
51-
$<${TT_WIN32}:${CMAKE_CURRENT_SOURCE_DIR}/crt_utils_win32.cpp>
51+
$<${HI_WIN32}:${CMAKE_CURRENT_SOURCE_DIR}/crt_utils_win32.cpp>
5252
date.hpp
5353
datum.hpp
5454
dead_lock_detector.cpp
5555
dead_lock_detector.hpp
5656
debugger.hpp
57-
$<${TT_MACOS}:${CMAKE_CURRENT_SOURCE_DIR}/debugger_macos.mm>
58-
$<${TT_WIN32}:${CMAKE_CURRENT_SOURCE_DIR}/debugger_win32.cpp>
57+
$<${HI_MACOS}:${CMAKE_CURRENT_SOURCE_DIR}/debugger_macos.mm>
58+
$<${HI_WIN32}:${CMAKE_CURRENT_SOURCE_DIR}/debugger_win32.cpp>
5959
decimal.hpp
6060
dialog.hpp
61-
$<${TT_WIN32}:${CMAKE_CURRENT_SOURCE_DIR}/dialog_win32.cpp>
61+
$<${HI_WIN32}:${CMAKE_CURRENT_SOURCE_DIR}/dialog_win32.cpp>
6262
endian.hpp
6363
enum_metadata.hpp
6464
exception.hpp
6565
file.hpp
66-
$<${TT_POSIX}:${CMAKE_CURRENT_SOURCE_DIR}/file_posix.cpp>
67-
$<${TT_WIN32}:${CMAKE_CURRENT_SOURCE_DIR}/file_win32.cpp>
66+
$<${HI_POSIX}:${CMAKE_CURRENT_SOURCE_DIR}/file_posix.cpp>
67+
$<${HI_WIN32}:${CMAKE_CURRENT_SOURCE_DIR}/file_win32.cpp>
6868
file_mapping.cpp
6969
file_mapping.hpp
70-
$<${TT_POSIX}:${CMAKE_CURRENT_SOURCE_DIR}/file_mapping_posix.cpp>
71-
$<${TT_WIN32}:${CMAKE_CURRENT_SOURCE_DIR}/file_mapping_win32.cpp>
70+
$<${HI_POSIX}:${CMAKE_CURRENT_SOURCE_DIR}/file_mapping_posix.cpp>
71+
$<${HI_WIN32}:${CMAKE_CURRENT_SOURCE_DIR}/file_mapping_win32.cpp>
7272
file_view.cpp
7373
file_view.hpp
74-
$<${TT_POSIX}:${CMAKE_CURRENT_SOURCE_DIR}/file_view_posix.cpp>
75-
$<${TT_WIN32}:${CMAKE_CURRENT_SOURCE_DIR}/file_view_win32.cpp>
74+
$<${HI_POSIX}:${CMAKE_CURRENT_SOURCE_DIR}/file_view_posix.cpp>
75+
$<${HI_WIN32}:${CMAKE_CURRENT_SOURCE_DIR}/file_view_win32.cpp>
7676
fixed.hpp
7777
float16.hpp
7878
forward_value.hpp
@@ -94,13 +94,13 @@ target_sources(hikogui PRIVATE
9494
jsonpath.hpp
9595
label.hpp
9696
locked_memory_allocator.hpp
97-
$<${TT_WIN32}:${CMAKE_CURRENT_SOURCE_DIR}/locked_memory_allocator_win32.cpp>
97+
$<${HI_WIN32}:${CMAKE_CURRENT_SOURCE_DIR}/locked_memory_allocator_win32.cpp>
9898
log.cpp
9999
log.hpp
100-
$<${TT_MACOS}:${CMAKE_CURRENT_SOURCE_DIR}/log_macos.mm>
101-
$<${TT_WIN32}:${CMAKE_CURRENT_SOURCE_DIR}/log_win32.cpp>
100+
$<${HI_MACOS}:${CMAKE_CURRENT_SOURCE_DIR}/log_macos.mm>
101+
$<${HI_WIN32}:${CMAKE_CURRENT_SOURCE_DIR}/log_win32.cpp>
102102
loop.hpp
103-
$<${TT_WIN32}:${CMAKE_CURRENT_SOURCE_DIR}/loop_win32.cpp>
103+
$<${HI_WIN32}:${CMAKE_CURRENT_SOURCE_DIR}/loop_win32.cpp>
104104
math.hpp
105105
memory.hpp
106106
meta.hpp
@@ -113,7 +113,7 @@ target_sources(hikogui PRIVATE
113113
operator.hpp
114114
os_settings.cpp
115115
os_settings.hpp
116-
$<${TT_WIN32}:${CMAKE_CURRENT_SOURCE_DIR}/os_settings_win32.cpp>
116+
$<${HI_WIN32}:${CMAKE_CURRENT_SOURCE_DIR}/os_settings_win32.cpp>
117117
architecture.hpp
118118
parse_location.hpp
119119
preferences.cpp
@@ -130,8 +130,8 @@ target_sources(hikogui PRIVATE
130130
range_map.hpp
131131
ranges.hpp
132132
recursive_iterator.hpp
133-
$<${TT_WIN32}:${CMAKE_CURRENT_SOURCE_DIR}/registry_win32.cpp>
134-
$<${TT_WIN32}:${CMAKE_CURRENT_SOURCE_DIR}/registry_win32.hpp>
133+
$<${HI_WIN32}:${CMAKE_CURRENT_SOURCE_DIR}/registry_win32.cpp>
134+
$<${HI_WIN32}:${CMAKE_CURRENT_SOURCE_DIR}/registry_win32.hpp>
135135
required.hpp
136136
range_map.hpp
137137
resource_view.hpp
@@ -151,13 +151,13 @@ target_sources(hikogui PRIVATE
151151
tagged_id.hpp
152152
tagged_map.hpp
153153
task.hpp
154-
$<${TT_MACOS}:${CMAKE_CURRENT_SOURCE_DIR}/thread_macos.cpp>
155-
$<${TT_WIN32}:${CMAKE_CURRENT_SOURCE_DIR}/thread_win32.cpp>
154+
$<${HI_MACOS}:${CMAKE_CURRENT_SOURCE_DIR}/thread_macos.cpp>
155+
$<${HI_WIN32}:${CMAKE_CURRENT_SOURCE_DIR}/thread_win32.cpp>
156156
thread.cpp
157157
thread.hpp
158158
time_stamp_count.cpp
159159
time_stamp_count.hpp
160-
$<${TT_WIN32}:${CMAKE_CURRENT_SOURCE_DIR}/time_stamp_count_win32.cpp>
160+
$<${HI_WIN32}:${CMAKE_CURRENT_SOURCE_DIR}/time_stamp_count_win32.cpp>
161161
time_stamp_utc.cpp
162162
time_stamp_utc.hpp
163163
tokenizer.cpp
@@ -170,9 +170,9 @@ target_sources(hikogui PRIVATE
170170
unfair_recursive_mutex.hpp
171171
URL.cpp
172172
URL.hpp
173-
$<${TT_MACOS}:${CMAKE_CURRENT_SOURCE_DIR}/URL_macos.mm>
174-
$<${TT_POSIX}:${CMAKE_CURRENT_SOURCE_DIR}/URL_posix.cpp>
175-
$<${TT_WIN32}:${CMAKE_CURRENT_SOURCE_DIR}/URL_win32.cpp>
173+
$<${HI_MACOS}:${CMAKE_CURRENT_SOURCE_DIR}/URL_macos.mm>
174+
$<${HI_POSIX}:${CMAKE_CURRENT_SOURCE_DIR}/URL_posix.cpp>
175+
$<${HI_WIN32}:${CMAKE_CURRENT_SOURCE_DIR}/URL_win32.cpp>
176176
url_parser.cpp
177177
url_parser.hpp
178178
utils.hpp
@@ -183,7 +183,7 @@ target_sources(hikogui PRIVATE
183183
wfree_unordered_map.hpp
184184
)
185185

186-
if(TT_BUILD_PCH AND NOT TT_ENABLE_ANALYSIS)
186+
if(HI_BUILD_PCH AND NOT HI_ENABLE_ANALYSIS)
187187
target_precompile_headers(hikogui PRIVATE
188188
assert.hpp
189189
counters.hpp
@@ -199,7 +199,7 @@ if(TT_BUILD_PCH AND NOT TT_ENABLE_ANALYSIS)
199199
)
200200
endif()
201201

202-
if(TT_BUILD_TESTS)
202+
if(HI_BUILD_TESTS)
203203
target_sources(hikogui_tests PRIVATE
204204
algorithm_tests.cpp
205205
bezier_curve_tests.cpp
@@ -241,7 +241,7 @@ if(TT_BUILD_TESTS)
241241
endif()
242242

243243

244-
if(TT_BUILD_TESTS AND TT_BUILD_PCH AND NOT TT_ENABLE_ANALYSIS)
244+
if(HI_BUILD_TESTS AND HI_BUILD_PCH AND NOT HI_ENABLE_ANALYSIS)
245245
target_precompile_headers(hikogui_tests PRIVATE
246246
assert.hpp
247247
counters.hpp

0 commit comments

Comments
 (0)