dlangui/ddox/dlangui.html

392 lines
15 KiB
HTML

<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8"/>
<title>Module dlangui</title>
<link rel="stylesheet" type="text/css" href="./styles/ddox.css"/>
<link rel="stylesheet" href="./prettify/prettify.css" type="text/css"/>
<script type="text/javascript" src="./scripts/jquery.js">/**/</script>
<script type="text/javascript" src="./scripts/ddox.js">/**/</script>
</head>
<body onload="setupDdox();">
<nav id="main-nav">
<ul class="tree-view">
<li class="collapsed tree-view">
<a href="#" class="package">dlangui</a>
<ul class="tree-view">
<li class="collapsed tree-view">
<a href="#" class="package">core</a>
<ul class="tree-view">
<li>
<a href="./dlangui/core/asyncsocket.html" class=" module">asyncsocket</a>
</li>
<li>
<a href="./dlangui/core/collections.html" class=" module">collections</a>
</li>
<li>
<a href="./dlangui/core/config.html" class=" module">config</a>
</li>
<li>
<a href="./dlangui/core/css.html" class=" module">css</a>
</li>
<li>
<a href="./dlangui/core/cssparser.html" class=" module">cssparser</a>
</li>
<li>
<a href="./dlangui/core/dom.html" class=" module">dom</a>
</li>
<li>
<a href="./dlangui/core/editable.html" class=" module">editable</a>
</li>
<li>
<a href="./dlangui/core/events.html" class=" module">events</a>
</li>
<li>
<a href="./dlangui/core/files.html" class=" module">files</a>
</li>
<li>
<a href="./dlangui/core/i18n.html" class=" module">i18n</a>
</li>
<li>
<a href="./dlangui/core/linestream.html" class=" module">linestream</a>
</li>
<li>
<a href="./dlangui/core/logger.html" class=" module">logger</a>
</li>
<li>
<a href="./dlangui/core/math3d.html" class=" module">math3d</a>
</li>
<li>
<a href="./dlangui/core/queue.html" class=" module">queue</a>
</li>
<li>
<a href="./dlangui/core/settings.html" class=" module">settings</a>
</li>
<li>
<a href="./dlangui/core/signals.html" class=" module">signals</a>
</li>
<li>
<a href="./dlangui/core/stdaction.html" class=" module">stdaction</a>
</li>
<li>
<a href="./dlangui/core/streams.html" class=" module">streams</a>
</li>
<li>
<a href="./dlangui/core/textsource.html" class=" module">textsource</a>
</li>
<li>
<a href="./dlangui/core/types.html" class=" module">types</a>
</li>
</ul>
</li>
<li class="collapsed tree-view">
<a href="#" class="package">dialogs</a>
<ul class="tree-view">
<li>
<a href="./dlangui/dialogs/dialog.html" class=" module">dialog</a>
</li>
<li>
<a href="./dlangui/dialogs/filedlg.html" class=" module">filedlg</a>
</li>
<li>
<a href="./dlangui/dialogs/inputbox.html" class=" module">inputbox</a>
</li>
<li>
<a href="./dlangui/dialogs/msgbox.html" class=" module">msgbox</a>
</li>
<li>
<a href="./dlangui/dialogs/settingsdialog.html" class=" module">settingsdialog</a>
</li>
</ul>
</li>
<li class="collapsed tree-view">
<a href="#" class="package">dml</a>
<ul class="tree-view">
<li>
<a href="./dlangui/dml/annotations.html" class=" module">annotations</a>
</li>
<li>
<a href="./dlangui/dml/dmlhighlight.html" class=" module">dmlhighlight</a>
</li>
<li>
<a href="./dlangui/dml/parser.html" class=" module">parser</a>
</li>
</ul>
</li>
<li class="collapsed tree-view">
<a href="#" class="package">graphics</a>
<ul class="tree-view">
<li class="collapsed tree-view">
<a href="#" class="package">scene</a>
<ul class="tree-view">
<li>
<a href="./dlangui/graphics/scene/camera.html" class=" module">camera</a>
</li>
<li>
<a href="./dlangui/graphics/scene/material.html" class=" module">material</a>
</li>
<li>
<a href="./dlangui/graphics/scene/mesh.html" class=" module">mesh</a>
</li>
<li>
<a href="./dlangui/graphics/scene/node.html" class=" module">node</a>
</li>
<li>
<a href="./dlangui/graphics/scene/scene3d.html" class=" module">scene3d</a>
</li>
<li>
<a href="./dlangui/graphics/scene/transform.html" class=" module">transform</a>
</li>
</ul>
</li>
<li class="collapsed tree-view">
<a href="#" class="package">xpm</a>
<ul class="tree-view">
<li>
<a href="./dlangui/graphics/xpm/colors.html" class=" module">colors</a>
</li>
<li>
<a href="./dlangui/graphics/xpm/reader.html" class=" module">reader</a>
</li>
</ul>
</li>
<li>
<a href="./dlangui/graphics/colors.html" class=" module">colors</a>
</li>
<li>
<a href="./dlangui/graphics/domrender.html" class=" module">domrender</a>
</li>
<li>
<a href="./dlangui/graphics/drawbuf.html" class=" module">drawbuf</a>
</li>
<li>
<a href="./dlangui/graphics/fonts.html" class=" module">fonts</a>
</li>
<li>
<a href="./dlangui/graphics/ftfonts.html" class=" module">ftfonts</a>
</li>
<li>
<a href="./dlangui/graphics/gldrawbuf.html" class=" module">gldrawbuf</a>
</li>
<li>
<a href="./dlangui/graphics/glsupport.html" class=" module">glsupport</a>
</li>
<li>
<a href="./dlangui/graphics/images.html" class=" module">images</a>
</li>
<li>
<a href="./dlangui/graphics/resources.html" class=" module">resources</a>
</li>
</ul>
</li>
<li class="collapsed tree-view">
<a href="#" class="package">platforms</a>
<ul class="tree-view">
<li class="collapsed tree-view">
<a href="#" class="package">common</a>
<ul class="tree-view">
<li>
<a href="./dlangui/platforms/common/platform.html" class=" module">platform</a>
</li>
<li>
<a href="./dlangui/platforms/common/startup.html" class=" module">startup</a>
</li>
</ul>
</li>
<li class="collapsed tree-view">
<a href="#" class="package">dsfml</a>
<ul class="tree-view">
<li>
<a href="./dlangui/platforms/dsfml/dsfmlapp.html" class=" module">dsfmlapp</a>
</li>
</ul>
</li>
<li class="collapsed tree-view">
<a href="#" class="package">sdl</a>
<ul class="tree-view">
<li>
<a href="./dlangui/platforms/sdl/sdlapp.html" class=" module">sdlapp</a>
</li>
</ul>
</li>
<li class="collapsed tree-view">
<a href="#" class="package">windows</a>
<ul class="tree-view">
<li>
<a href="./dlangui/platforms/windows/win32drawbuf.html" class=" module">win32drawbuf</a>
</li>
<li>
<a href="./dlangui/platforms/windows/win32fonts.html" class=" module">win32fonts</a>
</li>
<li>
<a href="./dlangui/platforms/windows/winapp.html" class=" module">winapp</a>
</li>
</ul>
</li>
<li class="collapsed tree-view">
<a href="#" class="package">x11</a>
<ul class="tree-view">
<li>
<a href="./dlangui/platforms/x11/x11app.html" class=" module">x11app</a>
</li>
</ul>
</li>
</ul>
</li>
<li class="collapsed tree-view">
<a href="#" class="package">widgets</a>
<ul class="tree-view">
<li>
<a href="./dlangui/widgets/appframe.html" class=" module">appframe</a>
</li>
<li>
<a href="./dlangui/widgets/combobox.html" class=" module">combobox</a>
</li>
<li>
<a href="./dlangui/widgets/controls.html" class=" module">controls</a>
</li>
<li>
<a href="./dlangui/widgets/docks.html" class=" module">docks</a>
</li>
<li>
<a href="./dlangui/widgets/editors.html" class=" module">editors</a>
</li>
<li>
<a href="./dlangui/widgets/grid.html" class=" module">grid</a>
</li>
<li>
<a href="./dlangui/widgets/layouts.html" class=" module">layouts</a>
</li>
<li>
<a href="./dlangui/widgets/lists.html" class=" module">lists</a>
</li>
<li>
<a href="./dlangui/widgets/menu.html" class=" module">menu</a>
</li>
<li>
<a href="./dlangui/widgets/metadata.html" class=" module">metadata</a>
</li>
<li>
<a href="./dlangui/widgets/popup.html" class=" module">popup</a>
</li>
<li>
<a href="./dlangui/widgets/scroll.html" class=" module">scroll</a>
</li>
<li>
<a href="./dlangui/widgets/srcedit.html" class=" module">srcedit</a>
</li>
<li>
<a href="./dlangui/widgets/statusline.html" class=" module">statusline</a>
</li>
<li>
<a href="./dlangui/widgets/styles.html" class=" module">styles</a>
</li>
<li>
<a href="./dlangui/widgets/tabs.html" class=" module">tabs</a>
</li>
<li>
<a href="./dlangui/widgets/toolbars.html" class=" module">toolbars</a>
</li>
<li>
<a href="./dlangui/widgets/tree.html" class=" module">tree</a>
</li>
<li>
<a href="./dlangui/widgets/widget.html" class=" module">widget</a>
</li>
<li>
<a href="./dlangui/widgets/winframe.html" class=" module">winframe</a>
</li>
</ul>
</li>
</ul>
</li>
<li>
<a href="./dlangui.html" class="selected module">dlangui</a>
</li>
</ul>
<noscript>
<p style="color: red">The search functionality needs JavaScript enabled</p>
</noscript>
<div id="symbolSearchPane" style="display: none">
<p>
<input id="symbolSearch" type="text" placeholder="Search for symbols" onchange="performSymbolSearch(24);" onkeypress="this.onchange();" onpaste="this.onchange();" oninput="this.onchange();"/>
</p>
<ul id="symbolSearchResults" style="display: none"></ul>
<script type="application/javascript" src="./symbols.js"></script>
<script type="application/javascript">
var symbolSearchRootDir = "./";
$('#symbolSearchPane').show();
</script>
</div>
<script type="text/javascript" src="./scripts/mousetrap.js"></script>
<script type="text/javascript">
$(document).ready(function() {
Mousetrap.bind('s', function(e) {
$("#symbolSearch").focus();
return false;
});
});
</script>
</nav>
<div id="main-contents">
<h1>Module dlangui</h1>
<p>This module is just to simplify import of most useful DLANGUI modules.
</p>
<section></section>
<section><section><h2>Synopsis</h2>
<pre class="code"><code class="lang-d"><span class="com">// helloworld
</span><span class="kwd">import </span><span class="pln">dlangui</span><span class="pun">;
</span><span class="com">// required in one of modules
</span><span class="kwd">mixin </span><span class="pln">APP_ENTRY_POINT</span><span class="pun">;
</span><span class="com">/// entry point for dlangui based application
</span><span class="kwd">extern </span><span class="pun">(</span><span class="pln">C</span><span class="pun">) </span><span class="typ">int UIAppMain</span><span class="pun">(</span><span class="typ">string</span><span class="pun">[] </span><span class="pln">args</span><span class="pun">) {
</span><span class="com">// resource directory search paths
</span><span class="typ">string</span><span class="pun">[] </span><span class="pln">resourceDirs </span><span class="pun">= [
</span><span class="pln">appendPath</span><span class="pun">(</span><span class="pln">exePath</span><span class="pun">, </span><span class="str">"../../../res/"</span><span class="pun">), </span><span class="com">// for Visual D and DUB builds
</span><span class="pln">appendPath</span><span class="pun">(</span><span class="pln">exePath</span><span class="pun">, </span><span class="str">"../../../../res/"</span><span class="pun">), </span><span class="com">// for Mono-D builds
</span><span class="pln">appendPath</span><span class="pun">(</span><span class="pln">exePath</span><span class="pun">, </span><span class="str">"res/"</span><span class="pun">) </span><span class="com">// when res dir is located at the same directory as executable
</span><span class="pun">];
</span><span class="com">// setup resource directories - will use only existing directories
</span><span class="typ">Platform<wbr/></span><span class="pun">.</span><span class="pln">instance<wbr/></span><span class="pun">.</span><span class="pln">resourceDirs </span><span class="pun">= </span><span class="pln">resourceDirs</span><span class="pun">;
</span><span class="com">// select translation file - for english language
</span><span class="typ">Platform<wbr/></span><span class="pun">.</span><span class="pln">instance<wbr/></span><span class="pun">.</span><span class="pln">uiLanguage </span><span class="pun">= </span><span class="str">"en"</span><span class="pun">;
</span><span class="com">// load theme from file "theme_default.xml"
</span><span class="typ">Platform<wbr/></span><span class="pun">.</span><span class="pln">instance<wbr/></span><span class="pun">.</span><span class="pln">uiTheme </span><span class="pun">= </span><span class="str">"theme_default"</span><span class="pun">;
</span><span class="com">// create window
</span><span class="typ">Window </span><span class="pln">window </span><span class="pun">= </span><span class="typ">Platform<wbr/></span><span class="pun">.</span><span class="pln">instance<wbr/></span><span class="pun">.</span><span class="pln">createWindow</span><span class="pun">(</span><span class="str">"My Window"</span><span class="pun">, </span><span class="kwd">null</span><span class="pun">);
</span><span class="com">// create some widget to show in window
</span><span class="pln">window<wbr/></span><span class="pun">.</span><span class="pln">mainWidget </span><span class="pun">= (</span><span class="kwd">new </span><span class="typ">Button</span><span class="pun">())<wbr/>.</span><span class="pln">text</span><span class="pun">(</span><span class="str">"Hello world"d</span><span class="pun">);
</span><span class="com">// show window
</span><span class="pln">window<wbr/></span><span class="pun">.</span><span class="pln">show</span><span class="pun">();
</span><span class="com">// run message loop
</span><span class="kwd">return </span><span class="typ">Platform<wbr/></span><span class="pun">.</span><span class="pln">instance<wbr/></span><span class="pun">.</span><span class="pln">enterMessageLoop</span><span class="pun">();
}
</span></code></pre>
</section>
</section>
<section>
<h2>Authors</h2>
<p>Vadim Lopatin, coolreader.org@gmail.com
</p>
</section>
<section>
<h2>Copyright</h2>
<p>Vadim Lopatin, 2014
</p>
</section>
<section>
<h2>License</h2>
<p>Boost License 1.0
</p>
</section>
</div>
</body>
</html>