1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: pm_namsp.cxx,v $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
32 #include "pm_namsp.hxx"
35 // NOT FULLY DEFINED SERVICES
36 #include "hd_chlst.hxx"
37 #include "hd_docu.hxx"
38 #include "html_kit.hxx"
39 #include "navibar.hxx"
40 #include "opageenv.hxx"
41 #include "pagemake.hxx"
42 #include "strconst.hxx"
46 using csi::html::HorizontalLine
;
47 using csi::html::Link
;
48 using csi::html::Table
;
49 using csi::html::TableRow
;
50 using csi::html::TableCell
;
54 PageMaker_Namespace::PageMaker_Namespace( PageDisplay
& io_rPage
)
55 : SpecializedPageMaker(io_rPage
),
56 pMe( io_rPage
.Env().CurNamespace() ),
57 pChildDisplay( new ChildList_Display(io_rPage
.Env()) ),
60 csv_assert( pMe
!= 0 );
63 PageMaker_Namespace::~PageMaker_Namespace()
68 PageMaker_Namespace::MakePage()
70 pNavi
= new NavigationBar( Env(), Me() );
76 pNavi
->MakeSubRow("");
77 Write_ChildList( ary::cpp::Namespace::SLOT_SubNamespaces
, C_sTitle_SubNamespaces
, C_sLabel_SubNamespaces
);
79 Write_ChildLists_forClasses( C_sTitle_Classes
,
82 Write_ChildLists_forClasses( C_sTitle_Structs
,
84 ary::cpp::CK_struct
);
85 Write_ChildLists_forClasses( C_sTitle_Unions
,
89 Write_ChildList( ary::cpp::Namespace::SLOT_Enums
, C_sTitle_Enums
, C_sLabel_Enums
);
90 Write_ChildList( ary::cpp::Namespace::SLOT_Typedefs
, C_sTitle_Typedefs
, C_sLabel_Typedefs
);
91 Write_ChildList( ary::cpp::Namespace::SLOT_Operations
, C_sTitle_Operations
, C_sLabel_Operations
);
92 Write_ChildList( ary::cpp::Namespace::SLOT_Constants
, C_sTitle_Constants
, C_sLabel_Constants
);
93 Write_ChildList( ary::cpp::Namespace::SLOT_Variables
, C_sTitle_Variables
, C_sLabel_Variables
);
95 pNavi
->Write_SubRows();
99 PageMaker_Namespace::Write_NavBar()
101 pNavi
->Write( CurOut() );
102 CurOut() << new HorizontalLine
;
106 PageMaker_Namespace::Write_TopArea()
108 Page().Write_NameChainWithLinks( Me() );
110 adcdisp::PageTitle_Std fTitle
;
111 xml::Element
& rH3
= fTitle( CurOut() );
112 if ( Env().CurNamespace()->Owner().IsValid() )
114 rH3
<< C_sHFTypeTitle_Namespace
116 << Env().CurNamespace()->LocalName();
120 rH3
<< C_sHFTitle_GlobalNamespaceCpp
;
122 CurOut() << new HorizontalLine
;
126 PageMaker_Namespace::Write_DocuArea()
128 Docu_Display
aDocuShow( Env() );
130 aDocuShow
.Assign_Out(CurOut());
131 aDocuShow
.Process(Me().Docu());
132 aDocuShow
.Unassign_Out();
134 CurOut() << new HorizontalLine
;
138 PageMaker_Namespace::Write_ChildList( ary::SlotAccessId i_nSlot
,
139 const char * i_sListTitle
,
140 const char * i_sLabel
)
143 bool bChildrenExist
= false;
144 ChildList_Display::Area_Result
145 aResult( bChildrenExist
, CurOut() );
147 pChildDisplay
->Run_Simple( aResult
,
152 pNavi
->AddItem(i_sListTitle
, i_sLabel
, bChildrenExist
);
154 CurOut() << new HorizontalLine
;
158 PageMaker_Namespace::Write_ChildLists_forClasses( const char * i_sListTitle
,
159 const char * i_sLabel
,
160 ary::cpp::E_ClassKey i_eFilter
)
163 bool bChildrenExist
= false;
164 ChildList_Display::Area_Result
165 aResult( bChildrenExist
, CurOut() );
167 pChildDisplay
->Run_GlobalClasses( aResult
,
168 ary::cpp::Namespace::SLOT_Classes
,
173 pNavi
->AddItem(i_sListTitle
, i_sLabel
, bChildrenExist
);
174 if ( bChildrenExist
)
175 CurOut() << new HorizontalLine
;