A system that uses cl-gtk4 and allows other apps to use its GUI capabilities for drawing canvas, menu and events. Quite limited subset of Gtk4 capabilities has been implemented, but it may be enough for simple 2D graphics or games.
So far it can only do multiple windows that contain only one widget, that is DrawingArea. The examples folder will contain examples of using the system.
There is a limitation bohonghuang/cl-gtk4#58 of what the underlying library can do, so you may have to implement your own widget system similar to those in Smalltalk systems.
Perhaps it would be possible to have a declarative way to define other widgets
than DrawingArea, in similar manner to function menu-bar-menu
is used for menu,
but that is not my priority.
(load "~/Programming/Lisp/clops-gui/examples/example.lisp")
You need SBCL, quicklisp and ultralisp. Please follow the relevant instructions.
also install development libraries
sudo apt install libgtk-4-dev
discussion about prepending functions with % https://www.reddit.com/r/Common_Lisp/comments/jgj9lu/naming_conventions/
And some programmers will name particularly low-level functions with names that start with % or even %%. https://gigamonkeys.com/book/syntax-and-semantics
http://www.mohamedelafrit.com/education/ENSEIRB/lisp/standards.pdf
https://ccrma.stanford.edu/CCRMA/Courses/AlgoComp/cm/doc/contrib/lispstyle.html https://lisp-lang.org/style-guide/
https://github.com/bbatsov/emacs-lisp-style-guide
https://www.cliki.net/naming+conventions
https://softwareengineering.stackexchange.com/questions/363084/use-labels-or-nested-flet
not so good, rather disappointing
CL-USER> (ql:quickload :sblint) CL-USER> (sblint:run-lint-directory "~/Programming/Lisp/clops-gui/")
file:~/Programming/Lisp/clops-gui/examples/example.lisp::1
file:src/gui-window.lisp::(defmethod add-child and the method below need to be somehow moved to gui-box
https://docs.gtk.org/gtk4/drawing-model.html
Some events, like mouse motion are compressed so that only a single mouse motion event per clock cycle
running animation
geometry changes, sizes and positions
redrawing what needs redrawing
https://lisp-journey.gitlab.io/resources/
https://en.wikipedia.org/wiki/Archy_(software)
Archy has been compared as similar to the Emacs text editor, although its design begins from a clean slate.