summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDimitri van Heesch <doxygen@gmail.com>2021-05-09 18:00:27 (GMT)
committerDimitri van Heesch <doxygen@gmail.com>2021-05-09 18:00:27 (GMT)
commitcd998a7164e30cee896cccd190846b79ebb4355f (patch)
tree36228200640a1cf5e57979b0e755c9d10200d320 /src
parent57ef51ac1d1917f46cd36a9f75aa81bc9c4d086d (diff)
downloadDoxygen-cd998a7164e30cee896cccd190846b79ebb4355f.zip
Doxygen-cd998a7164e30cee896cccd190846b79ebb4355f.tar.gz
Doxygen-cd998a7164e30cee896cccd190846b79ebb4355f.tar.bz2
Reintroducing the sidebar layout via new FULL_SIDEBAR option.
- This new page layout is only enabled if DISABLE_INDEX=YES, GENERATE_TREEVIEW=YES, and FULL_SIDEBAR=YES.
Diffstat (limited to 'src')
-rw-r--r--src/config.xml34
-rw-r--r--src/htmlgen.cpp22
2 files changed, 42 insertions, 14 deletions
diff --git a/src/config.xml b/src/config.xml
index be890c3..1527601 100644
--- a/src/config.xml
+++ b/src/config.xml
@@ -1914,21 +1914,25 @@ doxygen -w html new_header.html new_footer.html new_stylesheet.css YourConfigFil
The following block names are supported:
<dl>
<dt><code>DISABLE_INDEX</code><dd>Content within this block is copied to the output
- when the \ref cfg_disable_index "DISABLE_INDEX" option is enabled (so when the index is disabled).
+ if the \ref cfg_disable_index "DISABLE_INDEX" option is enabled (so when the index is disabled).
<dt><code>GENERATE_TREEVIEW</code><dd>Content within this block is copied to the output
- when the \ref cfg_generate_treeview "GENERATE_TREEVIEW" option is enabled.
+ if the \ref cfg_generate_treeview "GENERATE_TREEVIEW" option is enabled.
<dt><code>SEARCHENGINE</code><dd>Content within this block is copied to the output
- when the \ref cfg_searchengine "SEARCHENGINE" option is enabled.
+ if the \ref cfg_searchengine "SEARCHENGINE" option is enabled.
<dt><code>PROJECT_NAME</code><dd>Content within the block is copied to the output
- when the \ref cfg_project_name "PROJECT_NAME" option is not empty.
+ if the \ref cfg_project_name "PROJECT_NAME" option is not empty.
<dt><code>PROJECT_NUMBER</code><dd>Content within the block is copied to the output
- when the \ref cfg_project_number "PROJECT_NUMBER" option is not empty.
+ if the \ref cfg_project_number "PROJECT_NUMBER" option is not empty.
<dt><code>PROJECT_BRIEF</code><dd>Content within the block is copied to the output
- when the \ref cfg_project_brief "PROJECT_BRIEF" option is not empty.
+ if the \ref cfg_project_brief "PROJECT_BRIEF" option is not empty.
<dt><code>PROJECT_LOGO</code><dd>Content within the block is copied to the output
- when the \ref cfg_project_logo "PROJECT_LOGO" option is not empty.
+ if the \ref cfg_project_logo "PROJECT_LOGO" option is not empty.
+ <dt><code>FULL_SIDEBAR</code><dd>Content within the block is copied to the output
+ if the \ref cfg_full_sidebar "FULL_SIDEBAR",
+ \ref cfg_disable_index "DISABLE_INDEX" and \ref cfg_generate_treeview "GENERATE_TREEVIEW"
+ options are all enabled.
<dt><code>TITLEAREA</code><dd>Content within this block is copied to the output
- when a title is visible at the top of each page. This is the case
+ if a title is visible at the top of each page. This is the case
if either \ref cfg_project_name "PROJECT_NAME",
\ref cfg_project_brief "PROJECT_BRIEF", \ref cfg_project_logo "PROJECT_LOGO"
is filled in or if both \ref cfg_disable_index "DISABLE_INDEX" and
@@ -2391,7 +2395,21 @@ The \c DOCSET_PUBLISHER_NAME tag identifies the documentation publisher.
]]>
</docs>
</option>
+ <option type='bool' id='FULL_SIDEBAR' defval='0' depends='GENERATE_HTML'>
+ <docs>
+<![CDATA[
+ When both \c GENERATE_TREEVIEW and \c DISABLE_INDEX are set to YES, then the
+ \c FULL_SIDEBAR option determines if the side bar is limited to only the
+ treeview area (value \c NO) or if it should extend to the full height of the
+ window (value \c YES). Setting this to \c YES gives a layout similar to
+ https://docs.readthedocs.io with more room for contents,
+ but less room for the project logo, title, and description.
+ If either \c GENERATOR_TREEVIEW or \c DISABLE_INDEX is set to \c NO, this option
+ has no effect.
+]]>
+ </docs>
+ </option>
<option type='int' id='ENUM_VALUES_PER_LINE' minval='0' maxval='20' defval='4' depends='GENERATE_HTML'>
<docs>
<![CDATA[
diff --git a/src/htmlgen.cpp b/src/htmlgen.cpp
index fe00948..ad8782b 100644
--- a/src/htmlgen.cpp
+++ b/src/htmlgen.cpp
@@ -338,6 +338,7 @@ static QCString substituteHtmlKeywords(const QCString &str,
bool hasProjectNumber = !Config_getString(PROJECT_NUMBER).isEmpty();
bool hasProjectBrief = !Config_getString(PROJECT_BRIEF).isEmpty();
bool hasProjectLogo = !Config_getString(PROJECT_LOGO).isEmpty();
+ bool hasFullSideBar = Config_getBool(FULL_SIDEBAR) && disableIndex && treeView;
static bool titleArea = (hasProjectName || hasProjectBrief || hasProjectLogo || (disableIndex && searchEngine));
cssFile = Config_getString(HTML_STYLESHEET);
@@ -563,6 +564,7 @@ static QCString substituteHtmlKeywords(const QCString &str,
result = substitute(result,"$relpath^",relPath); //<-- must be last
// additional HTML only conditional blocks
+ result = selectBlock(result,"FULL_SIDEBAR",hasFullSideBar,OutputGenerator::Html);
result = selectBlock(result,"DISABLE_INDEX",disableIndex,OutputGenerator::Html);
result = selectBlock(result,"GENERATE_TREEVIEW",treeView,OutputGenerator::Html);
result = selectBlock(result,"SEARCHENGINE",searchEngine,OutputGenerator::Html);
@@ -1072,7 +1074,14 @@ void HtmlGenerator::writeSearchData(const QCString &dname)
QCString searchCss;
if (Config_getBool(DISABLE_INDEX))
{
- searchCss = mgr.getAsString("search_nomenu.css");
+ if (Config_getBool(GENERATE_TREEVIEW) && Config_getBool(FULL_SIDEBAR))
+ {
+ searchCss = mgr.getAsString("search_sidebar.css");
+ }
+ else
+ {
+ searchCss = mgr.getAsString("search_nomenu.css");
+ }
}
else if (!Config_getBool(HTML_DYNAMIC_MENUS))
{
@@ -1082,6 +1091,7 @@ void HtmlGenerator::writeSearchData(const QCString &dname)
{
searchCss = mgr.getAsString("search.css");
}
+ searchCss += mgr.getAsString("search_common.css");
searchCss = substitute(replaceColorMarkers(searchCss),"$doxygenversion",getDoxygenVersion());
t << searchCss;
Doxygen::indexList->addStyleSheetFile("search/search.css");
@@ -2559,11 +2569,11 @@ QCString HtmlGenerator::writeSplitBarAsString(const QCString &name,const QCStrin
// write split bar
if (generateTreeView)
{
- //if (!Config_getBool(DISABLE_INDEX))
- //{
- result += QCString(
- "<div id=\"side-nav\" class=\"ui-resizable side-nav-resizable\">\n");
- //}
+ if (!Config_getBool(DISABLE_INDEX) || !Config_getBool(FULL_SIDEBAR))
+ {
+ result += QCString(
+ "<div id=\"side-nav\" class=\"ui-resizable side-nav-resizable\">\n");
+ }
result+= QCString(
" <div id=\"nav-tree\">\n"
" <div id=\"nav-tree-contents\">\n"