2 * CDE - Common Desktop Environment
4 * Copyright (c) 1993-2012, The Open Group. All rights reserved.
6 * These libraries and programs are free software; you can
7 * redistribute them and/or modify them under the terms of the GNU
8 * Lesser General Public License as published by the Free Software
9 * Foundation; either version 2 of the License, or (at your option)
12 * These libraries and programs are distributed in the hope that
13 * they will be useful, but WITHOUT ANY WARRANTY; without even the
14 * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
15 * PURPOSE. See the GNU Lesser General Public License for more
18 * You should have received a copy of the GNU Lesser General Public
19 * License along with these libraries and programs; if not, write
20 * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
21 * Floor, Boston, MA 02110-1301 USA
23 /* copyright (c) 1996 FUJITSU LIMITED */
24 /* All Rights Reserved */
27 * $XConsortium: NodeViewInfo.hh /main/9 1996/10/18 19:47:58 cde-hal $
29 * Copyright (c) 1993 HAL Computer Systems International, Ltd.
30 * All rights reserved. Unpublished -- rights reserved under
31 * the Copyright Laws of the United States. USE OF A COPYRIGHT
32 * NOTICE IS PRECAUTIONARY ONLY AND DOES NOT IMPLY PUBLICATION
35 * THIS SOFTWARE CONTAINS CONFIDENTIAL INFORMATION AND TRADE
36 * SECRETS OF HAL COMPUTER SYSTEMS INTERNATIONAL, LTD. USE,
37 * DISCLOSURE, OR REPRODUCTION IS PROHIBITED WITHOUT THE
38 * PRIOR EXPRESS WRITTEN PERMISSION OF HAL COMPUTER SYSTEMS
41 * RESTRICTED RIGHTS LEGEND
42 * Use, duplication, or disclosure by the Government is subject
43 * to the restrictions as set forth in subparagraph (c)(l)(ii)
44 * of the Rights in Technical Data and Computer Software clause
45 * at DFARS 252.227-7013.
47 * HAL COMPUTER SYSTEMS INTERNATIONAL, LTD.
55 #include <X11/Intrinsic.h>
57 #include <Dt/CanvasP.h>
58 #include <Dt/CanvasSegP.h>
60 #include "dti_cc/CC_Dlist.h"
62 #include "UAS/DtSR/Util_Classes/Dict.hh"
66 // wrap the canvas segment for search hit usage
71 sr_DtCvSegment( _DtCvSegment* pseg) { hitseg = pseg ; };
73 int operator==(const sr_DtCvSegment& psg) const
74 { return psg.hitseg == hitseg; }
75 int operator!=(const sr_DtCvSegment& psg) const
76 { return psg.hitseg != hitseg; }
82 NodeViewInfo (UAS_Pointer<UAS_Common> &node_ptr, _DtCvTopicInfo *topic = 0);
85 UAS_Pointer<UAS_Common> &node_ptr()
86 { return (f_node_ptr); }
88 _DtCvTopicInfo *topic() { return f_topic; }
90 _DtCvTopicInfo *topic(_DtCvTopicInfo *topic)
91 { f_topic = topic ; return topic; }
94 HashTbl &locator_table()
95 { return (f_locator_table); }
98 void add_graphic(UAS_Pointer<Graphic> &);
100 xList<UAS_Pointer<Graphic> > &graphics()
101 { return f_pixmap_list ; }
103 void clear_search_hits();
104 void set_search_hits(UAS_Pointer<UAS_List<UAS_TextRun> > &);
106 enum trav_dir_t { PREV, NEXT };
107 enum trav_status_t { SUCCESS, NOT_MOVED, REACH_LIMIT };
108 trav_status_t adjust_current_search_hit(trav_dir_t);
110 int hit_entries() const;
111 int search_hit_idx();
113 void comp_pixel_values(Display* dpy, Colormap& cmap);
115 // retrieve the segment which matches to vcc
116 _DtCvSegment* get_segment(unsigned int vcc);
118 static unsigned int segment_to_vcc(_DtCvSegment* seg);
122 UAS_Pointer<UAS_Common> f_node_ptr; /* pointer to the associated node */
123 _DtCvTopicInfo *f_topic; /* pointer to the TML model of it */
126 HashTbl f_locator_table; /* quick lookup table for node locators */
128 xList<UAS_Pointer<Graphic> > f_pixmap_list; /* graphics processing */
130 CC_TPtrDlist<sr_DtCvSegment> f_hits;
131 sr_DtCvSegment* f_current_hit;
133 _DtCvSegment* top_container();
135 UAS_String f_def_key;
136 unsigned long f_def_val;
137 Dict<UAS_String, unsigned long> f_color_dict;
138 void comp_pixel_values_traverse(_DtCvSegment*, Display*, Colormap&);