[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference bulova::decw_jan-89_to_nov-90

Title:DECWINDOWS 26-JAN-89 to 29-NOV-90
Notice:See 1639.0 for VMS V5.3 kit; 2043.0 for 5.4 IFT kit
Moderator:STAR::VATNE
Created:Mon Oct 30 1989
Last Modified:Mon Dec 31 1990
Last Successful Update:Fri Jun 06 1997
Number of topics:3726
Total number of notes:19516

3534.0. "<< Color Mixer Widget Behavior Change >>" by WONDER::COMMO (I&#039;ll find no bug before its time!) Fri Oct 26 1990 11:57

The behavior of the color widget seems to have changed between VMS 5.3.1 and
VMS 5.4, which was installed on our cluster this past weekend.

Under VMS 5.3.1 it came up with and RGB model.  There were the usual scale
widgets for percent of RGB intensity and the simple text widgets to enter those
values directly.

Now it comes up using the HLS model which has only the scale widgets.  Is there
a resource that I have to set to get the RGB mode back?  Or perhaps there's
some logical that has to be defined?

- norm

T.RTitleUserPersonal
Name
DateLines
3534.1QUARK::LIONELFree advice is worth every centFri Oct 26 1990 12:123
Last time I used it, it had radio buttons to switch between HLS and RGB.

				Steve
3534.2<< Resource... >>WONDER::COMMOI&#039;ll find no bug before its time!Fri Oct 26 1990 14:1013
>
> Last time I used it, it had radio buttons to switch between HLS and RGB.
>

	Thanks Steve, I will have to look again.  I may have missed that
	in my initial puzzlement.

	Is there a resources that can be set to cause it to come up
	in the desired mode.  I've read what Docstuff I have which is
	an early version I pulled over the net.

	- norm

3534.3RGB still there...R2ME2::BOLGATZFri Oct 26 1990 17:029
    The HLS model was added in *conjunction* with RGB and comes up first
    by default.  However the RGB is still available too.  Users can switch 
    back and forth between both models using the "color model" pulldown menu 
    (located just above the mixer).
    
    This is all documented in the release notes.
    
    
    Jay
3534.4and yes, there is a resourceRTL::BOLGATZFri Oct 26 1990 17:078
    also, there is a colorModel resource which allows applications (or
    defaults files) to specify the default colormodel.
    
    
    again, all documented...
    
    Jay
    
3534.5<< Pointer to Rlease Notes >>WONDER::COMMOI&#039;ll find no bug before its time!Sun Oct 28 1990 15:5910
>    again, all documented...
    
	Thank you Jay,

	Where are the relaese notes for the color mixer widget kept on
	line?  I'll pull a copy down asap.

	- norm
    

3534.6R2ME2::BOLGATZTue Oct 30 1990 08:29330
    Below is the DECwindows V3 (Motif) colormix release notes...  
    
    For a copy of the VMS 5.4 notes (the last XUI functional release) 
    which covers the HLS mixer, contact Vicky White (star::white).
    
    Jay
    
    
From:	R2ME2::BOLGATZ      19-JUL-1990 12:10:38.60
To:	JIM
CC:	BOLGATZ
Subj:	colormix release notes 

			
=== Colormix Widget Enhancements ===
 
   The colormix widget included in this baselevel has a number of enhancements,
including three new color models with accompanying resources, a scratch pad
feature, and a modified color mix callback structure.

o New color models

   The three new color models are the color picker, the X11 named color 
browser,
and the greyscale mixer.  The constants defined for these color models are 
DXmColorModelPicker, DXmColorModelBrowser, and DXmColorModelGreyscale.  The 
major features of each model are outlined below.

   - Color Picker -
   	
   This color model is now the default color model for the color mixing widget.
The color picker consists of a color spectrum and a spectrum option menu, 
a color interpolator and its title, a smear button, an undo button, two paint
bucket buttons, and arrow buttons to control warmth and lightness of 
interpolator colors.  Clicking and releasing MB1 on a spectrum tile, 
interpolator tile, or the original color tile causes the new color display 
widget to take on the color of the tile clicked on.  The tile clicked on also 
becomes highlighted, identifying it as the selected color.

   The spectrum option menu allows the user to set the spectrum tiles to
any of several commonly utilized color palettes, including pastels, metallics,
earthtones, and the typical "rainbow" spectrum.  The application may also
supply a palette of its own, which will be accessible to the user through
this menu.

   Clicking and holding MB1 on a spectrum tile, interpolator tile, the original 
color tile, or the new color tile causes the pointer to become an eyedropper 
filled with the color of that tile.  This eyedropper can then be moved to the 
interpolator and used to fill one of the two end tiles by releasing MB1.  If 
the eyedropper is not positioned directly upon one of the two end tiles, the 
closest of the two will be filled with the eyedropper color.  

   As an alternative to the eyedropper, the two paint bucket buttons can 
be used to achieve the same effect.  Clicking on a paint bucket fills the 
interpolator end tile below it with the selected color.  It is possible that 
either the eyedropper or the paint buckets will be eliminated in future 
versions of the color mix widget as a result of ongoing user testing.

   When the interpolator end points are filled with the desired colors, 
activating the smear button will cause a linear interpolation between these two
colors, the results of which will appear in the central interpolator tiles. 
The new colors thus generated can then be selected, picked up with the 
eyedropper, and otherwise operated upon normally.  The undo button is used to 
undo the last interpolator action - a smear, the filling of an end tile, or the
activation of one of the warmth or lightness adjustment buttons.

   The warmer, cooler, lighter, and darker buttons apply changes to each tile 
in the interpolator array.  The warmer  button adds red to the color of each 
tile, while the cooler button adds blue.  The lighter and darker buttons 
modify the lightness component of each interpolator tile.

    - X11 Color Browser -

   The color browser is a scrolled window that presents the user with the full 
list of X11 named colors.  Each button in the scrolled window shows the name of 
an X11 color on a background set to that color.  The scroll bar can be used in 
the normal manner to scroll through this color list.  Clicking MB1 on a color 
in the list causes the new color tile to become filled with that color.  If the 
new color is not further modified by other color models, the X11 name of this 
color will  be returned to the application as part of the colormix callback 
structure (see Modifications to Callback Structure, below).

   - Greyscale Mixer -

   The greyscale mixer is simply a scale widget that allows generation of grey 
shades ranging from black to white.  When the greyscale mixer is selected, the 
current new color is converted to an appropriate shade of grey, which can then
be adjusted with the scale widget.  All shades of grey generated by this model 
are a mixture of equal portions of red, green, and blue, meaning that they will 
appear identical on both color and greyscale systems.

o Scratch pad

   The scratch pad popup affords an opportunity to store intermediate colors
for later use in color mixing.  It is accessible from any of the color models
through the scratch pad button.  To store the currently selected color in the 
scratch pad, click on the paint bucket above the scratch pad color tile.  The
scratch pad adds that color to its list of stored colors, which can then be
scrolled through with the scroll bar.  The clear button wipes this list out
and sets the scratch pad back to its initial state.  Note that the currently
selected color can be one of many color tiles on the picker model -- when using
other color models, however, only the new and orginal color tiles can be 
selected.

   To set the new color tile to a scratch pad color, simply scroll to that 
color and click on the scratch pad color tile.  The new color tile changes
and the scratch pad tile becomes highlighted.  In the picker model, this
highlighting indicates that the scratch pad color can now be dumped into
one of the interpolator end tiles by use of the paint bucket buttons. 

o Help

  The colormix widget now supports help via a "help" pushbutton.  The help
  text is currently based on the release notes and will be revised pending
  assignment of a writer.

o XmNworkWindow

  The BL4 colormix widget ignored the XmNworkWindow resource, accepting instead
  DXmNworkWindow.  The correct resource is XmNworkWindow.  DXmworkWindow is 
  obsolete and will be ignored.

o New resources

  The colormix widget now supports the following additional resources:

  	Resource			Type

  DXmNpickerLabel			XmString
  DXmNbrowserLabel			XmString
  DXmNgreyscaleLabel			XmString
  DXmNpickerTileHeight			short
  DXmNpickerTileWidth			short
  DXmNpickerColors			*unsigned short
  DXmNuserPaletteLabel			XmString
  DXmNinterpTileHeight			short
  DXmNinterpTileWidth			short
  DXmNinterpTileCount			short
  DXmNwarmthIncrement			unsigned short
  DXmNlightnessIncrement          	short
  DXmNinterpTitleLabel			XmString
  DXmNundoLabel				XmString
  DXmNsmearLabel			XmString	
  DXmNwarmerLabel			XmString
  DXmNcoolerLabel			XmString
  DXmNlighterLabel			XmString
  DXmNdarkerLabel			XmString
  DXmNbrowserItemCount			short
  DXmNgreyscaleOnGreyscale		Boolean
  DXmNhelpLabel				XmString
  DXmNspectrumLabel			XmString
  DXmNpastelLabel			XmString
  DXmNmetallicLabel			XmString
  DXmNearthtoneLabel			XmString
  DXmNclearLabel			XmString
  DXmNscratchPadInfoLabel		XmString
  DXmNscratchPadLabel			XmString


  DXmNpickerLabel			XmString
    Default: "Picker"
    The label used to represent the picker color model in the color model
    option menu.

  DXmNbrowserLabel			XmString
    Default: "Browser"
    The label used to represent the browser color model in the color model
    option menu.

  DXmNgreyscaleLabel			XmString
    Default: "Greyscale"
    The label used to represent the greyscale color model in the color model
    option menu.

  DXmNpickerTileHeight			short
    Default: 30
    The height of each individual spectrum tile, in pixels.

  DXmNpickerTileWidth			short
    Default: 30
    The width of each individual spectrum tile, in pixels.

  DXmNpickerColors			*unsigned short
    Default: NULL
    A palette of ten colors that will be available through the user
    palette menu option.  If not specified, no user palette will appear
    in the menu -- otherwise, the user palette wil become the default 
    picker palette.  This resource can only be set at creation time.  
    The first item in the array is the red value of the first spectrum tile, 
    the second item is its green value, the third item is its blue value, 
    the fourth item is the second tile's red value, and so on.  Thus,
    this array must contain thirty elements if it is set.

  DXmNuserPaletteLabel			XmString
    Default: "User Palette"
    The label used to represent the application defined user palette in
    the spectrum option menu.

  DXmNinterpTileHeight			short
    Default: 30
    The height of each interpolator tile, in pixels.

  DXmNinterpTileWidth			short
    Default: 30
    The width of each interpolator tile, in pixels.
    
  DXmNinterpTileCount			short
    Default: 10
    The number of interpolator tiles used.  This resource can only be set
    at colormix creation time.	

  DXmNwarmthIncrement 			unsigned short
    Default: 5000
    The amount of red or blue added to the color of each interpolator tile when
    the warmer or cooler buttons are pressed.

  DXmNlightnessIncrement 		short
    Default: 5
    The percentage by which to increase or decrease the lightness of the color
    of each interpolator tile when the lighter or darker buttons are pressed.
  
  DXmNinterpTitleLabel			XmString
    Default: "Interpolator"
    The title label centered above the interpolator widget.

  DXmNundoLabel				XmString
    Default: "Undo"
    The label of the Undo pushbutton.

  DXmNsmearLabel			XmString	
    Default: "Smear"
    The label of the Smear pushbutton.

  DXmNwarmerLabel			XmString	
    Default: "Warmer"
    The label of the Warmer arrowbutton.

  DXmNcoolerLabel			XmString	
    Default: "Cooler"
    The label of the Cooler arrowbutton.

  DXmNlighterLabel			XmString	
    Default: "Lighter"
    The label of the Lighter arrowbutton.

  DXmNdarkerLabel			XmString	
    Default: "Darker"
    The label of the Darker arrowbutton.

  DXmNbrowserItemCount			short
    Default: 5
    The number of visible items in the browser's color list.  This resource can
    only be set at widget creation time.  Note that each visible item requires
    the allocation of its own color cell.

  DXmNgreyscaleOnGreyscale		Boolean
    Default: TRUE
    When true, causes the greyscale mixing color model to be the default on
    greyscale systems.


  DXmNspectrumLabel			XmString
    Default: "Spectrum"
    The label used to represent the "rainbow" palette in the picker
    spectrum option menu.

  DXmNpastelLabel			XmString
    Default: "Pastels"
    The label used to represent the pastels palette in the picker
    spectrum option menu.

  DXmNmetallicLabel			XmString
    Default: "Metallics"
    The label used to represent the metallics palette in the picker
    spectrum option menu.

  DXmNearthtoneLabel			XmString
    Default: "Earthtones"
    The label used to represent the earthtones palette in the picker
    spectrum option menu.

  DXmNclearLabel			XmString
    Default: "Clear"
    The label of the scratch pad clear pushbutton.

  DXmNscratchPadInfoLabel			XmString
    Default: "Save colors here..."
    The informational label centered at the top of the scratch pad popup.

  DXmNscratchPadLabel			XmString
    Default: "Scratch Pad..."
    The label of the scratch pad pushbutton.

  DXmNhelpLabel				XmString
    Default: "Help"
    The label of the Help pushbutton.  The help pushbutton causes a popup
    help widget to appear with help on the use of the colormix widget.
    Note that the help text may be incomplete for this baselevel.

o Modifications to Callback Structure

   The color mix callback structure DXmColorMixCallbackStruct has been modified
to support passing of X11 color names to the application.  This is accomplished
via the new field newname, of type pointer to char.  If the user selects an X11
named color from the browser and then triggers a callback to the application 
without modifying this new color, the newname field will be filled in with a 
pointer to an ASCII, null-terminated string containing the color's X11 name.
This string is read-only, and should not be freed or modified.  

   If a color is generated in one of the other color models, or generated in 
    the browser and subsequently modified, the newname field in the
    callback     structure 
will be set to NULL.

   The new callback structure is shown below:

	typedef struct
	{
	  int			reason;
	  XEvent		*event;
	  unsigned short	newred;
	  unsigned short	newgrn;
	  unsigned short	newblu;
	  char			*newname;
	  unsigned short	origred;
	  unsigned short	origgrn;
	  unsigned short	origblu;
	} DXmColorMixCallbackStruct;
    
                 
3534.7WONDER::COMMOI&#039;ll find no bug before its time!Tue Oct 30 1990 19:508
Jay,

Thanks for the help, the color widget is "fun".  I'm playing with the HLS
model. Perhaps it will be easier over time, but at the moment RGB seemd
more natural, perhaps that's becuase I'm a "computer-friendly-user".

- norm