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: hfi_enum.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 "hfi_enum.hxx"
35 // NOT FULLY DEFINED SERVICES
36 #include <ary/idl/i_ce.hxx>
37 #include <ary/idl/ik_enum.hxx>
38 #include <toolkit/hf_linachain.hxx>
39 #include <toolkit/hf_navi_sub.hxx>
40 #include <toolkit/hf_title.hxx>
41 #include "hfi_navibar.hxx"
42 #include "hfi_property.hxx"
43 #include "hi_linkhelper.hxx"
47 C_sCePrefix_Enum("enum");
53 C_sList_Values("Values");
55 C_sList_Values_Label("Values");
57 C_sList_ValueDetails("Values' Details");
59 C_sList_ValueDetails_Label("ValueDetails");
63 sli_ValuesSummary
= 0,
67 } // anonymous namespace
69 HF_IdlEnum::HF_IdlEnum( Environment
& io_rEnv
,
70 Xml::Element
& o_rOut
)
71 : HtmlFactory_Idl(io_rEnv
, &o_rOut
)
75 HF_IdlEnum::~HF_IdlEnum()
80 HF_IdlEnum::Produce_byData( const client
& i_ce
) const
83 pNaviSubRow( &make_Navibar(i_ce
) );
89 aNameChain(aTitle
.Add_Row());
91 aNameChain
.Produce_CompleteChain(Env().CurPosition(), nameChainLinker
);
92 produce_Title(aTitle
, C_sCePrefix_Enum
, i_ce
);
94 write_Docu(aTitle
.Add_Row(), i_ce
);
95 CurOut() << new Html::HorizontalLine();
99 ary::idl::ifc_enum::attr::Get_Values(dpValues
, i_ce
);
100 if ( (*dpValues
).operator bool() )
102 produce_Members( *dpValues
,
104 C_sList_Values_Label
,
105 C_sList_ValueDetails
,
106 C_sList_ValueDetails_Label
);
107 pNaviSubRow
->SwitchOn(sli_ValuesSummary
);
108 pNaviSubRow
->SwitchOn(sli_ValueDetails
);
110 pNaviSubRow
->Produce_Row();
114 HF_IdlEnum::make_Navibar( const client
& i_ce
) const
117 aNaviBar(Env(), CurOut());
118 aNaviBar
.Produce_CeMainRow(i_ce
);
121 ret
= aNaviBar
.Add_SubRow();
122 ret
.AddItem(C_sList_Values
, C_sList_Values_Label
, false);
123 ret
.AddItem(C_sList_ValueDetails
, C_sList_ValueDetails_Label
, false);
125 CurOut() << new Html::HorizontalLine();
130 HF_IdlEnum::produce_MemberDetails( HF_SubTitleTable
& o_table
,
131 const client
& i_ce
) const
134 aElement( Env(), o_table
);
135 aElement
.Produce_byData(i_ce
);