1*cdf0e10cSrcweir /************************************************************************* 2*cdf0e10cSrcweir * 3*cdf0e10cSrcweir * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4*cdf0e10cSrcweir * 5*cdf0e10cSrcweir * Copyright 2000, 2010 Oracle and/or its affiliates. 6*cdf0e10cSrcweir * 7*cdf0e10cSrcweir * OpenOffice.org - a multi-platform office productivity suite 8*cdf0e10cSrcweir * 9*cdf0e10cSrcweir * This file is part of OpenOffice.org. 10*cdf0e10cSrcweir * 11*cdf0e10cSrcweir * OpenOffice.org is free software: you can redistribute it and/or modify 12*cdf0e10cSrcweir * it under the terms of the GNU Lesser General Public License version 3 13*cdf0e10cSrcweir * only, as published by the Free Software Foundation. 14*cdf0e10cSrcweir * 15*cdf0e10cSrcweir * OpenOffice.org is distributed in the hope that it will be useful, 16*cdf0e10cSrcweir * but WITHOUT ANY WARRANTY; without even the implied warranty of 17*cdf0e10cSrcweir * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18*cdf0e10cSrcweir * GNU Lesser General Public License version 3 for more details 19*cdf0e10cSrcweir * (a copy is included in the LICENSE file that accompanied this code). 20*cdf0e10cSrcweir * 21*cdf0e10cSrcweir * You should have received a copy of the GNU Lesser General Public License 22*cdf0e10cSrcweir * version 3 along with OpenOffice.org. If not, see 23*cdf0e10cSrcweir * <http://www.openoffice.org/license.html> 24*cdf0e10cSrcweir * for a copy of the LGPLv3 License. 25*cdf0e10cSrcweir * 26*cdf0e10cSrcweir ************************************************************************/ 27*cdf0e10cSrcweir 28*cdf0e10cSrcweir #ifndef ADC_DISPLAY_HTML_HD_CHLST_HXX 29*cdf0e10cSrcweir #define ADC_DISPLAY_HTML_HD_CHLST_HXX 30*cdf0e10cSrcweir 31*cdf0e10cSrcweir // BASE CLASSES 32*cdf0e10cSrcweir #include <ary/ary_disp.hxx> 33*cdf0e10cSrcweir #include <cosv/tpl/processor.hxx> 34*cdf0e10cSrcweir 35*cdf0e10cSrcweir // USED SERVICES 36*cdf0e10cSrcweir #include <ary/cpp/c_types4cpp.hxx> 37*cdf0e10cSrcweir #include "hdimpl.hxx" 38*cdf0e10cSrcweir 39*cdf0e10cSrcweir 40*cdf0e10cSrcweir 41*cdf0e10cSrcweir namespace ary 42*cdf0e10cSrcweir { 43*cdf0e10cSrcweir namespace cpp 44*cdf0e10cSrcweir { 45*cdf0e10cSrcweir class Namespace; 46*cdf0e10cSrcweir class Class; 47*cdf0e10cSrcweir class Enum; 48*cdf0e10cSrcweir class Typedef; 49*cdf0e10cSrcweir class Function; 50*cdf0e10cSrcweir class Variable; 51*cdf0e10cSrcweir class EnumValue; 52*cdf0e10cSrcweir } 53*cdf0e10cSrcweir namespace info 54*cdf0e10cSrcweir { 55*cdf0e10cSrcweir class DocuText; 56*cdf0e10cSrcweir } 57*cdf0e10cSrcweir } 58*cdf0e10cSrcweir 59*cdf0e10cSrcweir class Docu_Display; 60*cdf0e10cSrcweir class ProtectionArea; 61*cdf0e10cSrcweir 62*cdf0e10cSrcweir class ChildList_Display : public ary::Display, 63*cdf0e10cSrcweir public csv::ConstProcessor<ary::cpp::Namespace>, 64*cdf0e10cSrcweir public csv::ConstProcessor<ary::cpp::Class>, 65*cdf0e10cSrcweir public csv::ConstProcessor<ary::cpp::Enum>, 66*cdf0e10cSrcweir public csv::ConstProcessor<ary::cpp::Typedef>, 67*cdf0e10cSrcweir public csv::ConstProcessor<ary::cpp::Function>, 68*cdf0e10cSrcweir public csv::ConstProcessor<ary::cpp::Variable>, 69*cdf0e10cSrcweir public csv::ConstProcessor<ary::cpp::EnumValue>, 70*cdf0e10cSrcweir private HtmlDisplay_Impl 71*cdf0e10cSrcweir { 72*cdf0e10cSrcweir public: 73*cdf0e10cSrcweir struct Area_Result 74*cdf0e10cSrcweir { 75*cdf0e10cSrcweir bool & rChildrenExist; 76*cdf0e10cSrcweir csi::xml::Element & rOut; 77*cdf0e10cSrcweir 78*cdf0e10cSrcweir Area_Result( 79*cdf0e10cSrcweir bool & o_rChildrenExist, 80*cdf0e10cSrcweir csi::xml::Element & o_rOut ) 81*cdf0e10cSrcweir : rChildrenExist(o_rChildrenExist), 82*cdf0e10cSrcweir rOut(o_rOut) {} 83*cdf0e10cSrcweir }; 84*cdf0e10cSrcweir 85*cdf0e10cSrcweir 86*cdf0e10cSrcweir ChildList_Display( 87*cdf0e10cSrcweir OuputPage_Environment & 88*cdf0e10cSrcweir io_rEnv ); 89*cdf0e10cSrcweir ChildList_Display( 90*cdf0e10cSrcweir OuputPage_Environment & 91*cdf0e10cSrcweir io_rEnv, 92*cdf0e10cSrcweir const ary::cpp::Class & 93*cdf0e10cSrcweir i_rClass ); 94*cdf0e10cSrcweir ChildList_Display( 95*cdf0e10cSrcweir OuputPage_Environment & 96*cdf0e10cSrcweir io_rEnv, 97*cdf0e10cSrcweir const ary::cpp::Enum & 98*cdf0e10cSrcweir i_rEnum ); 99*cdf0e10cSrcweir 100*cdf0e10cSrcweir virtual ~ChildList_Display(); 101*cdf0e10cSrcweir 102*cdf0e10cSrcweir void Run_Simple( 103*cdf0e10cSrcweir Area_Result & o_rResult, 104*cdf0e10cSrcweir ary::SlotAccessId i_nSlot, 105*cdf0e10cSrcweir const char * i_sListLabel, 106*cdf0e10cSrcweir const char * i_sListTitle ); 107*cdf0e10cSrcweir void Run_GlobalClasses( 108*cdf0e10cSrcweir Area_Result & o_rResult, 109*cdf0e10cSrcweir ary::SlotAccessId i_nSlot, 110*cdf0e10cSrcweir const char * i_sListLabel, 111*cdf0e10cSrcweir const char * i_sListTitle, 112*cdf0e10cSrcweir ary::cpp::E_ClassKey 113*cdf0e10cSrcweir i_eFilter ); 114*cdf0e10cSrcweir void Run_Members( 115*cdf0e10cSrcweir Area_Result & o_rResult_public, 116*cdf0e10cSrcweir Area_Result & o_rResult_protected, 117*cdf0e10cSrcweir Area_Result & o_rResult_private, 118*cdf0e10cSrcweir ary::SlotAccessId i_nSlot, 119*cdf0e10cSrcweir const char * i_sListLabel_public, 120*cdf0e10cSrcweir const char * i_sListLabel_protected, 121*cdf0e10cSrcweir const char * i_sListLabel_private, 122*cdf0e10cSrcweir const char * i_sListTitle ); 123*cdf0e10cSrcweir void Run_MemberClasses( 124*cdf0e10cSrcweir Area_Result & o_rResult_public, 125*cdf0e10cSrcweir Area_Result & o_rResult_protected, 126*cdf0e10cSrcweir Area_Result & o_rResult_private, 127*cdf0e10cSrcweir ary::SlotAccessId i_nSlot, 128*cdf0e10cSrcweir const char * i_sListLabel_public, 129*cdf0e10cSrcweir const char * i_sListLabel_protected, 130*cdf0e10cSrcweir const char * i_sListLabel_private, 131*cdf0e10cSrcweir const char * i_sListTitle, 132*cdf0e10cSrcweir ary::cpp::E_ClassKey 133*cdf0e10cSrcweir i_eFilter ); 134*cdf0e10cSrcweir private: 135*cdf0e10cSrcweir // Interface csv::ConstProcessor<>: 136*cdf0e10cSrcweir virtual void do_Process( 137*cdf0e10cSrcweir const ary::cpp::Namespace & 138*cdf0e10cSrcweir i_rData ); 139*cdf0e10cSrcweir /** i_rData is shown only, if it passes two filters: 140*cdf0e10cSrcweir it must have the right protection, checked with pFilter, 141*cdf0e10cSrcweir and the right class key (class,struct,union), checked with 142*cdf0e10cSrcweir pClassFilter. A not exsting filter allows i_rData to be 143*cdf0e10cSrcweir displayed. 144*cdf0e10cSrcweir */ 145*cdf0e10cSrcweir virtual void do_Process( 146*cdf0e10cSrcweir const ary::cpp::Class & 147*cdf0e10cSrcweir i_rData ); 148*cdf0e10cSrcweir virtual void do_Process( 149*cdf0e10cSrcweir const ary::cpp::Enum & 150*cdf0e10cSrcweir i_rData ); 151*cdf0e10cSrcweir virtual void do_Process( 152*cdf0e10cSrcweir const ary::cpp::Typedef & 153*cdf0e10cSrcweir i_rData ); 154*cdf0e10cSrcweir virtual void do_Process( 155*cdf0e10cSrcweir const ary::cpp::Function & 156*cdf0e10cSrcweir i_rData ); 157*cdf0e10cSrcweir virtual void do_Process( 158*cdf0e10cSrcweir const ary::cpp::Variable & 159*cdf0e10cSrcweir i_rData ); 160*cdf0e10cSrcweir virtual void do_Process( 161*cdf0e10cSrcweir const ary::cpp::EnumValue & 162*cdf0e10cSrcweir i_rData ); 163*cdf0e10cSrcweir private: 164*cdf0e10cSrcweir // Interface ary::Display: 165*cdf0e10cSrcweir virtual void do_StartSlot(); 166*cdf0e10cSrcweir virtual void do_FinishSlot(); 167*cdf0e10cSrcweir virtual const ary::cpp::Gate * 168*cdf0e10cSrcweir inq_Get_ReFinder() const; 169*cdf0e10cSrcweir // Locals 170*cdf0e10cSrcweir struct S_AreaCo; 171*cdf0e10cSrcweir void Write_ListItem( 172*cdf0e10cSrcweir const String & i_sLeftText, 173*cdf0e10cSrcweir const char * i_sLink, 174*cdf0e10cSrcweir const ary::info::DocuText & 175*cdf0e10cSrcweir i_rRightText, 176*cdf0e10cSrcweir csi::xml::Element & rOut ); 177*cdf0e10cSrcweir const ary::AryGroup & 178*cdf0e10cSrcweir ActiveParent(); 179*cdf0e10cSrcweir ProtectionArea & GetArea(); 180*cdf0e10cSrcweir ProtectionArea & GetArea( 181*cdf0e10cSrcweir ary::cpp::E_Protection 182*cdf0e10cSrcweir i_eProtection ); 183*cdf0e10cSrcweir void SetClassesFilter( 184*cdf0e10cSrcweir ary::cpp::E_ClassKey 185*cdf0e10cSrcweir i_eFilter ) 186*cdf0e10cSrcweir { peClassesFilter = new ary::cpp::E_ClassKey(i_eFilter); } 187*cdf0e10cSrcweir void UnsetClassesFilter() { peClassesFilter = 0; } 188*cdf0e10cSrcweir 189*cdf0e10cSrcweir // DATA 190*cdf0e10cSrcweir Dyn<Docu_Display> pShortDocu_Display; 191*cdf0e10cSrcweir const ary::cpp::Class * 192*cdf0e10cSrcweir pActiveParentClass; 193*cdf0e10cSrcweir const ary::cpp::Enum * 194*cdf0e10cSrcweir pActiveParentEnum; 195*cdf0e10cSrcweir 196*cdf0e10cSrcweir Dyn<S_AreaCo> pSglArea; 197*cdf0e10cSrcweir Dyn<S_AreaCo> aMemberAreas[3]; 198*cdf0e10cSrcweir 199*cdf0e10cSrcweir Dyn<ary::cpp::E_ClassKey> 200*cdf0e10cSrcweir peClassesFilter; 201*cdf0e10cSrcweir }; 202*cdf0e10cSrcweir 203*cdf0e10cSrcweir 204*cdf0e10cSrcweir 205*cdf0e10cSrcweir 206*cdf0e10cSrcweir #endif 207