1*0841af79SAndrew Rist /**************************************************************
2cdf0e10cSrcweir *
3*0841af79SAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one
4*0841af79SAndrew Rist * or more contributor license agreements. See the NOTICE file
5*0841af79SAndrew Rist * distributed with this work for additional information
6*0841af79SAndrew Rist * regarding copyright ownership. The ASF licenses this file
7*0841af79SAndrew Rist * to you under the Apache License, Version 2.0 (the
8*0841af79SAndrew Rist * "License"); you may not use this file except in compliance
9*0841af79SAndrew Rist * with the License. You may obtain a copy of the License at
10*0841af79SAndrew Rist *
11*0841af79SAndrew Rist * http://www.apache.org/licenses/LICENSE-2.0
12*0841af79SAndrew Rist *
13*0841af79SAndrew Rist * Unless required by applicable law or agreed to in writing,
14*0841af79SAndrew Rist * software distributed under the License is distributed on an
15*0841af79SAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16*0841af79SAndrew Rist * KIND, either express or implied. See the License for the
17*0841af79SAndrew Rist * specific language governing permissions and limitations
18*0841af79SAndrew Rist * under the License.
19*0841af79SAndrew Rist *
20*0841af79SAndrew Rist *************************************************************/
21cdf0e10cSrcweir
22cdf0e10cSrcweir #include <precomp.h>
23cdf0e10cSrcweir #include "pm_namsp.hxx"
24cdf0e10cSrcweir
25cdf0e10cSrcweir
26cdf0e10cSrcweir // NOT FULLY DEFINED SERVICES
27cdf0e10cSrcweir #include "hd_chlst.hxx"
28cdf0e10cSrcweir #include "hd_docu.hxx"
29cdf0e10cSrcweir #include "html_kit.hxx"
30cdf0e10cSrcweir #include "navibar.hxx"
31cdf0e10cSrcweir #include "opageenv.hxx"
32cdf0e10cSrcweir #include "pagemake.hxx"
33cdf0e10cSrcweir #include "strconst.hxx"
34cdf0e10cSrcweir
35cdf0e10cSrcweir
36cdf0e10cSrcweir using namespace csi;
37cdf0e10cSrcweir using csi::html::HorizontalLine;
38cdf0e10cSrcweir using csi::html::Link;
39cdf0e10cSrcweir using csi::html::Table;
40cdf0e10cSrcweir using csi::html::TableRow;
41cdf0e10cSrcweir using csi::html::TableCell;
42cdf0e10cSrcweir
43cdf0e10cSrcweir
44cdf0e10cSrcweir
PageMaker_Namespace(PageDisplay & io_rPage)45cdf0e10cSrcweir PageMaker_Namespace::PageMaker_Namespace( PageDisplay & io_rPage )
46cdf0e10cSrcweir : SpecializedPageMaker(io_rPage),
47cdf0e10cSrcweir pMe( io_rPage.Env().CurNamespace() ),
48cdf0e10cSrcweir pChildDisplay( new ChildList_Display(io_rPage.Env()) ),
49cdf0e10cSrcweir pNavi(0)
50cdf0e10cSrcweir {
51cdf0e10cSrcweir csv_assert( pMe != 0 );
52cdf0e10cSrcweir }
53cdf0e10cSrcweir
~PageMaker_Namespace()54cdf0e10cSrcweir PageMaker_Namespace::~PageMaker_Namespace()
55cdf0e10cSrcweir {
56cdf0e10cSrcweir }
57cdf0e10cSrcweir
58cdf0e10cSrcweir void
MakePage()59cdf0e10cSrcweir PageMaker_Namespace::MakePage()
60cdf0e10cSrcweir {
61cdf0e10cSrcweir pNavi = new NavigationBar( Env(), Me() );
62cdf0e10cSrcweir
63cdf0e10cSrcweir Write_NavBar();
64cdf0e10cSrcweir Write_TopArea();
65cdf0e10cSrcweir Write_DocuArea();
66cdf0e10cSrcweir
67cdf0e10cSrcweir pNavi->MakeSubRow("");
68cdf0e10cSrcweir Write_ChildList( ary::cpp::Namespace::SLOT_SubNamespaces, C_sTitle_SubNamespaces, C_sLabel_SubNamespaces );
69cdf0e10cSrcweir
70cdf0e10cSrcweir Write_ChildLists_forClasses( C_sTitle_Classes,
71cdf0e10cSrcweir C_sLabel_Classes,
72cdf0e10cSrcweir ary::cpp::CK_class );
73cdf0e10cSrcweir Write_ChildLists_forClasses( C_sTitle_Structs,
74cdf0e10cSrcweir C_sLabel_Structs,
75cdf0e10cSrcweir ary::cpp::CK_struct );
76cdf0e10cSrcweir Write_ChildLists_forClasses( C_sTitle_Unions,
77cdf0e10cSrcweir C_sLabel_Unions,
78cdf0e10cSrcweir ary::cpp::CK_union );
79cdf0e10cSrcweir
80cdf0e10cSrcweir Write_ChildList( ary::cpp::Namespace::SLOT_Enums, C_sTitle_Enums, C_sLabel_Enums );
81cdf0e10cSrcweir Write_ChildList( ary::cpp::Namespace::SLOT_Typedefs, C_sTitle_Typedefs, C_sLabel_Typedefs );
82cdf0e10cSrcweir Write_ChildList( ary::cpp::Namespace::SLOT_Operations, C_sTitle_Operations, C_sLabel_Operations );
83cdf0e10cSrcweir Write_ChildList( ary::cpp::Namespace::SLOT_Constants, C_sTitle_Constants, C_sLabel_Constants );
84cdf0e10cSrcweir Write_ChildList( ary::cpp::Namespace::SLOT_Variables, C_sTitle_Variables, C_sLabel_Variables );
85cdf0e10cSrcweir
86cdf0e10cSrcweir pNavi->Write_SubRows();
87cdf0e10cSrcweir }
88cdf0e10cSrcweir
89cdf0e10cSrcweir void
Write_NavBar()90cdf0e10cSrcweir PageMaker_Namespace::Write_NavBar()
91cdf0e10cSrcweir {
92cdf0e10cSrcweir pNavi->Write( CurOut() );
93cdf0e10cSrcweir CurOut() << new HorizontalLine;
94cdf0e10cSrcweir }
95cdf0e10cSrcweir
96cdf0e10cSrcweir void
Write_TopArea()97cdf0e10cSrcweir PageMaker_Namespace::Write_TopArea()
98cdf0e10cSrcweir {
99cdf0e10cSrcweir Page().Write_NameChainWithLinks( Me() );
100cdf0e10cSrcweir
101cdf0e10cSrcweir adcdisp::PageTitle_Std fTitle;
102cdf0e10cSrcweir xml::Element & rH3 = fTitle( CurOut() );
103cdf0e10cSrcweir if ( Env().CurNamespace()->Owner().IsValid() )
104cdf0e10cSrcweir {
105cdf0e10cSrcweir rH3 << C_sHFTypeTitle_Namespace
106cdf0e10cSrcweir << " "
107cdf0e10cSrcweir << Env().CurNamespace()->LocalName();
108cdf0e10cSrcweir }
109cdf0e10cSrcweir else
110cdf0e10cSrcweir {
111cdf0e10cSrcweir rH3 << C_sHFTitle_GlobalNamespaceCpp;
112cdf0e10cSrcweir }
113cdf0e10cSrcweir CurOut() << new HorizontalLine;
114cdf0e10cSrcweir }
115cdf0e10cSrcweir
116cdf0e10cSrcweir void
Write_DocuArea()117cdf0e10cSrcweir PageMaker_Namespace::Write_DocuArea()
118cdf0e10cSrcweir {
119cdf0e10cSrcweir Docu_Display aDocuShow( Env() );
120cdf0e10cSrcweir
121cdf0e10cSrcweir aDocuShow.Assign_Out(CurOut());
122cdf0e10cSrcweir aDocuShow.Process(Me().Docu());
123cdf0e10cSrcweir aDocuShow.Unassign_Out();
124cdf0e10cSrcweir
125cdf0e10cSrcweir CurOut() << new HorizontalLine;
126cdf0e10cSrcweir }
127cdf0e10cSrcweir
128cdf0e10cSrcweir void
Write_ChildList(ary::SlotAccessId i_nSlot,const char * i_sListTitle,const char * i_sLabel)129cdf0e10cSrcweir PageMaker_Namespace::Write_ChildList( ary::SlotAccessId i_nSlot,
130cdf0e10cSrcweir const char * i_sListTitle,
131cdf0e10cSrcweir const char * i_sLabel )
132cdf0e10cSrcweir
133cdf0e10cSrcweir {
134cdf0e10cSrcweir bool bChildrenExist = false;
135cdf0e10cSrcweir ChildList_Display::Area_Result
136cdf0e10cSrcweir aResult( bChildrenExist, CurOut() );
137cdf0e10cSrcweir
138cdf0e10cSrcweir pChildDisplay->Run_Simple( aResult,
139cdf0e10cSrcweir i_nSlot,
140cdf0e10cSrcweir i_sLabel,
141cdf0e10cSrcweir i_sListTitle );
142cdf0e10cSrcweir
143cdf0e10cSrcweir pNavi->AddItem(i_sListTitle, i_sLabel, bChildrenExist);
144cdf0e10cSrcweir if (bChildrenExist)
145cdf0e10cSrcweir CurOut() << new HorizontalLine;
146cdf0e10cSrcweir }
147cdf0e10cSrcweir
148cdf0e10cSrcweir void
Write_ChildLists_forClasses(const char * i_sListTitle,const char * i_sLabel,ary::cpp::E_ClassKey i_eFilter)149cdf0e10cSrcweir PageMaker_Namespace::Write_ChildLists_forClasses( const char * i_sListTitle,
150cdf0e10cSrcweir const char * i_sLabel,
151cdf0e10cSrcweir ary::cpp::E_ClassKey i_eFilter )
152cdf0e10cSrcweir
153cdf0e10cSrcweir {
154cdf0e10cSrcweir bool bChildrenExist = false;
155cdf0e10cSrcweir ChildList_Display::Area_Result
156cdf0e10cSrcweir aResult( bChildrenExist, CurOut() );
157cdf0e10cSrcweir
158cdf0e10cSrcweir pChildDisplay->Run_GlobalClasses( aResult,
159cdf0e10cSrcweir ary::cpp::Namespace::SLOT_Classes,
160cdf0e10cSrcweir i_sLabel,
161cdf0e10cSrcweir i_sListTitle,
162cdf0e10cSrcweir i_eFilter );
163cdf0e10cSrcweir
164cdf0e10cSrcweir pNavi->AddItem(i_sListTitle, i_sLabel, bChildrenExist);
165cdf0e10cSrcweir if ( bChildrenExist )
166cdf0e10cSrcweir CurOut() << new HorizontalLine;
167cdf0e10cSrcweir }
168