[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Chicken-users] New patch for bb
From: |
Felix Winkelmann |
Subject: |
Re: [Chicken-users] New patch for bb |
Date: |
Wed, 29 Sep 2004 08:53:42 +0200 |
User-agent: |
Mozilla Thunderbird 0.5 (X11/20040208) |
Sergey Khorev wrote:
Just hacked bb one more time.
Added widgets: double-window, return-button, choice-button, menu-button,
int-entry, float-entry. Now bb has almost all I need.
Also added tree widget. It requires FLU library
(http://www.osc.edu/~jbryan/FLU). And there is a question with it.
Should bb require the FLU at the install time (when bb-support.cpp is to
be compiled)? IMHO, no. Currently, the whole FLU usage is #ifdef-ed. But I
don't know how to deal with bb.setup. Maybe check someway for flu-config?
And, if presented, add `flu-config ...` and -DBB_USE_FLU to compile options?
Yes, that would be best. Perhaps along the lines of:
;;;; bb.setup -*- Scheme -*-
(define has-flu? (zero? (system "flu-config --version")))
(make/proc
(list (list "bb-support.so" '("bb-support.cpp" "bb.h")
(lambda ()
(run (g++ -Os -fomit-frame-pointer -fPIC -c
,(if has-flu? "`flu-config --cflags` -DBB_USE_FLU" "")
"`fltk-config --cflags`" bb-support.cpp)) ) ) )
"bb-support.so")
(run (csc bb.scm -s -O2 -d0
-L "\"bb-support.o `fltk-config --use-images --use-gl --ldflags
--libs`\""
,(if has-flu? "-L \"`flu-config --ldflags --libs`" "")
-ld g++) )
(install-extension 'bb '("bb.so"))
Also added procedure bb:image-data to get raw image data
Parameters to bb:show were added (actually they are passed to Fl_Window::show)
The major reason is that calling Fl::Window(int argc, char **argv) is
required on
Windows to have system colors in FLTK widgets rather than default
grey. And I don't want to pass completely bogus values ;)
I don't think that posting 10K in the maillist is a good idea, so
there are links to the patches for sources and documentation:
http://cyber.miem.edu.ru/~iamphet/bb.patch.gz
http://cyber.miem.edu.ru/~iamphet/bb-html.patch.gz
Thanks for the good work! I'll update the website (and in the meanwhile
play a little with BB... :-)
cheers,
felix