Lisp HUG Maillist Archive

Right-click in list panels

There are many tools in the LW IDE (for example the "Functions" tab in
a class browser) that upon inspection seem to be list panels and that
show a popup menu if one right-clicks an entry.

Is there a way to do the same thing in user code, i.e. to add
callbacks for right clicks on list panels?

Thanks,
Edi.


Re: Right-click in list panels

Unable to parse email body. Email id is 4763

Re: Right-click in list panels

On Wed, 2 Nov 2005 05:28:08 GMT, Nick Levine <ndl@ravenbrook.com> wrote:

> In brief:
>  
>           (setf (capi-internals:pane-menu pane)
>                 (lambda (pane local x y)
>                     (declare (ignore local x y))
>                     (make-instance 'capi:menu
>                                    ....)))

Great, that works!  Thanks, Nick.

Now, do you also happen to know how one can easily translate the X/Y
coordinates (LOCAL seems to be always NIL in my case) to the list
panel item that's below the mouse?  I rummaged around a bit but can't
seem to find anything.

Thanks again,
Edi.


Re: Right-click in list panels

Unable to parse email body. Email id is 4768

Re: Right-click in list panels

On Wed, 2 Nov 2005 23:52:38 GMT, Nick Levine <ndl@ravenbrook.com> wrote:

> I got around this by having my menu act on the current
> selection. Uh, if it's a multiple-selection pane then I present a
> popup menu whose items are named after current selections, and each
> of these has subitems which act on that item.

Ah, yes, that didn't occur to me.  I wanted to reply that this
technique doesn't really give me the item I right-clicked on but I
checked again and this seems to be consistent with how the LW IDE
behaves.  So at least they don't have some secret potion... :)

Thanks a lot,
Edi.


Re: Right-click in list panels

Unable to parse email body. Email id is 4770

Re: Right-click in list panels

Unable to parse email body. Email id is 4771

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