> ------------------------------
>
> Message: 2
> Date: Wed, 27 Mar 2013 10:05:48 -0300
> From: Mariano Montone<marianomontone(a)gmail.com>
> To: mcclim-devel(a)common-lisp.net
> Subject: Re: [mcclim-devel] button size
> Message-ID:<5152EEAC.7040909(a)gmail.com>
> Content-Type: text/plain; charset="iso-8859-1"
>
> Hi.
>
> Did you try with :x-spacing and :y-spacing instead of :width and :height
> to see what happens?
I just did. The button is bigger but it is still not a square.
I guess that I will have to try what Andy suggested:
write a new compose-space method :-(
Irène
> Mariano
>
> El 27/03/13 09:22, Ir?ne Durand escribi?:
>> Hello,
>>
>> In order to give a project to my students using McClim for the graphical
>> interface, I am trying to make a square button of a given size.
>>
>> But I always obtain a default size button the width, height,
>> max-width, ...
>> have no effect.
>>
>> Where could I find some help about that?
>>
>> Thank you,
>> Ir?ne
>>
>> (defun make-square-pane ()
>> (make-pane
>> 'square-button-pane
>> :label ""
>> :width 20
>> :height 20
>> :activate-callback (lambda (x)
>> (setf (gadget-label x) "O"))))
>>
>>
>>
>>
>> _______________________________________________
>> mcclim-devel mailing list
>> mcclim-devel(a)common-lisp.net
>> http://lists.common-lisp.net/cgi-bin/mailman/listinfo/mcclim-devel
>
Hello,
As my paste on irc lisp, did not have any answer, I turning again to
this more specialized mailing list.
I have this MClim problem. The application runs fine on
Linux with SBCL 1.0.13, xorg-x11-server 1.3.0.0-9.fc7,
a recent version of MClim.
But doesn't on my Mac (Darwin PowerPC) with MacOS 10.5 (leopard),
SBCL 1.0.16, cvs version of MClim,
Xquartz 2.1.5 - (xorg-server 1.3.0-apple22)(2.1.5).
I have tried to create the smallest as possible
application where the problems occurs (attached).
Just compile the file and launch mini::(start)
On Linux, I have the desired behaviour:
a circle blinks (red/green/red/...) on the display pane
and at the bottom of the window application, the "quit"
button is displayed and works.
On the Mac, the circle blinks correctly but the "Quit"
button never shows up.
For a while the application is killable with C-c C-c
(under Slime), but after a while there is no way
to kill it than to stop Lisp and restart everything
(even /the/
<http://www.lispworks.com/reference/HyperSpec/Body/s_the.htm> X server).
Note that this application used to work on Mac OS 10.3 (Panther)
with older versions of everything.
I suspect the X server to behave differently from before.
But now I don't see how to make the application work.
This is too bad, as I usually use a similar application
for my Lisp undergraduate course.
If anyone has an idea, it will be welcomed.
Irène
(defpackage :mini
(:use :clim :clim-extensions :clim-lisp))
(in-package :mini)
(let ((colors (list +red+ +green+)))
(setf colors (nconc colors colors))
(defun display-function (frame pane)
(draw-circle* pane 10 10 10 :ink (pop colors))
(sleep 0.5)
(redisplay-frame-panes frame)))
(defun quit ()
(frame-exit *application-frame*))
(define-application-frame mini ()
()
(:panes
(display :application
:display-function 'display-function
:incremental-redisplay t)
(quit
:push-button
:label "Quit"
:activate-callback (lambda (x)
(declare (ignore x))
(quit))))
(:layouts
(defaults (vertically () display quit))))
(defun run-test (name)
(loop for port in climi::*all-ports*
do (destroy-port port))
(setq climi::*all-ports* nil)
(let ((frame (make-application-frame name)))
(run-frame-top-level frame)))
(defun start ()
(run-test 'mini)
0)
(defmethod run-frame-top-level :before ((mini mini) &key)
(let* ((frame-manager (frame-manager *application-frame*))
(port (climi::frame-manager-port frame-manager))
(display (clim-clx::clx-port-display port)))
(setf (xlib:display-after-function display)
g#'xlib:display-force-output)))