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_HTML_NAVIBAR_HXX 29 #define ADC_DISPLAY_HTML_NAVIBAR_HXX 30 31 // BASE CLASSES 32 #include "hdimpl.hxx" 33 34 namespace ary 35 { 36 namespace cpp 37 { 38 class CodeEntity; 39 } 40 namespace loc 41 { 42 class File; 43 } 44 } 45 46 47 48 49 /** Creates a HTML navigation bar wth the following parts: 50 51 A main bar with fixed items. 52 Zero to several subbars with user defined items, depending of 53 the contents of the page. 54 55 The main bar contains those items: 56 57 Overview | Namespace | Class | Tree | Project | File | Index | Help 58 */ 59 class NavigationBar 60 { 61 public: 62 enum E_GlobalLocation 63 { 64 LOC_Overview, 65 LOC_AllDefs, 66 LOC_Index, 67 LOC_Help 68 }; 69 enum E_CeGatheringType 70 { 71 CEGT_operations, 72 CEGT_data 73 }; 74 75 /// Used for Overview, Index and Help. 76 NavigationBar( 77 const OuputPage_Environment & 78 i_rEnv, 79 E_GlobalLocation i_eLocation ); 80 /// Used for all Ces except operations and data. 81 NavigationBar( 82 const OuputPage_Environment & 83 i_rEnv, 84 const ary::cpp::CodeEntity & 85 i_rCe ); 86 /** Used for operations and data. 87 */ 88 NavigationBar( 89 const OuputPage_Environment & 90 i_rEnv, 91 E_CeGatheringType i_eCeGatheringType ); 92 ~NavigationBar(); 93 94 void MakeSubRow( 95 const char * i_sTitle ); 96 void AddItem( /// Items are added to last made sub-row. 97 const char * i_sName, 98 const char * i_sLink, 99 bool i_bValid ); 100 /** This writes the main bar and the pSubRowTable to o_rOut. 101 The pSubRowsTable stays in memory and can be filled later, 102 when all SubRow items are known. 103 */ 104 void Write( 105 csi::xml::Element & o_rOut, 106 bool i_bWithSubRows = false ) const; 107 void Write_SubRows() const; 108 109 private: 110 struct CheshireCat; 111 Dyn<CheshireCat> pi; 112 csi::html::Table * pSubRowsTable; 113 }; 114 115 116 117 118 #endif 119