mirror of https://github.com/buggins/dlangui.git
186 lines
7.4 KiB
HTML
186 lines
7.4 KiB
HTML
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
|
|
<html>
|
|
<head>
|
|
<meta charset='utf-8'>
|
|
<meta http-equiv="X-UA-Compatible" content="chrome=1">
|
|
<link href='https://fonts.googleapis.com/css?family=Chivo:900' rel='stylesheet' type='text/css'>
|
|
<link rel="stylesheet" type="text/css" href="stylesheets/stylesheet.css" media="screen" />
|
|
<link rel="stylesheet" type="text/css" href="stylesheets/pygment_trac.css" media="screen" />
|
|
<link rel="stylesheet" type="text/css" href="stylesheets/print.css" media="print" />
|
|
<!--[if lt IE 9]>
|
|
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
|
|
<![endif]-->
|
|
<title>DlangUI - cross platform GUI library for D programming language - dlangui.widgets.layouts</title>
|
|
</head>
|
|
<body>
|
|
<div id="container">
|
|
<div class="inner">
|
|
<header>
|
|
<h1>DlangUI</h1>
|
|
<h2>Cross Platform GUI for D programming language</h2>
|
|
</header>
|
|
<section id="downloads" class="clearfix">
|
|
<a href="index.html" id="home" class="button"><span>Home</span></a>
|
|
<a href="api.html" id="home" class="button"><span>API Docs</span></a>
|
|
<a href="screenshots.html" id="home" class="button"><span>Screenshots</span></a>
|
|
<a href="https://github.com/buggins/dlangui/zipball/master" id="download-zip" class="button"><span>Download .zip</span></a>
|
|
<!--a href="https://github.com/buggins/dlangui/tarball/master" id="download-tar-gz" class="button"><span>Download .tar.gz</span></a-->
|
|
<a href="https://github.com/buggins/dlangui" id="view-on-github" class="button"><span>View on GitHub</span></a>
|
|
</section>
|
|
|
|
<hr>
|
|
<section id="main_content">
|
|
<h1>dlangui.widgets.layouts</h1>
|
|
<!-- Generated by Ddoc from src\dlangui\widgets\layouts.d -->
|
|
This module contains common <u>layouts</u> implementations.
|
|
<br><br>
|
|
Layouts are similar to the same in Android.
|
|
<br><br>
|
|
|
|
LinearLayout - either VerticalLayout or HorizontalLayout.
|
|
VerticalLayout - just LinearLayout with orientation=Orientation.Vertical
|
|
HorizontalLayout - just LinearLayout with orientation=Orientation.Vertical
|
|
FrameLayout - children occupy the same place, usually one one is visible at a time
|
|
TableLayout - children aligned into rows and columns
|
|
<br><br>
|
|
|
|
|
|
<br><br>
|
|
<b>Synopsis:</b><br>
|
|
<pre class="d_code"><font color=blue>import</font> dlangui.widgets.<u>layouts</u>;
|
|
|
|
</pre>
|
|
|
|
<br><br>
|
|
<b>License:</b><br>
|
|
Boost License 1.0
|
|
<br><br>
|
|
<b>Authors:</b><br>
|
|
Vadim Lopatin, coolreader.org@gmail.com<br><br>
|
|
|
|
<dl><dt><big><a name="LayoutItem"></a>struct <u>LayoutItem</u>;
|
|
</big></dt>
|
|
<dd>helper for layouts<br><br>
|
|
|
|
<dl><dt><big><a name="LayoutItem.set"></a>void <u>set</u>(Widget <i>widget</i>, Orientation <i>orientation</i>);
|
|
</big></dt>
|
|
<dd>sets item for <i>widget</i><br><br>
|
|
|
|
</dd>
|
|
<dt><big><a name="LayoutItem.measure"></a>void <u>measure</u>(int <i>parentWidth</i>, int <i>parentHeight</i>);
|
|
</big></dt>
|
|
<dd>set item and <u>measure</u> it<br><br>
|
|
|
|
</dd>
|
|
</dl>
|
|
</dd>
|
|
<dt><big><a name="LayoutItems"></a>class <u>LayoutItems</u>;
|
|
</big></dt>
|
|
<dd>helper class for layouts<br><br>
|
|
|
|
<dl><dt><big><a name="LayoutItems.measure"></a>Point <u>measure</u>(int <i>parentWidth</i>, int <i>parentHeight</i>);
|
|
</big></dt>
|
|
<dd>fill widget layout list with Visible or Invisible items, <u>measure</u> them<br><br>
|
|
|
|
</dd>
|
|
<dt><big><a name="LayoutItems.setWidgets"></a>void <u>setWidgets</u>(ref WidgetList <i>widgets</i>);
|
|
</big></dt>
|
|
<dd>fill widget layout list with Visible or Invisible items, measure them<br><br>
|
|
|
|
</dd>
|
|
</dl>
|
|
</dd>
|
|
<dt><big><a name="ResizerWidget"></a>class <u>ResizerWidget</u>: <u>dlangui.widgets.widget.Widget</u>;
|
|
</big></dt>
|
|
<dd>Resizer control.
|
|
Put it between other items in LinearLayout to allow resizing its siblings.
|
|
While dragging, it will resize previous and next children in layout.<br><br>
|
|
|
|
<dl><dt><big><a name="ResizerWidget.getCursorType"></a>uint <u>getCursorType</u>(int <i>x</i>, int <i>y</i>);
|
|
</big></dt>
|
|
<dd>returns mouse cursor type for widget<br><br>
|
|
|
|
</dd>
|
|
<dt><big><a name="ResizerWidget.measure"></a>void <u>measure</u>(int <i>parentWidth</i>, int <i>parentHeight</i>);
|
|
</big></dt>
|
|
<dd>Measure widget according to desired width and height constraints. (Step 1 of two phase layout).
|
|
<br><br>
|
|
|
|
</dd>
|
|
<dt><big><a name="ResizerWidget.layout"></a>void <u>layout</u>(Rect <i>rc</i>);
|
|
</big></dt>
|
|
<dd>Set widget rectangle to specified value and <u>layout</u> widget contents. (Step 2 of two phase <u>layout</u>).<br><br>
|
|
|
|
</dd>
|
|
<dt><big><a name="ResizerWidget.onMouseEvent"></a>bool <u>onMouseEvent</u>(MouseEvent <i>event</i>);
|
|
</big></dt>
|
|
<dd>process mouse <i>event</i>; return <b>true</b> if <i>event</i> is processed by widget.<br><br>
|
|
|
|
</dd>
|
|
</dl>
|
|
</dd>
|
|
<dt><big><a name="FrameLayout"></a>class <u>FrameLayout</u>: <u>dlangui.widgets.widget.WidgetGroup</u>;
|
|
</big></dt>
|
|
<dd>place all children into same place (usually, only one child should be visible at a time)<br><br>
|
|
|
|
<dl><dt><big><a name="FrameLayout.measure"></a>void <u>measure</u>(int <i>parentWidth</i>, int <i>parentHeight</i>);
|
|
</big></dt>
|
|
<dd>Measure widget according to desired width and height constraints. (Step 1 of two phase layout).<br><br>
|
|
|
|
</dd>
|
|
<dt><big><a name="FrameLayout.layout"></a>void <u>layout</u>(Rect <i>rc</i>);
|
|
</big></dt>
|
|
<dd>Set widget rectangle to specified value and <u>layout</u> widget contents. (Step 2 of two phase <u>layout</u>).<br><br>
|
|
|
|
</dd>
|
|
<dt><big><a name="FrameLayout.onDraw"></a>void <u>onDraw</u>(DrawBuf <i>buf</i>);
|
|
</big></dt>
|
|
<dd>Draw widget at its position to buffer<br><br>
|
|
|
|
</dd>
|
|
<dt><big><a name="FrameLayout.showChild"></a>bool <u>showChild</u>(string <i>ID</i>, Visibility <i>otherChildrenVisibility</i> = Visibility.Invisible, bool <i>updateFocus</i> = false);
|
|
</big></dt>
|
|
<dd>make one of children (with specified <i>ID</i>) visible, for the rest, set visibility to <i>otherChildrenVisibility</i><br><br>
|
|
|
|
</dd>
|
|
</dl>
|
|
</dd>
|
|
<dt><big><a name="TableLayout"></a>class <u>TableLayout</u>: <u>dlangui.widgets.widget.WidgetGroup</u>;
|
|
</big></dt>
|
|
<dd>layout children as table with rows and columns<br><br>
|
|
|
|
<dl><dt><big><a name="TableLayout.colCount"></a>@property int <u>colCount</u>();
|
|
</big></dt>
|
|
<dd>number of columns<br><br>
|
|
|
|
</dd>
|
|
<dt><big><a name="TableLayout.measure"></a>void <u>measure</u>(int <i>parentWidth</i>, int <i>parentHeight</i>);
|
|
</big></dt>
|
|
<dd>Measure widget according to desired width and height constraints. (Step 1 of two phase layout).<br><br>
|
|
|
|
</dd>
|
|
<dt><big><a name="TableLayout.layout"></a>void <u>layout</u>(Rect <i>rc</i>);
|
|
</big></dt>
|
|
<dd>Set widget rectangle to specified value and <u>layout</u> widget contents. (Step 2 of two phase <u>layout</u>).<br><br>
|
|
|
|
</dd>
|
|
<dt><big><a name="TableLayout.onDraw"></a>void <u>onDraw</u>(DrawBuf <i>buf</i>);
|
|
</big></dt>
|
|
<dd>Draw widget at its position to buffer<br><br>
|
|
|
|
</dd>
|
|
</dl>
|
|
</dd>
|
|
</dl>
|
|
|
|
</section>
|
|
<footer>
|
|
Dlangui is maintained by <a href="https://github.com/buggins">buggins</a><br>
|
|
This page was generated by <a href="http://pages.github.com">GitHub Pages</a>. Tactile theme by <a href="https://twitter.com/jasonlong">Jason Long</a>.
|
|
</footer>
|
|
|
|
</div>
|
|
</div>
|
|
</body>
|
|
</html>
|