GithubHelp home page GithubHelp logo

bodge-ui-window's Introduction

bodge-ui-window

Utility to quickly setup GUI for your Common Lisp application. It's an integration of several technologies: bodge-host for managing OS resources and input, bodge-ui for handling UI and bodge-canvas for drawing.

Examples

Install

;; Add cl-bodge distribution into quicklisp
(ql-dist:install-dist "http://bodge.borodust.org/dist/org.borodust.bodge.txt" :replace t :prompt nil)

;; Update main dist just in case
(ql:update-dist "quicklisp")

;; Uncomment and evaluate next line only if you wish to enable OpenGL 2 renderer
;; (cl:pushnew :bodge-gl2 cl:*features*)

;; Load the example
(ql:quickload :bodge-ui-window/examples)
;; And run it!
(bodge-ui-window.example.basic:run)

bodge-ui-window's People

Contributors

borodust avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

Forkers

bholten dpflug

bodge-ui-window's Issues

Problem to load OpenGL framework

When executing ql:quickload :bodge-ui-window the compilation stalls on an error

[package nuklear].................................
..................................................
..................................................
........................................
; 
; compilation unit aborted
;   caught 1 fatal ERROR condition
; Evaluation aborted on #<CFFI:LOAD-FOREIGN-LIBRARY-ERROR "Unable to find framework ~A" {100645F153}>.

with the backtrace:


Backtrace:
  0: (CFFI::FL-ERROR "Unable to find framework ~A" "OpenGL")
  1: (CFFI::LOAD-DARWIN-FRAMEWORK CL-OPENGL-BINDINGS::OPENGL "OpenGL")
  2: ((FLET CFFI::%DO-LOAD :IN CFFI::%DO-LOAD-FOREIGN-LIBRARY) #<CFFI:FOREIGN-LIBRARY OPENGL> CL-OPENGL-BINDINGS::OPENGL (:FRAMEWORK "OpenGL"))
  3: (CFFI:LOAD-FOREIGN-LIBRARY CL-OPENGL-BINDINGS::OPENGL :SEARCH-PATH NIL)
  4: (SB-FASL::LOAD-FASL-GROUP #S(SB-FASL::FASL-INPUT :STREAM #<SB-SYS:FD-STREAM for "file /Users/markusklink/.cache/common-lisp/sbcl-2.0.11-macosx-x64/Users/markusklink/.quicklisp/dists/quicklisp/software..
  5: (SB-FASL::LOAD-AS-FASL #<SB-SYS:FD-STREAM for "file /Users/markusklink/.cache/common-lisp/sbcl-2.0.11-macosx-x64/Users/markusklink/.quicklisp/dists/quicklisp/software/cl-opengl-20191130-git/gl/library..
  6: ((FLET SB-FASL::THUNK :IN LOAD))
  7: (SB-FASL::CALL-WITH-LOAD-BINDINGS #<CLOSURE (FLET SB-FASL::THUNK :IN LOAD) {D36BA0B}> #<SB-SYS:FD-STREAM for "file /Users/markusklink/.cache/common-lisp/sbcl-2.0.11-macosx-x64/Users/markusklink/.quick..
  8: ((FLET SB-FASL::LOAD-STREAM :IN LOAD) #<SB-SYS:FD-STREAM for "file /Users/markusklink/.cache/common-lisp/sbcl-2.0.11-macosx-x64/Users/markusklink/.quicklisp/dists/quicklisp/software/cl-opengl-20191130..
  9: (LOAD #P"/Users/markusklink/.cache/common-lisp/sbcl-2.0.11-macosx-x64/Users/markusklink/.quicklisp/dists/quicklisp/software/cl-opengl-20191130-git/gl/library.fasl" :VERBOSE NIL :PRINT NIL :IF-DOES-NOT..
 10: (UIOP/UTILITY:CALL-WITH-MUFFLED-CONDITIONS #<CLOSURE (LAMBDA NIL :IN UIOP/LISP-BUILD:LOAD*) {10038D8A4B}> ("Overwriting already existing readtable ~S." #(#:FINALIZERS-OFF-WARNING :ASDF-FINALIZERS)))
 11: ((SB-PCL::EMF ASDF/ACTION:PERFORM) #<unused argument> #<unused argument> #<ASDF/LISP-ACTION:LOAD-OP > #<ASDF/LISP-ACTION:CL-SOURCE-FILE "cl-opengl" "gl" "library">)
 12: ((LAMBDA NIL :IN ASDF/ACTION:CALL-WHILE-VISITING-ACTION))
 13: ((:METHOD ASDF/ACTION:PERFORM :AROUND (ASDF/LISP-ACTION:LOAD-OP ASDF/LISP-ACTION:CL-SOURCE-FILE)) #<ASDF/LISP-ACTION:LOAD-OP > #<ASDF/LISP-ACTION:CL-SOURCE-FILE "cl-opengl" "gl" "library">) [fast-meth..
 14: ((:METHOD ASDF/ACTION:PERFORM-WITH-RESTARTS (ASDF/LISP-ACTION:LOAD-OP ASDF/LISP-ACTION:CL-SOURCE-FILE)) #<ASDF/LISP-ACTION:LOAD-OP > #<ASDF/LISP-ACTION:CL-SOURCE-FILE "cl-opengl" "gl" "library">) [fas..
 15: ((:METHOD ASDF/ACTION:PERFORM-WITH-RESTARTS :AROUND (T T)) #<ASDF/LISP-ACTION:LOAD-OP > #<ASDF/LISP-ACTION:CL-SOURCE-FILE "cl-opengl" "gl" "library">) [fast-method]
 16: ((:METHOD ASDF/PLAN:PERFORM-PLAN (T)) #<ASDF/PLAN:SEQUENTIAL-PLAN {1001F95FE3}>) [fast-method]
 17: ((FLET SB-C::WITH-IT :IN SB-C::%WITH-COMPILATION-UNIT))
 18: ((:METHOD ASDF/PLAN:PERFORM-PLAN :AROUND (T)) #<ASDF/PLAN:SEQUENTIAL-PLAN {1001F95FE3}>) [fast-method]
 19: ((:METHOD ASDF/OPERATE:OPERATE (ASDF/OPERATION:OPERATION ASDF/COMPONENT:COMPONENT)) #<ASDF/LISP-ACTION:LOAD-OP > #<ASDF/SYSTEM:SYSTEM "bodge-ui-window"> :PLAN-CLASS NIL :PLAN-OPTIONS NIL) [fast-method..
 --more--

The system is Mac OX X Big Sure (11.0.1). I checked my frameworks and the opengl framework seems to be present in /System/Library/Frameworks/OpenGl.framework which AFAIK is in the list of directories which are searched. Please let me know if I can switch to a different renderer, or provide more error informations for you.

bodge-ui:combo-box needs tweaking

  1. When placed in bodge-ui-window panels, combo-boxes do not initialize because calculate-text-width gets not a font but ui-renderer instance. Can be fixed by a workaround defining:
(defmethod bodge-ui:calculate-text-width ((renderer bodge-canvas-ui::ui-renderer) string)
  (bodge-ui:calculate-text-width
   (bodge-ui:renderer-default-font renderer) string))

Which looks like skipping one layer of hierarchy...

  1. In the compose method for bodge-ui:combo-box row-height is undefined.
    (This leads to a spin-off question, of how to get default row height from panel containing widget?)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.