Inverting bits doesn't work very well for highlighting in a multiple 
bit/pixel environment (for example, for color, you end up with the color at
the inverted index, which may not be terribly useful. For grayscale, 0x80
inverts to 0x7f, two gray values which are virtually identical).

So, we've got winSwap mode, which will swap the foreground and background
colors.  Calling it a second time restores the original state (which is a
good way to unhighlight without completely redrawing).

However, it seems that in order to handle both black & white and color,
we've got to swap two sets of things.
For example, on a Palm V in 4-bit grayscale, text highlighting is white on
black, while on a Palm IIIc in 8-bit color, text highlighting is black on
yellow. Thus, on the first, we're swapping the text with background, while
on the second, we're leaving the text alone, and swapping the background
with a highlight color

My theory is that first we're swapping the UIFieldText and
UIFieldHighlightForeground.  UIFieldText would be black in 4-bit mode, and
UIFieldHighlightForeground would be white. This would cause black to swap to
white. In 8-bit mode, they'd both be black.
Then, we swap UIFieldTextBackground and UIFieldHighlightBackground. I
theorize these would have the values black and black for 4-bit mode, and
black and yellow for 8-bit mode.

Basically, I'm trying to understand what exactly to swap to highlight text.
Would it be these two sets of values, or some other values?

Thanks,

Neil
--
Neil Rhodes
Calliope Enterprises, Inc.
1328 Clock Avenue
Redlands, CA  92374
(909) 793-5995     [EMAIL PROTECTED]      fax: (909) 793-2545

-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/tech/support/forums/

Reply via email to