[Cuis-dev] Learning-Cuis /Quick-UI-Tour.md
ken.dickey at whidbey.com
ken.dickey at whidbey.com
Sat Jun 22 13:48:50 PDT 2024
I have updated
https://github.com/Cuis-Smalltalk/Learning-Cuis/blob/master/Quick-UI-Tour.md
for Cuis 7.0.
Please let me know of typos. Thanks!
Attached is code for capturing PNG screenshots with a delay to allow for
opening menus.
I found Wayland broke most Linux screen capture programs and we want it
portable in any case..
Perhaps add to our "useful code snippits"?
Good on ya,
-KenD
-------------- next part --------------
"Small invisible area acts as button
to save consecutive screenshots"
Feature require: 'Graphics-Files-Additional'. "Write as PNG"
clickArea := BoxedMorph new.
clickArea color: Color transparent;
borderWidth: 0; "set to 2 to see click screen area"
openInWorld;
morphPosition: 0 at 0;
setProperty: #count toValue: 0;
setProperty: #handlesMouseDown toValue: true;
setProperty: #'mouseButton1Up:localPosition:'
toValue: [ :evt :pos |
[ | fileName |
fileName := 'Cuis',
((clickArea valueOfProperty: #count) asString),
'.png' .
"Allow time to open a menu before snapshot"
(Delay forSeconds: 8) wait.
Display writePNGfile: fileName asFileEntry.
clickArea setProperty: #count
toValue: (clickArea valueOfProperty: #count) + 1.
clickArea inform: fileName.
] fork. "asynchronous while waiting.."
].
More information about the Cuis-dev
mailing list