home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / World_Of_Computer_Software-02-385-Vol-1of3.iso / x / xtici.zip / xtici / widgets / ColorSP.h < prev    next >
C/C++ Source or Header  |  1991-08-28  |  4KB  |  115 lines

  1. /*
  2.  * Code and supporting documentation (c) Copyright 1990 1991 Tektronix, Inc.
  3.  *     All Rights Reserved
  4.  * 
  5.  * This file is a component of an X Window System client which uses the Xcms 
  6.  * Color Management System.  TekColor is a trademark of Tektronix, Inc.  The
  7.  * TekColor Editor is the subject of U.S. and foreign patents pending.  The
  8.  * term "TekHVC" designates a particular color space that is the subject of
  9.  * U.S. Patent No. 4,985,853 (equivalent foreign patents pending).
  10.  * Permission is hereby granted to use, copy, modify, sell, and otherwise
  11.  * distribute this software and its documentation for the X Window System
  12.  * environment, for any purpose and without fee, provided that:
  13.  * 
  14.  * 1.    The code and documentation are only used to implement a 
  15.  *      TekColor Editor in an X Window System environment; and
  16.  * 2.    This copyright and permission notice is reproduced in all copies
  17.  *     of the code and in supporting documentation.
  18.  * 
  19.  * Permission is granted to modify this code as required to allow it to
  20.  * be compiled on any host computer, provided that the functionality of
  21.  * the TekColor Editor is not modified in any way.  A description of any 
  22.  * modifications must be sent to Tektronix, Inc.  Contact 
  23.  * Tektronix Inc., P.O. Box 1000, Mail Station 60-850, 
  24.  * Network Displays Division Engineering, Wilsonville, OR 97070.
  25.  *
  26.  * Tektronix makes no representation about the suitability of this software
  27.  * for any purpose.  It is provided "as is" and with all faults.
  28.  * 
  29.  * TEKTRONIX DISCLAIMS ALL WARRANTIES APPLICABLE TO THIS SOFTWARE,
  30.  * INCLUDING THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
  31.  * PARTICULAR PURPOSE.  IN NO EVENT SHALL TEKTRONIX BE LIABLE FOR ANY
  32.  * SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER
  33.  * RESULTING FROM LOSS OF USE, DATA, OR PROFITS, WHETHER IN AN ACTION OF
  34.  * CONTRACT, NEGLIGENCE, OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
  35.  * CONNECTION WITH THE USE OR THE PERFORMANCE OF THIS SOFTWARE.
  36.  *  
  37.  *  
  38.  *    NAME
  39.  *        ColorSP.h -- private definitions for ColorS.c
  40.  *
  41.  *    DESCRIPTION
  42.  *        
  43.  *
  44.  *    HISTORY
  45.  *
  46.  *    HISTORY END
  47.  *
  48.  */
  49.  
  50. #ifndef LINT
  51. #ifdef RCS_ID
  52. static char *rcsid=  "$Header: ColorSP.h,v 1.1 91/08/22 11:21:29 adamsc Exp $";
  53. #endif /* RCS_ID */
  54. #endif /* LINT */
  55.  
  56. #ifndef _ColorSP_h
  57. #define _ColorSP_h
  58.  
  59. #include "ColorS.h"
  60. #include <X11/IntrinsicP.h>
  61. #include <X11/CoreP.h>
  62. #include <X11/Xaw/FormP.h>
  63.  
  64. /* define unique representation types not found in <X11/StringDefs.h> */
  65.  
  66. typedef struct {
  67.     XtPointer extension;
  68. } ColorScaleClassPart;
  69.  
  70. typedef struct _ColorScaleClassRec {
  71.     CoreClassPart    core_class;
  72.     CompositeClassPart  composite_class;
  73.     ConstraintClassPart constraint_class;
  74.     FormClassPart       form_class;
  75.     ColorScaleClassPart    color_scale_class;
  76. } ColorScaleClassRec;
  77.  
  78. extern ColorScaleClassRec colorScaleClassRec;
  79.  
  80. #define MaxColorScaleChildCt    7
  81. #define MinColorScaleChildCt    5
  82.  
  83. typedef struct _ColorScaleConstraintRec {
  84.     FormConstraintsPart    form;
  85. } ColorScaleConstraintRec, *ColorScaleConstraintPtr;
  86.  
  87. typedef struct _ColorScalePart {
  88.     /* resources - most get passed to children */
  89.     Pixel base;
  90.     int length;
  91.     Pixel pixelInc;
  92.     String label;
  93.     int max;
  94.     int min;
  95.     int inc;
  96.     int value;
  97.     XtCallbackList changed;
  98.     int zoom;
  99.     Boolean wrap;
  100.  
  101.     /* private state */
  102.     Widget wlist[MaxColorScaleChildCt];
  103.     int zoomBase, zoomLen;
  104. } ColorScalePart;
  105.  
  106. typedef struct _ColorScaleRec {
  107.     CorePart        core;
  108.     CompositePart    composite;
  109.     ConstraintPart    constraint;
  110.     FormPart        form;
  111.     ColorScalePart    colorScale;
  112. } ColorScaleRec;
  113.  
  114. #endif  /* _ColorSP_h */
  115.