sdgui: support text selection in the view

This is generally an improvement over the initial GtkLabel approach:
 - Multiple definition lines can be selected at once.
 - The widget doesn't keep a selection caret around (which means
   it can't be controlled from the keyboard, a conscious trade-off).
 - Text doesn't needlessly go to PRIMARY immediately during selection,
   making it somewhat possible lift the self-exception for
   the PRIMARY selection watch.

Closes #2
This commit is contained in:
2022-08-02 03:04:46 +02:00
parent 5ed881d25b
commit 2ff01f9fdb
3 changed files with 409 additions and 37 deletions

View File

@@ -3,9 +3,9 @@ project (sdtui VERSION 0.1.0 LANGUAGES C)
# Moar warnings
if ("${CMAKE_C_COMPILER_ID}" MATCHES "GNU" OR CMAKE_COMPILER_IS_GNUCC)
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu99")
set (CMAKE_C_FLAGS_DEBUG
"${CMAKE_C_FLAGS_DEBUG} -Wall -Wextra -Wno-missing-field-initializers")
set (ignores "-Wno-missing-field-initializers -Wno-cast-function-type")
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu99 ${ignores}")
set (CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -Wall -Wextra")
endif ()
# For custom modules