Skip to main content

Module plugin

Module plugin 

Source
Expand description

The library’s steps (ADR 0011), its commands (the agent surface), the registry of the libraries drawn with an application, and LibraryPlugin declaring them.

StepArgumentsDefault
library.selectlibrary, keys, cursorsets the selection
library.ratelibrary, keys, rating (0 to 5)nothing: the application rates its images (the Rate signal)
library.labellibrary, keys, label (red, yellow, green, blue, purple), onnothing: the application labels them (Label)
library.flaglibrary, keys, flag (pick, reject, none)nothing: the application flags them (Flag)
library.taglibrary, keys, add, remove (tag lists)nothing: the application tags them (Tag)
library.stacklibrary, stack (its top image’s key), expandedexpands or collapses the stack in the view
library.filterlibrary, filter (a Filter)sets the search field’s filter

The application owns the marks, the tags and the filtering: a mark’s default does nothing but report it (the view’s output signal, and the journal); the application applies it from the signal or from an after-hook. A before-hook vetoes a mark (Veto) or rewrites it (Redirect, a rating capped, a label swapped, other keys).

Commands (keys, palette, agents), each acting on library (else the library that last had the focus) and on keys (else its selection): library.select (keys, cursor), library.rate (rating), library.label (label, on: else toggled from the cursor’s image), library.flag (flag), library.tag (add, remove), library.filter (filter). A command queues its step for the view, which runs it at its next pass as if the user had asked. The libraries debug collector lists the libraries drawn, their selection and filter.

Structs§

Libraries
The libraries drawn with an application, by id: what commands and the collector reach. A grid, a filmstrip or a search field registers its library when drawn with .app(...).
LibraryPlugin
Declares the library’s steps, its commands and its collector, and provides the Libraries registry. Connect it when library views run with an application.

Constants§

CMD_FILTER
CMD_FLAG
CMD_LABEL
CMD_RATE
CMD_SELECT
CMD_TAG
INBOX
How many requests a library keeps waiting for its view: a view its host no longer draws keeps the latest, the older ones dropped and counted (dropped in the collector).
LIBRARIES
The registry, a service of LibraryPlugin.
LIBRARY
The plugin’s id.
LIBRARY_FILTER
LIBRARY_FLAG
LIBRARY_LABEL
LIBRARY_RATE
LIBRARY_SELECT
LIBRARY_STACK
LIBRARY_TAG

Functions§

specs
Every step the library declares.