C (25/257)

From:
Date:02 Feb 2001 at 14:46:52
Subject:Re: Can someone look at this code?

Hello Colin

On 01-Feb-01, Colin Wenzel wrote:
> On 02-Feb-01, Jack York wrote:
> -snip-
>>> ObtainbestPen();
>> Then I don't understand how the function works. I thought it
>> just returned a value of one pen that approximates what you
>> asked for? It doesn't set the value into, say, the screens
>> colormap AFAIK. So how/when does it change the screens
>> colors?
>
> It doesn't, it just picks a colour register that is already set,
> to the closest requirements you ask for..

So it doesn't sound like this is what I need.
>
>> I have a config option in the program in which the user can set the
>> colors of things like text in a listbrowser and front/background pens
>> of the gadgets. If the user runs the program and saves these
>> colors, they should be set before a window is opened the next time
>> the program is run. Otherwise the window may open with one set
>> of colors and then change shortly after to the users. Obviously not
>> the way to go.
>
> I believe the colour register for a new screen are set to a default
> value upon opening, or the same as a cloned screen, if you did that.

This is my understanding too. That's the purpose of the tags in
OpenScreenTags AFAIK.

> If you want a custom screen that you can define all the registers in,
> that's fine, but you should never change the colour register values
> of someone elses screen, say for instance, Workbench...

Right, this is my own screen.

> If you use your own screen, then you are free to set them to anything
> you like, obviously, you would save the register values in your
> config file or where ever & do a LoadRGB*() function after opening
> your custom screen & windows..

This I don't understand. Doing a LoadRGB will cause the windows
colors to change after the program is up and running. I've never
seen a program behave this way. Colors are always set the way
you want them when the program starts, not after it is started.

> When you know what register number you are manually adjusting,
> you don't need to call ObtainBestPen(),
> because you already know what register your adjustment is in... (:>
>
> ObtainBestPen() is for finding the colour you want, from someone
> elses palette..

That's what I thought.

> I really have no idea how this effects BOOPSI \ Reaction classes
> as I havn't been able to fingure out (yet) where they get their pens
> from or if you can actually specify a pen for a particular part of the
> display. (object ?)

Yes, in Reaction it's just a tag to set it to a certain pen. But at this
point the colors are already set in the screen.

> However, this is how i've treated normal custom screen displays
> in my code before & they behave exactly as expected..

As I mentioned, this program works fine if the SA_SharePens
tag is removed. All colors come up as they were saved when
the window opens. Does one of your programs have custom colors
that you change after it is up and running? Don't you see it start
in one color and then switch to another this way?

Jack

------------------------ Yahoo! Groups Sponsor ---------------------~-~>
eGroups is now Yahoo! Groups
Click here for more details
http://click.egroups.com/1/11231/0/_/451227/_/981125489/
---------------------------------------------------------------------_->