|
NCBI Home IEB Home C Toolkit docs C++ Toolkit source browser C Toolkit source browser (2) |
NCBI C Toolkit Cross ReferenceC/desktop/fea2seg.h |
source navigation diff markup identifier search freetext search file search |
1 /* fea2seg.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: fea2seg.h
27 *
28 * Author: Denis Vakatov, Jinghui Zhang
29 *
30 * $Revision: 6.1 $
31 *
32 * File Description:
33 * Draw style-dependent feature images for the feature legend map
34 * Draw gene images for the gene legend map
35 * SmartDrawText() -- draws text in a rectangular area
36 *
37 * ----------------------------------------------------------------------
38 * $Log: fea2seg.h,v $
39 * Revision 6.1 1997/09/16 21:20:23 vakatov
40 * +SmartDrawText() description
41 *
42 * Revision 6.0 1997/08/25 18:21:59 madden
43 * Revision changed to 6.0
44 *
45 * Revision 1.4 1997/07/18 21:48:17 zjing
46 * make SmartDrawText() external
47 *
48 * Revision 1.3 1997/03/06 17:27:17 vakatov
49 * Added funcs gene2segment() and compose_g_legend() to draw gene legend map.
50 * Now use "Int4"(instead of "Int2") for all coords and dimensions.
51 *
52 * Revision 1.2 1996/12/11 16:51:56 vakatov
53 * <fstyle.h> moved to "fea2seg.c";
54 * NCBI header, log and other standard stuff added
55 * ----------------------------------------------------------------------
56 */
57
58 #ifndef FEA2SEG_H
59 #define FEA2SEG_H
60
61 #include <picture.h>
62 #include <objgen.h>
63
64
65 #ifdef __cplusplus
66 extern "C" {
67 #endif
68
69 /* Prepare image+label of the feature having ID "feature" --
70 * according to the given style "style_name";
71 * draw the result within the segment/picture "parent" starting
72 * from the ("left", "top") position.
73 * Parameters "label_width" & "image_width" specify the feature's
74 * label and image widths, respectively.
75 * Height of the resulting segment will be written at the "height"
76 * pointer(only if the latter is not NULL).
77 * Return the resulting segment on success, NULL on error.
78 */
79 extern SegmenT feature2segment PROTO((SegmenT parent,
80 const Char PNTR style_name,
81 Int2 feature,
82 Int4 left, Int4 top,
83 Int4 label_width, Int4 image_width,
84 Int4Ptr height));
85
86 extern SegmenT pic_for_f_legend PROTO((ValNodePtr list,
87 CharPtr style_name,
88 Int4 image_width));
89
90
91
92 /* Draw legend(image+label) of the gene according to the description
93 * given in "gene";
94 * place the result into the segment/picture "parent", starting
95 * from the ("left", "top") position.
96 * Parameter "label_width" specifies the maximum width of the
97 * gene legend label.
98 * Height of the resulting segment will be written at the "height"
99 * pointer(only if the latter is not NULL).
100 * Return the resulting segment on success, NULL on error.
101 * NOTE: do not traverse the whole list; draw the first gene's legend only
102 */
103 extern SegmenT gene2segment PROTO((SegmenT parent,
104 const UserField *gene,
105 Int4 left, Int4 top,
106 Int4 image_width, Int4 label_width,
107 Int4Ptr height));
108
109
110 extern SegmenT compose_g_legend PROTO((SegmenT parent,
111 const Char *title,
112 FonT title_font,
113 const UserObject *genes,
114 Int4 left, Int4 top,
115 Int4 max_width, Int4Ptr height));
116
117 /* Print/Wrap the text "text" with font "font" starting from
118 * the ("left", "top") position in segment "seg" so that
119 * the printed text would fit into a box having maximum dimensions
120 * "*width" and "*height". If "*height" <= 0 then the Y-dimension
121 * is not limited.
122 * Set "*width" to the actual maximum width and "*height"(if non-NULL)
123 * to the actual height of the drawn text.
124 * Return FALSE if no text printed out.
125 */
126 extern Boolean SmartDrawText PROTO((SegmenT seg,
127 const Char *text, FonT font,
128 Int4 left, Int4 top,
129 Int4Ptr width, Int4Ptr height));
130
131 #ifdef __cplusplus
132 }
133 #endif
134
135 #endif /* FEA2SEG_H */
136
137 |
This page was automatically generated by the
LXR engine.
Visit the LXR main site for more information. |