OpenIndiana and Solaris port
[oweals/cde.git] / cde / programs / dtinfo / dtinfo / src / Basic / NodeDisplayDataTml.hh
1 /*
2  * $XConsortium: NodeDisplayDataTml.hh /main/3 1996/06/11 16:20:42 cde-hal $
3  *
4  * Copyright (c) 1992 HaL Computer Systems, Inc.  All rights reserved.
5  * UNPUBLISHED -- rights reserved under the Copyright Laws of the United
6  * States.  Use of a copyright notice is precautionary only and does not
7  * imply publication or disclosure.
8  * 
9  * This software contains confidential information and trade secrets of HaL
10  * Computer Systems, Inc.  Use, disclosure, or reproduction is prohibited
11  * without the prior express written permission of HaL Computer Systems, Inc.
12  * 
13  *                         RESTRICTED RIGHTS LEGEND
14  * Use, duplication, or disclosure by the Government is subject to
15  * restrictions as set forth in subparagraph (c)(l)(ii) of the Rights in
16  * Technical Data and Computer Software clause at DFARS 252.227-7013.
17  *                        HaL Computer Systems, Inc.
18  *                  1315 Dell Avenue, Campbell, CA  95008
19  * 
20  */
21
22 class model;
23 class NodeObject;
24 class NodeHandle;
25
26 class NodeDisplayData : public FolioObject
27 {
28 public: // functions
29   NodeDisplayData (NodeObject &node_object)
30     : f_node_object (node_object), f_model (NULL), 
31       f_font_serial(0), f_model_serial (0)
32     { }
33
34   ~NodeDisplayData();
35   model &the_model();
36
37   // traverse tml data and update fonts - should be improved via tml - jbm
38   void update_fonts(unsigned int serial_number);
39
40   // for NodeObject use only 
41   void not_displayed();
42
43   NodeHandle &node_handle()
44     { return ((NodeHandle &) f_node_object); }
45
46   HashTbl &locator_table()
47     { return (f_locator_table); }
48
49   u_int model_serial()
50     { return (f_model_serial); }
51
52 protected: // variables
53   NodeObject &f_node_object;
54   model      *f_model;   // TML object
55
56   unsigned int f_font_serial;
57   // NOTE: the elements in the locator table must be freed when model killed!! 
58   HashTbl      f_locator_table;
59   // We keep track of a unique serial number with each model so that it is
60   // easy to tell if the model has changed by comparing serial numbers. 
61   u_int        f_model_serial;
62 };