🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: comp.sys.next.programmer
2 messages
2 total messages Started by Ed Lau Wed, 05 Aug 1992 03:48
cells and highlighting
#448
Author: Ed Lau
Date: Wed, 05 Aug 1992 03:48
18 lines
1163 bytes
Would someone please explain to me how a matrix accomplishes highlighting of a  
cell?

The documentation states that the contents of the cell is composited with  
NX_HIGHLIGHT, but I couldn't find a description of NX_HIGHLIGHT anywhere. It  
would seem to me that the AppKit handles the highlighting for you. However, in  
one of the NeXT MiniExamples, the background color of a cell is chosen in the  
code by checking the cFlags1.state and .highlighted bits. This suggests to me  
that it is up to the programmer to implement highlighting. Who's right?

On a related note, what happens to the cFlags1.state and cFlags1.highlighted  
flags of a cell during and after a mouseDown:?

Thanks in advance.

--Ed Lau
edlau@mitl.com
Re: cells and highlighting
#487
Author: moose
Date: Thu, 06 Aug 1992 17:18
35 lines
1830 bytes
In article <1992Aug5.034851.14628@MITL.COM> edlau@mitl.com (Ed Lau) writes:
> 
> Would someone please explain to me how a matrix accomplishes highlighting of  
a  
> cell?
> 
> The documentation states that the contents of the cell is composited with  
> NX_HIGHLIGHT, but I couldn't find a description of NX_HIGHLIGHT anywhere. It  
> would seem to me that the AppKit handles the highlighting for you. However,  
in  
> one of the NeXT MiniExamples, the background color of a cell is chosen in the  
> code by checking the cFlags1.state and .highlighted bits. This suggests to me  
> that it is up to the programmer to implement highlighting. Who's right?
> 
> On a related note, what happens to the cFlags1.state and cFlags1.highlighted  
> flags of a cell during and after a mouseDown:?

According to OOP, none of your business what they are doing :->.

Every cell has a routine called:

- highlight:(const NXRect *)cellFrame	inView:controlView lit:(BOOL)flag;

which is used to highlight the cell.  By using this with setState: you should  
be able to highlight the cells manually without worrying about the internal  
flags.  

Note:  There are some problems using this with NXBrowsers under system 2.x, but  
it seems to work great under 3.0.

--
Michael Rutman			|	moose@svcdudes.com
Cubist				|	makes me a NeXT programmer
Software Ventures		|	maker of MicroPhone II
#include <std.disclaimer>
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads