<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <link rel="stylesheet" href="style.css" type="text/css"> <meta content="text/html; charset=iso-8859-1" http-equiv="Content-Type"> <link rel="Start" href="index.html"> <link rel="previous" href="LTerm_mouse.html"> <link rel="next" href="LTerm_edit.html"> <link rel="Up" href="index.html"> <link title="Index of types" rel=Appendix href="index_types.html"> <link title="Index of exceptions" rel=Appendix href="index_exceptions.html"> <link title="Index of values" rel=Appendix href="index_values.html"> <link title="Index of class attributes" rel=Appendix href="index_attributes.html"> <link title="Index of class methods" rel=Appendix href="index_methods.html"> <link title="Index of classes" rel=Appendix href="index_classes.html"> <link title="Index of class types" rel=Appendix href="index_class_types.html"> <link title="Index of modules" rel=Appendix href="index_modules.html"> <link title="LTerm" rel="Chapter" href="LTerm.html"> <link title="LTerm_key" rel="Chapter" href="LTerm_key.html"> <link title="LTerm_event" rel="Chapter" href="LTerm_event.html"> <link title="LTerm_unix" rel="Chapter" href="LTerm_unix.html"> <link title="LTerm_windows" rel="Chapter" href="LTerm_windows.html"> <link title="LTerm_style" rel="Chapter" href="LTerm_style.html"> <link title="LTerm_geom" rel="Chapter" href="LTerm_geom.html"> <link title="LTerm_draw" rel="Chapter" href="LTerm_draw.html"> <link title="LTerm_mouse" rel="Chapter" href="LTerm_mouse.html"> <link title="LTerm_widget" rel="Chapter" href="LTerm_widget.html"> <link title="LTerm_edit" rel="Chapter" href="LTerm_edit.html"> <link title="LTerm_read_line" rel="Chapter" href="LTerm_read_line.html"> <link title="LTerm_text" rel="Chapter" href="LTerm_text.html"> <link title="LTerm_ui" rel="Chapter" href="LTerm_ui.html"> <link title="LTerm_resources" rel="Chapter" href="LTerm_resources.html"> <link title="LTerm_inputrc" rel="Chapter" href="LTerm_inputrc.html"> <link title="LTerm_history" rel="Chapter" href="LTerm_history.html"><link title="Callbacks" rel="Section" href="#6_Callbacks"> <link title="Base class" rel="Section" href="#6_Baseclass"> <link title="Labels" rel="Section" href="#6_Labels"> <link title="Containers" rel="Section" href="#6_Containers"> <link title="Lines" rel="Section" href="#6_Lines"> <link title="Buttons" rel="Section" href="#6_Buttons"> <link title="Running in a terminal" rel="Section" href="#6_Runninginaterminal"> <title>LTerm_widget</title> </head> <body> <div class="navbar"><a class="pre" href="LTerm_mouse.html" title="LTerm_mouse">Previous</a> <a class="up" href="index.html" title="Index">Up</a> <a class="post" href="LTerm_edit.html" title="LTerm_edit">Next</a> </div> <h1>Module <a href="type_LTerm_widget.html">LTerm_widget</a></h1> <pre><span class="keyword">module</span> LTerm_widget: <code class="code">sig</code> <a href="LTerm_widget.html">..</a> <code class="code">end</code></pre><div class="info module top"> <h6 id="6_Callbacks">Callbacks</h6><br> </div> <hr width="100%"> <br> <h6 id="6_Callbacks">Callbacks</h6><br> <pre><span id="TYPEswitch"><span class="keyword">type</span> <code class="type"></code>switch</span> </pre> <div class="info "> Switches are used to stop signals.<br> </div> <pre><span id="VALregister"><span class="keyword">val</span> register</span> : <code class="type"><a href="LTerm_widget.html#TYPEswitch">switch</a> option -> 'a Lwt_sequence.t -> 'a -> unit</code></pre><div class="info "> </div> <pre><span id="VALstop"><span class="keyword">val</span> stop</span> : <code class="type"><a href="LTerm_widget.html#TYPEswitch">switch</a> -> unit</code></pre><div class="info "> </div> <pre><span id="VALexec_callbacks"><span class="keyword">val</span> exec_callbacks</span> : <code class="type">('a -> unit) Lwt_sequence.t -> 'a -> unit</code></pre><div class="info "> <code class="code">apply_callbacks callbacks x</code><br> </div> <pre><span id="VALexec_filters"><span class="keyword">val</span> exec_filters</span> : <code class="type">('a -> bool) Lwt_sequence.t -> 'a -> bool</code></pre><br> <h6 id="6_Baseclass">Base class</h6><br> <pre><span name="TYPEt"><span class="keyword">class</span> <a href="LTerm_widget.t-c.html">t</a></span> : <code class="type">string -> </code><code class="code">object</code> <a href="LTerm_widget.t-c.html">..</a> <code class="code">end</code></pre><div class="info"> The base class. </div> <br> <h6 id="6_Labels">Labels</h6><br> <pre><span name="TYPElabel"><span class="keyword">class</span> <a href="LTerm_widget.label-c.html">label</a></span> : <code class="type">string -> </code><code class="code">object</code> <a href="LTerm_widget.label-c.html">..</a> <code class="code">end</code></pre><div class="info"> A widget displaying a text. </div> <br> <h6 id="6_Containers">Containers</h6><br> <pre><span id="EXCEPTIONOut_of_range"><span class="keyword">exception</span> Out_of_range</span></pre> <pre><span id="TYPEbox"><span class="keyword">class type</span> <a href="LTerm_widget.box-c.html">box</a></span> = <code class="code">object</code> <a href="LTerm_widget.box-c.html">..</a> <code class="code">end</code></pre><div class="info"> Type of widgets displaying a list of widget. </div> <pre><span name="TYPEhbox"><span class="keyword">class</span> <a href="LTerm_widget.hbox-c.html">hbox</a></span> : <code class="type"></code><code class="type"><a href="LTerm_widget.box-c.html">box</a></code></pre><div class="info"> A widget displaying a list of widgets, listed horizontally. </div> <pre><span name="TYPEvbox"><span class="keyword">class</span> <a href="LTerm_widget.vbox-c.html">vbox</a></span> : <code class="type"></code><code class="type"><a href="LTerm_widget.box-c.html">box</a></code></pre><div class="info"> A widget displaying a list of widgets, listed vertically. </div> <pre><span name="TYPEframe"><span class="keyword">class</span> <a href="LTerm_widget.frame-c.html">frame</a></span> : <code class="type"></code><code class="code">object</code> <a href="LTerm_widget.frame-c.html">..</a> <code class="code">end</code></pre><div class="info"> A widget displayiing another widget in a box. </div> <br> <h6 id="6_Lines">Lines</h6><br> <pre><span name="TYPEhline"><span class="keyword">class</span> <a href="LTerm_widget.hline-c.html">hline</a></span> : <code class="type"></code><code class="type"><a href="LTerm_widget.t-c.html">t</a></code></pre><div class="info"> A horizontal line. </div> <pre><span name="TYPEvline"><span class="keyword">class</span> <a href="LTerm_widget.vline-c.html">vline</a></span> : <code class="type"></code><code class="type"><a href="LTerm_widget.t-c.html">t</a></code></pre><div class="info"> A vertical line. </div> <br> <h6 id="6_Buttons">Buttons</h6><br> <pre><span name="TYPEbutton"><span class="keyword">class</span> <a href="LTerm_widget.button-c.html">button</a></span> : <code class="type">string -> </code><code class="code">object</code> <a href="LTerm_widget.button-c.html">..</a> <code class="code">end</code></pre><br> <h6 id="6_Runninginaterminal">Running in a terminal</h6><br> <pre><span id="VALrun"><span class="keyword">val</span> run</span> : <code class="type"><a href="LTerm.html#TYPEt">LTerm.t</a> -><br> ?save_state:bool -><br> ?load_resources:bool -><br> ?resources_file:string -> #<a href="LTerm_widget.t-c.html">t</a> -> 'a Lwt.t -> 'a Lwt.t</code></pre><div class="info "> <code class="code">run term ?save_state widget w</code> runs on the given terminal using <code class="code">widget</code> as main widget. It returns when <code class="code">w</code> terminates. If <code class="code">save_state</code> is <code class="code">true</code> (the default) then the state of the terminal is saved and restored when <code class="code">w</code> terminates. <p> If <code class="code">load_resources</code> is <code class="code">true</code> (the default) then <code class="code">resources_file</code> (which default to ".lambda-termrc" in the home directory) is loaded and the result is set to <code class="code">w</code>.<br> </div> </body></html>