Lisp HUG Maillist Archive

(unknown)


I would like to be removed from your list.


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


CAPI visibility of interface windows

Hi,

I'm trying to understand CAPI interface and how to manipulate the menus 
listed in the main menubar. I'm new to Lispworks and apologize in 
advance if my question appears very silly.
I'm actually working with lw611 on MacOSX 10.8. I followed the examples 
of the reference manual (that are very well done) but I could not find 
anaything how can I generate an interface with menus without displaying 
any window associated with it.

For instance:

;-------------------------------
(setq my_it1
       (make-instance
        'capi:menu-item
        :text "Item1"
        ))
(setq my_it2
       (make-instance
        'capi:menu-item
        :text "Item2"
        ))
(setq my_c_it
       (make-instance
        'capi:menu-component
        :items (list  my_it1  my_it2)
        :interaction :single-selection
        ))
(setq *menu1*
       (make-instance
        'capi:menu
        :title "My items"
        :items (list my_c_it)
        ))

(setq quit
       (make-instance
        'capi:menu-item
        :text "Quit"
        :callback #'(lambda (data interface)
                      (capi:destroy *my-interface*)
                      )
        ))
(setq hide
       (make-instance
        'capi:menu-item
        :text "Hide"
        :callback #'(lambda (data interface)
                      (capi:hide-pane *my-interface*)
                      )
        ))
(setq *help*
       (make-instance
        'capi:menu
        :title "HELP"
        :items (list quit hide)
         ))


(setq *my-interface*
    (make-instance
     'capi:interface
     :title "my test 2"
     :menu-bar-items (list *menu1*  *help*)
))


(defun set-up-menus ()
   (capi:display *my-interface*)
   )

(set-up-menus)

;-------------------------------

I can hide the window "my test 2" when I select my menu item "Hide" but 
obviously I hide (maybe I destroy) the whole interface and loose any 
control over it.

Is it possible to keep an interface alive with the menubar without 
displaying the "my test 2" window? Maybe hiding it?

Thank you in advance for your valuable help.

Best

Massimo


_______________________________________________
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