Re: XForms: color/xresources

Michael Glickman (michg@alphalink.com.au)
Wed, 01 Sep 1999 09:22:15 +1000

# To subscribers of the xforms list from Michael Glickman <michg@alphalink.com.au> :

--------------57ADDBFF186A4C8AB189A362
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

Hello Danny

You can actually set you colour even for standars xforms ones.
I use it quite extensively in my application, sadp

These are standard colour entries (as far as I remember):
FL_MCOL - face colour for buttons
FL_COL1 - colour for button text
FL_TOP_BCOL, FL_BOTTOM_BCOL, etc for button shades.

Again, I may be wrong. Check by trial and error, or look into my code.

Now, here is the trick. To avoid colour allocation in the 256 palette, I set all these colours
to
zero, before calling fl_initialize,
fl_set_icm_color(FL_MCOL, 0, 0, 0);

After fl_initialize is called, you can query resources, and colour ones can be among them.
You can use colour names form rgb.txt. To set the colour, use
fl_map_colorname (FL_MCOL, resource_colour_name);

Look in 3.11.1 of Xforms manual for details.

Will be happy if this helps.

Michael

Danny G. Holstein wrote:

> # To subscribers of the xforms list from "Danny G. Holstein" <danny@holstein.tritonetd.com> :
>
> To List;
>
> I've experimented with colors a bit in xforms and have been able to use decent
> work arounds to get the colors I want for applications. The problem as I see
> it is that what I like for a color isn't necessarily what an end user likes to
> see. Some end users are nearly color blind and some are color sensitive, some
> have old eyes and need different fonts to see better.
>
> Can we use the xresources to help users tailor their applications? I suppose I
> can include some code myself to check the xresources files and set up FCOL1,
> etcetera but was hoping it could be handled in the library since it's a
> universal problem. I always thought that xresources was a neat, efficient way
> to handle xwindow applications and feel comfortable with it.
>
> ...Dan
> _________________________________________________
> To unsubscribe, send the message "unsubscribe" to
> xforms-request@bob.usuhs.mil or see
> http://bob.usuhs.mil/mailserv/xforms.html
> XForms Home Page: http://bragg.phys.uwm.edu/xforms
> List Archive: http://bob.usuhs.mil/mailserv/list-archives/

--------------57ADDBFF186A4C8AB189A362
Content-Type: text/html; charset=us-ascii
Content-Transfer-Encoding: 7bit

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
Hello Danny

You can actually set you colour even for standars xforms ones.
I use it quite extensively in my application, sadp

These are standard colour entries (as far as I remember):
            FL_MCOL  - face colour for buttons
            FL_COL1   -  colour for button text
            FL_TOP_BCOL, FL_BOTTOM_BCOL, etc for button shades.

Again, I may be wrong. Check by trial and error, or look into my code.

Now, here is the trick. To avoid colour allocation in the 256 palette, I set all these colours to
zero, before calling fl_initialize,
        fl_set_icm_color(FL_MCOL, 0, 0, 0);

After fl_initialize is called, you can query resources, and colour ones can be among them.
You can use colour names form rgb.txt.  To set the colour, use
        fl_map_colorname (FL_MCOL,  resource_colour_name);

Look in 3.11.1 of Xforms manual for details.

Will be happy if this helps.

Michael

 
 
 
 

Danny G. Holstein wrote:

# To subscribers of the xforms list from "Danny G. Holstein" <danny@holstein.tritonetd.com> :

To List;

I've experimented with colors a bit in xforms and have been able to use decent
work arounds to get the colors I want for applications.  The problem as I see
it is that what I like for a color isn't necessarily what an end user likes to
see.  Some end users are nearly color blind and some are color sensitive, some
have old eyes and need different fonts to see better.

Can we use the xresources to help users tailor their applications?  I suppose I
can include some code myself to check the xresources files and set up FCOL1,
etcetera but was hoping it could be handled in the library since it's a
universal problem.  I always thought that xresources was a neat, efficient way
to handle xwindow applications and feel comfortable with it.

   ...Dan
_________________________________________________
To unsubscribe, send the message "unsubscribe" to
xforms-request@bob.usuhs.mil   or see
http://bob.usuhs.mil/mailserv/xforms.html
XForms Home Page: http://bragg.phys.uwm.edu/xforms
List Archive: http://bob.usuhs.mil/mailserv/list-archives/

--------------57ADDBFF186A4C8AB189A362--

_________________________________________________
To unsubscribe, send the message "unsubscribe" to
xforms-request@bob.usuhs.mil or see
http://bob.usuhs.mil/mailserv/xforms.html
XForms Home Page: http://bragg.phys.uwm.edu/xforms
List Archive: http://bob.usuhs.mil/mailserv/list-archives/