Skip to content

Commit 1947228

Browse files
committed
Merge pull request #65 from alanquillin/AddInitialAPIReferenceDocs
Added initial HTML API documentation.
2 parents 850bf33 + 8d53089 commit 1947228

2,373 files changed

Lines changed: 65530 additions & 0 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

docs/Docs.txt

Whitespace-only changes.

docs/Documentation.chm

1.58 MB
Binary file not shown.

docs/html/CloseSearch.png

629 Bytes
Loading

docs/html/CollapseAll.bmp

574 Bytes
Binary file not shown.

docs/html/Collapsed.gif

59 Bytes
Loading

docs/html/ExpandAll.bmp

574 Bytes
Binary file not shown.

docs/html/Expanded.gif

56 Bytes
Loading

docs/html/FillNode.aspx

Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
<%@ Page Language="C#" EnableViewState="False" %>
2+
3+
<script runat="server">
4+
//=============================================================================
5+
// System : Sandcastle Help File Builder
6+
// File : FillNode.aspx
7+
// Author : Eric Woodruff (Eric@EWoodruff.us)
8+
// Updated : 04/02/2008
9+
// Note : Copyright 2007-2008, Eric Woodruff, All rights reserved
10+
// Compiler: Microsoft C#
11+
//
12+
// This file contains the code used to dynamically load a parent node with its
13+
// child table of content nodes when first expanded.
14+
//
15+
// This code is published under the Microsoft Public License (Ms-PL). A copy
16+
// of the license should be distributed with the code. It can also be found
17+
// at the project website: http://SHFB.CodePlex.com. This notice, the
18+
// author's name, and all copyright notices must remain intact in all
19+
// applications, documentation, and source files.
20+
//
21+
// Version Date Who Comments
22+
// ============================================================================
23+
// 1.5.0.0 06/21/2007 EFW Created the code
24+
//=============================================================================
25+
26+
protected override void Render(HtmlTextWriter writer)
27+
{
28+
StringBuilder sb = new StringBuilder(10240);
29+
string id, url, target, title;
30+
31+
XPathDocument toc = new XPathDocument(Server.MapPath("WebTOC.xml"));
32+
XPathNavigator navToc = toc.CreateNavigator();
33+
34+
// The ID to use should be passed in the query string
35+
XPathNodeIterator root = navToc.Select("//HelpTOCNode[@Id='" +
36+
this.Request.QueryString["Id"] + "']/*");
37+
38+
if(root.Count == 0)
39+
{
40+
writer.Write("<b>TOC node not found!</b>");
41+
return;
42+
}
43+
44+
foreach(XPathNavigator node in root)
45+
{
46+
if(node.HasChildren)
47+
{
48+
// Write out a parent TOC entry
49+
id = node.GetAttribute("Id", String.Empty);
50+
title = node.GetAttribute("Title", String.Empty);
51+
url = node.GetAttribute("Url", String.Empty);
52+
53+
if(!String.IsNullOrEmpty(url))
54+
target = " target=\"TopicContent\"";
55+
else
56+
{
57+
url = "#";
58+
target = String.Empty;
59+
}
60+
61+
sb.AppendFormat("<div class=\"TreeNode\">\r\n" +
62+
"<img class=\"TreeNodeImg\" " +
63+
"onclick=\"javascript: Toggle(this);\" " +
64+
"src=\"Collapsed.gif\"/><a class=\"UnselectedNode\" " +
65+
"onclick=\"javascript: return Expand(this);\" " +
66+
"href=\"{0}\"{1}>{2}</a>\r\n" +
67+
"<div id=\"{3}\" class=\"Hidden\"></div>\r\n</div>\r\n",
68+
url, target, HttpUtility.HtmlEncode(title), id);
69+
}
70+
else
71+
{
72+
title = node.GetAttribute("Title", String.Empty);
73+
url = node.GetAttribute("Url", String.Empty);
74+
75+
if(String.IsNullOrEmpty(url))
76+
url = "about:blank";
77+
78+
// Write out a TOC entry that has no children
79+
sb.AppendFormat("<div class=\"TreeItem\">\r\n" +
80+
"<img src=\"Item.gif\"/>" +
81+
"<a class=\"UnselectedNode\" " +
82+
"onclick=\"javascript: return SelectNode(this);\" " +
83+
"href=\"{0}\" target=\"TopicContent\">{1}</a>\r\n" +
84+
"</div>\r\n", url, HttpUtility.HtmlEncode(title));
85+
}
86+
}
87+
88+
writer.Write(sb.ToString());
89+
}
90+
</script>

docs/html/FillNode.php

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
<?
2+
// Contributed to the Sandcastle Help File Builder project by Thomas Levesque
3+
4+
header("Content-Type: text/html; charset=utf-8");
5+
$toc = new DOMDocument();
6+
$toc->load('WebTOC.xml');
7+
$xpath = new DOMXPath($toc);
8+
$id = $_GET["Id"];
9+
$nodes = $xpath->query("//HelpTOCNode[@Id='$id']/*");
10+
if ($nodes->length == 0)
11+
{
12+
?>
13+
<b>TOC node not found!</b>
14+
<?
15+
die();
16+
}
17+
foreach($nodes as $node)
18+
{
19+
$id = $node->getAttribute("Id");
20+
$url = $node->getAttribute("Url");
21+
$title = $node->getAttribute("Title");
22+
if (empty($url))
23+
{
24+
$url = "#";
25+
$target = "";
26+
}
27+
else
28+
{
29+
$target = " target=\"TopicContent\"";
30+
}
31+
32+
if ($node->hasChildNodes())
33+
{
34+
?>
35+
<div class="TreeNode">
36+
<img class="TreeNodeImg" onclick="javascript: Toggle(this);" src="Collapsed.gif"/>
37+
<a class="UnselectedNode" onclick="javascript: Expand(this);" href="<?= $url ?>"<?= $target ?>><?= $title ?></a>
38+
<div id="<?= $id ?>" class="Hidden"></div>
39+
</div>
40+
<?
41+
}
42+
else
43+
{
44+
?>
45+
<div class="TreeItem">
46+
<img src="Item.gif"/>
47+
<a class="UnselectedNode" onclick="javascript: SelectNode(this);" href="<?= $url ?>"<?= $target ?>><?= $title ?></a>
48+
</div>
49+
<?
50+
}
51+
}
52+
?>

docs/html/Index.aspx

Lines changed: 157 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,157 @@
1+
<%@ Page Language="C#" EnableViewState="False" %>
2+
3+
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
4+
<html>
5+
6+
<head runat="server">
7+
<title>A Sandcastle Documented Class Library - Table of Content</title>
8+
<link rel="stylesheet" href="TOC.css" />
9+
<link rel="shortcut icon" href="favicon.ico"/>
10+
<script type="text/javascript" src="TOC.js"></script>
11+
</head>
12+
13+
<body onload="javascript: Initialize('.aspx');" onresize="javascript: ResizeTree();">
14+
<form id="IndexForm" runat="server">
15+
16+
<div id="TOCDiv" class="TOCDiv">
17+
18+
<div id="divSearchOpts" class="SearchOpts" style="height: 100px; display: none;">
19+
<img class="TOCLink" onclick="javascript: ShowHideSearch(false);"
20+
src="CloseSearch.png" height="17" width="17" alt="Hide search" style="float: right;"/>
21+
Keyword(s) for which to search:
22+
<input id="txtSearchText" type="text" style="width: 100%;"
23+
onkeypress="javascript: return OnSearchTextKeyPress(event);" /><br />
24+
<input id="chkSortByTitle" type="checkbox" /><label for="chkSortByTitle">&nbsp;Sort results by title</label><br />
25+
<input type="button" value="Search" onclick="javascript: return PerformSearch();" />
26+
</div>
27+
28+
<div id="divIndexOpts" class="IndexOpts" style="height: 25px; display: none;">
29+
<img class="TOCLink" onclick="javascript: ShowHideIndex(false);"
30+
src="CloseSearch.png" height="17" width="17" alt="Hide index" style="float: right;"/>
31+
Keyword Index
32+
</div>
33+
34+
<div id="divNavOpts" class="NavOpts" style="height: 20px;">
35+
<img class="TOCLink" onclick="javascript: SyncTOC();" src="SyncTOC.gif"
36+
height="16" width="16" alt="Sync to TOC"/>
37+
<img class="TOCLink" onclick="javascript: ExpandOrCollapseAll(true);"
38+
src="ExpandAll.bmp" height="16" width="16" alt="Expand all "/>
39+
<img class="TOCLink" onclick="javascript: ExpandOrCollapseAll(false);"
40+
src="CollapseAll.bmp" height="16" width="16" alt="Collapse all" />
41+
<img class="TOCLink" onclick="javascript: ShowHideIndex(true);"
42+
src="Index.gif" height="16" width="16" alt="Index" />
43+
<img class="TOCLink" onclick="javascript: ShowHideSearch(true);"
44+
src="Search.gif" height="16" width="16" alt="Search" />
45+
<a href="#" title="Click to obtain a direct link to the displayed topic"
46+
style="margin-left: 10px; vertical-align: top;"
47+
onclick="javascript: ShowDirectLink();">Direct Link</a>
48+
</div>
49+
50+
<div class="Tree" id="divSearchResults" style="display: none;"
51+
onselectstart="javascript: return false;">
52+
</div>
53+
54+
<div class="Tree" id="divIndexResults" style="display: none;"
55+
onselectstart="javascript: return false;">
56+
</div>
57+
58+
<div class="Tree" id="divTree" onselectstart="javascript: return false;">
59+
<asp:Literal ID="lcTOC" runat="server" />
60+
</div>
61+
62+
</div>
63+
64+
<div id="TOCSizer" class="TOCSizer" onmousedown="OnMouseDown(event)" onselectstart="javascript: return false;"></div>
65+
66+
<iframe id="TopicContent" name="TopicContent" class="TopicContent" src="html/e0730e15-a38d-413a-7cdb-c0eaa3f21919.htm">
67+
This page uses an IFRAME but your browser does not support it.
68+
</iframe>
69+
70+
</form>
71+
72+
</body>
73+
74+
</html>
75+
76+
<script runat="server">
77+
//=============================================================================
78+
// System : Sandcastle Help File Builder
79+
// File : Index.aspx
80+
// Author : Eric Woodruff (Eric@EWoodruff.us)
81+
// Updated : 02/18/2012
82+
// Note : Copyright 2007-2012, Eric Woodruff, All rights reserved
83+
// Compiler: Microsoft C#
84+
//
85+
// This file contains the code used to display the index page for a website
86+
// produced by the help file builder. The root nodes are loaded for the table
87+
// of content. Child nodes are loaded dynamically when first expanded using
88+
// an Ajax call.
89+
//
90+
// This code is published under the Microsoft Public License (Ms-PL). A copy
91+
// of the license should be distributed with the code. It can also be found
92+
// at the project website: http://SHFB.CodePlex.com. This notice, the
93+
// author's name, and all copyright notices must remain intact in all
94+
// applications, documentation, and source files.
95+
//
96+
// Version Date Who Comments
97+
// ============================================================================
98+
// 1.5.0.0 06/21/2007 EFW Created the code
99+
// 1.9.4.0 02/18/2012 EFW Merged code from tom103 to show direct link
100+
//=============================================================================
101+
102+
protected void Page_Load(object sender, EventArgs e)
103+
{
104+
StringBuilder sb = new StringBuilder(10240);
105+
string id, url, target, title;
106+
107+
XPathDocument toc = new XPathDocument(Server.MapPath("WebTOC.xml"));
108+
XPathNavigator navToc = toc.CreateNavigator();
109+
XPathNodeIterator root = navToc.Select("HelpTOC/*");
110+
111+
foreach(XPathNavigator node in root)
112+
{
113+
if(node.HasChildren)
114+
{
115+
// Write out a parent TOC entry
116+
id = node.GetAttribute("Id", String.Empty);
117+
title = node.GetAttribute("Title", String.Empty);
118+
url = node.GetAttribute("Url", String.Empty);
119+
120+
if(!String.IsNullOrEmpty(url))
121+
target = " target=\"TopicContent\"";
122+
else
123+
{
124+
url = "#";
125+
target = String.Empty;
126+
}
127+
128+
sb.AppendFormat("<div class=\"TreeNode\">\r\n" +
129+
"<img class=\"TreeNodeImg\" " +
130+
"onclick=\"javascript: Toggle(this);\" " +
131+
"src=\"Collapsed.gif\"/><a class=\"UnselectedNode\" " +
132+
"onclick=\"javascript: return Expand(this);\" " +
133+
"href=\"{0}\"{1}>{2}</a>\r\n" +
134+
"<div id=\"{3}\" class=\"Hidden\"></div>\r\n</div>\r\n",
135+
url, target, HttpUtility.HtmlEncode(title), id);
136+
}
137+
else
138+
{
139+
title = node.GetAttribute("Title", String.Empty);
140+
url = node.GetAttribute("Url", String.Empty);
141+
142+
if(String.IsNullOrEmpty(url))
143+
url = "about:blank";
144+
145+
// Write out a TOC entry that has no children
146+
sb.AppendFormat("<div class=\"TreeItem\">\r\n" +
147+
"<img src=\"Item.gif\"/>" +
148+
"<a class=\"UnselectedNode\" " +
149+
"onclick=\"javascript: return SelectNode(this);\" " +
150+
"href=\"{0}\" target=\"TopicContent\">{1}</a>\r\n" +
151+
"</div>\r\n", url, HttpUtility.HtmlEncode(title));
152+
}
153+
}
154+
155+
lcTOC.Text = sb.ToString();
156+
}
157+
</script>

0 commit comments

Comments
 (0)