bug-gnustep
[Top][All Lists]
Advanced

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

[PATCH] Proposal to fix NSCell issue


From: Quentin Mathé
Subject: [PATCH] Proposal to fix NSCell issue
Date: Wed, 17 Mar 2004 19:04:03 +0100

Hi,

In the current situation NSCell performClick: method doesn't work with NSMatrix and cannot be used for an NSCell subclass with embedded cells. Here is a screenshot for the issue with NSMatrix when you call performClick: on a cell :
… before the performClick: call
http://www.quentinmathe.com/gnustep/work/matrix_before_click.jpg
After the performClick: call
http://www.quentinmathe.com/gnustep/work/matrix_after_click.jpg

To fix this issue, I'm proposing the patches set below. The idea is to have an NSControl method which can return the frame for the cell passed as a parameter, and to have also a such method for NSCell in order to allow NSCell subclasses to embed other cells (like in NSComboBoxCell which I'm currently trying to rewrite).

Then the situation will be :
Each NSControl knows which is the frame for its cells...
Similarly at the cell level, each NSCell knows which is the frame (relative to the control view) for its subcells.

To implement this proposal, I have created a protocol GSCellContainer with one method -frameForCell: which is implemented by NSControl and NSCell class, and this NSCell class implements a method -container which returns the container for itself : the container can be a cell or a control (when supercell ivar is nil).

Here are the patches :

Attachment: NSCell.m.patch
Description: Binary data

Attachment: NSMatrix.m.patch
Description: Binary data

Attachment: NSControl.m.patch
Description: Binary data

Attachment: NSCell.h.patch
Description: Binary data

Attachment: NSControl.h.patch
Description: Binary data



Quentin.

--
Quentin Mathé
qmathe@club-internet.fr

reply via email to

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