Folders and files
| Name | Name | Last commit date | ||
|---|---|---|---|---|
Repository files navigation
#+OPTIONS: html-postamble:nil html-preamble:nil #+AUTHOR: #+TITLE: NODGUI * NODGUI /"No Drama GUI"/ Common Lisp bindings for the Tk GUI toolkit. ** important notes *** you need TK version 9 to run this code *** Version ~0.4.0~ broke the user API, see [[https://www.twistfold.it/nodgui.html#orgb574adf][here]] for more information about how your code is affected and how to fix it. ** Features - custom themes - more widgets: - history-entry - autocomplete - expanded "text" widget - date picker - treelist - tooltip - searchable listbox - password entry - openGL frame - … - ~tklib~-derived widgets: - calendar - notify-window (a bit buggy, unfortunately) - plots and charts: dot-plot, bar-chart… - asynchronous main event loop - and more ** Themes nodgui supports loading [[https://wiki.tcl-lang.org/page/List+of+ttk+Themes][custom ttk themes]] and ships the "yaru" theme from the [[https://ttkthemes.readthedocs.io/en/latest/themes.html#yaru][ttkthemes collection]]. To use a built-in theme other than the "default" one, do: # note: notabug.org doesn't like org source blocks. We avoid them below. #+BEGIN_SRC txt (with-nodgui (:theme "yaru") (code here)) #+END_SRC or use =(setf *default-theme* "yaru")=. You can see how they look with the demos: : CL-USER> (nodgui.demo:demo :theme "yaru") You can load any .tcl file describing a theme: : (nodgui:eval-tcl-file "path/to/another/theme.tcl") : (nodgui:use-theme "theme") See also =*themes-directory*=. This currently doesn't work with a few themes using SVG images, but it might be fixed with the release of an upcoming Tcl/Tk version. * Dependency ** Programs - TCL/TK interpreter (version >= 8.6) https://www.tcl.tk ** Lisp libraries - alexandria; - bordeaux-threads; - cl-colors2; - cl-opengl; - cl-ppcre-unicode; - cl-unicode; - sdl2; - sdl2-ttf; - clunit2; - esrap; - flexi-streams; - jpeg-turbo; - named-readtables; - parse-number; - pngload; - zpng. All of the above libraries are available on quicklisp. ** C Libraries - libsdl2 https://www.libsdl.org/ - turboJpeg (high level api for libjpeg-turbo) https://www.libjpeg-turbo.org/ - opengl headers ** TCL/TK libraries (optional) - TKlib https://core.tcl-lang.org/tklib/home - tkimg https://sourceforge.net/projects/tkimg/ - tcllib https://www.tcl.tk/software/tcllib/ * Installing 1. install the tk interpreter (example on a Debian system follows) #+BEGIN_SRC sh # apt-get install tk #+END_SRC 2. optionally install tklib #+BEGIN_SRC sh # apt-get install tklib #+END_SRC 3. optionally install tcllib #+BEGIN_SRC sh # apt-get install tcllib #+END_SRC 4. optionally install tkimg #+BEGIN_SRC sh # apt-get install libtk-img #+END_SRC 5. install libsd2 #+BEGIN_SRC sh # apt-get install libsdl2-dev #+END_SRC 6. install opengl #+BEGIN_SRC sh # apt-get install libg-dev #+END_SRC 7. install libturbojpeg #+BEGIN_SRC sh # apt-get install libturbojpeg0-dev #+END_SRC 8. open a REPL and type #+BEGIN_SRC sh (ql:quickload "nodgui") #+END_SRC 9. try it! #+BEGIN_SRC sh (nodgui.demo:demo) #+END_SRC also try the minigame, it is fun! #+BEGIN_SRC sh (asdf:make nodgui/game) (main::main) #+END_SRC * Documentation please follow [[https://www.twistfold.it/nodgui.html][this link for documentation and news]]. * License This software is Copyright © cage. Derived from: - © Peter Herth; - © Thomas F. Burdick; - © Cadence Design Systems; - © Daniel Herring. The authors grant you the rights to distribute and use this software as governed by the terms of the Lisp Lesser GNU Public License (http://opensource.franz.com/preamble.html), known as the LLGPL. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. This library uses code from other authors see the file [[./LICENSES.org]] for details. ** Themes The themes definitions found in the ~themes/~ subdirectory are distributed with many different license, please carefully check the file ~LICENSE.org~ in each theme's subdirectory (e.g [[./themes/yaru/LICENSE.org]]) for more information. * Acknowledgment My (cage) deep thanks to Tim Holliefield <tholliefield [at] online.de>, for all the suggestions and help about implementing the widgets styles management.