home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / World_Of_Computer_Software-02-386-Vol-2of3.iso / c / cwikwidg.zip / cwikwidget / Hdial / HdialP.h < prev    next >
C/C++ Source or Header  |  1992-03-30  |  3KB  |  111 lines

  1. /*
  2.  * Copyright 1992 John L. Cwikla
  3.  * 
  4.  * Permission to use, copy, modify, distribute, and sell this software
  5.  * and its documentation for any purpose is hereby granted without fee,
  6.  * provided that the above copyright notice appears in all copies and that
  7.  * both that copyright notice and this permission notice appear in
  8.  * supporting documentation, and that the name of John L. Cwikla or
  9.  * University of Illinois not be used in advertising or publicity
  10.  * pertaining to distribution of the software without specific, written
  11.  * prior permission.  John L. Cwikla and University of Illinois make no
  12.  * representations about the suitability of this software for any
  13.  * purpose.  It is provided "as is" without express or implied warranty.
  14.  *
  15.  * John L. Cwikla and University of Illinois disclaim all warranties with
  16.  * regard to this software, including all implied warranties of
  17.  * merchantability and fitness, in no event shall John L. Cwikla or
  18.  * University of Illinois be liable for any special, indirect or
  19.  * consequential damages or any damages whatsoever resulting from loss of
  20.  * use, data or profits, whether in an action of contract, negligence or
  21.  * other tortious action, arising out of or in connection with the use or
  22.  * performance of this software.
  23.  *
  24.  * Author:
  25.  *     John L. Cwikla
  26.  *     Materials Research Laboratory Center for Computation
  27.  *     University Of Illinois at Urbana-Champaign
  28.  *    104 S. Goodwin
  29.  *     Urbana, IL 61801
  30.  * 
  31.  *     cwikla@uimrl7.mrl.uiuc.edu
  32.  */
  33.  
  34. /* Dial widget, based roughly on the dial widget by Douglas A. Young */
  35.  
  36. /* Default Translations:
  37.  * <key>+: Increment(1)
  38.  * Shift<key>+: Increment(100)
  39.  * <key>-: Decrement(1)
  40.  * Shift<key>-: Decrement(100)
  41.  * <Btn1Down>: set()
  42.  * <Btn1Motion>: set() drag()
  43. */
  44.  
  45. /* Resources:               Type:                Defaults:
  46.  * XtNforeground          : pixel    : XtNDefaultForeground
  47.  * XtNlabelForeground          : pixel    : XtNDefaultForeground
  48.  * XtNminimum             : int      : 0
  49.  * XtNmaximum             : int      : 65535
  50.  * XtNvalue               : int      : 0
  51.  * XtNfont                : XFontStruct   : XtNDefaultFont
  52.  * XtNmargin              : int      : 5
  53.  * XtNimcrementCallback   : callback : NULL
  54.  * XtNdecrementCallbacki  : callback : NULL
  55.  * XtNvalueChangeCallback : callback : NULL
  56. */
  57.  
  58.  
  59. #ifndef HDIALP__H
  60. #define HDIALP__H
  61.  
  62. #include <X11/IntrinsicP.h>
  63. #include <X11/CoreP.h>
  64. #include "Hdial.h"
  65.  
  66. typedef struct _HdialPart
  67. {
  68.   Pixel foreground;
  69.   Pixel labelForeground;
  70.   XFontStruct *font;
  71.   char label[11];    /* Label for number */
  72.   int minimum;         /* value */
  73.   int maximum;        /* value */
  74.   int value;
  75.   int margin;
  76.   XPoint center;
  77.   XPoint top; 
  78.   XPoint labelPos;
  79.   Dimension labelHeight;
  80.   Dimension labelWidth;
  81.   Dimension lineWidth;
  82.   double length;
  83.   GC labelGC;
  84.   GC gc;
  85.   GC eraseGC;
  86.   XtCallbackList incrementCallback;
  87.   XtCallbackList decrementCallback;
  88.   XtCallbackList valueChangeCallback;
  89. } HdialPart, *HdialPartPtr;
  90.  
  91. typedef struct _HdialRec
  92. {
  93.   CorePart core;
  94.   HdialPart hdial;
  95. } HdialRec, *HdialPtr;
  96.  
  97. typedef struct _HdialClassPart
  98. {
  99.   int empty;
  100. } HdialClassPart;
  101.  
  102. typedef struct _HdialClassRec
  103. {
  104.   CoreClassPart core_class;    
  105.   HdialClassPart hdial_class;
  106. } HdialClassRec, *HdialClassPtr;
  107.  
  108. extern HdialClassRec hdialClassRec;
  109.  
  110. #endif /* HDIALP__H */
  111.