[Openmcl-devel] Contribution wrt some types of menu

arthur.cater at ucd.ie arthur.cater at ucd.ie
Mon Jul 7 03:35:01 PDT 2008


Hi,
I've made further amendments to what was originally ccl/examples/cocoa/easygui/views.lisp,
mostly regarding pop-up, pull-down, and contextual menus.
It is at http://csiweb.ucd.ie/staff/acater/ClozureCL/easygui-views-2.lisp  (37k)

The functionality is pretty basic, but I'm going on holiday soon and I think it's better to share
sooner rather than later. Maybe when I get back somebody will have fixed issues that are
troubling me! (Well I can hope, can't I?)

The relevant comments are

#| Changes from ccl/examples/cocoa/easygui/views.lisp
Pop-up menus (which show current selection when not actively tracking) exist.
Pull-down menus (which show a fixed title and triangle when not tracking) exist.
Contextual menus (which spring up in response to control-click) exist.
Submenus of all these menu types exist.
Sliders may have actions associated with them.
*** Beware!
  Since I (AC) do not know enough about Cocoa, it is probable that there will be memory leaks
  when Lisp views with attached menus are discarded. Help with that would be appreciated.
*** Confessions:
  There are many things I'd like to do - enabling and disabling, colouring, navigating
  through menus, playing with fonts for example - that are not addressed.
  Topbar "Application Menu" code is in preparation and is not included here.
  Contextual menus don't show up in BOX views, and I don't know why not.
  Tick marks showing the current selection are not always maintained properly and I don't know why not.
  There's no attempt in the demo to update the state of other controls: eg radio buttons
  are a law unto themselves and are not affected when a contextual menu is used to change
  the display.
  The code defining the class COCOA-DRAWING-VIEW is commented out, it causes an error when
  evaluated in a buffer and I don't know why. It is directly copied from the original
  VIEWS.LISP, presumably if anybody who is rebuilding their ccl using this file will
  want to remove the commenting-out.


Feedback, criticism etc are very welcome.

Arthur
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.clozure.com/pipermail/openmcl-devel/attachments/20080707/3d5d37d0/attachment.htm>


More information about the Openmcl-devel mailing list