パソコンでプログラミングしよう ウィンドウズC++プログラミング環境の構築
1.6.3.6(15)
ソースコード(Doxygenカスタマイズ)

設定ファイル(Doxyfile)以外のDoxygenカスタマイズファイルサンプルを示す。

Doxygenカスタマイズファイル

本サイトはDoxyfile以外にも以下のDoxygenカスタマイズファイルを用いる。

  • ヘッダHTMLファイル(my_header.html)
  • フッタHTMLファイル(my_footer.html)
  • カスケードスタイルシートファイル(my_customdoxygen.css)
  • レイアウトファイル(my_layout.xml)

ファイルが日本語を含む場合、文字コードは全てUTF-8とする。全てサイト作成者の好みでカスタマイズされている。

ヘッダHTMLファイル

各HTMLファイルの先頭に挿入されページのヘッダ部分を定義する。

my_header.html

<!-- HTML header for doxygen 1.8.11-->
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" lang="ja">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="generator" content="Doxygen $doxygenversion"/>
<!--BEGIN PROJECT_NAME--><title>$projectname: $title</title><!--END PROJECT_NAME-->
<!--BEGIN !PROJECT_NAME--><title>$title</title><!--END !PROJECT_NAME-->
<link href="$relpath^tabs.css" rel="stylesheet" type="text/css"/>
<link href="$relpath^favicon.ico" rel="shortcut icon" type="image/vnd.microsoft.icon"/>
<script type="text/javascript" src="$relpath^jquery.js"></script>
<script type="text/javascript" src="$relpath^dynsections.js"></script>
$treeview
$search
$mathjax
<link href="$relpath^$stylesheet" rel="stylesheet" type="text/css" />
$extrastylesheet
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<!--BEGIN TITLEAREA-->
<div id="titlearea">
<table cellspacing="0" cellpadding="0" width="100%">
<tbody>
<tr>
<!--BEGIN PROJECT_LOGO-->
<td id="projectlogo"><img alt="Logo" src="$relpath^$projectlogo"/></td>
<!--END PROJECT_LOGO-->
<td id="projectalign" style="padding-left: 0.5em;">
<table cellpadding="0" cellpadding="0" width="100%">
<tr><td id="projectname" rowspan="2" >$projectname </td>
<td id="projectbrief" style="text-align:right">$projectbrief </td></tr>
<tr><td id="projectnumber" style="text-align:right">$projectnumber</td></tr>
</table>
</td>
</tr>
</tbody>
</table>
</div>
<!--END TITLEAREA-->
<!-- end header part -->

フッタHTMLファイル

各HTMLファイルの末尾に挿入されページのフッタ部分を定義する。

my_footer.html

<!-- HTML footer for doxygen 1.8.11-->
<!-- start footer part -->
<!--BEGIN GENERATE_TREEVIEW-->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
<ul>
$navpath
<li class="footer">$datetime &#160;
<a href="http://www.doxygen.org/index.html">Doxygen</a> $doxygenversion</li>
</ul>
</div>
<!--END GENERATE_TREEVIEW-->
<!--BEGIN !GENERATE_TREEVIEW-->
<hr class="footer"/><address class="footer"><small>
$datetime &#160;<a href="http://www.doxygen.org/index.html">Doxygen</a> $doxygenversion
</small></address>
<!--END !GENERATE_TREEVIEW-->
</body>
</html>

カスケードスタイルシートファイル

各HTMLファイルの使用するスタイルを定義する。

my_customdoxygen.css

/* The extra CSS for doxygen 1.8.11 */
/* Developed by Takeshi Kodama for study 19-Nov-2018 */
/* Modified by Takeshi Kodama for Kodama-Developed-Web 31-Jan-2019 */
/* General */
body, table, div, p, dl {
font: normal 14px/22px Roboto,sans-serif;
}
#nav-tree .label {
font: normal 14px/22px Roboto,sans-serif;
}
div.toc h3, div.toc a {
font: normal 12px/12px Roboto,sans-serif;
}
h1, h2, h3, h4, h5, h6 {
font-size: 18px;
border-style: none none solid none;
border-width: 1px;
}
h2, h3, h4, h5, h6 {
font-size: 16px;
border-style: none none dotted none;
}
h3, h4, h5, h6 {
font-size: 14px;
border-style: none none none none;
font-weight: normal;
text-decoration: underline;
}
.title {
font-size: 20px;
margin: 0px 0px;
}
/* Project name */
#titlearea {
color: white;
background-color: darkolivegreen;
}
#projectbrief {
font: normal 12px/12px Roboto,sans-serif;
padding: 4px 0px 0px 0px
}
#projectname {
font: bold 20px Roboto,sans-serif;
}
#projectnumber {
font: normal 12px/12px Roboto,sans-serif;
padding: 0px 0px 4px 0px
}
/* Tabs */
.tabs, .tabs2, .tabs3 {
font: normal 14px Roboto,sans-serif;
}
.tablist li {
line-height: 26px;
}
.tablist a {
height: auto;
padding: 0px 10px;
}
/* Search box */
/* (#MsertchBox width)-(#MSearchField width)=59px */
#MSearchBox {
margin-top: 2px;
width: 200px;
}
#MSearchField {
width: 141px;
font: normal 14px Roboto,sans-serif;
}
.SelectItem {
font: normal 14px Roboto,sans-serif;
}
/* The following are for the search result font size but do not work. */
.SREntry {
font: normal 14px Roboto,sans-serif;
}
.SRPage .SREntry {
font: normal 14px Roboto,sans-serif;
}
.SRPage .SRStatus {
font: normal 14px Roboto,sans-serif;
font-style: italic;
}
/* Changing window size of the search result does work on the othr hand */
iframe#MSearchResults {
width: 80ex;
height: 15em;
}
/* Footer */
/* If footer logo image height is larger than 26px, .navpath ul height must be
also set to 26px. */
.navpath ul {
font: normal 14px Roboto,sans-serif;
background-position: 0px 0px;
height: auto;
}
.navpath li {
/*line-height: 26px;*/
line-height: auto;
}
.navpath li.navelem a {
height: auto;
}
.navpath li.footer {
font: normal 12px Roboto,sans-serif;
padding-right:2px;
}
/* Kodama customization */
.my_question {
color: red;
}
/* Prohibit code block continuous line indentation */
div.line {
text-indent: 0px;
padding-left:0px;
}

レイアウトファイル

各HTMLファイルのレイアウトを定義する。

my_layout.xml

<doxygenlayout version="1.0">
<!-- Generated by doxygen $doxygenversion -->
<!-- Navigation index tabs for HTML output -->
<navindex>
<tab type="mainpage" visible="yes" title="緒言"/>
<tab type="pages" visible="yes" title="記事" intro="記事見出しを要約と共に一覧する。"/>
<tab type="modules" visible="yes" title="" intro=""/>
<tab type="namespaces" visible="yes" title="">
<tab type="namespacelist" visible="yes" title="" intro=""/>
<tab type="namespacemembers" visible="yes" title="" intro=""/>
</tab>
<tab type="interfaces" visible="yes" title="">
<tab type="interfacelist" visible="yes" title="" intro=""/>
<tab type="interfaceindex" visible="$ALPHABETICAL_INDEX" title=""/>
<tab type="interfacehierarchy" visible="yes" title="" intro=""/>
</tab>
<tab type="classes" visible="yes" title="">
<tab type="classlist" visible="yes" title="" intro=""/>
<tab type="classindex" visible="$ALPHABETICAL_INDEX" title=""/>
<tab type="hierarchy" visible="yes" title="" intro=""/>
<tab type="classmembers" visible="yes" title="" intro=""/>
</tab>
<tab type="structs" visible="yes" title="">
<tab type="structlist" visible="yes" title="" intro=""/>
<tab type="structindex" visible="$ALPHABETICAL_INDEX" title=""/>
</tab>
<tab type="exceptions" visible="yes" title="">
<tab type="exceptionlist" visible="yes" title="" intro=""/>
<tab type="exceptionindex" visible="$ALPHABETICAL_INDEX" title=""/>
<tab type="exceptionhierarchy" visible="yes" title="" intro=""/>
</tab>
<tab type="files" visible="yes" title="">
<tab type="filelist" visible="yes" title="" intro=""/>
<tab type="globals" visible="yes" title="" intro=""/>
</tab>
<tab type="examples" visible="yes" title="" intro=""/>
</navindex>
<!-- Layout definition for a class page -->
<class>
<briefdescription visible="yes"/>
<includes visible="$SHOW_INCLUDE_FILES"/>
<inheritancegraph visible="$CLASS_GRAPH"/>
<collaborationgraph visible="$COLLABORATION_GRAPH"/>
<memberdecl>
<nestedclasses visible="yes" title=""/>
<publictypes title=""/>
<services title=""/>
<interfaces title=""/>
<publicslots title=""/>
<signals title=""/>
<publicmethods title=""/>
<publicstaticmethods title=""/>
<publicattributes title=""/>
<publicstaticattributes title=""/>
<protectedtypes title=""/>
<protectedslots title=""/>
<protectedmethods title=""/>
<protectedstaticmethods title=""/>
<protectedattributes title=""/>
<protectedstaticattributes title=""/>
<packagetypes title=""/>
<packagemethods title=""/>
<packagestaticmethods title=""/>
<packageattributes title=""/>
<packagestaticattributes title=""/>
<properties title=""/>
<events title=""/>
<privatetypes title=""/>
<privateslots title=""/>
<privatemethods title=""/>
<privatestaticmethods title=""/>
<privateattributes title=""/>
<privatestaticattributes title=""/>
<friends title=""/>
<related title="" subtitle=""/>
<membergroups visible="yes"/>
</memberdecl>
<detaileddescription title=""/>
<memberdef>
<inlineclasses title=""/>
<typedefs title=""/>
<enums title=""/>
<services title=""/>
<interfaces title=""/>
<constructors title=""/>
<functions title=""/>
<related title=""/>
<variables title=""/>
<properties title=""/>
<events title=""/>
</memberdef>
<allmemberslink visible="yes"/>
<usedfiles visible="$SHOW_USED_FILES"/>
<authorsection visible="yes"/>
</class>
<!-- Layout definition for a namespace page -->
<namespace>
<briefdescription visible="yes"/>
<memberdecl>
<nestednamespaces visible="yes" title=""/>
<constantgroups visible="yes" title=""/>
<interfaces visible="yes" title=""/>
<classes visible="yes" title=""/>
<structs visible="yes" title=""/>
<exceptions visible="yes" title=""/>
<typedefs title=""/>
<sequences title=""/>
<dictionaries title=""/>
<enums title=""/>
<functions title=""/>
<variables title=""/>
<membergroups visible="yes"/>
</memberdecl>
<detaileddescription title=""/>
<memberdef>
<inlineclasses title=""/>
<typedefs title=""/>
<sequences title=""/>
<dictionaries title=""/>
<enums title=""/>
<functions title=""/>
<variables title=""/>
</memberdef>
<authorsection visible="yes"/>
</namespace>
<!-- Layout definition for a file page -->
<file>
<briefdescription visible="yes"/>
<includes visible="$SHOW_INCLUDE_FILES"/>
<includegraph visible="$INCLUDE_GRAPH"/>
<includedbygraph visible="$INCLUDED_BY_GRAPH"/>
<sourcelink visible="yes"/>
<memberdecl>
<interfaces visible="yes" title=""/>
<classes visible="yes" title=""/>
<structs visible="yes" title=""/>
<exceptions visible="yes" title=""/>
<namespaces visible="yes" title=""/>
<constantgroups visible="yes" title=""/>
<defines title=""/>
<typedefs title=""/>
<sequences title=""/>
<dictionaries title=""/>
<enums title=""/>
<functions title=""/>
<variables title=""/>
<membergroups visible="yes"/>
</memberdecl>
<detaileddescription title=""/>
<memberdef>
<inlineclasses title=""/>
<defines title=""/>
<typedefs title=""/>
<sequences title=""/>
<dictionaries title=""/>
<enums title=""/>
<functions title=""/>
<variables title=""/>
</memberdef>
<authorsection/>
</file>
<!-- Layout definition for a group page -->
<group>
<briefdescription visible="yes"/>
<groupgraph visible="$GROUP_GRAPHS"/>
<memberdecl>
<nestedgroups visible="yes" title=""/>
<dirs visible="yes" title=""/>
<files visible="yes" title=""/>
<namespaces visible="yes" title=""/>
<classes visible="yes" title=""/>
<defines title=""/>
<typedefs title=""/>
<sequences title=""/>
<dictionaries title=""/>
<enums title=""/>
<enumvalues title=""/>
<functions title=""/>
<variables title=""/>
<signals title=""/>
<publicslots title=""/>
<protectedslots title=""/>
<privateslots title=""/>
<events title=""/>
<properties title=""/>
<friends title=""/>
<membergroups visible="yes"/>
</memberdecl>
<detaileddescription title=""/>
<memberdef>
<pagedocs/>
<inlineclasses title=""/>
<defines title=""/>
<typedefs title=""/>
<sequences title=""/>
<dictionaries title=""/>
<enums title=""/>
<enumvalues title=""/>
<functions title=""/>
<variables title=""/>
<signals title=""/>
<publicslots title=""/>
<protectedslots title=""/>
<privateslots title=""/>
<events title=""/>
<properties title=""/>
<friends title=""/>
</memberdef>
<authorsection visible="yes"/>
</group>
<!-- Layout definition for a directory page -->
<directory>
<briefdescription visible="yes"/>
<directorygraph visible="yes"/>
<memberdecl>
<dirs visible="yes"/>
<files visible="yes"/>
</memberdecl>
<detaileddescription title=""/>
</directory>
</doxygenlayout>