home *** CD-ROM | disk | FTP | other *** search
/ Source Code 1994 March / Source_Code_CD-ROM_Walnut_Creek_March_1994.iso / compsrcs / x / volume18 / xdtree / part03 < prev    next >
Encoding:
Text File  |  1992-07-19  |  4.8 KB  |  158 lines

  1. Newsgroups: comp.sources.x
  2. Path: uunet!darwin.sura.net!mips!msi!dcmartin
  3. From: Konstantinos Konstantinides <kk@hpkronos.hpl.hp.com>
  4. Subject: v18i033: xdtree (Motif), Part03/03
  5. Message-ID: <1992Jul20.154319.2207@msi.com>
  6. Originator: dcmartin@fascet
  7. Sender: dcmartin@msi.com (David C. Martin - Moderator)
  8. Organization: Molecular Simulations, Inc.
  9. References: <csx-18i031-xdtree@uunet.UU.NET>
  10. Date: Mon, 20 Jul 1992 15:43:19 GMT
  11. Approved: dcmartin@msi.com
  12. Lines: 144
  13.  
  14. Submitted-by: Konstantinos Konstantinides <kk@hpkronos.hpl.hp.com>
  15. Posting-number: Volume 18, Issue 33
  16. Archive-name: xdtree/part03
  17.  
  18. #!/bin/sh
  19. # this is part.03 (part 3 of a multipart archive)
  20. # do not concatenate these parts, unpack them in order with /bin/sh
  21. # file TreeP.h continued
  22. #
  23. if test ! -r _shar_seq_.tmp; then
  24.     echo 'Please unpack part 1 first!'
  25.     exit 1
  26. fi
  27. (read Scheck
  28.  if test "$Scheck" != 3; then
  29.     echo Please unpack part "$Scheck" next!
  30.     exit 1
  31.  else
  32.     exit 0
  33.  fi
  34. ) < _shar_seq_.tmp || exit 1
  35. if test ! -f _shar_wnt_.tmp; then
  36.     echo 'x - still skipping TreeP.h'
  37. else
  38. echo 'x - continuing file TreeP.h'
  39. sed 's/^X//' << 'SHAR_EOF' >> 'TreeP.h' &&
  40. X * TreeP.h: Private header file for the Tree widget
  41. X  *         From:
  42. X  *                   The X Window System, 
  43. X  *            Programming and Applications with Xt
  44. X  *                   OSF/Motif Edition
  45. X  *         by
  46. X  *                Douglas Young
  47. X  *              Prentice Hall, 1990
  48. X  *
  49. X  *                 Example described on pages: 397-419
  50. X  *
  51. X  *
  52. X  *  Copyright 1989 by Prentice Hall
  53. X  *  All Rights Reserved
  54. X  *
  55. X  * This code is based on the OSF/Motif widget set and the X Window System
  56. X  *
  57. X  * Permission to use, copy, modify, and distribute this software for 
  58. X  * any purpose and without fee is hereby granted, provided that the above
  59. X  * copyright notice appear in all copies and that both the copyright notice
  60. X  * and this permission notice appear in supporting documentation.
  61. X  *
  62. X  * Prentice Hall and the author disclaim all warranties with regard to 
  63. X  * this software, including all implied warranties of merchantability and fitness.
  64. X  * In no event shall Prentice Hall or the author be liable for any special,
  65. X  * indirect or cosequential damages or any damages whatsoever resulting from 
  66. X  * loss of use, data or profits, whether in an action of contract, negligence 
  67. X  * or other tortious action, arising out of or in connection with the use 
  68. X  * or performance of this software.
  69. X  *
  70. X  * Open Software Foundation is a trademark of The Open Software Foundation, Inc.
  71. X  * OSF is a trademark of Open Software Foundation, Inc.
  72. X  * OSF/Motif is a trademark of Open Software Foundation, Inc.
  73. X  * Motif is a trademark of Open Software Foundation, Inc.
  74. X  * DEC is a registered trademark of Digital Equipment Corporation
  75. X  * HP is a registered trademark of the Hewlett Packard Company
  76. X  * DIGITAL is a registered trademark of Digital Equipment Corporation
  77. X  * X Window System is a trademark of the Massachusetts Institute of Technology
  78. X  **********************************************************************************/
  79. X
  80. X
  81. #ifndef TREEP_H
  82. #define TREEP_H
  83. typedef struct _XsTreeClassPart {
  84. X    int         ignore;
  85. } XsTreeClassPart;
  86. X
  87. typedef struct _XsTreeClassRec {
  88. X    CoreClassPart       core_class;
  89. X    CompositeClassPart  composite_class;
  90. X    ConstraintClassPart constraint_class;
  91. X    XsTreeClassPart     tree_class;
  92. } XsTreeClassRec;
  93. X
  94. extern XsTreeClassRec XstreeClassRec;
  95. X
  96. typedef struct {
  97. X    Dimension  *array;
  98. X    int         size;
  99. X  }  TreeOffset, *TreeOffsetPtr;
  100. X
  101. typedef struct {
  102. X    Dimension      h_min_space;
  103. X    Dimension      v_min_space;
  104. X    Pixel          foreground;
  105. X    GC             gc;
  106. X    TreeOffsetPtr  horizontal;
  107. X    TreeOffsetPtr  vertical;
  108. X    Widget         tree_root;
  109. } XsTreePart;
  110. X
  111. X
  112. typedef struct _XsTreeRec {
  113. X    CorePart        core;
  114. X    CompositePart   composite;
  115. X    ConstraintPart  constraint;
  116. X    XsTreePart      tree;
  117. }  XsTreeRec;
  118. X
  119. X
  120. X
  121. typedef struct _TreeConstraintsPart {
  122. X  Widget        super_node;
  123. X  WidgetList    sub_nodes;
  124. X  long          n_sub_nodes;
  125. X  long          max_sub_nodes;
  126. X  Position      x, y;
  127. } TreeConstraintsPart;
  128. X
  129. typedef struct _TreeConstraintsRec {
  130. X   TreeConstraintsPart tree;
  131. } TreeConstraintsRec, *TreeConstraints;
  132. X
  133. X
  134. #define TREE_CONSTRAINT(w) \
  135. X                   ((TreeConstraints)((w)->core.constraints))
  136. X
  137. #endif TREEP_H
  138. X
  139. X
  140. X
  141. SHAR_EOF
  142. echo 'File TreeP.h is complete' &&
  143. chmod 0644 TreeP.h ||
  144. echo 'restore of TreeP.h failed'
  145. Wc_c="`wc -c < 'TreeP.h'`"
  146. test 3293 -eq "$Wc_c" ||
  147.     echo 'TreeP.h: original size 3293, current size' "$Wc_c"
  148. rm -f _shar_wnt_.tmp
  149. fi
  150. rm -f _shar_seq_.tmp
  151. echo You have unpacked the last part
  152. exit 0
  153. -- 
  154. ---
  155. Senior Systems Scientist        mail: dcmartin@msi.com
  156. Molecular Simulations, Inc.        uucp: uunet!dcmartin
  157. 796 North Pastoria Avenue        at&t: 408/522-9236
  158.