Moved some modules and added documentation

This commit is contained in:
2026-04-06 00:15:49 +02:00
parent 1f4f8a1fbd
commit f35f040efb
29 changed files with 276 additions and 70 deletions

41
wv-settings.rkt Normal file
View File

@@ -0,0 +1,41 @@
#lang racket/base
(require racket/class
simple-ini/class
)
(provide wv-settings%)
(define wv-settings%
(class object%
(init-field ini
wv-context
)
(define/public (get key . default-value)
(if (null? default-value)
(send ini get wv-context key)
(send ini get wv-context key (car default-value))))
(define/public (set! key value)
(send ini set! wv-context key value))
(define/public (get/global key . default-value)
(if (null? default-value)
(send ini get 'global key)
(send ini get 'global key (car default-value))))
(define/public (set/global! key value)
(send ini set! 'global key value))
(define/public (clone context)
(new wv-settings% [ini ini] [wv-context context]))
(define/public (context)
wv-context)
(super-new)
)
)