From 0a8b6ce2325aff3ecb50386b74e7aa8227b50efe Mon Sep 17 00:00:00 2001 From: Michi Henning Date: Wed, 24 Jan 2007 06:42:18 +0000 Subject: *** empty log message *** --- cpp/src/slice2html/Gen.cpp | 44 +++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 43 insertions(+), 1 deletion(-) (limited to 'cpp/src/slice2html/Gen.cpp') diff --git a/cpp/src/slice2html/Gen.cpp b/cpp/src/slice2html/Gen.cpp index 9182d73e3f4..3c694561ec7 100644 --- a/cpp/src/slice2html/Gen.cpp +++ b/cpp/src/slice2html/Gen.cpp @@ -35,7 +35,7 @@ void generate(const UnitPtr& unit, const string& dir, const string& header, const string& footer, const string& indexHeader, const string& indexFooter, - const string& imageDir, const string& logoURL, unsigned indexCount, unsigned warnSummary) + const string& imageDir, const string& logoURL, const string& searchAction, unsigned indexCount, unsigned warnSummary) { unit->mergeModules(); @@ -50,6 +50,7 @@ generate(const UnitPtr& unit, const string& dir, GeneratorBase::setFooter(footer); GeneratorBase::setImageDir(imageDir); GeneratorBase::setLogoURL(logoURL); + GeneratorBase::setSearchAction(searchAction); GeneratorBase::setIndexCount(indexCount); GeneratorBase::warnSummary(warnSummary); @@ -95,6 +96,7 @@ string Slice::GeneratorBase::_header2; string Slice::GeneratorBase::_footer; string Slice::GeneratorBase::_imageDir; string Slice::GeneratorBase::_logoURL; +string Slice::GeneratorBase::_searchAction; unsigned Slice::GeneratorBase::_indexCount = 0; unsigned Slice::GeneratorBase::_warnSummary = 0; ContainedList Slice::GeneratorBase::_symbols; @@ -154,6 +156,15 @@ Slice::GeneratorBase::setLogoURL(const string& logoURL) _logoURL = logoURL; } +// +// Set search action, if any. +// +void +Slice::GeneratorBase::setSearchAction(const string& searchAction) +{ + _searchAction = searchAction; +} + // // Set the threshold at which we start generating sub-indexes. // If a page has fewer entries than this, we don't generate a @@ -728,11 +739,40 @@ Slice::GeneratorBase::printHeaderFooter(const ContainedPtr& c) end(); end(); + printSearch(); + printLogo(c, container, onEnumPage); end(); } +void +Slice::GeneratorBase::printSearch() +{ + if(!_searchAction.empty()) + { + _out << nl << "
"; + _out.inc(); + start("table", "SearchTable"); + start("tr"); + start("td"); + _out << nl << "
"; + _out.inc(); + start("div"); + _out << nl << ""; + _out << nl << ""; + end(); + _out.dec(); + _out << nl << "
"; + end(); + end(); + end(); + _out.dec(); + _out << nl << "
"; + } +} + void Slice::GeneratorBase::printLogo(const ContainedPtr& c, const ContainerPtr& container, bool forEnum) { @@ -1544,6 +1584,8 @@ Slice::StartPageGenerator::printHeaderFooter() end(); end(); + printSearch(); + if(!imageDir.empty()) { start("table", "LogoTable"); -- cgit v1.2.3