1 /* pictureP.h 2 * =========================================================================== 3 * 4 * PUBLIC DOMAIN NOTICE 5 * National Center for Biotechnology Information (NCBI) 6 * 7 * This software/database is a "United States Government Work" under the 8 * terms of the United States Copyright Act. It was written as part of 9 * the author's official duties as a United States Government employee and 10 * thus cannot be copyrighted. This software/database is freely available 11 * to the public for use. The National Library of Medicine and the U.S. 12 * Government do not place any restriction on its use or reproduction. 13 * We would, however, appreciate having the NCBI and the author cited in 14 * any work or product based on this material 15 * 16 * Although all reasonable efforts have been taken to ensure the accuracy 17 * and reliability of the software and data, the NLM and the U.S. 18 * Government do not and cannot warrant the performance or results that 19 * may be obtained by using this software or data. The NLM and the U.S. 20 * Government disclaim all warranties, express or implied, including 21 * warranties of performance, merchantability or fitness for any particular 22 * purpose. 23 * 24 * =========================================================================== 25 * 26 * File Name: pictureP.h 27 * 28 * Author: Jonathan Kans, Alex Smirnov, Jill Shermer 29 * 30 * Version Creation Date: 10/23/92 31 * 32 * $Revision: 6.3 $ 33 * 34 * File Description: 35 * 36 * Modifications: 37 * -------------------------------------------------------------------------- 38 * Date Name Description of modification 39 * ------- ---------- ----------------------------------------------------- 40 * 022495 Alex 41 * 42 * $Log: picturep.h,v $ 43 * Revision 6.3 2002/08/07 18:13:42 kans 44 * G/SetPrimitiveIDs, itemID is Uint4 45 * 46 * Revision 6.2 1999/10/13 17:45:47 kans 47 * added entityID, itemID, and itemtype to primitive internal structure, added Get and Set functions 48 * 49 * Revision 6.1 1999/10/04 17:16:33 kans 50 * include ncbidraw.h instead of vibrant.h, a couple Nlm_ prefixes 51 * 52 * Revision 6.0 1997/08/25 18:56:27 madden 53 * Revision changed to 6.0 54 * 55 * Revision 5.0 1996/05/28 13:45:08 ostell 56 * Set to revision 5.0 57 * 58 * Revision 4.0 1995/07/26 13:51:04 ostell 59 * force revision to 4.0 60 * 61 * Revision 1.14 1995/05/17 15:15:14 kans 62 * added Log line 63 * 64 * 65 * ========================================================================== 66 */ 67 68 #ifndef _PICTUREP_ 69 #define _PICTUREP_ 70 71 #ifndef _NCBIDRAW_ 72 #include <ncbidraw.h> 73 #endif 74 75 #ifndef _PICTURE_ 76 #include <picture.h> 77 #endif 78 79 #ifdef __cplusplus 80 extern "C" { 81 #endif 82 83 /***************************************************************************** 84 * 85 * INTERNAL TYPE DEFINES 86 * 87 *****************************************************************************/ 88 89 /* Primitive types */ 90 91 #define UNKNOWN 0 92 #define PICTURE 1 93 #define SEGMENT 2 94 #define GENERIC 3 95 96 /***************************************************************************** 97 * 98 * STRUCTURE TYPEDEFS 99 * 100 *****************************************************************************/ 101 102 /* BasePRec is the base record of each primitive, 103 storing the next pointer and an identity code */ 104 105 typedef struct Nlm_baseprec { 106 struct Nlm_baseprec PNTR next; 107 struct Nlm_baseprec PNTR prev; 108 Nlm_Int1 code; 109 } Nlm_BasePData, Nlm_BasePRec, PNTR Nlm_BasePPtr; 110 111 typedef struct Nlm_attpdata { 112 Nlm_Uint1 color [3]; 113 Nlm_Int1 linestyle; 114 Nlm_Int1 shading; 115 Nlm_Int1 penwidth; 116 Nlm_Int1 mode; 117 } Nlm_AttPData, PNTR Nlm_AttPPtr; 118 119 typedef struct Nlm_segpdata { 120 Nlm_BoxInfo box; 121 Nlm_BasePPtr head; 122 Nlm_BasePPtr tail; 123 Nlm_BasePPtr parent; 124 Nlm_Int4 maxscale; 125 Nlm_Uint2 segID; 126 Nlm_Int1 penwidth; 127 Nlm_Int1 highlight; 128 Nlm_Boolean visible; 129 } Nlm_SegPData; 130 131 typedef struct Nlm_segprec { 132 Nlm_BasePData base; 133 Nlm_SegPData seg; 134 Nlm_AttPData attLast; 135 } Nlm_SegPRec, Nlm_PicPRec, PNTR Nlm_SegPPtr, PNTR Nlm_PicPPtr; 136 137 /* GenPRec is the base record of each visible primitive; 138 pdp is the pointer to a method table */ 139 140 typedef struct Nlm_genprec { 141 Nlm_BasePData base; 142 Nlm_Int1 highlight; 143 Nlm_AttPData att; 144 Nlm_Uint2 primID; 145 Nlm_Uint2 entityID; 146 Nlm_Uint4 itemID; 147 Nlm_Uint2 itemtype; 148 Nlm_PrimDefPtr pdp; 149 double data; 150 } Nlm_GenPRec, PNTR Nlm_GenPPtr; 151 152 #define BasePData Nlm_BasePData 153 #define BasePRec Nlm_BasePRec 154 #define BasePPtr Nlm_BasePPtr 155 #define AttPData Nlm_AttPData 156 #define AttPPtr Nlm_AttPPtr 157 #define SegPData Nlm_SegPData 158 #define SegPRec Nlm_SegPRec 159 #define PicPRec Nlm_PicPRec 160 #define SegPPtr Nlm_SegPPtr 161 #define PicPPtr Nlm_PicPPtr 162 #define GenPRec Nlm_GenPRec 163 #define GenPPtr Nlm_GenPPtr 164 165 #ifdef __cplusplus 166 } 167 #endif 168 169 #endif 170