Re: XForms: Question about colormaps

Steve Lamont (spl@szechuan.ucsd.edu)
Thu, 22 Jul 99 12:47:04 PDT

# To subscribers of the xforms list from spl@szechuan.ucsd.edu (Steve Lamont) :

> 1) I cannot seem to get fl_mapcolorname() to work, it crashes
> when I call it. Yes, I call it before fl_initialize, and I have
> double-checked the arguments for type or other problems.

fl_mapcolorname() should be called *after* fl_initialize(). You may
be confusing it with fl_set_icm_color(), which should be called before
fl_initialize().

For example:

fl_initialize(&argc, argv, 0, 0, 0);
fl_mapcolorname( FL_RED, "Dodgerblue" );

changes the FL_RED to Dodger Blue.

> 2) The other problem will come about when I get 1) figured out:
> What about widget shadowing? If I make the foreground color tan,
> what will happen to the shadows for the buttons? Do they remain
> gray? Can I do anything to make them be darker and lighter shades
> of the foreground color?

They remain grey unless you change the table values of FL_RIGHT_BCOL,
FL_BOTTOM_BCOL, FL_TOP_BCOL, and FL_LEFT_BCOL. Of course, since they
are globally assigned, all shadows will be affected. For instance, to
create *really ugly* objects, do

fl_mapcolorname( FL_RIGHT_BCOL, "Orange" );
fl_mapcolorname( FL_BOTTOM_BCOL, "Red" );
fl_mapcolorname( FL_TOP_BCOL, "Green" );
fl_mapcolorname( FL_LEFT_BCOL, "Magenta" );

spl

_________________________________________________
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/