dlangui/controls.html

258 lines
8.7 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.controls</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.controls</h1>
<!-- Generated by Ddoc from src\dlangui\widgets\controls.d -->
This module contains simple <u>controls</u> widgets implementation.
<br><br>
TextWidget
<br><br>
ImageWidget
<br><br>
Button
<br><br>
ImageButton
<br><br>
ScrollBar
<br><br>
<br><br>
<b>Synopsis:</b><br>
<pre class="d_code"><font color=blue>import</font> dlangui.widgets.<u>controls</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="VSpacer"></a>class <u>VSpacer</u>: <u>dlangui.widgets.widget.Widget</u>;
</big></dt>
<dd>vertical spacer to fill empty space in vertical layouts<br><br>
</dd>
<dt><big><a name="HSpacer"></a>class <u>HSpacer</u>: <u>dlangui.widgets.widget.Widget</u>;
</big></dt>
<dd>horizontal spacer to fill empty space in horizontal layouts<br><br>
</dd>
<dt><big><a name="TextWidget"></a>class <u>TextWidget</u>: <u>dlangui.widgets.widget.Widget</u>;
</big></dt>
<dd>static text widget<br><br>
<dl><dt><big><a name="TextWidget.text"></a>@property dstring <u>text</u>();
</big></dt>
<dd>get widget <u>text</u><br><br>
</dd>
<dt><big><a name="TextWidget.text"></a>@property Widget <u>text</u>(dstring <i>s</i>);
</big></dt>
<dd>set <u>text</u> to show<br><br>
</dd>
<dt><big><a name="TextWidget.text"></a>@property Widget <u>text</u>(UIString <i>s</i>);
</big></dt>
<dd>set <u>text</u> to show<br><br>
</dd>
<dt><big><a name="TextWidget.textResource"></a>@property Widget <u>textResource</u>(string <i>s</i>);
</big></dt>
<dd>set text resource ID to show<br><br>
</dd>
</dl>
</dd>
<dt><big><a name="ImageWidget"></a>class <u>ImageWidget</u>: <u>dlangui.widgets.widget.Widget</u>;
</big></dt>
<dd>static image widget<br><br>
<dl><dt><big><a name="ImageWidget.drawableId"></a>@property string <u>drawableId</u>();
</big></dt>
<dd>get drawable image id<br><br>
</dd>
<dt><big><a name="ImageWidget.drawableId"></a>@property ImageWidget <u>drawableId</u>(string <i>id</i>);
</big></dt>
<dd>set drawable image <i>id</i><br><br>
</dd>
<dt><big><a name="ImageWidget.drawable"></a>@property ref DrawableRef <u>drawable</u>();
</big></dt>
<dd>get <u>drawable</u><br><br>
</dd>
<dt><big><a name="ImageWidget.drawable"></a>@property ImageWidget <u>drawable</u>(DrawableRef <i>img</i>);
</big></dt>
<dd>set custom <u>drawable</u> (not one from resources)<br><br>
</dd>
<dt><big><a name="ImageWidget.drawable"></a>@property ImageWidget <u>drawable</u>(string <i>drawableId</i>);
</big></dt>
<dd>set custom <u>drawable</u> (not one from resources)<br><br>
</dd>
</dl>
</dd>
<dt><big><a name="ImageButton"></a>class <u>ImageButton</u>: <u>dlangui.widgets.controls.ImageWidget</u>;
</big></dt>
<dd>button with image only<br><br>
</dd>
<dt><big><a name="ImageTextButton"></a>class <u>ImageTextButton</u>: <u>dlangui.widgets.layouts.HorizontalLayout</u>;
</big></dt>
<dd>button with image and text<br><br>
</dd>
<dt><big><a name="CheckBox"></a>class <u>CheckBox</u>: <u>dlangui.widgets.controls.ImageTextButton</u>;
</big></dt>
<dd>checkbox<br><br>
</dd>
<dt><big><a name="RadioButton"></a>class <u>RadioButton</u>: <u>dlangui.widgets.controls.ImageTextButton</u>;
</big></dt>
<dd>radio button<br><br>
</dd>
<dt><big><a name="Button"></a>class <u>Button</u>: <u>dlangui.widgets.widget.Widget</u>;
</big></dt>
<dd>Text only button<br><br>
</dd>
<dt><big><a name="OnScrollHandler"></a>interface <u>OnScrollHandler</u>;
</big></dt>
<dd>scroll event handler interface<br><br>
<dl><dt><big><a name="OnScrollHandler.onScrollEvent"></a>abstract bool <u>onScrollEvent</u>(AbstractSlider <i>source</i>, ScrollEvent <i>event</i>);
</big></dt>
<dd>handle scroll <i>event</i><br><br>
</dd>
</dl>
</dd>
<dt><big><a name="AbstractSlider"></a>class <u>AbstractSlider</u>: <u>dlangui.widgets.widget.WidgetGroup</u>;
</big></dt>
<dd>base class for widgets like scrollbars and sliders<br><br>
<dl><dt><big><a name="AbstractSlider.onScrollEventListener"></a>Signal!OnScrollHandler <u>onScrollEventListener</u>;
</big></dt>
<dd>scroll event listeners<br><br>
</dd>
<dt><big><a name="AbstractSlider.position"></a>const @property int <u>position</u>();
</big></dt>
<dd>returns slider <u>position</u><br><br>
</dd>
<dt><big><a name="AbstractSlider.position"></a>@property AbstractSlider <u>position</u>(int <i>newPosition</i>);
</big></dt>
<dd>sets new slider <u>position</u><br><br>
</dd>
<dt><big><a name="AbstractSlider.minValue"></a>const @property int <u>minValue</u>();
</big></dt>
<dd>returns slider range min value<br><br>
</dd>
<dt><big><a name="AbstractSlider.maxValue"></a>const @property int <u>maxValue</u>();
</big></dt>
<dd>returns slider range max value<br><br>
</dd>
<dt><big><a name="AbstractSlider.pageSize"></a>const @property int <u>pageSize</u>();
</big></dt>
<dd>page size (visible area size)<br><br>
</dd>
<dt><big><a name="AbstractSlider.pageSize"></a>@property AbstractSlider <u>pageSize</u>(int <i>size</i>);
</big></dt>
<dd>set page <i>size</i> (visible area <i>size</i>)<br><br>
</dd>
<dt><big><a name="AbstractSlider.setRange"></a>AbstractSlider <u>setRange</u>(int <i>min</i>, int <i>max</i>);
</big></dt>
<dd>set new range (<i>min</i> and <i>max</i> values for slider)<br><br>
</dd>
</dl>
</dd>
<dt><big><a name="ScrollBar"></a>class <u>ScrollBar</u>: <u>dlangui.widgets.controls.AbstractSlider</u>, <u>dlangui.widgets.widget.OnClickHandler</u>;
</big></dt>
<dd>scroll bar - either vertical or horizontal<br><br>
<dl><dt><big><a name="ScrollBar.orientation"></a>@property Orientation <u>orientation</u>();
</big></dt>
<dd>returns scrollbar <u>orientation</u> (Vertical, Horizontal)<br><br>
</dd>
<dt><big><a name="ScrollBar.orientation"></a>@property ScrollBar <u>orientation</u>(Orientation <i>value</i>);
</big></dt>
<dd>sets scrollbar <u>orientation</u><br><br>
</dd>
<dt><big><a name="ScrollBar.updateState"></a>protected void <u>updateState</u>();
</big></dt>
<dd>hide controls when scroll is not possible<br><br>
</dd>
<dt><big><a name="ScrollBar.onMouseEvent"></a>bool <u>onMouseEvent</u>(MouseEvent <i>event</i>);
</big></dt>
<dd>handle mouse wheel events<br><br>
</dd>
<dt><big><a name="ScrollBar.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>