[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSMenu changes

From: Fred Kiefer
Subject: NSMenu changes
Date: Thu, 13 Sep 2001 21:28:21 +0200

After reworking our current menu code I am more and more convinced that
a bigger change is needed here. As far as I understand the OpenStep
(MacOSX) specification it would be better if not the window, but is
representation (the NSMenuView) would own the windows that display the
menu. This would support the separation between classes that own
abstract information (NSMenu and NSMenuItem) from those who are able to
display this information (NSMenuView and NSMenuItemCell), which should
allow us to have drop in replacements for the representation with
different behaviour.

In changing this I am also thinking about moving the information if a
menu is torn off, transient or attached over to the NSMenuView and even
the property if a menu belongs to a popup could be moved over. Or we
could have a special subclass of NSMenuView to handle popups. Also the
handling of the title view would be moved over to the NSMenuView, so we
could have menus that position their title somewhere else or ones
without title.

NSMenu would after this change be a rather simple class to store menu
items. NSMenuView would gain a lot of responsibilities. Perhaps we
should split up this class into one abstract class handling most of what
the current class does and a concrete subclass doing the windowing. That
way one would be able to subclass the abstract class, changing its
display a lot and still be able to use it a a drop in replacement of
NSMenuView. But I am not sure about this point.

Any comments on this are welcome, I will not start do do this change, if
I am not sure it will be supported by most of the GNUstep developers.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]