home *** CD-ROM | disk | FTP | other *** search
/ Geek Gadgets 1 / ADE-1.bin / ade-bin / x11r6.1 / include / x11 / xaw / commandp.h < prev    next >
Encoding:
C/C++ Source or Header  |  1996-10-17  |  4.4 KB  |  141 lines

  1. /*
  2. * $XConsortium: CommandP.h,v 1.31 94/04/17 20:12:01 rws Exp $
  3. */
  4.  
  5.  
  6. /***********************************************************
  7.  
  8. Copyright (c) 1987, 1988  X Consortium
  9.  
  10. Permission is hereby granted, free of charge, to any person obtaining a copy
  11. of this software and associated documentation files (the "Software"), to deal
  12. in the Software without restriction, including without limitation the rights
  13. to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  14. copies of the Software, and to permit persons to whom the Software is
  15. furnished to do so, subject to the following conditions:
  16.  
  17. The above copyright notice and this permission notice shall be included in
  18. all copies or substantial portions of the Software.
  19.  
  20. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  21. IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  22. FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
  23. X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
  24. AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
  25. CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  26.  
  27. Except as contained in this notice, the name of the X Consortium shall not be
  28. used in advertising or otherwise to promote the sale, use or other dealings
  29. in this Software without prior written authorization from the X Consortium.
  30.  
  31.  
  32. Copyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts.
  33.  
  34.                         All Rights Reserved
  35.  
  36. Permission to use, copy, modify, and distribute this software and its 
  37. documentation for any purpose and without fee is hereby granted, 
  38. provided that the above copyright notice appear in all copies and that
  39. both that copyright notice and this permission notice appear in 
  40. supporting documentation, and that the name of Digital not be
  41. used in advertising or publicity pertaining to distribution of the
  42. software without specific, written prior permission.  
  43.  
  44. DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
  45. ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
  46. DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
  47. ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
  48. WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
  49. ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
  50. SOFTWARE.
  51.  
  52. ******************************************************************/
  53.  
  54. /* 
  55.  * CommandP.h - Private definitions for Command widget
  56.  * 
  57.  */
  58.  
  59. #ifndef _XawCommandP_h
  60. #define _XawCommandP_h
  61.  
  62. #include <X11/Xaw/Command.h>
  63. #include <X11/Xaw/LabelP.h>
  64.  
  65. /***********************************************************************
  66.  *
  67.  * Command Widget Private Data
  68.  *
  69.  ***********************************************************************/
  70.  
  71. typedef enum {
  72.   HighlightNone,        /* Do not highlight. */
  73.   HighlightWhenUnset,        /* Highlight only when unset, this is
  74.                    to preserve current command widget 
  75.                    functionality. */
  76.   HighlightAlways        /* Always highlight, lets the toggle widget
  77.                    and other subclasses do the right thing. */
  78. } XtCommandHighlight;
  79.  
  80. /************************************
  81.  *
  82.  *  Class structure
  83.  *
  84.  ***********************************/
  85.  
  86.  
  87.    /* New fields for the Command widget class record */
  88. typedef struct _CommandClass 
  89.   {
  90.     int makes_compiler_happy;  /* not used */
  91.   } CommandClassPart;
  92.  
  93.    /* Full class record declaration */
  94. typedef struct _CommandClassRec {
  95.     CoreClassPart    core_class;
  96.     SimpleClassPart    simple_class;
  97.     LabelClassPart    label_class;
  98.     CommandClassPart    command_class;
  99. } CommandClassRec;
  100.  
  101. extern CommandClassRec commandClassRec;
  102.  
  103. /***************************************
  104.  *
  105.  *  Instance (widget) structure 
  106.  *
  107.  **************************************/
  108.  
  109.     /* New fields for the Command widget record */
  110. typedef struct {
  111.     /* resources */
  112.     Dimension   highlight_thickness;
  113.     XtCallbackList callbacks;
  114.  
  115.     /* private state */
  116.     Pixmap          gray_pixmap;
  117.     GC              normal_GC;
  118.     GC              inverse_GC;
  119.     Boolean         set;
  120.     XtCommandHighlight    highlighted;
  121.     /* more resources */
  122.     int            shape_style;    
  123.     Dimension        corner_round;
  124. } CommandPart;
  125.  
  126.  
  127. /*    XtEventsPtr eventTable;*/
  128.  
  129.  
  130.    /* Full widget declaration */
  131. typedef struct _CommandRec {
  132.     CorePart         core;
  133.     SimplePart         simple;
  134.     LabelPart         label;
  135.     CommandPart      command;
  136. } CommandRec;
  137.  
  138. #endif /* _XawCommandP_h */
  139.  
  140.  
  141.