(ded4a3e0a) v0.9.0.7

This commit is contained in:
Joonas Rikkonen
2019-06-25 16:00:44 +03:00
parent e5ae622c77
commit 4a51db77b5
1777 changed files with 421528 additions and 917 deletions
@@ -0,0 +1,13 @@
@*
// MonoGame - Copyright (C) The MonoGame Team
// This file is subject to the terms and conditions defined in
// file 'LICENSE.txt', which is part of this source code package.
*@
@model SharpDoc.TemplateContext
@using SharpDoc.Model
<iframe id="mainFrame" name="mainFrame" frameborder="0" scrolling="no" width="100%" height="100%"></iframe>
<script type="text/javascript" language="JavaScript">
loadContent("@Model.RootTopic.PageId", "@Param.FileExt");
</script>
@@ -0,0 +1,26 @@
@*
// MonoGame - Copyright (C) The MonoGame Team
// This file is subject to the terms and conditions defined in
// file 'LICENSE.txt', which is part of this source code package.
*@
@model SharpDoc.TemplateContext
@using SharpDoc.Model;
@Import("PageHead")
@Import("PageBody")
@helper Dump(string title, string bodyTemplateName)
{
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" >
<head>
@Helpers.PageHead.Dump(title)
</head>
<body onload="onPageLoad('@title | MonoGame', '@Model.Topic.PageId');">
@Helpers.PageBody.Dump(bodyTemplateName)
<br />
<br />
</body>
</html>
}
@@ -0,0 +1,23 @@
@*
// MonoGame - Copyright (C) The MonoGame Team
// This file is subject to the terms and conditions defined in
// file 'LICENSE.txt', which is part of this source code package.
*@
@model SharpDoc.TemplateContext
@using SharpDoc.Model
@helper Dump(string bodyTemplateName)
{
<script type="text/javascript" language="javascript">
if(window == window.top)
location.href = "/documentation/?page=@Model.Topic.PageId";
document.addEvent('domready', function () {
InstallCodeTabs();
});
</script>
<div class="sharpdoc">
<div class="content">
@Include(bodyTemplateName)
</div>
</div>
}
@@ -0,0 +1,46 @@
@*
// MonoGame - Copyright (C) The MonoGame Team
// This file is subject to the terms and conditions defined in
// file 'LICENSE.txt', which is part of this source code package.
*@
@model SharpDoc.TemplateContext
@using SharpDoc.Model
@Import("PageHead")
@Import("TocBody")
@helper Dump(){
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" >
<head>
@Helpers.PageHead.Dump(Model.RootTopic.PageTitle)
</head>
<body>
@* Initialize splitpane *@
<script type="text/javascript" language="javascript">
document.addEvent('domready', function () {
SplitPane('toc_content', 'pane_toggle', 'pane_resizer');
});
</script>
<div class="sharpdoc">
<div id="body">
<div id="toc_content" class="toc_content">
<div class="inner">
@Helpers.TocBody.Dump()
<br />
<br />
</div>
</div>
<div id="pane_resizer" class="pane_resizer">
<div id="pane_toggle" class="collapse" ></div>
</div>
<div id="main_content" class="main_content">
@Include("ContentHeader")
@Include("MainFrame")
@Include("ContentFooter")
</div>
</div>
</div>
</body>
</html>
}
@@ -0,0 +1,52 @@
@*
// MonoGame - Copyright (C) The MonoGame Team
// This file is subject to the terms and conditions defined in
// file 'LICENSE.txt', which is part of this source code package.
*@
@model SharpDoc.TemplateContext
@using SharpDoc.Model
@Import("PageIndexBody")
<html>
<head>
<title>@Param.Title</title>
</head>
<body>
@if (Model.RootTopic != null)
{
NTopic indexTopic = new NTopic {PageId = "index"};
Model.Topic = indexTopic;
Model.WriteTo(indexTopic, @Helpers.PageIndexBody.Dump());
<script>
function resizeDocs()
{
var docFrame = document.getElementById('the_docs');
var tocDoc = docFrame.contentDocument || docFrame.contentWindow.document;
var contentFrame = tocDoc.getElementById('mainFrame');
var contentDoc = contentFrame.contentDocument || contentFrame.contentWindow.document;
var tocElem = tocDoc.getElementById('toc_content');
var tocSize = tocElem.scrollHeight ||
tocElem.offsetHeight ||
tocElem.clientHeight ||
0;
// The order here is very specifc to ensure it
// works on IE and Chrome with fallbacks.
var contentSize = contentDoc.documentElement.offsetHeight ||
contentDoc.body.scrollHeight ||
contentDoc.documentElement.scrollHeight ||
contentDoc.offsetHeight ||
contentDoc.documentElement.clientHeight ||
0;
var pageHeight = Math.max(contentSize, tocSize, 720);
docFrame.style.height = pageHeight + 'px';
}
</script>
<iframe id="the_docs" src="html/@indexTopic.PageId@Param.FileExt" frameborder="0" scrolling="no" width="100%" height="100%"></iframe>
}
</body>
</html>
@@ -0,0 +1,70 @@
@*
// MonoGame - Copyright (C) The MonoGame Team
// This file is subject to the terms and conditions defined in
// file 'LICENSE.txt', which is part of this source code package.
*@
@model SharpDoc.TemplateContext
@using SharpDoc.Model
@Import("Members")
@Import("Syntax")
@*
* ------------------------------------------------------------------
* Dump a section
* ------------------------------------------------------------------
* sectionId: id for the section
* name: display name
* content: html content of the section
* ------------------------------------------------------------------
*@
@helper Dump(string sectionId, string name, string content)
{
<script language="javascript">
window.addEvent('domready', function() {
$('@(sectionId)_toggle').addEvent('click', function (event) {
var ct = $('@(sectionId)_content');
if (ct.isDisplayed())
{
$('@(sectionId)_icon').setProperty('class', 'toggle_icon in');
$('@(sectionId)_content').hide();
}
else
{
$('@(sectionId)_icon').setProperty('class', 'toggle_icon out');
$('@(sectionId)_content').show();
}
});
});
</script>
<div id="@sectionId" class="section">
<div class="title"><a id="@(sectionId)_toggle" href="#" class="title"><div id="@(sectionId)_icon" class="toggle_icon out"></div><span class="title">@Escape(name)</span></a><div class="hr"><hr/></div></div>
<div id="@(sectionId)_content" class="block">
@Raw(content)
</div>
</div>
}
@helper Dump(string name, string content)
{
@Dump("section_" + name.Replace(" ",""), name, content)
}
@helper Dump(string sectionId, string name, IEnumerable<NModelBase> members, bool showIcons)
{
@Dump(sectionId, name, Helpers.Members.Dump(members, showIcons).ToString())
}
@helper Dump(string name, IEnumerable<NModelBase> members, bool showIcons)
{
@Dump(name, Helpers.Members.Dump(members, showIcons).ToString())
}
@helper Dump(string name, IEnumerable<NModelBase> members, bool showIcons, IModelReference context)
{
@Dump(name, Helpers.Members.Dump(members, showIcons, context).ToString())
}
@helper DumpSyntax(NMember member)
{
@Dump("Syntax", Helpers.Syntax.Dump(member).ToString())
}
@@ -0,0 +1,39 @@
@*
// MonoGame - Copyright (C) The MonoGame Team
// This file is subject to the terms and conditions defined in
// file 'LICENSE.txt', which is part of this source code package.
*@
@model SharpDoc.TemplateContext
@using SharpDoc.Model
@Import("SyntaxMethod")
@Import("SyntaxProperty")
@Import("TabCode")
@Import("SyntaxCodeCSharp")
@Import("SyntaxCodeVB")
@Import("SyntaxCodeFSharp")
@*// Dumps syntax section*@
@helper Dump(NMember member)
{
@Helpers.TabCode.Dump(new string[] {
"C#", "<pre class='brush: csharp;'>" + Escape(Helpers.SyntaxCodeCSharp.Dump(member)) + "</pre>",
"VB", Helpers.SyntaxCodeVB.Dump(member),
"F#", Helpers.SyntaxCodeFSharp.Dump(member),
});
if (member is NMethod)
{
@Helpers.SyntaxMethod.Dump((NMethod) member)
}
else if (member is NProperty)
{
@Helpers.SyntaxProperty.Dump((NProperty) member)
}
else if (member is NDelegate)
{
@Helpers.SyntaxMethod.Dump(((NDelegate) member).Invoke)
}
else if (member is NType)
{
<p>The @member.Name type exposes the following members.</p>
}
}