1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*************************************************************************
4 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
6 * Copyright 2000, 2010 Oracle and/or its affiliates.
8 * OpenOffice.org - a multi-platform office productivity suite
10 * This file is part of OpenOffice.org.
12 * OpenOffice.org is free software: you can redistribute it and/or modify
13 * it under the terms of the GNU Lesser General Public License version 3
14 * only, as published by the Free Software Foundation.
16 * OpenOffice.org is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU Lesser General Public License version 3 for more details
20 * (a copy is included in the LICENSE file that accompanied this code).
22 * You should have received a copy of the GNU Lesser General Public License
23 * version 3 along with OpenOffice.org. If not, see
24 * <http://www.openoffice.org/license.html>
25 * for a copy of the LGPLv3 License.
27 ************************************************************************/
30 #include "hfi_enum.hxx"
33 // NOT FULLY DEFINED SERVICES
34 #include <ary/idl/i_ce.hxx>
35 #include <ary/idl/ik_enum.hxx>
36 #include <toolkit/hf_linachain.hxx>
37 #include <toolkit/hf_navi_sub.hxx>
38 #include <toolkit/hf_title.hxx>
39 #include "hfi_navibar.hxx"
40 #include "hfi_property.hxx"
41 #include "hi_linkhelper.hxx"
45 C_sCePrefix_Enum("enum");
51 C_sList_Values("Values");
53 C_sList_Values_Label("Values");
55 C_sList_ValueDetails("Values' Details");
57 C_sList_ValueDetails_Label("ValueDetails");
61 sli_ValuesSummary
= 0,
65 } // anonymous namespace
67 HF_IdlEnum::HF_IdlEnum( Environment
& io_rEnv
,
68 Xml::Element
& o_rOut
)
69 : HtmlFactory_Idl(io_rEnv
, &o_rOut
)
73 HF_IdlEnum::~HF_IdlEnum()
78 HF_IdlEnum::Produce_byData( const client
& i_ce
) const
81 pNaviSubRow( &make_Navibar(i_ce
) );
87 aNameChain(aTitle
.Add_Row());
89 aNameChain
.Produce_CompleteChain(Env().CurPosition(), nameChainLinker
);
90 produce_Title(aTitle
, C_sCePrefix_Enum
, i_ce
);
92 write_Docu(aTitle
.Add_Row(), i_ce
);
93 CurOut() << new Html::HorizontalLine();
97 ary::idl::ifc_enum::attr::Get_Values(dpValues
, i_ce
);
98 if ( (*dpValues
).operator bool() )
100 produce_Members( *dpValues
,
102 C_sList_Values_Label
,
103 C_sList_ValueDetails
,
104 C_sList_ValueDetails_Label
);
105 pNaviSubRow
->SwitchOn(sli_ValuesSummary
);
106 pNaviSubRow
->SwitchOn(sli_ValueDetails
);
108 pNaviSubRow
->Produce_Row();
112 HF_IdlEnum::make_Navibar( const client
& i_ce
) const
115 aNaviBar(Env(), CurOut());
116 aNaviBar
.Produce_CeMainRow(i_ce
);
119 ret
= aNaviBar
.Add_SubRow();
120 ret
.AddItem(C_sList_Values
, C_sList_Values_Label
, false);
121 ret
.AddItem(C_sList_ValueDetails
, C_sList_ValueDetails_Label
, false);
123 CurOut() << new Html::HorizontalLine();
128 HF_IdlEnum::produce_MemberDetails( HF_SubTitleTable
& o_table
,
129 const client
& i_ce
) const
132 aElement( Env(), o_table
);
133 aElement
.Produce_byData(i_ce
);
136 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */