luv

Workshop wiki

command-menu-tests.lisp

mcclim/command-menu-tests.lisp

system luv/mcclim/test · 15 definitions · on GitHub

in-package#:mcluv.tests
clim:define-command-tablecommand-menu-test-verbs
clim:define-command-tablecommand-menu-test-more-verbs:inherit-from
clim:define-command
com-command-menu-alpha:command-tablecommand-menu-test-verbs:name"Alpha Command"
clim:define-command
com-command-menu-beta:command-tablecommand-menu-test-more-verbs:name"Beta Operation"
clim:define-command
com-command-menu-needs-value:command-tablecommand-menu-test-verbs:name"Needs Value"
value'integer:prompt"value"
defuncommand-menu-test-key
key-name&keycharactermodifiersrepeat-p
make-instance'luv:canvas-key-press-event:timestamp0:key-namekey-name:charactercharacter:unshifted-charactercharacter:modifiersmodifiers:repeat-prepeat-p
deftestm-x-reads-one-executable-application-vocabulary
let*
ok
equal'
"Alpha Command""Beta Operation"
mapcar#'mcluv:command-menu-entry-labelentries

The inherited Alpha command is encountered twice but remains one verb.

ok
=1
count'com-command-menu-alphaentries:key#'mcluv:command-menu-entry-command-name

A row which cannot yet prompt for its required argument is not a dead promise in the visible command vocabulary.

ok
null
find"Needs Value"entries:test#'string=:key#'mcluv:command-menu-entry-label
ok
equal'
"Beta Operation"
mapcar#'mcluv:command-menu-entry-label
setf
clim:command-enabled'com-command-menu-betaowner
nil
ok
equal'
"Alpha Command"
deftestm-x-filters-repaints-and-then-executes-outside-paint
let
setf
mcluv::command-menu-dirty-pframe
nil
ok
mcluv::command-menu-dirty-pframe
dolist
character'
#\b#\e
multiple-value-bind
actioncommand
ok
eq:continueaction
ok
nullcommand
ok
string="be"
mcluv:command-menu-queryframe
ok
equal'
"Beta Operation"
mapcar#'mcluv:command-menu-entry-label
mcluv:command-menu-resultsframe

Modified characters are application gestures, not finder text.

ok
string="be"
mcluv:command-menu-queryframe
multiple-value-bind
actioncommand
ok
eq:executeaction
ok
equal'
com-command-menu-beta
command
ok
equal'
:beta:dismissed
*command-menu-test-execution*
multiple-value-bind
actioncommand
ok
eq:dismissaction
ok
nullcommand
defteststatic-m-x-prepares-live-shader-revisions
let
setf
mcluv::command-menu-dirty-pframe
nil
multiple-value-bind
proberevision
ok
equal
listrevision
current-revision-preparation-probe-revisionsprobe
deftestm-x-layout-is-one-logical-pixel-at-the-native-destination
let*
logical'
1344840
drawable'
26881680
half-width
arefstate4
half-height
arefstate9

Clip-space half extents times the logical viewport recover the authored dimensions exactly: no pane raster is resampled to get there.

ok
<
abs
-620.0
*half-width
firstlogical
1.0e-4
ok
<
abs
-420.0
*half-height
secondlogical
1.0e-4

A 2x drawable supplies two native samples for every logical coordinate.

ok
<
abs
-1240.0
*half-width
firstdrawable
1.0e-4
ok
<
abs
-840.0
*half-height
seconddrawable
1.0e-4
multiple-value-bind
xy
mcluv:command-menu-local-coordinatenil
/
firstlogical
2
/
secondlogical
2
logical
ok
<
abs
-310.0x
1.0e-4
ok
<
abs
-210.0y
1.0e-4
deftestm-x-analytic-ink-is-translucent-and-prepares-no-image-command
let
setf
clim:medium-inkmedium
mcluv::*command-menu-panel-ink*
let
vertices
mcluv::gpu-medium-analytic-verticesmedium
semantic-commands
mcluv::gpu-medium-commandsmedium
ok
<
abs
-0.92
arefvertices2
1.0e-5
ok
=1
lengthsemantic-commands
ok
typep
arefsemantic-commands0
'mcluv::gpu-analytic-command
let*
sheet
make-instance'mcluv::mx-command-menu-pane:region
clim:make-bounding-rectangle00620420
mirror
make-instance'mcluv:luv-gpu-mirror:sheetsheet:targetnil:embedded-pt
multiple-value-bind
preparedtext-data
mcluv::prepare-gpu-frame-commandsmirrorsemantic-commands
declare
ignoretext-data
ok
=1
lengthprepared
ok
typep
firstprepared
'mcluv::gpu-analytic-command
ok
null
find-if
lambda
command
prepared