merge the formfield patch from ooo-build
[ooovba.git] / autodoc / source / display / html / navibar.hxx
blob83f196efc1cc1d622ce0175c23683566500015e9
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: navibar.hxx,v $
10 * $Revision: 1.4 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 #ifndef ADC_DISPLAY_HTML_NAVIBAR_HXX
32 #define ADC_DISPLAY_HTML_NAVIBAR_HXX
34 // BASE CLASSES
35 #include "hdimpl.hxx"
37 namespace ary
39 namespace cpp
41 class CodeEntity;
43 namespace loc
45 class File;
52 /** Creates a HTML navigation bar wth the following parts:
54 A main bar with fixed items.
55 Zero to several subbars with user defined items, depending of
56 the contents of the page.
58 The main bar contains those items:
60 Overview | Namespace | Class | Tree | Project | File | Index | Help
62 class NavigationBar
64 public:
65 enum E_GlobalLocation
67 LOC_Overview,
68 LOC_AllDefs,
69 LOC_Index,
70 LOC_Help
72 enum E_CeGatheringType
74 CEGT_operations,
75 CEGT_data
78 /// Used for Overview, Index and Help.
79 NavigationBar(
80 const OuputPage_Environment &
81 i_rEnv,
82 E_GlobalLocation i_eLocation );
83 /// Used for all Ces except operations and data.
84 NavigationBar(
85 const OuputPage_Environment &
86 i_rEnv,
87 const ary::cpp::CodeEntity &
88 i_rCe );
89 /** Used for operations and data.
91 NavigationBar(
92 const OuputPage_Environment &
93 i_rEnv,
94 E_CeGatheringType i_eCeGatheringType );
95 ~NavigationBar();
97 void MakeSubRow(
98 const char * i_sTitle );
99 void AddItem( /// Items are added to last made sub-row.
100 const char * i_sName,
101 const char * i_sLink,
102 bool i_bValid );
103 /** This writes the main bar and the pSubRowTable to o_rOut.
104 The pSubRowsTable stays in memory and can be filled later,
105 when all SubRow items are known.
107 void Write(
108 csi::xml::Element & o_rOut,
109 bool i_bWithSubRows = false ) const;
110 void Write_SubRows() const;
112 private:
113 struct CheshireCat;
114 Dyn<CheshireCat> pi;
115 csi::html::Table * pSubRowsTable;
121 #endif