From ffb70ea38ccd8e6c3421d293d940c8bd5595bc80 Mon Sep 17 00:00:00 2001 From: Hans Dijkema Date: Mon, 16 Feb 2026 17:03:20 +0100 Subject: [PATCH] - --- info.rkt | 2 +- scribblings/web-racket.scrbl | 27 ++++++++++++++++++--------- 2 files changed, 19 insertions(+), 10 deletions(-) diff --git a/info.rkt b/info.rkt index 22f679e..3d66550 100644 --- a/info.rkt +++ b/info.rkt @@ -1,7 +1,7 @@ #lang info (define pkg-authors '(hnmdijkema)) -(define version "0.1.4") +(define version "0.1.5") (define license 'MIT) (define collection "web-racket") (define pkg-desc "web-racket - A Web Based GUI library, based on webui-wire") diff --git a/scribblings/web-racket.scrbl b/scribblings/web-racket.scrbl index 91ee39c..42aa2bd 100644 --- a/scribblings/web-racket.scrbl +++ b/scribblings/web-racket.scrbl @@ -354,7 +354,7 @@ Important behaviour during construction: Key public methods (grouped by responsibility): -@subsubsection{Settings and cloning} +@bold{Settings and cloning} @defmethod[(clone-settings [section symbol?]) (or/c #f ww-settings%)]{ @@ -363,7 +363,7 @@ to obtain a section-specific settings object, otherwise return @racket[#f]. } -@subsubsection{Event handling hooks} +@bold{Event handling hooks} These are normally invoked internally when events arrive from @tt{webui-wire}, but can be overridden in subclasses. @@ -387,7 +387,7 @@ Handle navigation events (for example link clicks) as reported by @tt{webui-wire}. The default implementation may call @racket[send-url] depending on @racket[type] and @racket[kind].} -@subsubsection{Element management} +@bold{Element management} @defmethod[(get-win-id) ww-win?]{ Return the underlying @racket[ww-win] handle.} @@ -426,7 +426,7 @@ Convenience: bind @racket['change] events for @tt{input} and @defmethod[(bind-buttons) void?]{ Convenience: bind @racket['click] events for @tt{button} elements.} -@subsubsection{Window geometry and title} +@bold{Window geometry and title} @defmethod[(move [x number?] [y number?]) void?]{ Move the window to (@racket[x], @racket[y]).} @@ -448,7 +448,7 @@ Set the window title (cached locally and sent to the backend).} @defmethod[(get-title) string?]{ Return the last title set.} -@subsubsection{Show/hide and lifetime} +@bold{Show/hide and lifetime} @defmethod[(show) void?]{ Show the window (set show state to @racket['show]).} @@ -481,7 +481,7 @@ Close the window, unregister it from the global tables, and if this is the last window, stop the backend by calling @racket[ww-stop]. } -@subsubsection{Menus} +@bold{Menus} @defmethod[(set-menu! [menu-def is-menu?]) void?]{ Set the window menu using a structure created with the helpers from @@ -493,7 +493,7 @@ Associate a callback @racket[cb] with a menu item id. When the menu item is activated, the callback is called. } -@subsubsection{HTML and navigation} +@bold{HTML and navigation} @defmethod[(set-icon! [icn (or/c path? string?)]) void?]{ Set the window icon; the file is validated by @racket[ww-set-icon].} @@ -519,7 +519,7 @@ current HTML handle. The default implementation binds buttons and inputs by calling @racket[bind-buttons] and @racket[bind-inputs]. } -@subsubsection{File and directory dialogs} +@bold{File and directory dialogs} @defmethod[(file-open [caption string?] [base-dir string?] @@ -549,7 +549,7 @@ Show a directory chooser dialog; return the chosen directory, or @racket[#f] on cancel/failure. } -@subsubsection{Hook for subclasses} +@bold{Hook for subclasses} @defmethod[(inherit-checks) boolean?]{ @@ -559,6 +559,9 @@ The default implementation simply returns @racket[#t]. } } + + + @subsection{Dialog windows} @defclass[ww-webview-dialog% ww-webview% ()]{ @@ -583,6 +586,8 @@ So, to create a dialog, always pass a parent window: ] } + + @subsection{Message dialogs} @defclass[ww-webview-message% ww-webview-dialog% ()]{ @@ -603,6 +608,8 @@ You can then obtain element wrappers for those ids via HTML or text using the usual element methods. } + + @section{Settings abstraction} @defclass[ww-settings% object% ()]{ @@ -638,4 +645,6 @@ shared base. Default implementation raises an error. Convenience that forwards to @racket[set]. Provided for symmetry with Racket’s @tt{set!} naming style. } + + }