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

  1. /* $XConsortium: ToggleP.h,v 1.9 94/04/17 20:13:19 converse Exp $ */
  2.  
  3. /*
  4.  
  5. Copyright (c) 1989  X Consortium
  6.  
  7. Permission is hereby granted, free of charge, to any person obtaining a copy
  8. of this software and associated documentation files (the "Software"), to deal
  9. in the Software without restriction, including without limitation the rights
  10. to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  11. copies of the Software, and to permit persons to whom the Software is
  12. furnished to do so, subject to the following conditions:
  13.  
  14. The above copyright notice and this permission notice shall be included in
  15. all copies or substantial portions of the Software.
  16.  
  17. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  18. IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  19. FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
  20. X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
  21. AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
  22. CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  23.  
  24. Except as contained in this notice, the name of the X Consortium shall not be
  25. used in advertising or otherwise to promote the sale, use or other dealings
  26. in this Software without prior written authorization from the X Consortium.
  27.  
  28. */
  29.  
  30. /* 
  31.  * ToggleP.h - Private definitions for Toggle widget
  32.  * 
  33.  * Author: Chris D. Peterson
  34.  *         MIT X Consortium
  35.  *         kit@expo.lcs.mit.edu
  36.  *  
  37.  * Date:   January 12, 1989
  38.  *
  39.  */
  40.  
  41. #ifndef _XawToggleP_h
  42. #define _XawToggleP_h
  43.  
  44. #include <X11/Xaw/Toggle.h>
  45. #include <X11/Xaw/CommandP.h>
  46.  
  47. /***********************************************************************
  48.  *
  49.  * Toggle Widget Private Data
  50.  *
  51.  ***********************************************************************/
  52.  
  53. #define streq(a, b) ( strcmp((a), (b)) == 0 )
  54.  
  55. typedef struct _RadioGroup {
  56.   struct _RadioGroup *prev, *next; /* Pointers to other elements in group. */
  57.   Widget widget;          /* Widget corrosponding to this element. */
  58. } RadioGroup;
  59.  
  60. /************************************
  61.  *
  62.  *  Class structure
  63.  *
  64.  ***********************************/
  65.  
  66.    /* New fields for the Toggle widget class record */
  67. typedef struct _ToggleClass  {
  68.     XtActionProc Set;
  69.     XtActionProc Unset;
  70.     XtPointer extension;
  71. } ToggleClassPart;
  72.  
  73.    /* Full class record declaration */
  74. typedef struct _ToggleClassRec {
  75.     CoreClassPart    core_class;
  76.     SimpleClassPart    simple_class;
  77.     LabelClassPart    label_class;
  78.     CommandClassPart    command_class;
  79.     ToggleClassPart     toggle_class;
  80. } ToggleClassRec;
  81.  
  82. extern ToggleClassRec toggleClassRec;
  83.  
  84. /***************************************
  85.  *
  86.  *  Instance (widget) structure 
  87.  *
  88.  **************************************/
  89.  
  90.     /* New fields for the Toggle widget record */
  91. typedef struct {
  92.     /* resources */
  93.     Widget      widget;
  94.     XtPointer   radio_data;
  95.  
  96.     /* private data */
  97.     RadioGroup * radio_group;
  98. } TogglePart;
  99.  
  100.    /* Full widget declaration */
  101. typedef struct _ToggleRec {
  102.     CorePart         core;
  103.     SimplePart         simple;
  104.     LabelPart         label;
  105.     CommandPart         command;
  106.     TogglePart       toggle;
  107. } ToggleRec;
  108.  
  109. #endif /* _XawToggleP_h */
  110.  
  111.  
  112.