gnustep-dev
[Top][All Lists]
Advanced

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

NSMenuItemCell questions


From: Fred Kiefer
Subject: NSMenuItemCell questions
Date: Thu, 30 Aug 2001 08:45:52 +0200

I am trying to clear up the code for menu item cells and have a few
questions to be answered before I break something.

1) This class has its own highlight flag, but I don't see any reason why
we should not reuse that from NSCell. Anyway currently in the code both
are used, while only the local gets set.

2) After changing this there is no more need for the local method
[highlight:withFrame:inView:], so I would drop this.

3) The images here are drawn with NSCompositeCopy, for NSCell we use
NSCompositeSourceOver, which should we change?

4) NSMenuItemCell does the lockFocus outside of the drawInterior...
method. If this is corect we should do it for all cells, otherwise we
should stick with the way NSCell does it.

5) I like the [drawBorderAndBackgroundWithFrame:inView:] method, why
don't we add this as an extension to NSCell and use it for all cells.
This would in most cases eliminate the need to overwrite
[drawWithFrame:inView:]. This would be totally inside the GNUstep gui
code, without any noticalbe change to the out side (ok, perhaps someone
may notice the extra method call :-))

6) Can anybody explain why we move some frames a bit to the left for
popup buttons?

Thank you for any answers
Fred



reply via email to

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