1 /************************************************************************* 2 * 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 * 5 * Copyright 2000, 2010 Oracle and/or its affiliates. 6 * 7 * OpenOffice.org - a multi-platform office productivity suite 8 * 9 * This file is part of OpenOffice.org. 10 * 11 * OpenOffice.org is free software: you can redistribute it and/or modify 12 * it under the terms of the GNU Lesser General Public License version 3 13 * only, as published by the Free Software Foundation. 14 * 15 * OpenOffice.org is distributed in the hope that it will be useful, 16 * but WITHOUT ANY WARRANTY; without even the implied warranty of 17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 * GNU Lesser General Public License version 3 for more details 19 * (a copy is included in the LICENSE file that accompanied this code). 20 * 21 * You should have received a copy of the GNU Lesser General Public License 22 * version 3 along with OpenOffice.org. If not, see 23 * <http://www.openoffice.org/license.html> 24 * for a copy of the LGPLv3 License. 25 * 26 ************************************************************************/ 27 28 #ifndef ADC_DISPLAY_HI_FACTORY_HXX 29 #define ADC_DISPLAY_HI_FACTORY_HXX 30 31 32 // USED SERVICES 33 // BASE CLASSES 34 #include <toolkit/htmlfactory.hxx> 35 // COMPONENTS 36 // PARAMETERS 37 #include <ary/stdconstiter.hxx> 38 #include <ary/idl/i_types4idl.hxx> 39 #include <toolkit/out_position.hxx> 40 41 42 namespace ary 43 { 44 namespace idl 45 { 46 class Module; 47 } 48 namespace doc 49 { 50 class OldIdlDocu; 51 } 52 } 53 54 55 class HtmlEnvironment_Idl; 56 class LinkHelper; 57 class HF_NaviSubRow; 58 class HF_TitleTable; 59 class HF_SubTitleTable; 60 61 62 class HtmlFactory_Idl : public HtmlFactory<HtmlEnvironment_Idl> 63 { 64 public: 65 enum E_MemberViewType 66 { 67 viewtype_summary, // the summary of the members 68 viewtype_details, // the details of the members 69 viewtype_complete // everything 70 }; 71 72 enum E_DocType 73 { 74 doctype_summaryOnly, // only the summary 75 doctype_complete // the complete documentation 76 }; 77 78 public: 79 typedef ary::idl::CodeEntity client; 80 typedef ary::idl::Ce_id ce_id; 81 typedef ary::idl::Type_id type_id; 82 typedef ary::doc::OldIdlDocu ce_info; 83 84 typedef ary::Dyn_StdConstIterator<ce_id> dyn_ce_list; 85 typedef ary::Dyn_StdConstIterator<type_id> dyn_type_list; 86 typedef ary::StdConstIterator<ce_id> ce_list; 87 typedef ary::StdConstIterator<type_id> type_list; 88 89 typedef HtmlEnvironment_Idl Environment; 90 typedef output::Position OutPosition; 91 92 protected: 93 HtmlFactory_Idl( 94 Environment & io_rEnv, 95 Xml::Element * o_pOut = 0 ) 96 : HtmlFactory<Environment>(io_rEnv, o_pOut) 97 { } 98 virtual ~HtmlFactory_Idl() {} 99 100 /** The default version only calls ->produce_InternalLink(). 101 This may be overwritten by derived classes. 102 */ 103 virtual void produce_SummaryDeclaration( 104 Xml::Element & o_row, 105 const client & i_ce ) const; 106 void produce_InternalLink( 107 Xml::Element & o_row, 108 const client & i_ce ) const; 109 void produce_ShortDoc( 110 Xml::Element & o_row, 111 const client & i_ce ) const; 112 113 // KORR_FUTURE: Does not belong here (implementation inheritance)! 114 void produce_Bases( 115 Xml::Element & o_screen, 116 const client & i_ce, 117 const String & i_sLabel ) const; 118 void produce_Members( 119 ce_list & it_list, 120 const String & i_summaryTitle, 121 const String & i_summaryLabel, 122 const String & i_detailsTitle, 123 const String & i_detailsLabel, 124 const E_MemberViewType i_viewType = viewtype_complete ) const; 125 126 void produce_Title( 127 HF_TitleTable & o_title, 128 const String & i_label, 129 const client & i_ce ) const; 130 void get_Annotations( 131 StreamStr & o_out, 132 const client & i_ce ) const; 133 134 /// Writes complete docu in standard format. 135 void write_Docu( 136 Xml::Element & o_screen, 137 const client & i_ce ) const; 138 139 void write_ManualLinks( 140 Xml::Element & o_screen, 141 const client & i_ce ) const; 142 private: 143 // Dummy does nothing 144 virtual void produce_MemberDetails( 145 HF_SubTitleTable & o_table, 146 const client & i_ce ) const; 147 void recursive_ShowBases( 148 Xml::Element & o_screen, 149 type_id i_baseType, 150 int & io_nDepth ) const; 151 type_id baseOf( 152 const client & i_ce ) const 153 { return inq_BaseOf(i_ce); } 154 virtual type_id inq_BaseOf( 155 const client & i_ce ) const; 156 }; 157 158 159 extern const String 160 C_sCellStyle_SummaryLeft; 161 extern const String 162 C_sCellStyle_SummaryRight; 163 extern const String 164 C_sCellStyle_MDetail; 165 extern const String 166 C_sMemberTitle; 167 168 169 #endif 170