1 /* $Id: udvdef.h,v 6.15 2000/07/08 20:43:55 vakatov Exp $ 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: udvdef.h 27 * 28 * Author: Patrick Durand 29 * 30 * Version Creation Date: 07/09/99 31 * 32 * $Revision: 6.15 $ 33 * 34 * File Description: this file is the companion of udviewer.h 35 * 36 * Modifications: 37 * -------------------------------------------------------------------------- 38 * $Log: udvdef.h,v $ 39 * Revision 6.15 2000/07/08 20:43:55 vakatov 40 * Get all "#include" out of the 'extern "C" { }' scope; other cleanup... 41 * 42 * Revision 6.14 2000/07/05 18:42:17 hurwitz 43 * added split block function to DDV 44 * 45 * Revision 6.13 2000/04/13 13:57:33 durand 46 * allowed udv to display reverse complement sequence 47 * 48 * Revision 6.12 2000/04/10 20:58:43 hurwitz 49 * added GUI controls for DeleteBlock in DDE 50 * 51 * Revision 6.11 2000/04/05 20:52:35 hurwitz 52 * added GUI control for shifting left and right alignment boundaries 53 * 54 * Revision 6.10 2000/04/03 22:26:31 hurwitz 55 * can now shift a row with click and drag 56 * 57 * Revision 6.9 2000/03/28 21:03:14 hurwitz 58 * added gui control to re-order rows 59 * 60 * Revision 6.8 2000/01/05 21:07:50 durand 61 * update mouse click actions and DrawSequence function for a better use from ddv and cn3d 62 * 63 * Revision 6.7 1999/11/18 14:44:42 durand 64 * add UDVMapInfo data structure for the Entrez sequence viewer 65 * 66 * Revision 6.6 1999/11/03 13:45:34 durand 67 * add MS_ACTION_SELECT_FULL_SEQ define for DDV 68 * 69 * Revision 6.5 1999/10/02 15:11:09 durand 70 * update the code to be used by wwwudv 71 * 72 * Revision 6.4 1999/09/22 14:26:31 durand 73 * add fields for DDV mouse management 74 * 75 * Revision 6.3 1999/07/27 13:57:41 durand 76 * modify display type defines 77 * 78 * Revision 6.2 1999/07/27 13:08:53 durand 79 * add display type defines 80 * 81 * Revision 6.1 1999/07/09 13:54:55 durand 82 * this is a companion file of udviewer.h 83 * 84 * 85 * 86 * ========================================================================== 87 */ 88 89 #ifndef _UDVDEF_ 90 #define _UDVDEF_ 91 92 /******************************************************************************* 93 94 INCLUDE SECTION 95 96 *******************************************************************************/ 97 #include <ncbi.h> 98 99 #ifdef __cplusplus 100 extern "C" { 101 #endif 102 103 /******************************************************************************* 104 105 STRUCTURES 106 107 *******************************************************************************/ 108 typedef union datablock { 109 Pointer ptrvalue; 110 Uint4 uintvalue; 111 } DataBlock, PNTR DataBlockPtr; 112 113 typedef struct udvmapinfo {/*use to build the image map of the Entrez viewer*/ 114 Int2 left; /*RecT for the map location*/ 115 Int2 top; /*note: I cannot use the Vibrant RecT because */ 116 Int2 right; /*udvdef.h is in API and must be Vibrant free.*/ 117 Int2 bottom; 118 Uint1 Type; /*data type*/ 119 DataBlock data; /*data itself*/ 120 } UDVMapInfo, PNTR UDVMapInfoPtr; 121 122 123 /******************************************************************************* 124 125 DEFINE SECTION 126 127 *******************************************************************************/ 128 129 /*number of letter by block: default is ten-letter blocks*/ 130 #define LETTER_BLOCK_WIDTH 10 131 132 /*margins around the UnDViewer*/ 133 #define VIEWER_HORZ_MARGIN 10 134 #define VIEWER_VERT_MARGIN 10 135 136 /*Numerical scale */ 137 #define SCALE_POS_LEFT 1 /*scale position*/ 138 #define SCALE_POS_TOP 2 139 #define SCALE_POS_BOTH 3 140 #define SCALE_POS_NONE 4 141 #define SCALE_MAJOR_TICK_EVERY 10 /*position of the ticks*/ 142 #define SCALE_MINOR_TICK_EVERY 5 143 #define SCALE_LETTER_COLOR (GetColorRGB(0,0,255)) /*scale colours*/ 144 #define SCALE_MAJTICK_COLOR (GetColorRGB(0,0,0)) 145 #define SCALE_MINTICK_COLOR (GetColorRGB(128,128,128)) 146 #define SCALE_WIDTH_IF_LEFT 9 /*nb. of cxChar (see Font struct); used to 147 the scale on the left*/ 148 149 /*Font*/ 150 #define FONT_DEF_COLOR (GetColorRGB(0,0,0))/*default font colour*/ 151 152 /*Panel*/ 153 #define PANEL_NAME_WIDTH 10 /*nb. of cxChar (see Font struct) MAX: 50 !!; 154 used to put names pn the left on the UDV window*/ 155 156 /*Info Panel*/ 157 #define BUFFER_SIZE 255 /*nb. of cxChar for Info Buffer*/ 158 159 /*NA and AA color layout*/ 160 #define NA_A_LAYOUT 0 161 #define NA_G_LAYOUT 1 162 #define NA_C_LAYOUT 2 163 #define NA_T_LAYOUT 3 164 #define NA_U_LAYOUT 4 165 #define LAYOUT_UPPER_CASE 1 166 #define LAYOUT_LOWER_CASE 2 167 168 /*Mouse actions*/ 169 #define MS_ACTION_FEAT_NOTHING 1 /*no action*/ 170 #define MS_ACTION_FEAT_CURSOR 2 /*double cursor for features*/ 171 #define MS_ACTION_RESIZE_WIN 3 /*resize cxName region*/ 172 #define MS_ACTION_SELECT_SEQ 4 /*select letters on the sequence*/ 173 #define MS_ACTION_SELECT_FULL_SEQ 5 /*select full sequence*/ 174 #define MS_ACTION_MOVE_ROW 6 /*change row order*/ 175 #define MS_ACTION_SHIFT_ROW 7 /*shift row left/right*/ 176 #define MS_ACTION_SHIFT_BOUNDARY 8 /*shift left/right boundary left/right*/ 177 #define MS_ACTION_CREATE_BLOCK 9 /*create aligned block*/ 178 #define MS_ACTION_SPLIT_BLOCK 10 /*split aligned block in 2*/ 179 180 /************************************************************************* 181 182 I defined _min_ & _max_ because I needed the test '>=' in both 183 _max_ and _min_ 184 185 *************************************************************************/ 186 #define _min_(a,b) ((a)>=(b)?(b):(a)) 187 #define _max_(a,b) ((a)>=(b)?(a):(b)) 188 189 /*used to draw features*/ 190 /* |===>......===>.....===>| : a big arrow feature*/ 191 #define FEATURE_START_BOX 1 /*used to draw big arrows*/ 192 #define FEATURE_START_ARROW 2 193 #define FEATURE_START_ARROW_END 3 194 #define FEATURE_START_NOTHING 4 195 /* /\/\/\/\ : a helix feature (2D structures)*/ 196 #define DRAW_HELIX_DOWN 1 /*used to draw helix faeture*/ 197 #define DRAW_HELIX_MIDDLE 2 198 #define DRAW_HELIX_UP 3 199 /* >------< : a bond feature*/ 200 #define BOND_RIGHT 1 /*used to draw a bond feature*/ 201 #define BOND_LEFT 2 202 #define SZBUF_SIZE 250 203 204 /*sequence buffer management ; depending on VScroll up/down*/ 205 #define BUFFER_REPOP_VCRL_LUP 1 /*line up*/ 206 #define BUFFER_REPOP_VCRL_LDN 2 /*line down*/ 207 #define BUFFER_REPOP_VCRL_PUP 3 /*page up*/ 208 #define BUFFER_REPOP_VCRL_PDN 4 /*page down*/ 209 210 /*UDV/DDV panel region types*/ 211 #define UDV_REGION_NAMELIST ((Uint1)1) 212 #define UDV_REGION_SEPARATOR ((Uint1)2) 213 #define UDV_REGION_PARAGLIST ((Uint1)3) 214 #define UDV_REGION_SEQALIGNRULER ((Uint1)4) /*use by DDV only*/ 215 216 /*main display types*/ 217 #define DDV_DISP_HORZ ((Uint4)1) 218 #define DDV_DISP_VERT ((Uint4)2) 219 #define DDV_DISP_LABEL ((Uint4)4) 220 #define DDV_DISP_REVERTCOORD ((Uint4)8) 221 222 /*timer control*/ 223 #define UDV_SET_TIMER 1 224 #define UDV_TEST_TIMER 2 225 /*action associated with the timer*/ 226 #define UDV_INVAL_REGION 1 227 #define UDV_NOTHING 2 228 229 #ifdef __cplusplus 230 } 231 #endif 232 233 #endif /* _UDVDEF_ */ 234 235