1 /* copyright (c) 1996 FUJITSU LIMITED */
2 /* All Rights Reserved */
5 * $XConsortium: NodeViewInfo.hh /main/9 1996/10/18 19:47:58 cde-hal $
7 * Copyright (c) 1993 HAL Computer Systems International, Ltd.
8 * All rights reserved. Unpublished -- rights reserved under
9 * the Copyright Laws of the United States. USE OF A COPYRIGHT
10 * NOTICE IS PRECAUTIONARY ONLY AND DOES NOT IMPLY PUBLICATION
13 * THIS SOFTWARE CONTAINS CONFIDENTIAL INFORMATION AND TRADE
14 * SECRETS OF HAL COMPUTER SYSTEMS INTERNATIONAL, LTD. USE,
15 * DISCLOSURE, OR REPRODUCTION IS PROHIBITED WITHOUT THE
16 * PRIOR EXPRESS WRITTEN PERMISSION OF HAL COMPUTER SYSTEMS
19 * RESTRICTED RIGHTS LEGEND
20 * Use, duplication, or disclosure by the Government is subject
21 * to the restrictions as set forth in subparagraph (c)(l)(ii)
22 * of the Rights in Technical Data and Computer Software clause
23 * at DFARS 252.227-7013.
25 * HAL COMPUTER SYSTEMS INTERNATIONAL, LTD.
33 #include <X11/Intrinsic.h>
35 #include <Dt/CanvasP.h>
36 #include <Dt/CanvasSegP.h>
38 #include "dti_cc/CC_Dlist.h"
40 #include "UAS/DtSR/Util_Classes/Dict.hh"
44 // wrap the canvas segment for search hit usage
49 sr_DtCvSegment( _DtCvSegment* pseg) { hitseg = pseg ; };
51 int operator==(const sr_DtCvSegment& psg) const
52 { return psg.hitseg == hitseg; }
53 int operator!=(const sr_DtCvSegment& psg) const
54 { return psg.hitseg != hitseg; }
60 NodeViewInfo (UAS_Pointer<UAS_Common> &node_ptr, _DtCvTopicInfo *topic = 0);
63 UAS_Pointer<UAS_Common> &node_ptr()
64 { return (f_node_ptr); }
66 _DtCvTopicInfo *topic() { return f_topic; }
68 _DtCvTopicInfo *topic(_DtCvTopicInfo *topic)
69 { f_topic = topic ; return topic; }
72 HashTbl &locator_table()
73 { return (f_locator_table); }
76 void add_graphic(UAS_Pointer<Graphic> &);
78 xList<UAS_Pointer<Graphic> > &graphics()
79 { return f_pixmap_list ; }
81 void clear_search_hits();
82 void set_search_hits(UAS_Pointer<UAS_List<UAS_TextRun> > &);
84 enum trav_dir_t { PREV, NEXT };
85 enum trav_status_t { SUCCESS, NOT_MOVED, REACH_LIMIT };
86 trav_status_t adjust_current_search_hit(trav_dir_t);
88 int hit_entries() const;
91 void comp_pixel_values(Display* dpy, Colormap& cmap);
93 // retrieve the segment which matches to vcc
94 _DtCvSegment* get_segment(unsigned int vcc);
96 static unsigned int segment_to_vcc(_DtCvSegment* seg);
100 UAS_Pointer<UAS_Common> f_node_ptr; /* pointer to the associated node */
101 _DtCvTopicInfo *f_topic; /* pointer to the TML model of it */
104 HashTbl f_locator_table; /* quick lookup table for node locators */
106 xList<UAS_Pointer<Graphic> > f_pixmap_list; /* graphics processing */
108 CC_TPtrDlist<sr_DtCvSegment> f_hits;
109 sr_DtCvSegment* f_current_hit;
111 _DtCvSegment* top_container();
113 UAS_String f_def_key;
114 unsigned long f_def_val;
115 Dict<UAS_String, unsigned long> f_color_dict;
116 void comp_pixel_values_traverse(_DtCvSegment*, Display*, Colormap&);