Lisp HUG Maillist Archive

CAPI:DISPLAY-DIALOG and Cocoa

Hello,

On OS X, I would like to display a modal window with no close nor minimize button (resizing is OK).

I can’t seem to find the correct set of options to display this kind of window, CAPI:DISPLAY-DIALOG keeps on displaying my window’s contents in a sheet. 

Has anybody a clue how of to do that?
Thanks!


Best,
Camille


_______________________________________________
Lisp Hug - the mailing list for LispWorks users
lisp-hug@lispworks.com
http://www.lispworks.com/support/lisp-hug.html


Re: CAPI:DISPLAY-DIALOG and Cocoa

Hi Camille,

Passing :owner (capi:convert-to-screen) to capi:display-dialog will force the dialog to be shown as its own window rather than a sheet.

To hide the close and minimize buttons, you can use the following create-callback for the interface:

(defun dialog-create-callback (interface)
  ;; Hide window buttons
  #+cocoa
  (let ((representation (slot-value (capi-internals:representation interface) 'capi-cocoa-library::window)))
    (loop for i from 0 to 2 do
          (objc:invoke (objc:invoke representation "standardWindowButton:" i) "setHidden:" 1))))


Regards
Erik




20 nov 2013 kl. 18:30 skrev Camille Troillard:

> 
> Hello,
> 
> On OS X, I would like to display a modal window with no close nor minimize button (resizing is OK).
> 
> I can’t seem to find the correct set of options to display this kind of window, CAPI:DISPLAY-DIALOG keeps on displaying my window’s contents in a sheet. 
> 
> Has anybody a clue how of to do that?
> Thanks!
> 
> 
> Best,
> Camille
> 
> 
> _______________________________________________
> Lisp Hug - the mailing list for LispWorks users
> lisp-hug@lispworks.com
> http://www.lispworks.com/support/lisp-hug.html
> 


_______________________________________________
Lisp Hug - the mailing list for LispWorks users
lisp-hug@lispworks.com
http://www.lispworks.com/support/lisp-hug.html


Updated at: 2020-12-10 08:34 UTC