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_HTML_PAGEMAKE_HXX
29 #define ADC_DISPLAY_HTML_PAGEMAKE_HXX
30 
31 
32 
33 // USED SERVICES
34 	// BASE CLASSES
35 #include <ary/ary_disp.hxx>
36 #include <cosv/tpl/processor.hxx>
37 #include "hdimpl.hxx"
38 	// COMPONENTS
39 	// PARAMETERS
40 #include <ary/cpp/c_namesp.hxx>
41 
42 namespace ary
43 {
44     namespace cpp
45     {
46         class Namespace;
47         class Class;
48         class Enum;
49         class Typedef;
50     }
51     namespace loc
52     {
53         class File;
54     }
55 }
56 
57 
58 class OuputPage_Environment;
59 class HtmlDocuFile;
60 
61 
62 
63 class PageDisplay : public ary::Display,
64                     public csv::ConstProcessor<ary::cpp::Class>,
65                     public csv::ConstProcessor<ary::cpp::Enum>,
66                     public csv::ConstProcessor<ary::cpp::Typedef>,
67                     public HtmlDisplay_Impl
68 {
69   public:
70 						PageDisplay(
71                             OuputPage_Environment &
72                                                 io_rEnv );
73 	virtual				~PageDisplay();
74 
75     void                Create_OverviewFile();
76     void                Create_AllDefsFile();
77     void                Create_IndexFiles();
78     void                Create_HelpFile();
79 
80     void                Create_NamespaceFile();
81 
82     void                Setup_OperationsFile_for(
83                             const ary::loc::File &
84                                                 i_rFile );
85     void                Setup_OperationsFile_for(
86                             const ary::cpp::Class &
87                                                 i_rClass );
88     void                Setup_DataFile_for(
89                             const ary::loc::File &
90                                                 i_rFile );
91     void                Setup_DataFile_for(
92                             const ary::cpp::Class &
93                                                 i_rClass );
94     /// Used with Setup_OperatonsFile_for().
95     void                Create_File();
96 
97 
98     // Interface for Children of SpecializedPageMaker:
99     void                Write_NameChainWithLinks(
100                             const ary::cpp::CodeEntity &
101                                                 i_rCe );
102 
103     // Necessary, to call Process() on this class.
104     using csv::ConstProcessor<ary::cpp::Class>::Process;
105     using csv::ConstProcessor<ary::cpp::Enum>::Process;
106     using csv::ConstProcessor<ary::cpp::Typedef>::Process;
107 
108  private:
109     // Interface csv::ConstProcessor<>:
110 	virtual void	  	do_Process(
111 							const ary::cpp::Class &
112 												i_rData );
113 	virtual void	  	do_Process(
114 							const ary::cpp::Enum &
115 												i_rData );
116 	virtual void	  	do_Process(
117 							const ary::cpp::Typedef &
118 												i_rData );
119     // Interface ary::cpp::Display:
120     virtual const ary::cpp::Gate *
121                         inq_Get_ReFinder() const;
122     // Locals
123     HtmlDocuFile &      File()                  { return *pMyFile; }
124     void                RecursiveWrite_NamespaceLink(
125                             const ary::cpp::Namespace *
126                                                 i_pNamespace );
127     void                RecursiveWrite_ClassLink(
128                             const ary::cpp::Class *
129                                                 i_pClass,
130                             uintt               i_nLevelDistance );
131     void                SetupFileOnCurEnv(
132                             const char *        i_sTitle );
133     void                Write_NavBar_Enum(
134                             const ary::cpp::Enum &
135                                                 i_rData );
136     void                Write_TopArea_Enum(
137                             const ary::cpp::Enum &
138                                                 i_rData );
139     void                Write_DocuArea_Enum(
140                             const ary::cpp::Enum &
141                                                 i_rData );
142     void                Write_ChildList_Enum(
143                             const ary::cpp::Enum &
144                                                 i_rData );
145     void                Write_NavBar_Typedef(
146                             const ary::cpp::Typedef &
147                                                 i_rData );
148     void                Write_TopArea_Typedef(
149                             const ary::cpp::Typedef &
150                                                 i_rData );
151     void                Write_DocuArea_Typedef(
152                             const ary::cpp::Typedef &
153                                                 i_rData );
154     void                Create_IndexFile(
155                             int                 i_nLetter );
156 
157 	// DATA
158 	Dyn<HtmlDocuFile>	pMyFile;
159 };
160 
161 
162 
163 
164 #endif
165