home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Source Code 1993 July / THE_SOURCE_CODE_CD_ROM.iso / X / mit / clients / xmag / ScaleP.h < prev    next >
Encoding:
C/C++ Source or Header  |  1991-03-11  |  2.7 KB  |  99 lines

  1. /*
  2.  * $XConsortium: ScaleP.h,v 1.2 91/03/11 18:50:54 dave Exp $
  3.  *
  4.  * Copyright 1989 Massachusetts Institute of Technology
  5.  *
  6.  * Permission to use, copy, modify, distribute, and sell this software and its
  7.  * documentation for any purpose is hereby granted without fee, provided that
  8.  * the above copyright notice appear in all copies and that both that
  9.  * copyright notice and this permission notice appear in supporting
  10.  * documentation, and that the name of M.I.T. not be used in advertising or
  11.  * publicity pertaining to distribution of the software without specific,
  12.  * written prior permission.  M.I.T. makes no representations about the
  13.  * suitability of this software for any purpose.  It is provided "as is"
  14.  * without express or implied warranty.
  15.  *
  16.  * M.I.T. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL
  17.  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL M.I.T.
  18.  * BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
  19.  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
  20.  * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
  21.  * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  22.  *
  23.  * Author:  Davor Matic, MIT X Consortium
  24.  */
  25.  
  26.  
  27.  
  28. #ifndef _ScaleP_h
  29. #define _ScaleP_h
  30.  
  31. #include "Scale.h"
  32. #include <X11/Xaw/SimpleP.h>
  33.  
  34. typedef struct {
  35.     int foo;
  36. } ScaleClassPart;
  37.  
  38. /* Full class record declaration */
  39. typedef struct _ScaleClassRec {
  40.   CoreClassPart          core_class;
  41.   SimpleClassPart        simple_class;
  42.   ScaleClassPart         scale_class;
  43. } ScaleClassRec;
  44.  
  45. extern ScaleClassRec scaleClassRec;
  46.  
  47. typedef struct {
  48.     Position *x, *y;
  49.     Dimension *width, *height;
  50. } Table;
  51.  
  52. /* New fields for the Scale widget record */
  53.  
  54. #ifndef XtGravity
  55. #define  XtGravity int
  56. #endif
  57.  
  58. typedef struct {
  59.   /* resources */
  60.     Pixel       foreground_pixel;
  61.     Dimension   internal_width;
  62.     Dimension   internal_height;
  63.     XtGravity   gravity;
  64.     String      scale_x_str, scale_y_str;
  65.     String      aspect_ratio_str;
  66.     String      precision_str;
  67.     XImage      *image;
  68.     Boolean     resize;
  69.     Boolean     autoscale;
  70.     Boolean     proportional;
  71.     Boolean     paste_buffer;
  72.     Cardinal    buffer_size;
  73.     XtPointer   userData;
  74.     Visual      *visual;
  75.   /* private */
  76.     float       scale_x, scale_y;
  77.     float       aspect_ratio;
  78.     float       precision;
  79.     GC          gc;
  80.     Position    x, y;
  81.     Dimension   width, height;
  82.     Table       table;
  83.     XRectangle  *rectangles;
  84.     Cardinal    nrectangles;
  85. } ScalePart;
  86.  
  87. /* Full instance record declaration */
  88. typedef struct _ScaleRec {
  89.   CorePart      core;
  90.   SimplePart    simple;
  91.   ScalePart scale;
  92. } ScaleRec;
  93.  
  94. #endif /* _ScaleP_h */
  95.  
  96.  
  97.  
  98.  
  99.