documentation more consistent

This commit is contained in:
2026-08-03 16:50:36 +02:00
parent e674693a28
commit 16b3a784ad
19 changed files with 136 additions and 130 deletions
+9 -9
View File
@@ -8,7 +8,7 @@
json
"../menu.rkt"))
@title{menu}
@title[#:tag "menu"]{menu}
@author[@author+email["Hans Dijkema" "hans@dijkewijk.nl"]]
@defmodule[racket-webview/menu]
@@ -18,7 +18,7 @@ Menu data structures used by the webview library.
This module provides constructors, predicates, traversal helpers, mutation
operations, and JSON conversion for menu trees.
@section{Overview}
@section[#:tag "menu-overview"]{Overview}
A menu is represented as a tree. A menu consists of menu items, and a menu item
may optionally contain a submenu.
@@ -29,14 +29,14 @@ strings and may be supplied either as @racket[#f], strings, or URL values.
The module does not display menus itself. It provides the menu data structure
used by higher layers.
@section{Internal Representation}
@section[#:tag "menu-internal-representation"]{Internal Representation}
Internally, menus are represented by transparent structure values. These
structure constructors and predicates are not exported directly. The public API
uses constructor procedures and helper functions operating on those internal
values.
@section{Predicates}
@section[#:tag "menu-predicates"]{Predicates}
@defproc[(is-wv-menu? [mnu any/c]) boolean?]{
@@ -48,7 +48,7 @@ list is a list of internal menu items, and every submenu recursively also
satisfies @racket[is-wv-menu?].
}
@section{Constructors}
@section[#:tag "menu-constructors"]{Constructors}
@defproc[(wv-menu [item-or-id any/c] ...)
any/c]{
@@ -97,7 +97,7 @@ stored.
If any argument does not satisfy these conditions, an exception is raised.
}
@section{Traversal and Lookup}
@section[#:tag "menu-traversal-and-lookup"]{Traversal and Lookup}
@defproc[(wv-menu-for-each [menu any/c] [cb procedure?]) boolean?]{
@@ -121,7 +121,7 @@ After the callback has been applied, the original @racket[menu] value is
returned.
}
@section{Mutation}
@section[#:tag "menu-mutation"]{Mutation}
@defproc[(wv-menu-set-title! [menu any/c] [id symbol?] [title string?])
any/c]{
@@ -154,7 +154,7 @@ Sets the callback of the menu item identified by @racket[id].
@racket[menu] value.
}
@section{Conversion}
@section[#:tag "menu-conversion"]{Conversion}
@defproc[(wv-menu->json [menu any/c]) string?]{
@@ -177,7 +177,7 @@ The @racket['id] field of the top-level menu is also converted to a string in
the JSON output.
}
@section{Accessors}
@section[#:tag "menu-accessors"]{Accessors}
@defproc[(wv-menu-id [m any/c]) any/c]{