|
NCBI Home IEB Home C Toolkit docs C++ Toolkit source browser C Toolkit source browser (2) |
NCBI C Toolkit Cross ReferenceC/vibrant/treevint.h |
source navigation diff markup identifier search freetext search file search |
1 /* treevint.h
2 * ===========================================================================
3 *
4 * PUBLIC DOMAIN NOTICE
5 * National Center for Biotechnology Information
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 have not placed any restriction on its use or reproduction.
13 *
14 * Although all reasonable efforts have been taken to ensure the accuracy
15 * and reliability of the software and data, the NLM and the U.S.
16 * Government do not and cannot warrant the performance or results that
17 * may be obtained by using this software or data. The NLM and the U.S.
18 * Government disclaim all warranties, express or implied, including
19 * warranties of performance, merchantability or fitness for any particular
20 * purpose.
21 *
22 * Please cite the author in any work or product based on this material.
23 *
24 * ===========================================================================
25 *
26 * File Name: treevint.h
27 *
28 * Author: Vladimir Soussov
29 *
30 * File Description: Data types for treeviewer
31 *
32 *
33 * $Log: treevint.h,v $
34 * Revision 1.6 1999/08/12 18:31:10 soussov
35 * fixed bug in allocNewSegm
36 *
37 * Revision 1.5 1998/04/01 21:52:50 soussov
38 * Prototype fixed
39 *
40 * Revision 1.4 1998/04/01 21:16:47 soussov
41 * Some prototypes added
42 *
43 * Revision 1.3 1998/04/01 20:09:26 soussov
44 * Some prototypes added
45 *
46 * Revision 1.2 1998/04/01 17:43:56 soussov
47 * changed tp include <>
48 *
49 * Revision 1.1 1998/03/31 21:22:29 sirotkin
50 * With Vladimir - moved from distrib/internal/taxonomy/tree
51 *
52 * Revision 6.0 1997/08/25 18:29:58 madden
53 * Revision changed to 6.0
54 *
55 * Revision 1.1 1997/05/30 16:16:24 soussov
56 * Set of files for ncbitree library
57 *
58 * Revision 1.1 1997/05/29 20:44:37 soussov
59 * Initial version of tree library
60 *
61 *
62 */
63
64 #ifndef TREEVINT_H_DONE
65 #define TREEVINT_H_DONE
66
67 #include <ncbi.h>
68 #include <vibrant.h>
69 #include <imagelst.h>
70 #include <treemgr.h>
71
72 typedef struct t_box {
73 Int4 yt, yb, xl, xr;
74 } _box, PNTR _boxPtr;
75
76 typedef struct t_point {
77 Int4 x, y;
78 } _point, PNTR _pointPtr;
79
80 #define RESERVED_SEGM 0x1
81 #define TREE_FIRST_NODE 0x2
82 #define LINK_TO_NEXT_BUFF 0x4
83
84 typedef struct t_tnSegm {
85 struct t_tnSegm* next;
86 Int4 w, h;
87 TreeNodeId work;
88 Uint1 viewer_id;
89 Uint1 flags;
90 } _tnSegm, PNTR _tnSegmPtr;
91
92 typedef struct t_drawContext {
93 WindoW tree_window;
94 PaneL tree_panel;
95 Int2 panel_origin_X, panel_origin_Y;
96 _point port_origin;
97 _box clip_box;
98 Uint4 bg_color, line_color, text_color, sbg_color, sfg_color, plus_color;
99 Uint1 bg_color_set, line_color_set, text_color_set, sbg_color_set, sfg_color_set, plus_color_set;
100 Int1 pen_w;
101 Int1 font_id;
102 } _drawContext, PNTR _drawContextPtr;
103
104 typedef enum {
105 TVIEW_ON_SELECT = 0,
106 TVIEW_ON_OPEN,
107 TVIEW_ON_CLOSE
108 } TViewEvent;
109
110 typedef Int2 (LIBCALLBACK * TreeNodeCmpFunc) PROTO((TreeCursorPtr, TreeCursorPtr));
111
112 typedef void (LIBCALLBACK * TreeViewEventFunc) PROTO((TreeCursorPtr, TViewEvent));
113
114 typedef struct t_TreeView TreeView, PNTR TreeViewPtr;
115
116 typedef void (LIBCALLBACK * TreeViewClickFunc) PROTO((TreeViewPtr, TreeNodeId, Boolean));
117
118 struct t_TreeView {
119 _drawContext draw_port;
120 TreePtr tree;
121 _tnSegmPtr segm_buff;
122 TreeCursorPtr cr1, cr2, cr3, cr4, cr5;
123 _ImageListPtr i_list;
124 Int4 sel_x, sel_y;
125 TreeNodeCmpFunc cmpSiblings;
126 TreeViewEventFunc evntFunc;
127 TreeViewClickFunc dblClickFunc;
128 TreeViewClickFunc shiftClickFunc;
129 TreeViewClickFunc ctrlClickFunc;
130 TreeNodeId my_root;
131 Int2 row_height;
132 Int2 row_width;
133 Int2 length_scale;
134 Uint1 my_spy_id;
135 };
136
137
138 #endif
139 |
This page was automatically generated by the
LXR engine.
Visit the LXR main site for more information. |