1 /*************************************************************************
2  *
3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4  *
5  * Copyright 2000, 2010 Oracle and/or its affiliates.
6  *
7  * OpenOffice.org - a multi-platform office productivity suite
8  *
9  * This file is part of OpenOffice.org.
10  *
11  * OpenOffice.org is free software: you can redistribute it and/or modify
12  * it under the terms of the GNU Lesser General Public License version 3
13  * only, as published by the Free Software Foundation.
14  *
15  * OpenOffice.org is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18  * GNU Lesser General Public License version 3 for more details
19  * (a copy is included in the LICENSE file that accompanied this code).
20  *
21  * You should have received a copy of the GNU Lesser General Public License
22  * version 3 along with OpenOffice.org.  If not, see
23  * <http://www.openoffice.org/license.html>
24  * for a copy of the LGPLv3 License.
25  *
26  ************************************************************************/
27 
28 #ifndef ADC_DISPLAY_HFI_XREFPAGE_HXX
29 #define ADC_DISPLAY_HFI_XREFPAGE_HXX
30 
31 
32 
33 // USED SERVICES
34     // BASE CLASSES
35 #include "hi_factory.hxx"
36     // COMPONENTS
37     // PARAMETERS
38 
39 
40 class HF_IdlXrefs : public HtmlFactory_Idl
41 {
42   public:
43     typedef void (*F_GET_SUBLIST)(dyn_ce_list&, const client&);
44 
45                         HF_IdlXrefs(
46                             Environment &       io_rEnv,
47                             Xml::Element &      o_rOut,
48                             const String &      i_prefix,
49                             const client &      i_ce);
50     virtual             ~HF_IdlXrefs();
51 
52     /** @descr
53         Only lists which are tried to be produced by Produce_List() or
54         Produce_Tree(), will occur in the content directory of the page.
55         They will have links, if the list or tree has at least one element,
56         else the list is mentioned in the directory without link.
57 
58         @param i_label [*i_label == '#']
59     */
60     void                Produce_List(
61                             const char *        i_title,
62                             const char *        i_label,
63                             ce_list &           i_iterator ) const;
64     void                Write_ManualLinks(
65                             const client &      i_ce ) const;
66     /** @descr
67         Only lists which are tried to be produced by Produce_List() or
68         Produce_Tree(), will occur in the content directory of the page.
69         They will have links, if the list or tree has at least one element,
70         else the list is mentioned in the directory without link.
71 
72         @param i_label [*i_label == '#']
73     */
74     void                Produce_Tree(
75                             const char *        i_title,
76                             const char *        i_label,
77                             const client &      i_ce,
78                             F_GET_SUBLIST       i_sublistcreator ) const;
79 
80   private:
81     // Locals
82     void                produce_Main(
83                             const String &      i_prefix,
84                             const client &      i_ce ) const;
85     void                make_Navibar(
86                             const client &      i_ce ) const;
87     /// @return true if there are any elements in sub lists.
88     void                recursive_make_ListInTree(
89                             Xml::Element &      o_rDisplay,
90                             uintt               i_level,    /// 0 is highest
91                             const client &      i_ce,
92                             ce_list &           i_iterator,
93                             F_GET_SUBLIST       i_sublistcreator ) const;
94 
95     // DATA
96     Xml::Element &      rContentDirectory;
97     const client *      pClient;
98 };
99 
100 
101 
102 // IMPLEMENTATION
103 
104 #endif
105