luv

Workshop wiki

command-menu.lisp

luft/render/command-menu.lisp

system luft/render · 19 definitions · on GitHub

in-package#:luft.render

luft owns only the application boundary of M-x: which command tables form its vocabulary, when the modal surface is attached, and where it enters the atelier's final pass. Search, input editing, painting, and execution all remain in mcluv's shared retained-GPU instrument.

defclassviewer-command-menu-instrument
frame:initarg:frame:readerviewer-command-menu-frame
compositor:initarg:compositor:readerviewer-command-menu-compositor
defmethodviewer-instrument-priority
declare
ignoreinstrument
1000
defmethodrefresh-viewer-instrument
declare
ignoreviewer

Input normally published the revision synchronously. This guard never discovers commands and is a no-op for a clean retained snapshot.

mcluv:prepare-command-menu
viewer-command-menu-frameinstrument
instrument
defmethodencode-viewer-instrument
viewerpasssurface-texturephysical-extent
declare
ignorephysical-extent
let
frame
viewer-command-menu-frameinstrument
mcluv:encode-direct-gpu-mirror
viewer-command-menu-compositorinstrument
passsurface-texture

Both composition and inverse input use the SDL canvas's logical destination extent. The native drawable therefore supplies its pixel density directly rather than upscaling a panel raster.

instrument
defmethodrelease-viewer-instrument
declare
ignoreviewer
mcluv:destroy-command-menu
viewer-command-menu-frameinstrument
defunopen-viewer-command-menu
viewer&key
title"LUFT M-x"

Attach viewer's shared textureless M-x surface and return it.

The application vocabulary is captured here, outside paint. Releasing relative-pointer mode also makes the retained panel immediately clickable.

or
let
transferred-pnil
completed-pnil
unwind-protect
progn
when
viewer-pointer-captured-pviewer
setf
viewer-pointer-captured-pviewer
nil
setfframe
mcluv:make-embedded-command-menuviewer
viewer-canvasviewer
viewer-contextviewer
viewer-deviceviewer
:command-tables:titletitle
let*
compositor
make-instance'mcluv:direct-gpu-mirror-compositor:mirrormirror
attachment
make-instance'viewer-command-menu-instrument:frameframe:compositorcompositor
setf
mcluv:mirror-compositormirror
compositor
setftransferred-pt
setfcompleted-pt
attachment
unlesscompleted-p
defunclose-viewer-command-menu

Detach and release viewer's M-x surface, if present.

alexandria:when-let

REMOVE publishes absence before RELEASE destroys the McCLIM frame and compositor buffers against the still-live viewer device.

nil
defunapply-viewer-command-menu-action
viewerattachmentactioncommand
caseaction
:execute
mcluv:execute-command-menu-command
viewer-command-menu-frameattachment
command:before-execute
t
clim:define-command
com-execute-command:command-tableluft-atelier:name"Execute Command":keystroke
#\x:meta
defunviewer-command-menu-invocation
viewerevent

Return luft's M-x command form when event names it.

let
and
conspcommand
eq'com-execute-command
firstcommand
command
defmethodhandle-viewer-instrument-event
declare
ignorecanvas
let
frame
viewer-command-menu-frameinstrument
multiple-value-bind
xy
mcluv:command-menu-local-coordinateframe
canvas-pointer-event-xevent
canvas-pointer-event-yevent
whenx
multiple-value-bind
actioncommand
mcluv:handle-command-menu-pointer-pressframexy
canvas-pointer-event-buttonevent

A modal click outside the panel must not recapture the game pointer.

t
defmethodhandle-viewer-instrument-event
declare
ignoreinstrumentcanvas

Retain the absolute logical position without orbiting the camera.

setf
viewer-pointer-xviewer
canvas-pointer-event-xevent
viewer-pointer-yviewer
canvas-pointer-event-yevent
t