OpenIndiana and Solaris port
[oweals/cde.git] / cde / programs / dtinfo / dtinfo / src / Basic / OutlineList.hh
1 /*
2  * $XConsortium: OutlineList.hh /main/3 1996/06/11 16:21:30 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 OutlineList : public List
23 {
24 public: // functions
25   // increment defaults to initial size 
26   OutlineList (int initial_size, int increment = 0,
27                grow_method_t grow_method = List::GROW_ADD);
28
29   ~OutlineList();
30
31   BitHandle get_data_handle()   { return f_bit_field.get_handle() ; }
32   void free_data_handle (BitHandle data_handle)
33   { f_bit_field.free_handle(data_handle) ; }
34
35   virtual u_int count_expanded (BitHandle data_handle);
36
37   void copy_selected(BitHandle source, BitHandle destination);
38   void copy_expanded(BitHandle source, BitHandle destination);
39   void recursive_select(BitHandle data_handle);
40   void select_all(BitHandle data_handle); // and children too
41   void deselect_all(BitHandle data_handle); // and children too
42
43   // If l == NULL new list is created and returned, else items
44   // that are selected are appended to l.  l is NOT emptied first. 
45   List *selected_items (BitHandle data_handle, List *l = NULL);
46
47 protected: // functions
48
49 protected: // variables
50
51   BitField      f_bit_field;
52 };
53
54
55 // /////////////////////////////////////////////////////////////////
56 // OutlineList Iterator Class
57 // /////////////////////////////////////////////////////////////////
58
59 #if 0
60 // NOTE: This isn't finished!!
61
62 class OutlineListIterator : public Iterator
63 {
64 public:
65   OutlineListIterator (const OutlineList &olist)
66     : f_olist (olist), f_index (0)
67     { }
68   FolioObject *init();
69
70 protected:
71   const OutlineList &f_olist;
72   u_int              f_index;
73 };
74 #endif