Line data Source code
1 : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 : /*
3 : * This file is part of the LibreOffice project.
4 : *
5 : * This Source Code Form is subject to the terms of the Mozilla Public
6 : * License, v. 2.0. If a copy of the MPL was not distributed with this
7 : * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 : *
9 : * This file incorporates work covered by the following license notice:
10 : *
11 : * Licensed to the Apache Software Foundation (ASF) under one or more
12 : * contributor license agreements. See the NOTICE file distributed
13 : * with this work for additional information regarding copyright
14 : * ownership. The ASF licenses this file to you under the Apache
15 : * License, Version 2.0 (the "License"); you may not use this file
16 : * except in compliance with the License. You may obtain a copy of
17 : * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18 : */
19 :
20 : #include <precomp.h>
21 : #include "hfi_enum.hxx"
22 :
23 :
24 : // NOT FULLY DEFINED SERVICES
25 : #include <ary/idl/i_ce.hxx>
26 : #include <ary/idl/ik_enum.hxx>
27 : #include <toolkit/hf_linachain.hxx>
28 : #include <toolkit/hf_navi_sub.hxx>
29 : #include <toolkit/hf_title.hxx>
30 : #include "hfi_navibar.hxx"
31 : #include "hfi_property.hxx"
32 : #include "hi_linkhelper.hxx"
33 :
34 :
35 : extern const String
36 1 : C_sCePrefix_Enum("enum");
37 :
38 : namespace
39 : {
40 :
41 : const String
42 1 : C_sList_Values("Values");
43 : const String
44 1 : C_sList_Values_Label("Values");
45 : const String
46 1 : C_sList_ValueDetails("Values' Details");
47 : const String
48 1 : C_sList_ValueDetails_Label("ValueDetails");
49 :
50 : enum E_SubListIndices
51 : {
52 : sli_ValuesSummary = 0,
53 : sli_ValueDetails = 1
54 : };
55 :
56 : } // anonymous namespace
57 :
58 190 : HF_IdlEnum::HF_IdlEnum( Environment & io_rEnv,
59 : Xml::Element & o_rOut )
60 190 : : HtmlFactory_Idl(io_rEnv, &o_rOut)
61 : {
62 190 : }
63 :
64 190 : HF_IdlEnum::~HF_IdlEnum()
65 : {
66 190 : }
67 :
68 : void
69 190 : HF_IdlEnum::Produce_byData( const client & i_ce ) const
70 : {
71 : Dyn<HF_NaviSubRow>
72 190 : pNaviSubRow( &make_Navibar(i_ce) );
73 :
74 : HF_TitleTable
75 190 : aTitle(CurOut());
76 :
77 : HF_LinkedNameChain
78 190 : aNameChain(aTitle.Add_Row());
79 :
80 190 : aNameChain.Produce_CompleteChain(Env().CurPosition(), nameChainLinker);
81 190 : produce_Title(aTitle, C_sCePrefix_Enum, i_ce);
82 :
83 190 : write_Docu(aTitle.Add_Row(), i_ce);
84 190 : CurOut() << new Html::HorizontalLine();
85 :
86 : dyn_ce_list
87 190 : dpValues;
88 190 : ary::idl::ifc_enum::attr::Get_Values(dpValues, i_ce);
89 190 : if ( (*dpValues).operator bool() )
90 : {
91 190 : produce_Members( *dpValues,
92 : C_sList_Values,
93 : C_sList_Values_Label,
94 : C_sList_ValueDetails,
95 190 : C_sList_ValueDetails_Label );
96 190 : pNaviSubRow->SwitchOn(sli_ValuesSummary);
97 190 : pNaviSubRow->SwitchOn(sli_ValueDetails);
98 : }
99 190 : pNaviSubRow->Produce_Row();
100 190 : }
101 :
102 : HF_NaviSubRow &
103 190 : HF_IdlEnum::make_Navibar( const client & i_ce ) const
104 : {
105 : HF_IdlNavigationBar
106 190 : aNaviBar(Env(), CurOut());
107 190 : aNaviBar.Produce_CeMainRow(i_ce);
108 :
109 : DYN HF_NaviSubRow &
110 190 : ret = aNaviBar.Add_SubRow();
111 190 : ret.AddItem(C_sList_Values, C_sList_Values_Label, false);
112 190 : ret.AddItem(C_sList_ValueDetails, C_sList_ValueDetails_Label, false);
113 :
114 190 : CurOut() << new Html::HorizontalLine();
115 190 : return ret;
116 : }
117 :
118 : void
119 1297 : HF_IdlEnum::produce_MemberDetails( HF_SubTitleTable & o_table,
120 : const client & i_ce) const
121 : {
122 : HF_IdlEnumValue
123 1297 : aElement( Env(), o_table );
124 1297 : aElement.Produce_byData(i_ce);
125 1300 : }
126 :
127 : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|