Sophie

Sophie

distrib > Mageia > 5 > x86_64 > media > core-release > by-pkgid > 166a9807065357168d48043297ca7304 > files > 30

ocamlviz-1.01-9.mga5.x86_64.rpm

<!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="Db.html">
<link rel="next" href="Monitor_sig.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 modules" rel=Appendix href="index_modules.html">
<link title="Index of module types" rel=Appendix href="index_module_types.html">
<link title="Binary" rel="Chapter" href="Binary.html">
<link title="Bproto" rel="Chapter" href="Bproto.html">
<link title="Db" rel="Chapter" href="Db.html">
<link title="Graph" rel="Chapter" href="Graph.html">
<link title="Monitor_sig" rel="Chapter" href="Monitor_sig.html">
<link title="Ocamlviz" rel="Chapter" href="Ocamlviz.html">
<link title="Ocamlviz_threads" rel="Chapter" href="Ocamlviz_threads.html">
<link title="Protocol" rel="Chapter" href="Protocol.html">
<link title="Timemap" rel="Chapter" href="Timemap.html"><title>Graph</title>
</head>
<body>
<div class="navbar"><a class="pre" href="Db.html" title="Db">Previous</a>
&nbsp;<a class="up" href="index.html" title="Index">Up</a>
&nbsp;<a class="post" href="Monitor_sig.html" title="Monitor_sig">Next</a>
</div>
<h1>Module <a href="type_Graph.html">Graph</a></h1>

<pre><span class="keyword">module</span> Graph: <code class="code">sig</code> <a href="Graph.html">..</a> <code class="code">end</code></pre><div class="info module top">
A module that builds a graph on a Lablgtk drawing area<br>
</div>
<hr width="100%">

<pre><code><span id="TYPEkind"><span class="keyword">type</span> <code class="type"></code>kind</span> = </code></pre><table class="typetable">
<tr>
<td align="left" valign="top" >
<code><span class="keyword">|</span></code></td>
<td align="left" valign="top" >
<code><span id="TYPEELTkind.Undefined"><span class="constructor">Undefined</span></span></code></td>

</tr>
<tr>
<td align="left" valign="top" >
<code><span class="keyword">|</span></code></td>
<td align="left" valign="top" >
<code><span id="TYPEELTkind.Int"><span class="constructor">Int</span></span></code></td>

</tr>
<tr>
<td align="left" valign="top" >
<code><span class="keyword">|</span></code></td>
<td align="left" valign="top" >
<code><span id="TYPEELTkind.Float"><span class="constructor">Float</span></span></code></td>

</tr>
<tr>
<td align="left" valign="top" >
<code><span class="keyword">|</span></code></td>
<td align="left" valign="top" >
<code><span id="TYPEELTkind.Byte"><span class="constructor">Byte</span></span></code></td>

</tr>
<tr>
<td align="left" valign="top" >
<code><span class="keyword">|</span></code></td>
<td align="left" valign="top" >
<code><span id="TYPEELTkind.Percentage"><span class="constructor">Percentage</span></span></code></td>

</tr></table>

<div class="info ">
The kind of the datas represented on the graph<br>
</div>


<pre><code><span id="TYPEstyle"><span class="keyword">type</span> <code class="type"></code>style</span> = </code></pre><table class="typetable">
<tr>
<td align="left" valign="top" >
<code><span class="keyword">|</span></code></td>
<td align="left" valign="top" >
<code><span id="TYPEELTstyle.Full"><span class="constructor">Full</span></span></code></td>

</tr>
<tr>
<td align="left" valign="top" >
<code><span class="keyword">|</span></code></td>
<td align="left" valign="top" >
<code><span id="TYPEELTstyle.Dashed"><span class="constructor">Dashed</span></span></code></td>

</tr>
<tr>
<td align="left" valign="top" >
<code><span class="keyword">|</span></code></td>
<td align="left" valign="top" >
<code><span id="TYPEELTstyle.Empty"><span class="constructor">Empty</span></span></code></td>

</tr></table>

<div class="info ">
The way a point is drawn on the graph<br>
</div>


<pre><span id="TYPEt"><span class="keyword">type</span> <code class="type"></code>t</span> </pre>
<div class="info ">
The abstract type for a graph.<br>
</div>


<pre><span id="TYPEelt"><span class="keyword">type</span> <code class="type"></code>elt</span> </pre>
<div class="info ">
The abstract type for a function of the graph.<br>
</div>


<pre><span id="VALcreate"><span class="keyword">val</span> create</span> : <code class="type">?width:int -><br>       ?height:int -><br>       ?timeout:int -><br>       ?steps:int -><br>       ?grid_divx:int -><br>       ?grid_divy:int -><br>       ?lborder:float -><br>       ?rborder:float -><br>       ?vborder:float -><br>       ?xaxis:int -><br>       ?yaxis:int -><br>       ?packing:(GObj.widget -> unit) -> ?kind:<a href="Graph.html#TYPEkind">kind</a> -> unit -> <a href="Graph.html#TYPEt">t</a></code></pre><div class="info ">
<code class="code">create ()</code> creates an empty graph that is a GMisc.drawing_area.<br>
</div>
<div class="param_info"><code class="code">width</code> : Widget's width</div>
<div class="param_info"><code class="code">timeout</code> : Graph refresh period (in milliseconds).</div>
<div class="param_info"><code class="code">steps</code> : The number of values displayed on the graph</div>
<div class="param_info"><code class="code">grid_divx</code> : The number of divisions of the background along the X-axis</div>
<div class="param_info"><code class="code">grid_divy</code> : The number of divisions of the background along the Y-axis</div>
<div class="param_info"><code class="code">lborder</code> : The size of the left border of the widget</div>
<div class="param_info"><code class="code">rborder</code> : The size of the right border of the widget</div>
<div class="param_info"><code class="code">vborder</code> : The size of the two borders above and below the drawing area</div>
<div class="param_info"><code class="code">xaxis</code> : The frequency of the X-axis legend (1 = always displayed, 2 = half displayed etc...)</div>
<div class="param_info"><code class="code">yaxis</code> : The frequency of the Y-axis legend</div>
<div class="param_info"><code class="code">packing</code> : The widget to which the graph is packed</div>
<div class="param_info"><code class="code">kind</code> : The kind of the graph</div>

<pre><span id="VALadd"><span class="keyword">val</span> add</span> : <code class="type"><a href="Graph.html#TYPEt">t</a> -><br>       <a href="Protocol.html#TYPEtag">Protocol.tag</a> -><br>       ?name:string -><br>       (unit -> float * <a href="Graph.html#TYPEstyle">style</a>) -><br>       <a href="Graph.html#TYPEkind">kind</a> -> float * float * float -> <a href="Graph.html#TYPEelt">elt</a></code></pre><div class="info ">
<code class="code">add g tag n f k c</code> adds a function <code class="code">f</code> with name <code class="code">n</code> to the graph <code class="code">g</code> and returns it as an element of this graph.
      The function type of the graph is <code class="code">k</code>. The function will be displayed with the color <code class="code">c</code>
      which is a rgb color with the floating-point numbers spread from 0.0 to 1.0.<br>
</div>
<div class="param_info"><code class="code">name</code> : Function name</div>

<pre><span id="VALremove"><span class="keyword">val</span> remove</span> : <code class="type"><a href="Graph.html#TYPEt">t</a> -> <a href="Graph.html#TYPEelt">elt</a> -> unit</code></pre><div class="info ">
<code class="code">remove g f</code> removes the function <code class="code">f</code> from the graph <code class="code">g</code>.<br>
</div>

<pre><span id="VALset_visible"><span class="keyword">val</span> set_visible</span> : <code class="type"><a href="Graph.html#TYPEelt">elt</a> -> bool -> unit</code></pre><div class="info ">
<code class="code">set_visible f b</code> displays the function f on the graph according to <code class="code">b</code>.<br>
</div>

<pre><span id="VALset_preferences"><span class="keyword">val</span> set_preferences</span> : <code class="type"><a href="Graph.html#TYPEt">t</a> -> step:int -> divx:int -> divy:int -> xaxis:int -> yaxis:int -> unit</code></pre><div class="info ">
<code class="code">set_preferences g step divx divy xaxis yaxis ()</code> changes the value of these arguments 
      in the graph <code class="code">g</code>.<br>
</div>
<div class="param_info"><code class="code">step</code> : The number of values displayed on the graph</div>
<div class="param_info"><code class="code">divx</code> : The number of divisions of the background along the X-axis</div>
<div class="param_info"><code class="code">divy</code> : The number of divisions of the background along the Y-axis</div>
<div class="param_info"><code class="code">xaxis</code> : The frequency of the X-axis legend (1 = always displayed, 2 = half displayed etc...)</div>
<div class="param_info"><code class="code">yaxis</code> : The frequency of the Y-axis legend</div>

<pre><span id="VALset_color"><span class="keyword">val</span> set_color</span> : <code class="type"><a href="Graph.html#TYPEelt">elt</a> -> float * float * float -> unit</code></pre><div class="info ">
<code class="code">set_color f c</code> sets the color <code class="code">c</code> used to display the function <code class="code">f</code>. 
  <code class="code">c</code> is a rgb color with the floating-point numbers spread from 0.0 to 1.0.<br>
</div>

<pre><span id="VALget_color"><span class="keyword">val</span> get_color</span> : <code class="type"><a href="Graph.html#TYPEelt">elt</a> -> float * float * float</code></pre><div class="info ">
<code class="code">get_color f</code> returns the current color used to display the function <code class="code">f</code>.
      The color is a rgb color with the floating-point numbers spread from 0.0 to 1.0.<br>
</div>

<pre><span id="VALget_nb_fct"><span class="keyword">val</span> get_nb_fct</span> : <code class="type"><a href="Graph.html#TYPEt">t</a> -> int</code></pre><div class="info ">
<code class="code">get_nb_fct g</code> return the number of functions displayed on <code class="code">g</code>.<br>
</div>

<pre><span id="VALget_kind"><span class="keyword">val</span> get_kind</span> : <code class="type"><a href="Graph.html#TYPEt">t</a> -> <a href="Graph.html#TYPEkind">kind</a></code></pre><div class="info ">
<code class="code">get_kind g</code> returns the kind of the graph <code class="code">g</code>.<br>
</div>

<pre><span id="VALstop"><span class="keyword">val</span> stop</span> : <code class="type"><a href="Graph.html#TYPEt">t</a> -> unit</code></pre><div class="info ">
<code class="code">stop g</code> stops the timer inside the graph <code class="code">g</code>. This function is necessary 
     to remove cleanly the graph <code class="code">g</code> from a graphical user interface.<br>
</div>

<pre><span id="VALresume"><span class="keyword">val</span> resume</span> : <code class="type"><a href="Graph.html#TYPEt">t</a> -> unit</code></pre><div class="info ">
<code class="code">resume g</code> restarts the timer of the graph <code class="code">g</code> with its old period.<br>
</div>

<pre><span id="VALrestart"><span class="keyword">val</span> restart</span> : <code class="type"><a href="Graph.html#TYPEt">t</a> -> int -> unit</code></pre><div class="info ">
<code class="code">restart g p</code> clears the graph <code class="code">g</code> and restarts the timer with the period <code class="code">p</code>.<br>
</div>

<pre><span id="VALclear"><span class="keyword">val</span> clear</span> : <code class="type"><a href="Graph.html#TYPEt">t</a> -> unit</code></pre><div class="info ">
<code class="code">clear g</code> clears the graph.<br>
</div>

<pre><span id="VALset_timer"><span class="keyword">val</span> set_timer</span> : <code class="type"><a href="Graph.html#TYPEt">t</a> -> int -> unit</code></pre><div class="info ">
<code class="code">set_timer g t</code> removes the timer inside <code class="code">g</code> and replaces it with 
      a new timer whose new timer period will be <code class="code">t</code> (in milliseconds).<br>
</div>

<pre><span id="VALget_timer"><span class="keyword">val</span> get_timer</span> : <code class="type"><a href="Graph.html#TYPEt">t</a> -> GMain.Timeout.id option</code></pre><div class="info ">
<code class="code">get_timer g</code> returns the timer inside <code class="code">g</code>.<br>
</div>

<pre><span id="VALget_period"><span class="keyword">val</span> get_period</span> : <code class="type"><a href="Graph.html#TYPEt">t</a> -> int</code></pre><div class="info ">
<code class="code">get_period g</code> returns the value of the timer inside <code class="code">g</code> (in milliseconds).<br>
</div>

<pre><span id="VALget_steps"><span class="keyword">val</span> get_steps</span> : <code class="type"><a href="Graph.html#TYPEt">t</a> -> int</code></pre><div class="info ">
<code class="code">get_steps g</code> returns the number of values that are displayed in the graph <code class="code">g</code> for each function.<br>
</div>

<pre><span id="VALget_gridx"><span class="keyword">val</span> get_gridx</span> : <code class="type"><a href="Graph.html#TYPEt">t</a> -> int</code></pre><div class="info ">
<code class="code">get_gridx g</code> returns the number of divisions of the background along the X-axis
      on the graph <code class="code">g</code>.<br>
</div>

<pre><span id="VALget_gridy"><span class="keyword">val</span> get_gridy</span> : <code class="type"><a href="Graph.html#TYPEt">t</a> -> int</code></pre><div class="info ">
<code class="code">get_gridy g</code> returns the number of divisions of the background along the Y-axis
      on the graph <code class="code">g</code>.<br>
</div>

<pre><span id="VALget_xaxis"><span class="keyword">val</span> get_xaxis</span> : <code class="type"><a href="Graph.html#TYPEt">t</a> -> int</code></pre><div class="info ">
<code class="code">get_xaxis g</code> returns the frequency of the X-axis legend of the graph <code class="code">g</code>
      (1 = always displayed, 2 = half displayed etc...)<br>
</div>

<pre><span id="VALget_yaxis"><span class="keyword">val</span> get_yaxis</span> : <code class="type"><a href="Graph.html#TYPEt">t</a> -> int</code></pre><div class="info ">
<code class="code">get_yaxis g</code> returns the frequency of the Y-axis legend of the graph <code class="code">g</code>
      (1 = always displayed, 2 = half displayed etc...)<br>
</div>
</body></html>